diff --git a/node_modules/@react-native/assets-registry/README.md b/node_modules/@react-native/assets-registry/README.md deleted file mode 100644 index 407cc5b53..000000000 --- a/node_modules/@react-native/assets-registry/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# @react-native/assets-registry - -[![Version][version-badge]][package] - -## Installation - -``` -yarn add --dev @react-native/assets-registry -``` - -*Note: We're using `yarn` to install deps. Feel free to change commands to use `npm` 3+ and `npx` if you like* - -[version-badge]: https://img.shields.io/npm/v/@react-native/assets-registry?style=flat-square -[package]: https://www.npmjs.com/package/@react-native/assets-registry - -## Testing - -To run the tests in this package, run the following commands from the React Native root folder: - -1. `yarn` to install the dependencies. You just need to run this once -2. `yarn jest packages/assets`. diff --git a/node_modules/@react-native/assets-registry/package.json b/node_modules/@react-native/assets-registry/package.json deleted file mode 100644 index d81a96c75..000000000 --- a/node_modules/@react-native/assets-registry/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "@react-native/assets-registry", - "version": "0.74.87", - "description": "Asset support code for React Native.", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/facebook/react-native.git", - "directory": "packages/assets" - }, - "homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/assets#readme", - "keywords": [ - "assets", - "registry", - "react-native", - "support" - ], - "bugs": "https://github.com/facebook/react-native/issues", - "engines": { - "node": ">=18" - } -} diff --git a/node_modules/@react-native/assets-registry/path-support.js b/node_modules/@react-native/assets-registry/path-support.js deleted file mode 100644 index f0a85af33..000000000 --- a/node_modules/@react-native/assets-registry/path-support.js +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict - */ - -'use strict'; - -import type {PackagerAsset} from './registry.js'; - -const androidScaleSuffix = { - '0.75': 'ldpi', - '1': 'mdpi', - '1.5': 'hdpi', - '2': 'xhdpi', - '3': 'xxhdpi', - '4': 'xxxhdpi', -}; - -const ANDROID_BASE_DENSITY = 160; - -/** - * FIXME: using number to represent discrete scale numbers is fragile in essence because of - * floating point numbers imprecision. - */ -function getAndroidAssetSuffix(scale: number): string { - if (scale.toString() in androidScaleSuffix) { - return androidScaleSuffix[scale.toString()]; - } - // NOTE: Android Gradle Plugin does not fully support the nnndpi format. - // See https://issuetracker.google.com/issues/72884435 - if (Number.isFinite(scale) && scale > 0) { - return Math.round(scale * ANDROID_BASE_DENSITY) + 'dpi'; - } - throw new Error('no such scale ' + scale.toString()); -} - -// See https://developer.android.com/guide/topics/resources/drawable-resource.html -const drawableFileTypes = new Set([ - 'gif', - 'jpeg', - 'jpg', - 'ktx', - 'png', - 'svg', - 'webp', - 'xml', -]); - -function getAndroidResourceFolderName( - asset: PackagerAsset, - scale: number, -): string | $TEMPORARY$string<'raw'> { - if (!drawableFileTypes.has(asset.type)) { - return 'raw'; - } - const suffix = getAndroidAssetSuffix(scale); - if (!suffix) { - throw new Error( - "Don't know which android drawable suffix to use for scale: " + - scale + - '\nAsset: ' + - JSON.stringify(asset, null, '\t') + - '\nPossible scales are:' + - JSON.stringify(androidScaleSuffix, null, '\t'), - ); - } - return 'drawable-' + suffix; -} - -function getAndroidResourceIdentifier(asset: PackagerAsset): string { - return (getBasePath(asset) + '/' + asset.name) - .toLowerCase() - .replace(/\//g, '_') // Encode folder structure in file name - .replace(/([^a-z0-9_])/g, '') // Remove illegal chars - .replace(/^assets_/, ''); // Remove "assets_" prefix -} - -function getBasePath(asset: PackagerAsset): string { - const basePath = asset.httpServerLocation; - return basePath.startsWith('/') ? basePath.slice(1) : basePath; -} - -module.exports = { - getAndroidResourceFolderName, - getAndroidResourceIdentifier, - getBasePath, -}; diff --git a/node_modules/@react-native/assets-registry/registry.js b/node_modules/@react-native/assets-registry/registry.js deleted file mode 100644 index 02470da3c..000000000 --- a/node_modules/@react-native/assets-registry/registry.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -export type PackagerAsset = { - +__packager_asset: boolean, - +fileSystemLocation: string, - +httpServerLocation: string, - +width: ?number, - +height: ?number, - +scales: Array, - +hash: string, - +name: string, - +type: string, - ... -}; - -const assets: Array = []; - -function registerAsset(asset: PackagerAsset): number { - // `push` returns new array length, so the first asset will - // get id 1 (not 0) to make the value truthy - return assets.push(asset); -} - -function getAssetByID(assetId: number): PackagerAsset { - return assets[assetId - 1]; -} - -module.exports = {registerAsset, getAssetByID}; diff --git a/node_modules/@react-native/babel-plugin-codegen/README.md b/node_modules/@react-native/babel-plugin-codegen/README.md deleted file mode 100644 index 34194810a..000000000 --- a/node_modules/@react-native/babel-plugin-codegen/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# @react-native/babel-plugin-codegen - -[![Version][version-badge]][package] - -## Installation - -``` -yarn add --dev @babel/core @react-native/babel-plugin-codegen -``` - -*Note: We're using `yarn` to install deps. Feel free to change commands to use `npm` 3+ and `npx` if you like* - -[version-badge]: https://img.shields.io/npm/v/@react-native/babel-plugin-codegen?style=flat-square -[package]: https://www.npmjs.com/package/@react-native/babel-plugin-codegen - -## Testing - -To run the tests in this package, run the following commands from the React Native root folder: - -1. `yarn` to install the dependencies. You just need to run this once -2. `yarn jest packages/babel-plugin-codegen`. diff --git a/node_modules/@react-native/babel-plugin-codegen/index.js b/node_modules/@react-native/babel-plugin-codegen/index.js deleted file mode 100644 index 77de6b77b..000000000 --- a/node_modules/@react-native/babel-plugin-codegen/index.js +++ /dev/null @@ -1,187 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -'use strict'; - -let FlowParser, TypeScriptParser, RNCodegen; - -const {basename} = require('path'); - -try { - FlowParser = - require('@react-native/codegen/src/parsers/flow/parser').FlowParser; - TypeScriptParser = - require('@react-native/codegen/src/parsers/typescript/parser').TypeScriptParser; - RNCodegen = require('@react-native/codegen/src/generators/RNCodegen'); -} catch (e) { - // Fallback to lib when source doesn't exit (e.g. when installed as a dev dependency) - FlowParser = - require('@react-native/codegen/lib/parsers/flow/parser').FlowParser; - TypeScriptParser = - require('@react-native/codegen/lib/parsers/typescript/parser').TypeScriptParser; - RNCodegen = require('@react-native/codegen/lib/generators/RNCodegen'); -} - -const flowParser = new FlowParser(); -const typeScriptParser = new TypeScriptParser(); - -function parseFile(filename, code) { - if (filename.endsWith('js')) { - return flowParser.parseString(code); - } - - if (filename.endsWith('ts')) { - return typeScriptParser.parseString(code); - } - - throw new Error( - `Unable to parse file '${filename}'. Unsupported filename extension.`, - ); -} - -function generateViewConfig(filename, code) { - const schema = parseFile(filename, code); - - const libraryName = basename(filename).replace( - /NativeComponent\.(js|ts)$/, - '', - ); - return RNCodegen.generateViewConfig({ - schema, - libraryName, - }); -} - -function isCodegenDeclaration(declaration) { - if (!declaration) { - return false; - } - - if ( - declaration.left && - declaration.left.left && - declaration.left.left.name === 'codegenNativeComponent' - ) { - return true; - } else if ( - declaration.callee && - declaration.callee.name && - declaration.callee.name === 'codegenNativeComponent' - ) { - return true; - } else if ( - (declaration.type === 'TypeCastExpression' || - declaration.type === 'AsExpression') && - declaration.expression && - declaration.expression.callee && - declaration.expression.callee.name && - declaration.expression.callee.name === 'codegenNativeComponent' - ) { - return true; - } else if ( - declaration.type === 'TSAsExpression' && - declaration.expression && - declaration.expression.callee && - declaration.expression.callee.name && - declaration.expression.callee.name === 'codegenNativeComponent' - ) { - return true; - } - - return false; -} - -module.exports = function ({parse, types: t}) { - return { - pre(state) { - this.code = state.code; - this.filename = state.opts.filename; - this.defaultExport = null; - this.commandsExport = null; - this.codeInserted = false; - }, - visitor: { - ExportNamedDeclaration(path) { - if (this.codeInserted) { - return; - } - - if ( - path.node.declaration && - path.node.declaration.declarations && - path.node.declaration.declarations[0] - ) { - const firstDeclaration = path.node.declaration.declarations[0]; - - if (firstDeclaration.type === 'VariableDeclarator') { - if ( - firstDeclaration.init && - firstDeclaration.init.type === 'CallExpression' && - firstDeclaration.init.callee.type === 'Identifier' && - firstDeclaration.init.callee.name === 'codegenNativeCommands' - ) { - if ( - firstDeclaration.id.type === 'Identifier' && - firstDeclaration.id.name !== 'Commands' - ) { - throw path.buildCodeFrameError( - "Native commands must be exported with the name 'Commands'", - ); - } - this.commandsExport = path; - return; - } else { - if (firstDeclaration.id.name === 'Commands') { - throw path.buildCodeFrameError( - "'Commands' is a reserved export and may only be used to export the result of codegenNativeCommands.", - ); - } - } - } - } else if (path.node.specifiers && path.node.specifiers.length > 0) { - path.node.specifiers.forEach(specifier => { - if ( - specifier.type === 'ExportSpecifier' && - specifier.local.type === 'Identifier' && - specifier.local.name === 'Commands' - ) { - throw path.buildCodeFrameError( - "'Commands' is a reserved export and may only be used to export the result of codegenNativeCommands.", - ); - } - }); - } - }, - ExportDefaultDeclaration(path, state) { - if (isCodegenDeclaration(path.node.declaration)) { - this.defaultExport = path; - } - }, - - Program: { - exit(path) { - if (this.defaultExport) { - const viewConfig = generateViewConfig(this.filename, this.code); - this.defaultExport.replaceWithMultiple( - parse(viewConfig, { - babelrc: false, - browserslistConfigFile: false, - configFile: false, - }).program.body, - ); - if (this.commandsExport != null) { - this.commandsExport.remove(); - } - this.codeInserted = true; - } - }, - }, - }, - }; -}; diff --git a/node_modules/@react-native/babel-plugin-codegen/package.json b/node_modules/@react-native/babel-plugin-codegen/package.json deleted file mode 100644 index 05543216b..000000000 --- a/node_modules/@react-native/babel-plugin-codegen/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "@react-native/babel-plugin-codegen", - "version": "0.74.87", - "description": "Babel plugin to generate native module and view manager code for React Native.", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/facebook/react-native.git", - "directory": "packages/babel-plugin-codegen" - }, - "homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/babel-plugin-codegen#readme", - "keywords": [ - "babel", - "plugin", - "codegen", - "react-native", - "native-modules", - "view-manager" - ], - "bugs": "https://github.com/facebook/react-native/issues", - "engines": { - "node": ">=18" - }, - "files": [ - "index.js" - ], - "dependencies": { - "@react-native/codegen": "0.74.87" - }, - "devDependencies": { - "@babel/core": "^7.20.0" - } -} diff --git a/node_modules/@react-native/babel-preset/README.md b/node_modules/@react-native/babel-preset/README.md deleted file mode 100644 index a29c400c0..000000000 --- a/node_modules/@react-native/babel-preset/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# @react-native/babel-preset - -Babel presets for [React Native](https://reactnative.dev) applications. React Native itself uses this Babel preset by default when transforming your app's source code. - -If you wish to use a custom Babel configuration by writing a `babel.config.js` file in your project's root directory, you must specify all the plugins necessary to transform your code. React Native does not apply its default Babel configuration in this case. So, to make your life easier, you can use this preset to get the default configuration and then specify more plugins that run before it. - -## Usage - -As mentioned above, you only need to use this preset if you are writing a custom `babel.config.js` file. - -### Installation - -Install `@react-native/babel-preset` in your app: - -with `npm`: - -```sh -npm i @react-native/babel-preset --save-dev -``` - -or with `yarn`: - -```sh -yarn add -D @react-native/babel-preset -``` - -### Configuring Babel - -Then, create a file called `babel.config.js` in your project's root directory. The existence of this `babel.config.js` file will tell React Native to use your custom Babel configuration instead of its own. Then load this preset: - -``` -{ - "presets": ["module:@react-native/babel-preset"] -} -``` - -You can further customize your Babel configuration by specifying plugins and other options. See [Babel's `babel.config.js` documentation](https://babeljs.io/docs/en/config-files/) to learn more. - -## Help and Support - -If you get stuck configuring Babel, please ask a question on Stack Overflow or find a consultant for help. If you discover a bug, please open up an issue. diff --git a/node_modules/@react-native/babel-preset/package.json b/node_modules/@react-native/babel-preset/package.json deleted file mode 100644 index 93d4b9e79..000000000 --- a/node_modules/@react-native/babel-preset/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "@react-native/babel-preset", - "version": "0.74.87", - "description": "Babel preset for React Native applications", - "main": "src/index.js", - "repository": { - "type": "git", - "url": "git@github.com:facebook/react-native.git" - }, - "keywords": [ - "babel", - "preset", - "react-native" - ], - "license": "MIT", - "dependencies": { - "@babel/core": "^7.20.0", - "@babel/plugin-proposal-async-generator-functions": "^7.0.0", - "@babel/plugin-proposal-class-properties": "^7.18.0", - "@babel/plugin-proposal-export-default-from": "^7.0.0", - "@babel/plugin-proposal-logical-assignment-operators": "^7.18.0", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.0", - "@babel/plugin-proposal-numeric-separator": "^7.0.0", - "@babel/plugin-proposal-object-rest-spread": "^7.20.0", - "@babel/plugin-proposal-optional-catch-binding": "^7.0.0", - "@babel/plugin-proposal-optional-chaining": "^7.20.0", - "@babel/plugin-syntax-dynamic-import": "^7.8.0", - "@babel/plugin-syntax-export-default-from": "^7.0.0", - "@babel/plugin-syntax-flow": "^7.18.0", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.0.0", - "@babel/plugin-syntax-optional-chaining": "^7.0.0", - "@babel/plugin-transform-arrow-functions": "^7.0.0", - "@babel/plugin-transform-async-to-generator": "^7.20.0", - "@babel/plugin-transform-block-scoping": "^7.0.0", - "@babel/plugin-transform-classes": "^7.0.0", - "@babel/plugin-transform-computed-properties": "^7.0.0", - "@babel/plugin-transform-destructuring": "^7.20.0", - "@babel/plugin-transform-flow-strip-types": "^7.20.0", - "@babel/plugin-transform-function-name": "^7.0.0", - "@babel/plugin-transform-literals": "^7.0.0", - "@babel/plugin-transform-modules-commonjs": "^7.0.0", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.0.0", - "@babel/plugin-transform-parameters": "^7.0.0", - "@babel/plugin-transform-private-methods": "^7.22.5", - "@babel/plugin-transform-private-property-in-object": "^7.22.11", - "@babel/plugin-transform-react-display-name": "^7.0.0", - "@babel/plugin-transform-react-jsx": "^7.0.0", - "@babel/plugin-transform-react-jsx-self": "^7.0.0", - "@babel/plugin-transform-react-jsx-source": "^7.0.0", - "@babel/plugin-transform-runtime": "^7.0.0", - "@babel/plugin-transform-shorthand-properties": "^7.0.0", - "@babel/plugin-transform-spread": "^7.0.0", - "@babel/plugin-transform-sticky-regex": "^7.0.0", - "@babel/plugin-transform-typescript": "^7.5.0", - "@babel/plugin-transform-unicode-regex": "^7.0.0", - "@babel/template": "^7.0.0", - "@react-native/babel-plugin-codegen": "0.74.87", - "babel-plugin-transform-flow-enums": "^0.0.2", - "react-refresh": "^0.14.0" - }, - "peerDependencies": { - "@babel/core": "*" - }, - "engines": { - "node": ">=18" - } -} diff --git a/node_modules/@react-native/babel-preset/src/configs/hmr.js b/node_modules/@react-native/babel-preset/src/configs/hmr.js deleted file mode 100644 index 46cbcbd48..000000000 --- a/node_modules/@react-native/babel-preset/src/configs/hmr.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @oncall react_native - */ - -'use strict'; - -module.exports = function () { - return { - plugins: [require('react-refresh/babel')], - }; -}; diff --git a/node_modules/@react-native/babel-preset/src/configs/lazy-imports.js b/node_modules/@react-native/babel-preset/src/configs/lazy-imports.js deleted file mode 100644 index 1c001f67a..000000000 --- a/node_modules/@react-native/babel-preset/src/configs/lazy-imports.js +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @oncall react_native - */ - -// This is the set of modules that React Native publicly exports and that we -// want to require lazily. Keep this list in sync with -// react-native/index.js (though having extra entries here is fairly harmless). - -'use strict'; - -module.exports = new Set([ - 'AccessibilityInfo', - 'ActivityIndicator', - 'Button', - 'DatePickerIOS', - 'DrawerLayoutAndroid', - 'FlatList', - 'Image', - 'ImageBackground', - 'InputAccessoryView', - 'KeyboardAvoidingView', - 'Modal', - 'Pressable', - 'ProgressBarAndroid', - 'ProgressViewIOS', - 'SafeAreaView', - 'ScrollView', - 'SectionList', - 'Slider', - 'Switch', - 'RefreshControl', - 'StatusBar', - 'Text', - 'TextInput', - 'Touchable', - 'TouchableHighlight', - 'TouchableNativeFeedback', - 'TouchableOpacity', - 'TouchableWithoutFeedback', - 'View', - 'VirtualizedList', - 'VirtualizedSectionList', - - // APIs - 'ActionSheetIOS', - 'Alert', - 'Animated', - 'Appearance', - 'AppRegistry', - 'AppState', - 'AsyncStorage', - 'BackHandler', - 'Clipboard', - 'DeviceInfo', - 'Dimensions', - 'Easing', - 'ReactNative', - 'I18nManager', - 'InteractionManager', - 'Keyboard', - 'LayoutAnimation', - 'Linking', - 'LogBox', - 'NativeEventEmitter', - 'PanResponder', - 'PermissionsAndroid', - 'PixelRatio', - 'PushNotificationIOS', - 'Settings', - 'Share', - 'StyleSheet', - 'Systrace', - 'ToastAndroid', - 'TVEventHandler', - 'UIManager', - 'ReactNative', - 'UTFSequence', - 'Vibration', - - // Plugins - 'RCTDeviceEventEmitter', - 'RCTNativeAppEventEmitter', - 'NativeModules', - 'Platform', - 'processColor', - 'requireNativeComponent', -]); diff --git a/node_modules/@react-native/babel-preset/src/configs/main.js b/node_modules/@react-native/babel-preset/src/configs/main.js deleted file mode 100644 index 4a483730e..000000000 --- a/node_modules/@react-native/babel-preset/src/configs/main.js +++ /dev/null @@ -1,235 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @oncall react_native - */ - -'use strict'; - -const passthroughSyntaxPlugins = require('../passthrough-syntax-plugins'); -const lazyImports = require('./lazy-imports'); - -function isTypeScriptSource(fileName) { - return !!fileName && fileName.endsWith('.ts'); -} - -function isTSXSource(fileName) { - return !!fileName && fileName.endsWith('.tsx'); -} - -// use `this.foo = bar` instead of `this.defineProperty('foo', ...)` -const loose = true; - -const defaultPlugins = [ - [require('@babel/plugin-syntax-flow')], - [require('babel-plugin-transform-flow-enums')], - [require('@babel/plugin-transform-block-scoping')], - [require('@babel/plugin-proposal-class-properties'), {loose}], - [require('@babel/plugin-transform-private-methods'), {loose}], - [require('@babel/plugin-transform-private-property-in-object'), {loose}], - [require('@babel/plugin-syntax-dynamic-import')], - [require('@babel/plugin-syntax-export-default-from')], - ...passthroughSyntaxPlugins, - [require('@babel/plugin-transform-unicode-regex')], -]; - -const getPreset = (src, options) => { - const transformProfile = - (options && options.unstable_transformProfile) || 'default'; - const isHermesStable = transformProfile === 'hermes-stable'; - const isHermesCanary = transformProfile === 'hermes-canary'; - const isHermes = isHermesStable || isHermesCanary; - - const isNull = src == null; - const hasClass = isNull || src.indexOf('class') !== -1; - - const extraPlugins = []; - if (!options.useTransformReactJSXExperimental) { - extraPlugins.push([ - require('@babel/plugin-transform-react-jsx'), - {runtime: 'automatic'}, - ]); - } - - if ( - !options.disableStaticViewConfigsCodegen && - (src === null || /\bcodegenNativeComponent lazyImports.has(importSpecifier), - allowTopLevelThis: true, // dont rewrite global `this` -> `undefined` - }, - ], - ); - } - - if (hasClass) { - extraPlugins.push([require('@babel/plugin-transform-classes')]); - } - - // TODO(gaearon): put this back into '=>' indexOf bailout - // and patch react-refresh to not depend on this transform. - extraPlugins.push([require('@babel/plugin-transform-arrow-functions')]); - - if (!isHermes) { - extraPlugins.push([require('@babel/plugin-transform-computed-properties')]); - extraPlugins.push([require('@babel/plugin-transform-parameters')]); - extraPlugins.push([ - require('@babel/plugin-transform-shorthand-properties'), - ]); - extraPlugins.push([ - require('@babel/plugin-proposal-optional-catch-binding'), - ]); - extraPlugins.push([require('@babel/plugin-transform-function-name')]); - extraPlugins.push([require('@babel/plugin-transform-literals')]); - extraPlugins.push([require('@babel/plugin-proposal-numeric-separator')]); - extraPlugins.push([require('@babel/plugin-transform-sticky-regex')]); - } else { - extraPlugins.push([ - require('@babel/plugin-transform-named-capturing-groups-regex'), - ]); - } - if (!isHermesCanary) { - extraPlugins.push([ - require('@babel/plugin-transform-destructuring'), - {useBuiltIns: true}, - ]); - } - if (!isHermes && (isNull || hasClass || src.indexOf('...') !== -1)) { - extraPlugins.push( - [require('@babel/plugin-transform-spread')], - [ - require('@babel/plugin-proposal-object-rest-spread'), - // Assume no dependence on getters or evaluation order. See https://github.com/babel/babel/pull/11520 - {loose: true, useBuiltIns: true}, - ], - ); - } - if (isNull || src.indexOf('async') !== -1) { - extraPlugins.push([ - require('@babel/plugin-proposal-async-generator-functions'), - ]); - extraPlugins.push([require('@babel/plugin-transform-async-to-generator')]); - } - if ( - isNull || - src.indexOf('React.createClass') !== -1 || - src.indexOf('createReactClass') !== -1 - ) { - extraPlugins.push([require('@babel/plugin-transform-react-display-name')]); - } - if (!isHermes && (isNull || src.indexOf('?.') !== -1)) { - extraPlugins.push([ - require('@babel/plugin-proposal-optional-chaining'), - {loose: true}, - ]); - } - if (!isHermes && (isNull || src.indexOf('??') !== -1)) { - extraPlugins.push([ - require('@babel/plugin-proposal-nullish-coalescing-operator'), - {loose: true}, - ]); - } - if ( - !isHermes && - (isNull || - src.indexOf('??=') !== -1 || - src.indexOf('||=') !== -1 || - src.indexOf('&&=') !== -1) - ) { - extraPlugins.push([ - require('@babel/plugin-proposal-logical-assignment-operators'), - {loose: true}, - ]); - } - - if (options && options.dev && !options.useTransformReactJSXExperimental) { - extraPlugins.push([require('@babel/plugin-transform-react-jsx-source')]); - extraPlugins.push([require('@babel/plugin-transform-react-jsx-self')]); - } - - if (!options || options.enableBabelRuntime !== false) { - // Allows configuring a specific runtime version to optimize output - const isVersion = typeof options?.enableBabelRuntime === 'string'; - - extraPlugins.push([ - require('@babel/plugin-transform-runtime'), - { - helpers: true, - regenerator: !isHermes, - ...(isVersion && {version: options.enableBabelRuntime}), - }, - ]); - } - - return { - comments: false, - compact: true, - overrides: [ - // the flow strip types plugin must go BEFORE class properties! - // there'll be a test case that fails if you don't. - { - plugins: [require('@babel/plugin-transform-flow-strip-types')], - }, - { - plugins: defaultPlugins, - }, - { - test: isTypeScriptSource, - plugins: [ - [ - require('@babel/plugin-transform-typescript'), - { - isTSX: false, - allowNamespaces: true, - }, - ], - ], - }, - { - test: isTSXSource, - plugins: [ - [ - require('@babel/plugin-transform-typescript'), - { - isTSX: true, - allowNamespaces: true, - }, - ], - ], - }, - { - plugins: extraPlugins, - }, - ], - }; -}; - -module.exports = options => { - if (options.withDevTools == null) { - const env = process.env.BABEL_ENV || process.env.NODE_ENV; - if (!env || env === 'development') { - return getPreset(null, {...options, dev: true}); - } - } - return getPreset(null, options); -}; - -module.exports.getPreset = getPreset; diff --git a/node_modules/@react-native/babel-preset/src/index.js b/node_modules/@react-native/babel-preset/src/index.js deleted file mode 100644 index 011dfe064..000000000 --- a/node_modules/@react-native/babel-preset/src/index.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @oncall react_native - */ - -'use strict'; - -const main = require('./configs/main'); - -module.exports = function (babel, options) { - return main(options); -}; - -module.exports.getPreset = main.getPreset; -module.exports.passthroughSyntaxPlugins = require('./passthrough-syntax-plugins'); diff --git a/node_modules/@react-native/babel-preset/src/passthrough-syntax-plugins.js b/node_modules/@react-native/babel-preset/src/passthrough-syntax-plugins.js deleted file mode 100644 index f66f225c6..000000000 --- a/node_modules/@react-native/babel-preset/src/passthrough-syntax-plugins.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @oncall react_native - */ - -'use strict'; - -// This list of syntax plugins is used for two purposes: -// 1. Enabling experimental syntax features in the INPUT to the Metro Babel -// transformer, regardless of whether we actually transform them. -// 2. Enabling these same features in parser passes that consume the OUTPUT of -// the Metro Babel transformer. -const passthroughSyntaxPlugins = [ - [require('@babel/plugin-syntax-nullish-coalescing-operator')], - [require('@babel/plugin-syntax-optional-chaining')], -]; - -module.exports = passthroughSyntaxPlugins; diff --git a/node_modules/@react-native/codegen/README.md b/node_modules/@react-native/codegen/README.md deleted file mode 100644 index 8f6856b1c..000000000 --- a/node_modules/@react-native/codegen/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# @react-native/codegen - -[![Version][version-badge]][package] - -## Installation - -``` -yarn add --dev @react-native/codegen -``` - -*Note: We're using `yarn` to install deps. Feel free to change commands to use `npm` 3+ and `npx` if you like* - -[version-badge]: https://img.shields.io/npm/v/@react-native/codegen?style=flat-square -[package]: https://www.npmjs.com/package/@react-native/codegen - -## Testing - -To run the tests in this package, run the following commands from the React Native root folder: - -1. `yarn` to install the dependencies. You just need to run this once -2. `yarn jest packages/react-native-codegen`. diff --git a/node_modules/@react-native/codegen/lib/CodegenSchema.d.ts b/node_modules/@react-native/codegen/lib/CodegenSchema.d.ts deleted file mode 100644 index 306067eb5..000000000 --- a/node_modules/@react-native/codegen/lib/CodegenSchema.d.ts +++ /dev/null @@ -1,368 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -export type PlatformType = - | 'iOS' - | 'android'; - -export interface SchemaType { - readonly modules: { - [hasteModuleName: string]: ComponentSchema | NativeModuleSchema; - }; -} - -export interface DoubleTypeAnnotation { - readonly type: 'DoubleTypeAnnotation'; -} - -export interface FloatTypeAnnotation { - readonly type: 'FloatTypeAnnotation'; -} - -export interface BooleanTypeAnnotation { - readonly type: 'BooleanTypeAnnotation'; -} - -export interface Int32TypeAnnotation { - readonly type: 'Int32TypeAnnotation'; -} - -export interface StringTypeAnnotation { - readonly type: 'StringTypeAnnotation'; -} - -export interface StringEnumTypeAnnotation { - readonly type: 'StringEnumTypeAnnotation'; - readonly options: readonly string[]; -} - -export interface VoidTypeAnnotation { - readonly type: 'VoidTypeAnnotation'; -} - -export interface ObjectTypeAnnotation { - readonly type: 'ObjectTypeAnnotation'; - readonly properties: readonly NamedShape[]; - readonly baseTypes?: readonly string[] | undefined; -} - -export interface MixedTypeAnnotation { - readonly type: 'MixedTypeAnnotation'; -} - -export interface FunctionTypeAnnotation { - readonly type: 'FunctionTypeAnnotation'; - readonly params: readonly NamedShape

[]; - readonly returnTypeAnnotation: R; -} - -export interface NamedShape { - readonly name: string; - readonly optional: boolean; - readonly typeAnnotation: T; -} - -export interface ComponentSchema { - readonly type: 'Component'; - readonly components: { - [componentName: string]: ComponentShape; - }; -} - -export interface ComponentShape extends OptionsShape { - readonly extendsProps: readonly ExtendsPropsShape[]; - readonly events: readonly EventTypeShape[]; - readonly props: readonly NamedShape[]; - readonly commands: readonly NamedShape[]; - readonly deprecatedViewConfigName?: string | undefined; -} - -export interface OptionsShape { - readonly interfaceOnly?: boolean | undefined; - readonly paperComponentName?: string | undefined; - readonly excludedPlatforms?: readonly PlatformType[] | undefined; - readonly paperComponentNameDeprecated?: string | undefined; -} - -export interface ExtendsPropsShape { - readonly type: 'ReactNativeBuiltInType'; - readonly knownTypeName: 'ReactNativeCoreViewProps'; -} - -export interface EventTypeShape { - readonly name: string; - readonly bubblingType: - | 'direct' - | 'bubble'; - readonly optional: boolean; - readonly paperTopLevelNameDeprecated?: string | undefined; - readonly typeAnnotation: { - readonly type: 'EventTypeAnnotation'; - readonly argument?: ObjectTypeAnnotation | undefined; - }; -} - -export type EventTypeAnnotation = - | BooleanTypeAnnotation - | StringTypeAnnotation - | DoubleTypeAnnotation - | FloatTypeAnnotation - | Int32TypeAnnotation - | StringEnumTypeAnnotation - | ObjectTypeAnnotation - | { - readonly type: 'ArrayTypeAnnotation'; - readonly elementType: EventTypeAnnotation - }; - -export type PropTypeAnnotation = - | { - readonly type: 'BooleanTypeAnnotation'; - readonly default: - | boolean - | null; - } - | { - readonly type: 'StringTypeAnnotation'; - readonly default: - | string - | null; - } - | { - readonly type: 'DoubleTypeAnnotation'; - readonly default: number; - } - | { - readonly type: 'FloatTypeAnnotation'; - readonly default: - | number - | null; - } - | { - readonly type: 'Int32TypeAnnotation'; - readonly default: number; - } - | { - readonly type: 'StringEnumTypeAnnotation'; - readonly default: string; - readonly options: readonly string[]; - } - | { - readonly type: 'Int32EnumTypeAnnotation'; - readonly default: number; - readonly options: readonly number[]; - } - | ReservedPropTypeAnnotation - | ObjectTypeAnnotation - | { - readonly type: 'ArrayTypeAnnotation'; - readonly elementType: - | BooleanTypeAnnotation - | StringTypeAnnotation - | DoubleTypeAnnotation - | FloatTypeAnnotation - | Int32TypeAnnotation - | { - readonly type: 'StringEnumTypeAnnotation'; - readonly default: string; - readonly options: readonly string[]; - } - | ObjectTypeAnnotation - | ReservedPropTypeAnnotation - | { - readonly type: 'ArrayTypeAnnotation'; - readonly elementType: ObjectTypeAnnotation; - }; - } - | MixedTypeAnnotation; - -export interface ReservedPropTypeAnnotation { - readonly type: 'ReservedPropTypeAnnotation'; - readonly name: - | 'ColorPrimitive' - | 'ImageSourcePrimitive' - | 'PointPrimitive' - | 'EdgeInsetsPrimitive' - | 'ImageRequestPrimitive' - | 'DimensionPrimitive'; -} - -export type CommandTypeAnnotation = FunctionTypeAnnotation; - -export type CommandParamTypeAnnotation = - | ReservedTypeAnnotation - | BooleanTypeAnnotation - | Int32TypeAnnotation - | DoubleTypeAnnotation - | FloatTypeAnnotation - | StringTypeAnnotation - | { - readonly type: 'ArrayTypeAnnotation'; - readonly elementType: - | Int32TypeAnnotation - | DoubleTypeAnnotation - | FloatTypeAnnotation - | BooleanTypeAnnotation - | StringTypeAnnotation - }; - -export interface ReservedTypeAnnotation { - readonly type: 'ReservedTypeAnnotation'; - readonly name: 'RootTag'; -} - -export type Nullable = - | NullableTypeAnnotation - | T; - -export interface NullableTypeAnnotation { - readonly type: 'NullableTypeAnnotation'; - readonly typeAnnotation: T; -} - -export interface NativeModuleSchema { - readonly type: 'NativeModule'; - readonly aliasMap: NativeModuleAliasMap; - readonly enumMap: NativeModuleEnumMap; - readonly spec: NativeModuleSpec; - readonly moduleName: string; - readonly excludedPlatforms?: readonly PlatformType[] | undefined; -} - -export interface NativeModuleSpec { - readonly properties: readonly NativeModulePropertyShape[]; -} - -export type NativeModulePropertyShape = NamedShape>; - -export interface NativeModuleEnumMap { - readonly [enumName: string]: NativeModuleEnumDeclarationWithMembers; -} - -export interface NativeModuleAliasMap { - readonly [aliasName: string]: NativeModuleObjectTypeAnnotation; -} - -export type NativeModuleFunctionTypeAnnotation = FunctionTypeAnnotation, Nullable>; - -export type NativeModuleObjectTypeAnnotation = ObjectTypeAnnotation>; - -export interface NativeModuleArrayTypeAnnotation> { - readonly type: 'ArrayTypeAnnotation'; - readonly elementType?: T | undefined; -} - -export interface NativeModuleStringTypeAnnotation { - readonly type: 'StringTypeAnnotation'; -} - -export interface NativeModuleNumberTypeAnnotation { - readonly type: 'NumberTypeAnnotation'; -} - -export interface NativeModuleInt32TypeAnnotation { - readonly type: 'Int32TypeAnnotation'; -} - -export interface NativeModuleDoubleTypeAnnotation { - readonly type: 'DoubleTypeAnnotation'; -} - -export interface NativeModuleFloatTypeAnnotation { - readonly type: 'FloatTypeAnnotation'; -} - -export interface NativeModuleBooleanTypeAnnotation { - readonly type: 'BooleanTypeAnnotation'; -} - -export type NativeModuleEnumMembers = readonly { - readonly name: string; - readonly value: string | number; -}[]; - -export type NativeModuleEnumMemberType = - | 'NumberTypeAnnotation' - | 'StringTypeAnnotation'; - -export interface NativeModuleEnumDeclaration { - readonly name: string; - readonly type: 'EnumDeclaration'; - readonly memberType: NativeModuleEnumMemberType; -} - -export interface NativeModuleEnumDeclarationWithMembers { - name: string; - type: 'EnumDeclarationWithMembers'; - memberType: NativeModuleEnumMemberType; - members: NativeModuleEnumMembers; -} - -export interface NativeModuleGenericObjectTypeAnnotation { - readonly type: 'GenericObjectTypeAnnotation'; - readonly dictionaryValueType?: Nullable | undefined; -} - -export interface NativeModuleTypeAliasTypeAnnotation { - readonly type: 'TypeAliasTypeAnnotation'; - readonly name: string; -} - -export interface NativeModulePromiseTypeAnnotation { - readonly type: 'PromiseTypeAnnotation'; - readonly elementType?: Nullable | undefined; -} - -export type UnionTypeAnnotationMemberType = - | 'NumberTypeAnnotation' - | 'ObjectTypeAnnotation' - | 'StringTypeAnnotation'; - -export interface NativeModuleUnionTypeAnnotation { - readonly type: 'UnionTypeAnnotation'; - readonly memberType: UnionTypeAnnotationMemberType; -} - -export interface NativeModuleMixedTypeAnnotation { - readonly type: 'MixedTypeAnnotation'; -} - -export type NativeModuleBaseTypeAnnotation = - | NativeModuleStringTypeAnnotation - | NativeModuleNumberTypeAnnotation - | NativeModuleInt32TypeAnnotation - | NativeModuleDoubleTypeAnnotation - | NativeModuleFloatTypeAnnotation - | NativeModuleBooleanTypeAnnotation - | NativeModuleEnumDeclaration - | NativeModuleGenericObjectTypeAnnotation - | ReservedTypeAnnotation - | NativeModuleTypeAliasTypeAnnotation - | NativeModuleArrayTypeAnnotation> - | NativeModuleObjectTypeAnnotation - | NativeModuleUnionTypeAnnotation - | NativeModuleMixedTypeAnnotation; - -export type NativeModuleParamTypeAnnotation = - | NativeModuleBaseTypeAnnotation - | NativeModuleParamOnlyTypeAnnotation; - -export type NativeModuleReturnTypeAnnotation = - | NativeModuleBaseTypeAnnotation - | NativeModuleReturnOnlyTypeAnnotation; - -export type NativeModuleTypeAnnotation = - | NativeModuleBaseTypeAnnotation - | NativeModuleParamOnlyTypeAnnotation - | NativeModuleReturnOnlyTypeAnnotation; - -export type NativeModuleParamOnlyTypeAnnotation = NativeModuleFunctionTypeAnnotation; - -export type NativeModuleReturnOnlyTypeAnnotation = - | NativeModuleFunctionTypeAnnotation - | NativeModulePromiseTypeAnnotation - | VoidTypeAnnotation; diff --git a/node_modules/@react-native/codegen/lib/CodegenSchema.js b/node_modules/@react-native/codegen/lib/CodegenSchema.js deleted file mode 100644 index 4949d716c..000000000 --- a/node_modules/@react-native/codegen/lib/CodegenSchema.js +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; diff --git a/node_modules/@react-native/codegen/lib/CodegenSchema.js.flow b/node_modules/@react-native/codegen/lib/CodegenSchema.js.flow deleted file mode 100644 index d286d3a79..000000000 --- a/node_modules/@react-native/codegen/lib/CodegenSchema.js.flow +++ /dev/null @@ -1,397 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -export type PlatformType = 'iOS' | 'android'; - -export type SchemaType = $ReadOnly<{ - modules: $ReadOnly<{ - [hasteModuleName: string]: ComponentSchema | NativeModuleSchema, - }>, -}>; - -/** - * Component Type Annotations - */ -export type DoubleTypeAnnotation = $ReadOnly<{ - type: 'DoubleTypeAnnotation', -}>; - -export type FloatTypeAnnotation = $ReadOnly<{ - type: 'FloatTypeAnnotation', -}>; - -export type BooleanTypeAnnotation = $ReadOnly<{ - type: 'BooleanTypeAnnotation', -}>; - -export type Int32TypeAnnotation = $ReadOnly<{ - type: 'Int32TypeAnnotation', -}>; - -export type StringTypeAnnotation = $ReadOnly<{ - type: 'StringTypeAnnotation', -}>; - -export type StringEnumTypeAnnotation = $ReadOnly<{ - type: 'StringEnumTypeAnnotation', - options: $ReadOnlyArray, -}>; - -export type VoidTypeAnnotation = $ReadOnly<{ - type: 'VoidTypeAnnotation', -}>; - -export type ObjectTypeAnnotation<+T> = $ReadOnly<{ - type: 'ObjectTypeAnnotation', - properties: $ReadOnlyArray>, - - // metadata for objects that generated from interfaces - baseTypes?: $ReadOnlyArray, -}>; - -export type MixedTypeAnnotation = $ReadOnly<{ - type: 'MixedTypeAnnotation', -}>; - -type FunctionTypeAnnotation<+P, +R> = $ReadOnly<{ - type: 'FunctionTypeAnnotation', - params: $ReadOnlyArray>, - returnTypeAnnotation: R, -}>; - -export type NamedShape<+T> = $ReadOnly<{ - name: string, - optional: boolean, - typeAnnotation: T, -}>; - -export type ComponentSchema = $ReadOnly<{ - type: 'Component', - components: $ReadOnly<{ - [componentName: string]: ComponentShape, - }>, -}>; - -export type ComponentShape = $ReadOnly<{ - ...OptionsShape, - extendsProps: $ReadOnlyArray, - events: $ReadOnlyArray, - props: $ReadOnlyArray>, - commands: $ReadOnlyArray>, -}>; - -export type OptionsShape = $ReadOnly<{ - interfaceOnly?: boolean, - - // Use for components with no current paper rename in progress - // Does not check for new name - paperComponentName?: string, - - // Use for components that are not used on other platforms. - excludedPlatforms?: $ReadOnlyArray, - - // Use for components currently being renamed in paper - // Will use new name if it is available and fallback to this name - paperComponentNameDeprecated?: string, -}>; - -export type ExtendsPropsShape = $ReadOnly<{ - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', -}>; - -export type EventTypeShape = $ReadOnly<{ - name: string, - bubblingType: 'direct' | 'bubble', - optional: boolean, - paperTopLevelNameDeprecated?: string, - typeAnnotation: $ReadOnly<{ - type: 'EventTypeAnnotation', - argument?: ObjectTypeAnnotation, - }>, -}>; - -export type EventTypeAnnotation = - | BooleanTypeAnnotation - | StringTypeAnnotation - | DoubleTypeAnnotation - | FloatTypeAnnotation - | Int32TypeAnnotation - | MixedTypeAnnotation - | StringEnumTypeAnnotation - | ObjectTypeAnnotation - | $ReadOnly<{ - type: 'ArrayTypeAnnotation', - elementType: EventTypeAnnotation, - }>; - -export type ArrayTypeAnnotation = $ReadOnly<{ - type: 'ArrayTypeAnnotation', - elementType: - | BooleanTypeAnnotation - | StringTypeAnnotation - | DoubleTypeAnnotation - | FloatTypeAnnotation - | Int32TypeAnnotation - | $ReadOnly<{ - type: 'StringEnumTypeAnnotation', - default: string, - options: $ReadOnlyArray, - }> - | ObjectTypeAnnotation - | ReservedPropTypeAnnotation - | $ReadOnly<{ - type: 'ArrayTypeAnnotation', - elementType: ObjectTypeAnnotation, - }>, -}>; - -export type PropTypeAnnotation = - | $ReadOnly<{ - type: 'BooleanTypeAnnotation', - default: boolean | null, - }> - | $ReadOnly<{ - type: 'StringTypeAnnotation', - default: string | null, - }> - | $ReadOnly<{ - type: 'DoubleTypeAnnotation', - default: number, - }> - | $ReadOnly<{ - type: 'FloatTypeAnnotation', - default: number | null, - }> - | $ReadOnly<{ - type: 'Int32TypeAnnotation', - default: number, - }> - | $ReadOnly<{ - type: 'StringEnumTypeAnnotation', - default: string, - options: $ReadOnlyArray, - }> - | $ReadOnly<{ - type: 'Int32EnumTypeAnnotation', - default: number, - options: $ReadOnlyArray, - }> - | ReservedPropTypeAnnotation - | ObjectTypeAnnotation - | ArrayTypeAnnotation - | MixedTypeAnnotation; - -export type ReservedPropTypeAnnotation = $ReadOnly<{ - type: 'ReservedPropTypeAnnotation', - name: - | 'ColorPrimitive' - | 'ImageSourcePrimitive' - | 'PointPrimitive' - | 'EdgeInsetsPrimitive' - | 'ImageRequestPrimitive' - | 'DimensionPrimitive', -}>; - -export type CommandTypeAnnotation = FunctionTypeAnnotation< - CommandParamTypeAnnotation, - VoidTypeAnnotation, ->; - -export type CommandParamTypeAnnotation = - | ReservedTypeAnnotation - | BooleanTypeAnnotation - | Int32TypeAnnotation - | DoubleTypeAnnotation - | FloatTypeAnnotation - | StringTypeAnnotation - | ArrayTypeAnnotation; - -export type ReservedTypeAnnotation = $ReadOnly<{ - type: 'ReservedTypeAnnotation', - name: 'RootTag', // Union with more custom types. -}>; - -/** - * NativeModule Types - */ -export type Nullable<+T: NativeModuleTypeAnnotation> = - | NullableTypeAnnotation - | T; - -export type NullableTypeAnnotation<+T: NativeModuleTypeAnnotation> = $ReadOnly<{ - type: 'NullableTypeAnnotation', - typeAnnotation: T, -}>; - -export type NativeModuleSchema = $ReadOnly<{ - type: 'NativeModule', - aliasMap: NativeModuleAliasMap, - enumMap: NativeModuleEnumMap, - spec: NativeModuleSpec, - moduleName: string, - // Use for modules that are not used on other platforms. - // TODO: It's clearer to define `restrictedToPlatforms` instead, but - // `excludedPlatforms` is used here to be consistent with ComponentSchema. - excludedPlatforms?: $ReadOnlyArray, -}>; - -type NativeModuleSpec = $ReadOnly<{ - properties: $ReadOnlyArray, -}>; - -export type NativeModulePropertyShape = NamedShape< - Nullable, ->; - -export type NativeModuleEnumMap = $ReadOnly<{ - [enumName: string]: NativeModuleEnumDeclarationWithMembers, -}>; - -export type NativeModuleAliasMap = $ReadOnly<{ - [aliasName: string]: NativeModuleObjectTypeAnnotation, -}>; - -export type NativeModuleFunctionTypeAnnotation = FunctionTypeAnnotation< - Nullable, - Nullable, ->; - -export type NativeModuleObjectTypeAnnotation = ObjectTypeAnnotation< - Nullable, ->; - -export type NativeModuleArrayTypeAnnotation< - +T: Nullable, -> = $ReadOnly<{ - type: 'ArrayTypeAnnotation', - /** - * TODO(T72031674): Migrate all our NativeModule specs to not use - * invalid Array ElementTypes. Then, make the elementType required. - */ - elementType?: T, -}>; - -export type NativeModuleStringTypeAnnotation = $ReadOnly<{ - type: 'StringTypeAnnotation', -}>; - -export type NativeModuleNumberTypeAnnotation = $ReadOnly<{ - type: 'NumberTypeAnnotation', -}>; - -export type NativeModuleInt32TypeAnnotation = $ReadOnly<{ - type: 'Int32TypeAnnotation', -}>; - -export type NativeModuleDoubleTypeAnnotation = $ReadOnly<{ - type: 'DoubleTypeAnnotation', -}>; - -export type NativeModuleFloatTypeAnnotation = $ReadOnly<{ - type: 'FloatTypeAnnotation', -}>; - -export type NativeModuleBooleanTypeAnnotation = $ReadOnly<{ - type: 'BooleanTypeAnnotation', -}>; - -export type NativeModuleEnumMembers = $ReadOnlyArray< - $ReadOnly<{ - name: string, - value: string, - }>, ->; - -export type NativeModuleEnumMemberType = - | 'NumberTypeAnnotation' - | 'StringTypeAnnotation'; - -export type NativeModuleEnumDeclaration = $ReadOnly<{ - name: string, - type: 'EnumDeclaration', - memberType: NativeModuleEnumMemberType, -}>; - -export type NativeModuleEnumDeclarationWithMembers = { - name: string, - type: 'EnumDeclarationWithMembers', - memberType: NativeModuleEnumMemberType, - members: NativeModuleEnumMembers, -}; - -export type NativeModuleGenericObjectTypeAnnotation = $ReadOnly<{ - type: 'GenericObjectTypeAnnotation', - - // a dictionary type is codegen as "Object" - // but we know all its members are in the same type - // when it happens, the following field is non-null - dictionaryValueType?: Nullable, -}>; - -export type NativeModuleTypeAliasTypeAnnotation = $ReadOnly<{ - type: 'TypeAliasTypeAnnotation', - name: string, -}>; - -export type NativeModulePromiseTypeAnnotation = $ReadOnly<{ - type: 'PromiseTypeAnnotation', - elementType?: Nullable, -}>; - -export type UnionTypeAnnotationMemberType = - | 'NumberTypeAnnotation' - | 'ObjectTypeAnnotation' - | 'StringTypeAnnotation'; - -export type NativeModuleUnionTypeAnnotation = $ReadOnly<{ - type: 'UnionTypeAnnotation', - memberType: UnionTypeAnnotationMemberType, -}>; - -export type NativeModuleMixedTypeAnnotation = $ReadOnly<{ - type: 'MixedTypeAnnotation', -}>; - -export type NativeModuleBaseTypeAnnotation = - | NativeModuleStringTypeAnnotation - | NativeModuleNumberTypeAnnotation - | NativeModuleInt32TypeAnnotation - | NativeModuleDoubleTypeAnnotation - | NativeModuleFloatTypeAnnotation - | NativeModuleBooleanTypeAnnotation - | NativeModuleEnumDeclaration - | NativeModuleGenericObjectTypeAnnotation - | ReservedTypeAnnotation - | NativeModuleTypeAliasTypeAnnotation - | NativeModuleArrayTypeAnnotation> - | NativeModuleObjectTypeAnnotation - | NativeModuleUnionTypeAnnotation - | NativeModuleMixedTypeAnnotation; - -export type NativeModuleParamTypeAnnotation = - | NativeModuleBaseTypeAnnotation - | NativeModuleParamOnlyTypeAnnotation; - -export type NativeModuleReturnTypeAnnotation = - | NativeModuleBaseTypeAnnotation - | NativeModuleReturnOnlyTypeAnnotation; - -export type NativeModuleTypeAnnotation = - | NativeModuleBaseTypeAnnotation - | NativeModuleParamOnlyTypeAnnotation - | NativeModuleReturnOnlyTypeAnnotation; - -type NativeModuleParamOnlyTypeAnnotation = NativeModuleFunctionTypeAnnotation; -type NativeModuleReturnOnlyTypeAnnotation = - | NativeModulePromiseTypeAnnotation - | VoidTypeAnnotation; diff --git a/node_modules/@react-native/codegen/lib/SchemaValidator.d.ts b/node_modules/@react-native/codegen/lib/SchemaValidator.d.ts deleted file mode 100644 index 7fb8125fa..000000000 --- a/node_modules/@react-native/codegen/lib/SchemaValidator.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -import type { SchemaType } from './CodegenSchema'; - -export declare function getErrors(schema: SchemaType): readonly string[]; -export declare function validate(schema: SchemaType): void; diff --git a/node_modules/@react-native/codegen/lib/SchemaValidator.js b/node_modules/@react-native/codegen/lib/SchemaValidator.js deleted file mode 100644 index 0a6367798..000000000 --- a/node_modules/@react-native/codegen/lib/SchemaValidator.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const nullthrows = require('nullthrows'); -function getErrors(schema) { - const errors = new Set(); - - // Map of component name -> Array of module names - const componentModules = new Map(); - Object.keys(schema.modules).forEach(moduleName => { - const module = schema.modules[moduleName]; - if (module.components == null) { - return; - } - Object.keys(module.components).forEach(componentName => { - if (module.components == null) { - return; - } - if (!componentModules.has(componentName)) { - componentModules.set(componentName, []); - } - nullthrows(componentModules.get(componentName)).push(moduleName); - }); - }); - componentModules.forEach((modules, componentName) => { - if (modules.length > 1) { - errors.add( - `Duplicate components found with name ${componentName}. Found in modules ${modules.join( - ', ', - )}`, - ); - } - }); - return Array.from(errors).sort(); -} -function validate(schema) { - const errors = getErrors(schema); - if (errors.length !== 0) { - throw new Error('Errors found validating schema:\n' + errors.join('\n')); - } -} -module.exports = { - getErrors, - validate, -}; diff --git a/node_modules/@react-native/codegen/lib/SchemaValidator.js.flow b/node_modules/@react-native/codegen/lib/SchemaValidator.js.flow deleted file mode 100644 index dc59d9cd7..000000000 --- a/node_modules/@react-native/codegen/lib/SchemaValidator.js.flow +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {SchemaType} from './CodegenSchema'; - -const nullthrows = require('nullthrows'); - -function getErrors(schema: SchemaType): $ReadOnlyArray { - const errors = new Set(); - - // Map of component name -> Array of module names - const componentModules: Map> = new Map(); - - Object.keys(schema.modules).forEach(moduleName => { - const module = schema.modules[moduleName]; - - if (module.components == null) { - return; - } - - Object.keys(module.components).forEach(componentName => { - if (module.components == null) { - return; - } - - if (!componentModules.has(componentName)) { - componentModules.set(componentName, []); - } - - nullthrows(componentModules.get(componentName)).push(moduleName); - }); - }); - - componentModules.forEach((modules, componentName) => { - if (modules.length > 1) { - errors.add( - `Duplicate components found with name ${componentName}. Found in modules ${modules.join( - ', ', - )}`, - ); - } - }); - - return Array.from(errors).sort(); -} - -function validate(schema: SchemaType) { - const errors = getErrors(schema); - - if (errors.length !== 0) { - throw new Error('Errors found validating schema:\n' + errors.join('\n')); - } -} - -module.exports = { - getErrors, - validate, -}; diff --git a/node_modules/@react-native/codegen/lib/cli/combine/combine-js-to-schema-cli.js b/node_modules/@react-native/codegen/lib/cli/combine/combine-js-to-schema-cli.js deleted file mode 100644 index f1622c7f8..000000000 --- a/node_modules/@react-native/codegen/lib/cli/combine/combine-js-to-schema-cli.js +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - * @oncall react_native - */ - -'use strict'; - -function _toArray(arr) { - return ( - _arrayWithHoles(arr) || - _iterableToArray(arr) || - _unsupportedIterableToArray(arr) || - _nonIterableRest() - ); -} -function _nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.', - ); -} -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === 'string') return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === 'Object' && o.constructor) n = o.constructor.name; - if (n === 'Map' || n === 'Set') return Array.from(o); - if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) - return _arrayLikeToArray(o, minLen); -} -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; -} -function _iterableToArray(iter) { - if ( - (typeof Symbol !== 'undefined' && iter[Symbol.iterator] != null) || - iter['@@iterator'] != null - ) - return Array.from(iter); -} -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} -const _require = require('./combine-js-to-schema'), - combineSchemasInFileListAndWriteToFile = - _require.combineSchemasInFileListAndWriteToFile; -const yargs = require('yargs'); -const argv = yargs - .option('p', { - alias: 'platform', - }) - .option('e', { - alias: 'exclude', - }) - .parseSync(); -const _argv$_ = _toArray(argv._), - outfile = _argv$_[0], - fileList = _argv$_.slice(1); -const platform = argv.platform; -const exclude = argv.exclude; -const excludeRegExp = - exclude != null && exclude !== '' ? new RegExp(exclude) : null; -combineSchemasInFileListAndWriteToFile( - fileList, - platform != null ? platform.toLowerCase() : platform, - outfile, - excludeRegExp, -); diff --git a/node_modules/@react-native/codegen/lib/cli/combine/combine-js-to-schema-cli.js.flow b/node_modules/@react-native/codegen/lib/cli/combine/combine-js-to-schema-cli.js.flow deleted file mode 100644 index f2c98912e..000000000 --- a/node_modules/@react-native/codegen/lib/cli/combine/combine-js-to-schema-cli.js.flow +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - * @oncall react_native - */ - -'use strict'; - -const { - combineSchemasInFileListAndWriteToFile, -} = require('./combine-js-to-schema'); -const yargs = require('yargs'); - -const argv = yargs - .option('p', { - alias: 'platform', - }) - .option('e', { - alias: 'exclude', - }) - .parseSync(); - -const [outfile, ...fileList] = argv._; -const platform: ?string = argv.platform; -const exclude: string = argv.exclude; -const excludeRegExp: ?RegExp = - exclude != null && exclude !== '' ? new RegExp(exclude) : null; - -combineSchemasInFileListAndWriteToFile( - fileList, - platform != null ? platform.toLowerCase() : platform, - outfile, - excludeRegExp, -); diff --git a/node_modules/@react-native/codegen/lib/cli/combine/combine-js-to-schema.js b/node_modules/@react-native/codegen/lib/cli/combine/combine-js-to-schema.js deleted file mode 100644 index e9b792cc5..000000000 --- a/node_modules/@react-native/codegen/lib/cli/combine/combine-js-to-schema.js +++ /dev/null @@ -1,158 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && - (symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), - keys.push.apply(keys, symbols); - } - return keys; -} -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 - ? ownKeys(Object(source), !0).forEach(function (key) { - _defineProperty(target, key, source[key]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties( - target, - Object.getOwnPropertyDescriptors(source), - ) - : ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty( - target, - key, - Object.getOwnPropertyDescriptor(source, key), - ); - }); - } - return target; -} -function _defineProperty(obj, key, value) { - key = _toPropertyKey(key); - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true, - }); - } else { - obj[key] = value; - } - return obj; -} -function _toPropertyKey(arg) { - var key = _toPrimitive(arg, 'string'); - return typeof key === 'symbol' ? key : String(key); -} -function _toPrimitive(input, hint) { - if (typeof input !== 'object' || input === null) return input; - var prim = input[Symbol.toPrimitive]; - if (prim !== undefined) { - var res = prim.call(input, hint || 'default'); - if (typeof res !== 'object') return res; - throw new TypeError('@@toPrimitive must return a primitive value.'); - } - return (hint === 'string' ? String : Number)(input); -} -const _require = require('../../parsers/flow/parser'), - FlowParser = _require.FlowParser; -const _require2 = require('../../parsers/typescript/parser'), - TypeScriptParser = _require2.TypeScriptParser; -const _require3 = require('./combine-utils'), - filterJSFile = _require3.filterJSFile; -const fs = require('fs'); -const glob = require('glob'); -const path = require('path'); -const flowParser = new FlowParser(); -const typescriptParser = new TypeScriptParser(); -function combineSchemas(files) { - return files.reduce( - (merged, filename) => { - const contents = fs.readFileSync(filename, 'utf8'); - if ( - contents && - (/export\s+default\s+\(?codegenNativeComponent { - if (!fs.lstatSync(file).isDirectory()) { - return [file]; - } - const filePattern = path.sep === '\\' ? file.replace(/\\/g, '/') : file; - return glob.sync(`${filePattern}/**/*.{js,ts,tsx}`, { - nodir: true, - // TODO: This will remove the need of slash substitution above for Windows, - // but it requires glob@v9+; with the package currenlty relying on - // glob@7.1.1; and flow-typed repo not having definitions for glob@9+. - // windowsPathsNoEscape: true, - }); - }) - .filter(element => filterJSFile(element, platform, exclude)); -} -function combineSchemasInFileList(fileList, platform, exclude) { - const expandedFileList = expandDirectoriesIntoFiles( - fileList, - platform, - exclude, - ); - const combined = combineSchemas(expandedFileList); - if (Object.keys(combined.modules).length === 0) { - console.error( - 'No modules to process in combine-js-to-schema-cli. If this is unexpected, please check if you set up your NativeComponent correctly. See combine-js-to-schema.js for how codegen finds modules.', - ); - } - return combined; -} -function combineSchemasInFileListAndWriteToFile( - fileList, - platform, - outfile, - exclude, -) { - const combined = combineSchemasInFileList(fileList, platform, exclude); - const formattedSchema = JSON.stringify(combined, null, 2); - fs.writeFileSync(outfile, formattedSchema); -} -module.exports = { - combineSchemas, - combineSchemasInFileList, - combineSchemasInFileListAndWriteToFile, -}; diff --git a/node_modules/@react-native/codegen/lib/cli/combine/combine-js-to-schema.js.flow b/node_modules/@react-native/codegen/lib/cli/combine/combine-js-to-schema.js.flow deleted file mode 100644 index 108edf99d..000000000 --- a/node_modules/@react-native/codegen/lib/cli/combine/combine-js-to-schema.js.flow +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; -import type {SchemaType} from '../../CodegenSchema.js'; - -const {FlowParser} = require('../../parsers/flow/parser'); -const {TypeScriptParser} = require('../../parsers/typescript/parser'); -const {filterJSFile} = require('./combine-utils'); -const fs = require('fs'); -const glob = require('glob'); -const path = require('path'); - -const flowParser = new FlowParser(); -const typescriptParser = new TypeScriptParser(); - -function combineSchemas(files: Array): SchemaType { - return files.reduce( - (merged, filename) => { - const contents = fs.readFileSync(filename, 'utf8'); - - if ( - contents && - (/export\s+default\s+\(?codegenNativeComponent, - platform: ?string, - exclude: ?RegExp, -): Array { - return fileList - .flatMap(file => { - if (!fs.lstatSync(file).isDirectory()) { - return [file]; - } - const filePattern = path.sep === '\\' ? file.replace(/\\/g, '/') : file; - return glob.sync(`${filePattern}/**/*.{js,ts,tsx}`, { - nodir: true, - // TODO: This will remove the need of slash substitution above for Windows, - // but it requires glob@v9+; with the package currenlty relying on - // glob@7.1.1; and flow-typed repo not having definitions for glob@9+. - // windowsPathsNoEscape: true, - }); - }) - .filter(element => filterJSFile(element, platform, exclude)); -} - -function combineSchemasInFileList( - fileList: Array, - platform: ?string, - exclude: ?RegExp, -): SchemaType { - const expandedFileList = expandDirectoriesIntoFiles( - fileList, - platform, - exclude, - ); - const combined = combineSchemas(expandedFileList); - if (Object.keys(combined.modules).length === 0) { - console.error( - 'No modules to process in combine-js-to-schema-cli. If this is unexpected, please check if you set up your NativeComponent correctly. See combine-js-to-schema.js for how codegen finds modules.', - ); - } - return combined; -} - -function combineSchemasInFileListAndWriteToFile( - fileList: Array, - platform: ?string, - outfile: string, - exclude: ?RegExp, -): void { - const combined = combineSchemasInFileList(fileList, platform, exclude); - const formattedSchema = JSON.stringify(combined, null, 2); - fs.writeFileSync(outfile, formattedSchema); -} - -module.exports = { - combineSchemas, - combineSchemasInFileList, - combineSchemasInFileListAndWriteToFile, -}; diff --git a/node_modules/@react-native/codegen/lib/cli/combine/combine-schemas-cli.js b/node_modules/@react-native/codegen/lib/cli/combine/combine-schemas-cli.js deleted file mode 100644 index 0f392a375..000000000 --- a/node_modules/@react-native/codegen/lib/cli/combine/combine-schemas-cli.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const assert = require('assert'); -const fs = require('fs'); -const yargs = require('yargs'); -const argv = yargs - .option('p', { - alias: 'platform', - type: 'string', - demandOption: true, - }) - .option('o', { - alias: 'output', - }) - .option('s', { - alias: 'schema-query', - }) - .parseSync(); -const platform = argv.platform.toLowerCase(); -const output = argv.output; -const schemaQuery = argv.s; -if (!['ios', 'android'].includes(platform)) { - throw new Error(`Invalid platform ${platform}`); -} -if (!schemaQuery.startsWith('@')) { - throw new Error( - "The argument provided to --schema-query must be a filename that starts with '@'.", - ); -} -const schemaQueryOutputFile = schemaQuery.replace(/^@/, ''); -const schemaQueryOutput = fs.readFileSync(schemaQueryOutputFile, 'utf8'); -const schemaFiles = schemaQueryOutput.split(' '); -const modules = {}; -const specNameToFile = {}; -for (const file of schemaFiles) { - const schema = JSON.parse(fs.readFileSync(file, 'utf8')); - if (schema.modules) { - for (const specName in schema.modules) { - const module = schema.modules[specName]; - if (modules[specName]) { - assert.deepEqual( - module, - modules[specName], - `App contained two specs with the same file name '${specName}'. Schemas: ${specNameToFile[specName]}, ${file}. Please rename one of the specs.`, - ); - } - if ( - module.excludedPlatforms && - module.excludedPlatforms.indexOf(platform) >= 0 - ) { - continue; - } - modules[specName] = module; - specNameToFile[specName] = file; - } - } -} -fs.writeFileSync( - output, - JSON.stringify( - { - modules, - }, - null, - 2, - ), -); diff --git a/node_modules/@react-native/codegen/lib/cli/combine/combine-schemas-cli.js.flow b/node_modules/@react-native/codegen/lib/cli/combine/combine-schemas-cli.js.flow deleted file mode 100644 index f7a7b6f6e..000000000 --- a/node_modules/@react-native/codegen/lib/cli/combine/combine-schemas-cli.js.flow +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type { - ComponentSchema, - NativeModuleSchema, - SchemaType, -} from '../../CodegenSchema.js'; - -const assert = require('assert'); -const fs = require('fs'); -const yargs = require('yargs'); - -const argv = yargs - .option('p', { - alias: 'platform', - type: 'string', - demandOption: true, - }) - .option('o', { - alias: 'output', - }) - .option('s', { - alias: 'schema-query', - }) - .parseSync(); - -const platform: string = argv.platform.toLowerCase(); -const output: string = argv.output; -const schemaQuery: string = argv.s; - -if (!['ios', 'android'].includes(platform)) { - throw new Error(`Invalid platform ${platform}`); -} - -if (!schemaQuery.startsWith('@')) { - throw new Error( - "The argument provided to --schema-query must be a filename that starts with '@'.", - ); -} - -const schemaQueryOutputFile = schemaQuery.replace(/^@/, ''); -const schemaQueryOutput = fs.readFileSync(schemaQueryOutputFile, 'utf8'); - -const schemaFiles = schemaQueryOutput.split(' '); -const modules: { - [hasteModuleName: string]: NativeModuleSchema | ComponentSchema, -} = {}; -const specNameToFile: {[hasteModuleName: string]: string} = {}; - -for (const file of schemaFiles) { - const schema: SchemaType = JSON.parse(fs.readFileSync(file, 'utf8')); - - if (schema.modules) { - for (const specName in schema.modules) { - const module = schema.modules[specName]; - if (modules[specName]) { - assert.deepEqual( - module, - modules[specName], - `App contained two specs with the same file name '${specName}'. Schemas: ${specNameToFile[specName]}, ${file}. Please rename one of the specs.`, - ); - } - - if ( - module.excludedPlatforms && - module.excludedPlatforms.indexOf(platform) >= 0 - ) { - continue; - } - - modules[specName] = module; - specNameToFile[specName] = file; - } - } -} - -fs.writeFileSync(output, JSON.stringify({modules}, null, 2)); diff --git a/node_modules/@react-native/codegen/lib/cli/combine/combine-utils.js b/node_modules/@react-native/codegen/lib/cli/combine/combine-utils.js deleted file mode 100644 index 75b75f935..000000000 --- a/node_modules/@react-native/codegen/lib/cli/combine/combine-utils.js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - * @oncall react_native - */ - -'use strict'; - -const path = require('path'); - -/** - * This function is used by the CLI to decide whether a JS/TS file has to be processed or not by the Codegen. - * Parameters: - * - file: the path to the file - * - currentPlatform: the current platform for which we are creating the specs - * Returns: `true` if the file can be used to generate some code; `false` otherwise - * - */ -function filterJSFile(file, currentPlatform, excludeRegExp) { - const isSpecFile = /^(Native.+|.+NativeComponent)/.test(path.basename(file)); - const isNotNativeUIManager = !file.endsWith('NativeUIManager.js'); - const isNotTest = !file.includes('__tests'); - const isNotExcluded = excludeRegExp == null || !excludeRegExp.test(file); - const isNotTSTypeDefinition = !file.endsWith('.d.ts'); - const isValidCandidate = - isSpecFile && - isNotNativeUIManager && - isNotExcluded && - isNotTest && - isNotTSTypeDefinition; - const filenameComponents = path.basename(file).split('.'); - const isPlatformAgnostic = filenameComponents.length === 2; - if (currentPlatform == null) { - // need to accept only files that are platform agnostic - return isValidCandidate && isPlatformAgnostic; - } - - // If a platform is passed, accept both platform agnostic specs... - if (isPlatformAgnostic) { - return isValidCandidate; - } - - // ...and specs that share the same platform as the one passed. - // specfiles must follow the pattern: [.].(js|ts|tsx) - const filePlatform = - filenameComponents.length > 2 ? filenameComponents[1] : 'unknown'; - return isValidCandidate && currentPlatform === filePlatform; -} -module.exports = { - filterJSFile, -}; diff --git a/node_modules/@react-native/codegen/lib/cli/combine/combine-utils.js.flow b/node_modules/@react-native/codegen/lib/cli/combine/combine-utils.js.flow deleted file mode 100644 index 8f120fb68..000000000 --- a/node_modules/@react-native/codegen/lib/cli/combine/combine-utils.js.flow +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - * @oncall react_native - */ - -'use strict'; - -const path = require('path'); - -/** - * This function is used by the CLI to decide whether a JS/TS file has to be processed or not by the Codegen. - * Parameters: - * - file: the path to the file - * - currentPlatform: the current platform for which we are creating the specs - * Returns: `true` if the file can be used to generate some code; `false` otherwise - * - */ -function filterJSFile( - file: string, - currentPlatform: ?string, - excludeRegExp: ?RegExp, -): boolean { - const isSpecFile = /^(Native.+|.+NativeComponent)/.test(path.basename(file)); - const isNotNativeUIManager = !file.endsWith('NativeUIManager.js'); - const isNotTest = !file.includes('__tests'); - const isNotExcluded = excludeRegExp == null || !excludeRegExp.test(file); - const isNotTSTypeDefinition = !file.endsWith('.d.ts'); - - const isValidCandidate = - isSpecFile && - isNotNativeUIManager && - isNotExcluded && - isNotTest && - isNotTSTypeDefinition; - - const filenameComponents = path.basename(file).split('.'); - const isPlatformAgnostic = filenameComponents.length === 2; - - if (currentPlatform == null) { - // need to accept only files that are platform agnostic - return isValidCandidate && isPlatformAgnostic; - } - - // If a platform is passed, accept both platform agnostic specs... - if (isPlatformAgnostic) { - return isValidCandidate; - } - - // ...and specs that share the same platform as the one passed. - // specfiles must follow the pattern: [.].(js|ts|tsx) - const filePlatform = - filenameComponents.length > 2 ? filenameComponents[1] : 'unknown'; - return isValidCandidate && currentPlatform === filePlatform; -} - -module.exports = { - filterJSFile, -}; diff --git a/node_modules/@react-native/codegen/lib/cli/generators/generate-all.js b/node_modules/@react-native/codegen/lib/cli/generators/generate-all.js deleted file mode 100644 index 5cee549d4..000000000 --- a/node_modules/@react-native/codegen/lib/cli/generators/generate-all.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -/** - * This generates all possible outputs by executing all available generators. - */ - -'use strict'; - -const RNCodegen = require('../../generators/RNCodegen.js'); -const fs = require('fs'); -const mkdirp = require('mkdirp'); -const args = process.argv.slice(2); -if (args.length < 3) { - throw new Error( - `Expected to receive path to schema, library name, output directory and module spec name. Received ${args.join( - ', ', - )}`, - ); -} -const schemaPath = args[0]; -const libraryName = args[1]; -const outputDirectory = args[2]; -const packageName = args[3]; -const assumeNonnull = args[4] === 'true' || args[4] === 'True'; -const schemaText = fs.readFileSync(schemaPath, 'utf-8'); -if (schemaText == null) { - throw new Error(`Can't find schema at ${schemaPath}`); -} -mkdirp.sync(outputDirectory); -let schema; -try { - schema = JSON.parse(schemaText); -} catch (err) { - throw new Error(`Can't parse schema to JSON. ${schemaPath}`); -} -RNCodegen.generate( - { - libraryName, - schema, - outputDirectory, - packageName, - assumeNonnull, - }, - { - generators: [ - 'descriptors', - 'events', - 'props', - 'states', - 'tests', - 'shadow-nodes', - 'modulesAndroid', - 'modulesCxx', - 'modulesIOS', - ], - }, -); diff --git a/node_modules/@react-native/codegen/lib/cli/generators/generate-all.js.flow b/node_modules/@react-native/codegen/lib/cli/generators/generate-all.js.flow deleted file mode 100644 index 46d207510..000000000 --- a/node_modules/@react-native/codegen/lib/cli/generators/generate-all.js.flow +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - * @format - */ - -/** - * This generates all possible outputs by executing all available generators. - */ - -'use strict'; - -const RNCodegen = require('../../generators/RNCodegen.js'); -const fs = require('fs'); -const mkdirp = require('mkdirp'); - -const args = process.argv.slice(2); -if (args.length < 3) { - throw new Error( - `Expected to receive path to schema, library name, output directory and module spec name. Received ${args.join( - ', ', - )}`, - ); -} - -const schemaPath = args[0]; -const libraryName = args[1]; -const outputDirectory = args[2]; -const packageName = args[3]; -const assumeNonnull = args[4] === 'true' || args[4] === 'True'; - -const schemaText = fs.readFileSync(schemaPath, 'utf-8'); - -if (schemaText == null) { - throw new Error(`Can't find schema at ${schemaPath}`); -} - -mkdirp.sync(outputDirectory); - -let schema; -try { - schema = JSON.parse(schemaText); -} catch (err) { - throw new Error(`Can't parse schema to JSON. ${schemaPath}`); -} - -RNCodegen.generate( - {libraryName, schema, outputDirectory, packageName, assumeNonnull}, - { - generators: [ - 'descriptors', - 'events', - 'props', - 'states', - 'tests', - 'shadow-nodes', - 'modulesAndroid', - 'modulesCxx', - 'modulesIOS', - ], - }, -); diff --git a/node_modules/@react-native/codegen/lib/cli/parser/parser-cli.js b/node_modules/@react-native/codegen/lib/cli/parser/parser-cli.js deleted file mode 100644 index 20c073d43..000000000 --- a/node_modules/@react-native/codegen/lib/cli/parser/parser-cli.js +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - * @oncall react_native - */ - -'use strict'; - -function _toArray(arr) { - return ( - _arrayWithHoles(arr) || - _iterableToArray(arr) || - _unsupportedIterableToArray(arr) || - _nonIterableRest() - ); -} -function _nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.', - ); -} -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === 'string') return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === 'Object' && o.constructor) n = o.constructor.name; - if (n === 'Map' || n === 'Set') return Array.from(o); - if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) - return _arrayLikeToArray(o, minLen); -} -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; -} -function _iterableToArray(iter) { - if ( - (typeof Symbol !== 'undefined' && iter[Symbol.iterator] != null) || - iter['@@iterator'] != null - ) - return Array.from(iter); -} -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} -const parseFiles = require('./parser.js'); -const _process$argv$slice = process.argv.slice(2), - _process$argv$slice2 = _toArray(_process$argv$slice), - fileList = _process$argv$slice2.slice(0); -parseFiles(fileList); diff --git a/node_modules/@react-native/codegen/lib/cli/parser/parser-cli.js.flow b/node_modules/@react-native/codegen/lib/cli/parser/parser-cli.js.flow deleted file mode 100644 index 084b11c7a..000000000 --- a/node_modules/@react-native/codegen/lib/cli/parser/parser-cli.js.flow +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - * @oncall react_native - */ - -'use strict'; - -const parseFiles = require('./parser.js'); - -const [...fileList] = process.argv.slice(2); - -parseFiles(fileList); diff --git a/node_modules/@react-native/codegen/lib/cli/parser/parser.js b/node_modules/@react-native/codegen/lib/cli/parser/parser.js deleted file mode 100644 index 45179701b..000000000 --- a/node_modules/@react-native/codegen/lib/cli/parser/parser.js +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('../../parsers/flow/parser'), - FlowParser = _require.FlowParser; -const _require2 = require('../../parsers/typescript/parser'), - TypeScriptParser = _require2.TypeScriptParser; -const path = require('path'); -const flowParser = new FlowParser(); -const typescriptParser = new TypeScriptParser(); -function parseFiles(files) { - files.forEach(filename => { - const isTypeScript = - path.extname(filename) === '.ts' || path.extname(filename) === '.tsx'; - const parser = isTypeScript ? typescriptParser : flowParser; - console.log(filename, JSON.stringify(parser.parseFile(filename), null, 2)); - }); -} -module.exports = parseFiles; diff --git a/node_modules/@react-native/codegen/lib/cli/parser/parser.js.flow b/node_modules/@react-native/codegen/lib/cli/parser/parser.js.flow deleted file mode 100644 index 850e27fff..000000000 --- a/node_modules/@react-native/codegen/lib/cli/parser/parser.js.flow +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -const {FlowParser} = require('../../parsers/flow/parser'); -const {TypeScriptParser} = require('../../parsers/typescript/parser'); -const path = require('path'); - -const flowParser = new FlowParser(); -const typescriptParser = new TypeScriptParser(); - -function parseFiles(files: Array) { - files.forEach(filename => { - const isTypeScript = - path.extname(filename) === '.ts' || path.extname(filename) === '.tsx'; - - const parser = isTypeScript ? typescriptParser : flowParser; - - console.log(filename, JSON.stringify(parser.parseFile(filename), null, 2)); - }); -} - -module.exports = parseFiles; diff --git a/node_modules/@react-native/codegen/lib/cli/parser/parser.sh b/node_modules/@react-native/codegen/lib/cli/parser/parser.sh deleted file mode 100644 index 8d130f250..000000000 --- a/node_modules/@react-native/codegen/lib/cli/parser/parser.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. - -set -e -set -u - -THIS_DIR=$(cd -P "$(dirname "$(realpath "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd) - -# shellcheck source=xplat/js/env-utils/setup_env_vars.sh -source "$THIS_DIR/../../../../../../env-utils/setup_env_vars.sh" - -exec "$FLOW_NODE_BINARY" "$THIS_DIR/parser.js" "$@" diff --git a/node_modules/@react-native/codegen/lib/generators/RNCodegen.d.ts b/node_modules/@react-native/codegen/lib/generators/RNCodegen.d.ts deleted file mode 100644 index f73eb2e0f..000000000 --- a/node_modules/@react-native/codegen/lib/generators/RNCodegen.d.ts +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -import type { SchemaType } from '../CodegenSchema'; - -export type FilesOutput = Map; -export type LibraryGeneratorFunction = (libraryName: string, schema: SchemaType, packageName: string | undefined, assumeNonnull: boolean) => FilesOutput; -export type SchemaGeneratorFunction = (schemas: { [key: string]: SchemaType }) => FilesOutput; -export type ViewGeneratorFunction = (libraryName: string, schema: SchemaType) => FilesOutput; - -type LibraryGeneratorNames = - | 'generateComponentDescriptorH' - | 'generateComponentDescriptorCpp' - | 'generateComponentHObjCpp' - | 'generateEventEmitterCpp' - | 'generateEventEmitterH' - | 'generatePropsCpp' - | 'generatePropsH' - | 'generateStateCpp' - | 'generateStateH' - | 'generateModuleH' - | 'generateModuleCpp' - | 'generateModuleObjCpp' - | 'generateModuleJavaSpec' - | 'generateModuleJniCpp' - | 'generateModuleJniH' - | 'generatePropsJavaInterface' - | 'generatePropsJavaDelegate' - | 'generateTests' - | 'generateShadowNodeCpp' - | 'generateShadowNodeH' - ; - -type SchemaGeneratorNames = - | 'generateThirdPartyFabricComponentsProviderObjCpp' - | 'generateThirdPartyFabricComponentsProviderH' - ; - -type ViewGeneratorNames = - | 'generateViewConfigJs' - ; - -export type AllGenerators = - & { readonly [key in LibraryGeneratorNames]: LibraryGeneratorFunction; } - & { readonly [key in SchemaGeneratorNames]: SchemaGeneratorFunction; } - & { readonly [key in ViewGeneratorNames]: ViewGeneratorFunction; } - ; - -export type LibraryGenerators = - | 'componentsAndroid' - | 'componentsIOS' - | 'descriptors' - | 'events' - | 'props' - | 'states' - | 'tests' - | 'shadow-nodes' - | 'modulesAndroid' - | 'modulesCxx' - | 'modulesIOS' - ; - -export type SchemaGenerators = - | 'providerIOS' - ; - -export interface LibraryOptions { - libraryName: string; - schema: SchemaType; - outputDirectory: string; - packageName?: string | undefined; - assumeNonnull: boolean; -} - -export interface LibraryConfig { - generators: LibraryGenerators[]; - test?: boolean | undefined; -} - -export interface SchemasOptions { - schemas: { [key: string]: SchemaType }; - outputDirectory: string; -} - -export interface SchemasConfig { - generators: SchemaGenerators[]; - test?: boolean | undefined; -} - -export declare const allGenerators: AllGenerators; -export declare const libraryGenerators: { readonly [key in LibraryGenerators]: LibraryGeneratorFunction }; -export declare const schemaGenerators: { readonly [key in SchemaGenerators]: SchemaGeneratorFunction }; -export declare function generate(options: LibraryOptions, config: LibraryConfig): boolean; -export declare function generateFromSchemas(options: SchemasOptions, config: SchemasConfig): boolean; -export declare function generateViewConfig(options: LibraryOptions): string; diff --git a/node_modules/@react-native/codegen/lib/generators/RNCodegen.js b/node_modules/@react-native/codegen/lib/generators/RNCodegen.js deleted file mode 100644 index 69f28cff8..000000000 --- a/node_modules/@react-native/codegen/lib/generators/RNCodegen.js +++ /dev/null @@ -1,263 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -/* -TODO: - -- ViewConfigs should spread in View's valid attributes -*/ -const schemaValidator = require('../SchemaValidator.js'); -const generateComponentDescriptorCpp = require('./components/GenerateComponentDescriptorCpp.js'); -const generateComponentDescriptorH = require('./components/GenerateComponentDescriptorH.js'); -const generateComponentHObjCpp = require('./components/GenerateComponentHObjCpp.js'); -const generateEventEmitterCpp = require('./components/GenerateEventEmitterCpp.js'); -const generateEventEmitterH = require('./components/GenerateEventEmitterH.js'); -const generatePropsCpp = require('./components/GeneratePropsCpp.js'); -const generatePropsH = require('./components/GeneratePropsH.js'); -const generatePropsJavaDelegate = require('./components/GeneratePropsJavaDelegate.js'); -const generatePropsJavaInterface = require('./components/GeneratePropsJavaInterface.js'); -const generateShadowNodeCpp = require('./components/GenerateShadowNodeCpp.js'); -const generateShadowNodeH = require('./components/GenerateShadowNodeH.js'); -const generateStateCpp = require('./components/GenerateStateCpp.js'); -const generateStateH = require('./components/GenerateStateH.js'); -const generateTests = require('./components/GenerateTests.js'); -const generateThirdPartyFabricComponentsProviderH = require('./components/GenerateThirdPartyFabricComponentsProviderH.js'); -const generateThirdPartyFabricComponentsProviderObjCpp = require('./components/GenerateThirdPartyFabricComponentsProviderObjCpp.js'); -const generateViewConfigJs = require('./components/GenerateViewConfigJs.js'); -const generateModuleCpp = require('./modules/GenerateModuleCpp.js'); -const generateModuleH = require('./modules/GenerateModuleH.js'); -const generateModuleJavaSpec = require('./modules/GenerateModuleJavaSpec.js'); -const generateModuleJniCpp = require('./modules/GenerateModuleJniCpp.js'); -const generateModuleJniH = require('./modules/GenerateModuleJniH.js'); -const generateModuleObjCpp = require('./modules/GenerateModuleObjCpp'); -const fs = require('fs'); -const path = require('path'); -const ALL_GENERATORS = { - generateComponentDescriptorH: generateComponentDescriptorH.generate, - generateComponentDescriptorCpp: generateComponentDescriptorCpp.generate, - generateComponentHObjCpp: generateComponentHObjCpp.generate, - generateEventEmitterCpp: generateEventEmitterCpp.generate, - generateEventEmitterH: generateEventEmitterH.generate, - generatePropsCpp: generatePropsCpp.generate, - generatePropsH: generatePropsH.generate, - generateStateCpp: generateStateCpp.generate, - generateStateH: generateStateH.generate, - generateModuleH: generateModuleH.generate, - generateModuleCpp: generateModuleCpp.generate, - generateModuleObjCpp: generateModuleObjCpp.generate, - generateModuleJavaSpec: generateModuleJavaSpec.generate, - generateModuleJniCpp: generateModuleJniCpp.generate, - generateModuleJniH: generateModuleJniH.generate, - generatePropsJavaInterface: generatePropsJavaInterface.generate, - generatePropsJavaDelegate: generatePropsJavaDelegate.generate, - generateTests: generateTests.generate, - generateShadowNodeCpp: generateShadowNodeCpp.generate, - generateShadowNodeH: generateShadowNodeH.generate, - generateThirdPartyFabricComponentsProviderObjCpp: - generateThirdPartyFabricComponentsProviderObjCpp.generate, - generateThirdPartyFabricComponentsProviderH: - generateThirdPartyFabricComponentsProviderH.generate, - generateViewConfigJs: generateViewConfigJs.generate, -}; -const LIBRARY_GENERATORS = { - descriptors: [generateComponentDescriptorH.generate], - events: [generateEventEmitterCpp.generate, generateEventEmitterH.generate], - states: [generateStateCpp.generate, generateStateH.generate], - props: [ - generateComponentHObjCpp.generate, - generatePropsCpp.generate, - generatePropsH.generate, - generatePropsJavaInterface.generate, - generatePropsJavaDelegate.generate, - ], - // TODO: Refactor this to consolidate various C++ output variation instead of forking per platform. - componentsAndroid: [ - // JNI/C++ files - generateComponentDescriptorH.generate, - generateComponentDescriptorCpp.generate, - generateEventEmitterCpp.generate, - generateEventEmitterH.generate, - generatePropsCpp.generate, - generatePropsH.generate, - generateStateCpp.generate, - generateStateH.generate, - generateShadowNodeCpp.generate, - generateShadowNodeH.generate, - // Java files - generatePropsJavaInterface.generate, - generatePropsJavaDelegate.generate, - ], - componentsIOS: [ - generateComponentDescriptorH.generate, - generateComponentDescriptorCpp.generate, - generateEventEmitterCpp.generate, - generateEventEmitterH.generate, - generateComponentHObjCpp.generate, - generatePropsCpp.generate, - generatePropsH.generate, - generateStateCpp.generate, - generateStateH.generate, - generateShadowNodeCpp.generate, - generateShadowNodeH.generate, - ], - modulesAndroid: [ - generateModuleJniCpp.generate, - generateModuleJniH.generate, - generateModuleJavaSpec.generate, - ], - modulesCxx: [generateModuleCpp.generate, generateModuleH.generate], - modulesIOS: [generateModuleObjCpp.generate], - tests: [generateTests.generate], - 'shadow-nodes': [ - generateShadowNodeCpp.generate, - generateShadowNodeH.generate, - ], -}; -const SCHEMAS_GENERATORS = { - providerIOS: [ - generateThirdPartyFabricComponentsProviderObjCpp.generate, - generateThirdPartyFabricComponentsProviderH.generate, - ], -}; -function writeMapToFiles(map) { - let success = true; - map.forEach(file => { - try { - const location = path.join(file.outputDir, file.name); - const dirName = path.dirname(location); - if (!fs.existsSync(dirName)) { - fs.mkdirSync(dirName, { - recursive: true, - }); - } - fs.writeFileSync(location, file.content); - } catch (error) { - success = false; - console.error(`Failed to write ${file.name} to ${file.outputDir}`, error); - } - }); - return success; -} -function checkFilesForChanges(generated) { - let hasChanged = false; - generated.forEach(file => { - const location = path.join(file.outputDir, file.name); - const currentContents = fs.readFileSync(location, 'utf8'); - if (currentContents !== file.content) { - console.error(`- ${file.name} has changed`); - hasChanged = true; - } - }); - return !hasChanged; -} -function checkOrWriteFiles(generatedFiles, test) { - if (test === true) { - return checkFilesForChanges(generatedFiles); - } - return writeMapToFiles(generatedFiles); -} -module.exports = { - allGenerators: ALL_GENERATORS, - libraryGenerators: LIBRARY_GENERATORS, - schemaGenerators: SCHEMAS_GENERATORS, - generate( - { - libraryName, - schema, - outputDirectory, - packageName, - assumeNonnull, - useLocalIncludePaths, - }, - {generators, test}, - ) { - schemaValidator.validate(schema); - const defaultHeaderPrefix = 'react/renderer/components'; - const headerPrefix = - useLocalIncludePaths === true - ? '' - : `${defaultHeaderPrefix}/${libraryName}/`; - function composePath(intermediate) { - return path.join(outputDirectory, intermediate, libraryName); - } - const componentIOSOutput = composePath( - useLocalIncludePaths === true ? '' : defaultHeaderPrefix, - ); - const modulesIOSOutput = composePath('./'); - const outputFoldersForGenerators = { - componentsIOS: componentIOSOutput, - modulesIOS: modulesIOSOutput, - descriptors: outputDirectory, - events: outputDirectory, - props: outputDirectory, - states: outputDirectory, - componentsAndroid: outputDirectory, - modulesAndroid: outputDirectory, - modulesCxx: outputDirectory, - tests: outputDirectory, - 'shadow-nodes': outputDirectory, - }; - const generatedFiles = []; - for (const name of generators) { - for (const generator of LIBRARY_GENERATORS[name]) { - generator( - libraryName, - schema, - packageName, - assumeNonnull, - headerPrefix, - ).forEach((contents, fileName) => { - generatedFiles.push({ - name: fileName, - content: contents, - outputDir: outputFoldersForGenerators[name], - }); - }); - } - } - return checkOrWriteFiles(generatedFiles, test); - }, - generateFromSchemas( - {schemas, outputDirectory, supportedApplePlatforms}, - {generators, test}, - ) { - Object.keys(schemas).forEach(libraryName => - schemaValidator.validate(schemas[libraryName]), - ); - const generatedFiles = []; - for (const name of generators) { - for (const generator of SCHEMAS_GENERATORS[name]) { - generator(schemas, supportedApplePlatforms).forEach( - (contents, fileName) => { - generatedFiles.push({ - name: fileName, - content: contents, - outputDir: outputDirectory, - }); - }, - ); - } - } - return checkOrWriteFiles(generatedFiles, test); - }, - generateViewConfig({libraryName, schema}) { - schemaValidator.validate(schema); - const result = generateViewConfigJs - .generate(libraryName, schema) - .values() - .next(); - if (typeof result.value !== 'string') { - throw new Error(`Failed to generate view config for ${libraryName}`); - } - return result.value; - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/RNCodegen.js.flow b/node_modules/@react-native/codegen/lib/generators/RNCodegen.js.flow deleted file mode 100644 index d363ceb09..000000000 --- a/node_modules/@react-native/codegen/lib/generators/RNCodegen.js.flow +++ /dev/null @@ -1,335 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -/* -TODO: - -- ViewConfigs should spread in View's valid attributes -*/ - -import type {SchemaType} from '../CodegenSchema'; - -const schemaValidator = require('../SchemaValidator.js'); -const generateComponentDescriptorCpp = require('./components/GenerateComponentDescriptorCpp.js'); -const generateComponentDescriptorH = require('./components/GenerateComponentDescriptorH.js'); -const generateComponentHObjCpp = require('./components/GenerateComponentHObjCpp.js'); -const generateEventEmitterCpp = require('./components/GenerateEventEmitterCpp.js'); -const generateEventEmitterH = require('./components/GenerateEventEmitterH.js'); -const generatePropsCpp = require('./components/GeneratePropsCpp.js'); -const generatePropsH = require('./components/GeneratePropsH.js'); -const generatePropsJavaDelegate = require('./components/GeneratePropsJavaDelegate.js'); -const generatePropsJavaInterface = require('./components/GeneratePropsJavaInterface.js'); -const generateShadowNodeCpp = require('./components/GenerateShadowNodeCpp.js'); -const generateShadowNodeH = require('./components/GenerateShadowNodeH.js'); -const generateStateCpp = require('./components/GenerateStateCpp.js'); -const generateStateH = require('./components/GenerateStateH.js'); -const generateTests = require('./components/GenerateTests.js'); -const generateThirdPartyFabricComponentsProviderH = require('./components/GenerateThirdPartyFabricComponentsProviderH.js'); -const generateThirdPartyFabricComponentsProviderObjCpp = require('./components/GenerateThirdPartyFabricComponentsProviderObjCpp.js'); -const generateViewConfigJs = require('./components/GenerateViewConfigJs.js'); -const generateModuleCpp = require('./modules/GenerateModuleCpp.js'); -const generateModuleH = require('./modules/GenerateModuleH.js'); -const generateModuleJavaSpec = require('./modules/GenerateModuleJavaSpec.js'); -const generateModuleJniCpp = require('./modules/GenerateModuleJniCpp.js'); -const generateModuleJniH = require('./modules/GenerateModuleJniH.js'); -const generateModuleObjCpp = require('./modules/GenerateModuleObjCpp'); -const fs = require('fs'); -const path = require('path'); - -const ALL_GENERATORS = { - generateComponentDescriptorH: generateComponentDescriptorH.generate, - generateComponentDescriptorCpp: generateComponentDescriptorCpp.generate, - generateComponentHObjCpp: generateComponentHObjCpp.generate, - generateEventEmitterCpp: generateEventEmitterCpp.generate, - generateEventEmitterH: generateEventEmitterH.generate, - generatePropsCpp: generatePropsCpp.generate, - generatePropsH: generatePropsH.generate, - generateStateCpp: generateStateCpp.generate, - generateStateH: generateStateH.generate, - generateModuleH: generateModuleH.generate, - generateModuleCpp: generateModuleCpp.generate, - generateModuleObjCpp: generateModuleObjCpp.generate, - generateModuleJavaSpec: generateModuleJavaSpec.generate, - generateModuleJniCpp: generateModuleJniCpp.generate, - generateModuleJniH: generateModuleJniH.generate, - generatePropsJavaInterface: generatePropsJavaInterface.generate, - generatePropsJavaDelegate: generatePropsJavaDelegate.generate, - generateTests: generateTests.generate, - generateShadowNodeCpp: generateShadowNodeCpp.generate, - generateShadowNodeH: generateShadowNodeH.generate, - generateThirdPartyFabricComponentsProviderObjCpp: - generateThirdPartyFabricComponentsProviderObjCpp.generate, - generateThirdPartyFabricComponentsProviderH: - generateThirdPartyFabricComponentsProviderH.generate, - generateViewConfigJs: generateViewConfigJs.generate, -}; - -type LibraryOptions = $ReadOnly<{ - libraryName: string, - schema: SchemaType, - outputDirectory: string, - packageName?: string, // Some platforms have a notion of package, which should be configurable. - assumeNonnull: boolean, - useLocalIncludePaths?: boolean, -}>; - -type SchemasOptions = $ReadOnly<{ - schemas: {[string]: SchemaType}, - outputDirectory: string, - supportedApplePlatforms?: {[string]: {[string]: boolean}}, -}>; - -type LibraryGenerators = - | 'componentsAndroid' - | 'componentsIOS' - | 'descriptors' - | 'events' - | 'props' - | 'states' - | 'tests' - | 'shadow-nodes' - | 'modulesAndroid' - | 'modulesCxx' - | 'modulesIOS'; - -type SchemasGenerators = 'providerIOS'; - -type LibraryConfig = $ReadOnly<{ - generators: Array, - test?: boolean, -}>; - -type SchemasConfig = $ReadOnly<{ - generators: Array, - test?: boolean, -}>; - -const LIBRARY_GENERATORS = { - descriptors: [generateComponentDescriptorH.generate], - events: [generateEventEmitterCpp.generate, generateEventEmitterH.generate], - states: [generateStateCpp.generate, generateStateH.generate], - props: [ - generateComponentHObjCpp.generate, - generatePropsCpp.generate, - generatePropsH.generate, - generatePropsJavaInterface.generate, - generatePropsJavaDelegate.generate, - ], - // TODO: Refactor this to consolidate various C++ output variation instead of forking per platform. - componentsAndroid: [ - // JNI/C++ files - generateComponentDescriptorH.generate, - generateComponentDescriptorCpp.generate, - generateEventEmitterCpp.generate, - generateEventEmitterH.generate, - generatePropsCpp.generate, - generatePropsH.generate, - generateStateCpp.generate, - generateStateH.generate, - generateShadowNodeCpp.generate, - generateShadowNodeH.generate, - // Java files - generatePropsJavaInterface.generate, - generatePropsJavaDelegate.generate, - ], - componentsIOS: [ - generateComponentDescriptorH.generate, - generateComponentDescriptorCpp.generate, - generateEventEmitterCpp.generate, - generateEventEmitterH.generate, - generateComponentHObjCpp.generate, - generatePropsCpp.generate, - generatePropsH.generate, - generateStateCpp.generate, - generateStateH.generate, - generateShadowNodeCpp.generate, - generateShadowNodeH.generate, - ], - modulesAndroid: [ - generateModuleJniCpp.generate, - generateModuleJniH.generate, - generateModuleJavaSpec.generate, - ], - modulesCxx: [generateModuleCpp.generate, generateModuleH.generate], - modulesIOS: [generateModuleObjCpp.generate], - tests: [generateTests.generate], - 'shadow-nodes': [ - generateShadowNodeCpp.generate, - generateShadowNodeH.generate, - ], -}; - -const SCHEMAS_GENERATORS = { - providerIOS: [ - generateThirdPartyFabricComponentsProviderObjCpp.generate, - generateThirdPartyFabricComponentsProviderH.generate, - ], -}; - -type CodeGenFile = { - name: string, - content: string, - outputDir: string, -}; - -function writeMapToFiles(map: Array) { - let success = true; - map.forEach(file => { - try { - const location = path.join(file.outputDir, file.name); - const dirName = path.dirname(location); - if (!fs.existsSync(dirName)) { - fs.mkdirSync(dirName, {recursive: true}); - } - fs.writeFileSync(location, file.content); - } catch (error) { - success = false; - console.error(`Failed to write ${file.name} to ${file.outputDir}`, error); - } - }); - - return success; -} - -function checkFilesForChanges(generated: Array): boolean { - let hasChanged = false; - - generated.forEach(file => { - const location = path.join(file.outputDir, file.name); - const currentContents = fs.readFileSync(location, 'utf8'); - if (currentContents !== file.content) { - console.error(`- ${file.name} has changed`); - - hasChanged = true; - } - }); - - return !hasChanged; -} - -function checkOrWriteFiles( - generatedFiles: Array, - test: void | boolean, -): boolean { - if (test === true) { - return checkFilesForChanges(generatedFiles); - } - return writeMapToFiles(generatedFiles); -} - -module.exports = { - allGenerators: ALL_GENERATORS, - libraryGenerators: LIBRARY_GENERATORS, - schemaGenerators: SCHEMAS_GENERATORS, - - generate( - { - libraryName, - schema, - outputDirectory, - packageName, - assumeNonnull, - useLocalIncludePaths, - }: LibraryOptions, - {generators, test}: LibraryConfig, - ): boolean { - schemaValidator.validate(schema); - - const defaultHeaderPrefix = 'react/renderer/components'; - const headerPrefix = - useLocalIncludePaths === true - ? '' - : `${defaultHeaderPrefix}/${libraryName}/`; - function composePath(intermediate: string) { - return path.join(outputDirectory, intermediate, libraryName); - } - - const componentIOSOutput = composePath( - useLocalIncludePaths === true ? '' : defaultHeaderPrefix, - ); - const modulesIOSOutput = composePath('./'); - - const outputFoldersForGenerators = { - componentsIOS: componentIOSOutput, - modulesIOS: modulesIOSOutput, - descriptors: outputDirectory, - events: outputDirectory, - props: outputDirectory, - states: outputDirectory, - componentsAndroid: outputDirectory, - modulesAndroid: outputDirectory, - modulesCxx: outputDirectory, - tests: outputDirectory, - 'shadow-nodes': outputDirectory, - }; - - const generatedFiles: Array = []; - - for (const name of generators) { - for (const generator of LIBRARY_GENERATORS[name]) { - generator( - libraryName, - schema, - packageName, - assumeNonnull, - headerPrefix, - ).forEach((contents: string, fileName: string) => { - generatedFiles.push({ - name: fileName, - content: contents, - outputDir: outputFoldersForGenerators[name], - }); - }); - } - } - return checkOrWriteFiles(generatedFiles, test); - }, - generateFromSchemas( - {schemas, outputDirectory, supportedApplePlatforms}: SchemasOptions, - {generators, test}: SchemasConfig, - ): boolean { - Object.keys(schemas).forEach(libraryName => - schemaValidator.validate(schemas[libraryName]), - ); - - const generatedFiles: Array = []; - - for (const name of generators) { - for (const generator of SCHEMAS_GENERATORS[name]) { - generator(schemas, supportedApplePlatforms).forEach( - (contents: string, fileName: string) => { - generatedFiles.push({ - name: fileName, - content: contents, - outputDir: outputDirectory, - }); - }, - ); - } - } - return checkOrWriteFiles(generatedFiles, test); - }, - generateViewConfig({libraryName, schema}: LibraryOptions): string { - schemaValidator.validate(schema); - - const result = generateViewConfigJs - .generate(libraryName, schema) - .values() - .next(); - - if (typeof result.value !== 'string') { - throw new Error(`Failed to generate view config for ${libraryName}`); - } - - return result.value; - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/TypeUtils/Cxx/index.js b/node_modules/@react-native/codegen/lib/generators/TypeUtils/Cxx/index.js deleted file mode 100644 index 59f6eaf36..000000000 --- a/node_modules/@react-native/codegen/lib/generators/TypeUtils/Cxx/index.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - * @oncall react_native - */ - -function wrapOptional(type, isRequired) { - return isRequired ? type : `std::optional<${type}>`; -} -module.exports = { - wrapOptional, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/TypeUtils/Cxx/index.js.flow b/node_modules/@react-native/codegen/lib/generators/TypeUtils/Cxx/index.js.flow deleted file mode 100644 index fcde7828a..000000000 --- a/node_modules/@react-native/codegen/lib/generators/TypeUtils/Cxx/index.js.flow +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - * @oncall react_native - */ - -function wrapOptional(type: string, isRequired: boolean): string { - return isRequired ? type : `std::optional<${type}>`; -} - -module.exports = { - wrapOptional, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/TypeUtils/Java/index.js b/node_modules/@react-native/codegen/lib/generators/TypeUtils/Java/index.js deleted file mode 100644 index d2d09ea81..000000000 --- a/node_modules/@react-native/codegen/lib/generators/TypeUtils/Java/index.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - * @oncall react_native - */ - -const objectTypeForPrimitiveType = { - boolean: 'Boolean', - double: 'Double', - float: 'Float', - int: 'Integer', -}; -function wrapOptional(type, isRequired) { - var _objectTypeForPrimiti; - return isRequired - ? type - : `@Nullable ${ - (_objectTypeForPrimiti = objectTypeForPrimitiveType[type]) !== null && - _objectTypeForPrimiti !== void 0 - ? _objectTypeForPrimiti - : type - }`; -} -module.exports = { - wrapOptional, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/TypeUtils/Java/index.js.flow b/node_modules/@react-native/codegen/lib/generators/TypeUtils/Java/index.js.flow deleted file mode 100644 index 6253ea37d..000000000 --- a/node_modules/@react-native/codegen/lib/generators/TypeUtils/Java/index.js.flow +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - * @oncall react_native - */ - -const objectTypeForPrimitiveType = { - boolean: 'Boolean', - double: 'Double', - float: 'Float', - int: 'Integer', -}; - -function wrapOptional(type: string, isRequired: boolean): string { - return isRequired - ? type - : `@Nullable ${objectTypeForPrimitiveType[type] ?? type}`; -} - -module.exports = { - wrapOptional, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/TypeUtils/Objective-C/index.js b/node_modules/@react-native/codegen/lib/generators/TypeUtils/Objective-C/index.js deleted file mode 100644 index cf394ee18..000000000 --- a/node_modules/@react-native/codegen/lib/generators/TypeUtils/Objective-C/index.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - * @oncall react_native - */ - -function wrapOptional(type, isRequired) { - return isRequired ? type : `${type} _Nullable`; -} -module.exports = { - wrapOptional, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/TypeUtils/Objective-C/index.js.flow b/node_modules/@react-native/codegen/lib/generators/TypeUtils/Objective-C/index.js.flow deleted file mode 100644 index 529bfe64a..000000000 --- a/node_modules/@react-native/codegen/lib/generators/TypeUtils/Objective-C/index.js.flow +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - * @oncall react_native - */ - -function wrapOptional(type: string, isRequired: boolean): string { - return isRequired ? type : `${type} _Nullable`; -} - -module.exports = { - wrapOptional, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/Utils.js b/node_modules/@react-native/codegen/lib/generators/Utils.js deleted file mode 100644 index 624e6bdb0..000000000 --- a/node_modules/@react-native/codegen/lib/generators/Utils.js +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -function capitalize(string) { - return string.charAt(0).toUpperCase() + string.slice(1); -} -function indent(nice, spaces) { - return nice - .split('\n') - .map((line, index) => { - if (line.length === 0 || index === 0) { - return line; - } - const emptySpaces = new Array(spaces + 1).join(' '); - return emptySpaces + line; - }) - .join('\n'); -} -function toPascalCase(inString) { - if (inString.length === 0) { - return inString; - } - return inString[0].toUpperCase() + inString.slice(1); -} -function toSafeCppString(input) { - return input.split('-').map(toPascalCase).join(''); -} -function getEnumName(moduleName, origEnumName) { - const uppercasedPropName = toSafeCppString(origEnumName); - return `${moduleName}${uppercasedPropName}`; -} -module.exports = { - capitalize, - indent, - toPascalCase, - toSafeCppString, - getEnumName, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/Utils.js.flow b/node_modules/@react-native/codegen/lib/generators/Utils.js.flow deleted file mode 100644 index da692692d..000000000 --- a/node_modules/@react-native/codegen/lib/generators/Utils.js.flow +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -function capitalize(string: string): string { - return string.charAt(0).toUpperCase() + string.slice(1); -} - -function indent(nice: string, spaces: number): string { - return nice - .split('\n') - .map((line, index) => { - if (line.length === 0 || index === 0) { - return line; - } - const emptySpaces = new Array(spaces + 1).join(' '); - return emptySpaces + line; - }) - .join('\n'); -} - -function toPascalCase(inString: string): string { - if (inString.length === 0) { - return inString; - } - - return inString[0].toUpperCase() + inString.slice(1); -} - -function toSafeCppString(input: string): string { - return input.split('-').map(toPascalCase).join(''); -} - -function getEnumName(moduleName: string, origEnumName: string): string { - const uppercasedPropName = toSafeCppString(origEnumName); - return `${moduleName}${uppercasedPropName}`; -} - -module.exports = { - capitalize, - indent, - toPascalCase, - toSafeCppString, - getEnumName, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/__test_fixtures__/fixtures.js b/node_modules/@react-native/codegen/lib/generators/__test_fixtures__/fixtures.js deleted file mode 100644 index acce91ecf..000000000 --- a/node_modules/@react-native/codegen/lib/generators/__test_fixtures__/fixtures.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const SCHEMA_WITH_TM_AND_FC = { - modules: { - ColoredView: { - type: 'Component', - components: { - ColoredView: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'color', - optional: false, - typeAnnotation: { - type: 'StringTypeAnnotation', - default: null, - }, - }, - ], - commands: [], - }, - }, - }, - NativeCalculator: { - type: 'NativeModule', - aliasMap: {}, - enumMap: {}, - spec: { - properties: [ - { - name: 'add', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'PromiseTypeAnnotation', - }, - params: [ - { - name: 'a', - optional: false, - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - name: 'b', - optional: false, - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - ], - }, - moduleName: 'Calculator', - }, - }, -}; -module.exports = { - all: SCHEMA_WITH_TM_AND_FC, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/__test_fixtures__/fixtures.js.flow b/node_modules/@react-native/codegen/lib/generators/__test_fixtures__/fixtures.js.flow deleted file mode 100644 index 8678249f5..000000000 --- a/node_modules/@react-native/codegen/lib/generators/__test_fixtures__/fixtures.js.flow +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {SchemaType} from '../../CodegenSchema.js'; - -const SCHEMA_WITH_TM_AND_FC: SchemaType = { - modules: { - ColoredView: { - type: 'Component', - components: { - ColoredView: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'color', - optional: false, - typeAnnotation: { - type: 'StringTypeAnnotation', - default: null, - }, - }, - ], - commands: [], - }, - }, - }, - NativeCalculator: { - type: 'NativeModule', - aliasMap: {}, - enumMap: {}, - spec: { - properties: [ - { - name: 'add', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'PromiseTypeAnnotation', - }, - params: [ - { - name: 'a', - optional: false, - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - name: 'b', - optional: false, - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - ], - }, - moduleName: 'Calculator', - }, - }, -}; - -module.exports = { - all: SCHEMA_WITH_TM_AND_FC, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/ComponentsGeneratorUtils.js b/node_modules/@react-native/codegen/lib/generators/components/ComponentsGeneratorUtils.js deleted file mode 100644 index e9c8b2131..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/ComponentsGeneratorUtils.js +++ /dev/null @@ -1,228 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('../Utils'), - getEnumName = _require.getEnumName; -const _require2 = require('./CppHelpers.js'), - generateStructName = _require2.generateStructName, - getCppTypeForAnnotation = _require2.getCppTypeForAnnotation, - getEnumMaskName = _require2.getEnumMaskName, - getImports = _require2.getImports; -function getNativeTypeFromAnnotation(componentName, prop, nameParts) { - const typeAnnotation = prop.typeAnnotation; - switch (typeAnnotation.type) { - case 'BooleanTypeAnnotation': - case 'StringTypeAnnotation': - case 'Int32TypeAnnotation': - case 'DoubleTypeAnnotation': - case 'FloatTypeAnnotation': - return getCppTypeForAnnotation(typeAnnotation.type); - case 'ReservedPropTypeAnnotation': - switch (typeAnnotation.name) { - case 'ColorPrimitive': - return 'SharedColor'; - case 'ImageSourcePrimitive': - return 'ImageSource'; - case 'ImageRequestPrimitive': - return 'ImageRequest'; - case 'PointPrimitive': - return 'Point'; - case 'EdgeInsetsPrimitive': - return 'EdgeInsets'; - case 'DimensionPrimitive': - return 'YGValue'; - default: - typeAnnotation.name; - throw new Error('Received unknown ReservedPropTypeAnnotation'); - } - case 'ArrayTypeAnnotation': { - const arrayType = typeAnnotation.elementType.type; - if (arrayType === 'ArrayTypeAnnotation') { - return `std::vector<${getNativeTypeFromAnnotation( - componentName, - { - typeAnnotation: typeAnnotation.elementType, - name: '', - }, - nameParts.concat([prop.name]), - )}>`; - } - if (arrayType === 'ObjectTypeAnnotation') { - const structName = generateStructName( - componentName, - nameParts.concat([prop.name]), - ); - return `std::vector<${structName}>`; - } - if (arrayType === 'StringEnumTypeAnnotation') { - const enumName = getEnumName(componentName, prop.name); - return getEnumMaskName(enumName); - } - const itemAnnotation = getNativeTypeFromAnnotation( - componentName, - { - typeAnnotation: typeAnnotation.elementType, - name: componentName, - }, - nameParts.concat([prop.name]), - ); - return `std::vector<${itemAnnotation}>`; - } - case 'ObjectTypeAnnotation': { - return generateStructName(componentName, nameParts.concat([prop.name])); - } - case 'StringEnumTypeAnnotation': - return getEnumName(componentName, prop.name); - case 'Int32EnumTypeAnnotation': - return getEnumName(componentName, prop.name); - case 'MixedTypeAnnotation': - return 'folly::dynamic'; - default: - typeAnnotation; - throw new Error( - `Received invalid typeAnnotation for ${componentName} prop ${prop.name}, received ${typeAnnotation.type}`, - ); - } -} - -/// This function process some types if we need to customize them -/// For example, the ImageSource and the reserved types could be trasformed into -/// const address instead of using them as plain types. -function convertTypesToConstAddressIfNeeded(type, convertibleTypes) { - if (convertibleTypes.has(type)) { - return `${type} const &`; - } - return type; -} -function convertValueToSharedPointerWithMove(type, value, convertibleTypes) { - if (convertibleTypes.has(type)) { - return `std::make_shared<${type}>(std::move(${value}))`; - } - return value; -} -function convertVariableToSharedPointer(type, convertibleTypes) { - if (convertibleTypes.has(type)) { - return `std::shared_ptr<${type}>`; - } - return type; -} -function convertVariableToPointer(type, value, convertibleTypes) { - if (convertibleTypes.has(type)) { - return `*${value}`; - } - return value; -} -const convertCtorParamToAddressType = type => { - const typesToConvert = new Set(); - typesToConvert.add('ImageSource'); - return convertTypesToConstAddressIfNeeded(type, typesToConvert); -}; -const convertCtorInitToSharedPointers = (type, value) => { - const typesToConvert = new Set(); - typesToConvert.add('ImageRequest'); - return convertValueToSharedPointerWithMove(type, value, typesToConvert); -}; -const convertGettersReturnTypeToAddressType = type => { - const typesToConvert = new Set(); - typesToConvert.add('ImageRequest'); - return convertTypesToConstAddressIfNeeded(type, typesToConvert); -}; -const convertVarTypeToSharedPointer = type => { - const typesToConvert = new Set(); - typesToConvert.add('ImageRequest'); - return convertVariableToSharedPointer(type, typesToConvert); -}; -const convertVarValueToPointer = (type, value) => { - const typesToConvert = new Set(); - typesToConvert.add('ImageRequest'); - return convertVariableToPointer(type, value, typesToConvert); -}; -function getLocalImports(properties) { - const imports = new Set(); - function addImportsForNativeName(name) { - switch (name) { - case 'ColorPrimitive': - imports.add('#include '); - return; - case 'ImageSourcePrimitive': - imports.add('#include '); - return; - case 'ImageRequestPrimitive': - imports.add('#include '); - return; - case 'PointPrimitive': - imports.add('#include '); - return; - case 'EdgeInsetsPrimitive': - imports.add('#include '); - return; - case 'DimensionPrimitive': - imports.add('#include '); - return; - default: - name; - throw new Error(`Invalid ReservedPropTypeAnnotation name, got ${name}`); - } - } - properties.forEach(prop => { - const typeAnnotation = prop.typeAnnotation; - if (typeAnnotation.type === 'ReservedPropTypeAnnotation') { - addImportsForNativeName(typeAnnotation.name); - } - if (typeAnnotation.type === 'ArrayTypeAnnotation') { - imports.add('#include '); - if (typeAnnotation.elementType.type === 'StringEnumTypeAnnotation') { - imports.add('#include '); - } - } - if ( - typeAnnotation.type === 'ArrayTypeAnnotation' && - typeAnnotation.elementType.type === 'ReservedPropTypeAnnotation' - ) { - addImportsForNativeName(typeAnnotation.elementType.name); - } - if ( - typeAnnotation.type === 'ArrayTypeAnnotation' && - typeAnnotation.elementType.type === 'ObjectTypeAnnotation' - ) { - imports.add('#include '); - const objectProps = typeAnnotation.elementType.properties; - // $FlowFixMe[incompatible-call] the type is guaranteed to be ObjectTypeAnnotation - const objectImports = getImports(objectProps); - // $FlowFixMe[incompatible-call] the type is guaranteed to be ObjectTypeAnnotation - const localImports = getLocalImports(objectProps); - // $FlowFixMe[method-unbinding] added when improving typing for this parameters - objectImports.forEach(imports.add, imports); - // $FlowFixMe[method-unbinding] added when improving typing for this parameters - localImports.forEach(imports.add, imports); - } - if (typeAnnotation.type === 'ObjectTypeAnnotation') { - imports.add('#include '); - const objectImports = getImports(typeAnnotation.properties); - const localImports = getLocalImports(typeAnnotation.properties); - // $FlowFixMe[method-unbinding] added when improving typing for this parameters - objectImports.forEach(imports.add, imports); - // $FlowFixMe[method-unbinding] added when improving typing for this parameters - localImports.forEach(imports.add, imports); - } - }); - return imports; -} -module.exports = { - getNativeTypeFromAnnotation, - convertCtorParamToAddressType, - convertGettersReturnTypeToAddressType, - convertCtorInitToSharedPointers, - convertVarTypeToSharedPointer, - convertVarValueToPointer, - getLocalImports, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/ComponentsGeneratorUtils.js.flow b/node_modules/@react-native/codegen/lib/generators/components/ComponentsGeneratorUtils.js.flow deleted file mode 100644 index 3a0138224..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/ComponentsGeneratorUtils.js.flow +++ /dev/null @@ -1,314 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type {NamedShape, PropTypeAnnotation} from '../../CodegenSchema'; -import type { - BooleanTypeAnnotation, - DoubleTypeAnnotation, - FloatTypeAnnotation, - Int32TypeAnnotation, - ObjectTypeAnnotation, - ReservedPropTypeAnnotation, - StringTypeAnnotation, -} from '../../CodegenSchema'; - -const {getEnumName} = require('../Utils'); -const { - generateStructName, - getCppTypeForAnnotation, - getEnumMaskName, - getImports, -} = require('./CppHelpers.js'); - -function getNativeTypeFromAnnotation( - componentName: string, - prop: - | NamedShape - | { - name: string, - typeAnnotation: - | $FlowFixMe - | DoubleTypeAnnotation - | FloatTypeAnnotation - | BooleanTypeAnnotation - | Int32TypeAnnotation - | StringTypeAnnotation - | ObjectTypeAnnotation - | ReservedPropTypeAnnotation - | { - +default: string, - +options: $ReadOnlyArray, - +type: 'StringEnumTypeAnnotation', - } - | { - +elementType: ObjectTypeAnnotation, - +type: 'ArrayTypeAnnotation', - }, - }, - nameParts: $ReadOnlyArray, -): string { - const typeAnnotation = prop.typeAnnotation; - - switch (typeAnnotation.type) { - case 'BooleanTypeAnnotation': - case 'StringTypeAnnotation': - case 'Int32TypeAnnotation': - case 'DoubleTypeAnnotation': - case 'FloatTypeAnnotation': - return getCppTypeForAnnotation(typeAnnotation.type); - case 'ReservedPropTypeAnnotation': - switch (typeAnnotation.name) { - case 'ColorPrimitive': - return 'SharedColor'; - case 'ImageSourcePrimitive': - return 'ImageSource'; - case 'ImageRequestPrimitive': - return 'ImageRequest'; - case 'PointPrimitive': - return 'Point'; - case 'EdgeInsetsPrimitive': - return 'EdgeInsets'; - case 'DimensionPrimitive': - return 'YGValue'; - default: - (typeAnnotation.name: empty); - throw new Error('Received unknown ReservedPropTypeAnnotation'); - } - case 'ArrayTypeAnnotation': { - const arrayType = typeAnnotation.elementType.type; - if (arrayType === 'ArrayTypeAnnotation') { - return `std::vector<${getNativeTypeFromAnnotation( - componentName, - {typeAnnotation: typeAnnotation.elementType, name: ''}, - nameParts.concat([prop.name]), - )}>`; - } - if (arrayType === 'ObjectTypeAnnotation') { - const structName = generateStructName( - componentName, - nameParts.concat([prop.name]), - ); - return `std::vector<${structName}>`; - } - if (arrayType === 'StringEnumTypeAnnotation') { - const enumName = getEnumName(componentName, prop.name); - return getEnumMaskName(enumName); - } - const itemAnnotation = getNativeTypeFromAnnotation( - componentName, - { - typeAnnotation: typeAnnotation.elementType, - name: componentName, - }, - nameParts.concat([prop.name]), - ); - return `std::vector<${itemAnnotation}>`; - } - case 'ObjectTypeAnnotation': { - return generateStructName(componentName, nameParts.concat([prop.name])); - } - case 'StringEnumTypeAnnotation': - return getEnumName(componentName, prop.name); - case 'Int32EnumTypeAnnotation': - return getEnumName(componentName, prop.name); - case 'MixedTypeAnnotation': - return 'folly::dynamic'; - default: - (typeAnnotation: empty); - throw new Error( - `Received invalid typeAnnotation for ${componentName} prop ${prop.name}, received ${typeAnnotation.type}`, - ); - } -} - -/// This function process some types if we need to customize them -/// For example, the ImageSource and the reserved types could be trasformed into -/// const address instead of using them as plain types. -function convertTypesToConstAddressIfNeeded( - type: string, - convertibleTypes: Set, -): string { - if (convertibleTypes.has(type)) { - return `${type} const &`; - } - return type; -} - -function convertValueToSharedPointerWithMove( - type: string, - value: string, - convertibleTypes: Set, -): string { - if (convertibleTypes.has(type)) { - return `std::make_shared<${type}>(std::move(${value}))`; - } - return value; -} - -function convertVariableToSharedPointer( - type: string, - convertibleTypes: Set, -): string { - if (convertibleTypes.has(type)) { - return `std::shared_ptr<${type}>`; - } - return type; -} - -function convertVariableToPointer( - type: string, - value: string, - convertibleTypes: Set, -): string { - if (convertibleTypes.has(type)) { - return `*${value}`; - } - return value; -} - -const convertCtorParamToAddressType = (type: string): string => { - const typesToConvert: Set = new Set(); - typesToConvert.add('ImageSource'); - - return convertTypesToConstAddressIfNeeded(type, typesToConvert); -}; - -const convertCtorInitToSharedPointers = ( - type: string, - value: string, -): string => { - const typesToConvert: Set = new Set(); - typesToConvert.add('ImageRequest'); - - return convertValueToSharedPointerWithMove(type, value, typesToConvert); -}; - -const convertGettersReturnTypeToAddressType = (type: string): string => { - const typesToConvert: Set = new Set(); - typesToConvert.add('ImageRequest'); - - return convertTypesToConstAddressIfNeeded(type, typesToConvert); -}; - -const convertVarTypeToSharedPointer = (type: string): string => { - const typesToConvert: Set = new Set(); - typesToConvert.add('ImageRequest'); - - return convertVariableToSharedPointer(type, typesToConvert); -}; - -const convertVarValueToPointer = (type: string, value: string): string => { - const typesToConvert: Set = new Set(); - typesToConvert.add('ImageRequest'); - - return convertVariableToPointer(type, value, typesToConvert); -}; - -function getLocalImports( - properties: $ReadOnlyArray>, -): Set { - const imports: Set = new Set(); - - function addImportsForNativeName( - name: - | 'ColorPrimitive' - | 'EdgeInsetsPrimitive' - | 'ImageSourcePrimitive' - | 'PointPrimitive' - | 'ImageRequestPrimitive' - | 'DimensionPrimitive', - ) { - switch (name) { - case 'ColorPrimitive': - imports.add('#include '); - return; - case 'ImageSourcePrimitive': - imports.add('#include '); - return; - case 'ImageRequestPrimitive': - imports.add('#include '); - return; - case 'PointPrimitive': - imports.add('#include '); - return; - case 'EdgeInsetsPrimitive': - imports.add('#include '); - return; - case 'DimensionPrimitive': - imports.add('#include '); - return; - default: - (name: empty); - throw new Error(`Invalid ReservedPropTypeAnnotation name, got ${name}`); - } - } - - properties.forEach(prop => { - const typeAnnotation = prop.typeAnnotation; - - if (typeAnnotation.type === 'ReservedPropTypeAnnotation') { - addImportsForNativeName(typeAnnotation.name); - } - - if (typeAnnotation.type === 'ArrayTypeAnnotation') { - imports.add('#include '); - if (typeAnnotation.elementType.type === 'StringEnumTypeAnnotation') { - imports.add('#include '); - } - } - - if ( - typeAnnotation.type === 'ArrayTypeAnnotation' && - typeAnnotation.elementType.type === 'ReservedPropTypeAnnotation' - ) { - addImportsForNativeName(typeAnnotation.elementType.name); - } - - if ( - typeAnnotation.type === 'ArrayTypeAnnotation' && - typeAnnotation.elementType.type === 'ObjectTypeAnnotation' - ) { - imports.add('#include '); - const objectProps = typeAnnotation.elementType.properties; - // $FlowFixMe[incompatible-call] the type is guaranteed to be ObjectTypeAnnotation - const objectImports = getImports(objectProps); - // $FlowFixMe[incompatible-call] the type is guaranteed to be ObjectTypeAnnotation - const localImports = getLocalImports(objectProps); - // $FlowFixMe[method-unbinding] added when improving typing for this parameters - objectImports.forEach(imports.add, imports); - // $FlowFixMe[method-unbinding] added when improving typing for this parameters - localImports.forEach(imports.add, imports); - } - - if (typeAnnotation.type === 'ObjectTypeAnnotation') { - imports.add('#include '); - const objectImports = getImports(typeAnnotation.properties); - const localImports = getLocalImports(typeAnnotation.properties); - // $FlowFixMe[method-unbinding] added when improving typing for this parameters - objectImports.forEach(imports.add, imports); - // $FlowFixMe[method-unbinding] added when improving typing for this parameters - localImports.forEach(imports.add, imports); - } - }); - - return imports; -} - -module.exports = { - getNativeTypeFromAnnotation, - convertCtorParamToAddressType, - convertGettersReturnTypeToAddressType, - convertCtorInitToSharedPointers, - convertVarTypeToSharedPointer, - convertVarValueToPointer, - getLocalImports, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/ComponentsProviderUtils.js b/node_modules/@react-native/codegen/lib/generators/components/ComponentsProviderUtils.js deleted file mode 100644 index faeb909e3..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/ComponentsProviderUtils.js +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -const APPLE_PLATFORMS_MACRO_MAP = { - ios: 'TARGET_OS_IOS', - macos: 'TARGET_OS_OSX', - tvos: 'TARGET_OS_TV', - visionos: 'TARGET_OS_VISION', -}; - -/** - * Adds compiler macros to the file template to exclude unsupported platforms. - */ -function generateSupportedApplePlatformsMacro( - fileTemplate, - supportedPlatformsMap, -) { - if (!supportedPlatformsMap) { - return fileTemplate; - } - - // According to Podspec Syntax Reference, when `platform` or `deployment_target` is not specified, it defaults to all platforms. - // https://guides.cocoapods.org/syntax/podspec.html#platform - const everyPlatformIsUnsupported = Object.keys(supportedPlatformsMap).every( - platform => supportedPlatformsMap[platform] === false, - ); - if (everyPlatformIsUnsupported) { - return fileTemplate; - } - const compilerMacroString = Object.keys(supportedPlatformsMap) - .reduce((acc, platform) => { - if (!supportedPlatformsMap[platform]) { - return [...acc, `!${APPLE_PLATFORMS_MACRO_MAP[platform]}`]; - } - return acc; - }, []) - .join(' && '); - if (!compilerMacroString) { - return fileTemplate; - } - return `#if ${compilerMacroString} -${fileTemplate} -#endif -`; -} -module.exports = { - generateSupportedApplePlatformsMacro, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/ComponentsProviderUtils.js.flow b/node_modules/@react-native/codegen/lib/generators/components/ComponentsProviderUtils.js.flow deleted file mode 100644 index 0ee2c4afa..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/ComponentsProviderUtils.js.flow +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -const APPLE_PLATFORMS_MACRO_MAP = { - ios: 'TARGET_OS_IOS', - macos: 'TARGET_OS_OSX', - tvos: 'TARGET_OS_TV', - visionos: 'TARGET_OS_VISION', -}; - -/** - * Adds compiler macros to the file template to exclude unsupported platforms. - */ -function generateSupportedApplePlatformsMacro( - fileTemplate: string, - supportedPlatformsMap: ?{[string]: boolean}, -): string { - if (!supportedPlatformsMap) { - return fileTemplate; - } - - // According to Podspec Syntax Reference, when `platform` or `deployment_target` is not specified, it defaults to all platforms. - // https://guides.cocoapods.org/syntax/podspec.html#platform - const everyPlatformIsUnsupported = Object.keys(supportedPlatformsMap).every( - platform => supportedPlatformsMap[platform] === false, - ); - - if (everyPlatformIsUnsupported) { - return fileTemplate; - } - - const compilerMacroString = Object.keys(supportedPlatformsMap) - .reduce((acc: string[], platform) => { - if (!supportedPlatformsMap[platform]) { - return [...acc, `!${APPLE_PLATFORMS_MACRO_MAP[platform]}`]; - } - return acc; - }, []) - .join(' && '); - - if (!compilerMacroString) { - return fileTemplate; - } - - return `#if ${compilerMacroString} -${fileTemplate} -#endif -`; -} - -module.exports = { - generateSupportedApplePlatformsMacro, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/CppHelpers.js b/node_modules/@react-native/codegen/lib/generators/components/CppHelpers.js deleted file mode 100644 index 57b7ba36d..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/CppHelpers.js +++ /dev/null @@ -1,232 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('../Utils'), - getEnumName = _require.getEnumName, - toSafeCppString = _require.toSafeCppString; -function toIntEnumValueName(propName, value) { - return `${toSafeCppString(propName)}${value}`; -} -function getCppTypeForAnnotation(type) { - switch (type) { - case 'BooleanTypeAnnotation': - return 'bool'; - case 'StringTypeAnnotation': - return 'std::string'; - case 'Int32TypeAnnotation': - return 'int'; - case 'DoubleTypeAnnotation': - return 'double'; - case 'FloatTypeAnnotation': - return 'Float'; - case 'MixedTypeAnnotation': - return 'folly::dynamic'; - default: - type; - throw new Error(`Received invalid typeAnnotation ${type}`); - } -} -function getCppArrayTypeForAnnotation(typeElement, structParts) { - switch (typeElement.type) { - case 'BooleanTypeAnnotation': - case 'StringTypeAnnotation': - case 'DoubleTypeAnnotation': - case 'FloatTypeAnnotation': - case 'Int32TypeAnnotation': - case 'MixedTypeAnnotation': - return `std::vector<${getCppTypeForAnnotation(typeElement.type)}>`; - case 'StringEnumTypeAnnotation': - case 'ObjectTypeAnnotation': - if (!structParts) { - throw new Error( - `Trying to generate the event emitter for an Array of ${typeElement.type} without informations to generate the generic type`, - ); - } - return `std::vector<${generateEventStructName(structParts)}>`; - case 'ArrayTypeAnnotation': - return `std::vector<${getCppArrayTypeForAnnotation( - typeElement.elementType, - structParts, - )}>`; - default: - throw new Error( - `Can't determine array type with typeElement: ${JSON.stringify( - typeElement, - null, - 2, - )}`, - ); - } -} -function getImports(properties) { - const imports = new Set(); - function addImportsForNativeName(name) { - switch (name) { - case 'ColorPrimitive': - return; - case 'PointPrimitive': - return; - case 'EdgeInsetsPrimitive': - return; - case 'ImageRequestPrimitive': - return; - case 'ImageSourcePrimitive': - imports.add('#include '); - return; - case 'DimensionPrimitive': - imports.add('#include '); - return; - default: - name; - throw new Error(`Invalid name, got ${name}`); - } - } - properties.forEach(prop => { - const typeAnnotation = prop.typeAnnotation; - if (typeAnnotation.type === 'ReservedPropTypeAnnotation') { - addImportsForNativeName(typeAnnotation.name); - } - if ( - typeAnnotation.type === 'ArrayTypeAnnotation' && - typeAnnotation.elementType.type === 'ReservedPropTypeAnnotation' - ) { - addImportsForNativeName(typeAnnotation.elementType.name); - } - if (typeAnnotation.type === 'MixedTypeAnnotation') { - imports.add('#include '); - } - if (typeAnnotation.type === 'ObjectTypeAnnotation') { - const objectImports = getImports(typeAnnotation.properties); - // $FlowFixMe[method-unbinding] added when improving typing for this parameters - objectImports.forEach(imports.add, imports); - } - }); - return imports; -} -function generateEventStructName(parts = []) { - return parts.map(toSafeCppString).join(''); -} -function generateStructName(componentName, parts = []) { - const additional = parts.map(toSafeCppString).join(''); - return `${componentName}${additional}Struct`; -} -function getEnumMaskName(enumName) { - return `${enumName}Mask`; -} -function getDefaultInitializerString(componentName, prop) { - const defaultValue = convertDefaultTypeToString(componentName, prop); - return `{${defaultValue}}`; -} -function convertDefaultTypeToString(componentName, prop) { - const typeAnnotation = prop.typeAnnotation; - switch (typeAnnotation.type) { - case 'BooleanTypeAnnotation': - if (typeAnnotation.default == null) { - return ''; - } - return String(typeAnnotation.default); - case 'StringTypeAnnotation': - if (typeAnnotation.default == null) { - return ''; - } - return `"${typeAnnotation.default}"`; - case 'Int32TypeAnnotation': - return String(typeAnnotation.default); - case 'DoubleTypeAnnotation': - const defaultDoubleVal = typeAnnotation.default; - return parseInt(defaultDoubleVal, 10) === defaultDoubleVal - ? typeAnnotation.default.toFixed(1) - : String(typeAnnotation.default); - case 'FloatTypeAnnotation': - const defaultFloatVal = typeAnnotation.default; - if (defaultFloatVal == null) { - return ''; - } - return parseInt(defaultFloatVal, 10) === defaultFloatVal - ? defaultFloatVal.toFixed(1) - : String(typeAnnotation.default); - case 'ReservedPropTypeAnnotation': - switch (typeAnnotation.name) { - case 'ColorPrimitive': - return ''; - case 'ImageSourcePrimitive': - return ''; - case 'ImageRequestPrimitive': - return ''; - case 'PointPrimitive': - return ''; - case 'EdgeInsetsPrimitive': - return ''; - case 'DimensionPrimitive': - return ''; - default: - typeAnnotation.name; - throw new Error( - `Unsupported type annotation: ${typeAnnotation.name}`, - ); - } - case 'ArrayTypeAnnotation': { - const elementType = typeAnnotation.elementType; - switch (elementType.type) { - case 'StringEnumTypeAnnotation': - if (elementType.default == null) { - throw new Error( - 'A default is required for array StringEnumTypeAnnotation', - ); - } - const enumName = getEnumName(componentName, prop.name); - const enumMaskName = getEnumMaskName(enumName); - const defaultValue = `${enumName}::${toSafeCppString( - elementType.default, - )}`; - return `static_cast<${enumMaskName}>(${defaultValue})`; - default: - return ''; - } - } - case 'ObjectTypeAnnotation': { - return ''; - } - case 'StringEnumTypeAnnotation': - return `${getEnumName(componentName, prop.name)}::${toSafeCppString( - typeAnnotation.default, - )}`; - case 'Int32EnumTypeAnnotation': - return `${getEnumName(componentName, prop.name)}::${toIntEnumValueName( - prop.name, - typeAnnotation.default, - )}`; - case 'MixedTypeAnnotation': - return ''; - default: - typeAnnotation; - throw new Error(`Unsupported type annotation: ${typeAnnotation.type}`); - } -} -const IncludeTemplate = ({headerPrefix, file}) => { - if (headerPrefix === '') { - return `#include "${file}"`; - } - return `#include <${headerPrefix}${file}>`; -}; -module.exports = { - getDefaultInitializerString, - convertDefaultTypeToString, - getCppArrayTypeForAnnotation, - getCppTypeForAnnotation, - getEnumMaskName, - getImports, - toIntEnumValueName, - generateStructName, - generateEventStructName, - IncludeTemplate, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/CppHelpers.js.flow b/node_modules/@react-native/codegen/lib/generators/components/CppHelpers.js.flow deleted file mode 100644 index d1bf2f615..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/CppHelpers.js.flow +++ /dev/null @@ -1,291 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; -import type { - EventTypeAnnotation, - NamedShape, - PropTypeAnnotation, -} from '../../CodegenSchema'; - -const {getEnumName, toSafeCppString} = require('../Utils'); - -function toIntEnumValueName(propName: string, value: number): string { - return `${toSafeCppString(propName)}${value}`; -} - -function getCppTypeForAnnotation( - type: - | 'BooleanTypeAnnotation' - | 'StringTypeAnnotation' - | 'Int32TypeAnnotation' - | 'DoubleTypeAnnotation' - | 'FloatTypeAnnotation' - | 'MixedTypeAnnotation', -): string { - switch (type) { - case 'BooleanTypeAnnotation': - return 'bool'; - case 'StringTypeAnnotation': - return 'std::string'; - case 'Int32TypeAnnotation': - return 'int'; - case 'DoubleTypeAnnotation': - return 'double'; - case 'FloatTypeAnnotation': - return 'Float'; - case 'MixedTypeAnnotation': - return 'folly::dynamic'; - default: - (type: empty); - throw new Error(`Received invalid typeAnnotation ${type}`); - } -} - -function getCppArrayTypeForAnnotation( - typeElement: EventTypeAnnotation, - structParts?: string[], -): string { - switch (typeElement.type) { - case 'BooleanTypeAnnotation': - case 'StringTypeAnnotation': - case 'DoubleTypeAnnotation': - case 'FloatTypeAnnotation': - case 'Int32TypeAnnotation': - case 'MixedTypeAnnotation': - return `std::vector<${getCppTypeForAnnotation(typeElement.type)}>`; - case 'StringEnumTypeAnnotation': - case 'ObjectTypeAnnotation': - if (!structParts) { - throw new Error( - `Trying to generate the event emitter for an Array of ${typeElement.type} without informations to generate the generic type`, - ); - } - return `std::vector<${generateEventStructName(structParts)}>`; - case 'ArrayTypeAnnotation': - return `std::vector<${getCppArrayTypeForAnnotation( - typeElement.elementType, - structParts, - )}>`; - default: - throw new Error( - `Can't determine array type with typeElement: ${JSON.stringify( - typeElement, - null, - 2, - )}`, - ); - } -} - -function getImports( - properties: - | $ReadOnlyArray> - | $ReadOnlyArray>, -): Set { - const imports: Set = new Set(); - - function addImportsForNativeName( - name: - | 'ColorPrimitive' - | 'EdgeInsetsPrimitive' - | 'ImageRequestPrimitive' - | 'ImageSourcePrimitive' - | 'PointPrimitive' - | 'DimensionPrimitive', - ) { - switch (name) { - case 'ColorPrimitive': - return; - case 'PointPrimitive': - return; - case 'EdgeInsetsPrimitive': - return; - case 'ImageRequestPrimitive': - return; - case 'ImageSourcePrimitive': - imports.add('#include '); - return; - case 'DimensionPrimitive': - imports.add('#include '); - return; - default: - (name: empty); - throw new Error(`Invalid name, got ${name}`); - } - } - - properties.forEach(prop => { - const typeAnnotation = prop.typeAnnotation; - - if (typeAnnotation.type === 'ReservedPropTypeAnnotation') { - addImportsForNativeName(typeAnnotation.name); - } - - if ( - typeAnnotation.type === 'ArrayTypeAnnotation' && - typeAnnotation.elementType.type === 'ReservedPropTypeAnnotation' - ) { - addImportsForNativeName(typeAnnotation.elementType.name); - } - - if (typeAnnotation.type === 'MixedTypeAnnotation') { - imports.add('#include '); - } - - if (typeAnnotation.type === 'ObjectTypeAnnotation') { - const objectImports = getImports(typeAnnotation.properties); - // $FlowFixMe[method-unbinding] added when improving typing for this parameters - objectImports.forEach(imports.add, imports); - } - }); - - return imports; -} - -function generateEventStructName(parts: $ReadOnlyArray = []): string { - return parts.map(toSafeCppString).join(''); -} - -function generateStructName( - componentName: string, - parts: $ReadOnlyArray = [], -): string { - const additional = parts.map(toSafeCppString).join(''); - return `${componentName}${additional}Struct`; -} - -function getEnumMaskName(enumName: string): string { - return `${enumName}Mask`; -} - -function getDefaultInitializerString( - componentName: string, - prop: NamedShape, -): string { - const defaultValue = convertDefaultTypeToString(componentName, prop); - return `{${defaultValue}}`; -} - -function convertDefaultTypeToString( - componentName: string, - prop: NamedShape, -): string { - const typeAnnotation = prop.typeAnnotation; - switch (typeAnnotation.type) { - case 'BooleanTypeAnnotation': - if (typeAnnotation.default == null) { - return ''; - } - return String(typeAnnotation.default); - case 'StringTypeAnnotation': - if (typeAnnotation.default == null) { - return ''; - } - return `"${typeAnnotation.default}"`; - case 'Int32TypeAnnotation': - return String(typeAnnotation.default); - case 'DoubleTypeAnnotation': - const defaultDoubleVal = typeAnnotation.default; - return parseInt(defaultDoubleVal, 10) === defaultDoubleVal - ? typeAnnotation.default.toFixed(1) - : String(typeAnnotation.default); - case 'FloatTypeAnnotation': - const defaultFloatVal = typeAnnotation.default; - if (defaultFloatVal == null) { - return ''; - } - return parseInt(defaultFloatVal, 10) === defaultFloatVal - ? defaultFloatVal.toFixed(1) - : String(typeAnnotation.default); - case 'ReservedPropTypeAnnotation': - switch (typeAnnotation.name) { - case 'ColorPrimitive': - return ''; - case 'ImageSourcePrimitive': - return ''; - case 'ImageRequestPrimitive': - return ''; - case 'PointPrimitive': - return ''; - case 'EdgeInsetsPrimitive': - return ''; - case 'DimensionPrimitive': - return ''; - default: - (typeAnnotation.name: empty); - throw new Error( - `Unsupported type annotation: ${typeAnnotation.name}`, - ); - } - case 'ArrayTypeAnnotation': { - const elementType = typeAnnotation.elementType; - switch (elementType.type) { - case 'StringEnumTypeAnnotation': - if (elementType.default == null) { - throw new Error( - 'A default is required for array StringEnumTypeAnnotation', - ); - } - const enumName = getEnumName(componentName, prop.name); - const enumMaskName = getEnumMaskName(enumName); - const defaultValue = `${enumName}::${toSafeCppString( - elementType.default, - )}`; - return `static_cast<${enumMaskName}>(${defaultValue})`; - default: - return ''; - } - } - case 'ObjectTypeAnnotation': { - return ''; - } - case 'StringEnumTypeAnnotation': - return `${getEnumName(componentName, prop.name)}::${toSafeCppString( - typeAnnotation.default, - )}`; - case 'Int32EnumTypeAnnotation': - return `${getEnumName(componentName, prop.name)}::${toIntEnumValueName( - prop.name, - typeAnnotation.default, - )}`; - case 'MixedTypeAnnotation': - return ''; - default: - (typeAnnotation: empty); - throw new Error(`Unsupported type annotation: ${typeAnnotation.type}`); - } -} - -const IncludeTemplate = ({ - headerPrefix, - file, -}: { - headerPrefix: string, - file: string, -}): string => { - if (headerPrefix === '') { - return `#include "${file}"`; - } - return `#include <${headerPrefix}${file}>`; -}; - -module.exports = { - getDefaultInitializerString, - convertDefaultTypeToString, - getCppArrayTypeForAnnotation, - getCppTypeForAnnotation, - getEnumMaskName, - getImports, - toIntEnumValueName, - generateStructName, - generateEventStructName, - IncludeTemplate, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GenerateComponentDescriptorCpp.js b/node_modules/@react-native/codegen/lib/generators/components/GenerateComponentDescriptorCpp.js deleted file mode 100644 index e39651a40..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GenerateComponentDescriptorCpp.js +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('./CppHelpers'), - IncludeTemplate = _require.IncludeTemplate; - -// File path -> contents - -const FileTemplate = ({libraryName, componentRegistrations, headerPrefix}) => ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateComponentDescriptorCpp.js - */ - -${IncludeTemplate({ - headerPrefix, - file: 'ComponentDescriptors.h', -})} -#include -#include - -namespace facebook::react { - -void ${libraryName}_registerComponentDescriptorsFromCodegen( - std::shared_ptr registry) { -${componentRegistrations} -} - -} // namespace facebook::react -`; -const ComponentRegistrationTemplate = ({className}) => - ` -registry->add(concreteComponentDescriptorProvider<${className}ComponentDescriptor>()); -`.trim(); -module.exports = { - generate( - libraryName, - schema, - packageName, - assumeNonnull = false, - headerPrefix, - ) { - const fileName = 'ComponentDescriptors.cpp'; - const componentRegistrations = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - const components = module.components; - // No components in this module - if (components == null) { - return null; - } - return Object.keys(components) - .map(componentName => { - if (components[componentName].interfaceOnly === true) { - return; - } - return ComponentRegistrationTemplate({ - className: componentName, - }); - }) - .join('\n'); - }) - .filter(Boolean) - .join('\n'); - const replacedTemplate = FileTemplate({ - libraryName, - componentRegistrations, - headerPrefix: - headerPrefix !== null && headerPrefix !== void 0 ? headerPrefix : '', - }); - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GenerateComponentDescriptorCpp.js.flow b/node_modules/@react-native/codegen/lib/generators/components/GenerateComponentDescriptorCpp.js.flow deleted file mode 100644 index 794e04765..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GenerateComponentDescriptorCpp.js.flow +++ /dev/null @@ -1,101 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type {SchemaType} from '../../CodegenSchema'; - -const {IncludeTemplate} = require('./CppHelpers'); - -// File path -> contents -type FilesOutput = Map; - -const FileTemplate = ({ - libraryName, - componentRegistrations, - headerPrefix, -}: { - libraryName: string, - componentRegistrations: string, - headerPrefix: string, -}) => ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateComponentDescriptorCpp.js - */ - -${IncludeTemplate({headerPrefix, file: 'ComponentDescriptors.h'})} -#include -#include - -namespace facebook::react { - -void ${libraryName}_registerComponentDescriptorsFromCodegen( - std::shared_ptr registry) { -${componentRegistrations} -} - -} // namespace facebook::react -`; - -const ComponentRegistrationTemplate = ({className}: {className: string}) => - ` -registry->add(concreteComponentDescriptorProvider<${className}ComponentDescriptor>()); -`.trim(); - -module.exports = { - generate( - libraryName: string, - schema: SchemaType, - packageName?: string, - assumeNonnull: boolean = false, - headerPrefix?: string, - ): FilesOutput { - const fileName = 'ComponentDescriptors.cpp'; - - const componentRegistrations = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - - const {components} = module; - // No components in this module - if (components == null) { - return null; - } - - return Object.keys(components) - .map(componentName => { - if (components[componentName].interfaceOnly === true) { - return; - } - - return ComponentRegistrationTemplate({className: componentName}); - }) - .join('\n'); - }) - .filter(Boolean) - .join('\n'); - - const replacedTemplate = FileTemplate({ - libraryName, - componentRegistrations, - headerPrefix: headerPrefix ?? '', - }); - - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GenerateComponentDescriptorH.js b/node_modules/@react-native/codegen/lib/generators/components/GenerateComponentDescriptorH.js deleted file mode 100644 index 5c0d78c06..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GenerateComponentDescriptorH.js +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('./CppHelpers'), - IncludeTemplate = _require.IncludeTemplate; - -// File path -> contents - -const FileTemplate = ({libraryName, componentDefinitions, headerPrefix}) => ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateComponentDescriptorH.js - */ - -#pragma once - -${IncludeTemplate({ - headerPrefix, - file: 'ShadowNodes.h', -})} -#include -#include - -namespace facebook::react { - -${componentDefinitions} - -void ${libraryName}_registerComponentDescriptorsFromCodegen( - std::shared_ptr registry); - -} // namespace facebook::react -`; -const ComponentDefinitionTemplate = ({className}) => - ` -using ${className}ComponentDescriptor = ConcreteComponentDescriptor<${className}ShadowNode>; -`.trim(); -module.exports = { - generate( - libraryName, - schema, - packageName, - assumeNonnull = false, - headerPrefix, - ) { - const fileName = 'ComponentDescriptors.h'; - const componentDefinitions = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - const components = module.components; - // No components in this module - if (components == null) { - return null; - } - return Object.keys(components) - .map(componentName => { - if (components[componentName].interfaceOnly === true) { - return; - } - return ComponentDefinitionTemplate({ - className: componentName, - }); - }) - .join('\n'); - }) - .filter(Boolean) - .join('\n'); - const replacedTemplate = FileTemplate({ - libraryName, - componentDefinitions, - headerPrefix: - headerPrefix !== null && headerPrefix !== void 0 ? headerPrefix : '', - }); - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GenerateComponentDescriptorH.js.flow b/node_modules/@react-native/codegen/lib/generators/components/GenerateComponentDescriptorH.js.flow deleted file mode 100644 index 0a68446cd..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GenerateComponentDescriptorH.js.flow +++ /dev/null @@ -1,103 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type {SchemaType} from '../../CodegenSchema'; - -const {IncludeTemplate} = require('./CppHelpers'); - -// File path -> contents -type FilesOutput = Map; - -const FileTemplate = ({ - libraryName, - componentDefinitions, - headerPrefix, -}: { - libraryName: string, - componentDefinitions: string, - headerPrefix: string, -}) => ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateComponentDescriptorH.js - */ - -#pragma once - -${IncludeTemplate({headerPrefix, file: 'ShadowNodes.h'})} -#include -#include - -namespace facebook::react { - -${componentDefinitions} - -void ${libraryName}_registerComponentDescriptorsFromCodegen( - std::shared_ptr registry); - -} // namespace facebook::react -`; - -const ComponentDefinitionTemplate = ({className}: {className: string}) => - ` -using ${className}ComponentDescriptor = ConcreteComponentDescriptor<${className}ShadowNode>; -`.trim(); - -module.exports = { - generate( - libraryName: string, - schema: SchemaType, - packageName?: string, - assumeNonnull: boolean = false, - headerPrefix?: string, - ): FilesOutput { - const fileName = 'ComponentDescriptors.h'; - - const componentDefinitions = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - - const {components} = module; - // No components in this module - if (components == null) { - return null; - } - - return Object.keys(components) - .map(componentName => { - if (components[componentName].interfaceOnly === true) { - return; - } - - return ComponentDefinitionTemplate({className: componentName}); - }) - .join('\n'); - }) - .filter(Boolean) - .join('\n'); - - const replacedTemplate = FileTemplate({ - libraryName, - componentDefinitions, - headerPrefix: headerPrefix ?? '', - }); - - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GenerateComponentHObjCpp.js b/node_modules/@react-native/codegen/lib/generators/components/GenerateComponentHObjCpp.js deleted file mode 100644 index ebbe01feb..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GenerateComponentHObjCpp.js +++ /dev/null @@ -1,341 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -function getOrdinalNumber(num) { - switch (num) { - case 1: - return '1st'; - case 2: - return '2nd'; - case 3: - return '3rd'; - } - if (num <= 20) { - return `${num}th`; - } - return 'unknown'; -} -const ProtocolTemplate = ({componentName, methods}) => - ` -@protocol RCT${componentName}ViewProtocol -${methods} -@end -`.trim(); -const CommandHandlerIfCaseConvertArgTemplate = ({ - componentName, - expectedKind, - argNumber, - argNumberString, - expectedKindString, - argConversion, -}) => - ` - NSObject *arg${argNumber} = args[${argNumber}]; -#if RCT_DEBUG - if (!RCTValidateTypeOfViewCommandArgument(arg${argNumber}, ${expectedKind}, @"${expectedKindString}", @"${componentName}", commandName, @"${argNumberString}")) { - return; - } -#endif - ${argConversion} -`.trim(); -const CommandHandlerIfCaseTemplate = ({ - componentName, - commandName, - numArgs, - convertArgs, - commandCall, -}) => - ` -if ([commandName isEqualToString:@"${commandName}"]) { -#if RCT_DEBUG - if ([args count] != ${numArgs}) { - RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"${componentName}", commandName, (int)[args count], ${numArgs}); - return; - } -#endif - - ${convertArgs} - - ${commandCall} - return; -} -`.trim(); -const CommandHandlerTemplate = ({componentName, ifCases}) => - ` -RCT_EXTERN inline void RCT${componentName}HandleCommand( - id componentView, - NSString const *commandName, - NSArray const *args) -{ - ${ifCases} - -#if RCT_DEBUG - RCTLogError(@"%@ received command %@, which is not a supported command.", @"${componentName}", commandName); -#endif -} -`.trim(); -const FileTemplate = ({componentContent}) => - ` -/** -* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). -* -* Do not edit this file as changes may cause incorrect behavior and will be lost -* once the code is regenerated. -* -* ${'@'}generated by codegen project: GenerateComponentHObjCpp.js -*/ - -#import -#import -#import - -NS_ASSUME_NONNULL_BEGIN - -${componentContent} - -NS_ASSUME_NONNULL_END -`.trim(); -function getObjCParamType(param) { - const typeAnnotation = param.typeAnnotation; - switch (typeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (typeAnnotation.name) { - case 'RootTag': - return 'double'; - default: - typeAnnotation.name; - throw new Error(`Receieved invalid type: ${typeAnnotation.name}`); - } - case 'BooleanTypeAnnotation': - return 'BOOL'; - case 'DoubleTypeAnnotation': - return 'double'; - case 'FloatTypeAnnotation': - return 'float'; - case 'Int32TypeAnnotation': - return 'NSInteger'; - case 'StringTypeAnnotation': - return 'NSString *'; - case 'ArrayTypeAnnotation': - return 'const NSArray *'; - default: - typeAnnotation.type; - throw new Error('Received invalid param type annotation'); - } -} -function getObjCExpectedKindParamType(param) { - const typeAnnotation = param.typeAnnotation; - switch (typeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (typeAnnotation.name) { - case 'RootTag': - return '[NSNumber class]'; - default: - typeAnnotation.name; - throw new Error(`Receieved invalid type: ${typeAnnotation.name}`); - } - case 'BooleanTypeAnnotation': - return '[NSNumber class]'; - case 'DoubleTypeAnnotation': - return '[NSNumber class]'; - case 'FloatTypeAnnotation': - return '[NSNumber class]'; - case 'Int32TypeAnnotation': - return '[NSNumber class]'; - case 'StringTypeAnnotation': - return '[NSString class]'; - case 'ArrayTypeAnnotation': - return '[NSArray class]'; - default: - typeAnnotation.type; - throw new Error('Received invalid param type annotation'); - } -} -function getReadableExpectedKindParamType(param) { - const typeAnnotation = param.typeAnnotation; - switch (typeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (typeAnnotation.name) { - case 'RootTag': - return 'double'; - default: - typeAnnotation.name; - throw new Error(`Receieved invalid type: ${typeAnnotation.name}`); - } - case 'BooleanTypeAnnotation': - return 'boolean'; - case 'DoubleTypeAnnotation': - return 'double'; - case 'FloatTypeAnnotation': - return 'float'; - case 'Int32TypeAnnotation': - return 'number'; - case 'StringTypeAnnotation': - return 'string'; - case 'ArrayTypeAnnotation': - return 'array'; - default: - typeAnnotation.type; - throw new Error('Received invalid param type annotation'); - } -} -function getObjCRightHandAssignmentParamType(param, index) { - const typeAnnotation = param.typeAnnotation; - switch (typeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (typeAnnotation.name) { - case 'RootTag': - return `[(NSNumber *)arg${index} doubleValue]`; - default: - typeAnnotation.name; - throw new Error(`Receieved invalid type: ${typeAnnotation.name}`); - } - case 'BooleanTypeAnnotation': - return `[(NSNumber *)arg${index} boolValue]`; - case 'DoubleTypeAnnotation': - return `[(NSNumber *)arg${index} doubleValue]`; - case 'FloatTypeAnnotation': - return `[(NSNumber *)arg${index} floatValue]`; - case 'Int32TypeAnnotation': - return `[(NSNumber *)arg${index} intValue]`; - case 'StringTypeAnnotation': - return `(NSString *)arg${index}`; - case 'ArrayTypeAnnotation': - return `(NSArray *)arg${index}`; - default: - typeAnnotation.type; - throw new Error('Received invalid param type annotation'); - } -} -function generateProtocol(component, componentName) { - const methods = component.commands - .map(command => { - const params = command.typeAnnotation.params; - const paramString = - params.length === 0 - ? '' - : params - .map((param, index) => { - const objCType = getObjCParamType(param); - return `${index === 0 ? '' : param.name}:(${objCType})${ - param.name - }`; - }) - .join(' '); - return `- (void)${command.name}${paramString};`; - }) - .join('\n') - .trim(); - return ProtocolTemplate({ - componentName, - methods, - }); -} -function generateConvertAndValidateParam(param, index, componentName) { - const leftSideType = getObjCParamType(param); - const expectedKind = getObjCExpectedKindParamType(param); - const expectedKindString = getReadableExpectedKindParamType(param); - const argConversion = `${leftSideType} ${ - param.name - } = ${getObjCRightHandAssignmentParamType(param, index)};`; - return CommandHandlerIfCaseConvertArgTemplate({ - componentName, - argConversion, - argNumber: index, - argNumberString: getOrdinalNumber(index + 1), - expectedKind, - expectedKindString, - }); -} -function generateCommandIfCase(command, componentName) { - const params = command.typeAnnotation.params; - const convertArgs = params - .map((param, index) => - generateConvertAndValidateParam(param, index, componentName), - ) - .join('\n\n') - .trim(); - const commandCallArgs = - params.length === 0 - ? '' - : params - .map((param, index) => { - return `${index === 0 ? '' : param.name}:${param.name}`; - }) - .join(' '); - const commandCall = `[componentView ${command.name}${commandCallArgs}];`; - return CommandHandlerIfCaseTemplate({ - componentName, - commandName: command.name, - numArgs: params.length, - convertArgs, - commandCall, - }); -} -function generateCommandHandler(component, componentName) { - if (component.commands.length === 0) { - return null; - } - const ifCases = component.commands - .map(command => generateCommandIfCase(command, componentName)) - .join('\n\n'); - return CommandHandlerTemplate({ - componentName, - ifCases, - }); -} -module.exports = { - generate( - libraryName, - schema, - packageName, - assumeNonnull = false, - headerPrefix, - ) { - const fileName = 'RCTComponentViewHelpers.h'; - const componentContent = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - const components = module.components; - // No components in this module - if (components == null) { - return null; - } - return Object.keys(components) - .filter(componentName => { - const component = components[componentName]; - return !( - component.excludedPlatforms && - component.excludedPlatforms.includes('iOS') - ); - }) - .map(componentName => { - return [ - generateProtocol(components[componentName], componentName), - generateCommandHandler(components[componentName], componentName), - ] - .join('\n\n') - .trim(); - }) - .join('\n\n'); - }) - .filter(Boolean) - .join('\n\n'); - const replacedTemplate = FileTemplate({ - componentContent, - }); - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GenerateComponentHObjCpp.js.flow b/node_modules/@react-native/codegen/lib/generators/components/GenerateComponentHObjCpp.js.flow deleted file mode 100644 index 79724d181..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GenerateComponentHObjCpp.js.flow +++ /dev/null @@ -1,427 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type { - CommandParamTypeAnnotation, - CommandTypeAnnotation, - ComponentShape, - NamedShape, - SchemaType, -} from '../../CodegenSchema'; - -type FilesOutput = Map; - -function getOrdinalNumber(num: number): string { - switch (num) { - case 1: - return '1st'; - case 2: - return '2nd'; - case 3: - return '3rd'; - } - - if (num <= 20) { - return `${num}th`; - } - - return 'unknown'; -} - -const ProtocolTemplate = ({ - componentName, - methods, -}: { - componentName: string, - methods: string, -}) => - ` -@protocol RCT${componentName}ViewProtocol -${methods} -@end -`.trim(); - -const CommandHandlerIfCaseConvertArgTemplate = ({ - componentName, - expectedKind, - argNumber, - argNumberString, - expectedKindString, - argConversion, -}: { - componentName: string, - expectedKind: string, - argNumber: number, - argNumberString: string, - expectedKindString: string, - argConversion: string, -}) => - ` - NSObject *arg${argNumber} = args[${argNumber}]; -#if RCT_DEBUG - if (!RCTValidateTypeOfViewCommandArgument(arg${argNumber}, ${expectedKind}, @"${expectedKindString}", @"${componentName}", commandName, @"${argNumberString}")) { - return; - } -#endif - ${argConversion} -`.trim(); - -const CommandHandlerIfCaseTemplate = ({ - componentName, - commandName, - numArgs, - convertArgs, - commandCall, -}: { - componentName: string, - commandName: string, - numArgs: number, - convertArgs: string, - commandCall: string, -}) => - ` -if ([commandName isEqualToString:@"${commandName}"]) { -#if RCT_DEBUG - if ([args count] != ${numArgs}) { - RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"${componentName}", commandName, (int)[args count], ${numArgs}); - return; - } -#endif - - ${convertArgs} - - ${commandCall} - return; -} -`.trim(); - -const CommandHandlerTemplate = ({ - componentName, - ifCases, -}: { - componentName: string, - ifCases: string, -}) => - ` -RCT_EXTERN inline void RCT${componentName}HandleCommand( - id componentView, - NSString const *commandName, - NSArray const *args) -{ - ${ifCases} - -#if RCT_DEBUG - RCTLogError(@"%@ received command %@, which is not a supported command.", @"${componentName}", commandName); -#endif -} -`.trim(); - -const FileTemplate = ({componentContent}: {componentContent: string}) => - ` -/** -* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). -* -* Do not edit this file as changes may cause incorrect behavior and will be lost -* once the code is regenerated. -* -* ${'@'}generated by codegen project: GenerateComponentHObjCpp.js -*/ - -#import -#import -#import - -NS_ASSUME_NONNULL_BEGIN - -${componentContent} - -NS_ASSUME_NONNULL_END -`.trim(); - -type Param = NamedShape; - -function getObjCParamType(param: Param): string { - const {typeAnnotation} = param; - - switch (typeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (typeAnnotation.name) { - case 'RootTag': - return 'double'; - default: - (typeAnnotation.name: empty); - throw new Error(`Receieved invalid type: ${typeAnnotation.name}`); - } - case 'BooleanTypeAnnotation': - return 'BOOL'; - case 'DoubleTypeAnnotation': - return 'double'; - case 'FloatTypeAnnotation': - return 'float'; - case 'Int32TypeAnnotation': - return 'NSInteger'; - case 'StringTypeAnnotation': - return 'NSString *'; - case 'ArrayTypeAnnotation': - return 'const NSArray *'; - default: - (typeAnnotation.type: empty); - throw new Error('Received invalid param type annotation'); - } -} - -function getObjCExpectedKindParamType(param: Param): string { - const {typeAnnotation} = param; - - switch (typeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (typeAnnotation.name) { - case 'RootTag': - return '[NSNumber class]'; - default: - (typeAnnotation.name: empty); - throw new Error(`Receieved invalid type: ${typeAnnotation.name}`); - } - case 'BooleanTypeAnnotation': - return '[NSNumber class]'; - case 'DoubleTypeAnnotation': - return '[NSNumber class]'; - case 'FloatTypeAnnotation': - return '[NSNumber class]'; - case 'Int32TypeAnnotation': - return '[NSNumber class]'; - case 'StringTypeAnnotation': - return '[NSString class]'; - case 'ArrayTypeAnnotation': - return '[NSArray class]'; - default: - (typeAnnotation.type: empty); - throw new Error('Received invalid param type annotation'); - } -} - -function getReadableExpectedKindParamType(param: Param): string { - const {typeAnnotation} = param; - - switch (typeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (typeAnnotation.name) { - case 'RootTag': - return 'double'; - default: - (typeAnnotation.name: empty); - throw new Error(`Receieved invalid type: ${typeAnnotation.name}`); - } - case 'BooleanTypeAnnotation': - return 'boolean'; - case 'DoubleTypeAnnotation': - return 'double'; - case 'FloatTypeAnnotation': - return 'float'; - case 'Int32TypeAnnotation': - return 'number'; - case 'StringTypeAnnotation': - return 'string'; - case 'ArrayTypeAnnotation': - return 'array'; - default: - (typeAnnotation.type: empty); - throw new Error('Received invalid param type annotation'); - } -} - -function getObjCRightHandAssignmentParamType( - param: Param, - index: number, -): string { - const {typeAnnotation} = param; - - switch (typeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (typeAnnotation.name) { - case 'RootTag': - return `[(NSNumber *)arg${index} doubleValue]`; - default: - (typeAnnotation.name: empty); - throw new Error(`Receieved invalid type: ${typeAnnotation.name}`); - } - case 'BooleanTypeAnnotation': - return `[(NSNumber *)arg${index} boolValue]`; - case 'DoubleTypeAnnotation': - return `[(NSNumber *)arg${index} doubleValue]`; - case 'FloatTypeAnnotation': - return `[(NSNumber *)arg${index} floatValue]`; - case 'Int32TypeAnnotation': - return `[(NSNumber *)arg${index} intValue]`; - case 'StringTypeAnnotation': - return `(NSString *)arg${index}`; - case 'ArrayTypeAnnotation': - return `(NSArray *)arg${index}`; - default: - (typeAnnotation.type: empty); - throw new Error('Received invalid param type annotation'); - } -} - -function generateProtocol( - component: ComponentShape, - componentName: string, -): string { - const methods = component.commands - .map(command => { - const params = command.typeAnnotation.params; - const paramString = - params.length === 0 - ? '' - : params - .map((param, index) => { - const objCType = getObjCParamType(param); - - return `${index === 0 ? '' : param.name}:(${objCType})${ - param.name - }`; - }) - .join(' '); - return `- (void)${command.name}${paramString};`; - }) - .join('\n') - .trim(); - - return ProtocolTemplate({ - componentName, - methods, - }); -} - -function generateConvertAndValidateParam( - param: Param, - index: number, - componentName: string, -): string { - const leftSideType = getObjCParamType(param); - const expectedKind = getObjCExpectedKindParamType(param); - const expectedKindString = getReadableExpectedKindParamType(param); - const argConversion = `${leftSideType} ${ - param.name - } = ${getObjCRightHandAssignmentParamType(param, index)};`; - - return CommandHandlerIfCaseConvertArgTemplate({ - componentName, - argConversion, - argNumber: index, - argNumberString: getOrdinalNumber(index + 1), - expectedKind, - expectedKindString, - }); -} - -function generateCommandIfCase( - command: NamedShape, - componentName: string, -) { - const params = command.typeAnnotation.params; - - const convertArgs = params - .map((param, index) => - generateConvertAndValidateParam(param, index, componentName), - ) - .join('\n\n') - .trim(); - - const commandCallArgs = - params.length === 0 - ? '' - : params - .map((param, index) => { - return `${index === 0 ? '' : param.name}:${param.name}`; - }) - .join(' '); - const commandCall = `[componentView ${command.name}${commandCallArgs}];`; - - return CommandHandlerIfCaseTemplate({ - componentName, - commandName: command.name, - numArgs: params.length, - convertArgs, - commandCall, - }); -} - -function generateCommandHandler( - component: ComponentShape, - componentName: string, -): ?string { - if (component.commands.length === 0) { - return null; - } - - const ifCases = component.commands - .map(command => generateCommandIfCase(command, componentName)) - .join('\n\n'); - - return CommandHandlerTemplate({ - componentName, - ifCases, - }); -} - -module.exports = { - generate( - libraryName: string, - schema: SchemaType, - packageName?: string, - assumeNonnull: boolean = false, - headerPrefix?: string, - ): FilesOutput { - const fileName = 'RCTComponentViewHelpers.h'; - - const componentContent = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - - const {components} = module; - // No components in this module - if (components == null) { - return null; - } - - return Object.keys(components) - .filter(componentName => { - const component = components[componentName]; - return !( - component.excludedPlatforms && - component.excludedPlatforms.includes('iOS') - ); - }) - .map(componentName => { - return [ - generateProtocol(components[componentName], componentName), - generateCommandHandler(components[componentName], componentName), - ] - .join('\n\n') - .trim(); - }) - .join('\n\n'); - }) - .filter(Boolean) - .join('\n\n'); - - const replacedTemplate = FileTemplate({ - componentContent, - }); - - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GenerateEventEmitterCpp.js b/node_modules/@react-native/codegen/lib/generators/components/GenerateEventEmitterCpp.js deleted file mode 100644 index 3cf4edbcf..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GenerateEventEmitterCpp.js +++ /dev/null @@ -1,399 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('../Utils'), - indent = _require.indent; -const _require2 = require('./CppHelpers'), - IncludeTemplate = _require2.IncludeTemplate, - generateEventStructName = _require2.generateEventStructName; - -// File path -> contents - -const FileTemplate = ({events, extraIncludes, headerPrefix}) => ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateEventEmitterCpp.js - */ - -${IncludeTemplate({ - headerPrefix, - file: 'EventEmitters.h', -})} -${[...extraIncludes].join('\n')} - -namespace facebook::react { -${events} -} // namespace facebook::react -`; -const ComponentTemplate = ({ - className, - eventName, - structName, - dispatchEventName, - implementation, -}) => { - const capture = implementation.includes('$event') - ? '$event=std::move($event)' - : ''; - return ` -void ${className}EventEmitter::${eventName}(${structName} $event) const { - dispatchEvent("${dispatchEventName}", [${capture}](jsi::Runtime &runtime) { - ${implementation} - }); -} -`; -}; -const BasicComponentTemplate = ({className, eventName, dispatchEventName}) => - ` -void ${className}EventEmitter::${eventName}() const { - dispatchEvent("${dispatchEventName}"); -} -`.trim(); -function generateSetter( - variableName, - propertyName, - propertyParts, - usingEvent, - valueMapper = value => value, -) { - const eventChain = usingEvent - ? `$event.${[...propertyParts, propertyName].join('.')}` - : [propertyParts, propertyName].join('.'); - return `${variableName}.setProperty(runtime, "${propertyName}", ${valueMapper( - eventChain, - )});`; -} -function generateObjectSetter( - variableName, - propertyName, - propertyParts, - typeAnnotation, - extraIncludes, - usingEvent, -) { - return ` -{ - auto ${propertyName} = jsi::Object(runtime); - ${indent( - generateSetters( - propertyName, - typeAnnotation.properties, - propertyParts.concat([propertyName]), - extraIncludes, - usingEvent, - ), - 2, - )} - ${variableName}.setProperty(runtime, "${propertyName}", ${propertyName}); -} -`.trim(); -} -function setValueAtIndex( - propertyName, - indexVariable, - loopLocalVariable, - mappingFunction = value => value, -) { - return `${propertyName}.setValueAtIndex(runtime, ${indexVariable}++, ${mappingFunction( - loopLocalVariable, - )});`; -} -function generateArraySetter( - variableName, - propertyName, - propertyParts, - elementType, - extraIncludes, - usingEvent, -) { - const eventChain = usingEvent - ? `$event.${[...propertyParts, propertyName].join('.')}` - : [propertyParts, propertyName].join('.'); - const indexVar = `${propertyName}Index`; - const innerLoopVar = `${propertyName}Value`; - return ` - auto ${propertyName} = jsi::Array(runtime, ${eventChain}.size()); - size_t ${indexVar} = 0; - for (auto ${innerLoopVar} : ${eventChain}) { - ${handleArrayElementType( - elementType, - propertyName, - indexVar, - innerLoopVar, - propertyParts, - extraIncludes, - usingEvent, - )} - } - ${variableName}.setProperty(runtime, "${propertyName}", ${propertyName}); - `; -} -function handleArrayElementType( - elementType, - propertyName, - indexVariable, - loopLocalVariable, - propertyParts, - extraIncludes, - usingEvent, -) { - switch (elementType.type) { - case 'BooleanTypeAnnotation': - return setValueAtIndex( - propertyName, - indexVariable, - loopLocalVariable, - val => `(bool)${val}`, - ); - case 'StringTypeAnnotation': - case 'Int32TypeAnnotation': - case 'DoubleTypeAnnotation': - case 'FloatTypeAnnotation': - return setValueAtIndex(propertyName, indexVariable, loopLocalVariable); - case 'MixedTypeAnnotation': - return setValueAtIndex( - propertyName, - indexVariable, - loopLocalVariable, - val => `jsi::valueFromDynamic(runtime, ${val})`, - ); - case 'StringEnumTypeAnnotation': - return setValueAtIndex( - propertyName, - indexVariable, - loopLocalVariable, - val => `toString(${val})`, - ); - case 'ObjectTypeAnnotation': - return convertObjectTypeArray( - propertyName, - indexVariable, - loopLocalVariable, - propertyParts, - elementType, - extraIncludes, - ); - case 'ArrayTypeAnnotation': - return convertArrayTypeArray( - propertyName, - indexVariable, - loopLocalVariable, - propertyParts, - elementType, - extraIncludes, - usingEvent, - ); - default: - throw new Error( - `Received invalid elementType for array ${elementType.type}`, - ); - } -} -function convertObjectTypeArray( - propertyName, - indexVariable, - loopLocalVariable, - propertyParts, - objectTypeAnnotation, - extraIncludes, -) { - return `auto ${propertyName}Object = jsi::Object(runtime); - ${generateSetters( - `${propertyName}Object`, - objectTypeAnnotation.properties, - [].concat([loopLocalVariable]), - extraIncludes, - false, - )} - ${setValueAtIndex(propertyName, indexVariable, `${propertyName}Object`)}`; -} -function convertArrayTypeArray( - propertyName, - indexVariable, - loopLocalVariable, - propertyParts, - eventTypeAnnotation, - extraIncludes, - usingEvent, -) { - if (eventTypeAnnotation.type !== 'ArrayTypeAnnotation') { - throw new Error( - `Inconsistent eventTypeAnnotation received. Expected type = 'ArrayTypeAnnotation'; received = ${eventTypeAnnotation.type}`, - ); - } - return `auto ${propertyName}Array = jsi::Array(runtime, ${loopLocalVariable}.size()); - size_t ${indexVariable}Internal = 0; - for (auto ${loopLocalVariable}Internal : ${loopLocalVariable}) { - ${handleArrayElementType( - eventTypeAnnotation.elementType, - `${propertyName}Array`, - `${indexVariable}Internal`, - `${loopLocalVariable}Internal`, - propertyParts, - extraIncludes, - usingEvent, - )} - } - ${setValueAtIndex(propertyName, indexVariable, `${propertyName}Array`)}`; -} -function generateSetters( - parentPropertyName, - properties, - propertyParts, - extraIncludes, - usingEvent = true, -) { - const propSetters = properties - .map(eventProperty => { - const typeAnnotation = eventProperty.typeAnnotation; - switch (typeAnnotation.type) { - case 'BooleanTypeAnnotation': - case 'StringTypeAnnotation': - case 'Int32TypeAnnotation': - case 'DoubleTypeAnnotation': - case 'FloatTypeAnnotation': - return generateSetter( - parentPropertyName, - eventProperty.name, - propertyParts, - usingEvent, - ); - case 'MixedTypeAnnotation': - extraIncludes.add('#include '); - return generateSetter( - parentPropertyName, - eventProperty.name, - propertyParts, - usingEvent, - prop => `jsi::valueFromDynamic(runtime, ${prop})`, - ); - case 'StringEnumTypeAnnotation': - return generateSetter( - parentPropertyName, - eventProperty.name, - propertyParts, - usingEvent, - prop => `toString(${prop})`, - ); - case 'ObjectTypeAnnotation': - return generateObjectSetter( - parentPropertyName, - eventProperty.name, - propertyParts, - typeAnnotation, - extraIncludes, - usingEvent, - ); - case 'ArrayTypeAnnotation': - return generateArraySetter( - parentPropertyName, - eventProperty.name, - propertyParts, - typeAnnotation.elementType, - extraIncludes, - usingEvent, - ); - default: - typeAnnotation.type; - throw new Error( - `Received invalid event property type ${typeAnnotation.type}`, - ); - } - }) - .join('\n'); - return propSetters; -} -function generateEvent(componentName, event, extraIncludes) { - // This is a gross hack necessary because native code is sending - // events named things like topChange to JS which is then converted back to - // call the onChange prop. We should be consistent throughout the system. - // In order to migrate to this new system we have to support the current - // naming scheme. We should delete this once we are able to control this name - // throughout the system. - const dispatchEventName = - event.paperTopLevelNameDeprecated != null - ? event.paperTopLevelNameDeprecated - : `${event.name[2].toLowerCase()}${event.name.slice(3)}`; - if (event.typeAnnotation.argument) { - const implementation = ` - auto $payload = jsi::Object(runtime); - ${generateSetters( - '$payload', - event.typeAnnotation.argument.properties, - [], - extraIncludes, - )} - return $payload; - `.trim(); - if (!event.name.startsWith('on')) { - throw new Error('Expected the event name to start with `on`'); - } - return ComponentTemplate({ - className: componentName, - eventName: event.name, - dispatchEventName, - structName: generateEventStructName([event.name]), - implementation, - }); - } - return BasicComponentTemplate({ - className: componentName, - eventName: event.name, - dispatchEventName, - }); -} -module.exports = { - generate( - libraryName, - schema, - packageName, - assumeNonnull = false, - headerPrefix, - ) { - const moduleComponents = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - const components = module.components; - // No components in this module - if (components == null) { - return null; - } - return components; - }) - .filter(Boolean) - .reduce((acc, components) => Object.assign(acc, components), {}); - const extraIncludes = new Set(); - const componentEmitters = Object.keys(moduleComponents) - .map(componentName => { - const component = moduleComponents[componentName]; - return component.events - .map(event => generateEvent(componentName, event, extraIncludes)) - .join('\n'); - }) - .join('\n'); - const fileName = 'EventEmitters.cpp'; - const replacedTemplate = FileTemplate({ - events: componentEmitters, - extraIncludes, - headerPrefix: - headerPrefix !== null && headerPrefix !== void 0 ? headerPrefix : '', - }); - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GenerateEventEmitterCpp.js.flow b/node_modules/@react-native/codegen/lib/generators/components/GenerateEventEmitterCpp.js.flow deleted file mode 100644 index 2f2a829d1..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GenerateEventEmitterCpp.js.flow +++ /dev/null @@ -1,454 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; -import type {EventTypeShape} from '../../CodegenSchema'; -import type { - ComponentShape, - EventTypeAnnotation, - NamedShape, - ObjectTypeAnnotation, - SchemaType, -} from '../../CodegenSchema'; - -const {indent} = require('../Utils'); -const {IncludeTemplate, generateEventStructName} = require('./CppHelpers'); - -// File path -> contents -type FilesOutput = Map; - -type ComponentCollection = $ReadOnly<{ - [component: string]: ComponentShape, - ... -}>; - -const FileTemplate = ({ - events, - extraIncludes, - headerPrefix, -}: { - events: string, - extraIncludes: Set, - headerPrefix: string, -}) => ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateEventEmitterCpp.js - */ - -${IncludeTemplate({headerPrefix, file: 'EventEmitters.h'})} -${[...extraIncludes].join('\n')} - -namespace facebook::react { -${events} -} // namespace facebook::react -`; - -const ComponentTemplate = ({ - className, - eventName, - structName, - dispatchEventName, - implementation, -}: { - className: string, - eventName: string, - structName: string, - dispatchEventName: string, - implementation: string, -}) => { - const capture = implementation.includes('$event') - ? '$event=std::move($event)' - : ''; - return ` -void ${className}EventEmitter::${eventName}(${structName} $event) const { - dispatchEvent("${dispatchEventName}", [${capture}](jsi::Runtime &runtime) { - ${implementation} - }); -} -`; -}; - -const BasicComponentTemplate = ({ - className, - eventName, - dispatchEventName, -}: { - className: string, - eventName: string, - dispatchEventName: string, -}) => - ` -void ${className}EventEmitter::${eventName}() const { - dispatchEvent("${dispatchEventName}"); -} -`.trim(); - -function generateSetter( - variableName: string, - propertyName: string, - propertyParts: $ReadOnlyArray, - usingEvent: boolean, - valueMapper: string => string = value => value, -) { - const eventChain = usingEvent - ? `$event.${[...propertyParts, propertyName].join('.')}` - : [propertyParts, propertyName].join('.'); - return `${variableName}.setProperty(runtime, "${propertyName}", ${valueMapper( - eventChain, - )});`; -} - -function generateObjectSetter( - variableName: string, - propertyName: string, - propertyParts: $ReadOnlyArray, - typeAnnotation: ObjectTypeAnnotation, - extraIncludes: Set, - usingEvent: boolean, -) { - return ` -{ - auto ${propertyName} = jsi::Object(runtime); - ${indent( - generateSetters( - propertyName, - typeAnnotation.properties, - propertyParts.concat([propertyName]), - extraIncludes, - usingEvent, - ), - 2, - )} - ${variableName}.setProperty(runtime, "${propertyName}", ${propertyName}); -} -`.trim(); -} - -function setValueAtIndex( - propertyName: string, - indexVariable: string, - loopLocalVariable: string, - mappingFunction: string => string = value => value, -) { - return `${propertyName}.setValueAtIndex(runtime, ${indexVariable}++, ${mappingFunction( - loopLocalVariable, - )});`; -} - -function generateArraySetter( - variableName: string, - propertyName: string, - propertyParts: $ReadOnlyArray, - elementType: EventTypeAnnotation, - extraIncludes: Set, - usingEvent: boolean, -): string { - const eventChain = usingEvent - ? `$event.${[...propertyParts, propertyName].join('.')}` - : [propertyParts, propertyName].join('.'); - const indexVar = `${propertyName}Index`; - const innerLoopVar = `${propertyName}Value`; - return ` - auto ${propertyName} = jsi::Array(runtime, ${eventChain}.size()); - size_t ${indexVar} = 0; - for (auto ${innerLoopVar} : ${eventChain}) { - ${handleArrayElementType( - elementType, - propertyName, - indexVar, - innerLoopVar, - propertyParts, - extraIncludes, - usingEvent, - )} - } - ${variableName}.setProperty(runtime, "${propertyName}", ${propertyName}); - `; -} - -function handleArrayElementType( - elementType: EventTypeAnnotation, - propertyName: string, - indexVariable: string, - loopLocalVariable: string, - propertyParts: $ReadOnlyArray, - extraIncludes: Set, - usingEvent: boolean, -): string { - switch (elementType.type) { - case 'BooleanTypeAnnotation': - return setValueAtIndex( - propertyName, - indexVariable, - loopLocalVariable, - val => `(bool)${val}`, - ); - case 'StringTypeAnnotation': - case 'Int32TypeAnnotation': - case 'DoubleTypeAnnotation': - case 'FloatTypeAnnotation': - return setValueAtIndex(propertyName, indexVariable, loopLocalVariable); - case 'MixedTypeAnnotation': - return setValueAtIndex( - propertyName, - indexVariable, - loopLocalVariable, - val => `jsi::valueFromDynamic(runtime, ${val})`, - ); - case 'StringEnumTypeAnnotation': - return setValueAtIndex( - propertyName, - indexVariable, - loopLocalVariable, - val => `toString(${val})`, - ); - case 'ObjectTypeAnnotation': - return convertObjectTypeArray( - propertyName, - indexVariable, - loopLocalVariable, - propertyParts, - elementType, - extraIncludes, - ); - case 'ArrayTypeAnnotation': - return convertArrayTypeArray( - propertyName, - indexVariable, - loopLocalVariable, - propertyParts, - elementType, - extraIncludes, - usingEvent, - ); - default: - throw new Error( - `Received invalid elementType for array ${elementType.type}`, - ); - } -} - -function convertObjectTypeArray( - propertyName: string, - indexVariable: string, - loopLocalVariable: string, - propertyParts: $ReadOnlyArray, - objectTypeAnnotation: ObjectTypeAnnotation, - extraIncludes: Set, -): string { - return `auto ${propertyName}Object = jsi::Object(runtime); - ${generateSetters( - `${propertyName}Object`, - objectTypeAnnotation.properties, - [].concat([loopLocalVariable]), - extraIncludes, - false, - )} - ${setValueAtIndex(propertyName, indexVariable, `${propertyName}Object`)}`; -} - -function convertArrayTypeArray( - propertyName: string, - indexVariable: string, - loopLocalVariable: string, - propertyParts: $ReadOnlyArray, - eventTypeAnnotation: EventTypeAnnotation, - extraIncludes: Set, - usingEvent: boolean, -): string { - if (eventTypeAnnotation.type !== 'ArrayTypeAnnotation') { - throw new Error( - `Inconsistent eventTypeAnnotation received. Expected type = 'ArrayTypeAnnotation'; received = ${eventTypeAnnotation.type}`, - ); - } - return `auto ${propertyName}Array = jsi::Array(runtime, ${loopLocalVariable}.size()); - size_t ${indexVariable}Internal = 0; - for (auto ${loopLocalVariable}Internal : ${loopLocalVariable}) { - ${handleArrayElementType( - eventTypeAnnotation.elementType, - `${propertyName}Array`, - `${indexVariable}Internal`, - `${loopLocalVariable}Internal`, - propertyParts, - extraIncludes, - usingEvent, - )} - } - ${setValueAtIndex(propertyName, indexVariable, `${propertyName}Array`)}`; -} - -function generateSetters( - parentPropertyName: string, - properties: $ReadOnlyArray>, - propertyParts: $ReadOnlyArray, - extraIncludes: Set, - usingEvent: boolean = true, -): string { - const propSetters = properties - .map(eventProperty => { - const {typeAnnotation} = eventProperty; - switch (typeAnnotation.type) { - case 'BooleanTypeAnnotation': - case 'StringTypeAnnotation': - case 'Int32TypeAnnotation': - case 'DoubleTypeAnnotation': - case 'FloatTypeAnnotation': - return generateSetter( - parentPropertyName, - eventProperty.name, - propertyParts, - usingEvent, - ); - case 'MixedTypeAnnotation': - extraIncludes.add('#include '); - return generateSetter( - parentPropertyName, - eventProperty.name, - propertyParts, - usingEvent, - prop => `jsi::valueFromDynamic(runtime, ${prop})`, - ); - case 'StringEnumTypeAnnotation': - return generateSetter( - parentPropertyName, - eventProperty.name, - propertyParts, - usingEvent, - prop => `toString(${prop})`, - ); - case 'ObjectTypeAnnotation': - return generateObjectSetter( - parentPropertyName, - eventProperty.name, - propertyParts, - typeAnnotation, - extraIncludes, - usingEvent, - ); - case 'ArrayTypeAnnotation': - return generateArraySetter( - parentPropertyName, - eventProperty.name, - propertyParts, - typeAnnotation.elementType, - extraIncludes, - usingEvent, - ); - default: - (typeAnnotation.type: empty); - throw new Error( - `Received invalid event property type ${typeAnnotation.type}`, - ); - } - }) - .join('\n'); - - return propSetters; -} - -function generateEvent( - componentName: string, - event: EventTypeShape, - extraIncludes: Set, -): string { - // This is a gross hack necessary because native code is sending - // events named things like topChange to JS which is then converted back to - // call the onChange prop. We should be consistent throughout the system. - // In order to migrate to this new system we have to support the current - // naming scheme. We should delete this once we are able to control this name - // throughout the system. - const dispatchEventName = - event.paperTopLevelNameDeprecated != null - ? event.paperTopLevelNameDeprecated - : `${event.name[2].toLowerCase()}${event.name.slice(3)}`; - - if (event.typeAnnotation.argument) { - const implementation = ` - auto $payload = jsi::Object(runtime); - ${generateSetters( - '$payload', - event.typeAnnotation.argument.properties, - [], - extraIncludes, - )} - return $payload; - `.trim(); - - if (!event.name.startsWith('on')) { - throw new Error('Expected the event name to start with `on`'); - } - - return ComponentTemplate({ - className: componentName, - eventName: event.name, - dispatchEventName, - structName: generateEventStructName([event.name]), - implementation, - }); - } - - return BasicComponentTemplate({ - className: componentName, - eventName: event.name, - dispatchEventName, - }); -} - -module.exports = { - generate( - libraryName: string, - schema: SchemaType, - packageName?: string, - assumeNonnull: boolean = false, - headerPrefix?: string, - ): FilesOutput { - const moduleComponents: ComponentCollection = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - - const {components} = module; - // No components in this module - if (components == null) { - return null; - } - - return components; - }) - .filter(Boolean) - .reduce((acc, components) => Object.assign(acc, components), {}); - - const extraIncludes = new Set(); - const componentEmitters = Object.keys(moduleComponents) - .map(componentName => { - const component = moduleComponents[componentName]; - return component.events - .map(event => generateEvent(componentName, event, extraIncludes)) - .join('\n'); - }) - .join('\n'); - - const fileName = 'EventEmitters.cpp'; - const replacedTemplate = FileTemplate({ - events: componentEmitters, - extraIncludes, - headerPrefix: headerPrefix ?? '', - }); - - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GenerateEventEmitterH.js b/node_modules/@react-native/codegen/lib/generators/components/GenerateEventEmitterH.js deleted file mode 100644 index 41a8d4ed3..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GenerateEventEmitterH.js +++ /dev/null @@ -1,280 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('../Utils'), - indent = _require.indent, - toSafeCppString = _require.toSafeCppString; -const _require2 = require('./CppHelpers'), - generateEventStructName = _require2.generateEventStructName, - getCppArrayTypeForAnnotation = _require2.getCppArrayTypeForAnnotation, - getCppTypeForAnnotation = _require2.getCppTypeForAnnotation, - getImports = _require2.getImports; -const nullthrows = require('nullthrows'); - -// File path -> contents - -const FileTemplate = ({componentEmitters, extraIncludes}) => ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateEventEmitterH.js - */ -#pragma once - -#include -${[...extraIncludes].join('\n')} - -namespace facebook::react { -${componentEmitters} -} // namespace facebook::react -`; -const ComponentTemplate = ({className, structs, events}) => - ` -class ${className}EventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - ${structs} - ${events} -}; -`.trim(); -const StructTemplate = ({structName, fields}) => - ` - struct ${structName} { - ${fields} - }; -`.trim(); -const EnumTemplate = ({enumName, values, toCases}) => - `enum class ${enumName} { - ${values} -}; - -static char const *toString(const ${enumName} value) { - switch (value) { - ${toCases} - } -} -`.trim(); -function getNativeTypeFromAnnotation(componentName, eventProperty, nameParts) { - const type = eventProperty.typeAnnotation.type; - switch (type) { - case 'BooleanTypeAnnotation': - case 'StringTypeAnnotation': - case 'Int32TypeAnnotation': - case 'DoubleTypeAnnotation': - case 'FloatTypeAnnotation': - case 'MixedTypeAnnotation': - return getCppTypeForAnnotation(type); - case 'StringEnumTypeAnnotation': - case 'ObjectTypeAnnotation': - return generateEventStructName([...nameParts, eventProperty.name]); - case 'ArrayTypeAnnotation': - const eventTypeAnnotation = eventProperty.typeAnnotation; - if (eventTypeAnnotation.type !== 'ArrayTypeAnnotation') { - throw new Error( - "Inconsistent Codegen state: type was ArrayTypeAnnotation at the beginning of the body and now it isn't", - ); - } - return getCppArrayTypeForAnnotation(eventTypeAnnotation.elementType, [ - ...nameParts, - eventProperty.name, - ]); - default: - type; - throw new Error(`Received invalid event property type ${type}`); - } -} -function generateEnum(structs, options, nameParts) { - const structName = generateEventStructName(nameParts); - const fields = options - .map((option, index) => `${toSafeCppString(option)}`) - .join(',\n '); - const toCases = options - .map( - option => - `case ${structName}::${toSafeCppString(option)}: return "${option}";`, - ) - .join('\n' + ' '); - structs.set( - structName, - EnumTemplate({ - enumName: structName, - values: fields, - toCases: toCases, - }), - ); -} -function handleGenerateStructForArray( - structs, - name, - componentName, - elementType, - nameParts, -) { - if (elementType.type === 'ObjectTypeAnnotation') { - generateStruct( - structs, - componentName, - nameParts.concat([name]), - nullthrows(elementType.properties), - ); - } else if (elementType.type === 'StringEnumTypeAnnotation') { - generateEnum(structs, elementType.options, nameParts.concat([name])); - } else if (elementType.type === 'ArrayTypeAnnotation') { - handleGenerateStructForArray( - structs, - name, - componentName, - elementType.elementType, - nameParts, - ); - } -} -function generateStruct(structs, componentName, nameParts, properties) { - const structNameParts = nameParts; - const structName = generateEventStructName(structNameParts); - const fields = properties - .map(property => { - return `${getNativeTypeFromAnnotation( - componentName, - property, - structNameParts, - )} ${property.name};`; - }) - .join('\n' + ' '); - properties.forEach(property => { - const name = property.name, - typeAnnotation = property.typeAnnotation; - switch (typeAnnotation.type) { - case 'BooleanTypeAnnotation': - case 'StringTypeAnnotation': - case 'Int32TypeAnnotation': - case 'DoubleTypeAnnotation': - case 'FloatTypeAnnotation': - case 'MixedTypeAnnotation': - return; - case 'ArrayTypeAnnotation': - handleGenerateStructForArray( - structs, - name, - componentName, - typeAnnotation.elementType, - nameParts, - ); - return; - case 'ObjectTypeAnnotation': - generateStruct( - structs, - componentName, - nameParts.concat([name]), - nullthrows(typeAnnotation.properties), - ); - return; - case 'StringEnumTypeAnnotation': - generateEnum(structs, typeAnnotation.options, nameParts.concat([name])); - return; - default: - typeAnnotation.type; - throw new Error( - `Received invalid event property type ${typeAnnotation.type}`, - ); - } - }); - structs.set( - structName, - StructTemplate({ - structName, - fields, - }), - ); -} -function generateStructs(componentName, component) { - const structs = new Map(); - component.events.forEach(event => { - if (event.typeAnnotation.argument) { - generateStruct( - structs, - componentName, - [event.name], - event.typeAnnotation.argument.properties, - ); - } - }); - return Array.from(structs.values()).join('\n\n'); -} -function generateEvent(componentName, event) { - if (event.typeAnnotation.argument) { - const structName = generateEventStructName([event.name]); - return `void ${event.name}(${structName} value) const;`; - } - return `void ${event.name}() const;`; -} -function generateEvents(componentName, component) { - return component.events - .map(event => generateEvent(componentName, event)) - .join('\n\n' + ' '); -} -module.exports = { - generate( - libraryName, - schema, - packageName, - assumeNonnull = false, - headerPrefix, - ) { - const moduleComponents = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return null; - } - const components = module.components; - // No components in this module - if (components == null) { - return null; - } - return components; - }) - .filter(Boolean) - .reduce((acc, components) => Object.assign(acc, components), {}); - const extraIncludes = new Set(); - const componentEmitters = Object.keys(moduleComponents) - .map(componentName => { - const component = moduleComponents[componentName]; - component.events.forEach(event => { - if (event.typeAnnotation.argument) { - const argIncludes = getImports( - event.typeAnnotation.argument.properties, - ); - // $FlowFixMe[method-unbinding] - argIncludes.forEach(extraIncludes.add, extraIncludes); - } - }); - const replacedTemplate = ComponentTemplate({ - className: componentName, - structs: indent(generateStructs(componentName, component), 2), - events: generateEvents(componentName, component), - }); - return replacedTemplate; - }) - .join('\n'); - const fileName = 'EventEmitters.h'; - const replacedTemplate = FileTemplate({ - componentEmitters, - extraIncludes, - }); - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GenerateEventEmitterH.js.flow b/node_modules/@react-native/codegen/lib/generators/components/GenerateEventEmitterH.js.flow deleted file mode 100644 index 0e753e24d..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GenerateEventEmitterH.js.flow +++ /dev/null @@ -1,367 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type { - ComponentShape, - EventTypeAnnotation, - EventTypeShape, - NamedShape, - SchemaType, -} from '../../CodegenSchema'; - -const {indent, toSafeCppString} = require('../Utils'); -const { - generateEventStructName, - getCppArrayTypeForAnnotation, - getCppTypeForAnnotation, - getImports, -} = require('./CppHelpers'); -const nullthrows = require('nullthrows'); - -// File path -> contents -type FilesOutput = Map; -type StructsMap = Map; - -type ComponentCollection = $ReadOnly<{ - [component: string]: ComponentShape, - ... -}>; - -const FileTemplate = ({ - componentEmitters, - extraIncludes, -}: { - componentEmitters: string, - extraIncludes: Set, -}) => ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateEventEmitterH.js - */ -#pragma once - -#include -${[...extraIncludes].join('\n')} - -namespace facebook::react { -${componentEmitters} -} // namespace facebook::react -`; - -const ComponentTemplate = ({ - className, - structs, - events, -}: { - className: string, - structs: string, - events: string, -}) => - ` -class ${className}EventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - ${structs} - ${events} -}; -`.trim(); - -const StructTemplate = ({ - structName, - fields, -}: { - structName: string, - fields: string, -}) => - ` - struct ${structName} { - ${fields} - }; -`.trim(); - -const EnumTemplate = ({ - enumName, - values, - toCases, -}: { - enumName: string, - values: string, - toCases: string, -}) => - `enum class ${enumName} { - ${values} -}; - -static char const *toString(const ${enumName} value) { - switch (value) { - ${toCases} - } -} -`.trim(); - -function getNativeTypeFromAnnotation( - componentName: string, - eventProperty: NamedShape, - nameParts: $ReadOnlyArray, -): string { - const {type} = eventProperty.typeAnnotation; - - switch (type) { - case 'BooleanTypeAnnotation': - case 'StringTypeAnnotation': - case 'Int32TypeAnnotation': - case 'DoubleTypeAnnotation': - case 'FloatTypeAnnotation': - case 'MixedTypeAnnotation': - return getCppTypeForAnnotation(type); - case 'StringEnumTypeAnnotation': - case 'ObjectTypeAnnotation': - return generateEventStructName([...nameParts, eventProperty.name]); - case 'ArrayTypeAnnotation': - const eventTypeAnnotation = eventProperty.typeAnnotation; - if (eventTypeAnnotation.type !== 'ArrayTypeAnnotation') { - throw new Error( - "Inconsistent Codegen state: type was ArrayTypeAnnotation at the beginning of the body and now it isn't", - ); - } - return getCppArrayTypeForAnnotation(eventTypeAnnotation.elementType, [ - ...nameParts, - eventProperty.name, - ]); - default: - (type: empty); - throw new Error(`Received invalid event property type ${type}`); - } -} -function generateEnum( - structs: StructsMap, - options: $ReadOnlyArray, - nameParts: Array, -) { - const structName = generateEventStructName(nameParts); - const fields = options - .map((option, index) => `${toSafeCppString(option)}`) - .join(',\n '); - - const toCases = options - .map( - option => - `case ${structName}::${toSafeCppString(option)}: return "${option}";`, - ) - .join('\n' + ' '); - - structs.set( - structName, - EnumTemplate({ - enumName: structName, - values: fields, - toCases: toCases, - }), - ); -} - -function handleGenerateStructForArray( - structs: StructsMap, - name: string, - componentName: string, - elementType: EventTypeAnnotation, - nameParts: $ReadOnlyArray, -): void { - if (elementType.type === 'ObjectTypeAnnotation') { - generateStruct( - structs, - componentName, - nameParts.concat([name]), - nullthrows(elementType.properties), - ); - } else if (elementType.type === 'StringEnumTypeAnnotation') { - generateEnum(structs, elementType.options, nameParts.concat([name])); - } else if (elementType.type === 'ArrayTypeAnnotation') { - handleGenerateStructForArray( - structs, - name, - componentName, - elementType.elementType, - nameParts, - ); - } -} - -function generateStruct( - structs: StructsMap, - componentName: string, - nameParts: $ReadOnlyArray, - properties: $ReadOnlyArray>, -): void { - const structNameParts = nameParts; - const structName = generateEventStructName(structNameParts); - - const fields = properties - .map(property => { - return `${getNativeTypeFromAnnotation( - componentName, - property, - structNameParts, - )} ${property.name};`; - }) - .join('\n' + ' '); - - properties.forEach(property => { - const {name, typeAnnotation} = property; - switch (typeAnnotation.type) { - case 'BooleanTypeAnnotation': - case 'StringTypeAnnotation': - case 'Int32TypeAnnotation': - case 'DoubleTypeAnnotation': - case 'FloatTypeAnnotation': - case 'MixedTypeAnnotation': - return; - case 'ArrayTypeAnnotation': - handleGenerateStructForArray( - structs, - name, - componentName, - typeAnnotation.elementType, - nameParts, - ); - return; - case 'ObjectTypeAnnotation': - generateStruct( - structs, - componentName, - nameParts.concat([name]), - nullthrows(typeAnnotation.properties), - ); - return; - case 'StringEnumTypeAnnotation': - generateEnum(structs, typeAnnotation.options, nameParts.concat([name])); - return; - default: - (typeAnnotation.type: empty); - throw new Error( - `Received invalid event property type ${typeAnnotation.type}`, - ); - } - }); - - structs.set( - structName, - StructTemplate({ - structName, - fields, - }), - ); -} - -function generateStructs( - componentName: string, - component: ComponentShape, -): string { - const structs: StructsMap = new Map(); - - component.events.forEach(event => { - if (event.typeAnnotation.argument) { - generateStruct( - structs, - componentName, - [event.name], - event.typeAnnotation.argument.properties, - ); - } - }); - - return Array.from(structs.values()).join('\n\n'); -} - -function generateEvent(componentName: string, event: EventTypeShape): string { - if (event.typeAnnotation.argument) { - const structName = generateEventStructName([event.name]); - - return `void ${event.name}(${structName} value) const;`; - } - - return `void ${event.name}() const;`; -} -function generateEvents( - componentName: string, - component: ComponentShape, -): string { - return component.events - .map(event => generateEvent(componentName, event)) - .join('\n\n' + ' '); -} - -module.exports = { - generate( - libraryName: string, - schema: SchemaType, - packageName?: string, - assumeNonnull: boolean = false, - headerPrefix?: string, - ): FilesOutput { - const moduleComponents: ComponentCollection = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return null; - } - - const {components} = module; - // No components in this module - if (components == null) { - return null; - } - - return components; - }) - .filter(Boolean) - .reduce((acc, components) => Object.assign(acc, components), {}); - - const extraIncludes = new Set(); - const componentEmitters = Object.keys(moduleComponents) - .map(componentName => { - const component = moduleComponents[componentName]; - - component.events.forEach(event => { - if (event.typeAnnotation.argument) { - const argIncludes = getImports( - event.typeAnnotation.argument.properties, - ); - // $FlowFixMe[method-unbinding] - argIncludes.forEach(extraIncludes.add, extraIncludes); - } - }); - - const replacedTemplate = ComponentTemplate({ - className: componentName, - structs: indent(generateStructs(componentName, component), 2), - events: generateEvents(componentName, component), - }); - - return replacedTemplate; - }) - .join('\n'); - - const fileName = 'EventEmitters.h'; - const replacedTemplate = FileTemplate({ - componentEmitters, - extraIncludes, - }); - - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsCpp.js b/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsCpp.js deleted file mode 100644 index 9f54d7bae..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsCpp.js +++ /dev/null @@ -1,135 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('./CppHelpers'), - IncludeTemplate = _require.IncludeTemplate, - convertDefaultTypeToString = _require.convertDefaultTypeToString, - getImports = _require.getImports; - -// File path -> contents - -const FileTemplate = ({imports, componentClasses, headerPrefix}) => ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GeneratePropsCpp.js - */ - -${IncludeTemplate({ - headerPrefix, - file: 'Props.h', -})} -${imports} - -namespace facebook::react { - -${componentClasses} - -} // namespace facebook::react -`; -const ComponentTemplate = ({className, extendClasses, props}) => - ` -${className}::${className}( - const PropsParserContext &context, - const ${className} &sourceProps, - const RawProps &rawProps):${extendClasses} - - ${props} - {} -`.trim(); -function generatePropsString(componentName, component) { - return component.props - .map(prop => { - const defaultValue = convertDefaultTypeToString(componentName, prop); - return `${prop.name}(convertRawProp(context, rawProps, "${prop.name}", sourceProps.${prop.name}, {${defaultValue}}))`; - }) - .join(',\n' + ' '); -} -function getClassExtendString(component) { - const extendString = - ' ' + - component.extendsProps - .map(extendProps => { - switch (extendProps.type) { - case 'ReactNativeBuiltInType': - switch (extendProps.knownTypeName) { - case 'ReactNativeCoreViewProps': - return 'ViewProps(context, sourceProps, rawProps)'; - default: - extendProps.knownTypeName; - throw new Error('Invalid knownTypeName'); - } - default: - extendProps.type; - throw new Error('Invalid extended type'); - } - }) - .join(', ') + - `${component.props.length > 0 ? ',' : ''}`; - return extendString; -} -module.exports = { - generate( - libraryName, - schema, - packageName, - assumeNonnull = false, - headerPrefix, - ) { - const fileName = 'Props.cpp'; - const allImports = new Set([ - '#include ', - '#include ', - ]); - const componentProps = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - const components = module.components; - // No components in this module - if (components == null) { - return null; - } - return Object.keys(components) - .map(componentName => { - const component = components[componentName]; - const newName = `${componentName}Props`; - const propsString = generatePropsString(componentName, component); - const extendString = getClassExtendString(component); - const imports = getImports(component.props); - // $FlowFixMe[method-unbinding] added when improving typing for this parameters - imports.forEach(allImports.add, allImports); - const replacedTemplate = ComponentTemplate({ - className: newName, - extendClasses: extendString, - props: propsString, - }); - return replacedTemplate; - }) - .join('\n'); - }) - .filter(Boolean) - .join('\n'); - const replacedTemplate = FileTemplate({ - componentClasses: componentProps, - imports: Array.from(allImports).sort().join('\n').trim(), - headerPrefix: - headerPrefix !== null && headerPrefix !== void 0 ? headerPrefix : '', - }); - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsCpp.js.flow b/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsCpp.js.flow deleted file mode 100644 index d925abce9..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsCpp.js.flow +++ /dev/null @@ -1,165 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type {ComponentShape, SchemaType} from '../../CodegenSchema'; - -const { - IncludeTemplate, - convertDefaultTypeToString, - getImports, -} = require('./CppHelpers'); - -// File path -> contents -type FilesOutput = Map; - -const FileTemplate = ({ - imports, - componentClasses, - headerPrefix, -}: { - imports: string, - componentClasses: string, - headerPrefix: string, -}) => ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GeneratePropsCpp.js - */ - -${IncludeTemplate({headerPrefix, file: 'Props.h'})} -${imports} - -namespace facebook::react { - -${componentClasses} - -} // namespace facebook::react -`; - -const ComponentTemplate = ({ - className, - extendClasses, - props, -}: { - className: string, - extendClasses: string, - props: string, -}) => - ` -${className}::${className}( - const PropsParserContext &context, - const ${className} &sourceProps, - const RawProps &rawProps):${extendClasses} - - ${props} - {} -`.trim(); - -function generatePropsString(componentName: string, component: ComponentShape) { - return component.props - .map(prop => { - const defaultValue = convertDefaultTypeToString(componentName, prop); - return `${prop.name}(convertRawProp(context, rawProps, "${prop.name}", sourceProps.${prop.name}, {${defaultValue}}))`; - }) - .join(',\n' + ' '); -} - -function getClassExtendString(component: ComponentShape): string { - const extendString = - ' ' + - component.extendsProps - .map(extendProps => { - switch (extendProps.type) { - case 'ReactNativeBuiltInType': - switch (extendProps.knownTypeName) { - case 'ReactNativeCoreViewProps': - return 'ViewProps(context, sourceProps, rawProps)'; - default: - (extendProps.knownTypeName: empty); - throw new Error('Invalid knownTypeName'); - } - default: - (extendProps.type: empty); - throw new Error('Invalid extended type'); - } - }) - .join(', ') + - `${component.props.length > 0 ? ',' : ''}`; - - return extendString; -} - -module.exports = { - generate( - libraryName: string, - schema: SchemaType, - packageName?: string, - assumeNonnull: boolean = false, - headerPrefix?: string, - ): FilesOutput { - const fileName = 'Props.cpp'; - const allImports: Set = new Set([ - '#include ', - '#include ', - ]); - - const componentProps = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - - const {components} = module; - // No components in this module - if (components == null) { - return null; - } - - return Object.keys(components) - .map(componentName => { - const component = components[componentName]; - const newName = `${componentName}Props`; - - const propsString = generatePropsString(componentName, component); - const extendString = getClassExtendString(component); - - const imports = getImports(component.props); - // $FlowFixMe[method-unbinding] added when improving typing for this parameters - imports.forEach(allImports.add, allImports); - - const replacedTemplate = ComponentTemplate({ - className: newName, - extendClasses: extendString, - props: propsString, - }); - - return replacedTemplate; - }) - .join('\n'); - }) - .filter(Boolean) - .join('\n'); - - const replacedTemplate = FileTemplate({ - componentClasses: componentProps, - imports: Array.from(allImports).sort().join('\n').trim(), - headerPrefix: headerPrefix ?? '', - }); - - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsH.js b/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsH.js deleted file mode 100644 index 26bd0f5e0..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsH.js +++ /dev/null @@ -1,617 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('../Utils'), - getEnumName = _require.getEnumName, - toSafeCppString = _require.toSafeCppString; -const _require2 = require('./ComponentsGeneratorUtils.js'), - getLocalImports = _require2.getLocalImports, - getNativeTypeFromAnnotation = _require2.getNativeTypeFromAnnotation; -const _require3 = require('./CppHelpers.js'), - generateStructName = _require3.generateStructName, - getDefaultInitializerString = _require3.getDefaultInitializerString, - getEnumMaskName = _require3.getEnumMaskName, - toIntEnumValueName = _require3.toIntEnumValueName; - -// File path -> contents - -const FileTemplate = ({imports, componentClasses}) => ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GeneratePropsH.js - */ -#pragma once - -${imports} - -namespace facebook::react { - -${componentClasses} - -} // namespace facebook::react -`; -const ClassTemplate = ({enums, structs, className, props, extendClasses}) => - ` -${enums} -${structs} -class ${className} final${extendClasses} { - public: - ${className}() = default; - ${className}(const PropsParserContext& context, const ${className} &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - ${props} -}; -`.trim(); -const EnumTemplate = ({enumName, values, fromCases, toCases}) => - ` -enum class ${enumName} { ${values} }; - -static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ${enumName} &result) { - auto string = (std::string)value; - ${fromCases} - abort(); -} - -static inline std::string toString(const ${enumName} &value) { - switch (value) { - ${toCases} - } -} -`.trim(); -const IntEnumTemplate = ({enumName, values, fromCases, toCases}) => - ` -enum class ${enumName} { ${values} }; - -static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ${enumName} &result) { - assert(value.hasType()); - auto integerValue = (int)value; - switch (integerValue) {${fromCases} - } - abort(); -} - -static inline std::string toString(const ${enumName} &value) { - switch (value) { - ${toCases} - } -} -`.trim(); -const StructTemplate = ({structName, fields, fromCases}) => - `struct ${structName} { - ${fields} -}; - -static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ${structName} &result) { - auto map = (std::unordered_map)value; - - ${fromCases} -} - -static inline std::string toString(const ${structName} &value) { - return "[Object ${structName}]"; -} -`.trim(); -const ArrayConversionFunctionTemplate = ({ - structName, -}) => `static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<${structName}> &result) { - auto items = (std::vector)value; - for (const auto &item : items) { - ${structName} newItem; - fromRawValue(context, item, newItem); - result.emplace_back(newItem); - } -} -`; -const DoubleArrayConversionFunctionTemplate = ({ - structName, -}) => `static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector> &result) { - auto items = (std::vector>)value; - for (const std::vector &item : items) { - auto nestedArray = std::vector<${structName}>{}; - for (const RawValue &nestedItem : item) { - ${structName} newItem; - fromRawValue(context, nestedItem, newItem); - nestedArray.emplace_back(newItem); - } - result.emplace_back(nestedArray); - } -} -`; -const ArrayEnumTemplate = ({enumName, enumMask, values, fromCases, toCases}) => - ` -using ${enumMask} = uint32_t; - -enum class ${enumName}: ${enumMask} { - ${values} -}; - -constexpr bool operator&( - ${enumMask} const lhs, - enum ${enumName} const rhs) { - return lhs & static_cast<${enumMask}>(rhs); -} - -constexpr ${enumMask} operator|( - ${enumMask} const lhs, - enum ${enumName} const rhs) { - return lhs | static_cast<${enumMask}>(rhs); -} - -constexpr void operator|=( - ${enumMask} &lhs, - enum ${enumName} const rhs) { - lhs = lhs | static_cast<${enumMask}>(rhs); -} - -static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ${enumMask} &result) { - auto items = std::vector{value}; - for (const auto &item : items) { - ${fromCases} - abort(); - } -} - -static inline std::string toString(const ${enumMask} &value) { - auto result = std::string{}; - auto separator = std::string{", "}; - - ${toCases} - if (!result.empty()) { - result.erase(result.length() - separator.length()); - } - return result; -} -`.trim(); -function getClassExtendString(component) { - if (component.extendsProps.length === 0) { - throw new Error('Invalid: component.extendsProps is empty'); - } - const extendString = - ' : ' + - component.extendsProps - .map(extendProps => { - switch (extendProps.type) { - case 'ReactNativeBuiltInType': - switch (extendProps.knownTypeName) { - case 'ReactNativeCoreViewProps': - return 'public ViewProps'; - default: - extendProps.knownTypeName; - throw new Error('Invalid knownTypeName'); - } - default: - extendProps.type; - throw new Error('Invalid extended type'); - } - }) - .join(' '); - return extendString; -} -function convertValueToEnumOption(value) { - return toSafeCppString(value); -} -function generateArrayEnumString(componentName, name, options) { - const enumName = getEnumName(componentName, name); - const values = options - .map((option, index) => `${toSafeCppString(option)} = 1 << ${index}`) - .join(',\n '); - const fromCases = options - .map( - option => `if (item == "${option}") { - result |= ${enumName}::${toSafeCppString(option)}; - continue; - }`, - ) - .join('\n '); - const toCases = options - .map( - option => `if (value & ${enumName}::${toSafeCppString(option)}) { - result += "${option}" + separator; - }`, - ) - .join('\n' + ' '); - return ArrayEnumTemplate({ - enumName, - enumMask: getEnumMaskName(enumName), - values, - fromCases, - toCases, - }); -} -function generateStringEnum(componentName, prop) { - const typeAnnotation = prop.typeAnnotation; - if (typeAnnotation.type === 'StringEnumTypeAnnotation') { - const values = typeAnnotation.options; - const enumName = getEnumName(componentName, prop.name); - const fromCases = values - .map( - value => - `if (string == "${value}") { result = ${enumName}::${convertValueToEnumOption( - value, - )}; return; }`, - ) - .join('\n' + ' '); - const toCases = values - .map( - value => - `case ${enumName}::${convertValueToEnumOption( - value, - )}: return "${value}";`, - ) - .join('\n' + ' '); - return EnumTemplate({ - enumName, - values: values.map(toSafeCppString).join(', '), - fromCases: fromCases, - toCases: toCases, - }); - } - return ''; -} -function generateIntEnum(componentName, prop) { - const typeAnnotation = prop.typeAnnotation; - if (typeAnnotation.type === 'Int32EnumTypeAnnotation') { - const values = typeAnnotation.options; - const enumName = getEnumName(componentName, prop.name); - const fromCases = values - .map( - value => ` - case ${value}: - result = ${enumName}::${toIntEnumValueName(prop.name, value)}; - return;`, - ) - .join(''); - const toCases = values - .map( - value => - `case ${enumName}::${toIntEnumValueName( - prop.name, - value, - )}: return "${value}";`, - ) - .join('\n' + ' '); - const valueVariables = values - .map(val => `${toIntEnumValueName(prop.name, val)} = ${val}`) - .join(', '); - return IntEnumTemplate({ - enumName, - values: valueVariables, - fromCases, - toCases, - }); - } - return ''; -} -function generateEnumString(componentName, component) { - return component.props - .map(prop => { - if ( - prop.typeAnnotation.type === 'ArrayTypeAnnotation' && - prop.typeAnnotation.elementType.type === 'StringEnumTypeAnnotation' - ) { - return generateArrayEnumString( - componentName, - prop.name, - prop.typeAnnotation.elementType.options, - ); - } - if (prop.typeAnnotation.type === 'StringEnumTypeAnnotation') { - return generateStringEnum(componentName, prop); - } - if (prop.typeAnnotation.type === 'Int32EnumTypeAnnotation') { - return generateIntEnum(componentName, prop); - } - if (prop.typeAnnotation.type === 'ObjectTypeAnnotation') { - return prop.typeAnnotation.properties - .map(property => { - if (property.typeAnnotation.type === 'StringEnumTypeAnnotation') { - return generateStringEnum(componentName, property); - } else if ( - property.typeAnnotation.type === 'Int32EnumTypeAnnotation' - ) { - return generateIntEnum(componentName, property); - } - return null; - }) - .filter(Boolean) - .join('\n'); - } - }) - .filter(Boolean) - .join('\n'); -} -function generatePropsString(componentName, props, nameParts) { - return props - .map(prop => { - const nativeType = getNativeTypeFromAnnotation( - componentName, - prop, - nameParts, - ); - const defaultInitializer = getDefaultInitializerString( - componentName, - prop, - ); - return `${nativeType} ${prop.name}${defaultInitializer};`; - }) - .join('\n' + ' '); -} -function getExtendsImports(extendsProps) { - const imports = new Set(); - imports.add('#include '); - extendsProps.forEach(extendProps => { - switch (extendProps.type) { - case 'ReactNativeBuiltInType': - switch (extendProps.knownTypeName) { - case 'ReactNativeCoreViewProps': - imports.add( - '#include ', - ); - return; - default: - extendProps.knownTypeName; - throw new Error('Invalid knownTypeName'); - } - default: - extendProps.type; - throw new Error('Invalid extended type'); - } - }); - return imports; -} -function generateStructsForComponent(componentName, component) { - const structs = generateStructs(componentName, component.props, []); - const structArray = Array.from(structs.values()); - if (structArray.length < 1) { - return ''; - } - return structArray.join('\n\n'); -} -function generateStructs(componentName, properties, nameParts) { - const structs = new Map(); - properties.forEach(prop => { - const typeAnnotation = prop.typeAnnotation; - if (typeAnnotation.type === 'ObjectTypeAnnotation') { - // Recursively visit all of the object properties. - // Note: this is depth first so that the nested structs are ordered first. - const elementProperties = typeAnnotation.properties; - const nestedStructs = generateStructs( - componentName, - elementProperties, - nameParts.concat([prop.name]), - ); - nestedStructs.forEach(function (value, key) { - structs.set(key, value); - }); - generateStruct( - structs, - componentName, - nameParts.concat([prop.name]), - typeAnnotation.properties, - ); - } - if ( - prop.typeAnnotation.type === 'ArrayTypeAnnotation' && - prop.typeAnnotation.elementType.type === 'ObjectTypeAnnotation' - ) { - // Recursively visit all of the object properties. - // Note: this is depth first so that the nested structs are ordered first. - const elementProperties = prop.typeAnnotation.elementType.properties; - const nestedStructs = generateStructs( - componentName, - elementProperties, - nameParts.concat([prop.name]), - ); - nestedStructs.forEach(function (value, key) { - structs.set(key, value); - }); - - // Generate this struct and its conversion function. - generateStruct( - structs, - componentName, - nameParts.concat([prop.name]), - elementProperties, - ); - - // Generate the conversion function for std:vector. - // Note: This needs to be at the end since it references the struct above. - structs.set( - `${[componentName, ...nameParts.concat([prop.name])].join( - '', - )}ArrayStruct`, - ArrayConversionFunctionTemplate({ - structName: generateStructName( - componentName, - nameParts.concat([prop.name]), - ), - }), - ); - } - if ( - prop.typeAnnotation.type === 'ArrayTypeAnnotation' && - prop.typeAnnotation.elementType.type === 'ArrayTypeAnnotation' && - prop.typeAnnotation.elementType.elementType.type === - 'ObjectTypeAnnotation' - ) { - // Recursively visit all of the object properties. - // Note: this is depth first so that the nested structs are ordered first. - const elementProperties = - prop.typeAnnotation.elementType.elementType.properties; - const nestedStructs = generateStructs( - componentName, - elementProperties, - nameParts.concat([prop.name]), - ); - nestedStructs.forEach(function (value, key) { - structs.set(key, value); - }); - - // Generate this struct and its conversion function. - generateStruct( - structs, - componentName, - nameParts.concat([prop.name]), - elementProperties, - ); - - // Generate the conversion function for std:vector. - // Note: This needs to be at the end since it references the struct above. - structs.set( - `${[componentName, ...nameParts.concat([prop.name])].join( - '', - )}ArrayArrayStruct`, - DoubleArrayConversionFunctionTemplate({ - structName: generateStructName( - componentName, - nameParts.concat([prop.name]), - ), - }), - ); - } - }); - return structs; -} -function generateStruct(structs, componentName, nameParts, properties) { - const structNameParts = nameParts; - const structName = generateStructName(componentName, structNameParts); - const fields = generatePropsString( - componentName, - properties, - structNameParts, - ); - properties.forEach(property => { - const name = property.name; - switch (property.typeAnnotation.type) { - case 'BooleanTypeAnnotation': - return; - case 'StringTypeAnnotation': - return; - case 'Int32TypeAnnotation': - return; - case 'DoubleTypeAnnotation': - return; - case 'FloatTypeAnnotation': - return; - case 'ReservedPropTypeAnnotation': - return; - case 'ArrayTypeAnnotation': - return; - case 'StringEnumTypeAnnotation': - return; - case 'Int32EnumTypeAnnotation': - return; - case 'ObjectTypeAnnotation': - const props = property.typeAnnotation.properties; - if (props == null) { - throw new Error( - `Properties are expected for ObjectTypeAnnotation (see ${name} in ${componentName})`, - ); - } - generateStruct(structs, componentName, nameParts.concat([name]), props); - return; - case 'MixedTypeAnnotation': - return; - default: - property.typeAnnotation.type; - throw new Error( - `Received invalid component property type ${property.typeAnnotation.type}`, - ); - } - }); - const fromCases = properties - .map(property => { - const variable = 'tmp_' + property.name; - return `auto ${variable} = map.find("${property.name}"); - if (${variable} != map.end()) { - fromRawValue(context, ${variable}->second, result.${property.name}); - }`; - }) - .join('\n '); - structs.set( - structName, - StructTemplate({ - structName, - fields, - fromCases, - }), - ); -} -module.exports = { - generate( - libraryName, - schema, - packageName, - assumeNonnull = false, - headerPrefix, - ) { - const fileName = 'Props.h'; - const allImports = new Set(); - const componentClasses = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - const components = module.components; - // No components in this module - if (components == null) { - return null; - } - return Object.keys(components) - .map(componentName => { - const component = components[componentName]; - const newName = `${componentName}Props`; - const structString = generateStructsForComponent( - componentName, - component, - ); - const enumString = generateEnumString(componentName, component); - const propsString = generatePropsString( - componentName, - component.props, - [], - ); - const extendString = getClassExtendString(component); - const extendsImports = getExtendsImports(component.extendsProps); - const imports = getLocalImports(component.props); - - // $FlowFixMe[method-unbinding] added when improving typing for this parameters - extendsImports.forEach(allImports.add, allImports); - // $FlowFixMe[method-unbinding] added when improving typing for this parameters - imports.forEach(allImports.add, allImports); - const replacedTemplate = ClassTemplate({ - enums: enumString, - structs: structString, - className: newName, - extendClasses: extendString, - props: propsString, - }); - return replacedTemplate; - }) - .join('\n\n'); - }) - .filter(Boolean) - .join('\n\n'); - const replacedTemplate = FileTemplate({ - componentClasses, - imports: Array.from(allImports).sort().join('\n'), - }); - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsH.js.flow b/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsH.js.flow deleted file mode 100644 index e8af50435..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsH.js.flow +++ /dev/null @@ -1,777 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; -import type {ComponentShape} from '../../CodegenSchema'; -import type { - ExtendsPropsShape, - NamedShape, - PropTypeAnnotation, - SchemaType, -} from '../../CodegenSchema'; - -const {getEnumName, toSafeCppString} = require('../Utils'); -const { - getLocalImports, - getNativeTypeFromAnnotation, -} = require('./ComponentsGeneratorUtils.js'); -const { - generateStructName, - getDefaultInitializerString, - getEnumMaskName, - toIntEnumValueName, -} = require('./CppHelpers.js'); - -// File path -> contents -type FilesOutput = Map; -type StructsMap = Map; - -const FileTemplate = ({ - imports, - componentClasses, -}: { - imports: string, - componentClasses: string, -}) => ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GeneratePropsH.js - */ -#pragma once - -${imports} - -namespace facebook::react { - -${componentClasses} - -} // namespace facebook::react -`; - -const ClassTemplate = ({ - enums, - structs, - className, - props, - extendClasses, -}: { - enums: string, - structs: string, - className: string, - props: string, - extendClasses: string, -}) => - ` -${enums} -${structs} -class ${className} final${extendClasses} { - public: - ${className}() = default; - ${className}(const PropsParserContext& context, const ${className} &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - ${props} -}; -`.trim(); - -const EnumTemplate = ({ - enumName, - values, - fromCases, - toCases, -}: { - enumName: string, - values: string, - fromCases: string, - toCases: string, -}) => - ` -enum class ${enumName} { ${values} }; - -static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ${enumName} &result) { - auto string = (std::string)value; - ${fromCases} - abort(); -} - -static inline std::string toString(const ${enumName} &value) { - switch (value) { - ${toCases} - } -} -`.trim(); - -const IntEnumTemplate = ({ - enumName, - values, - fromCases, - toCases, -}: { - enumName: string, - values: string, - fromCases: string, - toCases: string, -}) => - ` -enum class ${enumName} { ${values} }; - -static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ${enumName} &result) { - assert(value.hasType()); - auto integerValue = (int)value; - switch (integerValue) {${fromCases} - } - abort(); -} - -static inline std::string toString(const ${enumName} &value) { - switch (value) { - ${toCases} - } -} -`.trim(); - -const StructTemplate = ({ - structName, - fields, - fromCases, -}: { - structName: string, - fields: string, - fromCases: string, -}) => - `struct ${structName} { - ${fields} -}; - -static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ${structName} &result) { - auto map = (std::unordered_map)value; - - ${fromCases} -} - -static inline std::string toString(const ${structName} &value) { - return "[Object ${structName}]"; -} -`.trim(); - -const ArrayConversionFunctionTemplate = ({ - structName, -}: { - structName: string, -}) => `static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<${structName}> &result) { - auto items = (std::vector)value; - for (const auto &item : items) { - ${structName} newItem; - fromRawValue(context, item, newItem); - result.emplace_back(newItem); - } -} -`; - -const DoubleArrayConversionFunctionTemplate = ({ - structName, -}: { - structName: string, -}) => `static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector> &result) { - auto items = (std::vector>)value; - for (const std::vector &item : items) { - auto nestedArray = std::vector<${structName}>{}; - for (const RawValue &nestedItem : item) { - ${structName} newItem; - fromRawValue(context, nestedItem, newItem); - nestedArray.emplace_back(newItem); - } - result.emplace_back(nestedArray); - } -} -`; - -const ArrayEnumTemplate = ({ - enumName, - enumMask, - values, - fromCases, - toCases, -}: { - enumName: string, - enumMask: string, - values: string, - fromCases: string, - toCases: string, -}) => - ` -using ${enumMask} = uint32_t; - -enum class ${enumName}: ${enumMask} { - ${values} -}; - -constexpr bool operator&( - ${enumMask} const lhs, - enum ${enumName} const rhs) { - return lhs & static_cast<${enumMask}>(rhs); -} - -constexpr ${enumMask} operator|( - ${enumMask} const lhs, - enum ${enumName} const rhs) { - return lhs | static_cast<${enumMask}>(rhs); -} - -constexpr void operator|=( - ${enumMask} &lhs, - enum ${enumName} const rhs) { - lhs = lhs | static_cast<${enumMask}>(rhs); -} - -static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ${enumMask} &result) { - auto items = std::vector{value}; - for (const auto &item : items) { - ${fromCases} - abort(); - } -} - -static inline std::string toString(const ${enumMask} &value) { - auto result = std::string{}; - auto separator = std::string{", "}; - - ${toCases} - if (!result.empty()) { - result.erase(result.length() - separator.length()); - } - return result; -} -`.trim(); - -function getClassExtendString(component: ComponentShape): string { - if (component.extendsProps.length === 0) { - throw new Error('Invalid: component.extendsProps is empty'); - } - const extendString = - ' : ' + - component.extendsProps - .map(extendProps => { - switch (extendProps.type) { - case 'ReactNativeBuiltInType': - switch (extendProps.knownTypeName) { - case 'ReactNativeCoreViewProps': - return 'public ViewProps'; - default: - (extendProps.knownTypeName: empty); - throw new Error('Invalid knownTypeName'); - } - default: - (extendProps.type: empty); - throw new Error('Invalid extended type'); - } - }) - .join(' '); - - return extendString; -} - -function convertValueToEnumOption(value: string): string { - return toSafeCppString(value); -} - -function generateArrayEnumString( - componentName: string, - name: string, - options: $ReadOnlyArray, -): string { - const enumName = getEnumName(componentName, name); - - const values = options - .map((option, index) => `${toSafeCppString(option)} = 1 << ${index}`) - .join(',\n '); - - const fromCases = options - .map( - option => - `if (item == "${option}") { - result |= ${enumName}::${toSafeCppString(option)}; - continue; - }`, - ) - .join('\n '); - - const toCases = options - .map( - option => - `if (value & ${enumName}::${toSafeCppString(option)}) { - result += "${option}" + separator; - }`, - ) - .join('\n' + ' '); - - return ArrayEnumTemplate({ - enumName, - enumMask: getEnumMaskName(enumName), - values, - fromCases, - toCases, - }); -} - -function generateStringEnum( - componentName: string, - prop: NamedShape, -) { - const typeAnnotation = prop.typeAnnotation; - if (typeAnnotation.type === 'StringEnumTypeAnnotation') { - const values: $ReadOnlyArray = typeAnnotation.options; - const enumName = getEnumName(componentName, prop.name); - - const fromCases = values - .map( - value => - `if (string == "${value}") { result = ${enumName}::${convertValueToEnumOption( - value, - )}; return; }`, - ) - .join('\n' + ' '); - - const toCases = values - .map( - value => - `case ${enumName}::${convertValueToEnumOption( - value, - )}: return "${value}";`, - ) - .join('\n' + ' '); - - return EnumTemplate({ - enumName, - values: values.map(toSafeCppString).join(', '), - fromCases: fromCases, - toCases: toCases, - }); - } - - return ''; -} - -function generateIntEnum( - componentName: string, - prop: NamedShape, -) { - const typeAnnotation = prop.typeAnnotation; - if (typeAnnotation.type === 'Int32EnumTypeAnnotation') { - const values: $ReadOnlyArray = typeAnnotation.options; - const enumName = getEnumName(componentName, prop.name); - - const fromCases = values - .map( - value => - ` - case ${value}: - result = ${enumName}::${toIntEnumValueName(prop.name, value)}; - return;`, - ) - .join(''); - - const toCases = values - .map( - value => - `case ${enumName}::${toIntEnumValueName( - prop.name, - value, - )}: return "${value}";`, - ) - .join('\n' + ' '); - - const valueVariables = values - .map(val => `${toIntEnumValueName(prop.name, val)} = ${val}`) - .join(', '); - - return IntEnumTemplate({ - enumName, - values: valueVariables, - fromCases, - toCases, - }); - } - - return ''; -} - -function generateEnumString( - componentName: string, - component: ComponentShape, -): string { - return component.props - .map(prop => { - if ( - prop.typeAnnotation.type === 'ArrayTypeAnnotation' && - prop.typeAnnotation.elementType.type === 'StringEnumTypeAnnotation' - ) { - return generateArrayEnumString( - componentName, - prop.name, - prop.typeAnnotation.elementType.options, - ); - } - - if (prop.typeAnnotation.type === 'StringEnumTypeAnnotation') { - return generateStringEnum(componentName, prop); - } - - if (prop.typeAnnotation.type === 'Int32EnumTypeAnnotation') { - return generateIntEnum(componentName, prop); - } - - if (prop.typeAnnotation.type === 'ObjectTypeAnnotation') { - return prop.typeAnnotation.properties - .map(property => { - if (property.typeAnnotation.type === 'StringEnumTypeAnnotation') { - return generateStringEnum(componentName, property); - } else if ( - property.typeAnnotation.type === 'Int32EnumTypeAnnotation' - ) { - return generateIntEnum(componentName, property); - } - return null; - }) - .filter(Boolean) - .join('\n'); - } - }) - .filter(Boolean) - .join('\n'); -} - -function generatePropsString( - componentName: string, - props: $ReadOnlyArray>, - nameParts: $ReadOnlyArray, -) { - return props - .map(prop => { - const nativeType = getNativeTypeFromAnnotation( - componentName, - prop, - nameParts, - ); - const defaultInitializer = getDefaultInitializerString( - componentName, - prop, - ); - - return `${nativeType} ${prop.name}${defaultInitializer};`; - }) - .join('\n' + ' '); -} - -function getExtendsImports( - extendsProps: $ReadOnlyArray, -): Set { - const imports: Set = new Set(); - - imports.add('#include '); - - extendsProps.forEach(extendProps => { - switch (extendProps.type) { - case 'ReactNativeBuiltInType': - switch (extendProps.knownTypeName) { - case 'ReactNativeCoreViewProps': - imports.add( - '#include ', - ); - return; - default: - (extendProps.knownTypeName: empty); - throw new Error('Invalid knownTypeName'); - } - default: - (extendProps.type: empty); - throw new Error('Invalid extended type'); - } - }); - - return imports; -} - -function generateStructsForComponent( - componentName: string, - component: ComponentShape, -): string { - const structs = generateStructs(componentName, component.props, []); - const structArray = Array.from(structs.values()); - if (structArray.length < 1) { - return ''; - } - return structArray.join('\n\n'); -} - -function generateStructs( - componentName: string, - properties: $ReadOnlyArray>, - nameParts: Array, -): StructsMap { - const structs: StructsMap = new Map(); - properties.forEach(prop => { - const typeAnnotation = prop.typeAnnotation; - if (typeAnnotation.type === 'ObjectTypeAnnotation') { - // Recursively visit all of the object properties. - // Note: this is depth first so that the nested structs are ordered first. - const elementProperties = typeAnnotation.properties; - const nestedStructs = generateStructs( - componentName, - elementProperties, - nameParts.concat([prop.name]), - ); - nestedStructs.forEach(function (value, key) { - structs.set(key, value); - }); - - generateStruct( - structs, - componentName, - nameParts.concat([prop.name]), - typeAnnotation.properties, - ); - } - - if ( - prop.typeAnnotation.type === 'ArrayTypeAnnotation' && - prop.typeAnnotation.elementType.type === 'ObjectTypeAnnotation' - ) { - // Recursively visit all of the object properties. - // Note: this is depth first so that the nested structs are ordered first. - const elementProperties = prop.typeAnnotation.elementType.properties; - const nestedStructs = generateStructs( - componentName, - elementProperties, - nameParts.concat([prop.name]), - ); - nestedStructs.forEach(function (value, key) { - structs.set(key, value); - }); - - // Generate this struct and its conversion function. - generateStruct( - structs, - componentName, - nameParts.concat([prop.name]), - elementProperties, - ); - - // Generate the conversion function for std:vector. - // Note: This needs to be at the end since it references the struct above. - structs.set( - `${[componentName, ...nameParts.concat([prop.name])].join( - '', - )}ArrayStruct`, - ArrayConversionFunctionTemplate({ - structName: generateStructName( - componentName, - nameParts.concat([prop.name]), - ), - }), - ); - } - if ( - prop.typeAnnotation.type === 'ArrayTypeAnnotation' && - prop.typeAnnotation.elementType.type === 'ArrayTypeAnnotation' && - prop.typeAnnotation.elementType.elementType.type === - 'ObjectTypeAnnotation' - ) { - // Recursively visit all of the object properties. - // Note: this is depth first so that the nested structs are ordered first. - const elementProperties = - prop.typeAnnotation.elementType.elementType.properties; - const nestedStructs = generateStructs( - componentName, - elementProperties, - nameParts.concat([prop.name]), - ); - nestedStructs.forEach(function (value, key) { - structs.set(key, value); - }); - - // Generate this struct and its conversion function. - generateStruct( - structs, - componentName, - nameParts.concat([prop.name]), - elementProperties, - ); - - // Generate the conversion function for std:vector. - // Note: This needs to be at the end since it references the struct above. - structs.set( - `${[componentName, ...nameParts.concat([prop.name])].join( - '', - )}ArrayArrayStruct`, - DoubleArrayConversionFunctionTemplate({ - structName: generateStructName( - componentName, - nameParts.concat([prop.name]), - ), - }), - ); - } - }); - - return structs; -} - -function generateStruct( - structs: StructsMap, - componentName: string, - nameParts: $ReadOnlyArray, - properties: $ReadOnlyArray>, -): void { - const structNameParts = nameParts; - const structName = generateStructName(componentName, structNameParts); - const fields = generatePropsString( - componentName, - properties, - structNameParts, - ); - - properties.forEach((property: NamedShape) => { - const name = property.name; - switch (property.typeAnnotation.type) { - case 'BooleanTypeAnnotation': - return; - case 'StringTypeAnnotation': - return; - case 'Int32TypeAnnotation': - return; - case 'DoubleTypeAnnotation': - return; - case 'FloatTypeAnnotation': - return; - case 'ReservedPropTypeAnnotation': - return; - case 'ArrayTypeAnnotation': - return; - case 'StringEnumTypeAnnotation': - return; - case 'Int32EnumTypeAnnotation': - return; - case 'ObjectTypeAnnotation': - const props = property.typeAnnotation.properties; - if (props == null) { - throw new Error( - `Properties are expected for ObjectTypeAnnotation (see ${name} in ${componentName})`, - ); - } - generateStruct(structs, componentName, nameParts.concat([name]), props); - return; - case 'MixedTypeAnnotation': - return; - default: - (property.typeAnnotation.type: empty); - throw new Error( - `Received invalid component property type ${property.typeAnnotation.type}`, - ); - } - }); - - const fromCases = properties - .map(property => { - const variable = 'tmp_' + property.name; - return `auto ${variable} = map.find("${property.name}"); - if (${variable} != map.end()) { - fromRawValue(context, ${variable}->second, result.${property.name}); - }`; - }) - .join('\n '); - - structs.set( - structName, - StructTemplate({ - structName, - fields, - fromCases, - }), - ); -} - -module.exports = { - generate( - libraryName: string, - schema: SchemaType, - packageName?: string, - assumeNonnull: boolean = false, - headerPrefix?: string, - ): FilesOutput { - const fileName = 'Props.h'; - - const allImports: Set = new Set(); - - const componentClasses = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - - const {components} = module; - // No components in this module - if (components == null) { - return null; - } - - return Object.keys(components) - .map(componentName => { - const component = components[componentName]; - - const newName = `${componentName}Props`; - const structString = generateStructsForComponent( - componentName, - component, - ); - const enumString = generateEnumString(componentName, component); - const propsString = generatePropsString( - componentName, - component.props, - [], - ); - const extendString = getClassExtendString(component); - const extendsImports = getExtendsImports(component.extendsProps); - const imports = getLocalImports(component.props); - - // $FlowFixMe[method-unbinding] added when improving typing for this parameters - extendsImports.forEach(allImports.add, allImports); - // $FlowFixMe[method-unbinding] added when improving typing for this parameters - imports.forEach(allImports.add, allImports); - - const replacedTemplate = ClassTemplate({ - enums: enumString, - structs: structString, - className: newName, - extendClasses: extendString, - props: propsString, - }); - - return replacedTemplate; - }) - .join('\n\n'); - }) - .filter(Boolean) - .join('\n\n'); - - const replacedTemplate = FileTemplate({ - componentClasses, - imports: Array.from(allImports).sort().join('\n'), - }); - - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaDelegate.js b/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaDelegate.js deleted file mode 100644 index d4e5b7bb9..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaDelegate.js +++ /dev/null @@ -1,299 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('./JavaHelpers'), - getDelegateJavaClassName = _require.getDelegateJavaClassName, - getImports = _require.getImports, - getInterfaceJavaClassName = _require.getInterfaceJavaClassName, - toSafeJavaString = _require.toSafeJavaString; - -// File path -> contents - -const FileTemplate = ({ - packageName, - imports, - className, - extendClasses, - interfaceClassName, - methods, -}) => `/** -* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). -* -* Do not edit this file as changes may cause incorrect behavior and will be lost -* once the code is regenerated. -* -* ${'@'}generated by codegen project: GeneratePropsJavaDelegate.js -*/ - -package ${packageName}; - -${imports} - -public class ${className} & ${interfaceClassName}> extends BaseViewManagerDelegate { - public ${className}(U viewManager) { - super(viewManager); - } - ${methods} -} -`; -const PropSetterTemplate = ({propCases}) => - ` - @Override - public void setProperty(T view, String propName, @Nullable Object value) { - ${propCases} - } -`.trim(); -const CommandsTemplate = ({commandCases}) => - ` - @Override - public void receiveCommand(T view, String commandName, ReadableArray args) { - switch (commandName) { - ${commandCases} - } - } -`.trim(); -function getJavaValueForProp(prop, componentName) { - const typeAnnotation = prop.typeAnnotation; - switch (typeAnnotation.type) { - case 'BooleanTypeAnnotation': - if (typeAnnotation.default === null) { - return 'value == null ? null : (Boolean) value'; - } else { - return `value == null ? ${typeAnnotation.default.toString()} : (boolean) value`; - } - case 'StringTypeAnnotation': - const defaultValueString = - typeAnnotation.default === null - ? 'null' - : `"${typeAnnotation.default}"`; - return `value == null ? ${defaultValueString} : (String) value`; - case 'Int32TypeAnnotation': - return `value == null ? ${typeAnnotation.default} : ((Double) value).intValue()`; - case 'DoubleTypeAnnotation': - if (prop.optional) { - return `value == null ? ${typeAnnotation.default}f : ((Double) value).doubleValue()`; - } else { - return 'value == null ? Double.NaN : ((Double) value).doubleValue()'; - } - case 'FloatTypeAnnotation': - if (typeAnnotation.default === null) { - return 'value == null ? null : ((Double) value).floatValue()'; - } else if (prop.optional) { - return `value == null ? ${typeAnnotation.default}f : ((Double) value).floatValue()`; - } else { - return 'value == null ? Float.NaN : ((Double) value).floatValue()'; - } - case 'ReservedPropTypeAnnotation': - switch (typeAnnotation.name) { - case 'ColorPrimitive': - return 'ColorPropConverter.getColor(value, view.getContext())'; - case 'ImageSourcePrimitive': - return '(ReadableMap) value'; - case 'ImageRequestPrimitive': - return '(ReadableMap) value'; - case 'PointPrimitive': - return '(ReadableMap) value'; - case 'EdgeInsetsPrimitive': - return '(ReadableMap) value'; - case 'DimensionPrimitive': - return 'DimensionPropConverter.getDimension(value)'; - default: - typeAnnotation.name; - throw new Error('Received unknown ReservedPropTypeAnnotation'); - } - case 'ArrayTypeAnnotation': { - return '(ReadableArray) value'; - } - case 'ObjectTypeAnnotation': { - return '(ReadableMap) value'; - } - case 'StringEnumTypeAnnotation': - return '(String) value'; - case 'Int32EnumTypeAnnotation': - return `value == null ? ${typeAnnotation.default} : ((Double) value).intValue()`; - case 'MixedTypeAnnotation': - return 'new DynamicFromObject(value)'; - default: - typeAnnotation; - throw new Error('Received invalid typeAnnotation'); - } -} -function generatePropCasesString(component, componentName) { - if (component.props.length === 0) { - return 'super.setProperty(view, propName, value);'; - } - const cases = component.props - .map(prop => { - return `case "${prop.name}": - mViewManager.set${toSafeJavaString( - prop.name, - )}(view, ${getJavaValueForProp(prop, componentName)}); - break;`; - }) - .join('\n' + ' '); - return `switch (propName) { - ${cases} - default: - super.setProperty(view, propName, value); - }`; -} -function getCommandArgJavaType(param, index) { - const typeAnnotation = param.typeAnnotation; - switch (typeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (typeAnnotation.name) { - case 'RootTag': - return `args.getDouble(${index})`; - default: - typeAnnotation.name; - throw new Error(`Receieved invalid type: ${typeAnnotation.name}`); - } - case 'BooleanTypeAnnotation': - return `args.getBoolean(${index})`; - case 'DoubleTypeAnnotation': - return `args.getDouble(${index})`; - case 'FloatTypeAnnotation': - return `(float) args.getDouble(${index})`; - case 'Int32TypeAnnotation': - return `args.getInt(${index})`; - case 'StringTypeAnnotation': - return `args.getString(${index})`; - case 'ArrayTypeAnnotation': - return `args.getArray(${index})`; - default: - typeAnnotation.type; - throw new Error(`Receieved invalid type: ${typeAnnotation.type}`); - } -} -function getCommandArguments(command) { - return [ - 'view', - ...command.typeAnnotation.params.map(getCommandArgJavaType), - ].join(', '); -} -function generateCommandCasesString(component, componentName) { - if (component.commands.length === 0) { - return null; - } - const commandMethods = component.commands - .map(command => { - return `case "${command.name}": - mViewManager.${toSafeJavaString( - command.name, - false, - )}(${getCommandArguments(command)}); - break;`; - }) - .join('\n' + ' '); - return commandMethods; -} -function getClassExtendString(component) { - const extendString = component.extendsProps - .map(extendProps => { - switch (extendProps.type) { - case 'ReactNativeBuiltInType': - switch (extendProps.knownTypeName) { - case 'ReactNativeCoreViewProps': - return 'View'; - default: - extendProps.knownTypeName; - throw new Error('Invalid knownTypeName'); - } - default: - extendProps.type; - throw new Error('Invalid extended type'); - } - }) - .join(''); - return extendString; -} -function getDelegateImports(component) { - const imports = getImports(component, 'delegate'); - // The delegate needs ReadableArray for commands always. - // The interface doesn't always need it - if (component.commands.length > 0) { - imports.add('import com.facebook.react.bridge.ReadableArray;'); - } - imports.add('import androidx.annotation.Nullable;'); - imports.add('import com.facebook.react.uimanager.BaseViewManagerDelegate;'); - imports.add('import com.facebook.react.uimanager.BaseViewManagerInterface;'); - return imports; -} -function generateMethods(propsString, commandsString) { - return [ - PropSetterTemplate({ - propCases: propsString, - }), - commandsString != null - ? CommandsTemplate({ - commandCases: commandsString, - }) - : '', - ] - .join('\n\n ') - .trimRight(); -} -module.exports = { - generate( - libraryName, - schema, - packageName, - assumeNonnull = false, - headerPrefix, - ) { - // TODO: This doesn't support custom package name yet. - const normalizedPackageName = 'com.facebook.react.viewmanagers'; - const outputDir = `java/${normalizedPackageName.replace(/\./g, '/')}`; - const files = new Map(); - Object.keys(schema.modules).forEach(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - const components = module.components; - // No components in this module - if (components == null) { - return; - } - return Object.keys(components) - .filter(componentName => { - const component = components[componentName]; - return !( - component.excludedPlatforms && - component.excludedPlatforms.includes('android') - ); - }) - .forEach(componentName => { - const component = components[componentName]; - const className = getDelegateJavaClassName(componentName); - const interfaceClassName = getInterfaceJavaClassName(componentName); - const imports = getDelegateImports(component); - const propsString = generatePropCasesString(component, componentName); - const commandsString = generateCommandCasesString( - component, - componentName, - ); - const extendString = getClassExtendString(component); - const replacedTemplate = FileTemplate({ - imports: Array.from(imports).sort().join('\n'), - packageName: normalizedPackageName, - className, - extendClasses: extendString, - methods: generateMethods(propsString, commandsString), - interfaceClassName: interfaceClassName, - }); - files.set(`${outputDir}/${className}.java`, replacedTemplate); - }); - }); - return files; - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaDelegate.js.flow b/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaDelegate.js.flow deleted file mode 100644 index e45a4df57..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaDelegate.js.flow +++ /dev/null @@ -1,355 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; -import type {CommandParamTypeAnnotation} from '../../CodegenSchema'; -import type { - CommandTypeAnnotation, - ComponentShape, - NamedShape, - PropTypeAnnotation, - SchemaType, -} from '../../CodegenSchema'; - -const { - getDelegateJavaClassName, - getImports, - getInterfaceJavaClassName, - toSafeJavaString, -} = require('./JavaHelpers'); - -// File path -> contents -type FilesOutput = Map; - -const FileTemplate = ({ - packageName, - imports, - className, - extendClasses, - interfaceClassName, - methods, -}: { - packageName: string, - imports: string, - className: string, - extendClasses: string, - interfaceClassName: string, - methods: string, -}) => `/** -* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). -* -* Do not edit this file as changes may cause incorrect behavior and will be lost -* once the code is regenerated. -* -* ${'@'}generated by codegen project: GeneratePropsJavaDelegate.js -*/ - -package ${packageName}; - -${imports} - -public class ${className} & ${interfaceClassName}> extends BaseViewManagerDelegate { - public ${className}(U viewManager) { - super(viewManager); - } - ${methods} -} -`; - -const PropSetterTemplate = ({propCases}: {propCases: string}) => - ` - @Override - public void setProperty(T view, String propName, @Nullable Object value) { - ${propCases} - } -`.trim(); - -const CommandsTemplate = ({commandCases}: {commandCases: string}) => - ` - @Override - public void receiveCommand(T view, String commandName, ReadableArray args) { - switch (commandName) { - ${commandCases} - } - } -`.trim(); - -function getJavaValueForProp( - prop: NamedShape, - componentName: string, -): string { - const typeAnnotation = prop.typeAnnotation; - - switch (typeAnnotation.type) { - case 'BooleanTypeAnnotation': - if (typeAnnotation.default === null) { - return 'value == null ? null : (Boolean) value'; - } else { - return `value == null ? ${typeAnnotation.default.toString()} : (boolean) value`; - } - case 'StringTypeAnnotation': - const defaultValueString = - typeAnnotation.default === null - ? 'null' - : `"${typeAnnotation.default}"`; - return `value == null ? ${defaultValueString} : (String) value`; - case 'Int32TypeAnnotation': - return `value == null ? ${typeAnnotation.default} : ((Double) value).intValue()`; - case 'DoubleTypeAnnotation': - if (prop.optional) { - return `value == null ? ${typeAnnotation.default}f : ((Double) value).doubleValue()`; - } else { - return 'value == null ? Double.NaN : ((Double) value).doubleValue()'; - } - case 'FloatTypeAnnotation': - if (typeAnnotation.default === null) { - return 'value == null ? null : ((Double) value).floatValue()'; - } else if (prop.optional) { - return `value == null ? ${typeAnnotation.default}f : ((Double) value).floatValue()`; - } else { - return 'value == null ? Float.NaN : ((Double) value).floatValue()'; - } - case 'ReservedPropTypeAnnotation': - switch (typeAnnotation.name) { - case 'ColorPrimitive': - return 'ColorPropConverter.getColor(value, view.getContext())'; - case 'ImageSourcePrimitive': - return '(ReadableMap) value'; - case 'ImageRequestPrimitive': - return '(ReadableMap) value'; - case 'PointPrimitive': - return '(ReadableMap) value'; - case 'EdgeInsetsPrimitive': - return '(ReadableMap) value'; - case 'DimensionPrimitive': - return 'DimensionPropConverter.getDimension(value)'; - default: - (typeAnnotation.name: empty); - throw new Error('Received unknown ReservedPropTypeAnnotation'); - } - case 'ArrayTypeAnnotation': { - return '(ReadableArray) value'; - } - case 'ObjectTypeAnnotation': { - return '(ReadableMap) value'; - } - case 'StringEnumTypeAnnotation': - return '(String) value'; - case 'Int32EnumTypeAnnotation': - return `value == null ? ${typeAnnotation.default} : ((Double) value).intValue()`; - case 'MixedTypeAnnotation': - return 'new DynamicFromObject(value)'; - default: - (typeAnnotation: empty); - throw new Error('Received invalid typeAnnotation'); - } -} - -function generatePropCasesString( - component: ComponentShape, - componentName: string, -) { - if (component.props.length === 0) { - return 'super.setProperty(view, propName, value);'; - } - - const cases = component.props - .map(prop => { - return `case "${prop.name}": - mViewManager.set${toSafeJavaString( - prop.name, - )}(view, ${getJavaValueForProp(prop, componentName)}); - break;`; - }) - .join('\n' + ' '); - - return `switch (propName) { - ${cases} - default: - super.setProperty(view, propName, value); - }`; -} - -function getCommandArgJavaType( - param: NamedShape, - index: number, -) { - const {typeAnnotation} = param; - - switch (typeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (typeAnnotation.name) { - case 'RootTag': - return `args.getDouble(${index})`; - default: - (typeAnnotation.name: empty); - throw new Error(`Receieved invalid type: ${typeAnnotation.name}`); - } - case 'BooleanTypeAnnotation': - return `args.getBoolean(${index})`; - case 'DoubleTypeAnnotation': - return `args.getDouble(${index})`; - case 'FloatTypeAnnotation': - return `(float) args.getDouble(${index})`; - case 'Int32TypeAnnotation': - return `args.getInt(${index})`; - case 'StringTypeAnnotation': - return `args.getString(${index})`; - case 'ArrayTypeAnnotation': - return `args.getArray(${index})`; - default: - (typeAnnotation.type: empty); - throw new Error(`Receieved invalid type: ${typeAnnotation.type}`); - } -} - -function getCommandArguments( - command: NamedShape, -): string { - return [ - 'view', - ...command.typeAnnotation.params.map(getCommandArgJavaType), - ].join(', '); -} - -function generateCommandCasesString( - component: ComponentShape, - componentName: string, -) { - if (component.commands.length === 0) { - return null; - } - - const commandMethods = component.commands - .map(command => { - return `case "${command.name}": - mViewManager.${toSafeJavaString( - command.name, - false, - )}(${getCommandArguments(command)}); - break;`; - }) - .join('\n' + ' '); - - return commandMethods; -} - -function getClassExtendString(component: ComponentShape): string { - const extendString = component.extendsProps - .map(extendProps => { - switch (extendProps.type) { - case 'ReactNativeBuiltInType': - switch (extendProps.knownTypeName) { - case 'ReactNativeCoreViewProps': - return 'View'; - default: - (extendProps.knownTypeName: empty); - throw new Error('Invalid knownTypeName'); - } - default: - (extendProps.type: empty); - throw new Error('Invalid extended type'); - } - }) - .join(''); - - return extendString; -} - -function getDelegateImports(component: ComponentShape) { - const imports = getImports(component, 'delegate'); - // The delegate needs ReadableArray for commands always. - // The interface doesn't always need it - if (component.commands.length > 0) { - imports.add('import com.facebook.react.bridge.ReadableArray;'); - } - imports.add('import androidx.annotation.Nullable;'); - imports.add('import com.facebook.react.uimanager.BaseViewManagerDelegate;'); - imports.add('import com.facebook.react.uimanager.BaseViewManagerInterface;'); - - return imports; -} - -function generateMethods( - propsString: string, - commandsString: null | string, -): string { - return [ - PropSetterTemplate({propCases: propsString}), - commandsString != null - ? CommandsTemplate({commandCases: commandsString}) - : '', - ] - .join('\n\n ') - .trimRight(); -} - -module.exports = { - generate( - libraryName: string, - schema: SchemaType, - packageName?: string, - assumeNonnull: boolean = false, - headerPrefix?: string, - ): FilesOutput { - // TODO: This doesn't support custom package name yet. - const normalizedPackageName = 'com.facebook.react.viewmanagers'; - const outputDir = `java/${normalizedPackageName.replace(/\./g, '/')}`; - - const files = new Map(); - Object.keys(schema.modules).forEach(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - - const {components} = module; - // No components in this module - if (components == null) { - return; - } - - return Object.keys(components) - .filter(componentName => { - const component = components[componentName]; - return !( - component.excludedPlatforms && - component.excludedPlatforms.includes('android') - ); - }) - .forEach(componentName => { - const component = components[componentName]; - const className = getDelegateJavaClassName(componentName); - const interfaceClassName = getInterfaceJavaClassName(componentName); - - const imports = getDelegateImports(component); - const propsString = generatePropCasesString(component, componentName); - const commandsString = generateCommandCasesString( - component, - componentName, - ); - const extendString = getClassExtendString(component); - - const replacedTemplate = FileTemplate({ - imports: Array.from(imports).sort().join('\n'), - packageName: normalizedPackageName, - className, - extendClasses: extendString, - methods: generateMethods(propsString, commandsString), - interfaceClassName: interfaceClassName, - }); - - files.set(`${outputDir}/${className}.java`, replacedTemplate); - }); - }); - - return files; - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaInterface.js b/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaInterface.js deleted file mode 100644 index 3779a355a..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaInterface.js +++ /dev/null @@ -1,250 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('./JavaHelpers'), - getImports = _require.getImports, - getInterfaceJavaClassName = _require.getInterfaceJavaClassName, - toSafeJavaString = _require.toSafeJavaString; - -// File path -> contents - -const FileTemplate = ({ - packageName, - imports, - className, - extendClasses, - methods, -}) => `/** -* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). -* -* Do not edit this file as changes may cause incorrect behavior and will be lost -* once the code is regenerated. -* -* ${'@'}generated by codegen project: GeneratePropsJavaInterface.js -*/ - -package ${packageName}; - -${imports} - -public interface ${className} { - ${methods} -} -`; -function addNullable(imports) { - imports.add('import androidx.annotation.Nullable;'); -} -function getJavaValueForProp(prop, imports) { - const typeAnnotation = prop.typeAnnotation; - switch (typeAnnotation.type) { - case 'BooleanTypeAnnotation': - if (typeAnnotation.default === null) { - addNullable(imports); - return '@Nullable Boolean value'; - } else { - return 'boolean value'; - } - case 'StringTypeAnnotation': - addNullable(imports); - return '@Nullable String value'; - case 'Int32TypeAnnotation': - return 'int value'; - case 'DoubleTypeAnnotation': - return 'double value'; - case 'FloatTypeAnnotation': - if (typeAnnotation.default === null) { - addNullable(imports); - return '@Nullable Float value'; - } else { - return 'float value'; - } - case 'ReservedPropTypeAnnotation': - switch (typeAnnotation.name) { - case 'ColorPrimitive': - addNullable(imports); - return '@Nullable Integer value'; - case 'ImageSourcePrimitive': - addNullable(imports); - return '@Nullable ReadableMap value'; - case 'ImageRequestPrimitive': - addNullable(imports); - return '@Nullable ReadableMap value'; - case 'PointPrimitive': - addNullable(imports); - return '@Nullable ReadableMap value'; - case 'EdgeInsetsPrimitive': - addNullable(imports); - return '@Nullable ReadableMap value'; - case 'DimensionPrimitive': - addNullable(imports); - return '@Nullable YogaValue value'; - default: - typeAnnotation.name; - throw new Error('Received unknown ReservedPropTypeAnnotation'); - } - case 'ArrayTypeAnnotation': { - addNullable(imports); - return '@Nullable ReadableArray value'; - } - case 'ObjectTypeAnnotation': { - addNullable(imports); - return '@Nullable ReadableMap value'; - } - case 'StringEnumTypeAnnotation': - addNullable(imports); - return '@Nullable String value'; - case 'Int32EnumTypeAnnotation': - addNullable(imports); - return '@Nullable Integer value'; - case 'MixedTypeAnnotation': - return 'Dynamic value'; - default: - typeAnnotation; - throw new Error('Received invalid typeAnnotation'); - } -} -function generatePropsString(component, imports) { - if (component.props.length === 0) { - return '// No props'; - } - return component.props - .map(prop => { - return `void set${toSafeJavaString( - prop.name, - )}(T view, ${getJavaValueForProp(prop, imports)});`; - }) - .join('\n' + ' '); -} -function getCommandArgJavaType(param) { - const typeAnnotation = param.typeAnnotation; - switch (typeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (typeAnnotation.name) { - case 'RootTag': - return 'double'; - default: - typeAnnotation.name; - throw new Error(`Receieved invalid type: ${typeAnnotation.name}`); - } - case 'BooleanTypeAnnotation': - return 'boolean'; - case 'DoubleTypeAnnotation': - return 'double'; - case 'FloatTypeAnnotation': - return 'float'; - case 'Int32TypeAnnotation': - return 'int'; - case 'StringTypeAnnotation': - return 'String'; - case 'ArrayTypeAnnotation': - return 'ReadableArray'; - default: - typeAnnotation.type; - throw new Error('Receieved invalid typeAnnotation'); - } -} -function getCommandArguments(command, componentName) { - return [ - 'T view', - ...command.typeAnnotation.params.map(param => { - const commandArgJavaType = getCommandArgJavaType(param); - return `${commandArgJavaType} ${param.name}`; - }), - ].join(', '); -} -function generateCommandsString(component, componentName) { - return component.commands - .map(command => { - const safeJavaName = toSafeJavaString(command.name, false); - return `void ${safeJavaName}(${getCommandArguments( - command, - componentName, - )});`; - }) - .join('\n' + ' '); -} -function getClassExtendString(component) { - const extendString = component.extendsProps - .map(extendProps => { - switch (extendProps.type) { - case 'ReactNativeBuiltInType': - switch (extendProps.knownTypeName) { - case 'ReactNativeCoreViewProps': - return 'View'; - default: - extendProps.knownTypeName; - throw new Error('Invalid knownTypeName'); - } - default: - extendProps.type; - throw new Error('Invalid extended type'); - } - }) - .join(''); - return extendString; -} -module.exports = { - generate( - libraryName, - schema, - packageName, - assumeNonnull = false, - headerPrefix, - ) { - // TODO: This doesn't support custom package name yet. - const normalizedPackageName = 'com.facebook.react.viewmanagers'; - const outputDir = `java/${normalizedPackageName.replace(/\./g, '/')}`; - const files = new Map(); - Object.keys(schema.modules).forEach(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - const components = module.components; - - // No components in this module - if (components == null) { - return; - } - return Object.keys(components) - .filter(componentName => { - const component = components[componentName]; - return !( - component.excludedPlatforms && - component.excludedPlatforms.includes('android') - ); - }) - .forEach(componentName => { - const component = components[componentName]; - const className = getInterfaceJavaClassName(componentName); - const imports = getImports(component, 'interface'); - const propsString = generatePropsString(component, imports); - const commandsString = generateCommandsString( - component, - componentName, - ); - const extendString = getClassExtendString(component); - const replacedTemplate = FileTemplate({ - imports: Array.from(imports).sort().join('\n'), - packageName: normalizedPackageName, - className, - extendClasses: extendString, - methods: [propsString, commandsString] - .join('\n' + ' ') - .trimRight(), - }); - files.set(`${outputDir}/${className}.java`, replacedTemplate); - }); - }); - return files; - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaInterface.js.flow b/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaInterface.js.flow deleted file mode 100644 index 28888b203..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaInterface.js.flow +++ /dev/null @@ -1,296 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; -import type {CommandParamTypeAnnotation} from '../../CodegenSchema'; -import type { - CommandTypeAnnotation, - ComponentShape, - NamedShape, - PropTypeAnnotation, - SchemaType, -} from '../../CodegenSchema'; - -const { - getImports, - getInterfaceJavaClassName, - toSafeJavaString, -} = require('./JavaHelpers'); - -// File path -> contents -type FilesOutput = Map; - -const FileTemplate = ({ - packageName, - imports, - className, - extendClasses, - methods, -}: { - packageName: string, - imports: string, - className: string, - extendClasses: string, - methods: string, -}) => `/** -* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). -* -* Do not edit this file as changes may cause incorrect behavior and will be lost -* once the code is regenerated. -* -* ${'@'}generated by codegen project: GeneratePropsJavaInterface.js -*/ - -package ${packageName}; - -${imports} - -public interface ${className} { - ${methods} -} -`; - -function addNullable(imports: Set) { - imports.add('import androidx.annotation.Nullable;'); -} - -function getJavaValueForProp( - prop: NamedShape, - imports: Set, -): string { - const typeAnnotation = prop.typeAnnotation; - - switch (typeAnnotation.type) { - case 'BooleanTypeAnnotation': - if (typeAnnotation.default === null) { - addNullable(imports); - return '@Nullable Boolean value'; - } else { - return 'boolean value'; - } - case 'StringTypeAnnotation': - addNullable(imports); - return '@Nullable String value'; - case 'Int32TypeAnnotation': - return 'int value'; - case 'DoubleTypeAnnotation': - return 'double value'; - case 'FloatTypeAnnotation': - if (typeAnnotation.default === null) { - addNullable(imports); - return '@Nullable Float value'; - } else { - return 'float value'; - } - case 'ReservedPropTypeAnnotation': - switch (typeAnnotation.name) { - case 'ColorPrimitive': - addNullable(imports); - return '@Nullable Integer value'; - case 'ImageSourcePrimitive': - addNullable(imports); - return '@Nullable ReadableMap value'; - case 'ImageRequestPrimitive': - addNullable(imports); - return '@Nullable ReadableMap value'; - case 'PointPrimitive': - addNullable(imports); - return '@Nullable ReadableMap value'; - case 'EdgeInsetsPrimitive': - addNullable(imports); - return '@Nullable ReadableMap value'; - case 'DimensionPrimitive': - addNullable(imports); - return '@Nullable YogaValue value'; - default: - (typeAnnotation.name: empty); - throw new Error('Received unknown ReservedPropTypeAnnotation'); - } - case 'ArrayTypeAnnotation': { - addNullable(imports); - return '@Nullable ReadableArray value'; - } - case 'ObjectTypeAnnotation': { - addNullable(imports); - return '@Nullable ReadableMap value'; - } - case 'StringEnumTypeAnnotation': - addNullable(imports); - return '@Nullable String value'; - case 'Int32EnumTypeAnnotation': - addNullable(imports); - return '@Nullable Integer value'; - case 'MixedTypeAnnotation': - return 'Dynamic value'; - default: - (typeAnnotation: empty); - throw new Error('Received invalid typeAnnotation'); - } -} - -function generatePropsString(component: ComponentShape, imports: Set) { - if (component.props.length === 0) { - return '// No props'; - } - - return component.props - .map(prop => { - return `void set${toSafeJavaString( - prop.name, - )}(T view, ${getJavaValueForProp(prop, imports)});`; - }) - .join('\n' + ' '); -} - -function getCommandArgJavaType(param: NamedShape) { - const {typeAnnotation} = param; - - switch (typeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (typeAnnotation.name) { - case 'RootTag': - return 'double'; - default: - (typeAnnotation.name: empty); - throw new Error(`Receieved invalid type: ${typeAnnotation.name}`); - } - case 'BooleanTypeAnnotation': - return 'boolean'; - case 'DoubleTypeAnnotation': - return 'double'; - case 'FloatTypeAnnotation': - return 'float'; - case 'Int32TypeAnnotation': - return 'int'; - case 'StringTypeAnnotation': - return 'String'; - case 'ArrayTypeAnnotation': - return 'ReadableArray'; - default: - (typeAnnotation.type: empty); - throw new Error('Receieved invalid typeAnnotation'); - } -} - -function getCommandArguments( - command: NamedShape, - componentName: string, -): string { - return [ - 'T view', - ...command.typeAnnotation.params.map(param => { - const commandArgJavaType = getCommandArgJavaType(param); - - return `${commandArgJavaType} ${param.name}`; - }), - ].join(', '); -} - -function generateCommandsString( - component: ComponentShape, - componentName: string, -) { - return component.commands - .map(command => { - const safeJavaName = toSafeJavaString(command.name, false); - - return `void ${safeJavaName}(${getCommandArguments( - command, - componentName, - )});`; - }) - .join('\n' + ' '); -} - -function getClassExtendString(component: ComponentShape): string { - const extendString = component.extendsProps - .map(extendProps => { - switch (extendProps.type) { - case 'ReactNativeBuiltInType': - switch (extendProps.knownTypeName) { - case 'ReactNativeCoreViewProps': - return 'View'; - default: - (extendProps.knownTypeName: empty); - throw new Error('Invalid knownTypeName'); - } - default: - (extendProps.type: empty); - throw new Error('Invalid extended type'); - } - }) - .join(''); - - return extendString; -} - -module.exports = { - generate( - libraryName: string, - schema: SchemaType, - packageName?: string, - assumeNonnull: boolean = false, - headerPrefix?: string, - ): FilesOutput { - // TODO: This doesn't support custom package name yet. - const normalizedPackageName = 'com.facebook.react.viewmanagers'; - const outputDir = `java/${normalizedPackageName.replace(/\./g, '/')}`; - - const files = new Map(); - Object.keys(schema.modules).forEach(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - - const {components} = module; - - // No components in this module - if (components == null) { - return; - } - - return Object.keys(components) - .filter(componentName => { - const component = components[componentName]; - return !( - component.excludedPlatforms && - component.excludedPlatforms.includes('android') - ); - }) - .forEach(componentName => { - const component = components[componentName]; - const className = getInterfaceJavaClassName(componentName); - - const imports = getImports(component, 'interface'); - const propsString = generatePropsString(component, imports); - const commandsString = generateCommandsString( - component, - componentName, - ); - const extendString = getClassExtendString(component); - - const replacedTemplate = FileTemplate({ - imports: Array.from(imports).sort().join('\n'), - packageName: normalizedPackageName, - className, - extendClasses: extendString, - methods: [propsString, commandsString] - .join('\n' + ' ') - .trimRight(), - }); - - files.set(`${outputDir}/${className}.java`, replacedTemplate); - }); - }); - - return files; - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaPojo/PojoCollector.js b/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaPojo/PojoCollector.js deleted file mode 100644 index 2e9ab5b85..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaPojo/PojoCollector.js +++ /dev/null @@ -1,156 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && - (symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), - keys.push.apply(keys, symbols); - } - return keys; -} -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 - ? ownKeys(Object(source), !0).forEach(function (key) { - _defineProperty(target, key, source[key]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties( - target, - Object.getOwnPropertyDescriptors(source), - ) - : ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty( - target, - key, - Object.getOwnPropertyDescriptor(source, key), - ); - }); - } - return target; -} -function _defineProperty(obj, key, value) { - key = _toPropertyKey(key); - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true, - }); - } else { - obj[key] = value; - } - return obj; -} -function _toPropertyKey(arg) { - var key = _toPrimitive(arg, 'string'); - return typeof key === 'symbol' ? key : String(key); -} -function _toPrimitive(input, hint) { - if (typeof input !== 'object' || input === null) return input; - var prim = input[Symbol.toPrimitive]; - if (prim !== undefined) { - var res = prim.call(input, hint || 'default'); - if (typeof res !== 'object') return res; - throw new TypeError('@@toPrimitive must return a primitive value.'); - } - return (hint === 'string' ? String : Number)(input); -} -const _require = require('../../Utils'), - capitalize = _require.capitalize; -class PojoCollector { - constructor() { - _defineProperty(this, '_pojos', new Map()); - } - process(namespace, pojoName, typeAnnotation) { - switch (typeAnnotation.type) { - case 'ObjectTypeAnnotation': { - this._insertPojo(namespace, pojoName, typeAnnotation); - return { - type: 'PojoTypeAliasTypeAnnotation', - name: pojoName, - }; - } - case 'ArrayTypeAnnotation': { - const arrayTypeAnnotation = typeAnnotation; - const elementType = arrayTypeAnnotation.elementType; - const pojoElementType = (() => { - switch (elementType.type) { - case 'ObjectTypeAnnotation': { - this._insertPojo(namespace, `${pojoName}Element`, elementType); - return { - type: 'PojoTypeAliasTypeAnnotation', - name: `${pojoName}Element`, - }; - } - case 'ArrayTypeAnnotation': { - const objectTypeAnnotation = elementType.elementType; - this._insertPojo( - namespace, - `${pojoName}ElementElement`, - objectTypeAnnotation, - ); - return { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'PojoTypeAliasTypeAnnotation', - name: `${pojoName}ElementElement`, - }, - }; - } - default: { - return elementType; - } - } - })(); - return { - type: 'ArrayTypeAnnotation', - elementType: pojoElementType, - }; - } - default: - return typeAnnotation; - } - } - _insertPojo(namespace, pojoName, objectTypeAnnotation) { - const properties = objectTypeAnnotation.properties.map(property => { - const propertyPojoName = pojoName + capitalize(property.name); - return _objectSpread( - _objectSpread({}, property), - {}, - { - typeAnnotation: this.process( - namespace, - propertyPojoName, - property.typeAnnotation, - ), - }, - ); - }); - this._pojos.set(pojoName, { - name: pojoName, - namespace, - properties, - }); - } - getAllPojos() { - return [...this._pojos.values()]; - } -} -module.exports = PojoCollector; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaPojo/PojoCollector.js.flow b/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaPojo/PojoCollector.js.flow deleted file mode 100644 index 6f5e19e88..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaPojo/PojoCollector.js.flow +++ /dev/null @@ -1,187 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type { - ArrayTypeAnnotation, - BooleanTypeAnnotation, - DoubleTypeAnnotation, - FloatTypeAnnotation, - Int32TypeAnnotation, - MixedTypeAnnotation, - NamedShape, - ObjectTypeAnnotation, - PropTypeAnnotation, - ReservedPropTypeAnnotation, - StringTypeAnnotation, -} from '../../../CodegenSchema'; - -const {capitalize} = require('../../Utils'); - -export type Pojo = { - name: string, - namespace: string, - properties: $ReadOnlyArray, -}; - -export type PojoProperty = NamedShape; - -export type PojoTypeAliasAnnotation = { - type: 'PojoTypeAliasTypeAnnotation', - name: string, -}; - -export type PojoTypeAnnotation = - | $ReadOnly<{ - type: 'BooleanTypeAnnotation', - default: boolean | null, - }> - | $ReadOnly<{ - type: 'StringTypeAnnotation', - default: string | null, - }> - | $ReadOnly<{ - type: 'DoubleTypeAnnotation', - default: number, - }> - | $ReadOnly<{ - type: 'FloatTypeAnnotation', - default: number | null, - }> - | $ReadOnly<{ - type: 'Int32TypeAnnotation', - default: number, - }> - | $ReadOnly<{ - type: 'StringEnumTypeAnnotation', - default: string, - options: $ReadOnlyArray, - }> - | $ReadOnly<{ - type: 'Int32EnumTypeAnnotation', - default: number, - options: $ReadOnlyArray, - }> - | ReservedPropTypeAnnotation - | PojoTypeAliasAnnotation - | $ReadOnly<{ - type: 'ArrayTypeAnnotation', - elementType: - | BooleanTypeAnnotation - | StringTypeAnnotation - | DoubleTypeAnnotation - | FloatTypeAnnotation - | Int32TypeAnnotation - | $ReadOnly<{ - type: 'StringEnumTypeAnnotation', - default: string, - options: $ReadOnlyArray, - }> - | PojoTypeAliasAnnotation - | ReservedPropTypeAnnotation - | $ReadOnly<{ - type: 'ArrayTypeAnnotation', - elementType: PojoTypeAliasAnnotation, - }>, - }> - | MixedTypeAnnotation; - -class PojoCollector { - _pojos: Map = new Map(); - process( - namespace: string, - pojoName: string, - typeAnnotation: PropTypeAnnotation, - ): PojoTypeAnnotation { - switch (typeAnnotation.type) { - case 'ObjectTypeAnnotation': { - this._insertPojo(namespace, pojoName, typeAnnotation); - return { - type: 'PojoTypeAliasTypeAnnotation', - name: pojoName, - }; - } - case 'ArrayTypeAnnotation': { - const arrayTypeAnnotation = typeAnnotation; - const elementType: $PropertyType = - arrayTypeAnnotation.elementType; - - const pojoElementType = (() => { - switch (elementType.type) { - case 'ObjectTypeAnnotation': { - this._insertPojo(namespace, `${pojoName}Element`, elementType); - return { - type: 'PojoTypeAliasTypeAnnotation', - name: `${pojoName}Element`, - }; - } - case 'ArrayTypeAnnotation': { - const {elementType: objectTypeAnnotation} = elementType; - this._insertPojo( - namespace, - `${pojoName}ElementElement`, - objectTypeAnnotation, - ); - return { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'PojoTypeAliasTypeAnnotation', - name: `${pojoName}ElementElement`, - }, - }; - } - default: { - return elementType; - } - } - })(); - - return { - type: 'ArrayTypeAnnotation', - elementType: pojoElementType, - }; - } - default: - return typeAnnotation; - } - } - - _insertPojo( - namespace: string, - pojoName: string, - objectTypeAnnotation: ObjectTypeAnnotation, - ) { - const properties = objectTypeAnnotation.properties.map(property => { - const propertyPojoName = pojoName + capitalize(property.name); - - return { - ...property, - typeAnnotation: this.process( - namespace, - propertyPojoName, - property.typeAnnotation, - ), - }; - }); - - this._pojos.set(pojoName, { - name: pojoName, - namespace, - properties, - }); - } - - getAllPojos(): $ReadOnlyArray { - return [...this._pojos.values()]; - } -} - -module.exports = PojoCollector; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaPojo/index.js b/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaPojo/index.js deleted file mode 100644 index 7ecd1bcf0..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaPojo/index.js +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('../../Utils'), - capitalize = _require.capitalize; -const PojoCollector = require('./PojoCollector'); -const _require2 = require('./serializePojo'), - serializePojo = _require2.serializePojo; -module.exports = { - generate(libraryName, schema, packageName) { - const pojoCollector = new PojoCollector(); - const basePackageName = 'com.facebook.react.viewmanagers'; - Object.keys(schema.modules).forEach(hasteModuleName => { - const module = schema.modules[hasteModuleName]; - if (module.type !== 'Component') { - return; - } - const components = module.components; - // No components in this module - if (components == null) { - return null; - } - Object.keys(components) - .filter(componentName => { - const component = components[componentName]; - return !( - component.excludedPlatforms && - component.excludedPlatforms.includes('android') - ); - }) - .forEach(componentName => { - const component = components[componentName]; - if (component == null) { - return; - } - const props = component.props; - pojoCollector.process( - capitalize(hasteModuleName), - `${capitalize(componentName)}Props`, - { - type: 'ObjectTypeAnnotation', - properties: props, - }, - ); - }); - }); - const pojoDir = basePackageName.split('.').join('/'); - return new Map( - pojoCollector.getAllPojos().map(pojo => { - return [ - `java/${pojoDir}/${pojo.namespace}/${pojo.name}.java`, - serializePojo(pojo, basePackageName), - ]; - }), - ); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaPojo/index.js.flow b/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaPojo/index.js.flow deleted file mode 100644 index a60583deb..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaPojo/index.js.flow +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type {SchemaType} from '../../../CodegenSchema'; - -const {capitalize} = require('../../Utils'); -const PojoCollector = require('./PojoCollector'); -const {serializePojo} = require('./serializePojo'); - -type FilesOutput = Map; - -module.exports = { - generate( - libraryName: string, - schema: SchemaType, - packageName?: string, - ): FilesOutput { - const pojoCollector = new PojoCollector(); - const basePackageName = 'com.facebook.react.viewmanagers'; - - Object.keys(schema.modules).forEach(hasteModuleName => { - const module = schema.modules[hasteModuleName]; - if (module.type !== 'Component') { - return; - } - - const {components} = module; - // No components in this module - if (components == null) { - return null; - } - - Object.keys(components) - .filter(componentName => { - const component = components[componentName]; - return !( - component.excludedPlatforms && - component.excludedPlatforms.includes('android') - ); - }) - .forEach(componentName => { - const component = components[componentName]; - if (component == null) { - return; - } - - const {props} = component; - - pojoCollector.process( - capitalize(hasteModuleName), - `${capitalize(componentName)}Props`, - { - type: 'ObjectTypeAnnotation', - properties: props, - }, - ); - }); - }); - - const pojoDir = basePackageName.split('.').join('/'); - - return new Map( - pojoCollector.getAllPojos().map(pojo => { - return [ - `java/${pojoDir}/${pojo.namespace}/${pojo.name}.java`, - serializePojo(pojo, basePackageName), - ]; - }), - ); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaPojo/serializePojo.js b/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaPojo/serializePojo.js deleted file mode 100644 index 8e7e5a95a..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaPojo/serializePojo.js +++ /dev/null @@ -1,286 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('../../Utils'), - capitalize = _require.capitalize; -function toJavaType(typeAnnotation, addImport) { - const importNullable = () => addImport('androidx.annotation.Nullable'); - const importReadableMap = () => - addImport('com.facebook.react.bridge.ReadableMap'); - const importArrayList = () => addImport('java.util.ArrayList'); - const importYogaValue = () => addImport('com.facebook.yoga.YogaValue'); - const importDynamic = () => addImport('com.facebook.react.bridge.Dynamic'); - switch (typeAnnotation.type) { - /** - * Primitives - */ - case 'BooleanTypeAnnotation': { - if (typeAnnotation.default === null) { - importNullable(); - return '@Nullable Boolean'; - } else { - return 'boolean'; - } - } - case 'StringTypeAnnotation': { - importNullable(); - return '@Nullable String'; - } - case 'DoubleTypeAnnotation': { - return 'double'; - } - case 'FloatTypeAnnotation': { - if (typeAnnotation.default === null) { - importNullable(); - return '@Nullable Float'; - } else { - return 'float'; - } - } - case 'Int32TypeAnnotation': { - return 'int'; - } - - /** - * Enums - */ - // TODO: Make StringEnumTypeAnnotation type-safe? - case 'StringEnumTypeAnnotation': - importNullable(); - return '@Nullable String'; - // TODO: Make Int32EnumTypeAnnotation type-safe? - case 'Int32EnumTypeAnnotation': - importNullable(); - return '@Nullable Integer'; - - /** - * Reserved types - */ - case 'ReservedPropTypeAnnotation': { - switch (typeAnnotation.name) { - case 'ColorPrimitive': - importNullable(); - return '@Nullable Integer'; - - // TODO: Make ImageSourcePrimitive type-safe - case 'ImageSourcePrimitive': - importNullable(); - importReadableMap(); - return '@Nullable ReadableMap'; - - // TODO: Make ImageRequestPrimitive type-safe - case 'ImageRequestPrimitive': - importNullable(); - importReadableMap(); - return '@Nullable ReadableMap'; - - // TODO: Make PointPrimitive type-safe - case 'PointPrimitive': - importNullable(); - importReadableMap(); - return '@Nullable ReadableMap'; - - // TODO: Make EdgeInsetsPrimitive type-safe - case 'EdgeInsetsPrimitive': - importNullable(); - importReadableMap(); - return '@Nullable ReadableMap'; - case 'DimensionPrimitive': - importNullable(); - importYogaValue(); - return '@Nullable YogaValue'; - default: - typeAnnotation.name; - throw new Error( - `Received unknown ReservedPropTypeAnnotation ${typeAnnotation.name}`, - ); - } - } - - /** - * Other Pojo objects - */ - case 'PojoTypeAliasTypeAnnotation': { - return typeAnnotation.name; - } - - /** - * Arrays - */ - case 'ArrayTypeAnnotation': { - const elementType = typeAnnotation.elementType; - const elementTypeString = (() => { - switch (elementType.type) { - /** - * Primitives - */ - case 'BooleanTypeAnnotation': { - return 'Boolean'; - } - case 'StringTypeAnnotation': { - return 'String'; - } - case 'DoubleTypeAnnotation': { - return 'Double'; - } - case 'FloatTypeAnnotation': { - return 'Float'; - } - case 'Int32TypeAnnotation': { - return 'Integer'; - } - - /** - * Enums - */ - // TODO: Make StringEnums type-safe in Pojos - case 'StringEnumTypeAnnotation': { - return 'String'; - } - - /** - * Other Pojo objects - */ - case 'PojoTypeAliasTypeAnnotation': { - return elementType.name; - } - - /** - * Reserved types - */ - case 'ReservedPropTypeAnnotation': { - switch (elementType.name) { - case 'ColorPrimitive': - return 'Integer'; - - // TODO: Make ImageSourcePrimitive type-safe - case 'ImageSourcePrimitive': - importReadableMap(); - return 'ReadableMap'; - - // TODO: Make ImageRequestPrimitive type-safe - case 'ImageRequestPrimitive': - importReadableMap(); - return 'ReadableMap'; - - // TODO: Make PointPrimitive type-safe - case 'PointPrimitive': - importReadableMap(); - return 'ReadableMap'; - - // TODO: Make EdgeInsetsPrimitive type-safe - case 'EdgeInsetsPrimitive': - importReadableMap(); - return 'ReadableMap'; - case 'DimensionPrimitive': - importYogaValue(); - return 'YogaValue'; - default: - elementType.name; - throw new Error( - `Received unknown ReservedPropTypeAnnotation ${elementType.name}`, - ); - } - } - - // Arrays - case 'ArrayTypeAnnotation': { - const pojoTypeAliasTypeAnnotation = elementType.elementType; - importArrayList(); - return `ArrayList<${pojoTypeAliasTypeAnnotation.name}>`; - } - default: { - elementType.type; - throw new Error( - `Unrecognized PojoTypeAnnotation Array element type annotation '${typeAnnotation.type}'`, - ); - } - } - })(); - importArrayList(); - return `ArrayList<${elementTypeString}>`; - } - case 'MixedTypeAnnotation': { - importDynamic(); - return 'Dynamic'; - } - default: { - typeAnnotation.type; - throw new Error( - `Unrecognized PojoTypeAnnotation '${typeAnnotation.type}'`, - ); - } - } -} -function toJavaMemberName(property) { - return `m${capitalize(property.name)}`; -} -function toJavaMemberDeclaration(property, addImport) { - const type = toJavaType(property.typeAnnotation, addImport); - const memberName = toJavaMemberName(property); - return `private ${type} ${memberName};`; -} -function toJavaGetter(property, addImport) { - const type = toJavaType(property.typeAnnotation, addImport); - const getterName = `get${capitalize(property.name)}`; - const memberName = toJavaMemberName(property); - addImport('com.facebook.proguard.annotations.DoNotStrip'); - return `@DoNotStrip -public ${type} ${getterName}() { - return ${memberName}; -}`; -} -function serializePojo(pojo, basePackageName) { - const importSet = new Set(); - const addImport = $import => { - importSet.add($import); - }; - addImport('com.facebook.proguard.annotations.DoNotStrip'); - const indent = ' '.repeat(2); - const members = pojo.properties - .map(property => toJavaMemberDeclaration(property, addImport)) - .map(member => `${indent}${member}`) - .join('\n'); - const getters = pojo.properties - .map(property => toJavaGetter(property, addImport)) - .map(getter => - getter - .split('\n') - .map(line => `${indent}${line}`) - .join('\n'), - ) - .join('\n'); - const imports = [...importSet] - .map($import => `import ${$import};`) - .sort() - .join('\n'); - return `/** -* Copyright (c) Meta Platforms, Inc. and affiliates. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -* -* ${'@'}generated by codegen project: GeneratePropsJavaPojo.js -*/ - -package ${basePackageName}.${pojo.namespace}; -${imports === '' ? '' : `\n${imports}\n`} -@DoNotStrip -public class ${pojo.name} { -${members} -${getters} -} -`; -} -module.exports = { - serializePojo, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaPojo/serializePojo.js.flow b/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaPojo/serializePojo.js.flow deleted file mode 100644 index 7ca6df11d..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GeneratePropsJavaPojo/serializePojo.js.flow +++ /dev/null @@ -1,315 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type {Pojo, PojoProperty, PojoTypeAnnotation} from './PojoCollector'; - -const {capitalize} = require('../../Utils'); - -type ImportCollector = ($import: string) => void; - -function toJavaType( - typeAnnotation: PojoTypeAnnotation, - addImport: ImportCollector, -): string { - const importNullable = () => addImport('androidx.annotation.Nullable'); - const importReadableMap = () => - addImport('com.facebook.react.bridge.ReadableMap'); - const importArrayList = () => addImport('java.util.ArrayList'); - const importYogaValue = () => addImport('com.facebook.yoga.YogaValue'); - const importDynamic = () => addImport('com.facebook.react.bridge.Dynamic'); - switch (typeAnnotation.type) { - /** - * Primitives - */ - case 'BooleanTypeAnnotation': { - if (typeAnnotation.default === null) { - importNullable(); - return '@Nullable Boolean'; - } else { - return 'boolean'; - } - } - case 'StringTypeAnnotation': { - importNullable(); - return '@Nullable String'; - } - case 'DoubleTypeAnnotation': { - return 'double'; - } - case 'FloatTypeAnnotation': { - if (typeAnnotation.default === null) { - importNullable(); - return '@Nullable Float'; - } else { - return 'float'; - } - } - case 'Int32TypeAnnotation': { - return 'int'; - } - - /** - * Enums - */ - // TODO: Make StringEnumTypeAnnotation type-safe? - case 'StringEnumTypeAnnotation': - importNullable(); - return '@Nullable String'; - // TODO: Make Int32EnumTypeAnnotation type-safe? - case 'Int32EnumTypeAnnotation': - importNullable(); - return '@Nullable Integer'; - - /** - * Reserved types - */ - case 'ReservedPropTypeAnnotation': { - switch (typeAnnotation.name) { - case 'ColorPrimitive': - importNullable(); - return '@Nullable Integer'; - - // TODO: Make ImageSourcePrimitive type-safe - case 'ImageSourcePrimitive': - importNullable(); - importReadableMap(); - return '@Nullable ReadableMap'; - - // TODO: Make ImageRequestPrimitive type-safe - case 'ImageRequestPrimitive': - importNullable(); - importReadableMap(); - return '@Nullable ReadableMap'; - - // TODO: Make PointPrimitive type-safe - case 'PointPrimitive': - importNullable(); - importReadableMap(); - return '@Nullable ReadableMap'; - - // TODO: Make EdgeInsetsPrimitive type-safe - case 'EdgeInsetsPrimitive': - importNullable(); - importReadableMap(); - return '@Nullable ReadableMap'; - - case 'DimensionPrimitive': - importNullable(); - importYogaValue(); - return '@Nullable YogaValue'; - - default: - (typeAnnotation.name: empty); - throw new Error( - `Received unknown ReservedPropTypeAnnotation ${typeAnnotation.name}`, - ); - } - } - - /** - * Other Pojo objects - */ - case 'PojoTypeAliasTypeAnnotation': { - return typeAnnotation.name; - } - - /** - * Arrays - */ - case 'ArrayTypeAnnotation': { - const {elementType} = typeAnnotation; - - const elementTypeString = (() => { - switch (elementType.type) { - /** - * Primitives - */ - case 'BooleanTypeAnnotation': { - return 'Boolean'; - } - case 'StringTypeAnnotation': { - return 'String'; - } - case 'DoubleTypeAnnotation': { - return 'Double'; - } - case 'FloatTypeAnnotation': { - return 'Float'; - } - case 'Int32TypeAnnotation': { - return 'Integer'; - } - - /** - * Enums - */ - // TODO: Make StringEnums type-safe in Pojos - case 'StringEnumTypeAnnotation': { - return 'String'; - } - - /** - * Other Pojo objects - */ - case 'PojoTypeAliasTypeAnnotation': { - return elementType.name; - } - - /** - * Reserved types - */ - case 'ReservedPropTypeAnnotation': { - switch (elementType.name) { - case 'ColorPrimitive': - return 'Integer'; - - // TODO: Make ImageSourcePrimitive type-safe - case 'ImageSourcePrimitive': - importReadableMap(); - return 'ReadableMap'; - - // TODO: Make ImageRequestPrimitive type-safe - case 'ImageRequestPrimitive': - importReadableMap(); - return 'ReadableMap'; - - // TODO: Make PointPrimitive type-safe - case 'PointPrimitive': - importReadableMap(); - return 'ReadableMap'; - - // TODO: Make EdgeInsetsPrimitive type-safe - case 'EdgeInsetsPrimitive': - importReadableMap(); - return 'ReadableMap'; - - case 'DimensionPrimitive': - importYogaValue(); - return 'YogaValue'; - - default: - (elementType.name: empty); - throw new Error( - `Received unknown ReservedPropTypeAnnotation ${elementType.name}`, - ); - } - } - - // Arrays - case 'ArrayTypeAnnotation': { - const {elementType: pojoTypeAliasTypeAnnotation} = elementType; - - importArrayList(); - return `ArrayList<${pojoTypeAliasTypeAnnotation.name}>`; - } - default: { - (elementType.type: empty); - throw new Error( - `Unrecognized PojoTypeAnnotation Array element type annotation '${typeAnnotation.type}'`, - ); - } - } - })(); - - importArrayList(); - return `ArrayList<${elementTypeString}>`; - } - - case 'MixedTypeAnnotation': { - importDynamic(); - return 'Dynamic'; - } - - default: { - (typeAnnotation.type: empty); - throw new Error( - `Unrecognized PojoTypeAnnotation '${typeAnnotation.type}'`, - ); - } - } -} - -function toJavaMemberName(property: PojoProperty): string { - return `m${capitalize(property.name)}`; -} - -function toJavaMemberDeclaration( - property: PojoProperty, - addImport: ImportCollector, -): string { - const type = toJavaType(property.typeAnnotation, addImport); - const memberName = toJavaMemberName(property); - return `private ${type} ${memberName};`; -} - -function toJavaGetter(property: PojoProperty, addImport: ImportCollector) { - const type = toJavaType(property.typeAnnotation, addImport); - const getterName = `get${capitalize(property.name)}`; - const memberName = toJavaMemberName(property); - - addImport('com.facebook.proguard.annotations.DoNotStrip'); - return `@DoNotStrip -public ${type} ${getterName}() { - return ${memberName}; -}`; -} - -function serializePojo(pojo: Pojo, basePackageName: string): string { - const importSet: Set = new Set(); - const addImport = ($import: string) => { - importSet.add($import); - }; - - addImport('com.facebook.proguard.annotations.DoNotStrip'); - - const indent = ' '.repeat(2); - - const members = pojo.properties - .map(property => toJavaMemberDeclaration(property, addImport)) - .map(member => `${indent}${member}`) - .join('\n'); - - const getters = pojo.properties - .map(property => toJavaGetter(property, addImport)) - .map(getter => - getter - .split('\n') - .map(line => `${indent}${line}`) - .join('\n'), - ) - .join('\n'); - - const imports = [...importSet] - .map($import => `import ${$import};`) - .sort() - .join('\n'); - - return `/** -* Copyright (c) Meta Platforms, Inc. and affiliates. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -* -* ${'@'}generated by codegen project: GeneratePropsJavaPojo.js -*/ - -package ${basePackageName}.${pojo.namespace}; -${imports === '' ? '' : `\n${imports}\n`} -@DoNotStrip -public class ${pojo.name} { -${members} -${getters} -} -`; -} - -module.exports = {serializePojo}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GenerateShadowNodeCpp.js b/node_modules/@react-native/codegen/lib/generators/components/GenerateShadowNodeCpp.js deleted file mode 100644 index cf91c7944..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GenerateShadowNodeCpp.js +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('./CppHelpers'), - IncludeTemplate = _require.IncludeTemplate; - -// File path -> contents - -const FileTemplate = ({componentNames, headerPrefix}) => ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateShadowNodeCpp.js - */ - -${IncludeTemplate({ - headerPrefix, - file: 'ShadowNodes.h', -})} - -namespace facebook::react { - -${componentNames} - -} // namespace facebook::react -`; -const ComponentTemplate = ({className}) => - ` -extern const char ${className}ComponentName[] = "${className}"; -`.trim(); -module.exports = { - generate( - libraryName, - schema, - packageName, - assumeNonnull = false, - headerPrefix, - ) { - const fileName = 'ShadowNodes.cpp'; - const componentNames = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - const components = module.components; - // No components in this module - if (components == null) { - return null; - } - return Object.keys(components) - .map(componentName => { - if (components[componentName].interfaceOnly === true) { - return; - } - const replacedTemplate = ComponentTemplate({ - className: componentName, - }); - return replacedTemplate; - }) - .join('\n'); - }) - .filter(Boolean) - .join('\n'); - const replacedTemplate = FileTemplate({ - componentNames, - headerPrefix: - headerPrefix !== null && headerPrefix !== void 0 ? headerPrefix : '', - }); - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GenerateShadowNodeCpp.js.flow b/node_modules/@react-native/codegen/lib/generators/components/GenerateShadowNodeCpp.js.flow deleted file mode 100644 index c6d9f7b73..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GenerateShadowNodeCpp.js.flow +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type {SchemaType} from '../../CodegenSchema'; - -const {IncludeTemplate} = require('./CppHelpers'); - -// File path -> contents -type FilesOutput = Map; - -const FileTemplate = ({ - componentNames, - headerPrefix, -}: { - componentNames: string, - headerPrefix: string, -}) => ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateShadowNodeCpp.js - */ - -${IncludeTemplate({headerPrefix, file: 'ShadowNodes.h'})} - -namespace facebook::react { - -${componentNames} - -} // namespace facebook::react -`; - -const ComponentTemplate = ({className}: {className: string}) => - ` -extern const char ${className}ComponentName[] = "${className}"; -`.trim(); - -module.exports = { - generate( - libraryName: string, - schema: SchemaType, - packageName?: string, - assumeNonnull: boolean = false, - headerPrefix?: string, - ): FilesOutput { - const fileName = 'ShadowNodes.cpp'; - - const componentNames = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - - const {components} = module; - // No components in this module - if (components == null) { - return null; - } - - return Object.keys(components) - .map(componentName => { - if (components[componentName].interfaceOnly === true) { - return; - } - const replacedTemplate = ComponentTemplate({ - className: componentName, - }); - - return replacedTemplate; - }) - .join('\n'); - }) - .filter(Boolean) - .join('\n'); - - const replacedTemplate = FileTemplate({ - componentNames, - headerPrefix: headerPrefix ?? '', - }); - - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GenerateShadowNodeH.js b/node_modules/@react-native/codegen/lib/generators/components/GenerateShadowNodeH.js deleted file mode 100644 index 6e23377bb..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GenerateShadowNodeH.js +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('./CppHelpers'), - IncludeTemplate = _require.IncludeTemplate; - -// File path -> contents - -const FileTemplate = ({componentClasses, headerPrefix}) => ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateShadowNodeH.js - */ - -#pragma once - -${IncludeTemplate({ - headerPrefix, - file: 'EventEmitters.h', -})} -${IncludeTemplate({ - headerPrefix, - file: 'Props.h', -})} -${IncludeTemplate({ - headerPrefix, - file: 'States.h', -})} -#include -#include - -namespace facebook::react { - -${componentClasses} - -} // namespace facebook::react -`; -const ComponentTemplate = ({className, eventEmitter}) => - ` -JSI_EXPORT extern const char ${className}ComponentName[]; - -/* - * \`ShadowNode\` for <${className}> component. - */ -using ${className}ShadowNode = ConcreteViewShadowNode< - ${className}ComponentName, - ${className}Props${eventEmitter}, - ${className}State>; -`.trim(); -module.exports = { - generate( - libraryName, - schema, - packageName, - assumeNonnull = false, - headerPrefix, - ) { - const fileName = 'ShadowNodes.h'; - const moduleResults = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - const components = module.components; - // No components in this module - if (components == null) { - return null; - } - return Object.keys(components) - .map(componentName => { - const component = components[componentName]; - if (component.interfaceOnly === true) { - return; - } - const eventEmitter = `,\n ${componentName}EventEmitter`; - const replacedTemplate = ComponentTemplate({ - className: componentName, - eventEmitter, - }); - return replacedTemplate; - }) - .join('\n\n'); - }) - .filter(Boolean) - .join('\n\n'); - const replacedTemplate = FileTemplate({ - componentClasses: moduleResults, - headerPrefix: - headerPrefix !== null && headerPrefix !== void 0 ? headerPrefix : '', - }); - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GenerateShadowNodeH.js.flow b/node_modules/@react-native/codegen/lib/generators/components/GenerateShadowNodeH.js.flow deleted file mode 100644 index 8218495e9..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GenerateShadowNodeH.js.flow +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type {SchemaType} from '../../CodegenSchema'; - -const {IncludeTemplate} = require('./CppHelpers'); - -// File path -> contents -type FilesOutput = Map; - -const FileTemplate = ({ - componentClasses, - headerPrefix, -}: { - componentClasses: string, - headerPrefix: string, -}) => ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateShadowNodeH.js - */ - -#pragma once - -${IncludeTemplate({headerPrefix, file: 'EventEmitters.h'})} -${IncludeTemplate({headerPrefix, file: 'Props.h'})} -${IncludeTemplate({headerPrefix, file: 'States.h'})} -#include -#include - -namespace facebook::react { - -${componentClasses} - -} // namespace facebook::react -`; - -const ComponentTemplate = ({ - className, - eventEmitter, -}: { - className: string, - eventEmitter: string, -}) => - ` -JSI_EXPORT extern const char ${className}ComponentName[]; - -/* - * \`ShadowNode\` for <${className}> component. - */ -using ${className}ShadowNode = ConcreteViewShadowNode< - ${className}ComponentName, - ${className}Props${eventEmitter}, - ${className}State>; -`.trim(); - -module.exports = { - generate( - libraryName: string, - schema: SchemaType, - packageName?: string, - assumeNonnull: boolean = false, - headerPrefix?: string, - ): FilesOutput { - const fileName = 'ShadowNodes.h'; - - const moduleResults = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - - const {components} = module; - // No components in this module - if (components == null) { - return null; - } - - return Object.keys(components) - .map(componentName => { - const component = components[componentName]; - if (component.interfaceOnly === true) { - return; - } - - const eventEmitter = `,\n ${componentName}EventEmitter`; - - const replacedTemplate = ComponentTemplate({ - className: componentName, - eventEmitter, - }); - - return replacedTemplate; - }) - .join('\n\n'); - }) - .filter(Boolean) - .join('\n\n'); - - const replacedTemplate = FileTemplate({ - componentClasses: moduleResults, - headerPrefix: headerPrefix ?? '', - }); - - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GenerateStateCpp.js b/node_modules/@react-native/codegen/lib/generators/components/GenerateStateCpp.js deleted file mode 100644 index 1898a4c49..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GenerateStateCpp.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('./CppHelpers'), - IncludeTemplate = _require.IncludeTemplate; - -// File path -> contents - -const FileTemplate = ({stateClasses, headerPrefix}) => ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateStateCpp.js - */ -${IncludeTemplate({ - headerPrefix, - file: 'States.h', -})} - -namespace facebook::react { - -${stateClasses} - -} // namespace facebook::react -`; -const StateTemplate = ({stateName}) => ''; -module.exports = { - generate( - libraryName, - schema, - packageName, - assumeNonnull = false, - headerPrefix, - ) { - const fileName = 'States.cpp'; - const stateClasses = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - const components = module.components; - // No components in this module - if (components == null) { - return null; - } - return Object.keys(components) - .map(componentName => { - const component = components[componentName]; - if (component.interfaceOnly === true) { - return null; - } - return StateTemplate({ - stateName: `${componentName}State`, - }); - }) - .filter(Boolean) - .join('\n'); - }) - .filter(Boolean) - .join('\n'); - const replacedTemplate = FileTemplate({ - stateClasses, - headerPrefix: - headerPrefix !== null && headerPrefix !== void 0 ? headerPrefix : '', - }); - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GenerateStateCpp.js.flow b/node_modules/@react-native/codegen/lib/generators/components/GenerateStateCpp.js.flow deleted file mode 100644 index 87d734a10..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GenerateStateCpp.js.flow +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type {SchemaType} from '../../CodegenSchema'; - -const {IncludeTemplate} = require('./CppHelpers'); - -// File path -> contents -type FilesOutput = Map; - -const FileTemplate = ({ - stateClasses, - headerPrefix, -}: { - stateClasses: string, - headerPrefix: string, -}) => ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateStateCpp.js - */ -${IncludeTemplate({headerPrefix, file: 'States.h'})} - -namespace facebook::react { - -${stateClasses} - -} // namespace facebook::react -`; - -const StateTemplate = ({stateName}: {stateName: string}) => ''; - -module.exports = { - generate( - libraryName: string, - schema: SchemaType, - packageName?: string, - assumeNonnull: boolean = false, - headerPrefix?: string, - ): FilesOutput { - const fileName = 'States.cpp'; - - const stateClasses = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - - const {components} = module; - // No components in this module - if (components == null) { - return null; - } - - return Object.keys(components) - .map(componentName => { - const component = components[componentName]; - if (component.interfaceOnly === true) { - return null; - } - - return StateTemplate({ - stateName: `${componentName}State`, - }); - }) - .filter(Boolean) - .join('\n'); - }) - .filter(Boolean) - .join('\n'); - - const replacedTemplate = FileTemplate({ - stateClasses, - headerPrefix: headerPrefix ?? '', - }); - - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GenerateStateH.js b/node_modules/@react-native/codegen/lib/generators/components/GenerateStateH.js deleted file mode 100644 index fa683277a..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GenerateStateH.js +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -// File path -> contents - -const FileTemplate = ({libraryName, stateClasses}) => - ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateStateH.js - */ -#pragma once - -#ifdef ANDROID -#include -#include -#include -#endif - -namespace facebook::react { - -${stateClasses} - -} // namespace facebook::react -`.trim(); -const StateTemplate = ({stateName}) => - ` -class ${stateName}State { -public: - ${stateName}State() = default; - -#ifdef ANDROID - ${stateName}State(${stateName}State const &previousState, folly::dynamic data){}; - folly::dynamic getDynamic() const { - return {}; - }; - MapBuffer getMapBuffer() const { - return MapBufferBuilder::EMPTY(); - }; -#endif -}; -`.trim(); -module.exports = { - generate( - libraryName, - schema, - packageName, - assumeNonnull = false, - headerPrefix, - ) { - const fileName = 'States.h'; - const stateClasses = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - const components = module.components; - // No components in this module - if (components == null) { - return null; - } - return Object.keys(components) - .map(componentName => { - const component = components[componentName]; - if (component.interfaceOnly === true) { - return null; - } - return StateTemplate({ - stateName: componentName, - }); - }) - .filter(Boolean) - .join('\n\n'); - }) - .filter(Boolean) - .join('\n\n'); - const template = FileTemplate({ - libraryName, - stateClasses, - }); - return new Map([[fileName, template]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GenerateStateH.js.flow b/node_modules/@react-native/codegen/lib/generators/components/GenerateStateH.js.flow deleted file mode 100644 index 3aee725fc..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GenerateStateH.js.flow +++ /dev/null @@ -1,110 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type {SchemaType} from '../../CodegenSchema'; - -// File path -> contents -type FilesOutput = Map; - -const FileTemplate = ({ - libraryName, - stateClasses, -}: { - libraryName: string, - stateClasses: string, -}) => - ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateStateH.js - */ -#pragma once - -#ifdef ANDROID -#include -#include -#include -#endif - -namespace facebook::react { - -${stateClasses} - -} // namespace facebook::react -`.trim(); - -const StateTemplate = ({stateName}: {stateName: string}) => - ` -class ${stateName}State { -public: - ${stateName}State() = default; - -#ifdef ANDROID - ${stateName}State(${stateName}State const &previousState, folly::dynamic data){}; - folly::dynamic getDynamic() const { - return {}; - }; - MapBuffer getMapBuffer() const { - return MapBufferBuilder::EMPTY(); - }; -#endif -}; -`.trim(); - -module.exports = { - generate( - libraryName: string, - schema: SchemaType, - packageName?: string, - assumeNonnull: boolean = false, - headerPrefix?: string, - ): FilesOutput { - const fileName = 'States.h'; - - const stateClasses = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - - const {components} = module; - // No components in this module - if (components == null) { - return null; - } - - return Object.keys(components) - .map(componentName => { - const component = components[componentName]; - if (component.interfaceOnly === true) { - return null; - } - return StateTemplate({stateName: componentName}); - }) - .filter(Boolean) - .join('\n\n'); - }) - .filter(Boolean) - .join('\n\n'); - - const template = FileTemplate({ - libraryName, - stateClasses, - }); - return new Map([[fileName, template]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GenerateTests.js b/node_modules/@react-native/codegen/lib/generators/components/GenerateTests.js deleted file mode 100644 index a172a8b7c..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GenerateTests.js +++ /dev/null @@ -1,172 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('../Utils'), - toSafeCppString = _require.toSafeCppString; -const _require2 = require('./CppHelpers'), - getImports = _require2.getImports; -const FileTemplate = ({libraryName, imports, componentTests}) => - ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateTests.js - * */ - -#include -#include -#include -${imports} - -using namespace facebook::react; -${componentTests} -`.trim(); -const TestTemplate = ({componentName, testName, propName, propValue}) => ` -TEST(${componentName}_${testName}, etc) { - auto propParser = RawPropsParser(); - propParser.prepare<${componentName}>(); - auto const &sourceProps = ${componentName}(); - auto const &rawProps = RawProps(folly::dynamic::object("${propName}", ${propValue})); - - ContextContainer contextContainer{}; - PropsParserContext parserContext{-1, contextContainer}; - - rawProps.parse(propParser, parserContext); - ${componentName}(parserContext, sourceProps, rawProps); -} -`; -function getTestCasesForProp(propName, typeAnnotation) { - const cases = []; - if (typeAnnotation.type === 'StringEnumTypeAnnotation') { - typeAnnotation.options.forEach(option => - cases.push({ - propName, - testName: `${propName}_${toSafeCppString(option)}`, - propValue: option, - }), - ); - } else if (typeAnnotation.type === 'StringTypeAnnotation') { - cases.push({ - propName, - propValue: - typeAnnotation.default != null && typeAnnotation.default !== '' - ? typeAnnotation.default - : 'foo', - }); - } else if (typeAnnotation.type === 'BooleanTypeAnnotation') { - cases.push({ - propName: propName, - propValue: typeAnnotation.default != null ? typeAnnotation.default : true, - }); - // $FlowFixMe[incompatible-type] - } else if (typeAnnotation.type === 'IntegerTypeAnnotation') { - cases.push({ - propName, - propValue: typeAnnotation.default || 10, - }); - } else if (typeAnnotation.type === 'FloatTypeAnnotation') { - cases.push({ - propName, - propValue: typeAnnotation.default != null ? typeAnnotation.default : 0.1, - }); - } else if (typeAnnotation.type === 'ReservedPropTypeAnnotation') { - if (typeAnnotation.name === 'ColorPrimitive') { - cases.push({ - propName, - propValue: 1, - }); - } else if (typeAnnotation.name === 'PointPrimitive') { - cases.push({ - propName, - propValue: 'folly::dynamic::object("x", 1)("y", 1)', - raw: true, - }); - } else if (typeAnnotation.name === 'ImageSourcePrimitive') { - cases.push({ - propName, - propValue: 'folly::dynamic::object("url", "testurl")', - raw: true, - }); - } - } - return cases; -} -function generateTestsString(name, component) { - function createTest({testName, propName, propValue, raw = false}) { - const value = - !raw && typeof propValue === 'string' ? `"${propValue}"` : propValue; - return TestTemplate({ - componentName: name, - testName: testName != null ? testName : propName, - propName, - propValue: String(value), - }); - } - const testCases = component.props.reduce((cases, prop) => { - return cases.concat(getTestCasesForProp(prop.name, prop.typeAnnotation)); - }, []); - const baseTest = { - testName: 'DoesNotDie', - propName: 'xx_invalid_xx', - propValue: 'xx_invalid_xx', - }; - return [baseTest, ...testCases].map(createTest).join(''); -} -module.exports = { - generate( - libraryName, - schema, - packageName, - assumeNonnull = false, - headerPrefix, - ) { - const fileName = 'Tests.cpp'; - const allImports = new Set([ - '#include ', - '#include ', - '#include ', - ]); - const componentTests = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - const components = module.components; - if (components == null) { - return null; - } - return Object.keys(components) - .map(componentName => { - const component = components[componentName]; - const name = `${componentName}Props`; - const imports = getImports(component.props); - // $FlowFixMe[method-unbinding] added when improving typing for this parameters - imports.forEach(allImports.add, allImports); - return generateTestsString(name, component); - }) - .join(''); - }) - .filter(Boolean) - .join(''); - const imports = Array.from(allImports).sort().join('\n').trim(); - const replacedTemplate = FileTemplate({ - imports, - libraryName, - componentTests, - }); - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GenerateTests.js.flow b/node_modules/@react-native/codegen/lib/generators/components/GenerateTests.js.flow deleted file mode 100644 index 8017f933e..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GenerateTests.js.flow +++ /dev/null @@ -1,221 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; -import type {ComponentShape, PropTypeAnnotation} from '../../CodegenSchema'; -import type {SchemaType} from '../../CodegenSchema'; - -const {toSafeCppString} = require('../Utils'); -const {getImports} = require('./CppHelpers'); - -type FilesOutput = Map; -type PropValueType = string | number | boolean; - -type TestCase = $ReadOnly<{ - propName: string, - propValue: ?PropValueType, - testName?: string, - raw?: boolean, -}>; - -const FileTemplate = ({ - libraryName, - imports, - componentTests, -}: { - libraryName: string, - imports: string, - componentTests: string, -}) => - ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateTests.js - * */ - -#include -#include -#include -${imports} - -using namespace facebook::react; -${componentTests} -`.trim(); - -const TestTemplate = ({ - componentName, - testName, - propName, - propValue, -}: { - componentName: string, - testName: string, - propName: string, - propValue: string, -}) => ` -TEST(${componentName}_${testName}, etc) { - auto propParser = RawPropsParser(); - propParser.prepare<${componentName}>(); - auto const &sourceProps = ${componentName}(); - auto const &rawProps = RawProps(folly::dynamic::object("${propName}", ${propValue})); - - ContextContainer contextContainer{}; - PropsParserContext parserContext{-1, contextContainer}; - - rawProps.parse(propParser, parserContext); - ${componentName}(parserContext, sourceProps, rawProps); -} -`; - -function getTestCasesForProp( - propName: string, - typeAnnotation: PropTypeAnnotation, -) { - const cases = []; - if (typeAnnotation.type === 'StringEnumTypeAnnotation') { - typeAnnotation.options.forEach(option => - cases.push({ - propName, - testName: `${propName}_${toSafeCppString(option)}`, - propValue: option, - }), - ); - } else if (typeAnnotation.type === 'StringTypeAnnotation') { - cases.push({ - propName, - propValue: - typeAnnotation.default != null && typeAnnotation.default !== '' - ? typeAnnotation.default - : 'foo', - }); - } else if (typeAnnotation.type === 'BooleanTypeAnnotation') { - cases.push({ - propName: propName, - propValue: typeAnnotation.default != null ? typeAnnotation.default : true, - }); - // $FlowFixMe[incompatible-type] - } else if (typeAnnotation.type === 'IntegerTypeAnnotation') { - cases.push({ - propName, - propValue: typeAnnotation.default || 10, - }); - } else if (typeAnnotation.type === 'FloatTypeAnnotation') { - cases.push({ - propName, - propValue: typeAnnotation.default != null ? typeAnnotation.default : 0.1, - }); - } else if (typeAnnotation.type === 'ReservedPropTypeAnnotation') { - if (typeAnnotation.name === 'ColorPrimitive') { - cases.push({ - propName, - propValue: 1, - }); - } else if (typeAnnotation.name === 'PointPrimitive') { - cases.push({ - propName, - propValue: 'folly::dynamic::object("x", 1)("y", 1)', - raw: true, - }); - } else if (typeAnnotation.name === 'ImageSourcePrimitive') { - cases.push({ - propName, - propValue: 'folly::dynamic::object("url", "testurl")', - raw: true, - }); - } - } - - return cases; -} - -function generateTestsString(name: string, component: ComponentShape) { - function createTest({testName, propName, propValue, raw = false}: TestCase) { - const value = - !raw && typeof propValue === 'string' ? `"${propValue}"` : propValue; - - return TestTemplate({ - componentName: name, - testName: testName != null ? testName : propName, - propName, - propValue: String(value), - }); - } - - const testCases = component.props.reduce((cases: Array, prop) => { - return cases.concat(getTestCasesForProp(prop.name, prop.typeAnnotation)); - }, []); - - const baseTest = { - testName: 'DoesNotDie', - propName: 'xx_invalid_xx', - propValue: 'xx_invalid_xx', - }; - - return [baseTest, ...testCases].map(createTest).join(''); -} - -module.exports = { - generate( - libraryName: string, - schema: SchemaType, - packageName?: string, - assumeNonnull: boolean = false, - headerPrefix?: string, - ): FilesOutput { - const fileName = 'Tests.cpp'; - const allImports = new Set([ - '#include ', - '#include ', - '#include ', - ]); - - const componentTests = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - - const {components} = module; - if (components == null) { - return null; - } - - return Object.keys(components) - .map(componentName => { - const component = components[componentName]; - const name = `${componentName}Props`; - - const imports = getImports(component.props); - // $FlowFixMe[method-unbinding] added when improving typing for this parameters - imports.forEach(allImports.add, allImports); - - return generateTestsString(name, component); - }) - .join(''); - }) - .filter(Boolean) - .join(''); - - const imports = Array.from(allImports).sort().join('\n').trim(); - - const replacedTemplate = FileTemplate({ - imports, - libraryName, - componentTests, - }); - - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GenerateThirdPartyFabricComponentsProviderH.js b/node_modules/@react-native/codegen/lib/generators/components/GenerateThirdPartyFabricComponentsProviderH.js deleted file mode 100644 index 3c87312b4..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GenerateThirdPartyFabricComponentsProviderH.js +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('./ComponentsProviderUtils'), - generateSupportedApplePlatformsMacro = - _require.generateSupportedApplePlatformsMacro; - -// File path -> contents - -const FileTemplate = ({lookupFuncs}) => ` -/* - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by GenerateRCTThirdPartyFabricComponentsProviderH - */ - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wreturn-type-c-linkage" - -#import - -#ifdef __cplusplus -extern "C" { -#endif - -Class RCTThirdPartyFabricComponentsProvider(const char *name); -#if RCT_NEW_ARCH_ENABLED -#ifndef RCT_DYNAMIC_FRAMEWORKS - -${lookupFuncs} - -#endif -#endif - -#ifdef __cplusplus -} -#endif - -#pragma GCC diagnostic pop - -`; -const LookupFuncTemplate = ({className, libraryName}) => - ` -Class ${className}Cls(void) __attribute__((used)); // ${libraryName} -`.trim(); -module.exports = { - generate(schemas, supportedApplePlatforms) { - const fileName = 'RCTThirdPartyFabricComponentsProvider.h'; - const lookupFuncs = Object.keys(schemas) - .map(libraryName => { - const schema = schemas[libraryName]; - const librarySupportedApplePlatforms = - supportedApplePlatforms === null || supportedApplePlatforms === void 0 - ? void 0 - : supportedApplePlatforms[libraryName]; - const generatedLookup = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - const components = module.components; - // No components in this module - if (components == null) { - return null; - } - return Object.keys(components) - .filter(componentName => { - const component = components[componentName]; - return !( - component.excludedPlatforms && - component.excludedPlatforms.includes('iOS') - ); - }) - .map(componentName => { - return LookupFuncTemplate({ - className: componentName, - libraryName, - }); - }) - .join('\n'); - }) - .filter(Boolean) - .join('\n'); - return generateSupportedApplePlatformsMacro( - generatedLookup, - librarySupportedApplePlatforms, - ); - }) - .join('\n'); - const replacedTemplate = FileTemplate({ - lookupFuncs, - }); - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GenerateThirdPartyFabricComponentsProviderH.js.flow b/node_modules/@react-native/codegen/lib/generators/components/GenerateThirdPartyFabricComponentsProviderH.js.flow deleted file mode 100644 index cc42edb5a..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GenerateThirdPartyFabricComponentsProviderH.js.flow +++ /dev/null @@ -1,126 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type {SchemaType} from '../../CodegenSchema'; - -const { - generateSupportedApplePlatformsMacro, -} = require('./ComponentsProviderUtils'); - -// File path -> contents -type FilesOutput = Map; - -const FileTemplate = ({lookupFuncs}: {lookupFuncs: string}) => ` -/* - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by GenerateRCTThirdPartyFabricComponentsProviderH - */ - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wreturn-type-c-linkage" - -#import - -#ifdef __cplusplus -extern "C" { -#endif - -Class RCTThirdPartyFabricComponentsProvider(const char *name); -#if RCT_NEW_ARCH_ENABLED -#ifndef RCT_DYNAMIC_FRAMEWORKS - -${lookupFuncs} - -#endif -#endif - -#ifdef __cplusplus -} -#endif - -#pragma GCC diagnostic pop - -`; - -const LookupFuncTemplate = ({ - className, - libraryName, -}: { - className: string, - libraryName: string, -}) => - ` -Class ${className}Cls(void) __attribute__((used)); // ${libraryName} -`.trim(); - -module.exports = { - generate( - schemas: {[string]: SchemaType}, - supportedApplePlatforms?: {[string]: {[string]: boolean}}, - ): FilesOutput { - const fileName = 'RCTThirdPartyFabricComponentsProvider.h'; - - const lookupFuncs = Object.keys(schemas) - .map(libraryName => { - const schema = schemas[libraryName]; - const librarySupportedApplePlatforms = - supportedApplePlatforms?.[libraryName]; - const generatedLookup = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - - const {components} = module; - // No components in this module - if (components == null) { - return null; - } - - return Object.keys(components) - .filter(componentName => { - const component = components[componentName]; - return !( - component.excludedPlatforms && - component.excludedPlatforms.includes('iOS') - ); - }) - .map(componentName => { - return LookupFuncTemplate({ - className: componentName, - libraryName, - }); - }) - .join('\n'); - }) - .filter(Boolean) - .join('\n'); - - return generateSupportedApplePlatformsMacro( - generatedLookup, - librarySupportedApplePlatforms, - ); - }) - .join('\n'); - - const replacedTemplate = FileTemplate({ - lookupFuncs, - }); - - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GenerateThirdPartyFabricComponentsProviderObjCpp.js b/node_modules/@react-native/codegen/lib/generators/components/GenerateThirdPartyFabricComponentsProviderObjCpp.js deleted file mode 100644 index 818d89c80..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GenerateThirdPartyFabricComponentsProviderObjCpp.js +++ /dev/null @@ -1,106 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('./ComponentsProviderUtils'), - generateSupportedApplePlatformsMacro = - _require.generateSupportedApplePlatformsMacro; - -// File path -> contents - -const FileTemplate = ({lookupMap}) => ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by GenerateRCTThirdPartyFabricComponentsProviderCpp - */ - -// OSS-compatibility layer - -#import "RCTThirdPartyFabricComponentsProvider.h" - -#import -#import - -Class RCTThirdPartyFabricComponentsProvider(const char *name) { - static std::unordered_map sFabricComponentsClassMap = { - #if RCT_NEW_ARCH_ENABLED - #ifndef RCT_DYNAMIC_FRAMEWORKS -${lookupMap} - #endif - #endif - }; - - auto p = sFabricComponentsClassMap.find(name); - if (p != sFabricComponentsClassMap.end()) { - auto classFunc = p->second; - return classFunc(); - } - return nil; -} -`; -const LookupMapTemplate = ({className, libraryName}) => ` - {"${className}", ${className}Cls}, // ${libraryName}`; -module.exports = { - generate(schemas, supportedApplePlatforms) { - const fileName = 'RCTThirdPartyFabricComponentsProvider.mm'; - const lookupMap = Object.keys(schemas) - .map(libraryName => { - const schema = schemas[libraryName]; - const librarySupportedApplePlatforms = - supportedApplePlatforms === null || supportedApplePlatforms === void 0 - ? void 0 - : supportedApplePlatforms[libraryName]; - const generatedLookup = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - const components = module.components; - // No components in this module - if (components == null) { - return null; - } - const componentTemplates = Object.keys(components) - .filter(componentName => { - const component = components[componentName]; - return !( - component.excludedPlatforms && - component.excludedPlatforms.includes('iOS') - ); - }) - .map(componentName => { - const replacedTemplate = LookupMapTemplate({ - className: componentName, - libraryName, - }); - return replacedTemplate; - }); - return componentTemplates.length > 0 ? componentTemplates : null; - }) - .filter(Boolean) - .join('\n'); - return generateSupportedApplePlatformsMacro( - generatedLookup, - librarySupportedApplePlatforms, - ); - }) - .join('\n'); - const replacedTemplate = FileTemplate({ - lookupMap, - }); - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GenerateThirdPartyFabricComponentsProviderObjCpp.js.flow b/node_modules/@react-native/codegen/lib/generators/components/GenerateThirdPartyFabricComponentsProviderObjCpp.js.flow deleted file mode 100644 index ad99c9644..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GenerateThirdPartyFabricComponentsProviderObjCpp.js.flow +++ /dev/null @@ -1,125 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type {SchemaType} from '../../CodegenSchema'; - -const { - generateSupportedApplePlatformsMacro, -} = require('./ComponentsProviderUtils'); - -// File path -> contents -type FilesOutput = Map; - -const FileTemplate = ({lookupMap}: {lookupMap: string}) => ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by GenerateRCTThirdPartyFabricComponentsProviderCpp - */ - -// OSS-compatibility layer - -#import "RCTThirdPartyFabricComponentsProvider.h" - -#import -#import - -Class RCTThirdPartyFabricComponentsProvider(const char *name) { - static std::unordered_map sFabricComponentsClassMap = { - #if RCT_NEW_ARCH_ENABLED - #ifndef RCT_DYNAMIC_FRAMEWORKS -${lookupMap} - #endif - #endif - }; - - auto p = sFabricComponentsClassMap.find(name); - if (p != sFabricComponentsClassMap.end()) { - auto classFunc = p->second; - return classFunc(); - } - return nil; -} -`; - -const LookupMapTemplate = ({ - className, - libraryName, -}: { - className: string, - libraryName: string, -}) => ` - {"${className}", ${className}Cls}, // ${libraryName}`; - -module.exports = { - generate( - schemas: {[string]: SchemaType}, - supportedApplePlatforms?: {[string]: {[string]: boolean}}, - ): FilesOutput { - const fileName = 'RCTThirdPartyFabricComponentsProvider.mm'; - - const lookupMap = Object.keys(schemas) - .map(libraryName => { - const schema = schemas[libraryName]; - const librarySupportedApplePlatforms = - supportedApplePlatforms?.[libraryName]; - - const generatedLookup = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - - const {components} = module; - // No components in this module - if (components == null) { - return null; - } - - const componentTemplates = Object.keys(components) - .filter(componentName => { - const component = components[componentName]; - return !( - component.excludedPlatforms && - component.excludedPlatforms.includes('iOS') - ); - }) - .map(componentName => { - const replacedTemplate = LookupMapTemplate({ - className: componentName, - libraryName, - }); - - return replacedTemplate; - }); - - return componentTemplates.length > 0 ? componentTemplates : null; - }) - .filter(Boolean) - .join('\n'); - - return generateSupportedApplePlatformsMacro( - generatedLookup, - librarySupportedApplePlatforms, - ); - }) - .join('\n'); - - const replacedTemplate = FileTemplate({lookupMap}); - - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GenerateViewConfigJs.js b/node_modules/@react-native/codegen/lib/generators/components/GenerateViewConfigJs.js deleted file mode 100644 index 81a2b6045..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GenerateViewConfigJs.js +++ /dev/null @@ -1,414 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const j = require('jscodeshift'); - -// File path -> contents - -const FileTemplate = ({imports, componentConfig}) => ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * @flow - * - * ${'@'}generated by codegen project: GenerateViewConfigJs.js - */ - -'use strict'; - -${imports} - -${componentConfig} -`; - -// We use this to add to a set. Need to make sure we aren't importing -// this multiple times. -const UIMANAGER_IMPORT = 'const {UIManager} = require("react-native")'; -function getReactDiffProcessValue(typeAnnotation) { - switch (typeAnnotation.type) { - case 'BooleanTypeAnnotation': - case 'StringTypeAnnotation': - case 'Int32TypeAnnotation': - case 'DoubleTypeAnnotation': - case 'FloatTypeAnnotation': - case 'ObjectTypeAnnotation': - case 'StringEnumTypeAnnotation': - case 'Int32EnumTypeAnnotation': - case 'MixedTypeAnnotation': - return j.literal(true); - case 'ReservedPropTypeAnnotation': - switch (typeAnnotation.name) { - case 'ColorPrimitive': - return j.template - .expression`{ process: require('react-native/Libraries/StyleSheet/processColor').default }`; - case 'ImageSourcePrimitive': - return j.template - .expression`{ process: require('react-native/Libraries/Image/resolveAssetSource') }`; - case 'ImageRequestPrimitive': - throw new Error('ImageRequest should not be used in props'); - case 'PointPrimitive': - return j.template - .expression`{ diff: require('react-native/Libraries/Utilities/differ/pointsDiffer') }`; - case 'EdgeInsetsPrimitive': - return j.template - .expression`{ diff: require('react-native/Libraries/Utilities/differ/insetsDiffer') }`; - case 'DimensionPrimitive': - return j.literal(true); - default: - typeAnnotation.name; - throw new Error( - `Received unknown native typeAnnotation: "${typeAnnotation.name}"`, - ); - } - case 'ArrayTypeAnnotation': - if (typeAnnotation.elementType.type === 'ReservedPropTypeAnnotation') { - switch (typeAnnotation.elementType.name) { - case 'ColorPrimitive': - return j.template - .expression`{ process: require('react-native/Libraries/StyleSheet/processColorArray') }`; - case 'ImageSourcePrimitive': - case 'PointPrimitive': - case 'EdgeInsetsPrimitive': - case 'DimensionPrimitive': - return j.literal(true); - default: - throw new Error( - `Received unknown array native typeAnnotation: "${typeAnnotation.elementType.name}"`, - ); - } - } - return j.literal(true); - default: - typeAnnotation; - throw new Error( - `Received unknown typeAnnotation: "${typeAnnotation.type}"`, - ); - } -} -const ComponentTemplate = ({ - componentName, - paperComponentName, - paperComponentNameDeprecated, -}) => { - const nativeComponentName = - paperComponentName !== null && paperComponentName !== void 0 - ? paperComponentName - : componentName; - return ` -let nativeComponentName = '${nativeComponentName}'; -${ - paperComponentNameDeprecated != null - ? DeprecatedComponentNameCheckTemplate({ - componentName, - paperComponentNameDeprecated, - }) - : '' -} - -export const __INTERNAL_VIEW_CONFIG = VIEW_CONFIG; - -export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG); -`.trim(); -}; - -// Check whether the native component exists in the app binary. -// Old getViewManagerConfig() checks for the existance of the native Paper view manager. Not available in Bridgeless. -// New hasViewManagerConfig() queries Fabric’s native component registry directly. -const DeprecatedComponentNameCheckTemplate = ({ - componentName, - paperComponentNameDeprecated, -}) => - ` -if (UIManager.hasViewManagerConfig('${componentName}')) { - nativeComponentName = '${componentName}'; -} else if (UIManager.hasViewManagerConfig('${paperComponentNameDeprecated}')) { - nativeComponentName = '${paperComponentNameDeprecated}'; -} else { - throw new Error('Failed to find native component for either "${componentName}" or "${paperComponentNameDeprecated}"'); -} -`.trim(); - -// Replicates the behavior of RCTNormalizeInputEventName in RCTEventDispatcher.m -function normalizeInputEventName(name) { - if (name.startsWith('on')) { - return name.replace(/^on/, 'top'); - } else if (!name.startsWith('top')) { - return `top${name[0].toUpperCase()}${name.slice(1)}`; - } - return name; -} - -// Replicates the behavior of viewConfig in RCTComponentData.m -function getValidAttributesForEvents(events, imports) { - imports.add( - "const {ConditionallyIgnoredEventHandlers} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore');", - ); - const validAttributes = j.objectExpression( - events.map(eventType => { - return j.property('init', j.identifier(eventType.name), j.literal(true)); - }), - ); - return j.callExpression(j.identifier('ConditionallyIgnoredEventHandlers'), [ - validAttributes, - ]); -} -function generateBubblingEventInfo(event, nameOveride) { - return j.property( - 'init', - j.identifier(normalizeInputEventName(nameOveride || event.name)), - j.objectExpression([ - j.property( - 'init', - j.identifier('phasedRegistrationNames'), - j.objectExpression([ - j.property( - 'init', - j.identifier('captured'), - j.literal(`${event.name}Capture`), - ), - j.property('init', j.identifier('bubbled'), j.literal(event.name)), - ]), - ), - ]), - ); -} -function generateDirectEventInfo(event, nameOveride) { - return j.property( - 'init', - j.identifier(normalizeInputEventName(nameOveride || event.name)), - j.objectExpression([ - j.property( - 'init', - j.identifier('registrationName'), - j.literal(event.name), - ), - ]), - ); -} -function buildViewConfig(schema, componentName, component, imports) { - const componentProps = component.props; - const componentEvents = component.events; - component.extendsProps.forEach(extendProps => { - switch (extendProps.type) { - case 'ReactNativeBuiltInType': - switch (extendProps.knownTypeName) { - case 'ReactNativeCoreViewProps': - imports.add( - "const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');", - ); - return; - default: - extendProps.knownTypeName; - throw new Error('Invalid knownTypeName'); - } - default: - extendProps.type; - throw new Error('Invalid extended type'); - } - }); - const validAttributes = j.objectExpression([ - ...componentProps.map(schemaProp => { - return j.property( - 'init', - j.identifier(schemaProp.name), - getReactDiffProcessValue(schemaProp.typeAnnotation), - ); - }), - ...(componentEvents.length > 0 - ? [ - j.spreadProperty( - getValidAttributesForEvents(componentEvents, imports), - ), - ] - : []), - ]); - const bubblingEventNames = component.events - .filter(event => event.bubblingType === 'bubble') - .reduce((bubblingEvents, event) => { - // We add in the deprecated paper name so that it is in the view config. - // This means either the old event name or the new event name can fire - // and be sent to the listener until the old top level name is removed. - if (event.paperTopLevelNameDeprecated) { - bubblingEvents.push( - generateBubblingEventInfo(event, event.paperTopLevelNameDeprecated), - ); - } else { - bubblingEvents.push(generateBubblingEventInfo(event)); - } - return bubblingEvents; - }, []); - const bubblingEvents = - bubblingEventNames.length > 0 - ? j.property( - 'init', - j.identifier('bubblingEventTypes'), - j.objectExpression(bubblingEventNames), - ) - : null; - const directEventNames = component.events - .filter(event => event.bubblingType === 'direct') - .reduce((directEvents, event) => { - // We add in the deprecated paper name so that it is in the view config. - // This means either the old event name or the new event name can fire - // and be sent to the listener until the old top level name is removed. - if (event.paperTopLevelNameDeprecated) { - directEvents.push( - generateDirectEventInfo(event, event.paperTopLevelNameDeprecated), - ); - } else { - directEvents.push(generateDirectEventInfo(event)); - } - return directEvents; - }, []); - const directEvents = - directEventNames.length > 0 - ? j.property( - 'init', - j.identifier('directEventTypes'), - j.objectExpression(directEventNames), - ) - : null; - const properties = [ - j.property( - 'init', - j.identifier('uiViewClassName'), - j.literal(componentName), - ), - bubblingEvents, - directEvents, - j.property('init', j.identifier('validAttributes'), validAttributes), - ].filter(Boolean); - return j.objectExpression(properties); -} -function buildCommands(schema, componentName, component, imports) { - const commands = component.commands; - if (commands.length === 0) { - return null; - } - imports.add( - 'const {dispatchCommand} = require("react-native/Libraries/ReactNative/RendererProxy");', - ); - const properties = commands.map(command => { - const commandName = command.name; - const params = command.typeAnnotation.params; - const commandNameLiteral = j.literal(commandName); - const commandNameIdentifier = j.identifier(commandName); - const arrayParams = j.arrayExpression( - params.map(param => { - return j.identifier(param.name); - }), - ); - const expression = j.template - .expression`dispatchCommand(ref, ${commandNameLiteral}, ${arrayParams})`; - const functionParams = params.map(param => { - return j.identifier(param.name); - }); - const property = j.property( - 'init', - commandNameIdentifier, - j.functionExpression( - null, - [j.identifier('ref'), ...functionParams], - j.blockStatement([j.expressionStatement(expression)]), - ), - ); - property.method = true; - return property; - }); - return j.exportNamedDeclaration( - j.variableDeclaration('const', [ - j.variableDeclarator( - j.identifier('Commands'), - j.objectExpression(properties), - ), - ]), - ); -} -module.exports = { - generate(libraryName, schema) { - try { - const fileName = `${libraryName}NativeViewConfig.js`; - const imports = new Set(); - const moduleResults = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - const components = module.components; - return Object.keys(components) - .map(componentName => { - var _component$paperCompo; - const component = components[componentName]; - if (component.paperComponentNameDeprecated) { - imports.add(UIMANAGER_IMPORT); - } - const replacedTemplate = ComponentTemplate({ - componentName, - paperComponentName: component.paperComponentName, - paperComponentNameDeprecated: - component.paperComponentNameDeprecated, - }); - const replacedSourceRoot = j.withParser('flow')(replacedTemplate); - const paperComponentName = - (_component$paperCompo = component.paperComponentName) !== - null && _component$paperCompo !== void 0 - ? _component$paperCompo - : componentName; - replacedSourceRoot - .find(j.Identifier, { - name: 'VIEW_CONFIG', - }) - .replaceWith( - buildViewConfig( - schema, - paperComponentName, - component, - imports, - ), - ); - const commands = buildCommands( - schema, - paperComponentName, - component, - imports, - ); - if (commands) { - replacedSourceRoot - .find(j.ExportDefaultDeclaration) - .insertAfter(j(commands).toSource()); - } - const replacedSource = replacedSourceRoot.toSource({ - quote: 'single', - trailingComma: true, - }); - return replacedSource; - }) - .join('\n\n'); - }) - .filter(Boolean) - .join('\n\n'); - const replacedTemplate = FileTemplate({ - componentConfig: moduleResults, - imports: Array.from(imports).sort().join('\n'), - }); - return new Map([[fileName, replacedTemplate]]); - } catch (error) { - console.error(`\nError parsing schema for ${libraryName}\n`); - console.error(JSON.stringify(schema)); - throw error; - } - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/GenerateViewConfigJs.js.flow b/node_modules/@react-native/codegen/lib/generators/components/GenerateViewConfigJs.js.flow deleted file mode 100644 index f09b38c78..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/GenerateViewConfigJs.js.flow +++ /dev/null @@ -1,488 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - * @format - */ - -'use strict'; -import type { - ComponentShape, - EventTypeShape, - PropTypeAnnotation, -} from '../../CodegenSchema'; -import type {SchemaType} from '../../CodegenSchema'; - -const j = require('jscodeshift'); - -// File path -> contents -type FilesOutput = Map; - -const FileTemplate = ({ - imports, - componentConfig, -}: { - imports: string, - componentConfig: string, -}) => ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * @flow - * - * ${'@'}generated by codegen project: GenerateViewConfigJs.js - */ - -'use strict'; - -${imports} - -${componentConfig} -`; - -// We use this to add to a set. Need to make sure we aren't importing -// this multiple times. -const UIMANAGER_IMPORT = 'const {UIManager} = require("react-native")'; - -function getReactDiffProcessValue(typeAnnotation: PropTypeAnnotation) { - switch (typeAnnotation.type) { - case 'BooleanTypeAnnotation': - case 'StringTypeAnnotation': - case 'Int32TypeAnnotation': - case 'DoubleTypeAnnotation': - case 'FloatTypeAnnotation': - case 'ObjectTypeAnnotation': - case 'StringEnumTypeAnnotation': - case 'Int32EnumTypeAnnotation': - case 'MixedTypeAnnotation': - return j.literal(true); - case 'ReservedPropTypeAnnotation': - switch (typeAnnotation.name) { - case 'ColorPrimitive': - return j.template - .expression`{ process: require('react-native/Libraries/StyleSheet/processColor').default }`; - case 'ImageSourcePrimitive': - return j.template - .expression`{ process: require('react-native/Libraries/Image/resolveAssetSource') }`; - case 'ImageRequestPrimitive': - throw new Error('ImageRequest should not be used in props'); - case 'PointPrimitive': - return j.template - .expression`{ diff: require('react-native/Libraries/Utilities/differ/pointsDiffer') }`; - case 'EdgeInsetsPrimitive': - return j.template - .expression`{ diff: require('react-native/Libraries/Utilities/differ/insetsDiffer') }`; - case 'DimensionPrimitive': - return j.literal(true); - default: - (typeAnnotation.name: empty); - throw new Error( - `Received unknown native typeAnnotation: "${typeAnnotation.name}"`, - ); - } - case 'ArrayTypeAnnotation': - if (typeAnnotation.elementType.type === 'ReservedPropTypeAnnotation') { - switch (typeAnnotation.elementType.name) { - case 'ColorPrimitive': - return j.template - .expression`{ process: require('react-native/Libraries/StyleSheet/processColorArray') }`; - case 'ImageSourcePrimitive': - case 'PointPrimitive': - case 'EdgeInsetsPrimitive': - case 'DimensionPrimitive': - return j.literal(true); - default: - throw new Error( - `Received unknown array native typeAnnotation: "${typeAnnotation.elementType.name}"`, - ); - } - } - return j.literal(true); - default: - (typeAnnotation: empty); - throw new Error( - `Received unknown typeAnnotation: "${typeAnnotation.type}"`, - ); - } -} - -const ComponentTemplate = ({ - componentName, - paperComponentName, - paperComponentNameDeprecated, -}: { - componentName: string, - paperComponentName: ?string, - paperComponentNameDeprecated: ?string, -}) => { - const nativeComponentName = paperComponentName ?? componentName; - - return ` -let nativeComponentName = '${nativeComponentName}'; -${ - paperComponentNameDeprecated != null - ? DeprecatedComponentNameCheckTemplate({ - componentName, - paperComponentNameDeprecated, - }) - : '' -} - -export const __INTERNAL_VIEW_CONFIG = VIEW_CONFIG; - -export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG); -`.trim(); -}; - -// Check whether the native component exists in the app binary. -// Old getViewManagerConfig() checks for the existance of the native Paper view manager. Not available in Bridgeless. -// New hasViewManagerConfig() queries Fabric’s native component registry directly. -const DeprecatedComponentNameCheckTemplate = ({ - componentName, - paperComponentNameDeprecated, -}: { - componentName: string, - paperComponentNameDeprecated: string, -}) => - ` -if (UIManager.hasViewManagerConfig('${componentName}')) { - nativeComponentName = '${componentName}'; -} else if (UIManager.hasViewManagerConfig('${paperComponentNameDeprecated}')) { - nativeComponentName = '${paperComponentNameDeprecated}'; -} else { - throw new Error('Failed to find native component for either "${componentName}" or "${paperComponentNameDeprecated}"'); -} -`.trim(); - -// Replicates the behavior of RCTNormalizeInputEventName in RCTEventDispatcher.m -function normalizeInputEventName(name: string) { - if (name.startsWith('on')) { - return name.replace(/^on/, 'top'); - } else if (!name.startsWith('top')) { - return `top${name[0].toUpperCase()}${name.slice(1)}`; - } - - return name; -} - -// Replicates the behavior of viewConfig in RCTComponentData.m -function getValidAttributesForEvents( - events: $ReadOnlyArray, - imports: Set, -) { - imports.add( - "const {ConditionallyIgnoredEventHandlers} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore');", - ); - - const validAttributes = j.objectExpression( - events.map(eventType => { - return j.property('init', j.identifier(eventType.name), j.literal(true)); - }), - ); - - return j.callExpression(j.identifier('ConditionallyIgnoredEventHandlers'), [ - validAttributes, - ]); -} - -function generateBubblingEventInfo( - event: EventTypeShape, - nameOveride: void | string, -) { - return j.property( - 'init', - j.identifier(normalizeInputEventName(nameOveride || event.name)), - j.objectExpression([ - j.property( - 'init', - j.identifier('phasedRegistrationNames'), - j.objectExpression([ - j.property( - 'init', - j.identifier('captured'), - j.literal(`${event.name}Capture`), - ), - j.property('init', j.identifier('bubbled'), j.literal(event.name)), - ]), - ), - ]), - ); -} - -function generateDirectEventInfo( - event: EventTypeShape, - nameOveride: void | string, -) { - return j.property( - 'init', - j.identifier(normalizeInputEventName(nameOveride || event.name)), - j.objectExpression([ - j.property( - 'init', - j.identifier('registrationName'), - j.literal(event.name), - ), - ]), - ); -} - -function buildViewConfig( - schema: SchemaType, - componentName: string, - component: ComponentShape, - imports: Set, -) { - const componentProps = component.props; - const componentEvents = component.events; - - component.extendsProps.forEach(extendProps => { - switch (extendProps.type) { - case 'ReactNativeBuiltInType': - switch (extendProps.knownTypeName) { - case 'ReactNativeCoreViewProps': - imports.add( - "const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');", - ); - - return; - default: - (extendProps.knownTypeName: empty); - throw new Error('Invalid knownTypeName'); - } - default: - (extendProps.type: empty); - throw new Error('Invalid extended type'); - } - }); - - const validAttributes = j.objectExpression([ - ...componentProps.map(schemaProp => { - return j.property( - 'init', - j.identifier(schemaProp.name), - getReactDiffProcessValue(schemaProp.typeAnnotation), - ); - }), - ...(componentEvents.length > 0 - ? [ - j.spreadProperty( - getValidAttributesForEvents(componentEvents, imports), - ), - ] - : []), - ]); - - const bubblingEventNames = component.events - .filter(event => event.bubblingType === 'bubble') - .reduce((bubblingEvents: Array, event) => { - // We add in the deprecated paper name so that it is in the view config. - // This means either the old event name or the new event name can fire - // and be sent to the listener until the old top level name is removed. - if (event.paperTopLevelNameDeprecated) { - bubblingEvents.push( - generateBubblingEventInfo(event, event.paperTopLevelNameDeprecated), - ); - } else { - bubblingEvents.push(generateBubblingEventInfo(event)); - } - return bubblingEvents; - }, []); - - const bubblingEvents = - bubblingEventNames.length > 0 - ? j.property( - 'init', - j.identifier('bubblingEventTypes'), - j.objectExpression(bubblingEventNames), - ) - : null; - - const directEventNames = component.events - .filter(event => event.bubblingType === 'direct') - .reduce((directEvents: Array, event) => { - // We add in the deprecated paper name so that it is in the view config. - // This means either the old event name or the new event name can fire - // and be sent to the listener until the old top level name is removed. - if (event.paperTopLevelNameDeprecated) { - directEvents.push( - generateDirectEventInfo(event, event.paperTopLevelNameDeprecated), - ); - } else { - directEvents.push(generateDirectEventInfo(event)); - } - return directEvents; - }, []); - - const directEvents = - directEventNames.length > 0 - ? j.property( - 'init', - j.identifier('directEventTypes'), - j.objectExpression(directEventNames), - ) - : null; - - const properties = [ - j.property( - 'init', - j.identifier('uiViewClassName'), - j.literal(componentName), - ), - bubblingEvents, - directEvents, - j.property('init', j.identifier('validAttributes'), validAttributes), - ].filter(Boolean); - - return j.objectExpression(properties); -} - -function buildCommands( - schema: SchemaType, - componentName: string, - component: ComponentShape, - imports: Set, -) { - const commands = component.commands; - - if (commands.length === 0) { - return null; - } - - imports.add( - 'const {dispatchCommand} = require("react-native/Libraries/ReactNative/RendererProxy");', - ); - - const properties = commands.map(command => { - const commandName = command.name; - const params = command.typeAnnotation.params; - - const commandNameLiteral = j.literal(commandName); - const commandNameIdentifier = j.identifier(commandName); - const arrayParams = j.arrayExpression( - params.map(param => { - return j.identifier(param.name); - }), - ); - - const expression = j.template - .expression`dispatchCommand(ref, ${commandNameLiteral}, ${arrayParams})`; - - const functionParams = params.map(param => { - return j.identifier(param.name); - }); - - const property = j.property( - 'init', - commandNameIdentifier, - j.functionExpression( - null, - [j.identifier('ref'), ...functionParams], - j.blockStatement([j.expressionStatement(expression)]), - ), - ); - property.method = true; - - return property; - }); - - return j.exportNamedDeclaration( - j.variableDeclaration('const', [ - j.variableDeclarator( - j.identifier('Commands'), - j.objectExpression(properties), - ), - ]), - ); -} - -module.exports = { - generate(libraryName: string, schema: SchemaType): FilesOutput { - try { - const fileName = `${libraryName}NativeViewConfig.js`; - const imports: Set = new Set(); - - const moduleResults = Object.keys(schema.modules) - .map(moduleName => { - const module = schema.modules[moduleName]; - if (module.type !== 'Component') { - return; - } - - const {components} = module; - - return Object.keys(components) - .map((componentName: string) => { - const component = components[componentName]; - - if (component.paperComponentNameDeprecated) { - imports.add(UIMANAGER_IMPORT); - } - - const replacedTemplate = ComponentTemplate({ - componentName, - paperComponentName: component.paperComponentName, - paperComponentNameDeprecated: - component.paperComponentNameDeprecated, - }); - - const replacedSourceRoot = j.withParser('flow')(replacedTemplate); - - const paperComponentName = - component.paperComponentName ?? componentName; - - replacedSourceRoot - .find(j.Identifier, { - name: 'VIEW_CONFIG', - }) - .replaceWith( - buildViewConfig( - schema, - paperComponentName, - component, - imports, - ), - ); - - const commands = buildCommands( - schema, - paperComponentName, - component, - imports, - ); - if (commands) { - replacedSourceRoot - .find(j.ExportDefaultDeclaration) - .insertAfter(j(commands).toSource()); - } - - const replacedSource: string = replacedSourceRoot.toSource({ - quote: 'single', - trailingComma: true, - }); - - return replacedSource; - }) - .join('\n\n'); - }) - .filter(Boolean) - .join('\n\n'); - - const replacedTemplate = FileTemplate({ - componentConfig: moduleResults, - imports: Array.from(imports).sort().join('\n'), - }); - - return new Map([[fileName, replacedTemplate]]); - } catch (error) { - console.error(`\nError parsing schema for ${libraryName}\n`); - console.error(JSON.stringify(schema)); - throw error; - } - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/JavaHelpers.js b/node_modules/@react-native/codegen/lib/generators/components/JavaHelpers.js deleted file mode 100644 index 61526fc18..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/JavaHelpers.js +++ /dev/null @@ -1,111 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -function upperCaseFirst(inString) { - return inString[0].toUpperCase() + inString.slice(1); -} -function getInterfaceJavaClassName(componentName) { - return `${componentName.replace(/^RCT/, '')}ManagerInterface`; -} -function getDelegateJavaClassName(componentName) { - return `${componentName.replace(/^RCT/, '')}ManagerDelegate`; -} -function toSafeJavaString(input, shouldUpperCaseFirst) { - const parts = input.split('-'); - if (shouldUpperCaseFirst === false) { - return parts.join(''); - } - return parts.map(upperCaseFirst).join(''); -} -function getImports(component, type) { - const imports = new Set(); - component.extendsProps.forEach(extendProps => { - switch (extendProps.type) { - case 'ReactNativeBuiltInType': - switch (extendProps.knownTypeName) { - case 'ReactNativeCoreViewProps': - imports.add('import android.view.View;'); - return; - default: - extendProps.knownTypeName; - throw new Error('Invalid knownTypeName'); - } - default: - extendProps.type; - throw new Error('Invalid extended type'); - } - }); - function addImportsForNativeName(name) { - switch (name) { - case 'ColorPrimitive': - if (type === 'delegate') { - imports.add('import com.facebook.react.bridge.ColorPropConverter;'); - } - return; - case 'ImageSourcePrimitive': - imports.add('import com.facebook.react.bridge.ReadableMap;'); - return; - case 'PointPrimitive': - imports.add('import com.facebook.react.bridge.ReadableMap;'); - return; - case 'EdgeInsetsPrimitive': - imports.add('import com.facebook.react.bridge.ReadableMap;'); - return; - case 'DimensionPrimitive': - if (type === 'delegate') { - imports.add( - 'import com.facebook.react.bridge.DimensionPropConverter;', - ); - } else { - imports.add('import com.facebook.yoga.YogaValue;'); - } - return; - default: - name; - throw new Error(`Invalid ReservedPropTypeAnnotation name, got ${name}`); - } - } - component.props.forEach(prop => { - const typeAnnotation = prop.typeAnnotation; - if (typeAnnotation.type === 'ReservedPropTypeAnnotation') { - addImportsForNativeName(typeAnnotation.name); - } - if (typeAnnotation.type === 'ArrayTypeAnnotation') { - imports.add('import com.facebook.react.bridge.ReadableArray;'); - } - if (typeAnnotation.type === 'ObjectTypeAnnotation') { - imports.add('import com.facebook.react.bridge.ReadableMap;'); - } - if (typeAnnotation.type === 'MixedTypeAnnotation') { - if (type === 'delegate') { - imports.add('import com.facebook.react.bridge.DynamicFromObject;'); - } else { - imports.add('import com.facebook.react.bridge.Dynamic;'); - } - } - }); - component.commands.forEach(command => { - command.typeAnnotation.params.forEach(param => { - const cmdParamType = param.typeAnnotation.type; - if (cmdParamType === 'ArrayTypeAnnotation') { - imports.add('import com.facebook.react.bridge.ReadableArray;'); - } - }); - }); - return imports; -} -module.exports = { - getInterfaceJavaClassName, - getDelegateJavaClassName, - toSafeJavaString, - getImports, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/JavaHelpers.js.flow b/node_modules/@react-native/codegen/lib/generators/components/JavaHelpers.js.flow deleted file mode 100644 index 9b835bb6f..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/JavaHelpers.js.flow +++ /dev/null @@ -1,147 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type {ComponentShape} from '../../CodegenSchema'; - -function upperCaseFirst(inString: string): string { - return inString[0].toUpperCase() + inString.slice(1); -} - -function getInterfaceJavaClassName(componentName: string): string { - return `${componentName.replace(/^RCT/, '')}ManagerInterface`; -} - -function getDelegateJavaClassName(componentName: string): string { - return `${componentName.replace(/^RCT/, '')}ManagerDelegate`; -} - -function toSafeJavaString( - input: string, - shouldUpperCaseFirst?: boolean, -): string { - const parts = input.split('-'); - - if (shouldUpperCaseFirst === false) { - return parts.join(''); - } - - return parts.map(upperCaseFirst).join(''); -} - -function getImports( - component: ComponentShape, - type: 'interface' | 'delegate', -): Set { - const imports: Set = new Set(); - - component.extendsProps.forEach(extendProps => { - switch (extendProps.type) { - case 'ReactNativeBuiltInType': - switch (extendProps.knownTypeName) { - case 'ReactNativeCoreViewProps': - imports.add('import android.view.View;'); - return; - default: - (extendProps.knownTypeName: empty); - throw new Error('Invalid knownTypeName'); - } - default: - (extendProps.type: empty); - throw new Error('Invalid extended type'); - } - }); - - function addImportsForNativeName( - name: - | 'ColorPrimitive' - | 'EdgeInsetsPrimitive' - | 'ImageSourcePrimitive' - | 'PointPrimitive' - | 'DimensionPrimitive' - | $TEMPORARY$string<'ColorPrimitive'> - | $TEMPORARY$string<'EdgeInsetsPrimitive'> - | $TEMPORARY$string<'ImageSourcePrimitive'> - | $TEMPORARY$string<'PointPrimitive'> - | $TEMPORARY$string<'DimensionPrimitive'>, - ) { - switch (name) { - case 'ColorPrimitive': - if (type === 'delegate') { - imports.add('import com.facebook.react.bridge.ColorPropConverter;'); - } - return; - case 'ImageSourcePrimitive': - imports.add('import com.facebook.react.bridge.ReadableMap;'); - return; - case 'PointPrimitive': - imports.add('import com.facebook.react.bridge.ReadableMap;'); - return; - case 'EdgeInsetsPrimitive': - imports.add('import com.facebook.react.bridge.ReadableMap;'); - return; - case 'DimensionPrimitive': - if (type === 'delegate') { - imports.add( - 'import com.facebook.react.bridge.DimensionPropConverter;', - ); - } else { - imports.add('import com.facebook.yoga.YogaValue;'); - } - return; - default: - (name: empty); - throw new Error(`Invalid ReservedPropTypeAnnotation name, got ${name}`); - } - } - - component.props.forEach(prop => { - const typeAnnotation = prop.typeAnnotation; - - if (typeAnnotation.type === 'ReservedPropTypeAnnotation') { - addImportsForNativeName(typeAnnotation.name); - } - - if (typeAnnotation.type === 'ArrayTypeAnnotation') { - imports.add('import com.facebook.react.bridge.ReadableArray;'); - } - - if (typeAnnotation.type === 'ObjectTypeAnnotation') { - imports.add('import com.facebook.react.bridge.ReadableMap;'); - } - - if (typeAnnotation.type === 'MixedTypeAnnotation') { - if (type === 'delegate') { - imports.add('import com.facebook.react.bridge.DynamicFromObject;'); - } else { - imports.add('import com.facebook.react.bridge.Dynamic;'); - } - } - }); - - component.commands.forEach(command => { - command.typeAnnotation.params.forEach(param => { - const cmdParamType = param.typeAnnotation.type; - if (cmdParamType === 'ArrayTypeAnnotation') { - imports.add('import com.facebook.react.bridge.ReadableArray;'); - } - }); - }); - - return imports; -} - -module.exports = { - getInterfaceJavaClassName, - getDelegateJavaClassName, - toSafeJavaString, - getImports, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/__test_fixtures__/fixtures.js b/node_modules/@react-native/codegen/lib/generators/components/__test_fixtures__/fixtures.js deleted file mode 100644 index e61cd063b..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/__test_fixtures__/fixtures.js +++ /dev/null @@ -1,1878 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const NO_PROPS_NO_EVENTS = { - modules: { - NoPropsNoEvents: { - type: 'Component', - components: { - NoPropsNoEventsComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [], - commands: [], - }, - }, - }, - }, -}; -const INTERFACE_ONLY = { - modules: { - Switch: { - type: 'Component', - components: { - InterfaceOnlyComponent: { - interfaceOnly: true, - paperComponentName: 'RCTInterfaceOnlyComponent', - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [ - { - name: 'onChange', - optional: true, - bubblingType: 'bubble', - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'value', - optional: false, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ], - }, - }, - }, - ], - props: [ - { - name: 'accessibilityHint', - optional: true, - typeAnnotation: { - type: 'StringTypeAnnotation', - default: '', - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; -const EVENTS_WITH_PAPER_NAME = { - modules: { - Switch: { - type: 'Component', - components: { - InterfaceOnlyComponent: { - interfaceOnly: true, - paperComponentName: 'RCTInterfaceOnlyComponent', - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [ - { - name: 'onChange', - paperTopLevelNameDeprecated: 'paperChange', - optional: true, - bubblingType: 'bubble', - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'value', - optional: false, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ], - }, - }, - }, - { - name: 'onDirectChange', - paperTopLevelNameDeprecated: 'paperDirectChange', - optional: true, - bubblingType: 'direct', - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'value', - optional: false, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ], - }, - }, - }, - ], - props: [], - commands: [], - }, - }, - }, - }, -}; -const BOOLEAN_PROP = { - modules: { - Switch: { - type: 'Component', - components: { - BooleanPropNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'disabled', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: false, - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; -const STRING_PROP = { - modules: { - Switch: { - type: 'Component', - components: { - StringPropComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'accessibilityHint', - optional: true, - typeAnnotation: { - type: 'StringTypeAnnotation', - default: '', - }, - }, - { - name: 'accessibilityRole', - optional: true, - typeAnnotation: { - type: 'StringTypeAnnotation', - default: null, - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; -const INTEGER_PROPS = { - modules: { - Switch: { - type: 'Component', - components: { - IntegerPropNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'progress1', - optional: true, - typeAnnotation: { - type: 'Int32TypeAnnotation', - default: 0, - }, - }, - { - name: 'progress2', - optional: true, - typeAnnotation: { - type: 'Int32TypeAnnotation', - default: -1, - }, - }, - { - name: 'progress3', - optional: true, - typeAnnotation: { - type: 'Int32TypeAnnotation', - default: 10, - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; -const FLOAT_PROPS = { - modules: { - Switch: { - type: 'Component', - components: { - FloatPropNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'blurRadius', - optional: false, - typeAnnotation: { - type: 'FloatTypeAnnotation', - default: 0.0, - }, - }, - { - name: 'blurRadius2', - optional: true, - typeAnnotation: { - type: 'FloatTypeAnnotation', - default: 0.001, - }, - }, - { - name: 'blurRadius3', - optional: true, - typeAnnotation: { - type: 'FloatTypeAnnotation', - default: 2.1, - }, - }, - { - name: 'blurRadius4', - optional: true, - typeAnnotation: { - type: 'FloatTypeAnnotation', - default: 0, - }, - }, - { - name: 'blurRadius5', - optional: true, - typeAnnotation: { - type: 'FloatTypeAnnotation', - default: 1, - }, - }, - { - name: 'blurRadius6', - optional: true, - typeAnnotation: { - type: 'FloatTypeAnnotation', - default: -0.0, - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; -const DOUBLE_PROPS = { - modules: { - Switch: { - type: 'Component', - components: { - DoublePropNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'blurRadius', - optional: false, - typeAnnotation: { - type: 'DoubleTypeAnnotation', - default: 0.0, - }, - }, - { - name: 'blurRadius2', - optional: true, - typeAnnotation: { - type: 'DoubleTypeAnnotation', - default: 0.001, - }, - }, - { - name: 'blurRadius3', - optional: true, - typeAnnotation: { - type: 'DoubleTypeAnnotation', - default: 2.1, - }, - }, - { - name: 'blurRadius4', - optional: true, - typeAnnotation: { - type: 'DoubleTypeAnnotation', - default: 0, - }, - }, - { - name: 'blurRadius5', - optional: true, - typeAnnotation: { - type: 'DoubleTypeAnnotation', - default: 1, - }, - }, - { - name: 'blurRadius6', - optional: true, - typeAnnotation: { - type: 'DoubleTypeAnnotation', - default: -0.0, - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; -const COLOR_PROP = { - modules: { - Switch: { - type: 'Component', - components: { - ColorPropNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'tintColor', - optional: true, - typeAnnotation: { - type: 'ReservedPropTypeAnnotation', - name: 'ColorPrimitive', - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; -const IMAGE_PROP = { - modules: { - Slider: { - type: 'Component', - components: { - ImagePropNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'thumbImage', - optional: true, - typeAnnotation: { - type: 'ReservedPropTypeAnnotation', - name: 'ImageSourcePrimitive', - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; -const POINT_PROP = { - modules: { - Switch: { - type: 'Component', - components: { - PointPropNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'startPoint', - optional: true, - typeAnnotation: { - type: 'ReservedPropTypeAnnotation', - name: 'PointPrimitive', - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; -const INSETS_PROP = { - modules: { - ScrollView: { - type: 'Component', - components: { - InsetsPropNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'contentInset', - optional: true, - typeAnnotation: { - type: 'ReservedPropTypeAnnotation', - name: 'EdgeInsetsPrimitive', - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; -const DIMENSION_PROP = { - modules: { - CustomView: { - type: 'Component', - components: { - DimensionPropNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'marginBack', - optional: true, - typeAnnotation: { - type: 'ReservedPropTypeAnnotation', - name: 'DimensionPrimitive', - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; -const ARRAY_PROPS = { - modules: { - Slider: { - type: 'Component', - components: { - ArrayPropsNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'names', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'StringTypeAnnotation', - }, - }, - }, - { - name: 'disableds', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'BooleanTypeAnnotation', - }, - }, - }, - { - name: 'progress', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'Int32TypeAnnotation', - }, - }, - }, - { - name: 'radii', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'FloatTypeAnnotation', - }, - }, - }, - { - name: 'colors', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ReservedPropTypeAnnotation', - name: 'ColorPrimitive', - }, - }, - }, - { - name: 'srcs', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ReservedPropTypeAnnotation', - name: 'ImageSourcePrimitive', - }, - }, - }, - { - name: 'points', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ReservedPropTypeAnnotation', - name: 'PointPrimitive', - }, - }, - }, - { - name: 'dimensions', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ReservedPropTypeAnnotation', - name: 'DimensionPrimitive', - }, - }, - }, - { - name: 'sizes', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'StringEnumTypeAnnotation', - default: 'small', - options: ['small', 'large'], - }, - }, - }, - { - name: 'object', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'stringProp', - optional: true, - typeAnnotation: { - type: 'StringTypeAnnotation', - default: '', - }, - }, - ], - }, - }, - }, - { - name: 'array', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ObjectTypeAnnotation', - properties: [ - { - // This needs to stay the same as the object above - // to confirm that the structs are generated - // with unique non-colliding names - name: 'object', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'stringProp', - optional: true, - typeAnnotation: { - type: 'StringTypeAnnotation', - default: '', - }, - }, - ], - }, - }, - }, - ], - }, - }, - }, - { - name: 'arrayOfArrayOfObject', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'stringProp', - optional: true, - typeAnnotation: { - type: 'StringTypeAnnotation', - default: '', - }, - }, - ], - }, - }, - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; -const ARRAY_PROPS_WITH_NESTED_OBJECT = { - modules: { - Slider: { - type: 'Component', - components: { - ArrayPropsNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'nativePrimitives', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'colors', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ReservedPropTypeAnnotation', - name: 'ColorPrimitive', - }, - }, - }, - { - name: 'srcs', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ReservedPropTypeAnnotation', - name: 'ImageSourcePrimitive', - }, - }, - }, - { - name: 'points', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ReservedPropTypeAnnotation', - name: 'PointPrimitive', - }, - }, - }, - ], - }, - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; -const OBJECT_PROPS = { - modules: { - ObjectPropsNativeComponent: { - type: 'Component', - components: { - ObjectProps: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'objectProp', - optional: true, - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'stringProp', - optional: true, - typeAnnotation: { - type: 'StringTypeAnnotation', - default: '', - }, - }, - { - name: 'booleanProp', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: false, - }, - }, - { - name: 'floatProp', - optional: true, - typeAnnotation: { - type: 'FloatTypeAnnotation', - default: 0.0, - }, - }, - { - name: 'intProp', - optional: true, - typeAnnotation: { - type: 'Int32TypeAnnotation', - default: 0, - }, - }, - { - name: 'stringUserDefaultProp', - optional: true, - typeAnnotation: { - type: 'StringTypeAnnotation', - default: 'user_default', - }, - }, - { - name: 'booleanUserDefaultProp', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: true, - }, - }, - { - name: 'floatUserDefaultProp', - optional: true, - typeAnnotation: { - type: 'FloatTypeAnnotation', - default: 3.14, - }, - }, - { - name: 'intUserDefaultProp', - optional: true, - typeAnnotation: { - type: 'Int32TypeAnnotation', - default: 9999, - }, - }, - { - name: 'stringEnumProp', - optional: true, - typeAnnotation: { - type: 'StringEnumTypeAnnotation', - default: 'option1', - options: ['option1'], - }, - }, - { - name: 'intEnumProp', - optional: true, - typeAnnotation: { - type: 'Int32EnumTypeAnnotation', - default: 0, - options: [0], - }, - }, - { - name: 'objectArrayProp', - optional: false, - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'array', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'StringTypeAnnotation', - }, - }, - }, - ], - }, - }, - { - name: 'objectPrimitiveRequiredProp', - optional: false, - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'image', - optional: true, - typeAnnotation: { - type: 'ReservedPropTypeAnnotation', - name: 'ImageSourcePrimitive', - }, - }, - { - name: 'color', - optional: true, - typeAnnotation: { - type: 'ReservedPropTypeAnnotation', - name: 'ColorPrimitive', - }, - }, - { - name: 'point', - optional: true, - typeAnnotation: { - type: 'ReservedPropTypeAnnotation', - name: 'PointPrimitive', - }, - }, - ], - }, - }, - { - name: 'nestedPropA', - optional: false, - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'nestedPropB', - optional: false, - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'nestedPropC', - optional: true, - typeAnnotation: { - type: 'StringTypeAnnotation', - default: '', - }, - }, - ], - }, - }, - ], - }, - }, - { - name: 'nestedArrayAsProperty', - optional: false, - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'arrayProp', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'stringProp', - optional: false, - typeAnnotation: { - type: 'StringTypeAnnotation', - default: '', - }, - }, - ], - }, - }, - }, - ], - }, - }, - ], - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; -const MULTI_NATIVE_PROP = { - modules: { - Slider: { - type: 'Component', - components: { - ImageColorPropNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'thumbImage', - optional: true, - typeAnnotation: { - type: 'ReservedPropTypeAnnotation', - name: 'ImageSourcePrimitive', - }, - }, - { - name: 'color', - optional: true, - typeAnnotation: { - type: 'ReservedPropTypeAnnotation', - name: 'ColorPrimitive', - }, - }, - { - name: 'thumbTintColor', - optional: true, - typeAnnotation: { - type: 'ReservedPropTypeAnnotation', - name: 'ColorPrimitive', - }, - }, - { - name: 'point', - optional: true, - typeAnnotation: { - type: 'ReservedPropTypeAnnotation', - name: 'PointPrimitive', - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; -const STRING_ENUM_PROP = { - modules: { - Switch: { - type: 'Component', - components: { - StringEnumPropsNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'alignment', - optional: true, - typeAnnotation: { - type: 'StringEnumTypeAnnotation', - default: 'center', - options: ['top', 'center', 'bottom-right'], - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; -const INT32_ENUM_PROP = { - modules: { - Switch: { - type: 'Component', - components: { - Int32EnumPropsNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'maxInterval', - optional: true, - typeAnnotation: { - type: 'Int32EnumTypeAnnotation', - default: 0, - options: [0, 1, 2], - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; -const MIXED_PROP = { - modules: { - CustomView: { - type: 'Component', - components: { - MixedPropNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'mixedProp', - optional: false, - typeAnnotation: { - type: 'MixedTypeAnnotation', - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; -const EVENT_PROPS = { - modules: { - Switch: { - type: 'Component', - components: { - EventsNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [ - { - name: 'onChange', - optional: true, - bubblingType: 'bubble', - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'value', - optional: false, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - { - name: 'source', - optional: true, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - name: 'progress', - optional: true, - typeAnnotation: { - type: 'Int32TypeAnnotation', - }, - }, - { - name: 'scale', - optional: true, - typeAnnotation: { - type: 'FloatTypeAnnotation', - }, - }, - ], - }, - }, - }, - { - name: 'onArrayEventType', - optional: true, - bubblingType: 'bubble', - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'bool_array_event_prop', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'BooleanTypeAnnotation', - }, - }, - }, - { - name: 'string_enum_event_prop', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'StringEnumTypeAnnotation', - options: ['YES', 'NO'], - }, - }, - }, - { - name: 'array_array_event_prop', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'StringTypeAnnotation', - }, - }, - }, - }, - { - name: 'array_object_event_prop', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'lat', - optional: false, - typeAnnotation: { - type: 'DoubleTypeAnnotation', - }, - }, - { - name: 'lon', - optional: false, - typeAnnotation: { - type: 'DoubleTypeAnnotation', - }, - }, - { - name: 'names', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'StringTypeAnnotation', - }, - }, - }, - ], - }, - }, - }, - { - name: 'array_mixed_event_prop', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'MixedTypeAnnotation', - }, - }, - }, - ], - }, - }, - }, - { - name: 'onEventDirect', - optional: true, - bubblingType: 'direct', - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'value', - optional: false, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ], - }, - }, - }, - { - name: 'onOrientationChange', - optional: true, - bubblingType: 'direct', - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'orientation', - optional: false, - typeAnnotation: { - type: 'StringEnumTypeAnnotation', - options: ['landscape', 'portrait'], - }, - }, - ], - }, - }, - }, - { - name: 'onEnd', - optional: true, - bubblingType: 'bubble', - typeAnnotation: { - type: 'EventTypeAnnotation', - }, - }, - { - name: 'onEventWithMixedPropAttribute', - optional: true, - bubblingType: 'direct', - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'value', - optional: false, - typeAnnotation: { - type: 'MixedTypeAnnotation', - }, - }, - ], - }, - }, - }, - ], - props: [ - { - name: 'disabled', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: false, - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; -const EVENT_NESTED_OBJECT_PROPS = { - modules: { - Switch: { - type: 'Component', - components: { - EventsNestedObjectNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [ - { - name: 'onChange', - optional: true, - bubblingType: 'bubble', - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'location', - optional: false, - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'source', - optional: false, - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'url', - optional: false, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'x', - optional: false, - typeAnnotation: { - type: 'Int32TypeAnnotation', - }, - }, - { - name: 'y', - optional: false, - typeAnnotation: { - type: 'Int32TypeAnnotation', - }, - }, - ], - }, - }, - ], - }, - }, - }, - ], - props: [ - { - name: 'disabled', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: false, - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; -const TWO_COMPONENTS_SAME_FILE = { - modules: { - MyComponents: { - type: 'Component', - components: { - MultiComponent1NativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'disabled', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: false, - }, - }, - ], - commands: [], - }, - MultiComponent2NativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'disabled', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: true, - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; -const TWO_COMPONENTS_DIFFERENT_FILES = { - modules: { - ComponentFile1: { - type: 'Component', - components: { - MultiFile1NativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'disabled', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: false, - }, - }, - ], - commands: [], - }, - }, - }, - ComponentFile2: { - type: 'Component', - components: { - MultiFile2NativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'disabled', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: true, - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; -const COMMANDS = { - modules: { - Switch: { - type: 'Component', - components: { - CommandNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [], - commands: [ - { - name: 'flashScrollIndicators', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - params: [], - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - }, - }, - { - name: 'allTypes', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - params: [ - { - name: 'x', - optional: false, - typeAnnotation: { - type: 'Int32TypeAnnotation', - }, - }, - { - name: 'y', - optional: false, - typeAnnotation: { - type: 'FloatTypeAnnotation', - }, - }, - { - name: 'z', - optional: false, - typeAnnotation: { - type: 'DoubleTypeAnnotation', - }, - }, - { - name: 'message', - optional: false, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - name: 'animated', - optional: false, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ], - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - }, - }, - ], - }, - }, - }, - }, -}; -const COMMANDS_AND_PROPS = { - modules: { - Switch: { - type: 'Component', - components: { - CommandNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'accessibilityHint', - optional: true, - typeAnnotation: { - type: 'StringTypeAnnotation', - default: '', - }, - }, - ], - commands: [ - { - name: 'handleRootTag', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - params: [ - { - name: 'rootTag', - optional: false, - typeAnnotation: { - type: 'ReservedTypeAnnotation', - name: 'RootTag', - }, - }, - ], - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - }, - }, - { - name: 'hotspotUpdate', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - params: [ - { - name: 'x', - optional: false, - typeAnnotation: { - type: 'Int32TypeAnnotation', - }, - }, - { - name: 'y', - optional: false, - typeAnnotation: { - type: 'Int32TypeAnnotation', - }, - }, - ], - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - }, - }, - { - name: 'addItems', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - params: [ - { - name: 'items', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'StringTypeAnnotation', - }, - }, - }, - ], - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - }, - }, - ], - }, - }, - }, - }, -}; -const EXCLUDE_ANDROID = { - modules: { - ExcludedAndroid: { - type: 'Component', - components: { - ExcludedAndroidComponent: { - excludedPlatforms: ['android'], - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [], - commands: [], - }, - }, - }, - }, -}; -const EXCLUDE_ANDROID_IOS = { - modules: { - ExcludedAndroidIos: { - type: 'Component', - components: { - ExcludedAndroidIosComponent: { - excludedPlatforms: ['android', 'iOS'], - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [], - commands: [], - }, - }, - }, - }, -}; -const EXCLUDE_IOS_TWO_COMPONENTS_DIFFERENT_FILES = { - modules: { - ComponentFile1: { - type: 'Component', - components: { - ExcludedIosComponent: { - excludedPlatforms: ['iOS'], - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [], - commands: [], - }, - }, - }, - ComponentFile2: { - type: 'Component', - components: { - MultiFileIncludedNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'disabled', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: true, - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; -module.exports = { - NO_PROPS_NO_EVENTS, - INTERFACE_ONLY, - BOOLEAN_PROP, - STRING_PROP, - INTEGER_PROPS, - DOUBLE_PROPS, - FLOAT_PROPS, - COLOR_PROP, - IMAGE_PROP, - POINT_PROP, - INSETS_PROP, - DIMENSION_PROP, - ARRAY_PROPS, - ARRAY_PROPS_WITH_NESTED_OBJECT, - OBJECT_PROPS, - MULTI_NATIVE_PROP, - STRING_ENUM_PROP, - INT32_ENUM_PROP, - MIXED_PROP, - EVENT_PROPS, - EVENTS_WITH_PAPER_NAME, - EVENT_NESTED_OBJECT_PROPS, - TWO_COMPONENTS_SAME_FILE, - TWO_COMPONENTS_DIFFERENT_FILES, - COMMANDS, - COMMANDS_AND_PROPS, - EXCLUDE_ANDROID, - EXCLUDE_ANDROID_IOS, - EXCLUDE_IOS_TWO_COMPONENTS_DIFFERENT_FILES, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/components/__test_fixtures__/fixtures.js.flow b/node_modules/@react-native/codegen/lib/generators/components/__test_fixtures__/fixtures.js.flow deleted file mode 100644 index 9121c8ad6..000000000 --- a/node_modules/@react-native/codegen/lib/generators/components/__test_fixtures__/fixtures.js.flow +++ /dev/null @@ -1,1911 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {SchemaType} from '../../../CodegenSchema.js'; - -const NO_PROPS_NO_EVENTS: SchemaType = { - modules: { - NoPropsNoEvents: { - type: 'Component', - components: { - NoPropsNoEventsComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [], - commands: [], - }, - }, - }, - }, -}; - -const INTERFACE_ONLY: SchemaType = { - modules: { - Switch: { - type: 'Component', - components: { - InterfaceOnlyComponent: { - interfaceOnly: true, - paperComponentName: 'RCTInterfaceOnlyComponent', - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [ - { - name: 'onChange', - optional: true, - bubblingType: 'bubble', - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'value', - optional: false, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ], - }, - }, - }, - ], - props: [ - { - name: 'accessibilityHint', - optional: true, - typeAnnotation: { - type: 'StringTypeAnnotation', - default: '', - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -const EVENTS_WITH_PAPER_NAME: SchemaType = { - modules: { - Switch: { - type: 'Component', - components: { - InterfaceOnlyComponent: { - interfaceOnly: true, - paperComponentName: 'RCTInterfaceOnlyComponent', - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [ - { - name: 'onChange', - paperTopLevelNameDeprecated: 'paperChange', - optional: true, - bubblingType: 'bubble', - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'value', - optional: false, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ], - }, - }, - }, - { - name: 'onDirectChange', - paperTopLevelNameDeprecated: 'paperDirectChange', - optional: true, - bubblingType: 'direct', - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'value', - optional: false, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ], - }, - }, - }, - ], - props: [], - commands: [], - }, - }, - }, - }, -}; - -const BOOLEAN_PROP: SchemaType = { - modules: { - Switch: { - type: 'Component', - components: { - BooleanPropNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'disabled', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: false, - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -const STRING_PROP: SchemaType = { - modules: { - Switch: { - type: 'Component', - components: { - StringPropComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'accessibilityHint', - optional: true, - typeAnnotation: { - type: 'StringTypeAnnotation', - default: '', - }, - }, - { - name: 'accessibilityRole', - optional: true, - typeAnnotation: { - type: 'StringTypeAnnotation', - default: null, - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -const INTEGER_PROPS: SchemaType = { - modules: { - Switch: { - type: 'Component', - components: { - IntegerPropNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'progress1', - optional: true, - typeAnnotation: { - type: 'Int32TypeAnnotation', - default: 0, - }, - }, - { - name: 'progress2', - optional: true, - typeAnnotation: { - type: 'Int32TypeAnnotation', - default: -1, - }, - }, - { - name: 'progress3', - optional: true, - typeAnnotation: { - type: 'Int32TypeAnnotation', - default: 10, - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -const FLOAT_PROPS: SchemaType = { - modules: { - Switch: { - type: 'Component', - components: { - FloatPropNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'blurRadius', - optional: false, - typeAnnotation: { - type: 'FloatTypeAnnotation', - default: 0.0, - }, - }, - { - name: 'blurRadius2', - optional: true, - typeAnnotation: { - type: 'FloatTypeAnnotation', - default: 0.001, - }, - }, - { - name: 'blurRadius3', - optional: true, - typeAnnotation: { - type: 'FloatTypeAnnotation', - default: 2.1, - }, - }, - { - name: 'blurRadius4', - optional: true, - typeAnnotation: { - type: 'FloatTypeAnnotation', - default: 0, - }, - }, - { - name: 'blurRadius5', - optional: true, - typeAnnotation: { - type: 'FloatTypeAnnotation', - default: 1, - }, - }, - { - name: 'blurRadius6', - optional: true, - typeAnnotation: { - type: 'FloatTypeAnnotation', - default: -0.0, - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -const DOUBLE_PROPS: SchemaType = { - modules: { - Switch: { - type: 'Component', - components: { - DoublePropNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'blurRadius', - optional: false, - typeAnnotation: { - type: 'DoubleTypeAnnotation', - default: 0.0, - }, - }, - { - name: 'blurRadius2', - optional: true, - typeAnnotation: { - type: 'DoubleTypeAnnotation', - default: 0.001, - }, - }, - { - name: 'blurRadius3', - optional: true, - typeAnnotation: { - type: 'DoubleTypeAnnotation', - default: 2.1, - }, - }, - { - name: 'blurRadius4', - optional: true, - typeAnnotation: { - type: 'DoubleTypeAnnotation', - default: 0, - }, - }, - { - name: 'blurRadius5', - optional: true, - typeAnnotation: { - type: 'DoubleTypeAnnotation', - default: 1, - }, - }, - { - name: 'blurRadius6', - optional: true, - typeAnnotation: { - type: 'DoubleTypeAnnotation', - default: -0.0, - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -const COLOR_PROP: SchemaType = { - modules: { - Switch: { - type: 'Component', - components: { - ColorPropNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'tintColor', - optional: true, - typeAnnotation: { - type: 'ReservedPropTypeAnnotation', - name: 'ColorPrimitive', - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -const IMAGE_PROP: SchemaType = { - modules: { - Slider: { - type: 'Component', - components: { - ImagePropNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'thumbImage', - optional: true, - typeAnnotation: { - type: 'ReservedPropTypeAnnotation', - name: 'ImageSourcePrimitive', - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -const POINT_PROP: SchemaType = { - modules: { - Switch: { - type: 'Component', - components: { - PointPropNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'startPoint', - optional: true, - typeAnnotation: { - type: 'ReservedPropTypeAnnotation', - name: 'PointPrimitive', - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -const INSETS_PROP: SchemaType = { - modules: { - ScrollView: { - type: 'Component', - components: { - InsetsPropNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'contentInset', - optional: true, - typeAnnotation: { - type: 'ReservedPropTypeAnnotation', - name: 'EdgeInsetsPrimitive', - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -const DIMENSION_PROP: SchemaType = { - modules: { - CustomView: { - type: 'Component', - components: { - DimensionPropNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'marginBack', - optional: true, - typeAnnotation: { - type: 'ReservedPropTypeAnnotation', - name: 'DimensionPrimitive', - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -const ARRAY_PROPS: SchemaType = { - modules: { - Slider: { - type: 'Component', - components: { - ArrayPropsNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'names', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'StringTypeAnnotation', - }, - }, - }, - { - name: 'disableds', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'BooleanTypeAnnotation', - }, - }, - }, - { - name: 'progress', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'Int32TypeAnnotation', - }, - }, - }, - { - name: 'radii', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'FloatTypeAnnotation', - }, - }, - }, - { - name: 'colors', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ReservedPropTypeAnnotation', - name: 'ColorPrimitive', - }, - }, - }, - { - name: 'srcs', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ReservedPropTypeAnnotation', - name: 'ImageSourcePrimitive', - }, - }, - }, - { - name: 'points', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ReservedPropTypeAnnotation', - name: 'PointPrimitive', - }, - }, - }, - { - name: 'dimensions', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ReservedPropTypeAnnotation', - name: 'DimensionPrimitive', - }, - }, - }, - { - name: 'sizes', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'StringEnumTypeAnnotation', - default: 'small', - options: ['small', 'large'], - }, - }, - }, - { - name: 'object', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'stringProp', - optional: true, - typeAnnotation: { - type: 'StringTypeAnnotation', - default: '', - }, - }, - ], - }, - }, - }, - { - name: 'array', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ObjectTypeAnnotation', - properties: [ - { - // This needs to stay the same as the object above - // to confirm that the structs are generated - // with unique non-colliding names - name: 'object', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'stringProp', - optional: true, - typeAnnotation: { - type: 'StringTypeAnnotation', - default: '', - }, - }, - ], - }, - }, - }, - ], - }, - }, - }, - { - name: 'arrayOfArrayOfObject', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'stringProp', - optional: true, - typeAnnotation: { - type: 'StringTypeAnnotation', - default: '', - }, - }, - ], - }, - }, - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -const ARRAY_PROPS_WITH_NESTED_OBJECT: SchemaType = { - modules: { - Slider: { - type: 'Component', - components: { - ArrayPropsNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'nativePrimitives', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'colors', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ReservedPropTypeAnnotation', - name: 'ColorPrimitive', - }, - }, - }, - { - name: 'srcs', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ReservedPropTypeAnnotation', - name: 'ImageSourcePrimitive', - }, - }, - }, - { - name: 'points', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ReservedPropTypeAnnotation', - name: 'PointPrimitive', - }, - }, - }, - ], - }, - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -const OBJECT_PROPS: SchemaType = { - modules: { - ObjectPropsNativeComponent: { - type: 'Component', - components: { - ObjectProps: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'objectProp', - optional: true, - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'stringProp', - optional: true, - typeAnnotation: { - type: 'StringTypeAnnotation', - default: '', - }, - }, - { - name: 'booleanProp', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: false, - }, - }, - { - name: 'floatProp', - optional: true, - typeAnnotation: { - type: 'FloatTypeAnnotation', - default: 0.0, - }, - }, - { - name: 'intProp', - optional: true, - typeAnnotation: { - type: 'Int32TypeAnnotation', - default: 0, - }, - }, - { - name: 'stringUserDefaultProp', - optional: true, - typeAnnotation: { - type: 'StringTypeAnnotation', - default: 'user_default', - }, - }, - { - name: 'booleanUserDefaultProp', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: true, - }, - }, - { - name: 'floatUserDefaultProp', - optional: true, - typeAnnotation: { - type: 'FloatTypeAnnotation', - default: 3.14, - }, - }, - { - name: 'intUserDefaultProp', - optional: true, - typeAnnotation: { - type: 'Int32TypeAnnotation', - default: 9999, - }, - }, - { - name: 'stringEnumProp', - optional: true, - typeAnnotation: { - type: 'StringEnumTypeAnnotation', - default: 'option1', - options: ['option1'], - }, - }, - { - name: 'intEnumProp', - optional: true, - typeAnnotation: { - type: 'Int32EnumTypeAnnotation', - default: 0, - options: [0], - }, - }, - { - name: 'objectArrayProp', - optional: false, - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'array', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'StringTypeAnnotation', - }, - }, - }, - ], - }, - }, - { - name: 'objectPrimitiveRequiredProp', - optional: false, - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'image', - optional: true, - typeAnnotation: { - type: 'ReservedPropTypeAnnotation', - name: 'ImageSourcePrimitive', - }, - }, - { - name: 'color', - optional: true, - typeAnnotation: { - type: 'ReservedPropTypeAnnotation', - name: 'ColorPrimitive', - }, - }, - { - name: 'point', - optional: true, - typeAnnotation: { - type: 'ReservedPropTypeAnnotation', - name: 'PointPrimitive', - }, - }, - ], - }, - }, - { - name: 'nestedPropA', - optional: false, - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'nestedPropB', - optional: false, - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'nestedPropC', - optional: true, - typeAnnotation: { - type: 'StringTypeAnnotation', - default: '', - }, - }, - ], - }, - }, - ], - }, - }, - { - name: 'nestedArrayAsProperty', - optional: false, - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'arrayProp', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'stringProp', - optional: false, - typeAnnotation: { - type: 'StringTypeAnnotation', - default: '', - }, - }, - ], - }, - }, - }, - ], - }, - }, - ], - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -const MULTI_NATIVE_PROP: SchemaType = { - modules: { - Slider: { - type: 'Component', - components: { - ImageColorPropNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'thumbImage', - optional: true, - typeAnnotation: { - type: 'ReservedPropTypeAnnotation', - name: 'ImageSourcePrimitive', - }, - }, - { - name: 'color', - optional: true, - typeAnnotation: { - type: 'ReservedPropTypeAnnotation', - name: 'ColorPrimitive', - }, - }, - { - name: 'thumbTintColor', - optional: true, - typeAnnotation: { - type: 'ReservedPropTypeAnnotation', - name: 'ColorPrimitive', - }, - }, - { - name: 'point', - optional: true, - typeAnnotation: { - type: 'ReservedPropTypeAnnotation', - name: 'PointPrimitive', - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -const STRING_ENUM_PROP: SchemaType = { - modules: { - Switch: { - type: 'Component', - components: { - StringEnumPropsNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'alignment', - optional: true, - typeAnnotation: { - type: 'StringEnumTypeAnnotation', - default: 'center', - options: ['top', 'center', 'bottom-right'], - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -const INT32_ENUM_PROP: SchemaType = { - modules: { - Switch: { - type: 'Component', - components: { - Int32EnumPropsNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'maxInterval', - optional: true, - typeAnnotation: { - type: 'Int32EnumTypeAnnotation', - default: 0, - options: [0, 1, 2], - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -const MIXED_PROP: SchemaType = { - modules: { - CustomView: { - type: 'Component', - components: { - MixedPropNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'mixedProp', - optional: false, - typeAnnotation: { - type: 'MixedTypeAnnotation', - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -const EVENT_PROPS: SchemaType = { - modules: { - Switch: { - type: 'Component', - components: { - EventsNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [ - { - name: 'onChange', - optional: true, - bubblingType: 'bubble', - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'value', - optional: false, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - { - name: 'source', - optional: true, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - name: 'progress', - optional: true, - typeAnnotation: { - type: 'Int32TypeAnnotation', - }, - }, - { - name: 'scale', - optional: true, - typeAnnotation: { - type: 'FloatTypeAnnotation', - }, - }, - ], - }, - }, - }, - { - name: 'onArrayEventType', - optional: true, - bubblingType: 'bubble', - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'bool_array_event_prop', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'BooleanTypeAnnotation', - }, - }, - }, - { - name: 'string_enum_event_prop', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'StringEnumTypeAnnotation', - options: ['YES', 'NO'], - }, - }, - }, - { - name: 'array_array_event_prop', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'StringTypeAnnotation', - }, - }, - }, - }, - { - name: 'array_object_event_prop', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'lat', - optional: false, - typeAnnotation: { - type: 'DoubleTypeAnnotation', - }, - }, - { - name: 'lon', - optional: false, - typeAnnotation: { - type: 'DoubleTypeAnnotation', - }, - }, - { - name: 'names', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'StringTypeAnnotation', - }, - }, - }, - ], - }, - }, - }, - { - name: 'array_mixed_event_prop', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'MixedTypeAnnotation', - }, - }, - }, - ], - }, - }, - }, - { - name: 'onEventDirect', - optional: true, - bubblingType: 'direct', - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'value', - optional: false, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ], - }, - }, - }, - { - name: 'onOrientationChange', - optional: true, - bubblingType: 'direct', - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'orientation', - optional: false, - typeAnnotation: { - type: 'StringEnumTypeAnnotation', - options: ['landscape', 'portrait'], - }, - }, - ], - }, - }, - }, - { - name: 'onEnd', - optional: true, - bubblingType: 'bubble', - typeAnnotation: { - type: 'EventTypeAnnotation', - }, - }, - { - name: 'onEventWithMixedPropAttribute', - optional: true, - bubblingType: 'direct', - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'value', - optional: false, - typeAnnotation: { - type: 'MixedTypeAnnotation', - }, - }, - ], - }, - }, - }, - ], - props: [ - { - name: 'disabled', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: false, - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -const EVENT_NESTED_OBJECT_PROPS: SchemaType = { - modules: { - Switch: { - type: 'Component', - components: { - EventsNestedObjectNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [ - { - name: 'onChange', - optional: true, - bubblingType: 'bubble', - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'location', - optional: false, - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'source', - optional: false, - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'url', - optional: false, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'x', - optional: false, - typeAnnotation: { - type: 'Int32TypeAnnotation', - }, - }, - { - name: 'y', - optional: false, - typeAnnotation: { - type: 'Int32TypeAnnotation', - }, - }, - ], - }, - }, - ], - }, - }, - }, - ], - props: [ - { - name: 'disabled', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: false, - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -const TWO_COMPONENTS_SAME_FILE: SchemaType = { - modules: { - MyComponents: { - type: 'Component', - components: { - MultiComponent1NativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'disabled', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: false, - }, - }, - ], - commands: [], - }, - - MultiComponent2NativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'disabled', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: true, - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -const TWO_COMPONENTS_DIFFERENT_FILES: SchemaType = { - modules: { - ComponentFile1: { - type: 'Component', - components: { - MultiFile1NativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'disabled', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: false, - }, - }, - ], - commands: [], - }, - }, - }, - - ComponentFile2: { - type: 'Component', - components: { - MultiFile2NativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'disabled', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: true, - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -const COMMANDS: SchemaType = { - modules: { - Switch: { - type: 'Component', - components: { - CommandNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [], - commands: [ - { - name: 'flashScrollIndicators', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - params: [], - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - }, - }, - { - name: 'allTypes', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - params: [ - { - name: 'x', - optional: false, - typeAnnotation: { - type: 'Int32TypeAnnotation', - }, - }, - { - name: 'y', - optional: false, - typeAnnotation: { - type: 'FloatTypeAnnotation', - }, - }, - { - name: 'z', - optional: false, - typeAnnotation: { - type: 'DoubleTypeAnnotation', - }, - }, - { - name: 'message', - optional: false, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - name: 'animated', - optional: false, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ], - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - }, - }, - ], - }, - }, - }, - }, -}; - -const COMMANDS_AND_PROPS: SchemaType = { - modules: { - Switch: { - type: 'Component', - components: { - CommandNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'accessibilityHint', - optional: true, - typeAnnotation: { - type: 'StringTypeAnnotation', - default: '', - }, - }, - ], - commands: [ - { - name: 'handleRootTag', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - params: [ - { - name: 'rootTag', - optional: false, - typeAnnotation: { - type: 'ReservedTypeAnnotation', - name: 'RootTag', - }, - }, - ], - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - }, - }, - { - name: 'hotspotUpdate', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - params: [ - { - name: 'x', - optional: false, - typeAnnotation: { - type: 'Int32TypeAnnotation', - }, - }, - { - name: 'y', - optional: false, - typeAnnotation: { - type: 'Int32TypeAnnotation', - }, - }, - ], - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - }, - }, - { - name: 'addItems', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - params: [ - { - name: 'items', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'StringTypeAnnotation', - }, - }, - }, - ], - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - }, - }, - ], - }, - }, - }, - }, -}; - -const EXCLUDE_ANDROID: SchemaType = { - modules: { - ExcludedAndroid: { - type: 'Component', - components: { - ExcludedAndroidComponent: { - excludedPlatforms: ['android'], - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [], - commands: [], - }, - }, - }, - }, -}; - -const EXCLUDE_ANDROID_IOS: SchemaType = { - modules: { - ExcludedAndroidIos: { - type: 'Component', - components: { - ExcludedAndroidIosComponent: { - excludedPlatforms: ['android', 'iOS'], - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [], - commands: [], - }, - }, - }, - }, -}; - -const EXCLUDE_IOS_TWO_COMPONENTS_DIFFERENT_FILES: SchemaType = { - modules: { - ComponentFile1: { - type: 'Component', - components: { - ExcludedIosComponent: { - excludedPlatforms: ['iOS'], - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [], - commands: [], - }, - }, - }, - ComponentFile2: { - type: 'Component', - components: { - MultiFileIncludedNativeComponent: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'disabled', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: true, - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -module.exports = { - NO_PROPS_NO_EVENTS, - INTERFACE_ONLY, - BOOLEAN_PROP, - STRING_PROP, - INTEGER_PROPS, - DOUBLE_PROPS, - FLOAT_PROPS, - COLOR_PROP, - IMAGE_PROP, - POINT_PROP, - INSETS_PROP, - DIMENSION_PROP, - ARRAY_PROPS, - ARRAY_PROPS_WITH_NESTED_OBJECT, - OBJECT_PROPS, - MULTI_NATIVE_PROP, - STRING_ENUM_PROP, - INT32_ENUM_PROP, - MIXED_PROP, - EVENT_PROPS, - EVENTS_WITH_PAPER_NAME, - EVENT_NESTED_OBJECT_PROPS, - TWO_COMPONENTS_SAME_FILE, - TWO_COMPONENTS_DIFFERENT_FILES, - COMMANDS, - COMMANDS_AND_PROPS, - EXCLUDE_ANDROID, - EXCLUDE_ANDROID_IOS, - EXCLUDE_IOS_TWO_COMPONENTS_DIFFERENT_FILES, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleCpp.js b/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleCpp.js deleted file mode 100644 index dc090603b..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleCpp.js +++ /dev/null @@ -1,308 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -function _slicedToArray(arr, i) { - return ( - _arrayWithHoles(arr) || - _iterableToArrayLimit(arr, i) || - _unsupportedIterableToArray(arr, i) || - _nonIterableRest() - ); -} -function _nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.', - ); -} -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === 'string') return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === 'Object' && o.constructor) n = o.constructor.name; - if (n === 'Map' || n === 'Set') return Array.from(o); - if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) - return _arrayLikeToArray(o, minLen); -} -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; -} -function _iterableToArrayLimit(arr, i) { - var _i = - null == arr - ? null - : ('undefined' != typeof Symbol && arr[Symbol.iterator]) || - arr['@@iterator']; - if (null != _i) { - var _s, - _e, - _x, - _r, - _arr = [], - _n = !0, - _d = !1; - try { - if (((_x = (_i = _i.call(arr)).next), 0 === i)) { - if (Object(_i) !== _i) return; - _n = !1; - } else - for ( - ; - !(_n = (_s = _x.call(_i)).done) && - (_arr.push(_s.value), _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - if (!_n && null != _i.return && ((_r = _i.return()), Object(_r) !== _r)) - return; - } finally { - if (_d) throw _e; - } - } - return _arr; - } -} -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} -const _require = require('../../parsers/parsers-commons'), - unwrapNullable = _require.unwrapNullable; -const _require2 = require('./Utils'), - createAliasResolver = _require2.createAliasResolver, - getModules = _require2.getModules; -const HostFunctionTemplate = ({ - hasteModuleName, - methodName, - returnTypeAnnotation, - args, -}) => { - const isNullable = returnTypeAnnotation.type === 'NullableTypeAnnotation'; - const isVoid = returnTypeAnnotation.type === 'VoidTypeAnnotation'; - const methodCallArgs = [' rt', ...args].join(',\n '); - const methodCall = `static_cast<${hasteModuleName}CxxSpecJSI *>(&turboModule)->${methodName}(\n${methodCallArgs}\n )`; - return `static jsi::Value __hostFunction_${hasteModuleName}CxxSpecJSI_${methodName}(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {${ - isVoid - ? `\n ${methodCall};` - : isNullable - ? `\n auto result = ${methodCall};` - : '' - } - return ${ - isVoid - ? 'jsi::Value::undefined()' - : isNullable - ? 'result ? jsi::Value(std::move(*result)) : jsi::Value::null()' - : methodCall - }; -}`; -}; -const ModuleTemplate = ({ - hasteModuleName, - hostFunctions, - moduleName, - methods, -}) => { - return `${hostFunctions.join('\n')} - -${hasteModuleName}CxxSpecJSI::${hasteModuleName}CxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("${moduleName}", jsInvoker) { -${methods - .map(({methodName, paramCount}) => { - return ` methodMap_["${methodName}"] = MethodMetadata {${paramCount}, __hostFunction_${hasteModuleName}CxxSpecJSI_${methodName}};`; - }) - .join('\n')} -}`; -}; -const FileTemplate = ({libraryName, modules}) => { - return `/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateModuleCpp.js - */ - -#include "${libraryName}JSI.h" - -namespace facebook::react { - -${modules} - - -} // namespace facebook::react -`; -}; -function serializeArg(moduleName, arg, index, resolveAlias, enumMap) { - const nullableTypeAnnotation = arg.typeAnnotation, - optional = arg.optional; - const _unwrapNullable = unwrapNullable(nullableTypeAnnotation), - _unwrapNullable2 = _slicedToArray(_unwrapNullable, 2), - typeAnnotation = _unwrapNullable2[0], - nullable = _unwrapNullable2[1]; - const isRequired = !optional && !nullable; - let realTypeAnnotation = typeAnnotation; - if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { - realTypeAnnotation = resolveAlias(realTypeAnnotation.name); - } - function wrap(callback) { - const val = `args[${index}]`; - const expression = callback(val); - if (isRequired) { - return expression; - } else { - let condition = `${val}.isNull() || ${val}.isUndefined()`; - if (optional) { - condition = `count <= ${index} || ${condition}`; - } - return `${condition} ? std::nullopt : std::make_optional(${expression})`; - } - } - switch (realTypeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (realTypeAnnotation.name) { - case 'RootTag': - return wrap(val => `${val}.getNumber()`); - default: - realTypeAnnotation.name; - throw new Error( - `Unknown prop type for "${arg.name}, found: ${realTypeAnnotation.name}"`, - ); - } - case 'StringTypeAnnotation': - return wrap(val => `${val}.asString(rt)`); - case 'BooleanTypeAnnotation': - return wrap(val => `${val}.asBool()`); - case 'EnumDeclaration': - switch (realTypeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return wrap(val => `${val}.asNumber()`); - case 'StringTypeAnnotation': - return wrap(val => `${val}.asString(rt)`); - default: - throw new Error( - `Unknown enum type for "${arg.name}, found: ${realTypeAnnotation.type}"`, - ); - } - case 'NumberTypeAnnotation': - return wrap(val => `${val}.asNumber()`); - case 'FloatTypeAnnotation': - return wrap(val => `${val}.asNumber()`); - case 'DoubleTypeAnnotation': - return wrap(val => `${val}.asNumber()`); - case 'Int32TypeAnnotation': - return wrap(val => `${val}.asNumber()`); - case 'ArrayTypeAnnotation': - return wrap(val => `${val}.asObject(rt).asArray(rt)`); - case 'FunctionTypeAnnotation': - return wrap(val => `${val}.asObject(rt).asFunction(rt)`); - case 'GenericObjectTypeAnnotation': - return wrap(val => `${val}.asObject(rt)`); - case 'UnionTypeAnnotation': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return wrap(val => `${val}.asNumber()`); - case 'ObjectTypeAnnotation': - return wrap(val => `${val}.asObject(rt)`); - case 'StringTypeAnnotation': - return wrap(val => `${val}.asString(rt)`); - default: - throw new Error( - `Unsupported union member type for param "${arg.name}, found: ${realTypeAnnotation.memberType}"`, - ); - } - case 'ObjectTypeAnnotation': - return wrap(val => `${val}.asObject(rt)`); - case 'MixedTypeAnnotation': - return wrap(val => `jsi::Value(rt, ${val})`); - default: - realTypeAnnotation.type; - throw new Error( - `Unknown prop type for "${arg.name}, found: ${realTypeAnnotation.type}"`, - ); - } -} -function serializePropertyIntoHostFunction( - moduleName, - hasteModuleName, - property, - resolveAlias, - enumMap, -) { - const _unwrapNullable3 = unwrapNullable(property.typeAnnotation), - _unwrapNullable4 = _slicedToArray(_unwrapNullable3, 1), - propertyTypeAnnotation = _unwrapNullable4[0]; - return HostFunctionTemplate({ - hasteModuleName, - methodName: property.name, - returnTypeAnnotation: propertyTypeAnnotation.returnTypeAnnotation, - args: propertyTypeAnnotation.params.map((p, i) => - serializeArg(moduleName, p, i, resolveAlias, enumMap), - ), - }); -} -module.exports = { - generate( - libraryName, - schema, - packageName, - assumeNonnull = false, - headerPrefix, - ) { - const nativeModules = getModules(schema); - const modules = Object.keys(nativeModules) - .map(hasteModuleName => { - const nativeModule = nativeModules[hasteModuleName]; - const aliasMap = nativeModule.aliasMap, - enumMap = nativeModule.enumMap, - properties = nativeModule.spec.properties, - moduleName = nativeModule.moduleName; - const resolveAlias = createAliasResolver(aliasMap); - const hostFunctions = properties.map(property => - serializePropertyIntoHostFunction( - moduleName, - hasteModuleName, - property, - resolveAlias, - enumMap, - ), - ); - return ModuleTemplate({ - hasteModuleName, - hostFunctions, - moduleName, - methods: properties.map( - ({name: propertyName, typeAnnotation: nullableTypeAnnotation}) => { - const _unwrapNullable5 = unwrapNullable(nullableTypeAnnotation), - _unwrapNullable6 = _slicedToArray(_unwrapNullable5, 1), - params = _unwrapNullable6[0].params; - return { - methodName: propertyName, - paramCount: params.length, - }; - }, - ), - }); - }) - .join('\n'); - const fileName = `${libraryName}JSI-generated.cpp`; - const replacedTemplate = FileTemplate({ - modules, - libraryName, - }); - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleCpp.js.flow b/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleCpp.js.flow deleted file mode 100644 index e435945e5..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleCpp.js.flow +++ /dev/null @@ -1,285 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type { - NamedShape, - NativeModuleEnumMap, - NativeModuleFunctionTypeAnnotation, - NativeModuleParamTypeAnnotation, - NativeModulePropertyShape, - NativeModuleTypeAnnotation, - Nullable, - SchemaType, -} from '../../CodegenSchema'; -import type {AliasResolver} from './Utils'; - -const {unwrapNullable} = require('../../parsers/parsers-commons'); -const {createAliasResolver, getModules} = require('./Utils'); - -type FilesOutput = Map; - -const HostFunctionTemplate = ({ - hasteModuleName, - methodName, - returnTypeAnnotation, - args, -}: $ReadOnly<{ - hasteModuleName: string, - methodName: string, - returnTypeAnnotation: Nullable, - args: Array, -}>) => { - const isNullable = returnTypeAnnotation.type === 'NullableTypeAnnotation'; - const isVoid = returnTypeAnnotation.type === 'VoidTypeAnnotation'; - const methodCallArgs = [' rt', ...args].join(',\n '); - const methodCall = `static_cast<${hasteModuleName}CxxSpecJSI *>(&turboModule)->${methodName}(\n${methodCallArgs}\n )`; - - return `static jsi::Value __hostFunction_${hasteModuleName}CxxSpecJSI_${methodName}(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {${ - isVoid - ? `\n ${methodCall};` - : isNullable - ? `\n auto result = ${methodCall};` - : '' - } - return ${ - isVoid - ? 'jsi::Value::undefined()' - : isNullable - ? 'result ? jsi::Value(std::move(*result)) : jsi::Value::null()' - : methodCall - }; -}`; -}; - -const ModuleTemplate = ({ - hasteModuleName, - hostFunctions, - moduleName, - methods, -}: $ReadOnly<{ - hasteModuleName: string, - hostFunctions: $ReadOnlyArray, - moduleName: string, - methods: $ReadOnlyArray<$ReadOnly<{methodName: string, paramCount: number}>>, -}>) => { - return `${hostFunctions.join('\n')} - -${hasteModuleName}CxxSpecJSI::${hasteModuleName}CxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("${moduleName}", jsInvoker) { -${methods - .map(({methodName, paramCount}) => { - return ` methodMap_["${methodName}"] = MethodMetadata {${paramCount}, __hostFunction_${hasteModuleName}CxxSpecJSI_${methodName}};`; - }) - .join('\n')} -}`; -}; - -const FileTemplate = ({ - libraryName, - modules, -}: $ReadOnly<{ - libraryName: string, - modules: string, -}>) => { - return `/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateModuleCpp.js - */ - -#include "${libraryName}JSI.h" - -namespace facebook::react { - -${modules} - - -} // namespace facebook::react -`; -}; - -type Param = NamedShape>; - -function serializeArg( - moduleName: string, - arg: Param, - index: number, - resolveAlias: AliasResolver, - enumMap: NativeModuleEnumMap, -): string { - const {typeAnnotation: nullableTypeAnnotation, optional} = arg; - const [typeAnnotation, nullable] = - unwrapNullable(nullableTypeAnnotation); - const isRequired = !optional && !nullable; - - let realTypeAnnotation = typeAnnotation; - if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { - realTypeAnnotation = resolveAlias(realTypeAnnotation.name); - } - - function wrap(callback: (val: string) => string) { - const val = `args[${index}]`; - const expression = callback(val); - if (isRequired) { - return expression; - } else { - let condition = `${val}.isNull() || ${val}.isUndefined()`; - if (optional) { - condition = `count <= ${index} || ${condition}`; - } - return `${condition} ? std::nullopt : std::make_optional(${expression})`; - } - } - - switch (realTypeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (realTypeAnnotation.name) { - case 'RootTag': - return wrap(val => `${val}.getNumber()`); - default: - (realTypeAnnotation.name: empty); - throw new Error( - `Unknown prop type for "${arg.name}, found: ${realTypeAnnotation.name}"`, - ); - } - case 'StringTypeAnnotation': - return wrap(val => `${val}.asString(rt)`); - case 'BooleanTypeAnnotation': - return wrap(val => `${val}.asBool()`); - case 'EnumDeclaration': - switch (realTypeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return wrap(val => `${val}.asNumber()`); - case 'StringTypeAnnotation': - return wrap(val => `${val}.asString(rt)`); - default: - throw new Error( - `Unknown enum type for "${arg.name}, found: ${realTypeAnnotation.type}"`, - ); - } - case 'NumberTypeAnnotation': - return wrap(val => `${val}.asNumber()`); - case 'FloatTypeAnnotation': - return wrap(val => `${val}.asNumber()`); - case 'DoubleTypeAnnotation': - return wrap(val => `${val}.asNumber()`); - case 'Int32TypeAnnotation': - return wrap(val => `${val}.asNumber()`); - case 'ArrayTypeAnnotation': - return wrap(val => `${val}.asObject(rt).asArray(rt)`); - case 'FunctionTypeAnnotation': - return wrap(val => `${val}.asObject(rt).asFunction(rt)`); - case 'GenericObjectTypeAnnotation': - return wrap(val => `${val}.asObject(rt)`); - case 'UnionTypeAnnotation': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return wrap(val => `${val}.asNumber()`); - case 'ObjectTypeAnnotation': - return wrap(val => `${val}.asObject(rt)`); - case 'StringTypeAnnotation': - return wrap(val => `${val}.asString(rt)`); - default: - throw new Error( - `Unsupported union member type for param "${arg.name}, found: ${realTypeAnnotation.memberType}"`, - ); - } - case 'ObjectTypeAnnotation': - return wrap(val => `${val}.asObject(rt)`); - case 'MixedTypeAnnotation': - return wrap(val => `jsi::Value(rt, ${val})`); - default: - (realTypeAnnotation.type: empty); - throw new Error( - `Unknown prop type for "${arg.name}, found: ${realTypeAnnotation.type}"`, - ); - } -} - -function serializePropertyIntoHostFunction( - moduleName: string, - hasteModuleName: string, - property: NativeModulePropertyShape, - resolveAlias: AliasResolver, - enumMap: NativeModuleEnumMap, -): string { - const [propertyTypeAnnotation] = - unwrapNullable(property.typeAnnotation); - - return HostFunctionTemplate({ - hasteModuleName, - methodName: property.name, - returnTypeAnnotation: propertyTypeAnnotation.returnTypeAnnotation, - args: propertyTypeAnnotation.params.map((p, i) => - serializeArg(moduleName, p, i, resolveAlias, enumMap), - ), - }); -} - -module.exports = { - generate( - libraryName: string, - schema: SchemaType, - packageName?: string, - assumeNonnull: boolean = false, - headerPrefix?: string, - ): FilesOutput { - const nativeModules = getModules(schema); - - const modules = Object.keys(nativeModules) - .map((hasteModuleName: string) => { - const nativeModule = nativeModules[hasteModuleName]; - const { - aliasMap, - enumMap, - spec: {properties}, - moduleName, - } = nativeModule; - const resolveAlias = createAliasResolver(aliasMap); - const hostFunctions = properties.map(property => - serializePropertyIntoHostFunction( - moduleName, - hasteModuleName, - property, - resolveAlias, - enumMap, - ), - ); - - return ModuleTemplate({ - hasteModuleName, - hostFunctions, - moduleName, - methods: properties.map( - ({name: propertyName, typeAnnotation: nullableTypeAnnotation}) => { - const [{params}] = unwrapNullable(nullableTypeAnnotation); - return { - methodName: propertyName, - paramCount: params.length, - }; - }, - ), - }); - }) - .join('\n'); - - const fileName = `${libraryName}JSI-generated.cpp`; - const replacedTemplate = FileTemplate({ - modules, - libraryName, - }); - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleH.js b/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleH.js deleted file mode 100644 index aa14054d1..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleH.js +++ /dev/null @@ -1,656 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -function _slicedToArray(arr, i) { - return ( - _arrayWithHoles(arr) || - _iterableToArrayLimit(arr, i) || - _unsupportedIterableToArray(arr, i) || - _nonIterableRest() - ); -} -function _nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.', - ); -} -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === 'string') return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === 'Object' && o.constructor) n = o.constructor.name; - if (n === 'Map' || n === 'Set') return Array.from(o); - if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) - return _arrayLikeToArray(o, minLen); -} -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; -} -function _iterableToArrayLimit(arr, i) { - var _i = - null == arr - ? null - : ('undefined' != typeof Symbol && arr[Symbol.iterator]) || - arr['@@iterator']; - if (null != _i) { - var _s, - _e, - _x, - _r, - _arr = [], - _n = !0, - _d = !1; - try { - if (((_x = (_i = _i.call(arr)).next), 0 === i)) { - if (Object(_i) !== _i) return; - _n = !1; - } else - for ( - ; - !(_n = (_s = _x.call(_i)).done) && - (_arr.push(_s.value), _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - if (!_n && null != _i.return && ((_r = _i.return()), Object(_r) !== _r)) - return; - } finally { - if (_d) throw _e; - } - } - return _arr; - } -} -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} -const _require = require('../../parsers/parsers-commons'), - unwrapNullable = _require.unwrapNullable; -const _require2 = require('../TypeUtils/Cxx'), - wrapOptional = _require2.wrapOptional; -const _require3 = require('../Utils'), - getEnumName = _require3.getEnumName, - toSafeCppString = _require3.toSafeCppString; -const _require4 = require('../Utils'), - indent = _require4.indent; -const _require5 = require('./Utils'), - createAliasResolver = _require5.createAliasResolver, - getAreEnumMembersInteger = _require5.getAreEnumMembersInteger, - getModules = _require5.getModules, - isArrayRecursiveMember = _require5.isArrayRecursiveMember, - isDirectRecursiveMember = _require5.isDirectRecursiveMember; -const ModuleClassDeclarationTemplate = ({ - hasteModuleName, - moduleProperties, - structs, - enums, -}) => { - return `${enums} - ${structs}class JSI_EXPORT ${hasteModuleName}CxxSpecJSI : public TurboModule { -protected: - ${hasteModuleName}CxxSpecJSI(std::shared_ptr jsInvoker); - -public: - ${indent(moduleProperties.join('\n'), 2)} - -};`; -}; -const ModuleSpecClassDeclarationTemplate = ({ - hasteModuleName, - moduleName, - moduleProperties, -}) => { - return `template -class JSI_EXPORT ${hasteModuleName}CxxSpec : public TurboModule { -public: - jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.get(rt, propName); - } - - static constexpr std::string_view kModuleName = "${moduleName}"; - -protected: - ${hasteModuleName}CxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{${hasteModuleName}CxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - -private: - class Delegate : public ${hasteModuleName}CxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - ${hasteModuleName}CxxSpecJSI(std::move(jsInvoker)), instance_(instance) {} - - ${indent(moduleProperties.join('\n'), 4)} - - private: - T *instance_; - }; - - Delegate delegate_; -};`; -}; -const FileTemplate = ({modules}) => { - return `/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateModuleH.js - */ - -#pragma once - -#include -#include - -namespace facebook::react { - -${modules.join('\n\n')} - -} // namespace facebook::react -`; -}; -function translatePrimitiveJSTypeToCpp( - moduleName, - parentObjectAliasName, - nullableTypeAnnotation, - optional, - createErrorMessage, - resolveAlias, - enumMap, -) { - const _unwrapNullable = unwrapNullable(nullableTypeAnnotation), - _unwrapNullable2 = _slicedToArray(_unwrapNullable, 2), - typeAnnotation = _unwrapNullable2[0], - nullable = _unwrapNullable2[1]; - const isRecursiveType = isDirectRecursiveMember( - parentObjectAliasName, - nullableTypeAnnotation, - ); - const isRequired = (!optional && !nullable) || isRecursiveType; - let realTypeAnnotation = typeAnnotation; - if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { - realTypeAnnotation = resolveAlias(realTypeAnnotation.name); - } - switch (realTypeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (realTypeAnnotation.name) { - case 'RootTag': - return wrapOptional('double', isRequired); - default: - realTypeAnnotation.name; - throw new Error(createErrorMessage(realTypeAnnotation.name)); - } - case 'VoidTypeAnnotation': - return 'void'; - case 'StringTypeAnnotation': - return wrapOptional('jsi::String', isRequired); - case 'NumberTypeAnnotation': - return wrapOptional('double', isRequired); - case 'DoubleTypeAnnotation': - return wrapOptional('double', isRequired); - case 'FloatTypeAnnotation': - return wrapOptional('double', isRequired); - case 'Int32TypeAnnotation': - return wrapOptional('int', isRequired); - case 'BooleanTypeAnnotation': - return wrapOptional('bool', isRequired); - case 'EnumDeclaration': - switch (realTypeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return wrapOptional('jsi::Value', isRequired); - case 'StringTypeAnnotation': - return wrapOptional('jsi::String', isRequired); - default: - throw new Error(createErrorMessage(realTypeAnnotation.type)); - } - case 'GenericObjectTypeAnnotation': - return wrapOptional('jsi::Object', isRequired); - case 'UnionTypeAnnotation': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return wrapOptional('double', isRequired); - case 'ObjectTypeAnnotation': - return wrapOptional('jsi::Object', isRequired); - case 'StringTypeAnnotation': - return wrapOptional('jsi::String', isRequired); - default: - throw new Error(createErrorMessage(realTypeAnnotation.type)); - } - case 'ObjectTypeAnnotation': - return wrapOptional('jsi::Object', isRequired); - case 'ArrayTypeAnnotation': - return wrapOptional('jsi::Array', isRequired); - case 'FunctionTypeAnnotation': - return wrapOptional('jsi::Function', isRequired); - case 'PromiseTypeAnnotation': - return wrapOptional('jsi::Value', isRequired); - case 'MixedTypeAnnotation': - return wrapOptional('jsi::Value', isRequired); - default: - realTypeAnnotation.type; - throw new Error(createErrorMessage(realTypeAnnotation.type)); - } -} -function createStructsString(moduleName, aliasMap, resolveAlias, enumMap) { - const getCppType = (parentObjectAlias, v) => - translatePrimitiveJSTypeToCpp( - moduleName, - parentObjectAlias, - v.typeAnnotation, - false, - typeName => `Unsupported type for param "${v.name}". Found: ${typeName}`, - resolveAlias, - enumMap, - ); - - // TODO: T171006733 [Begin] Remove deprecated Cxx TMs structs after a new release. - return ( - Object.keys(aliasMap) - .map(alias => { - const value = aliasMap[alias]; - if (value.properties.length === 0) { - return ''; - } - const structName = `${moduleName}Base${alias}`; - const structNameNew = `${moduleName}${alias}`; - const templateParameterWithTypename = value.properties - .map((v, i) => `typename P${i}`) - .join(', '); - const templateParameter = value.properties - .map((v, i) => 'P' + i) - .join(', '); - const debugParameterConversion = value.properties - .map( - (v, i) => ` static ${getCppType(alias, v)} ${ - v.name - }ToJs(jsi::Runtime &rt, P${i} value) { - return bridging::toJs(rt, value); - }`, - ) - .join('\n\n'); - return ` -#pragma mark - ${structName} - -template <${templateParameterWithTypename}> -struct [[deprecated("Use ${structNameNew} instead.")]] ${structName} { -${value.properties.map((v, i) => ' P' + i + ' ' + v.name).join(';\n')}; - bool operator==(const ${structName} &other) const { - return ${value.properties - .map(v => `${v.name} == other.${v.name}`) - .join(' && ')}; - } -}; - -template <${templateParameterWithTypename}> -struct [[deprecated("Use ${structNameNew}Bridging instead.")]] ${structName}Bridging { - static ${structName}<${templateParameter}> fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - ${structName}<${templateParameter}> result{ -${value.properties - .map( - (v, i) => - ` bridging::fromJs(rt, value.getProperty(rt, "${v.name}"), jsInvoker)`, - ) - .join(',\n')}}; - return result; - } - -#ifdef DEBUG -${debugParameterConversion} -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const ${structName}<${templateParameter}> &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); -${value.properties - .map((v, i) => { - if (v.optional) { - return ` if (value.${v.name}) { - result.setProperty(rt, "${v.name}", bridging::toJs(rt, value.${v.name}.value(), jsInvoker)); - }`; - } else { - return ` result.setProperty(rt, "${v.name}", bridging::toJs(rt, value.${v.name}, jsInvoker));`; - } - }) - .join('\n')} - return result; - } -}; - -`; - }) - .join('\n') + - // TODO: T171006733 [End] Remove deprecated Cxx TMs structs after a new release. - Object.keys(aliasMap) - .map(alias => { - const value = aliasMap[alias]; - if (value.properties.length === 0) { - return ''; - } - const structName = `${moduleName}${alias}`; - const templateParameter = value.properties.filter( - v => - !isDirectRecursiveMember(alias, v.typeAnnotation) && - !isArrayRecursiveMember(alias, v.typeAnnotation), - ); - const templateParameterWithTypename = templateParameter - .map((v, i) => `typename P${i}`) - .join(', '); - const templateParameterWithoutTypename = templateParameter - .map((v, i) => `P${i}`) - .join(', '); - let i = -1; - const templateMemberTypes = value.properties.map(v => { - if (isDirectRecursiveMember(alias, v.typeAnnotation)) { - return `std::unique_ptr<${structName}<${templateParameterWithoutTypename}>> ${v.name}`; - } else if (isArrayRecursiveMember(alias, v.typeAnnotation)) { - const _unwrapNullable3 = unwrapNullable(v.typeAnnotation), - _unwrapNullable4 = _slicedToArray(_unwrapNullable3, 1), - nullable = _unwrapNullable4[0]; - return ( - (nullable - ? `std::optional>>` - : `std::vector<${structName}<${templateParameterWithoutTypename}>>`) + - ` ${v.name}` - ); - } else { - i++; - return `P${i} ${v.name}`; - } - }); - const debugParameterConversion = value.properties - .map( - v => ` static ${getCppType(alias, v)} ${ - v.name - }ToJs(jsi::Runtime &rt, decltype(types.${v.name}) value) { - return bridging::toJs(rt, value); - }`, - ) - .join('\n\n'); - return ` -#pragma mark - ${structName} - -template <${templateParameterWithTypename}> -struct ${structName} { -${templateMemberTypes.map(v => ' ' + v).join(';\n')}; - bool operator==(const ${structName} &other) const { - return ${value.properties - .map(v => `${v.name} == other.${v.name}`) - .join(' && ')}; - } -}; - -template -struct ${structName}Bridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ -${value.properties - .map(v => { - if (isDirectRecursiveMember(alias, v.typeAnnotation)) { - return ` value.hasProperty(rt, "${v.name}") ? std::make_unique(bridging::fromJs(rt, value.getProperty(rt, "${v.name}"), jsInvoker)) : nullptr`; - } else { - return ` bridging::fromJs(rt, value.getProperty(rt, "${v.name}"), jsInvoker)`; - } - }) - .join(',\n')}}; - return result; - } - -#ifdef DEBUG -${debugParameterConversion} -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); -${value.properties - .map(v => { - if (isDirectRecursiveMember(alias, v.typeAnnotation)) { - return ` if (value.${v.name}) { - result.setProperty(rt, "${v.name}", bridging::toJs(rt, *value.${v.name}, jsInvoker)); - }`; - } else if (v.optional) { - return ` if (value.${v.name}) { - result.setProperty(rt, "${v.name}", bridging::toJs(rt, value.${v.name}.value(), jsInvoker)); - }`; - } else { - return ` result.setProperty(rt, "${v.name}", bridging::toJs(rt, value.${v.name}, jsInvoker));`; - } - }) - .join('\n')} - return result; - } -}; - -`; - }) - .join('\n') - ); -} -const EnumTemplate = ({ - enumName, - values, - fromCases, - toCases, - nativeEnumMemberType, -}) => { - const _ref = - nativeEnumMemberType === 'std::string' - ? [ - 'const jsi::String &rawValue', - 'std::string value = rawValue.utf8(rt);', - 'jsi::String', - ] - : [ - 'const jsi::Value &rawValue', - 'double value = (double)rawValue.asNumber();', - 'jsi::Value', - ], - _ref2 = _slicedToArray(_ref, 3), - fromValue = _ref2[0], - fromValueConversion = _ref2[1], - toValue = _ref2[2]; - return ` -#pragma mark - ${enumName} - -enum class ${enumName} { ${values} }; - -template <> -struct Bridging<${enumName}> { - static ${enumName} fromJs(jsi::Runtime &rt, ${fromValue}) { - ${fromValueConversion} - ${fromCases} - } - - static ${toValue} toJs(jsi::Runtime &rt, ${enumName} value) { - ${toCases} - } -};`; -}; -function generateEnum(moduleName, origEnumName, members, memberType) { - const enumName = getEnumName(moduleName, origEnumName); - const nativeEnumMemberType = - memberType === 'StringTypeAnnotation' - ? 'std::string' - : getAreEnumMembersInteger(members) - ? 'int32_t' - : 'float'; - const getMemberValueAppearance = value => - memberType === 'StringTypeAnnotation' - ? `"${value}"` - : `${value}${nativeEnumMemberType === 'float' ? 'f' : ''}`; - const fromCases = - members - .map( - member => `if (value == ${getMemberValueAppearance(member.value)}) { - return ${enumName}::${toSafeCppString(member.name)}; - }`, - ) - .join(' else ') + - ` else { - throw jsi::JSError(rt, "No appropriate enum member found for value"); - }`; - const toCases = - members - .map( - member => `if (value == ${enumName}::${toSafeCppString(member.name)}) { - return bridging::toJs(rt, ${getMemberValueAppearance(member.value)}); - }`, - ) - .join(' else ') + - ` else { - throw jsi::JSError(rt, "No appropriate enum member found for enum value"); - }`; - return EnumTemplate({ - enumName, - values: members.map(member => member.name).join(', '), - fromCases, - toCases, - nativeEnumMemberType, - }); -} -function createEnums(moduleName, enumMap, resolveAlias) { - return Object.entries(enumMap) - .map(([enumName, enumNode]) => { - return generateEnum( - moduleName, - enumName, - enumNode.members, - enumNode.memberType, - ); - }) - .filter(Boolean) - .join('\n'); -} -function translatePropertyToCpp( - moduleName, - prop, - resolveAlias, - enumMap, - abstract = false, -) { - const _unwrapNullable5 = unwrapNullable(prop.typeAnnotation), - _unwrapNullable6 = _slicedToArray(_unwrapNullable5, 1), - propTypeAnnotation = _unwrapNullable6[0]; - const params = propTypeAnnotation.params.map( - param => `std::move(${param.name})`, - ); - const paramTypes = propTypeAnnotation.params.map(param => { - const translatedParam = translatePrimitiveJSTypeToCpp( - moduleName, - null, - param.typeAnnotation, - param.optional, - typeName => - `Unsupported type for param "${param.name}" in ${prop.name}. Found: ${typeName}`, - resolveAlias, - enumMap, - ); - return `${translatedParam} ${param.name}`; - }); - const returnType = translatePrimitiveJSTypeToCpp( - moduleName, - null, - propTypeAnnotation.returnTypeAnnotation, - false, - typeName => `Unsupported return type for ${prop.name}. Found: ${typeName}`, - resolveAlias, - enumMap, - ); - - // The first param will always be the runtime reference. - paramTypes.unshift('jsi::Runtime &rt'); - const method = `${returnType} ${prop.name}(${paramTypes.join(', ')})`; - if (abstract) { - return `virtual ${method} = 0;`; - } - return `${method} override { - static_assert( - bridging::getParameterCount(&T::${prop.name}) == ${paramTypes.length}, - "Expected ${prop.name}(...) to have ${paramTypes.length} parameters"); - - return bridging::callFromJs<${returnType}>( - rt, &T::${prop.name}, jsInvoker_, ${['instance_', ...params].join(', ')}); -}`; -} -module.exports = { - generate( - libraryName, - schema, - packageName, - assumeNonnull = false, - headerPrefix, - ) { - const nativeModules = getModules(schema); - const modules = Object.keys(nativeModules).flatMap(hasteModuleName => { - const _nativeModules$hasteM = nativeModules[hasteModuleName], - aliasMap = _nativeModules$hasteM.aliasMap, - enumMap = _nativeModules$hasteM.enumMap, - properties = _nativeModules$hasteM.spec.properties, - moduleName = _nativeModules$hasteM.moduleName; - const resolveAlias = createAliasResolver(aliasMap); - const structs = createStructsString( - moduleName, - aliasMap, - resolveAlias, - enumMap, - ); - const enums = createEnums(moduleName, enumMap, resolveAlias); - return [ - ModuleClassDeclarationTemplate({ - hasteModuleName, - moduleProperties: properties.map(prop => - translatePropertyToCpp( - moduleName, - prop, - resolveAlias, - enumMap, - true, - ), - ), - structs, - enums, - }), - ModuleSpecClassDeclarationTemplate({ - hasteModuleName, - moduleName, - moduleProperties: properties.map(prop => - translatePropertyToCpp(moduleName, prop, resolveAlias, enumMap), - ), - }), - ]; - }); - const fileName = `${libraryName}JSI.h`; - const replacedTemplate = FileTemplate({ - modules, - }); - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleH.js.flow b/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleH.js.flow deleted file mode 100644 index 6cfbdd060..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleH.js.flow +++ /dev/null @@ -1,660 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; -import type { - NamedShape, - NativeModuleBaseTypeAnnotation, -} from '../../CodegenSchema'; -import type { - NativeModuleAliasMap, - NativeModuleEnumMap, - NativeModuleEnumMembers, - NativeModuleEnumMemberType, - NativeModuleFunctionTypeAnnotation, - NativeModulePropertyShape, - NativeModuleTypeAnnotation, - Nullable, - SchemaType, -} from '../../CodegenSchema'; -import type {AliasResolver} from './Utils'; - -const {unwrapNullable} = require('../../parsers/parsers-commons'); -const {wrapOptional} = require('../TypeUtils/Cxx'); -const {getEnumName, toSafeCppString} = require('../Utils'); -const {indent} = require('../Utils'); -const { - createAliasResolver, - getAreEnumMembersInteger, - getModules, - isArrayRecursiveMember, - isDirectRecursiveMember, -} = require('./Utils'); - -type FilesOutput = Map; - -const ModuleClassDeclarationTemplate = ({ - hasteModuleName, - moduleProperties, - structs, - enums, -}: $ReadOnly<{ - hasteModuleName: string, - moduleProperties: string[], - structs: string, - enums: string, -}>) => { - return `${enums} - ${structs}class JSI_EXPORT ${hasteModuleName}CxxSpecJSI : public TurboModule { -protected: - ${hasteModuleName}CxxSpecJSI(std::shared_ptr jsInvoker); - -public: - ${indent(moduleProperties.join('\n'), 2)} - -};`; -}; - -const ModuleSpecClassDeclarationTemplate = ({ - hasteModuleName, - moduleName, - moduleProperties, -}: $ReadOnly<{ - hasteModuleName: string, - moduleName: string, - moduleProperties: string[], -}>) => { - return `template -class JSI_EXPORT ${hasteModuleName}CxxSpec : public TurboModule { -public: - jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.get(rt, propName); - } - - static constexpr std::string_view kModuleName = "${moduleName}"; - -protected: - ${hasteModuleName}CxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{${hasteModuleName}CxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - -private: - class Delegate : public ${hasteModuleName}CxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - ${hasteModuleName}CxxSpecJSI(std::move(jsInvoker)), instance_(instance) {} - - ${indent(moduleProperties.join('\n'), 4)} - - private: - T *instance_; - }; - - Delegate delegate_; -};`; -}; - -const FileTemplate = ({ - modules, -}: $ReadOnly<{ - modules: string[], -}>) => { - return `/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateModuleH.js - */ - -#pragma once - -#include -#include - -namespace facebook::react { - -${modules.join('\n\n')} - -} // namespace facebook::react -`; -}; - -function translatePrimitiveJSTypeToCpp( - moduleName: string, - parentObjectAliasName: ?string, - nullableTypeAnnotation: Nullable, - optional: boolean, - createErrorMessage: (typeName: string) => string, - resolveAlias: AliasResolver, - enumMap: NativeModuleEnumMap, -) { - const [typeAnnotation, nullable] = unwrapNullable( - nullableTypeAnnotation, - ); - const isRecursiveType = isDirectRecursiveMember( - parentObjectAliasName, - nullableTypeAnnotation, - ); - const isRequired = (!optional && !nullable) || isRecursiveType; - let realTypeAnnotation = typeAnnotation; - if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { - realTypeAnnotation = resolveAlias(realTypeAnnotation.name); - } - - switch (realTypeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (realTypeAnnotation.name) { - case 'RootTag': - return wrapOptional('double', isRequired); - default: - (realTypeAnnotation.name: empty); - throw new Error(createErrorMessage(realTypeAnnotation.name)); - } - case 'VoidTypeAnnotation': - return 'void'; - case 'StringTypeAnnotation': - return wrapOptional('jsi::String', isRequired); - case 'NumberTypeAnnotation': - return wrapOptional('double', isRequired); - case 'DoubleTypeAnnotation': - return wrapOptional('double', isRequired); - case 'FloatTypeAnnotation': - return wrapOptional('double', isRequired); - case 'Int32TypeAnnotation': - return wrapOptional('int', isRequired); - case 'BooleanTypeAnnotation': - return wrapOptional('bool', isRequired); - case 'EnumDeclaration': - switch (realTypeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return wrapOptional('jsi::Value', isRequired); - case 'StringTypeAnnotation': - return wrapOptional('jsi::String', isRequired); - default: - throw new Error(createErrorMessage(realTypeAnnotation.type)); - } - case 'GenericObjectTypeAnnotation': - return wrapOptional('jsi::Object', isRequired); - case 'UnionTypeAnnotation': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return wrapOptional('double', isRequired); - case 'ObjectTypeAnnotation': - return wrapOptional('jsi::Object', isRequired); - case 'StringTypeAnnotation': - return wrapOptional('jsi::String', isRequired); - default: - throw new Error(createErrorMessage(realTypeAnnotation.type)); - } - case 'ObjectTypeAnnotation': - return wrapOptional('jsi::Object', isRequired); - case 'ArrayTypeAnnotation': - return wrapOptional('jsi::Array', isRequired); - case 'FunctionTypeAnnotation': - return wrapOptional('jsi::Function', isRequired); - case 'PromiseTypeAnnotation': - return wrapOptional('jsi::Value', isRequired); - case 'MixedTypeAnnotation': - return wrapOptional('jsi::Value', isRequired); - default: - (realTypeAnnotation.type: empty); - throw new Error(createErrorMessage(realTypeAnnotation.type)); - } -} - -function createStructsString( - moduleName: string, - aliasMap: NativeModuleAliasMap, - resolveAlias: AliasResolver, - enumMap: NativeModuleEnumMap, -): string { - const getCppType = ( - parentObjectAlias: string, - v: NamedShape>, - ) => - translatePrimitiveJSTypeToCpp( - moduleName, - parentObjectAlias, - v.typeAnnotation, - false, - typeName => `Unsupported type for param "${v.name}". Found: ${typeName}`, - resolveAlias, - enumMap, - ); - - // TODO: T171006733 [Begin] Remove deprecated Cxx TMs structs after a new release. - return ( - Object.keys(aliasMap) - .map(alias => { - const value = aliasMap[alias]; - if (value.properties.length === 0) { - return ''; - } - const structName = `${moduleName}Base${alias}`; - const structNameNew = `${moduleName}${alias}`; - const templateParameterWithTypename = value.properties - .map((v, i) => `typename P${i}`) - .join(', '); - const templateParameter = value.properties - .map((v, i) => 'P' + i) - .join(', '); - const debugParameterConversion = value.properties - .map( - (v, i) => ` static ${getCppType(alias, v)} ${ - v.name - }ToJs(jsi::Runtime &rt, P${i} value) { - return bridging::toJs(rt, value); - }`, - ) - .join('\n\n'); - return ` -#pragma mark - ${structName} - -template <${templateParameterWithTypename}> -struct [[deprecated("Use ${structNameNew} instead.")]] ${structName} { -${value.properties.map((v, i) => ' P' + i + ' ' + v.name).join(';\n')}; - bool operator==(const ${structName} &other) const { - return ${value.properties - .map(v => `${v.name} == other.${v.name}`) - .join(' && ')}; - } -}; - -template <${templateParameterWithTypename}> -struct [[deprecated("Use ${structNameNew}Bridging instead.")]] ${structName}Bridging { - static ${structName}<${templateParameter}> fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - ${structName}<${templateParameter}> result{ -${value.properties - .map( - (v, i) => - ` bridging::fromJs(rt, value.getProperty(rt, "${v.name}"), jsInvoker)`, - ) - .join(',\n')}}; - return result; - } - -#ifdef DEBUG -${debugParameterConversion} -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const ${structName}<${templateParameter}> &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); -${value.properties - .map((v, i) => { - if (v.optional) { - return ` if (value.${v.name}) { - result.setProperty(rt, "${v.name}", bridging::toJs(rt, value.${v.name}.value(), jsInvoker)); - }`; - } else { - return ` result.setProperty(rt, "${v.name}", bridging::toJs(rt, value.${v.name}, jsInvoker));`; - } - }) - .join('\n')} - return result; - } -}; - -`; - }) - .join('\n') + - // TODO: T171006733 [End] Remove deprecated Cxx TMs structs after a new release. - Object.keys(aliasMap) - .map(alias => { - const value = aliasMap[alias]; - if (value.properties.length === 0) { - return ''; - } - const structName = `${moduleName}${alias}`; - const templateParameter = value.properties.filter( - v => - !isDirectRecursiveMember(alias, v.typeAnnotation) && - !isArrayRecursiveMember(alias, v.typeAnnotation), - ); - const templateParameterWithTypename = templateParameter - .map((v, i) => `typename P${i}`) - .join(', '); - const templateParameterWithoutTypename = templateParameter - .map((v, i) => `P${i}`) - .join(', '); - let i = -1; - const templateMemberTypes = value.properties.map(v => { - if (isDirectRecursiveMember(alias, v.typeAnnotation)) { - return `std::unique_ptr<${structName}<${templateParameterWithoutTypename}>> ${v.name}`; - } else if (isArrayRecursiveMember(alias, v.typeAnnotation)) { - const [nullable] = unwrapNullable( - v.typeAnnotation, - ); - return ( - (nullable - ? `std::optional>>` - : `std::vector<${structName}<${templateParameterWithoutTypename}>>`) + - ` ${v.name}` - ); - } else { - i++; - return `P${i} ${v.name}`; - } - }); - const debugParameterConversion = value.properties - .map( - v => ` static ${getCppType(alias, v)} ${ - v.name - }ToJs(jsi::Runtime &rt, decltype(types.${v.name}) value) { - return bridging::toJs(rt, value); - }`, - ) - .join('\n\n'); - return ` -#pragma mark - ${structName} - -template <${templateParameterWithTypename}> -struct ${structName} { -${templateMemberTypes.map(v => ' ' + v).join(';\n')}; - bool operator==(const ${structName} &other) const { - return ${value.properties - .map(v => `${v.name} == other.${v.name}`) - .join(' && ')}; - } -}; - -template -struct ${structName}Bridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ -${value.properties - .map(v => { - if (isDirectRecursiveMember(alias, v.typeAnnotation)) { - return ` value.hasProperty(rt, "${v.name}") ? std::make_unique(bridging::fromJs(rt, value.getProperty(rt, "${v.name}"), jsInvoker)) : nullptr`; - } else { - return ` bridging::fromJs(rt, value.getProperty(rt, "${v.name}"), jsInvoker)`; - } - }) - .join(',\n')}}; - return result; - } - -#ifdef DEBUG -${debugParameterConversion} -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); -${value.properties - .map(v => { - if (isDirectRecursiveMember(alias, v.typeAnnotation)) { - return ` if (value.${v.name}) { - result.setProperty(rt, "${v.name}", bridging::toJs(rt, *value.${v.name}, jsInvoker)); - }`; - } else if (v.optional) { - return ` if (value.${v.name}) { - result.setProperty(rt, "${v.name}", bridging::toJs(rt, value.${v.name}.value(), jsInvoker)); - }`; - } else { - return ` result.setProperty(rt, "${v.name}", bridging::toJs(rt, value.${v.name}, jsInvoker));`; - } - }) - .join('\n')} - return result; - } -}; - -`; - }) - .join('\n') - ); -} - -type NativeEnumMemberValueType = 'std::string' | 'int32_t' | 'float'; - -const EnumTemplate = ({ - enumName, - values, - fromCases, - toCases, - nativeEnumMemberType, -}: { - enumName: string, - values: string, - fromCases: string, - toCases: string, - nativeEnumMemberType: NativeEnumMemberValueType, -}) => { - const [fromValue, fromValueConversion, toValue] = - nativeEnumMemberType === 'std::string' - ? [ - 'const jsi::String &rawValue', - 'std::string value = rawValue.utf8(rt);', - 'jsi::String', - ] - : [ - 'const jsi::Value &rawValue', - 'double value = (double)rawValue.asNumber();', - 'jsi::Value', - ]; - - return ` -#pragma mark - ${enumName} - -enum class ${enumName} { ${values} }; - -template <> -struct Bridging<${enumName}> { - static ${enumName} fromJs(jsi::Runtime &rt, ${fromValue}) { - ${fromValueConversion} - ${fromCases} - } - - static ${toValue} toJs(jsi::Runtime &rt, ${enumName} value) { - ${toCases} - } -};`; -}; - -function generateEnum( - moduleName: string, - origEnumName: string, - members: NativeModuleEnumMembers, - memberType: NativeModuleEnumMemberType, -): string { - const enumName = getEnumName(moduleName, origEnumName); - - const nativeEnumMemberType: NativeEnumMemberValueType = - memberType === 'StringTypeAnnotation' - ? 'std::string' - : getAreEnumMembersInteger(members) - ? 'int32_t' - : 'float'; - - const getMemberValueAppearance = (value: string) => - memberType === 'StringTypeAnnotation' - ? `"${value}"` - : `${value}${nativeEnumMemberType === 'float' ? 'f' : ''}`; - - const fromCases = - members - .map( - member => `if (value == ${getMemberValueAppearance(member.value)}) { - return ${enumName}::${toSafeCppString(member.name)}; - }`, - ) - .join(' else ') + - ` else { - throw jsi::JSError(rt, "No appropriate enum member found for value"); - }`; - - const toCases = - members - .map( - member => `if (value == ${enumName}::${toSafeCppString(member.name)}) { - return bridging::toJs(rt, ${getMemberValueAppearance(member.value)}); - }`, - ) - .join(' else ') + - ` else { - throw jsi::JSError(rt, "No appropriate enum member found for enum value"); - }`; - - return EnumTemplate({ - enumName, - values: members.map(member => member.name).join(', '), - fromCases, - toCases, - nativeEnumMemberType, - }); -} - -function createEnums( - moduleName: string, - enumMap: NativeModuleEnumMap, - resolveAlias: AliasResolver, -): string { - return Object.entries(enumMap) - .map(([enumName, enumNode]) => { - return generateEnum( - moduleName, - enumName, - enumNode.members, - enumNode.memberType, - ); - }) - .filter(Boolean) - .join('\n'); -} - -function translatePropertyToCpp( - moduleName: string, - prop: NativeModulePropertyShape, - resolveAlias: AliasResolver, - enumMap: NativeModuleEnumMap, - abstract: boolean = false, -) { - const [propTypeAnnotation] = - unwrapNullable(prop.typeAnnotation); - - const params = propTypeAnnotation.params.map( - param => `std::move(${param.name})`, - ); - - const paramTypes = propTypeAnnotation.params.map(param => { - const translatedParam = translatePrimitiveJSTypeToCpp( - moduleName, - null, - param.typeAnnotation, - param.optional, - typeName => - `Unsupported type for param "${param.name}" in ${prop.name}. Found: ${typeName}`, - resolveAlias, - enumMap, - ); - return `${translatedParam} ${param.name}`; - }); - - const returnType = translatePrimitiveJSTypeToCpp( - moduleName, - null, - propTypeAnnotation.returnTypeAnnotation, - false, - typeName => `Unsupported return type for ${prop.name}. Found: ${typeName}`, - resolveAlias, - enumMap, - ); - - // The first param will always be the runtime reference. - paramTypes.unshift('jsi::Runtime &rt'); - - const method = `${returnType} ${prop.name}(${paramTypes.join(', ')})`; - - if (abstract) { - return `virtual ${method} = 0;`; - } - - return `${method} override { - static_assert( - bridging::getParameterCount(&T::${prop.name}) == ${paramTypes.length}, - "Expected ${prop.name}(...) to have ${paramTypes.length} parameters"); - - return bridging::callFromJs<${returnType}>( - rt, &T::${prop.name}, jsInvoker_, ${['instance_', ...params].join(', ')}); -}`; -} - -module.exports = { - generate( - libraryName: string, - schema: SchemaType, - packageName?: string, - assumeNonnull: boolean = false, - headerPrefix?: string, - ): FilesOutput { - const nativeModules = getModules(schema); - - const modules = Object.keys(nativeModules).flatMap(hasteModuleName => { - const { - aliasMap, - enumMap, - spec: {properties}, - moduleName, - } = nativeModules[hasteModuleName]; - const resolveAlias = createAliasResolver(aliasMap); - const structs = createStructsString( - moduleName, - aliasMap, - resolveAlias, - enumMap, - ); - const enums = createEnums(moduleName, enumMap, resolveAlias); - - return [ - ModuleClassDeclarationTemplate({ - hasteModuleName, - moduleProperties: properties.map(prop => - translatePropertyToCpp( - moduleName, - prop, - resolveAlias, - enumMap, - true, - ), - ), - structs, - enums, - }), - ModuleSpecClassDeclarationTemplate({ - hasteModuleName, - moduleName, - moduleProperties: properties.map(prop => - translatePropertyToCpp(moduleName, prop, resolveAlias, enumMap), - ), - }), - ]; - }); - - const fileName = `${libraryName}JSI.h`; - const replacedTemplate = FileTemplate({modules}); - - return new Map([[fileName, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleJavaSpec.js b/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleJavaSpec.js deleted file mode 100644 index fc30d0277..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleJavaSpec.js +++ /dev/null @@ -1,565 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -function _slicedToArray(arr, i) { - return ( - _arrayWithHoles(arr) || - _iterableToArrayLimit(arr, i) || - _unsupportedIterableToArray(arr, i) || - _nonIterableRest() - ); -} -function _nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.', - ); -} -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === 'string') return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === 'Object' && o.constructor) n = o.constructor.name; - if (n === 'Map' || n === 'Set') return Array.from(o); - if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) - return _arrayLikeToArray(o, minLen); -} -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; -} -function _iterableToArrayLimit(arr, i) { - var _i = - null == arr - ? null - : ('undefined' != typeof Symbol && arr[Symbol.iterator]) || - arr['@@iterator']; - if (null != _i) { - var _s, - _e, - _x, - _r, - _arr = [], - _n = !0, - _d = !1; - try { - if (((_x = (_i = _i.call(arr)).next), 0 === i)) { - if (Object(_i) !== _i) return; - _n = !1; - } else - for ( - ; - !(_n = (_s = _x.call(_i)).done) && - (_arr.push(_s.value), _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - if (!_n && null != _i.return && ((_r = _i.return()), Object(_r) !== _r)) - return; - } finally { - if (_d) throw _e; - } - } - return _arr; - } -} -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} -const _require = require('../../parsers/parsers-commons'), - unwrapNullable = _require.unwrapNullable; -const _require2 = require('../TypeUtils/Java'), - wrapOptional = _require2.wrapOptional; -const _require3 = require('./Utils'), - createAliasResolver = _require3.createAliasResolver, - getModules = _require3.getModules; -function FileTemplate(config) { - const packageName = config.packageName, - className = config.className, - jsName = config.jsName, - methods = config.methods, - imports = config.imports; - return ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateModuleJavaSpec.js - * - * ${'@'}nolint - */ - -package ${packageName}; - -${imports} - -public abstract class ${className} extends ReactContextBaseJavaModule implements TurboModule { - public static final String NAME = "${jsName}"; - - public ${className}(ReactApplicationContext reactContext) { - super(reactContext); - } - - @Override - public @Nonnull String getName() { - return NAME; - } - -${methods} -} -`; -} -function MethodTemplate(config) { - const abstract = config.abstract, - methodBody = config.methodBody, - methodJavaAnnotation = config.methodJavaAnnotation, - methodName = config.methodName, - translatedReturnType = config.translatedReturnType, - traversedArgs = config.traversedArgs; - const methodQualifier = abstract ? 'abstract ' : ''; - const methodClosing = abstract - ? ';' - : methodBody != null && methodBody.length > 0 - ? ` { ${methodBody} }` - : ' {}'; - return ` ${methodJavaAnnotation} - public ${methodQualifier}${translatedReturnType} ${methodName}(${traversedArgs.join( - ', ', - )})${methodClosing}`; -} -function translateFunctionParamToJavaType( - param, - createErrorMessage, - resolveAlias, - imports, -) { - const optional = param.optional, - nullableTypeAnnotation = param.typeAnnotation; - const _unwrapNullable = unwrapNullable(nullableTypeAnnotation), - _unwrapNullable2 = _slicedToArray(_unwrapNullable, 2), - typeAnnotation = _unwrapNullable2[0], - nullable = _unwrapNullable2[1]; - const isRequired = !optional && !nullable; - if (!isRequired) { - imports.add('javax.annotation.Nullable'); - } - - // FIXME: support class alias for args - let realTypeAnnotation = typeAnnotation; - if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { - realTypeAnnotation = resolveAlias(realTypeAnnotation.name); - } - switch (realTypeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (realTypeAnnotation.name) { - case 'RootTag': - return wrapOptional('double', isRequired); - default: - realTypeAnnotation.name; - throw new Error(createErrorMessage(realTypeAnnotation.name)); - } - case 'StringTypeAnnotation': - return wrapOptional('String', isRequired); - case 'NumberTypeAnnotation': - return wrapOptional('double', isRequired); - case 'FloatTypeAnnotation': - return wrapOptional('double', isRequired); - case 'DoubleTypeAnnotation': - return wrapOptional('double', isRequired); - case 'Int32TypeAnnotation': - return wrapOptional('double', isRequired); - case 'BooleanTypeAnnotation': - return wrapOptional('boolean', isRequired); - case 'EnumDeclaration': - switch (realTypeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return wrapOptional('double', isRequired); - case 'StringTypeAnnotation': - return wrapOptional('String', isRequired); - default: - throw new Error(createErrorMessage(realTypeAnnotation.type)); - } - case 'UnionTypeAnnotation': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return wrapOptional('double', isRequired); - case 'ObjectTypeAnnotation': - imports.add('com.facebook.react.bridge.ReadableMap'); - return wrapOptional('ReadableMap', isRequired); - case 'StringTypeAnnotation': - return wrapOptional('String', isRequired); - default: - throw new Error( - `Unsupported union member returning value, found: ${realTypeAnnotation.memberType}"`, - ); - } - case 'ObjectTypeAnnotation': - imports.add('com.facebook.react.bridge.ReadableMap'); - return wrapOptional('ReadableMap', isRequired); - case 'GenericObjectTypeAnnotation': - // Treat this the same as ObjectTypeAnnotation for now. - imports.add('com.facebook.react.bridge.ReadableMap'); - return wrapOptional('ReadableMap', isRequired); - case 'ArrayTypeAnnotation': - imports.add('com.facebook.react.bridge.ReadableArray'); - return wrapOptional('ReadableArray', isRequired); - case 'FunctionTypeAnnotation': - imports.add('com.facebook.react.bridge.Callback'); - return wrapOptional('Callback', isRequired); - default: - realTypeAnnotation.type; - throw new Error(createErrorMessage(realTypeAnnotation.type)); - } -} -function translateFunctionReturnTypeToJavaType( - nullableReturnTypeAnnotation, - createErrorMessage, - resolveAlias, - imports, -) { - const _unwrapNullable3 = unwrapNullable(nullableReturnTypeAnnotation), - _unwrapNullable4 = _slicedToArray(_unwrapNullable3, 2), - returnTypeAnnotation = _unwrapNullable4[0], - nullable = _unwrapNullable4[1]; - if (nullable) { - imports.add('javax.annotation.Nullable'); - } - const isRequired = !nullable; - - // FIXME: support class alias for args - let realTypeAnnotation = returnTypeAnnotation; - if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { - realTypeAnnotation = resolveAlias(realTypeAnnotation.name); - } - switch (realTypeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (realTypeAnnotation.name) { - case 'RootTag': - return wrapOptional('double', isRequired); - default: - realTypeAnnotation.name; - throw new Error(createErrorMessage(realTypeAnnotation.name)); - } - case 'VoidTypeAnnotation': - return 'void'; - case 'PromiseTypeAnnotation': - return 'void'; - case 'StringTypeAnnotation': - return wrapOptional('String', isRequired); - case 'NumberTypeAnnotation': - return wrapOptional('double', isRequired); - case 'FloatTypeAnnotation': - return wrapOptional('double', isRequired); - case 'DoubleTypeAnnotation': - return wrapOptional('double', isRequired); - case 'Int32TypeAnnotation': - return wrapOptional('double', isRequired); - case 'BooleanTypeAnnotation': - return wrapOptional('boolean', isRequired); - case 'EnumDeclaration': - switch (realTypeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return wrapOptional('double', isRequired); - case 'StringTypeAnnotation': - return wrapOptional('String', isRequired); - default: - throw new Error(createErrorMessage(realTypeAnnotation.type)); - } - case 'UnionTypeAnnotation': - switch (realTypeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return wrapOptional('double', isRequired); - case 'ObjectTypeAnnotation': - imports.add('com.facebook.react.bridge.WritableMap'); - return wrapOptional('WritableMap', isRequired); - case 'StringTypeAnnotation': - return wrapOptional('String', isRequired); - default: - throw new Error( - `Unsupported union member returning value, found: ${realTypeAnnotation.memberType}"`, - ); - } - case 'ObjectTypeAnnotation': - imports.add('com.facebook.react.bridge.WritableMap'); - return wrapOptional('WritableMap', isRequired); - case 'GenericObjectTypeAnnotation': - imports.add('com.facebook.react.bridge.WritableMap'); - return wrapOptional('WritableMap', isRequired); - case 'ArrayTypeAnnotation': - imports.add('com.facebook.react.bridge.WritableArray'); - return wrapOptional('WritableArray', isRequired); - default: - realTypeAnnotation.type; - throw new Error(createErrorMessage(realTypeAnnotation.type)); - } -} -function getFalsyReturnStatementFromReturnType( - nullableReturnTypeAnnotation, - createErrorMessage, - resolveAlias, -) { - const _unwrapNullable5 = unwrapNullable(nullableReturnTypeAnnotation), - _unwrapNullable6 = _slicedToArray(_unwrapNullable5, 2), - returnTypeAnnotation = _unwrapNullable6[0], - nullable = _unwrapNullable6[1]; - let realTypeAnnotation = returnTypeAnnotation; - if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { - realTypeAnnotation = resolveAlias(realTypeAnnotation.name); - } - switch (realTypeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (realTypeAnnotation.name) { - case 'RootTag': - return 'return 0.0;'; - default: - realTypeAnnotation.name; - throw new Error(createErrorMessage(realTypeAnnotation.name)); - } - case 'VoidTypeAnnotation': - return ''; - case 'PromiseTypeAnnotation': - return ''; - case 'NumberTypeAnnotation': - return nullable ? 'return null;' : 'return 0;'; - case 'FloatTypeAnnotation': - return nullable ? 'return null;' : 'return 0.0;'; - case 'DoubleTypeAnnotation': - return nullable ? 'return null;' : 'return 0.0;'; - case 'Int32TypeAnnotation': - return nullable ? 'return null;' : 'return 0;'; - case 'BooleanTypeAnnotation': - return nullable ? 'return null;' : 'return false;'; - case 'EnumDeclaration': - switch (realTypeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return nullable ? 'return null;' : 'return 0;'; - case 'StringTypeAnnotation': - return nullable ? 'return null;' : 'return "";'; - default: - throw new Error(createErrorMessage(realTypeAnnotation.type)); - } - case 'UnionTypeAnnotation': - switch (realTypeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return nullable ? 'return null;' : 'return 0;'; - case 'ObjectTypeAnnotation': - return 'return null;'; - case 'StringTypeAnnotation': - return nullable ? 'return null;' : 'return "";'; - default: - throw new Error( - `Unsupported union member returning value, found: ${realTypeAnnotation.memberType}"`, - ); - } - case 'StringTypeAnnotation': - return nullable ? 'return null;' : 'return "";'; - case 'ObjectTypeAnnotation': - return 'return null;'; - case 'GenericObjectTypeAnnotation': - return 'return null;'; - case 'ArrayTypeAnnotation': - return 'return null;'; - default: - realTypeAnnotation.type; - throw new Error(createErrorMessage(realTypeAnnotation.type)); - } -} - -// Build special-cased runtime check for getConstants(). -function buildGetConstantsMethod(method, imports, resolveAlias) { - const _unwrapNullable7 = unwrapNullable(method.typeAnnotation), - _unwrapNullable8 = _slicedToArray(_unwrapNullable7, 1), - methodTypeAnnotation = _unwrapNullable8[0]; - let returnTypeAnnotation = methodTypeAnnotation.returnTypeAnnotation; - if (returnTypeAnnotation.type === 'TypeAliasTypeAnnotation') { - // The return type is an alias, resolve it to get the expected undelying object literal type - returnTypeAnnotation = resolveAlias(returnTypeAnnotation.name); - } - if (returnTypeAnnotation.type === 'ObjectTypeAnnotation') { - const requiredProps = []; - const optionalProps = []; - const rawProperties = returnTypeAnnotation.properties || []; - rawProperties.forEach(p => { - if (p.optional || p.typeAnnotation.type === 'NullableTypeAnnotation') { - optionalProps.push(p.name); - } else { - requiredProps.push(p.name); - } - }); - if (requiredProps.length === 0 && optionalProps.length === 0) { - // Nothing to validate during runtime. - return ''; - } - imports.add('com.facebook.react.common.build.ReactBuildConfig'); - imports.add('java.util.Arrays'); - imports.add('java.util.HashSet'); - imports.add('java.util.Map'); - imports.add('java.util.Set'); - imports.add('javax.annotation.Nullable'); - const requiredPropsFragment = - requiredProps.length > 0 - ? `Arrays.asList( - ${requiredProps - .sort() - .map(p => `"${p}"`) - .join(',\n ')} - )` - : ''; - const optionalPropsFragment = - optionalProps.length > 0 - ? `Arrays.asList( - ${optionalProps - .sort() - .map(p => `"${p}"`) - .join(',\n ')} - )` - : ''; - return ` protected abstract Map getTypedExportedConstants(); - - @Override - @DoNotStrip - public final @Nullable Map getConstants() { - Map constants = getTypedExportedConstants(); - if (ReactBuildConfig.DEBUG || ReactBuildConfig.IS_INTERNAL_BUILD) { - Set obligatoryFlowConstants = new HashSet<>(${requiredPropsFragment}); - Set optionalFlowConstants = new HashSet<>(${optionalPropsFragment}); - Set undeclaredConstants = new HashSet<>(constants.keySet()); - undeclaredConstants.removeAll(obligatoryFlowConstants); - undeclaredConstants.removeAll(optionalFlowConstants); - if (!undeclaredConstants.isEmpty()) { - throw new IllegalStateException(String.format("Native Module Flow doesn't declare constants: %s", undeclaredConstants)); - } - undeclaredConstants = obligatoryFlowConstants; - undeclaredConstants.removeAll(constants.keySet()); - if (!undeclaredConstants.isEmpty()) { - throw new IllegalStateException(String.format("Native Module doesn't fill in constants: %s", undeclaredConstants)); - } - } - return constants; - }`; - } - return ''; -} -module.exports = { - generate( - libraryName, - schema, - packageName, - assumeNonnull = false, - headerPrefix, - ) { - const files = new Map(); - const nativeModules = getModules(schema); - const normalizedPackageName = - packageName == null ? 'com.facebook.fbreact.specs' : packageName; - const outputDir = `java/${normalizedPackageName.replace(/\./g, '/')}`; - Object.keys(nativeModules).forEach(hasteModuleName => { - const _nativeModules$hasteM = nativeModules[hasteModuleName], - aliasMap = _nativeModules$hasteM.aliasMap, - excludedPlatforms = _nativeModules$hasteM.excludedPlatforms, - moduleName = _nativeModules$hasteM.moduleName, - properties = _nativeModules$hasteM.spec.properties; - if (excludedPlatforms != null && excludedPlatforms.includes('android')) { - return; - } - const resolveAlias = createAliasResolver(aliasMap); - const className = `${hasteModuleName}Spec`; - const imports = new Set([ - // Always required. - 'com.facebook.react.bridge.ReactApplicationContext', - 'com.facebook.react.bridge.ReactContextBaseJavaModule', - 'com.facebook.react.bridge.ReactMethod', - 'com.facebook.react.turbomodule.core.interfaces.TurboModule', - 'com.facebook.proguard.annotations.DoNotStrip', - 'javax.annotation.Nonnull', - ]); - const methods = properties.map(method => { - if (method.name === 'getConstants') { - return buildGetConstantsMethod(method, imports, resolveAlias); - } - const _unwrapNullable9 = unwrapNullable(method.typeAnnotation), - _unwrapNullable10 = _slicedToArray(_unwrapNullable9, 1), - methodTypeAnnotation = _unwrapNullable10[0]; - - // Handle return type - const translatedReturnType = translateFunctionReturnTypeToJavaType( - methodTypeAnnotation.returnTypeAnnotation, - typeName => - `Unsupported return type for method ${method.name}. Found: ${typeName}`, - resolveAlias, - imports, - ); - const returningPromise = - methodTypeAnnotation.returnTypeAnnotation.type === - 'PromiseTypeAnnotation'; - const isSyncMethod = - methodTypeAnnotation.returnTypeAnnotation.type !== - 'VoidTypeAnnotation' && !returningPromise; - - // Handle method args - const traversedArgs = methodTypeAnnotation.params.map(param => { - const translatedParam = translateFunctionParamToJavaType( - param, - typeName => - `Unsupported type for param "${param.name}" in ${method.name}. Found: ${typeName}`, - resolveAlias, - imports, - ); - return `${translatedParam} ${param.name}`; - }); - if (returningPromise) { - // Promise return type requires an extra arg at the end. - imports.add('com.facebook.react.bridge.Promise'); - traversedArgs.push('Promise promise'); - } - const methodJavaAnnotation = `@ReactMethod${ - isSyncMethod ? '(isBlockingSynchronousMethod = true)' : '' - }\n @DoNotStrip`; - const methodBody = method.optional - ? getFalsyReturnStatementFromReturnType( - methodTypeAnnotation.returnTypeAnnotation, - typeName => - `Cannot build falsy return statement for return type for method ${method.name}. Found: ${typeName}`, - resolveAlias, - ) - : null; - return MethodTemplate({ - abstract: !method.optional, - methodBody, - methodJavaAnnotation, - methodName: method.name, - translatedReturnType, - traversedArgs, - }); - }); - files.set( - `${outputDir}/${className}.java`, - FileTemplate({ - packageName: normalizedPackageName, - className, - jsName: moduleName, - methods: methods.filter(Boolean).join('\n\n'), - imports: Array.from(imports) - .sort() - .map(p => `import ${p};`) - .join('\n'), - }), - ); - }); - return files; - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleJavaSpec.js.flow b/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleJavaSpec.js.flow deleted file mode 100644 index 7f19db7e5..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleJavaSpec.js.flow +++ /dev/null @@ -1,551 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type { - NamedShape, - NativeModuleFunctionTypeAnnotation, - NativeModuleParamTypeAnnotation, - NativeModulePropertyShape, - NativeModuleReturnTypeAnnotation, - Nullable, - SchemaType, -} from '../../CodegenSchema'; -import type {AliasResolver} from './Utils'; - -const {unwrapNullable} = require('../../parsers/parsers-commons'); -const {wrapOptional} = require('../TypeUtils/Java'); -const {createAliasResolver, getModules} = require('./Utils'); - -type FilesOutput = Map; - -function FileTemplate( - config: $ReadOnly<{ - packageName: string, - className: string, - jsName: string, - methods: string, - imports: string, - }>, -): string { - const {packageName, className, jsName, methods, imports} = config; - return ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateModuleJavaSpec.js - * - * ${'@'}nolint - */ - -package ${packageName}; - -${imports} - -public abstract class ${className} extends ReactContextBaseJavaModule implements TurboModule { - public static final String NAME = "${jsName}"; - - public ${className}(ReactApplicationContext reactContext) { - super(reactContext); - } - - @Override - public @Nonnull String getName() { - return NAME; - } - -${methods} -} -`; -} - -function MethodTemplate( - config: $ReadOnly<{ - abstract: boolean, - methodBody: ?string, - methodJavaAnnotation: string, - methodName: string, - translatedReturnType: string, - traversedArgs: Array, - }>, -): string { - const { - abstract, - methodBody, - methodJavaAnnotation, - methodName, - translatedReturnType, - traversedArgs, - } = config; - const methodQualifier = abstract ? 'abstract ' : ''; - const methodClosing = abstract - ? ';' - : methodBody != null && methodBody.length > 0 - ? ` { ${methodBody} }` - : ' {}'; - return ` ${methodJavaAnnotation} - public ${methodQualifier}${translatedReturnType} ${methodName}(${traversedArgs.join( - ', ', - )})${methodClosing}`; -} - -type Param = NamedShape>; - -function translateFunctionParamToJavaType( - param: Param, - createErrorMessage: (typeName: string) => string, - resolveAlias: AliasResolver, - imports: Set, -): string { - const {optional, typeAnnotation: nullableTypeAnnotation} = param; - const [typeAnnotation, nullable] = - unwrapNullable(nullableTypeAnnotation); - const isRequired = !optional && !nullable; - if (!isRequired) { - imports.add('javax.annotation.Nullable'); - } - - // FIXME: support class alias for args - let realTypeAnnotation = typeAnnotation; - if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { - realTypeAnnotation = resolveAlias(realTypeAnnotation.name); - } - - switch (realTypeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (realTypeAnnotation.name) { - case 'RootTag': - return wrapOptional('double', isRequired); - default: - (realTypeAnnotation.name: empty); - throw new Error(createErrorMessage(realTypeAnnotation.name)); - } - case 'StringTypeAnnotation': - return wrapOptional('String', isRequired); - case 'NumberTypeAnnotation': - return wrapOptional('double', isRequired); - case 'FloatTypeAnnotation': - return wrapOptional('double', isRequired); - case 'DoubleTypeAnnotation': - return wrapOptional('double', isRequired); - case 'Int32TypeAnnotation': - return wrapOptional('double', isRequired); - case 'BooleanTypeAnnotation': - return wrapOptional('boolean', isRequired); - case 'EnumDeclaration': - switch (realTypeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return wrapOptional('double', isRequired); - case 'StringTypeAnnotation': - return wrapOptional('String', isRequired); - default: - throw new Error(createErrorMessage(realTypeAnnotation.type)); - } - case 'UnionTypeAnnotation': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return wrapOptional('double', isRequired); - case 'ObjectTypeAnnotation': - imports.add('com.facebook.react.bridge.ReadableMap'); - return wrapOptional('ReadableMap', isRequired); - case 'StringTypeAnnotation': - return wrapOptional('String', isRequired); - default: - throw new Error( - `Unsupported union member returning value, found: ${realTypeAnnotation.memberType}"`, - ); - } - case 'ObjectTypeAnnotation': - imports.add('com.facebook.react.bridge.ReadableMap'); - return wrapOptional('ReadableMap', isRequired); - case 'GenericObjectTypeAnnotation': - // Treat this the same as ObjectTypeAnnotation for now. - imports.add('com.facebook.react.bridge.ReadableMap'); - return wrapOptional('ReadableMap', isRequired); - case 'ArrayTypeAnnotation': - imports.add('com.facebook.react.bridge.ReadableArray'); - return wrapOptional('ReadableArray', isRequired); - case 'FunctionTypeAnnotation': - imports.add('com.facebook.react.bridge.Callback'); - return wrapOptional('Callback', isRequired); - default: - (realTypeAnnotation.type: 'MixedTypeAnnotation'); - throw new Error(createErrorMessage(realTypeAnnotation.type)); - } -} - -function translateFunctionReturnTypeToJavaType( - nullableReturnTypeAnnotation: Nullable, - createErrorMessage: (typeName: string) => string, - resolveAlias: AliasResolver, - imports: Set, -): string { - const [returnTypeAnnotation, nullable] = - unwrapNullable( - nullableReturnTypeAnnotation, - ); - - if (nullable) { - imports.add('javax.annotation.Nullable'); - } - - const isRequired = !nullable; - - // FIXME: support class alias for args - let realTypeAnnotation = returnTypeAnnotation; - if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { - realTypeAnnotation = resolveAlias(realTypeAnnotation.name); - } - - switch (realTypeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (realTypeAnnotation.name) { - case 'RootTag': - return wrapOptional('double', isRequired); - default: - (realTypeAnnotation.name: empty); - throw new Error(createErrorMessage(realTypeAnnotation.name)); - } - case 'VoidTypeAnnotation': - return 'void'; - case 'PromiseTypeAnnotation': - return 'void'; - case 'StringTypeAnnotation': - return wrapOptional('String', isRequired); - case 'NumberTypeAnnotation': - return wrapOptional('double', isRequired); - case 'FloatTypeAnnotation': - return wrapOptional('double', isRequired); - case 'DoubleTypeAnnotation': - return wrapOptional('double', isRequired); - case 'Int32TypeAnnotation': - return wrapOptional('double', isRequired); - case 'BooleanTypeAnnotation': - return wrapOptional('boolean', isRequired); - case 'EnumDeclaration': - switch (realTypeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return wrapOptional('double', isRequired); - case 'StringTypeAnnotation': - return wrapOptional('String', isRequired); - default: - throw new Error(createErrorMessage(realTypeAnnotation.type)); - } - case 'UnionTypeAnnotation': - switch (realTypeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return wrapOptional('double', isRequired); - case 'ObjectTypeAnnotation': - imports.add('com.facebook.react.bridge.WritableMap'); - return wrapOptional('WritableMap', isRequired); - case 'StringTypeAnnotation': - return wrapOptional('String', isRequired); - default: - throw new Error( - `Unsupported union member returning value, found: ${realTypeAnnotation.memberType}"`, - ); - } - case 'ObjectTypeAnnotation': - imports.add('com.facebook.react.bridge.WritableMap'); - return wrapOptional('WritableMap', isRequired); - case 'GenericObjectTypeAnnotation': - imports.add('com.facebook.react.bridge.WritableMap'); - return wrapOptional('WritableMap', isRequired); - case 'ArrayTypeAnnotation': - imports.add('com.facebook.react.bridge.WritableArray'); - return wrapOptional('WritableArray', isRequired); - default: - (realTypeAnnotation.type: 'MixedTypeAnnotation'); - throw new Error(createErrorMessage(realTypeAnnotation.type)); - } -} - -function getFalsyReturnStatementFromReturnType( - nullableReturnTypeAnnotation: Nullable, - createErrorMessage: (typeName: string) => string, - resolveAlias: AliasResolver, -): string { - const [returnTypeAnnotation, nullable] = - unwrapNullable( - nullableReturnTypeAnnotation, - ); - - let realTypeAnnotation = returnTypeAnnotation; - if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { - realTypeAnnotation = resolveAlias(realTypeAnnotation.name); - } - - switch (realTypeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (realTypeAnnotation.name) { - case 'RootTag': - return 'return 0.0;'; - default: - (realTypeAnnotation.name: empty); - throw new Error(createErrorMessage(realTypeAnnotation.name)); - } - case 'VoidTypeAnnotation': - return ''; - case 'PromiseTypeAnnotation': - return ''; - case 'NumberTypeAnnotation': - return nullable ? 'return null;' : 'return 0;'; - case 'FloatTypeAnnotation': - return nullable ? 'return null;' : 'return 0.0;'; - case 'DoubleTypeAnnotation': - return nullable ? 'return null;' : 'return 0.0;'; - case 'Int32TypeAnnotation': - return nullable ? 'return null;' : 'return 0;'; - case 'BooleanTypeAnnotation': - return nullable ? 'return null;' : 'return false;'; - case 'EnumDeclaration': - switch (realTypeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return nullable ? 'return null;' : 'return 0;'; - case 'StringTypeAnnotation': - return nullable ? 'return null;' : 'return "";'; - default: - throw new Error(createErrorMessage(realTypeAnnotation.type)); - } - case 'UnionTypeAnnotation': - switch (realTypeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return nullable ? 'return null;' : 'return 0;'; - case 'ObjectTypeAnnotation': - return 'return null;'; - case 'StringTypeAnnotation': - return nullable ? 'return null;' : 'return "";'; - default: - throw new Error( - `Unsupported union member returning value, found: ${realTypeAnnotation.memberType}"`, - ); - } - case 'StringTypeAnnotation': - return nullable ? 'return null;' : 'return "";'; - case 'ObjectTypeAnnotation': - return 'return null;'; - case 'GenericObjectTypeAnnotation': - return 'return null;'; - case 'ArrayTypeAnnotation': - return 'return null;'; - default: - (realTypeAnnotation.type: 'MixedTypeAnnotation'); - throw new Error(createErrorMessage(realTypeAnnotation.type)); - } -} - -// Build special-cased runtime check for getConstants(). -function buildGetConstantsMethod( - method: NativeModulePropertyShape, - imports: Set, - resolveAlias: AliasResolver, -): string { - const [methodTypeAnnotation] = - unwrapNullable(method.typeAnnotation); - let returnTypeAnnotation = methodTypeAnnotation.returnTypeAnnotation; - if (returnTypeAnnotation.type === 'TypeAliasTypeAnnotation') { - // The return type is an alias, resolve it to get the expected undelying object literal type - returnTypeAnnotation = resolveAlias(returnTypeAnnotation.name); - } - - if (returnTypeAnnotation.type === 'ObjectTypeAnnotation') { - const requiredProps = []; - const optionalProps = []; - const rawProperties = returnTypeAnnotation.properties || []; - rawProperties.forEach(p => { - if (p.optional || p.typeAnnotation.type === 'NullableTypeAnnotation') { - optionalProps.push(p.name); - } else { - requiredProps.push(p.name); - } - }); - if (requiredProps.length === 0 && optionalProps.length === 0) { - // Nothing to validate during runtime. - return ''; - } - - imports.add('com.facebook.react.common.build.ReactBuildConfig'); - imports.add('java.util.Arrays'); - imports.add('java.util.HashSet'); - imports.add('java.util.Map'); - imports.add('java.util.Set'); - imports.add('javax.annotation.Nullable'); - - const requiredPropsFragment = - requiredProps.length > 0 - ? `Arrays.asList( - ${requiredProps - .sort() - .map(p => `"${p}"`) - .join(',\n ')} - )` - : ''; - const optionalPropsFragment = - optionalProps.length > 0 - ? `Arrays.asList( - ${optionalProps - .sort() - .map(p => `"${p}"`) - .join(',\n ')} - )` - : ''; - - return ` protected abstract Map getTypedExportedConstants(); - - @Override - @DoNotStrip - public final @Nullable Map getConstants() { - Map constants = getTypedExportedConstants(); - if (ReactBuildConfig.DEBUG || ReactBuildConfig.IS_INTERNAL_BUILD) { - Set obligatoryFlowConstants = new HashSet<>(${requiredPropsFragment}); - Set optionalFlowConstants = new HashSet<>(${optionalPropsFragment}); - Set undeclaredConstants = new HashSet<>(constants.keySet()); - undeclaredConstants.removeAll(obligatoryFlowConstants); - undeclaredConstants.removeAll(optionalFlowConstants); - if (!undeclaredConstants.isEmpty()) { - throw new IllegalStateException(String.format("Native Module Flow doesn't declare constants: %s", undeclaredConstants)); - } - undeclaredConstants = obligatoryFlowConstants; - undeclaredConstants.removeAll(constants.keySet()); - if (!undeclaredConstants.isEmpty()) { - throw new IllegalStateException(String.format("Native Module doesn't fill in constants: %s", undeclaredConstants)); - } - } - return constants; - }`; - } - - return ''; -} - -module.exports = { - generate( - libraryName: string, - schema: SchemaType, - packageName?: string, - assumeNonnull: boolean = false, - headerPrefix?: string, - ): FilesOutput { - const files = new Map(); - const nativeModules = getModules(schema); - - const normalizedPackageName = - packageName == null ? 'com.facebook.fbreact.specs' : packageName; - const outputDir = `java/${normalizedPackageName.replace(/\./g, '/')}`; - - Object.keys(nativeModules).forEach(hasteModuleName => { - const { - aliasMap, - excludedPlatforms, - moduleName, - spec: {properties}, - } = nativeModules[hasteModuleName]; - if (excludedPlatforms != null && excludedPlatforms.includes('android')) { - return; - } - const resolveAlias = createAliasResolver(aliasMap); - const className = `${hasteModuleName}Spec`; - - const imports: Set = new Set([ - // Always required. - 'com.facebook.react.bridge.ReactApplicationContext', - 'com.facebook.react.bridge.ReactContextBaseJavaModule', - 'com.facebook.react.bridge.ReactMethod', - 'com.facebook.react.turbomodule.core.interfaces.TurboModule', - 'com.facebook.proguard.annotations.DoNotStrip', - 'javax.annotation.Nonnull', - ]); - - const methods = properties.map(method => { - if (method.name === 'getConstants') { - return buildGetConstantsMethod(method, imports, resolveAlias); - } - - const [methodTypeAnnotation] = - unwrapNullable( - method.typeAnnotation, - ); - - // Handle return type - const translatedReturnType = translateFunctionReturnTypeToJavaType( - methodTypeAnnotation.returnTypeAnnotation, - typeName => - `Unsupported return type for method ${method.name}. Found: ${typeName}`, - resolveAlias, - imports, - ); - const returningPromise = - methodTypeAnnotation.returnTypeAnnotation.type === - 'PromiseTypeAnnotation'; - const isSyncMethod = - methodTypeAnnotation.returnTypeAnnotation.type !== - 'VoidTypeAnnotation' && !returningPromise; - - // Handle method args - const traversedArgs = methodTypeAnnotation.params.map(param => { - const translatedParam = translateFunctionParamToJavaType( - param, - typeName => - `Unsupported type for param "${param.name}" in ${method.name}. Found: ${typeName}`, - resolveAlias, - imports, - ); - return `${translatedParam} ${param.name}`; - }); - - if (returningPromise) { - // Promise return type requires an extra arg at the end. - imports.add('com.facebook.react.bridge.Promise'); - traversedArgs.push('Promise promise'); - } - - const methodJavaAnnotation = `@ReactMethod${ - isSyncMethod ? '(isBlockingSynchronousMethod = true)' : '' - }\n @DoNotStrip`; - const methodBody = method.optional - ? getFalsyReturnStatementFromReturnType( - methodTypeAnnotation.returnTypeAnnotation, - typeName => - `Cannot build falsy return statement for return type for method ${method.name}. Found: ${typeName}`, - resolveAlias, - ) - : null; - return MethodTemplate({ - abstract: !method.optional, - methodBody, - methodJavaAnnotation, - methodName: method.name, - translatedReturnType, - traversedArgs, - }); - }); - - files.set( - `${outputDir}/${className}.java`, - FileTemplate({ - packageName: normalizedPackageName, - className, - jsName: moduleName, - methods: methods.filter(Boolean).join('\n\n'), - imports: Array.from(imports) - .sort() - .map(p => `import ${p};`) - .join('\n'), - }), - ); - }); - - return files; - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleJniCpp.js b/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleJniCpp.js deleted file mode 100644 index 743d97310..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleJniCpp.js +++ /dev/null @@ -1,509 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -function _slicedToArray(arr, i) { - return ( - _arrayWithHoles(arr) || - _iterableToArrayLimit(arr, i) || - _unsupportedIterableToArray(arr, i) || - _nonIterableRest() - ); -} -function _nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.', - ); -} -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === 'string') return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === 'Object' && o.constructor) n = o.constructor.name; - if (n === 'Map' || n === 'Set') return Array.from(o); - if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) - return _arrayLikeToArray(o, minLen); -} -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; -} -function _iterableToArrayLimit(arr, i) { - var _i = - null == arr - ? null - : ('undefined' != typeof Symbol && arr[Symbol.iterator]) || - arr['@@iterator']; - if (null != _i) { - var _s, - _e, - _x, - _r, - _arr = [], - _n = !0, - _d = !1; - try { - if (((_x = (_i = _i.call(arr)).next), 0 === i)) { - if (Object(_i) !== _i) return; - _n = !1; - } else - for ( - ; - !(_n = (_s = _x.call(_i)).done) && - (_arr.push(_s.value), _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - if (!_n && null != _i.return && ((_r = _i.return()), Object(_r) !== _r)) - return; - } finally { - if (_d) throw _e; - } - } - return _arr; - } -} -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} -const _require = require('../../parsers/parsers-commons'), - unwrapNullable = _require.unwrapNullable; -const _require2 = require('./Utils'), - createAliasResolver = _require2.createAliasResolver, - getModules = _require2.getModules; -const HostFunctionTemplate = ({ - hasteModuleName, - propertyName, - jniSignature, - jsReturnType, -}) => { - return `static facebook::jsi::Value __hostFunction_${hasteModuleName}SpecJSI_${propertyName}(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { - static jmethodID cachedMethodId = nullptr; - return static_cast(turboModule).invokeJavaMethod(rt, ${jsReturnType}, "${propertyName}", "${jniSignature}", args, count, cachedMethodId); -}`; -}; -const ModuleClassConstructorTemplate = ({hasteModuleName, methods}) => { - return ` -${hasteModuleName}SpecJSI::${hasteModuleName}SpecJSI(const JavaTurboModule::InitParams ¶ms) - : JavaTurboModule(params) { -${methods - .map(({propertyName, argCount}) => { - return ` methodMap_["${propertyName}"] = MethodMetadata {${argCount}, __hostFunction_${hasteModuleName}SpecJSI_${propertyName}};`; - }) - .join('\n')} -}`.trim(); -}; -const ModuleLookupTemplate = ({moduleName, hasteModuleName}) => { - return ` if (moduleName == "${moduleName}") { - return std::make_shared<${hasteModuleName}SpecJSI>(params); - }`; -}; -const FileTemplate = ({libraryName, include, modules, moduleLookups}) => { - return ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateModuleJniCpp.js - */ - -#include ${include} - -namespace facebook::react { - -${modules} - -std::shared_ptr ${libraryName}_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms) { -${moduleLookups.map(ModuleLookupTemplate).join('\n')} - return nullptr; -} - -} // namespace facebook::react -`; -}; -function translateReturnTypeToKind(nullableTypeAnnotation, resolveAlias) { - const _unwrapNullable = unwrapNullable(nullableTypeAnnotation), - _unwrapNullable2 = _slicedToArray(_unwrapNullable, 1), - typeAnnotation = _unwrapNullable2[0]; - let realTypeAnnotation = typeAnnotation; - if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { - realTypeAnnotation = resolveAlias(realTypeAnnotation.name); - } - switch (realTypeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (realTypeAnnotation.name) { - case 'RootTag': - return 'NumberKind'; - default: - realTypeAnnotation.name; - throw new Error( - `Invalid ReservedFunctionValueTypeName name, got ${realTypeAnnotation.name}`, - ); - } - case 'VoidTypeAnnotation': - return 'VoidKind'; - case 'StringTypeAnnotation': - return 'StringKind'; - case 'BooleanTypeAnnotation': - return 'BooleanKind'; - case 'EnumDeclaration': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return 'NumberKind'; - case 'StringTypeAnnotation': - return 'StringKind'; - default: - throw new Error( - `Unknown enum prop type for returning value, found: ${realTypeAnnotation.type}"`, - ); - } - case 'UnionTypeAnnotation': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return 'NumberKind'; - case 'ObjectTypeAnnotation': - return 'ObjectKind'; - case 'StringTypeAnnotation': - return 'StringKind'; - default: - throw new Error( - `Unsupported union member returning value, found: ${realTypeAnnotation.memberType}"`, - ); - } - case 'NumberTypeAnnotation': - return 'NumberKind'; - case 'DoubleTypeAnnotation': - return 'NumberKind'; - case 'FloatTypeAnnotation': - return 'NumberKind'; - case 'Int32TypeAnnotation': - return 'NumberKind'; - case 'PromiseTypeAnnotation': - return 'PromiseKind'; - case 'GenericObjectTypeAnnotation': - return 'ObjectKind'; - case 'ObjectTypeAnnotation': - return 'ObjectKind'; - case 'ArrayTypeAnnotation': - return 'ArrayKind'; - default: - realTypeAnnotation.type; - throw new Error( - `Unknown prop type for returning value, found: ${realTypeAnnotation.type}"`, - ); - } -} -function translateParamTypeToJniType(param, resolveAlias) { - const optional = param.optional, - nullableTypeAnnotation = param.typeAnnotation; - const _unwrapNullable3 = unwrapNullable(nullableTypeAnnotation), - _unwrapNullable4 = _slicedToArray(_unwrapNullable3, 2), - typeAnnotation = _unwrapNullable4[0], - nullable = _unwrapNullable4[1]; - const isRequired = !optional && !nullable; - let realTypeAnnotation = typeAnnotation; - if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { - realTypeAnnotation = resolveAlias(realTypeAnnotation.name); - } - switch (realTypeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (realTypeAnnotation.name) { - case 'RootTag': - return !isRequired ? 'Ljava/lang/Double;' : 'D'; - default: - realTypeAnnotation.name; - throw new Error( - `Invalid ReservedFunctionValueTypeName name, got ${realTypeAnnotation.name}`, - ); - } - case 'StringTypeAnnotation': - return 'Ljava/lang/String;'; - case 'BooleanTypeAnnotation': - return !isRequired ? 'Ljava/lang/Boolean;' : 'Z'; - case 'EnumDeclaration': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return !isRequired ? 'Ljava/lang/Double;' : 'D'; - case 'StringTypeAnnotation': - return 'Ljava/lang/String;'; - default: - throw new Error( - `Unknown enum prop type for method arg, found: ${realTypeAnnotation.type}"`, - ); - } - case 'UnionTypeAnnotation': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return !isRequired ? 'Ljava/lang/Double;' : 'D'; - case 'ObjectTypeAnnotation': - return 'Lcom/facebook/react/bridge/ReadableMap;'; - case 'StringTypeAnnotation': - return 'Ljava/lang/String;'; - default: - throw new Error( - `Unsupported union prop value, found: ${realTypeAnnotation.memberType}"`, - ); - } - case 'NumberTypeAnnotation': - return !isRequired ? 'Ljava/lang/Double;' : 'D'; - case 'DoubleTypeAnnotation': - return !isRequired ? 'Ljava/lang/Double;' : 'D'; - case 'FloatTypeAnnotation': - return !isRequired ? 'Ljava/lang/Double;' : 'D'; - case 'Int32TypeAnnotation': - return !isRequired ? 'Ljava/lang/Double;' : 'D'; - case 'GenericObjectTypeAnnotation': - return 'Lcom/facebook/react/bridge/ReadableMap;'; - case 'ObjectTypeAnnotation': - return 'Lcom/facebook/react/bridge/ReadableMap;'; - case 'ArrayTypeAnnotation': - return 'Lcom/facebook/react/bridge/ReadableArray;'; - case 'FunctionTypeAnnotation': - return 'Lcom/facebook/react/bridge/Callback;'; - default: - realTypeAnnotation.type; - throw new Error( - `Unknown prop type for method arg, found: ${realTypeAnnotation.type}"`, - ); - } -} -function translateReturnTypeToJniType(nullableTypeAnnotation, resolveAlias) { - const _unwrapNullable5 = unwrapNullable(nullableTypeAnnotation), - _unwrapNullable6 = _slicedToArray(_unwrapNullable5, 2), - typeAnnotation = _unwrapNullable6[0], - nullable = _unwrapNullable6[1]; - let realTypeAnnotation = typeAnnotation; - if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { - realTypeAnnotation = resolveAlias(realTypeAnnotation.name); - } - switch (realTypeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (realTypeAnnotation.name) { - case 'RootTag': - return nullable ? 'Ljava/lang/Double;' : 'D'; - default: - realTypeAnnotation.name; - throw new Error( - `Invalid ReservedFunctionValueTypeName name, got ${realTypeAnnotation.name}`, - ); - } - case 'VoidTypeAnnotation': - return 'V'; - case 'StringTypeAnnotation': - return 'Ljava/lang/String;'; - case 'BooleanTypeAnnotation': - return nullable ? 'Ljava/lang/Boolean;' : 'Z'; - case 'EnumDeclaration': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return nullable ? 'Ljava/lang/Double;' : 'D'; - case 'StringTypeAnnotation': - return 'Ljava/lang/String;'; - default: - throw new Error( - `Unknown enum prop type for method return type, found: ${realTypeAnnotation.type}"`, - ); - } - case 'UnionTypeAnnotation': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return nullable ? 'Ljava/lang/Double;' : 'D'; - case 'ObjectTypeAnnotation': - return 'Lcom/facebook/react/bridge/WritableMap;'; - case 'StringTypeAnnotation': - return 'Ljava/lang/String;'; - default: - throw new Error( - `Unsupported union member type, found: ${realTypeAnnotation.memberType}"`, - ); - } - case 'NumberTypeAnnotation': - return nullable ? 'Ljava/lang/Double;' : 'D'; - case 'DoubleTypeAnnotation': - return nullable ? 'Ljava/lang/Double;' : 'D'; - case 'FloatTypeAnnotation': - return nullable ? 'Ljava/lang/Double;' : 'D'; - case 'Int32TypeAnnotation': - return nullable ? 'Ljava/lang/Double;' : 'D'; - case 'PromiseTypeAnnotation': - return 'Lcom/facebook/react/bridge/Promise;'; - case 'GenericObjectTypeAnnotation': - return 'Lcom/facebook/react/bridge/WritableMap;'; - case 'ObjectTypeAnnotation': - return 'Lcom/facebook/react/bridge/WritableMap;'; - case 'ArrayTypeAnnotation': - return 'Lcom/facebook/react/bridge/WritableArray;'; - default: - realTypeAnnotation.type; - throw new Error( - `Unknown prop type for method return type, found: ${realTypeAnnotation.type}"`, - ); - } -} -function translateMethodTypeToJniSignature(property, resolveAlias) { - const name = property.name, - typeAnnotation = property.typeAnnotation; - let _unwrapNullable7 = unwrapNullable(typeAnnotation), - _unwrapNullable8 = _slicedToArray(_unwrapNullable7, 1), - _unwrapNullable8$ = _unwrapNullable8[0], - returnTypeAnnotation = _unwrapNullable8$.returnTypeAnnotation, - params = _unwrapNullable8$.params; - params = [...params]; - let processedReturnTypeAnnotation = returnTypeAnnotation; - const isPromiseReturn = returnTypeAnnotation.type === 'PromiseTypeAnnotation'; - if (isPromiseReturn) { - processedReturnTypeAnnotation = { - type: 'VoidTypeAnnotation', - }; - } - const argsSignatureParts = params.map(t => { - return translateParamTypeToJniType(t, resolveAlias); - }); - if (isPromiseReturn) { - // Additional promise arg for this case. - argsSignatureParts.push( - translateReturnTypeToJniType(returnTypeAnnotation, resolveAlias), - ); - } - const argsSignature = argsSignatureParts.join(''); - const returnSignature = - name === 'getConstants' - ? 'Ljava/util/Map;' - : translateReturnTypeToJniType( - processedReturnTypeAnnotation, - resolveAlias, - ); - return `(${argsSignature})${returnSignature}`; -} -function translateMethodForImplementation( - hasteModuleName, - property, - resolveAlias, -) { - const _unwrapNullable9 = unwrapNullable(property.typeAnnotation), - _unwrapNullable10 = _slicedToArray(_unwrapNullable9, 1), - propertyTypeAnnotation = _unwrapNullable10[0]; - const returnTypeAnnotation = propertyTypeAnnotation.returnTypeAnnotation; - if ( - property.name === 'getConstants' && - returnTypeAnnotation.type === 'ObjectTypeAnnotation' && - returnTypeAnnotation.properties.length === 0 - ) { - return ''; - } - return HostFunctionTemplate({ - hasteModuleName, - propertyName: property.name, - jniSignature: translateMethodTypeToJniSignature(property, resolveAlias), - jsReturnType: translateReturnTypeToKind(returnTypeAnnotation, resolveAlias), - }); -} -module.exports = { - generate( - libraryName, - schema, - packageName, - assumeNonnull = false, - headerPrefix, - ) { - const nativeModules = getModules(schema); - const modules = Object.keys(nativeModules) - .filter(hasteModuleName => { - const module = nativeModules[hasteModuleName]; - return !( - module.excludedPlatforms != null && - module.excludedPlatforms.includes('android') - ); - }) - .sort() - .map(hasteModuleName => { - const _nativeModules$hasteM = nativeModules[hasteModuleName], - aliasMap = _nativeModules$hasteM.aliasMap, - properties = _nativeModules$hasteM.spec.properties; - const resolveAlias = createAliasResolver(aliasMap); - const translatedMethods = properties - .map(property => - translateMethodForImplementation( - hasteModuleName, - property, - resolveAlias, - ), - ) - .join('\n\n'); - return ( - translatedMethods + - '\n\n' + - ModuleClassConstructorTemplate({ - hasteModuleName, - methods: properties - .map(({name: propertyName, typeAnnotation}) => { - const _unwrapNullable11 = unwrapNullable(typeAnnotation), - _unwrapNullable12 = _slicedToArray(_unwrapNullable11, 1), - _unwrapNullable12$ = _unwrapNullable12[0], - returnTypeAnnotation = - _unwrapNullable12$.returnTypeAnnotation, - params = _unwrapNullable12$.params; - if ( - propertyName === 'getConstants' && - returnTypeAnnotation.type === 'ObjectTypeAnnotation' && - returnTypeAnnotation.properties && - returnTypeAnnotation.properties.length === 0 - ) { - return null; - } - return { - propertyName, - argCount: params.length, - }; - }) - .filter(Boolean), - }) - ); - }) - .join('\n'); - const moduleLookups = Object.keys(nativeModules) - .filter(hasteModuleName => { - const module = nativeModules[hasteModuleName]; - return !( - module.excludedPlatforms != null && - module.excludedPlatforms.includes('android') - ); - }) - .sort((a, b) => { - const nameA = nativeModules[a].moduleName; - const nameB = nativeModules[b].moduleName; - if (nameA < nameB) { - return -1; - } else if (nameA > nameB) { - return 1; - } - return 0; - }) - .map(hasteModuleName => ({ - moduleName: nativeModules[hasteModuleName].moduleName, - hasteModuleName, - })); - const fileName = `${libraryName}-generated.cpp`; - const replacedTemplate = FileTemplate({ - modules: modules, - libraryName: libraryName.replace(/-/g, '_'), - moduleLookups, - include: `"${libraryName}.h"`, - }); - return new Map([[`jni/${fileName}`, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleJniCpp.js.flow b/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleJniCpp.js.flow deleted file mode 100644 index d4544873f..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleJniCpp.js.flow +++ /dev/null @@ -1,522 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type { - NamedShape, - NativeModuleFunctionTypeAnnotation, - NativeModuleParamTypeAnnotation, - NativeModulePropertyShape, - NativeModuleReturnTypeAnnotation, - Nullable, - SchemaType, -} from '../../CodegenSchema'; -import type {AliasResolver} from './Utils'; - -const {unwrapNullable} = require('../../parsers/parsers-commons'); -const {createAliasResolver, getModules} = require('./Utils'); - -type FilesOutput = Map; - -type JSReturnType = - | 'VoidKind' - | 'StringKind' - | 'BooleanKind' - | 'NumberKind' - | 'PromiseKind' - | 'ObjectKind' - | 'ArrayKind'; - -const HostFunctionTemplate = ({ - hasteModuleName, - propertyName, - jniSignature, - jsReturnType, -}: $ReadOnly<{ - hasteModuleName: string, - propertyName: string, - jniSignature: string, - jsReturnType: JSReturnType, -}>) => { - return `static facebook::jsi::Value __hostFunction_${hasteModuleName}SpecJSI_${propertyName}(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { - static jmethodID cachedMethodId = nullptr; - return static_cast(turboModule).invokeJavaMethod(rt, ${jsReturnType}, "${propertyName}", "${jniSignature}", args, count, cachedMethodId); -}`; -}; - -const ModuleClassConstructorTemplate = ({ - hasteModuleName, - methods, -}: $ReadOnly<{ - hasteModuleName: string, - methods: $ReadOnlyArray<{ - propertyName: string, - argCount: number, - }>, -}>) => { - return ` -${hasteModuleName}SpecJSI::${hasteModuleName}SpecJSI(const JavaTurboModule::InitParams ¶ms) - : JavaTurboModule(params) { -${methods - .map(({propertyName, argCount}) => { - return ` methodMap_["${propertyName}"] = MethodMetadata {${argCount}, __hostFunction_${hasteModuleName}SpecJSI_${propertyName}};`; - }) - .join('\n')} -}`.trim(); -}; - -const ModuleLookupTemplate = ({ - moduleName, - hasteModuleName, -}: $ReadOnly<{moduleName: string, hasteModuleName: string}>) => { - return ` if (moduleName == "${moduleName}") { - return std::make_shared<${hasteModuleName}SpecJSI>(params); - }`; -}; - -const FileTemplate = ({ - libraryName, - include, - modules, - moduleLookups, -}: $ReadOnly<{ - libraryName: string, - include: string, - modules: string, - moduleLookups: $ReadOnlyArray<{ - hasteModuleName: string, - moduleName: string, - }>, -}>) => { - return ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateModuleJniCpp.js - */ - -#include ${include} - -namespace facebook::react { - -${modules} - -std::shared_ptr ${libraryName}_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms) { -${moduleLookups.map(ModuleLookupTemplate).join('\n')} - return nullptr; -} - -} // namespace facebook::react -`; -}; - -function translateReturnTypeToKind( - nullableTypeAnnotation: Nullable, - resolveAlias: AliasResolver, -): JSReturnType { - const [typeAnnotation] = unwrapNullable( - nullableTypeAnnotation, - ); - let realTypeAnnotation = typeAnnotation; - if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { - realTypeAnnotation = resolveAlias(realTypeAnnotation.name); - } - - switch (realTypeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (realTypeAnnotation.name) { - case 'RootTag': - return 'NumberKind'; - default: - (realTypeAnnotation.name: empty); - throw new Error( - `Invalid ReservedFunctionValueTypeName name, got ${realTypeAnnotation.name}`, - ); - } - case 'VoidTypeAnnotation': - return 'VoidKind'; - case 'StringTypeAnnotation': - return 'StringKind'; - case 'BooleanTypeAnnotation': - return 'BooleanKind'; - case 'EnumDeclaration': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return 'NumberKind'; - case 'StringTypeAnnotation': - return 'StringKind'; - default: - throw new Error( - `Unknown enum prop type for returning value, found: ${realTypeAnnotation.type}"`, - ); - } - case 'UnionTypeAnnotation': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return 'NumberKind'; - case 'ObjectTypeAnnotation': - return 'ObjectKind'; - case 'StringTypeAnnotation': - return 'StringKind'; - default: - throw new Error( - `Unsupported union member returning value, found: ${realTypeAnnotation.memberType}"`, - ); - } - case 'NumberTypeAnnotation': - return 'NumberKind'; - case 'DoubleTypeAnnotation': - return 'NumberKind'; - case 'FloatTypeAnnotation': - return 'NumberKind'; - case 'Int32TypeAnnotation': - return 'NumberKind'; - case 'PromiseTypeAnnotation': - return 'PromiseKind'; - case 'GenericObjectTypeAnnotation': - return 'ObjectKind'; - case 'ObjectTypeAnnotation': - return 'ObjectKind'; - case 'ArrayTypeAnnotation': - return 'ArrayKind'; - default: - (realTypeAnnotation.type: 'MixedTypeAnnotation'); - throw new Error( - `Unknown prop type for returning value, found: ${realTypeAnnotation.type}"`, - ); - } -} - -type Param = NamedShape>; - -function translateParamTypeToJniType( - param: Param, - resolveAlias: AliasResolver, -): string { - const {optional, typeAnnotation: nullableTypeAnnotation} = param; - const [typeAnnotation, nullable] = - unwrapNullable(nullableTypeAnnotation); - const isRequired = !optional && !nullable; - - let realTypeAnnotation = typeAnnotation; - if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { - realTypeAnnotation = resolveAlias(realTypeAnnotation.name); - } - - switch (realTypeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (realTypeAnnotation.name) { - case 'RootTag': - return !isRequired ? 'Ljava/lang/Double;' : 'D'; - default: - (realTypeAnnotation.name: empty); - throw new Error( - `Invalid ReservedFunctionValueTypeName name, got ${realTypeAnnotation.name}`, - ); - } - case 'StringTypeAnnotation': - return 'Ljava/lang/String;'; - case 'BooleanTypeAnnotation': - return !isRequired ? 'Ljava/lang/Boolean;' : 'Z'; - case 'EnumDeclaration': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return !isRequired ? 'Ljava/lang/Double;' : 'D'; - case 'StringTypeAnnotation': - return 'Ljava/lang/String;'; - default: - throw new Error( - `Unknown enum prop type for method arg, found: ${realTypeAnnotation.type}"`, - ); - } - case 'UnionTypeAnnotation': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return !isRequired ? 'Ljava/lang/Double;' : 'D'; - case 'ObjectTypeAnnotation': - return 'Lcom/facebook/react/bridge/ReadableMap;'; - case 'StringTypeAnnotation': - return 'Ljava/lang/String;'; - default: - throw new Error( - `Unsupported union prop value, found: ${realTypeAnnotation.memberType}"`, - ); - } - case 'NumberTypeAnnotation': - return !isRequired ? 'Ljava/lang/Double;' : 'D'; - case 'DoubleTypeAnnotation': - return !isRequired ? 'Ljava/lang/Double;' : 'D'; - case 'FloatTypeAnnotation': - return !isRequired ? 'Ljava/lang/Double;' : 'D'; - case 'Int32TypeAnnotation': - return !isRequired ? 'Ljava/lang/Double;' : 'D'; - case 'GenericObjectTypeAnnotation': - return 'Lcom/facebook/react/bridge/ReadableMap;'; - case 'ObjectTypeAnnotation': - return 'Lcom/facebook/react/bridge/ReadableMap;'; - case 'ArrayTypeAnnotation': - return 'Lcom/facebook/react/bridge/ReadableArray;'; - case 'FunctionTypeAnnotation': - return 'Lcom/facebook/react/bridge/Callback;'; - default: - (realTypeAnnotation.type: 'MixedTypeAnnotation'); - throw new Error( - `Unknown prop type for method arg, found: ${realTypeAnnotation.type}"`, - ); - } -} - -function translateReturnTypeToJniType( - nullableTypeAnnotation: Nullable, - resolveAlias: AliasResolver, -): string { - const [typeAnnotation, nullable] = unwrapNullable(nullableTypeAnnotation); - - let realTypeAnnotation = typeAnnotation; - if (realTypeAnnotation.type === 'TypeAliasTypeAnnotation') { - realTypeAnnotation = resolveAlias(realTypeAnnotation.name); - } - - switch (realTypeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (realTypeAnnotation.name) { - case 'RootTag': - return nullable ? 'Ljava/lang/Double;' : 'D'; - default: - (realTypeAnnotation.name: empty); - throw new Error( - `Invalid ReservedFunctionValueTypeName name, got ${realTypeAnnotation.name}`, - ); - } - case 'VoidTypeAnnotation': - return 'V'; - case 'StringTypeAnnotation': - return 'Ljava/lang/String;'; - case 'BooleanTypeAnnotation': - return nullable ? 'Ljava/lang/Boolean;' : 'Z'; - case 'EnumDeclaration': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return nullable ? 'Ljava/lang/Double;' : 'D'; - case 'StringTypeAnnotation': - return 'Ljava/lang/String;'; - default: - throw new Error( - `Unknown enum prop type for method return type, found: ${realTypeAnnotation.type}"`, - ); - } - case 'UnionTypeAnnotation': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return nullable ? 'Ljava/lang/Double;' : 'D'; - case 'ObjectTypeAnnotation': - return 'Lcom/facebook/react/bridge/WritableMap;'; - case 'StringTypeAnnotation': - return 'Ljava/lang/String;'; - default: - throw new Error( - `Unsupported union member type, found: ${realTypeAnnotation.memberType}"`, - ); - } - case 'NumberTypeAnnotation': - return nullable ? 'Ljava/lang/Double;' : 'D'; - case 'DoubleTypeAnnotation': - return nullable ? 'Ljava/lang/Double;' : 'D'; - case 'FloatTypeAnnotation': - return nullable ? 'Ljava/lang/Double;' : 'D'; - case 'Int32TypeAnnotation': - return nullable ? 'Ljava/lang/Double;' : 'D'; - case 'PromiseTypeAnnotation': - return 'Lcom/facebook/react/bridge/Promise;'; - case 'GenericObjectTypeAnnotation': - return 'Lcom/facebook/react/bridge/WritableMap;'; - case 'ObjectTypeAnnotation': - return 'Lcom/facebook/react/bridge/WritableMap;'; - case 'ArrayTypeAnnotation': - return 'Lcom/facebook/react/bridge/WritableArray;'; - default: - (realTypeAnnotation.type: 'MixedTypeAnnotation'); - throw new Error( - `Unknown prop type for method return type, found: ${realTypeAnnotation.type}"`, - ); - } -} - -function translateMethodTypeToJniSignature( - property: NativeModulePropertyShape, - resolveAlias: AliasResolver, -): string { - const {name, typeAnnotation} = property; - let [{returnTypeAnnotation, params}] = - unwrapNullable(typeAnnotation); - - params = [...params]; - let processedReturnTypeAnnotation = returnTypeAnnotation; - const isPromiseReturn = returnTypeAnnotation.type === 'PromiseTypeAnnotation'; - if (isPromiseReturn) { - processedReturnTypeAnnotation = { - type: 'VoidTypeAnnotation', - }; - } - - const argsSignatureParts = params.map(t => { - return translateParamTypeToJniType(t, resolveAlias); - }); - if (isPromiseReturn) { - // Additional promise arg for this case. - argsSignatureParts.push( - translateReturnTypeToJniType(returnTypeAnnotation, resolveAlias), - ); - } - const argsSignature = argsSignatureParts.join(''); - const returnSignature = - name === 'getConstants' - ? 'Ljava/util/Map;' - : translateReturnTypeToJniType( - processedReturnTypeAnnotation, - resolveAlias, - ); - - return `(${argsSignature})${returnSignature}`; -} - -function translateMethodForImplementation( - hasteModuleName: string, - property: NativeModulePropertyShape, - resolveAlias: AliasResolver, -): string { - const [propertyTypeAnnotation] = - unwrapNullable(property.typeAnnotation); - const {returnTypeAnnotation} = propertyTypeAnnotation; - - if ( - property.name === 'getConstants' && - returnTypeAnnotation.type === 'ObjectTypeAnnotation' && - returnTypeAnnotation.properties.length === 0 - ) { - return ''; - } - - return HostFunctionTemplate({ - hasteModuleName, - propertyName: property.name, - jniSignature: translateMethodTypeToJniSignature(property, resolveAlias), - jsReturnType: translateReturnTypeToKind(returnTypeAnnotation, resolveAlias), - }); -} - -module.exports = { - generate( - libraryName: string, - schema: SchemaType, - packageName?: string, - assumeNonnull: boolean = false, - headerPrefix?: string, - ): FilesOutput { - const nativeModules = getModules(schema); - - const modules = Object.keys(nativeModules) - .filter(hasteModuleName => { - const module = nativeModules[hasteModuleName]; - return !( - module.excludedPlatforms != null && - module.excludedPlatforms.includes('android') - ); - }) - .sort() - .map(hasteModuleName => { - const { - aliasMap, - spec: {properties}, - } = nativeModules[hasteModuleName]; - const resolveAlias = createAliasResolver(aliasMap); - - const translatedMethods = properties - .map(property => - translateMethodForImplementation( - hasteModuleName, - property, - resolveAlias, - ), - ) - .join('\n\n'); - - return ( - translatedMethods + - '\n\n' + - ModuleClassConstructorTemplate({ - hasteModuleName, - methods: properties - .map(({name: propertyName, typeAnnotation}) => { - const [{returnTypeAnnotation, params}] = - unwrapNullable( - typeAnnotation, - ); - - if ( - propertyName === 'getConstants' && - returnTypeAnnotation.type === 'ObjectTypeAnnotation' && - returnTypeAnnotation.properties && - returnTypeAnnotation.properties.length === 0 - ) { - return null; - } - - return { - propertyName, - argCount: params.length, - }; - }) - .filter(Boolean), - }) - ); - }) - .join('\n'); - - const moduleLookups: $ReadOnlyArray<{ - hasteModuleName: string, - moduleName: string, - }> = Object.keys(nativeModules) - .filter(hasteModuleName => { - const module = nativeModules[hasteModuleName]; - return !( - module.excludedPlatforms != null && - module.excludedPlatforms.includes('android') - ); - }) - .sort((a, b) => { - const nameA = nativeModules[a].moduleName; - const nameB = nativeModules[b].moduleName; - if (nameA < nameB) { - return -1; - } else if (nameA > nameB) { - return 1; - } - return 0; - }) - .map((hasteModuleName: string) => ({ - moduleName: nativeModules[hasteModuleName].moduleName, - hasteModuleName, - })); - - const fileName = `${libraryName}-generated.cpp`; - const replacedTemplate = FileTemplate({ - modules: modules, - libraryName: libraryName.replace(/-/g, '_'), - moduleLookups, - include: `"${libraryName}.h"`, - }); - return new Map([[`jni/${fileName}`, replacedTemplate]]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleJniH.js b/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleJniH.js deleted file mode 100644 index cb175cf28..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleJniH.js +++ /dev/null @@ -1,145 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('./Utils'), - getModules = _require.getModules; -const ModuleClassDeclarationTemplate = ({hasteModuleName}) => { - return `/** - * JNI C++ class for module '${hasteModuleName}' - */ -class JSI_EXPORT ${hasteModuleName}SpecJSI : public JavaTurboModule { -public: - ${hasteModuleName}SpecJSI(const JavaTurboModule::InitParams ¶ms); -}; -`; -}; -const HeaderFileTemplate = ({modules, libraryName}) => { - return ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateModuleJniH.js - */ - -#pragma once - -#include -#include -#include - -namespace facebook::react { - -${modules} - -JSI_EXPORT -std::shared_ptr ${libraryName}_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms); - -} // namespace facebook::react -`; -}; - -// Note: this CMakeLists.txt template includes dependencies for both NativeModule and components. -const CMakeListsTemplate = ({libraryName}) => { - return `# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. - -cmake_minimum_required(VERSION 3.13) -set(CMAKE_VERBOSE_MAKEFILE on) - -file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/${libraryName}/*.cpp) - -add_library( - react_codegen_${libraryName} - SHARED - \${react_codegen_SRCS} -) - -target_include_directories(react_codegen_${libraryName} PUBLIC . react/renderer/components/${libraryName}) - -target_link_libraries( - react_codegen_${libraryName} - fbjni - folly_runtime - glog - jsi - ${libraryName !== 'rncore' ? 'react_codegen_rncore' : ''} - react_debug - react_nativemodule_core - react_render_componentregistry - react_render_core - react_render_debug - react_render_graphics - react_render_imagemanager - react_render_mapbuffer - react_utils - rrc_image - rrc_view - turbomodulejsijni - yoga -) - -target_compile_options( - react_codegen_${libraryName} - PRIVATE - -DLOG_TAG=\\"ReactNative\\" - -fexceptions - -frtti - -std=c++20 - -Wall -) -`; -}; -module.exports = { - generate( - libraryName, - schema, - packageName, - assumeNonnull = false, - headerPrefix, - ) { - const nativeModules = getModules(schema); - const modules = Object.keys(nativeModules) - .filter(hasteModuleName => { - const module = nativeModules[hasteModuleName]; - return !( - module.excludedPlatforms != null && - module.excludedPlatforms.includes('android') - ); - }) - .sort() - .map(hasteModuleName => - ModuleClassDeclarationTemplate({ - hasteModuleName, - }), - ) - .join('\n'); - const fileName = `${libraryName}.h`; - const replacedTemplate = HeaderFileTemplate({ - modules: modules, - libraryName: libraryName.replace(/-/g, '_'), - }); - return new Map([ - [`jni/${fileName}`, replacedTemplate], - [ - 'jni/CMakeLists.txt', - CMakeListsTemplate({ - libraryName: libraryName, - }), - ], - ]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleJniH.js.flow b/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleJniH.js.flow deleted file mode 100644 index 0bb2b35d1..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleJniH.js.flow +++ /dev/null @@ -1,150 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type {SchemaType} from '../../CodegenSchema'; - -const {getModules} = require('./Utils'); - -type FilesOutput = Map; - -const ModuleClassDeclarationTemplate = ({ - hasteModuleName, -}: $ReadOnly<{hasteModuleName: string}>) => { - return `/** - * JNI C++ class for module '${hasteModuleName}' - */ -class JSI_EXPORT ${hasteModuleName}SpecJSI : public JavaTurboModule { -public: - ${hasteModuleName}SpecJSI(const JavaTurboModule::InitParams ¶ms); -}; -`; -}; - -const HeaderFileTemplate = ({ - modules, - libraryName, -}: $ReadOnly<{modules: string, libraryName: string}>) => { - return ` -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateModuleJniH.js - */ - -#pragma once - -#include -#include -#include - -namespace facebook::react { - -${modules} - -JSI_EXPORT -std::shared_ptr ${libraryName}_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms); - -} // namespace facebook::react -`; -}; - -// Note: this CMakeLists.txt template includes dependencies for both NativeModule and components. -const CMakeListsTemplate = ({ - libraryName, -}: $ReadOnly<{libraryName: string}>) => { - return `# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. - -cmake_minimum_required(VERSION 3.13) -set(CMAKE_VERBOSE_MAKEFILE on) - -file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/${libraryName}/*.cpp) - -add_library( - react_codegen_${libraryName} - SHARED - \${react_codegen_SRCS} -) - -target_include_directories(react_codegen_${libraryName} PUBLIC . react/renderer/components/${libraryName}) - -target_link_libraries( - react_codegen_${libraryName} - fbjni - folly_runtime - glog - jsi - ${libraryName !== 'rncore' ? 'react_codegen_rncore' : ''} - react_debug - react_nativemodule_core - react_render_componentregistry - react_render_core - react_render_debug - react_render_graphics - react_render_imagemanager - react_render_mapbuffer - react_utils - rrc_image - rrc_view - turbomodulejsijni - yoga -) - -target_compile_options( - react_codegen_${libraryName} - PRIVATE - -DLOG_TAG=\\"ReactNative\\" - -fexceptions - -frtti - -std=c++20 - -Wall -) -`; -}; - -module.exports = { - generate( - libraryName: string, - schema: SchemaType, - packageName?: string, - assumeNonnull: boolean = false, - headerPrefix?: string, - ): FilesOutput { - const nativeModules = getModules(schema); - const modules = Object.keys(nativeModules) - .filter(hasteModuleName => { - const module = nativeModules[hasteModuleName]; - return !( - module.excludedPlatforms != null && - module.excludedPlatforms.includes('android') - ); - }) - .sort() - .map(hasteModuleName => ModuleClassDeclarationTemplate({hasteModuleName})) - .join('\n'); - - const fileName = `${libraryName}.h`; - const replacedTemplate = HeaderFileTemplate({ - modules: modules, - libraryName: libraryName.replace(/-/g, '_'), - }); - return new Map([ - [`jni/${fileName}`, replacedTemplate], - ['jni/CMakeLists.txt', CMakeListsTemplate({libraryName: libraryName})], - ]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/StructCollector.js b/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/StructCollector.js deleted file mode 100644 index 9a44a9f17..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/StructCollector.js +++ /dev/null @@ -1,262 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && - (symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), - keys.push.apply(keys, symbols); - } - return keys; -} -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 - ? ownKeys(Object(source), !0).forEach(function (key) { - _defineProperty(target, key, source[key]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties( - target, - Object.getOwnPropertyDescriptors(source), - ) - : ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty( - target, - key, - Object.getOwnPropertyDescriptor(source, key), - ); - }); - } - return target; -} -function _slicedToArray(arr, i) { - return ( - _arrayWithHoles(arr) || - _iterableToArrayLimit(arr, i) || - _unsupportedIterableToArray(arr, i) || - _nonIterableRest() - ); -} -function _nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.', - ); -} -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === 'string') return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === 'Object' && o.constructor) n = o.constructor.name; - if (n === 'Map' || n === 'Set') return Array.from(o); - if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) - return _arrayLikeToArray(o, minLen); -} -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; -} -function _iterableToArrayLimit(arr, i) { - var _i = - null == arr - ? null - : ('undefined' != typeof Symbol && arr[Symbol.iterator]) || - arr['@@iterator']; - if (null != _i) { - var _s, - _e, - _x, - _r, - _arr = [], - _n = !0, - _d = !1; - try { - if (((_x = (_i = _i.call(arr)).next), 0 === i)) { - if (Object(_i) !== _i) return; - _n = !1; - } else - for ( - ; - !(_n = (_s = _x.call(_i)).done) && - (_arr.push(_s.value), _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - if (!_n && null != _i.return && ((_r = _i.return()), Object(_r) !== _r)) - return; - } finally { - if (_d) throw _e; - } - } - return _arr; - } -} -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} -function _defineProperty(obj, key, value) { - key = _toPropertyKey(key); - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true, - }); - } else { - obj[key] = value; - } - return obj; -} -function _toPropertyKey(arg) { - var key = _toPrimitive(arg, 'string'); - return typeof key === 'symbol' ? key : String(key); -} -function _toPrimitive(input, hint) { - if (typeof input !== 'object' || input === null) return input; - var prim = input[Symbol.toPrimitive]; - if (prim !== undefined) { - var res = prim.call(input, hint || 'default'); - if (typeof res !== 'object') return res; - throw new TypeError('@@toPrimitive must return a primitive value.'); - } - return (hint === 'string' ? String : Number)(input); -} -const _require = require('../../../parsers/parsers-commons'), - unwrapNullable = _require.unwrapNullable, - wrapNullable = _require.wrapNullable; -const _require2 = require('../../Utils'), - capitalize = _require2.capitalize; -class StructCollector { - constructor() { - _defineProperty(this, '_structs', new Map()); - } - process(structName, structContext, resolveAlias, nullableTypeAnnotation) { - const _unwrapNullable = unwrapNullable(nullableTypeAnnotation), - _unwrapNullable2 = _slicedToArray(_unwrapNullable, 2), - typeAnnotation = _unwrapNullable2[0], - nullable = _unwrapNullable2[1]; - switch (typeAnnotation.type) { - case 'ObjectTypeAnnotation': { - this._insertStruct( - structName, - structContext, - resolveAlias, - typeAnnotation, - ); - return wrapNullable(nullable, { - type: 'TypeAliasTypeAnnotation', - name: structName, - }); - } - case 'ArrayTypeAnnotation': { - if (typeAnnotation.elementType == null) { - return wrapNullable(nullable, { - type: 'ArrayTypeAnnotation', - }); - } - return wrapNullable(nullable, { - type: 'ArrayTypeAnnotation', - elementType: this.process( - structName + 'Element', - structContext, - resolveAlias, - typeAnnotation.elementType, - ), - }); - } - case 'TypeAliasTypeAnnotation': { - this._insertAlias(typeAnnotation.name, structContext, resolveAlias); - return wrapNullable(nullable, typeAnnotation); - } - case 'EnumDeclaration': - return wrapNullable(nullable, typeAnnotation); - case 'MixedTypeAnnotation': - throw new Error('Mixed types are unsupported in structs'); - case 'UnionTypeAnnotation': - throw new Error('Union types are unsupported in structs'); - default: { - return wrapNullable(nullable, typeAnnotation); - } - } - } - _insertAlias(aliasName, structContext, resolveAlias) { - const usedStruct = this._structs.get(aliasName); - if (usedStruct == null) { - this._insertStruct( - aliasName, - structContext, - resolveAlias, - resolveAlias(aliasName), - ); - } else if (usedStruct.context !== structContext) { - throw new Error( - `Tried to use alias '${aliasName}' in a getConstants() return type and inside a regular struct.`, - ); - } - } - _insertStruct(structName, structContext, resolveAlias, objectTypeAnnotation) { - // $FlowFixMe[missing-type-arg] - const properties = objectTypeAnnotation.properties.map(property => { - const propertyStructName = structName + capitalize(property.name); - return _objectSpread( - _objectSpread({}, property), - {}, - { - typeAnnotation: this.process( - propertyStructName, - structContext, - resolveAlias, - property.typeAnnotation, - ), - }, - ); - }); - switch (structContext) { - case 'REGULAR': - this._structs.set(structName, { - name: structName, - context: 'REGULAR', - properties: properties, - }); - break; - case 'CONSTANTS': - this._structs.set(structName, { - name: structName, - context: 'CONSTANTS', - properties: properties, - }); - break; - default: - structContext; - throw new Error(`Detected an invalid struct context: ${structContext}`); - } - } - getAllStructs() { - return [...this._structs.values()]; - } - getStruct(name) { - return this._structs.get(name); - } -} -module.exports = { - StructCollector, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/StructCollector.js.flow b/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/StructCollector.js.flow deleted file mode 100644 index d85d09394..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/StructCollector.js.flow +++ /dev/null @@ -1,207 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type { - NativeModuleArrayTypeAnnotation, - NativeModuleBaseTypeAnnotation, - NativeModuleBooleanTypeAnnotation, - NativeModuleDoubleTypeAnnotation, - NativeModuleEnumDeclaration, - NativeModuleFloatTypeAnnotation, - NativeModuleGenericObjectTypeAnnotation, - NativeModuleInt32TypeAnnotation, - NativeModuleNumberTypeAnnotation, - NativeModuleObjectTypeAnnotation, - NativeModuleStringTypeAnnotation, - NativeModuleTypeAliasTypeAnnotation, - Nullable, - ReservedTypeAnnotation, -} from '../../../CodegenSchema'; -import type {AliasResolver} from '../Utils'; - -const { - unwrapNullable, - wrapNullable, -} = require('../../../parsers/parsers-commons'); -const {capitalize} = require('../../Utils'); - -type StructContext = 'CONSTANTS' | 'REGULAR'; - -export type RegularStruct = $ReadOnly<{ - context: 'REGULAR', - name: string, - properties: $ReadOnlyArray, -}>; - -export type ConstantsStruct = $ReadOnly<{ - context: 'CONSTANTS', - name: string, - properties: $ReadOnlyArray, -}>; - -export type Struct = RegularStruct | ConstantsStruct; - -export type StructProperty = $ReadOnly<{ - name: string, - optional: boolean, - typeAnnotation: Nullable, -}>; - -export type StructTypeAnnotation = - | NativeModuleStringTypeAnnotation - | NativeModuleNumberTypeAnnotation - | NativeModuleInt32TypeAnnotation - | NativeModuleDoubleTypeAnnotation - | NativeModuleFloatTypeAnnotation - | NativeModuleBooleanTypeAnnotation - | NativeModuleEnumDeclaration - | NativeModuleGenericObjectTypeAnnotation - | ReservedTypeAnnotation - | NativeModuleTypeAliasTypeAnnotation - | NativeModuleArrayTypeAnnotation>; - -class StructCollector { - _structs: Map = new Map(); - - process( - structName: string, - structContext: StructContext, - resolveAlias: AliasResolver, - nullableTypeAnnotation: Nullable, - ): Nullable { - const [typeAnnotation, nullable] = unwrapNullable(nullableTypeAnnotation); - switch (typeAnnotation.type) { - case 'ObjectTypeAnnotation': { - this._insertStruct( - structName, - structContext, - resolveAlias, - typeAnnotation, - ); - return wrapNullable(nullable, { - type: 'TypeAliasTypeAnnotation', - name: structName, - }); - } - case 'ArrayTypeAnnotation': { - if (typeAnnotation.elementType == null) { - return wrapNullable(nullable, { - type: 'ArrayTypeAnnotation', - }); - } - - return wrapNullable(nullable, { - type: 'ArrayTypeAnnotation', - elementType: this.process( - structName + 'Element', - structContext, - resolveAlias, - typeAnnotation.elementType, - ), - }); - } - case 'TypeAliasTypeAnnotation': { - this._insertAlias(typeAnnotation.name, structContext, resolveAlias); - return wrapNullable(nullable, typeAnnotation); - } - case 'EnumDeclaration': - return wrapNullable(nullable, typeAnnotation); - case 'MixedTypeAnnotation': - throw new Error('Mixed types are unsupported in structs'); - case 'UnionTypeAnnotation': - throw new Error('Union types are unsupported in structs'); - default: { - return wrapNullable(nullable, typeAnnotation); - } - } - } - - _insertAlias( - aliasName: string, - structContext: StructContext, - resolveAlias: AliasResolver, - ): void { - const usedStruct = this._structs.get(aliasName); - if (usedStruct == null) { - this._insertStruct( - aliasName, - structContext, - resolveAlias, - resolveAlias(aliasName), - ); - } else if (usedStruct.context !== structContext) { - throw new Error( - `Tried to use alias '${aliasName}' in a getConstants() return type and inside a regular struct.`, - ); - } - } - - _insertStruct( - structName: string, - structContext: StructContext, - resolveAlias: AliasResolver, - objectTypeAnnotation: NativeModuleObjectTypeAnnotation, - ): void { - // $FlowFixMe[missing-type-arg] - const properties = objectTypeAnnotation.properties.map< - $ReadOnly<{ - name: string, - optional: boolean, - typeAnnotation: Nullable, - }>, - >(property => { - const propertyStructName = structName + capitalize(property.name); - - return { - ...property, - typeAnnotation: this.process( - propertyStructName, - structContext, - resolveAlias, - property.typeAnnotation, - ), - }; - }); - - switch (structContext) { - case 'REGULAR': - this._structs.set(structName, { - name: structName, - context: 'REGULAR', - properties: properties, - }); - break; - case 'CONSTANTS': - this._structs.set(structName, { - name: structName, - context: 'CONSTANTS', - properties: properties, - }); - break; - default: - (structContext: empty); - throw new Error(`Detected an invalid struct context: ${structContext}`); - } - } - - getAllStructs(): $ReadOnlyArray { - return [...this._structs.values()]; - } - - getStruct(name: string): ?Struct { - return this._structs.get(name); - } -} - -module.exports = { - StructCollector, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/Utils.js b/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/Utils.js deleted file mode 100644 index b4be0c66d..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/Utils.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -function getSafePropertyName(property) { - if (property.name === 'id') { - return `${property.name}_`; - } - return property.name; -} -function getNamespacedStructName(hasteModuleName, structName) { - return `JS::${hasteModuleName}::${structName}`; -} -module.exports = { - getSafePropertyName, - getNamespacedStructName, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/Utils.js.flow b/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/Utils.js.flow deleted file mode 100644 index 59121a4b5..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/Utils.js.flow +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type {StructProperty} from './StructCollector'; - -function getSafePropertyName(property: StructProperty): string { - if (property.name === 'id') { - return `${property.name}_`; - } - return property.name; -} - -function getNamespacedStructName( - hasteModuleName: string, - structName: string, -): string { - return `JS::${hasteModuleName}::${structName}`; -} - -module.exports = { - getSafePropertyName, - getNamespacedStructName, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeConstantsStruct.js b/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeConstantsStruct.js deleted file mode 100644 index 414bc8df7..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeConstantsStruct.js +++ /dev/null @@ -1,339 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -function _slicedToArray(arr, i) { - return ( - _arrayWithHoles(arr) || - _iterableToArrayLimit(arr, i) || - _unsupportedIterableToArray(arr, i) || - _nonIterableRest() - ); -} -function _nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.', - ); -} -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === 'string') return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === 'Object' && o.constructor) n = o.constructor.name; - if (n === 'Map' || n === 'Set') return Array.from(o); - if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) - return _arrayLikeToArray(o, minLen); -} -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; -} -function _iterableToArrayLimit(arr, i) { - var _i = - null == arr - ? null - : ('undefined' != typeof Symbol && arr[Symbol.iterator]) || - arr['@@iterator']; - if (null != _i) { - var _s, - _e, - _x, - _r, - _arr = [], - _n = !0, - _d = !1; - try { - if (((_x = (_i = _i.call(arr)).next), 0 === i)) { - if (Object(_i) !== _i) return; - _n = !1; - } else - for ( - ; - !(_n = (_s = _x.call(_i)).done) && - (_arr.push(_s.value), _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - if (!_n && null != _i.return && ((_r = _i.return()), Object(_r) !== _r)) - return; - } finally { - if (_d) throw _e; - } - } - return _arr; - } -} -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} -const _require = require('../../../../parsers/parsers-commons'), - unwrapNullable = _require.unwrapNullable; -const _require2 = require('../../../TypeUtils/Cxx'), - wrapCxxOptional = _require2.wrapOptional; -const _require3 = require('../../../TypeUtils/Objective-C'), - wrapObjCOptional = _require3.wrapOptional; -const _require4 = require('../../../Utils'), - capitalize = _require4.capitalize; -const _require5 = require('../Utils'), - getNamespacedStructName = _require5.getNamespacedStructName, - getSafePropertyName = _require5.getSafePropertyName; -const StructTemplate = ({ - hasteModuleName, - structName, - builderInputProps, -}) => `namespace JS { - namespace ${hasteModuleName} { - struct ${structName} { - - struct Builder { - struct Input { - ${builderInputProps} - }; - - /** Initialize with a set of values */ - Builder(const Input i); - /** Initialize with an existing ${structName} */ - Builder(${structName} i); - /** Builds the object. Generally used only by the infrastructure. */ - NSDictionary *buildUnsafeRawValue() const { return _factory(); }; - private: - NSDictionary *(^_factory)(void); - }; - - static ${structName} fromUnsafeRawValue(NSDictionary *const v) { return {v}; } - NSDictionary *unsafeRawValue() const { return _v; } - private: - ${structName}(NSDictionary *const v) : _v(v) {} - NSDictionary *_v; - }; - } -}`; -const MethodTemplate = ({ - hasteModuleName, - structName, - properties, -}) => `inline JS::${hasteModuleName}::${structName}::Builder::Builder(const Input i) : _factory(^{ - NSMutableDictionary *d = [NSMutableDictionary new]; -${properties} - return d; -}) {} -inline JS::${hasteModuleName}::${structName}::Builder::Builder(${structName} i) : _factory(^{ - return i.unsafeRawValue(); -}) {}`; -function toObjCType( - hasteModuleName, - nullableTypeAnnotation, - isOptional = false, -) { - const _unwrapNullable = unwrapNullable(nullableTypeAnnotation), - _unwrapNullable2 = _slicedToArray(_unwrapNullable, 2), - typeAnnotation = _unwrapNullable2[0], - nullable = _unwrapNullable2[1]; - const isRequired = !nullable && !isOptional; - switch (typeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (typeAnnotation.name) { - case 'RootTag': - return wrapCxxOptional('double', isRequired); - default: - typeAnnotation.name; - throw new Error(`Unknown prop type, found: ${typeAnnotation.name}"`); - } - case 'StringTypeAnnotation': - return 'NSString *'; - case 'NumberTypeAnnotation': - return wrapCxxOptional('double', isRequired); - case 'FloatTypeAnnotation': - return wrapCxxOptional('double', isRequired); - case 'Int32TypeAnnotation': - return wrapCxxOptional('double', isRequired); - case 'DoubleTypeAnnotation': - return wrapCxxOptional('double', isRequired); - case 'BooleanTypeAnnotation': - return wrapCxxOptional('bool', isRequired); - case 'EnumDeclaration': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return wrapCxxOptional('double', isRequired); - case 'StringTypeAnnotation': - return 'NSString *'; - default: - throw new Error( - `Couldn't convert enum into ObjC type: ${typeAnnotation.type}"`, - ); - } - case 'GenericObjectTypeAnnotation': - return wrapObjCOptional('id', isRequired); - case 'ArrayTypeAnnotation': - if (typeAnnotation.elementType == null) { - return wrapObjCOptional('id', isRequired); - } - return wrapCxxOptional( - `std::vector<${toObjCType( - hasteModuleName, - typeAnnotation.elementType, - )}>`, - isRequired, - ); - case 'TypeAliasTypeAnnotation': - const structName = capitalize(typeAnnotation.name); - const namespacedStructName = getNamespacedStructName( - hasteModuleName, - structName, - ); - return wrapCxxOptional(`${namespacedStructName}::Builder`, isRequired); - default: - typeAnnotation.type; - throw new Error( - `Couldn't convert into ObjC type: ${typeAnnotation.type}"`, - ); - } -} -function toObjCValue( - hasteModuleName, - nullableTypeAnnotation, - value, - depth, - isOptional = false, -) { - const _unwrapNullable3 = unwrapNullable(nullableTypeAnnotation), - _unwrapNullable4 = _slicedToArray(_unwrapNullable3, 2), - typeAnnotation = _unwrapNullable4[0], - nullable = _unwrapNullable4[1]; - const isRequired = !nullable && !isOptional; - function wrapPrimitive(type) { - return !isRequired - ? `${value}.has_value() ? @((${type})${value}.value()) : nil` - : `@(${value})`; - } - switch (typeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (typeAnnotation.name) { - case 'RootTag': - return wrapPrimitive('double'); - default: - typeAnnotation.name; - throw new Error( - `Couldn't convert into ObjC type: ${typeAnnotation.type}"`, - ); - } - case 'StringTypeAnnotation': - return value; - case 'NumberTypeAnnotation': - return wrapPrimitive('double'); - case 'FloatTypeAnnotation': - return wrapPrimitive('double'); - case 'Int32TypeAnnotation': - return wrapPrimitive('double'); - case 'DoubleTypeAnnotation': - return wrapPrimitive('double'); - case 'BooleanTypeAnnotation': - return wrapPrimitive('BOOL'); - case 'EnumDeclaration': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return wrapPrimitive('double'); - case 'StringTypeAnnotation': - return value; - default: - throw new Error( - `Couldn't convert enum into ObjC value: ${typeAnnotation.type}"`, - ); - } - case 'GenericObjectTypeAnnotation': - return value; - case 'ArrayTypeAnnotation': - const elementType = typeAnnotation.elementType; - if (elementType == null) { - return value; - } - const localVarName = `el${'_'.repeat(depth + 1)}`; - const elementObjCType = toObjCType(hasteModuleName, elementType); - const elementObjCValue = toObjCValue( - hasteModuleName, - elementType, - localVarName, - depth + 1, - ); - const RCTConvertVecToArray = transformer => { - return `RCTConvert${ - !isRequired ? 'Optional' : '' - }VecToArray(${value}, ${transformer})`; - }; - return RCTConvertVecToArray( - `^id(${elementObjCType} ${localVarName}) { return ${elementObjCValue}; }`, - ); - case 'TypeAliasTypeAnnotation': - return !isRequired - ? `${value}.has_value() ? ${value}.value().buildUnsafeRawValue() : nil` - : `${value}.buildUnsafeRawValue()`; - default: - typeAnnotation.type; - throw new Error( - `Couldn't convert into ObjC value: ${typeAnnotation.type}"`, - ); - } -} -function serializeConstantsStruct(hasteModuleName, struct) { - const declaration = StructTemplate({ - hasteModuleName, - structName: struct.name, - builderInputProps: struct.properties - .map(property => { - const typeAnnotation = property.typeAnnotation, - optional = property.optional; - const safePropName = getSafePropertyName(property); - const objCType = toObjCType(hasteModuleName, typeAnnotation, optional); - if (!optional) { - return `RCTRequired<${objCType}> ${safePropName};`; - } - const space = ' '.repeat(objCType.endsWith('*') ? 0 : 1); - return `${objCType}${space}${safePropName};`; - }) - .join('\n '), - }); - const methods = MethodTemplate({ - hasteModuleName, - structName: struct.name, - properties: struct.properties - .map(property => { - const typeAnnotation = property.typeAnnotation, - optional = property.optional, - propName = property.name; - const safePropName = getSafePropertyName(property); - const objCValue = toObjCValue( - hasteModuleName, - typeAnnotation, - safePropName, - 0, - optional, - ); - let varDecl = `auto ${safePropName} = i.${safePropName}`; - if (!optional) { - varDecl += '.get()'; - } - const assignment = `d[@"${propName}"] = ` + objCValue; - return ` ${varDecl};\n ${assignment};`; - }) - .join('\n'), - }); - return { - declaration, - methods, - }; -} -module.exports = { - serializeConstantsStruct, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeConstantsStruct.js.flow b/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeConstantsStruct.js.flow deleted file mode 100644 index ad7918d68..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeConstantsStruct.js.flow +++ /dev/null @@ -1,289 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type {Nullable} from '../../../../CodegenSchema'; -import type {ConstantsStruct, StructTypeAnnotation} from '../StructCollector'; -import type {StructSerilizationOutput} from './serializeStruct'; - -const {unwrapNullable} = require('../../../../parsers/parsers-commons'); -const {wrapOptional: wrapCxxOptional} = require('../../../TypeUtils/Cxx'); -const { - wrapOptional: wrapObjCOptional, -} = require('../../../TypeUtils/Objective-C'); -const {capitalize} = require('../../../Utils'); -const {getNamespacedStructName, getSafePropertyName} = require('../Utils'); - -const StructTemplate = ({ - hasteModuleName, - structName, - builderInputProps, -}: $ReadOnly<{ - hasteModuleName: string, - structName: string, - builderInputProps: string, -}>) => `namespace JS { - namespace ${hasteModuleName} { - struct ${structName} { - - struct Builder { - struct Input { - ${builderInputProps} - }; - - /** Initialize with a set of values */ - Builder(const Input i); - /** Initialize with an existing ${structName} */ - Builder(${structName} i); - /** Builds the object. Generally used only by the infrastructure. */ - NSDictionary *buildUnsafeRawValue() const { return _factory(); }; - private: - NSDictionary *(^_factory)(void); - }; - - static ${structName} fromUnsafeRawValue(NSDictionary *const v) { return {v}; } - NSDictionary *unsafeRawValue() const { return _v; } - private: - ${structName}(NSDictionary *const v) : _v(v) {} - NSDictionary *_v; - }; - } -}`; - -const MethodTemplate = ({ - hasteModuleName, - structName, - properties, -}: $ReadOnly<{ - hasteModuleName: string, - structName: string, - properties: string, -}>) => `inline JS::${hasteModuleName}::${structName}::Builder::Builder(const Input i) : _factory(^{ - NSMutableDictionary *d = [NSMutableDictionary new]; -${properties} - return d; -}) {} -inline JS::${hasteModuleName}::${structName}::Builder::Builder(${structName} i) : _factory(^{ - return i.unsafeRawValue(); -}) {}`; - -function toObjCType( - hasteModuleName: string, - nullableTypeAnnotation: Nullable, - isOptional: boolean = false, -): string { - const [typeAnnotation, nullable] = unwrapNullable(nullableTypeAnnotation); - const isRequired = !nullable && !isOptional; - - switch (typeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (typeAnnotation.name) { - case 'RootTag': - return wrapCxxOptional('double', isRequired); - default: - (typeAnnotation.name: empty); - throw new Error(`Unknown prop type, found: ${typeAnnotation.name}"`); - } - case 'StringTypeAnnotation': - return 'NSString *'; - case 'NumberTypeAnnotation': - return wrapCxxOptional('double', isRequired); - case 'FloatTypeAnnotation': - return wrapCxxOptional('double', isRequired); - case 'Int32TypeAnnotation': - return wrapCxxOptional('double', isRequired); - case 'DoubleTypeAnnotation': - return wrapCxxOptional('double', isRequired); - case 'BooleanTypeAnnotation': - return wrapCxxOptional('bool', isRequired); - case 'EnumDeclaration': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return wrapCxxOptional('double', isRequired); - case 'StringTypeAnnotation': - return 'NSString *'; - default: - throw new Error( - `Couldn't convert enum into ObjC type: ${typeAnnotation.type}"`, - ); - } - case 'GenericObjectTypeAnnotation': - return wrapObjCOptional('id', isRequired); - case 'ArrayTypeAnnotation': - if (typeAnnotation.elementType == null) { - return wrapObjCOptional('id', isRequired); - } - - return wrapCxxOptional( - `std::vector<${toObjCType( - hasteModuleName, - typeAnnotation.elementType, - )}>`, - isRequired, - ); - case 'TypeAliasTypeAnnotation': - const structName = capitalize(typeAnnotation.name); - const namespacedStructName = getNamespacedStructName( - hasteModuleName, - structName, - ); - return wrapCxxOptional(`${namespacedStructName}::Builder`, isRequired); - default: - (typeAnnotation.type: empty); - throw new Error( - `Couldn't convert into ObjC type: ${typeAnnotation.type}"`, - ); - } -} - -function toObjCValue( - hasteModuleName: string, - nullableTypeAnnotation: Nullable, - value: string, - depth: number, - isOptional: boolean = false, -): string { - const [typeAnnotation, nullable] = unwrapNullable(nullableTypeAnnotation); - const isRequired = !nullable && !isOptional; - - function wrapPrimitive(type: string) { - return !isRequired - ? `${value}.has_value() ? @((${type})${value}.value()) : nil` - : `@(${value})`; - } - - switch (typeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (typeAnnotation.name) { - case 'RootTag': - return wrapPrimitive('double'); - default: - (typeAnnotation.name: empty); - throw new Error( - `Couldn't convert into ObjC type: ${typeAnnotation.type}"`, - ); - } - case 'StringTypeAnnotation': - return value; - case 'NumberTypeAnnotation': - return wrapPrimitive('double'); - case 'FloatTypeAnnotation': - return wrapPrimitive('double'); - case 'Int32TypeAnnotation': - return wrapPrimitive('double'); - case 'DoubleTypeAnnotation': - return wrapPrimitive('double'); - case 'BooleanTypeAnnotation': - return wrapPrimitive('BOOL'); - case 'EnumDeclaration': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return wrapPrimitive('double'); - case 'StringTypeAnnotation': - return value; - default: - throw new Error( - `Couldn't convert enum into ObjC value: ${typeAnnotation.type}"`, - ); - } - case 'GenericObjectTypeAnnotation': - return value; - case 'ArrayTypeAnnotation': - const {elementType} = typeAnnotation; - if (elementType == null) { - return value; - } - - const localVarName = `el${'_'.repeat(depth + 1)}`; - const elementObjCType = toObjCType(hasteModuleName, elementType); - const elementObjCValue = toObjCValue( - hasteModuleName, - elementType, - localVarName, - depth + 1, - ); - - const RCTConvertVecToArray = (transformer: string) => { - return `RCTConvert${ - !isRequired ? 'Optional' : '' - }VecToArray(${value}, ${transformer})`; - }; - - return RCTConvertVecToArray( - `^id(${elementObjCType} ${localVarName}) { return ${elementObjCValue}; }`, - ); - case 'TypeAliasTypeAnnotation': - return !isRequired - ? `${value}.has_value() ? ${value}.value().buildUnsafeRawValue() : nil` - : `${value}.buildUnsafeRawValue()`; - default: - (typeAnnotation.type: empty); - throw new Error( - `Couldn't convert into ObjC value: ${typeAnnotation.type}"`, - ); - } -} - -function serializeConstantsStruct( - hasteModuleName: string, - struct: ConstantsStruct, -): StructSerilizationOutput { - const declaration = StructTemplate({ - hasteModuleName, - structName: struct.name, - builderInputProps: struct.properties - .map(property => { - const {typeAnnotation, optional} = property; - const safePropName = getSafePropertyName(property); - const objCType = toObjCType(hasteModuleName, typeAnnotation, optional); - - if (!optional) { - return `RCTRequired<${objCType}> ${safePropName};`; - } - - const space = ' '.repeat(objCType.endsWith('*') ? 0 : 1); - return `${objCType}${space}${safePropName};`; - }) - .join('\n '), - }); - - const methods = MethodTemplate({ - hasteModuleName, - structName: struct.name, - properties: struct.properties - .map(property => { - const {typeAnnotation, optional, name: propName} = property; - const safePropName = getSafePropertyName(property); - const objCValue = toObjCValue( - hasteModuleName, - typeAnnotation, - safePropName, - 0, - optional, - ); - - let varDecl = `auto ${safePropName} = i.${safePropName}`; - if (!optional) { - varDecl += '.get()'; - } - - const assignment = `d[@"${propName}"] = ` + objCValue; - return ` ${varDecl};\n ${assignment};`; - }) - .join('\n'), - }); - - return {declaration, methods}; -} - -module.exports = { - serializeConstantsStruct, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeRegularStruct.js b/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeRegularStruct.js deleted file mode 100644 index 048fdeaaf..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeRegularStruct.js +++ /dev/null @@ -1,332 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -function _slicedToArray(arr, i) { - return ( - _arrayWithHoles(arr) || - _iterableToArrayLimit(arr, i) || - _unsupportedIterableToArray(arr, i) || - _nonIterableRest() - ); -} -function _nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.', - ); -} -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === 'string') return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === 'Object' && o.constructor) n = o.constructor.name; - if (n === 'Map' || n === 'Set') return Array.from(o); - if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) - return _arrayLikeToArray(o, minLen); -} -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; -} -function _iterableToArrayLimit(arr, i) { - var _i = - null == arr - ? null - : ('undefined' != typeof Symbol && arr[Symbol.iterator]) || - arr['@@iterator']; - if (null != _i) { - var _s, - _e, - _x, - _r, - _arr = [], - _n = !0, - _d = !1; - try { - if (((_x = (_i = _i.call(arr)).next), 0 === i)) { - if (Object(_i) !== _i) return; - _n = !1; - } else - for ( - ; - !(_n = (_s = _x.call(_i)).done) && - (_arr.push(_s.value), _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - if (!_n && null != _i.return && ((_r = _i.return()), Object(_r) !== _r)) - return; - } finally { - if (_d) throw _e; - } - } - return _arr; - } -} -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} -const _require = require('../../../../parsers/parsers-commons'), - unwrapNullable = _require.unwrapNullable; -const _require2 = require('../../../TypeUtils/Cxx'), - wrapCxxOptional = _require2.wrapOptional; -const _require3 = require('../../../TypeUtils/Objective-C'), - wrapObjCOptional = _require3.wrapOptional; -const _require4 = require('../../../Utils'), - capitalize = _require4.capitalize; -const _require5 = require('../Utils'), - getNamespacedStructName = _require5.getNamespacedStructName, - getSafePropertyName = _require5.getSafePropertyName; -const StructTemplate = ({ - hasteModuleName, - structName, - structProperties, -}) => `namespace JS { - namespace ${hasteModuleName} { - struct ${structName} { - ${structProperties} - - ${structName}(NSDictionary *const v) : _v(v) {} - private: - NSDictionary *_v; - }; - } -} - -@interface RCTCxxConvert (${hasteModuleName}_${structName}) -+ (RCTManagedPointer *)JS_${hasteModuleName}_${structName}:(id)json; -@end`; -const MethodTemplate = ({ - returnType, - returnValue, - hasteModuleName, - structName, - propertyName, - safePropertyName, -}) => `inline ${returnType}JS::${hasteModuleName}::${structName}::${safePropertyName}() const -{ - id const p = _v[@"${propertyName}"]; - return ${returnValue}; -}`; -function toObjCType( - hasteModuleName, - nullableTypeAnnotation, - isOptional = false, -) { - const _unwrapNullable = unwrapNullable(nullableTypeAnnotation), - _unwrapNullable2 = _slicedToArray(_unwrapNullable, 2), - typeAnnotation = _unwrapNullable2[0], - nullable = _unwrapNullable2[1]; - const isRequired = !nullable && !isOptional; - switch (typeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (typeAnnotation.name) { - case 'RootTag': - return wrapCxxOptional('double', isRequired); - default: - typeAnnotation.name; - throw new Error(`Unknown prop type, found: ${typeAnnotation.name}"`); - } - case 'StringTypeAnnotation': - return 'NSString *'; - case 'NumberTypeAnnotation': - return wrapCxxOptional('double', isRequired); - case 'FloatTypeAnnotation': - return wrapCxxOptional('double', isRequired); - case 'Int32TypeAnnotation': - return wrapCxxOptional('double', isRequired); - case 'DoubleTypeAnnotation': - return wrapCxxOptional('double', isRequired); - case 'BooleanTypeAnnotation': - return wrapCxxOptional('bool', isRequired); - case 'EnumDeclaration': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return wrapCxxOptional('double', isRequired); - case 'StringTypeAnnotation': - return 'NSString *'; - default: - throw new Error( - `Couldn't convert enum into ObjC type: ${typeAnnotation.type}"`, - ); - } - case 'GenericObjectTypeAnnotation': - return wrapObjCOptional('id', isRequired); - case 'ArrayTypeAnnotation': - if (typeAnnotation.elementType == null) { - return wrapObjCOptional('id', isRequired); - } - return wrapCxxOptional( - `facebook::react::LazyVector<${toObjCType( - hasteModuleName, - typeAnnotation.elementType, - )}>`, - isRequired, - ); - case 'TypeAliasTypeAnnotation': - const structName = capitalize(typeAnnotation.name); - const namespacedStructName = getNamespacedStructName( - hasteModuleName, - structName, - ); - return wrapCxxOptional(namespacedStructName, isRequired); - default: - typeAnnotation.type; - throw new Error( - `Couldn't convert into ObjC type: ${typeAnnotation.type}"`, - ); - } -} -function toObjCValue( - hasteModuleName, - nullableTypeAnnotation, - value, - depth, - isOptional = false, -) { - const _unwrapNullable3 = unwrapNullable(nullableTypeAnnotation), - _unwrapNullable4 = _slicedToArray(_unwrapNullable3, 2), - typeAnnotation = _unwrapNullable4[0], - nullable = _unwrapNullable4[1]; - const isRequired = !nullable && !isOptional; - const RCTBridgingTo = (type, arg) => { - const args = [value, arg].filter(Boolean).join(', '); - return isRequired - ? `RCTBridgingTo${type}(${args})` - : `RCTBridgingToOptional${type}(${args})`; - }; - switch (typeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (typeAnnotation.name) { - case 'RootTag': - return RCTBridgingTo('Double'); - default: - typeAnnotation.name; - throw new Error( - `Couldn't convert into ObjC type: ${typeAnnotation.type}"`, - ); - } - case 'StringTypeAnnotation': - return RCTBridgingTo('String'); - case 'NumberTypeAnnotation': - return RCTBridgingTo('Double'); - case 'FloatTypeAnnotation': - return RCTBridgingTo('Double'); - case 'Int32TypeAnnotation': - return RCTBridgingTo('Double'); - case 'DoubleTypeAnnotation': - return RCTBridgingTo('Double'); - case 'BooleanTypeAnnotation': - return RCTBridgingTo('Bool'); - case 'EnumDeclaration': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return RCTBridgingTo('Double'); - case 'StringTypeAnnotation': - return RCTBridgingTo('String'); - default: - throw new Error( - `Couldn't convert enum into ObjC value: ${typeAnnotation.type}"`, - ); - } - case 'GenericObjectTypeAnnotation': - return value; - case 'ArrayTypeAnnotation': - const elementType = typeAnnotation.elementType; - if (elementType == null) { - return value; - } - const localVarName = `itemValue_${depth}`; - const elementObjCType = toObjCType(hasteModuleName, elementType); - const elementObjCValue = toObjCValue( - hasteModuleName, - elementType, - localVarName, - depth + 1, - ); - return RCTBridgingTo( - 'Vec', - `^${elementObjCType}(id ${localVarName}) { return ${elementObjCValue}; }`, - ); - case 'TypeAliasTypeAnnotation': - const structName = capitalize(typeAnnotation.name); - const namespacedStructName = getNamespacedStructName( - hasteModuleName, - structName, - ); - return !isRequired - ? `(${value} == nil ? std::nullopt : std::make_optional(${namespacedStructName}(${value})))` - : `${namespacedStructName}(${value})`; - default: - typeAnnotation.type; - throw new Error( - `Couldn't convert into ObjC value: ${typeAnnotation.type}"`, - ); - } -} -function serializeRegularStruct(hasteModuleName, struct) { - const declaration = StructTemplate({ - hasteModuleName: hasteModuleName, - structName: struct.name, - structProperties: struct.properties - .map(property => { - const typeAnnotation = property.typeAnnotation, - optional = property.optional; - const safePropName = getSafePropertyName(property); - const returnType = toObjCType( - hasteModuleName, - typeAnnotation, - optional, - ); - const padding = ' '.repeat(returnType.endsWith('*') ? 0 : 1); - return `${returnType}${padding}${safePropName}() const;`; - }) - .join('\n '), - }); - - // $FlowFixMe[missing-type-arg] - const methods = struct.properties - .map(property => { - const typeAnnotation = property.typeAnnotation, - optional = property.optional, - propName = property.name; - const safePropertyName = getSafePropertyName(property); - const returnType = toObjCType(hasteModuleName, typeAnnotation, optional); - const returnValue = toObjCValue( - hasteModuleName, - typeAnnotation, - 'p', - 0, - optional, - ); - const padding = ' '.repeat(returnType.endsWith('*') ? 0 : 1); - return MethodTemplate({ - hasteModuleName, - structName: struct.name, - returnType: returnType + padding, - returnValue: returnValue, - propertyName: propName, - safePropertyName, - }); - }) - .join('\n'); - return { - methods, - declaration, - }; -} -module.exports = { - serializeRegularStruct, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeRegularStruct.js.flow b/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeRegularStruct.js.flow deleted file mode 100644 index 9ea93a1da..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeRegularStruct.js.flow +++ /dev/null @@ -1,280 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type {Nullable} from '../../../../CodegenSchema'; -import type {RegularStruct, StructTypeAnnotation} from '../StructCollector'; -import type {StructSerilizationOutput} from './serializeStruct'; - -const {unwrapNullable} = require('../../../../parsers/parsers-commons'); -const {wrapOptional: wrapCxxOptional} = require('../../../TypeUtils/Cxx'); -const { - wrapOptional: wrapObjCOptional, -} = require('../../../TypeUtils/Objective-C'); -const {capitalize} = require('../../../Utils'); -const {getNamespacedStructName, getSafePropertyName} = require('../Utils'); - -const StructTemplate = ({ - hasteModuleName, - structName, - structProperties, -}: $ReadOnly<{ - hasteModuleName: string, - structName: string, - structProperties: string, -}>) => `namespace JS { - namespace ${hasteModuleName} { - struct ${structName} { - ${structProperties} - - ${structName}(NSDictionary *const v) : _v(v) {} - private: - NSDictionary *_v; - }; - } -} - -@interface RCTCxxConvert (${hasteModuleName}_${structName}) -+ (RCTManagedPointer *)JS_${hasteModuleName}_${structName}:(id)json; -@end`; - -const MethodTemplate = ({ - returnType, - returnValue, - hasteModuleName, - structName, - propertyName, - safePropertyName, -}: $ReadOnly<{ - returnType: string, - returnValue: string, - hasteModuleName: string, - structName: string, - propertyName: string, - safePropertyName: string, -}>) => `inline ${returnType}JS::${hasteModuleName}::${structName}::${safePropertyName}() const -{ - id const p = _v[@"${propertyName}"]; - return ${returnValue}; -}`; - -function toObjCType( - hasteModuleName: string, - nullableTypeAnnotation: Nullable, - isOptional: boolean = false, -): string { - const [typeAnnotation, nullable] = unwrapNullable(nullableTypeAnnotation); - const isRequired = !nullable && !isOptional; - - switch (typeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (typeAnnotation.name) { - case 'RootTag': - return wrapCxxOptional('double', isRequired); - default: - (typeAnnotation.name: empty); - throw new Error(`Unknown prop type, found: ${typeAnnotation.name}"`); - } - case 'StringTypeAnnotation': - return 'NSString *'; - case 'NumberTypeAnnotation': - return wrapCxxOptional('double', isRequired); - case 'FloatTypeAnnotation': - return wrapCxxOptional('double', isRequired); - case 'Int32TypeAnnotation': - return wrapCxxOptional('double', isRequired); - case 'DoubleTypeAnnotation': - return wrapCxxOptional('double', isRequired); - case 'BooleanTypeAnnotation': - return wrapCxxOptional('bool', isRequired); - case 'EnumDeclaration': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return wrapCxxOptional('double', isRequired); - case 'StringTypeAnnotation': - return 'NSString *'; - default: - throw new Error( - `Couldn't convert enum into ObjC type: ${typeAnnotation.type}"`, - ); - } - case 'GenericObjectTypeAnnotation': - return wrapObjCOptional('id', isRequired); - case 'ArrayTypeAnnotation': - if (typeAnnotation.elementType == null) { - return wrapObjCOptional('id', isRequired); - } - return wrapCxxOptional( - `facebook::react::LazyVector<${toObjCType( - hasteModuleName, - typeAnnotation.elementType, - )}>`, - isRequired, - ); - case 'TypeAliasTypeAnnotation': - const structName = capitalize(typeAnnotation.name); - const namespacedStructName = getNamespacedStructName( - hasteModuleName, - structName, - ); - return wrapCxxOptional(namespacedStructName, isRequired); - default: - (typeAnnotation.type: empty); - throw new Error( - `Couldn't convert into ObjC type: ${typeAnnotation.type}"`, - ); - } -} - -function toObjCValue( - hasteModuleName: string, - nullableTypeAnnotation: Nullable, - value: string, - depth: number, - isOptional: boolean = false, -): string { - const [typeAnnotation, nullable] = unwrapNullable(nullableTypeAnnotation); - const isRequired = !nullable && !isOptional; - const RCTBridgingTo = (type: string, arg?: string) => { - const args = [value, arg].filter(Boolean).join(', '); - return isRequired - ? `RCTBridgingTo${type}(${args})` - : `RCTBridgingToOptional${type}(${args})`; - }; - - switch (typeAnnotation.type) { - case 'ReservedTypeAnnotation': - switch (typeAnnotation.name) { - case 'RootTag': - return RCTBridgingTo('Double'); - default: - (typeAnnotation.name: empty); - throw new Error( - `Couldn't convert into ObjC type: ${typeAnnotation.type}"`, - ); - } - case 'StringTypeAnnotation': - return RCTBridgingTo('String'); - case 'NumberTypeAnnotation': - return RCTBridgingTo('Double'); - case 'FloatTypeAnnotation': - return RCTBridgingTo('Double'); - case 'Int32TypeAnnotation': - return RCTBridgingTo('Double'); - case 'DoubleTypeAnnotation': - return RCTBridgingTo('Double'); - case 'BooleanTypeAnnotation': - return RCTBridgingTo('Bool'); - case 'EnumDeclaration': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return RCTBridgingTo('Double'); - case 'StringTypeAnnotation': - return RCTBridgingTo('String'); - default: - throw new Error( - `Couldn't convert enum into ObjC value: ${typeAnnotation.type}"`, - ); - } - case 'GenericObjectTypeAnnotation': - return value; - case 'ArrayTypeAnnotation': - const {elementType} = typeAnnotation; - if (elementType == null) { - return value; - } - - const localVarName = `itemValue_${depth}`; - const elementObjCType = toObjCType(hasteModuleName, elementType); - const elementObjCValue = toObjCValue( - hasteModuleName, - elementType, - localVarName, - depth + 1, - ); - - return RCTBridgingTo( - 'Vec', - `^${elementObjCType}(id ${localVarName}) { return ${elementObjCValue}; }`, - ); - case 'TypeAliasTypeAnnotation': - const structName = capitalize(typeAnnotation.name); - const namespacedStructName = getNamespacedStructName( - hasteModuleName, - structName, - ); - - return !isRequired - ? `(${value} == nil ? std::nullopt : std::make_optional(${namespacedStructName}(${value})))` - : `${namespacedStructName}(${value})`; - default: - (typeAnnotation.type: empty); - throw new Error( - `Couldn't convert into ObjC value: ${typeAnnotation.type}"`, - ); - } -} - -function serializeRegularStruct( - hasteModuleName: string, - struct: RegularStruct, -): StructSerilizationOutput { - const declaration = StructTemplate({ - hasteModuleName: hasteModuleName, - structName: struct.name, - structProperties: struct.properties - .map(property => { - const {typeAnnotation, optional} = property; - const safePropName = getSafePropertyName(property); - const returnType = toObjCType( - hasteModuleName, - typeAnnotation, - optional, - ); - - const padding = ' '.repeat(returnType.endsWith('*') ? 0 : 1); - return `${returnType}${padding}${safePropName}() const;`; - }) - .join('\n '), - }); - - // $FlowFixMe[missing-type-arg] - const methods = struct.properties - .map(property => { - const {typeAnnotation, optional, name: propName} = property; - const safePropertyName = getSafePropertyName(property); - const returnType = toObjCType(hasteModuleName, typeAnnotation, optional); - const returnValue = toObjCValue( - hasteModuleName, - typeAnnotation, - 'p', - 0, - optional, - ); - - const padding = ' '.repeat(returnType.endsWith('*') ? 0 : 1); - return MethodTemplate({ - hasteModuleName, - structName: struct.name, - returnType: returnType + padding, - returnValue: returnValue, - propertyName: propName, - safePropertyName, - }); - }) - .join('\n'); - - return {methods, declaration}; -} - -module.exports = { - serializeRegularStruct, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeStruct.js b/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeStruct.js deleted file mode 100644 index d1d668af5..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeStruct.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('./serializeConstantsStruct'), - serializeConstantsStruct = _require.serializeConstantsStruct; -const _require2 = require('./serializeRegularStruct'), - serializeRegularStruct = _require2.serializeRegularStruct; -function serializeStruct(hasteModuleName, struct) { - if (struct.context === 'REGULAR') { - return serializeRegularStruct(hasteModuleName, struct); - } - return serializeConstantsStruct(hasteModuleName, struct); -} -module.exports = { - serializeStruct, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeStruct.js.flow b/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeStruct.js.flow deleted file mode 100644 index d5b38f453..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/header/serializeStruct.js.flow +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type {Struct} from '../StructCollector'; - -const {serializeConstantsStruct} = require('./serializeConstantsStruct'); -const {serializeRegularStruct} = require('./serializeRegularStruct'); - -export type StructSerilizationOutput = $ReadOnly<{ - methods: string, - declaration: string, -}>; - -function serializeStruct( - hasteModuleName: string, - struct: Struct, -): StructSerilizationOutput { - if (struct.context === 'REGULAR') { - return serializeRegularStruct(hasteModuleName, struct); - } - return serializeConstantsStruct(hasteModuleName, struct); -} - -module.exports = { - serializeStruct, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/index.js b/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/index.js deleted file mode 100644 index 7340f07ba..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/index.js +++ /dev/null @@ -1,183 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('../Utils'), - createAliasResolver = _require.createAliasResolver, - getModules = _require.getModules; -const _require2 = require('./header/serializeStruct'), - serializeStruct = _require2.serializeStruct; -const _require3 = require('./serializeMethod'), - serializeMethod = _require3.serializeMethod; -const _require4 = require('./source/serializeModule'), - serializeModuleSource = _require4.serializeModuleSource; -const _require5 = require('./StructCollector'), - StructCollector = _require5.StructCollector; -const ModuleDeclarationTemplate = ({ - hasteModuleName, - structDeclarations, - protocolMethods, -}) => `${structDeclarations} -@protocol ${hasteModuleName}Spec - -${protocolMethods} - -@end -namespace facebook::react { - /** - * ObjC++ class for module '${hasteModuleName}' - */ - class JSI_EXPORT ${hasteModuleName}SpecJSI : public ObjCTurboModule { - public: - ${hasteModuleName}SpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; -} // namespace facebook::react`; -const HeaderFileTemplate = ({ - moduleDeclarations, - structInlineMethods, - assumeNonnull, -}) => - `/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateModuleObjCpp - * - * We create an umbrella header (and corresponding implementation) here since - * Cxx compilation in BUCK has a limitation: source-code producing genrule()s - * must have a single output. More files => more genrule()s => slower builds. - */ - -#ifndef __cplusplus -#error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm. -#endif -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import - -` + - (assumeNonnull ? '\nNS_ASSUME_NONNULL_BEGIN\n' : '') + - moduleDeclarations + - '\n' + - structInlineMethods + - (assumeNonnull ? '\nNS_ASSUME_NONNULL_END\n' : '\n'); -const SourceFileTemplate = ({headerFileName, moduleImplementations}) => `/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateModuleObjCpp - * - * We create an umbrella header (and corresponding implementation) here since - * Cxx compilation in BUCK has a limitation: source-code producing genrule()s - * must have a single output. More files => more genrule()s => slower builds. - */ - -#import "${headerFileName}" - -${moduleImplementations} -`; -module.exports = { - generate(libraryName, schema, packageName, assumeNonnull, headerPrefix) { - const nativeModules = getModules(schema); - const moduleDeclarations = []; - const structInlineMethods = []; - const moduleImplementations = []; - const hasteModuleNames = Object.keys(nativeModules).sort(); - for (const hasteModuleName of hasteModuleNames) { - const _nativeModules$hasteM = nativeModules[hasteModuleName], - aliasMap = _nativeModules$hasteM.aliasMap, - excludedPlatforms = _nativeModules$hasteM.excludedPlatforms, - properties = _nativeModules$hasteM.spec.properties; - if (excludedPlatforms != null && excludedPlatforms.includes('iOS')) { - continue; - } - const resolveAlias = createAliasResolver(aliasMap); - const structCollector = new StructCollector(); - const methodSerializations = []; - const serializeProperty = property => { - methodSerializations.push( - ...serializeMethod( - hasteModuleName, - property, - structCollector, - resolveAlias, - ), - ); - }; - - /** - * Note: As we serialize NativeModule methods, we insert structs into - * StructCollector, as we encounter them. - */ - properties - .filter(property => property.name !== 'getConstants') - .forEach(serializeProperty); - properties - .filter(property => property.name === 'getConstants') - .forEach(serializeProperty); - const generatedStructs = structCollector.getAllStructs(); - const structStrs = []; - const methodStrs = []; - for (const struct of generatedStructs) { - const _serializeStruct = serializeStruct(hasteModuleName, struct), - methods = _serializeStruct.methods, - declaration = _serializeStruct.declaration; - structStrs.push(declaration); - methodStrs.push(methods); - } - moduleDeclarations.push( - ModuleDeclarationTemplate({ - hasteModuleName: hasteModuleName, - structDeclarations: structStrs.join('\n'), - protocolMethods: methodSerializations - .map(({protocolMethod}) => protocolMethod) - .join('\n'), - }), - ); - structInlineMethods.push(methodStrs.join('\n')); - moduleImplementations.push( - serializeModuleSource( - hasteModuleName, - generatedStructs, - methodSerializations.filter( - ({selector}) => selector !== '@selector(constantsToExport)', - ), - ), - ); - } - const headerFileName = `${libraryName}.h`; - const headerFile = HeaderFileTemplate({ - moduleDeclarations: moduleDeclarations.join('\n'), - structInlineMethods: structInlineMethods.join('\n'), - assumeNonnull, - }); - const sourceFileName = `${libraryName}-generated.mm`; - const sourceFile = SourceFileTemplate({ - headerFileName, - moduleImplementations: moduleImplementations.join('\n'), - }); - return new Map([ - [headerFileName, headerFile], - [sourceFileName, sourceFile], - ]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/index.js.flow b/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/index.js.flow deleted file mode 100644 index ce4c1048c..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/index.js.flow +++ /dev/null @@ -1,216 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; -import type {NativeModulePropertyShape} from '../../../CodegenSchema'; -import type {SchemaType} from '../../../CodegenSchema'; -import type {MethodSerializationOutput} from './serializeMethod'; - -const {createAliasResolver, getModules} = require('../Utils'); -const {serializeStruct} = require('./header/serializeStruct'); -const {serializeMethod} = require('./serializeMethod'); -const {serializeModuleSource} = require('./source/serializeModule'); -const {StructCollector} = require('./StructCollector'); - -type FilesOutput = Map; - -const ModuleDeclarationTemplate = ({ - hasteModuleName, - structDeclarations, - protocolMethods, -}: $ReadOnly<{ - hasteModuleName: string, - structDeclarations: string, - protocolMethods: string, -}>) => `${structDeclarations} -@protocol ${hasteModuleName}Spec - -${protocolMethods} - -@end -namespace facebook::react { - /** - * ObjC++ class for module '${hasteModuleName}' - */ - class JSI_EXPORT ${hasteModuleName}SpecJSI : public ObjCTurboModule { - public: - ${hasteModuleName}SpecJSI(const ObjCTurboModule::InitParams ¶ms); - }; -} // namespace facebook::react`; - -const HeaderFileTemplate = ({ - moduleDeclarations, - structInlineMethods, - assumeNonnull, -}: $ReadOnly<{ - moduleDeclarations: string, - structInlineMethods: string, - assumeNonnull: boolean, -}>) => - `/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateModuleObjCpp - * - * We create an umbrella header (and corresponding implementation) here since - * Cxx compilation in BUCK has a limitation: source-code producing genrule()s - * must have a single output. More files => more genrule()s => slower builds. - */ - -#ifndef __cplusplus -#error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm. -#endif -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import - -` + - (assumeNonnull ? '\nNS_ASSUME_NONNULL_BEGIN\n' : '') + - moduleDeclarations + - '\n' + - structInlineMethods + - (assumeNonnull ? '\nNS_ASSUME_NONNULL_END\n' : '\n'); - -const SourceFileTemplate = ({ - headerFileName, - moduleImplementations, -}: $ReadOnly<{ - headerFileName: string, - moduleImplementations: string, -}>) => `/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * ${'@'}generated by codegen project: GenerateModuleObjCpp - * - * We create an umbrella header (and corresponding implementation) here since - * Cxx compilation in BUCK has a limitation: source-code producing genrule()s - * must have a single output. More files => more genrule()s => slower builds. - */ - -#import "${headerFileName}" - -${moduleImplementations} -`; - -module.exports = { - generate( - libraryName: string, - schema: SchemaType, - packageName?: string, - assumeNonnull: boolean, - headerPrefix?: string, - ): FilesOutput { - const nativeModules = getModules(schema); - - const moduleDeclarations: Array = []; - const structInlineMethods: Array = []; - const moduleImplementations: Array = []; - - const hasteModuleNames: Array = Object.keys(nativeModules).sort(); - for (const hasteModuleName of hasteModuleNames) { - const { - aliasMap, - excludedPlatforms, - spec: {properties}, - } = nativeModules[hasteModuleName]; - if (excludedPlatforms != null && excludedPlatforms.includes('iOS')) { - continue; - } - const resolveAlias = createAliasResolver(aliasMap); - const structCollector = new StructCollector(); - - const methodSerializations: Array = []; - const serializeProperty = (property: NativeModulePropertyShape) => { - methodSerializations.push( - ...serializeMethod( - hasteModuleName, - property, - structCollector, - resolveAlias, - ), - ); - }; - - /** - * Note: As we serialize NativeModule methods, we insert structs into - * StructCollector, as we encounter them. - */ - properties - .filter(property => property.name !== 'getConstants') - .forEach(serializeProperty); - properties - .filter(property => property.name === 'getConstants') - .forEach(serializeProperty); - - const generatedStructs = structCollector.getAllStructs(); - const structStrs = []; - const methodStrs = []; - - for (const struct of generatedStructs) { - const {methods, declaration} = serializeStruct(hasteModuleName, struct); - structStrs.push(declaration); - methodStrs.push(methods); - } - - moduleDeclarations.push( - ModuleDeclarationTemplate({ - hasteModuleName: hasteModuleName, - structDeclarations: structStrs.join('\n'), - protocolMethods: methodSerializations - .map(({protocolMethod}) => protocolMethod) - .join('\n'), - }), - ); - - structInlineMethods.push(methodStrs.join('\n')); - - moduleImplementations.push( - serializeModuleSource( - hasteModuleName, - generatedStructs, - methodSerializations.filter( - ({selector}) => selector !== '@selector(constantsToExport)', - ), - ), - ); - } - - const headerFileName = `${libraryName}.h`; - const headerFile = HeaderFileTemplate({ - moduleDeclarations: moduleDeclarations.join('\n'), - structInlineMethods: structInlineMethods.join('\n'), - assumeNonnull, - }); - - const sourceFileName = `${libraryName}-generated.mm`; - const sourceFile = SourceFileTemplate({ - headerFileName, - moduleImplementations: moduleImplementations.join('\n'), - }); - - return new Map([ - [headerFileName, headerFile], - [sourceFileName, sourceFile], - ]); - }, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/serializeMethod.js b/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/serializeMethod.js deleted file mode 100644 index 36db02bc4..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/serializeMethod.js +++ /dev/null @@ -1,535 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -function _slicedToArray(arr, i) { - return ( - _arrayWithHoles(arr) || - _iterableToArrayLimit(arr, i) || - _unsupportedIterableToArray(arr, i) || - _nonIterableRest() - ); -} -function _nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.', - ); -} -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === 'string') return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === 'Object' && o.constructor) n = o.constructor.name; - if (n === 'Map' || n === 'Set') return Array.from(o); - if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) - return _arrayLikeToArray(o, minLen); -} -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; -} -function _iterableToArrayLimit(arr, i) { - var _i = - null == arr - ? null - : ('undefined' != typeof Symbol && arr[Symbol.iterator]) || - arr['@@iterator']; - if (null != _i) { - var _s, - _e, - _x, - _r, - _arr = [], - _n = !0, - _d = !1; - try { - if (((_x = (_i = _i.call(arr)).next), 0 === i)) { - if (Object(_i) !== _i) return; - _n = !1; - } else - for ( - ; - !(_n = (_s = _x.call(_i)).done) && - (_arr.push(_s.value), _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - if (!_n && null != _i.return && ((_r = _i.return()), Object(_r) !== _r)) - return; - } finally { - if (_d) throw _e; - } - } - return _arr; - } -} -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} -const _require = require('../../../parsers/parsers-commons'), - unwrapNullable = _require.unwrapNullable, - wrapNullable = _require.wrapNullable; -const _require2 = require('../../TypeUtils/Objective-C'), - wrapOptional = _require2.wrapOptional; -const _require3 = require('../../Utils'), - capitalize = _require3.capitalize; -const _require4 = require('./Utils'), - getNamespacedStructName = _require4.getNamespacedStructName; -const invariant = require('invariant'); -const ProtocolMethodTemplate = ({returnObjCType, methodName, params}) => - `- (${returnObjCType})${methodName}${params};`; -function serializeMethod( - hasteModuleName, - property, - structCollector, - resolveAlias, -) { - const methodName = property.name, - nullableTypeAnnotation = property.typeAnnotation; - const _unwrapNullable = unwrapNullable(nullableTypeAnnotation), - _unwrapNullable2 = _slicedToArray(_unwrapNullable, 1), - propertyTypeAnnotation = _unwrapNullable2[0]; - const params = propertyTypeAnnotation.params; - if (methodName === 'getConstants') { - return serializeConstantsProtocolMethods( - hasteModuleName, - property, - structCollector, - resolveAlias, - ); - } - const methodParams = []; - const structParamRecords = []; - params.forEach((param, index) => { - const structName = getParamStructName(methodName, param); - const _getParamObjCType = getParamObjCType( - hasteModuleName, - methodName, - param, - structName, - structCollector, - resolveAlias, - ), - objCType = _getParamObjCType.objCType, - isStruct = _getParamObjCType.isStruct; - methodParams.push({ - paramName: param.name, - objCType, - }); - if (isStruct) { - structParamRecords.push({ - paramIndex: index, - structName, - }); - } - }); - - // Unwrap returnTypeAnnotation, so we check if the return type is Promise - // TODO(T76719514): Disallow nullable PromiseTypeAnnotations - const _unwrapNullable3 = unwrapNullable( - propertyTypeAnnotation.returnTypeAnnotation, - ), - _unwrapNullable4 = _slicedToArray(_unwrapNullable3, 1), - returnTypeAnnotation = _unwrapNullable4[0]; - if (returnTypeAnnotation.type === 'PromiseTypeAnnotation') { - methodParams.push( - { - paramName: 'resolve', - objCType: 'RCTPromiseResolveBlock', - }, - { - paramName: 'reject', - objCType: 'RCTPromiseRejectBlock', - }, - ); - } - - /** - * Build Protocol Method - **/ - const returnObjCType = getReturnObjCType( - methodName, - propertyTypeAnnotation.returnTypeAnnotation, - ); - const paddingMax = `- (${returnObjCType})${methodName}`.length; - const objCParams = methodParams.reduce( - ($objCParams, {objCType, paramName}, i) => { - const rhs = `(${objCType})${paramName}`; - const padding = ' '.repeat(Math.max(0, paddingMax - paramName.length)); - return i === 0 - ? `:${rhs}` - : `${$objCParams}\n${padding}${paramName}:${rhs}`; - }, - '', - ); - const protocolMethod = ProtocolMethodTemplate({ - methodName, - returnObjCType, - params: objCParams, - }); - - /** - * Build ObjC Selector - */ - // $FlowFixMe[missing-type-arg] - const selector = methodParams - .map(({paramName}) => paramName) - .reduce(($selector, paramName, i) => { - return i === 0 ? `${$selector}:` : `${$selector}${paramName}:`; - }, methodName); - - /** - * Build JS Return type - */ - const returnJSType = getReturnJSType(methodName, returnTypeAnnotation); - return [ - { - methodName, - protocolMethod, - selector: `@selector(${selector})`, - structParamRecords, - returnJSType, - argCount: params.length, - }, - ]; -} -function getParamStructName(methodName, param) { - const _unwrapNullable5 = unwrapNullable(param.typeAnnotation), - _unwrapNullable6 = _slicedToArray(_unwrapNullable5, 1), - typeAnnotation = _unwrapNullable6[0]; - if (typeAnnotation.type === 'TypeAliasTypeAnnotation') { - return typeAnnotation.name; - } - return `Spec${capitalize(methodName)}${capitalize(param.name)}`; -} -function getParamObjCType( - hasteModuleName, - methodName, - param, - structName, - structCollector, - resolveAlias, -) { - const paramName = param.name, - nullableTypeAnnotation = param.typeAnnotation; - const _unwrapNullable7 = unwrapNullable(nullableTypeAnnotation), - _unwrapNullable8 = _slicedToArray(_unwrapNullable7, 2), - typeAnnotation = _unwrapNullable8[0], - nullable = _unwrapNullable8[1]; - const isRequired = !param.optional && !nullable; - const isStruct = objCType => ({ - isStruct: true, - objCType, - }); - const notStruct = objCType => ({ - isStruct: false, - objCType, - }); - - // Handle types that can only be in parameters - switch (typeAnnotation.type) { - case 'FunctionTypeAnnotation': { - return notStruct('RCTResponseSenderBlock'); - } - case 'ArrayTypeAnnotation': { - /** - * Array in params always codegen NSArray * - * - * TODO(T73933406): Support codegen for Arrays of structs and primitives - * - * For example: - * Array => NSArray - * type Animal = {}; - * Array => NSArray, etc. - */ - return notStruct(wrapOptional('NSArray *', !nullable)); - } - } - const _unwrapNullable9 = unwrapNullable( - structCollector.process( - structName, - 'REGULAR', - resolveAlias, - wrapNullable(nullable, typeAnnotation), - ), - ), - _unwrapNullable10 = _slicedToArray(_unwrapNullable9, 1), - structTypeAnnotation = _unwrapNullable10[0]; - invariant( - structTypeAnnotation.type !== 'ArrayTypeAnnotation', - 'ArrayTypeAnnotations should have been processed earlier', - ); - switch (structTypeAnnotation.type) { - case 'TypeAliasTypeAnnotation': { - /** - * TODO(T73943261): Support nullable object literals and aliases? - */ - return isStruct( - getNamespacedStructName(hasteModuleName, structTypeAnnotation.name) + - ' &', - ); - } - case 'ReservedTypeAnnotation': - switch (structTypeAnnotation.name) { - case 'RootTag': - return notStruct(isRequired ? 'double' : 'NSNumber *'); - default: - structTypeAnnotation.name; - throw new Error( - `Unsupported type for param "${paramName}" in ${methodName}. Found: ${structTypeAnnotation.type}`, - ); - } - case 'StringTypeAnnotation': - return notStruct(wrapOptional('NSString *', !nullable)); - case 'NumberTypeAnnotation': - return notStruct(isRequired ? 'double' : 'NSNumber *'); - case 'FloatTypeAnnotation': - return notStruct(isRequired ? 'float' : 'NSNumber *'); - case 'DoubleTypeAnnotation': - return notStruct(isRequired ? 'double' : 'NSNumber *'); - case 'Int32TypeAnnotation': - return notStruct(isRequired ? 'NSInteger' : 'NSNumber *'); - case 'BooleanTypeAnnotation': - return notStruct(isRequired ? 'BOOL' : 'NSNumber *'); - case 'EnumDeclaration': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return notStruct(isRequired ? 'double' : 'NSNumber *'); - case 'StringTypeAnnotation': - return notStruct(wrapOptional('NSString *', !nullable)); - default: - throw new Error( - `Unsupported enum type for param "${paramName}" in ${methodName}. Found: ${typeAnnotation.type}`, - ); - } - case 'GenericObjectTypeAnnotation': - return notStruct(wrapOptional('NSDictionary *', !nullable)); - default: - structTypeAnnotation.type; - throw new Error( - `Unsupported type for param "${paramName}" in ${methodName}. Found: ${typeAnnotation.type}`, - ); - } -} -function getReturnObjCType(methodName, nullableTypeAnnotation) { - const _unwrapNullable11 = unwrapNullable(nullableTypeAnnotation), - _unwrapNullable12 = _slicedToArray(_unwrapNullable11, 2), - typeAnnotation = _unwrapNullable12[0], - nullable = _unwrapNullable12[1]; - const isRequired = !nullable; - switch (typeAnnotation.type) { - case 'VoidTypeAnnotation': - return 'void'; - case 'PromiseTypeAnnotation': - return 'void'; - case 'ObjectTypeAnnotation': - return wrapOptional('NSDictionary *', isRequired); - case 'TypeAliasTypeAnnotation': - return wrapOptional('NSDictionary *', isRequired); - case 'ArrayTypeAnnotation': - if (typeAnnotation.elementType == null) { - return wrapOptional('NSArray> *', isRequired); - } - return wrapOptional( - `NSArray<${getReturnObjCType( - methodName, - typeAnnotation.elementType, - )}> *`, - isRequired, - ); - case 'ReservedTypeAnnotation': - switch (typeAnnotation.name) { - case 'RootTag': - return wrapOptional('NSNumber *', isRequired); - default: - typeAnnotation.name; - throw new Error( - `Unsupported return type for ${methodName}. Found: ${typeAnnotation.name}`, - ); - } - case 'StringTypeAnnotation': - // TODO: Can NSString * returns not be _Nullable? - // In the legacy codegen, we don't surround NSSTring * with _Nullable - return wrapOptional('NSString *', isRequired); - case 'NumberTypeAnnotation': - return wrapOptional('NSNumber *', isRequired); - case 'FloatTypeAnnotation': - return wrapOptional('NSNumber *', isRequired); - case 'DoubleTypeAnnotation': - return wrapOptional('NSNumber *', isRequired); - case 'Int32TypeAnnotation': - return wrapOptional('NSNumber *', isRequired); - case 'BooleanTypeAnnotation': - return wrapOptional('NSNumber *', isRequired); - case 'EnumDeclaration': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return wrapOptional('NSNumber *', isRequired); - case 'StringTypeAnnotation': - return wrapOptional('NSString *', isRequired); - default: - throw new Error( - `Unsupported enum return type for ${methodName}. Found: ${typeAnnotation.type}`, - ); - } - case 'UnionTypeAnnotation': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return wrapOptional('NSNumber *', isRequired); - case 'ObjectTypeAnnotation': - return wrapOptional('NSDictionary *', isRequired); - case 'StringTypeAnnotation': - // TODO: Can NSString * returns not be _Nullable? - // In the legacy codegen, we don't surround NSSTring * with _Nullable - return wrapOptional('NSString *', isRequired); - default: - throw new Error( - `Unsupported union return type for ${methodName}, found: ${typeAnnotation.memberType}"`, - ); - } - case 'GenericObjectTypeAnnotation': - return wrapOptional('NSDictionary *', isRequired); - default: - typeAnnotation.type; - throw new Error( - `Unsupported return type for ${methodName}. Found: ${typeAnnotation.type}`, - ); - } -} -function getReturnJSType(methodName, nullableTypeAnnotation) { - const _unwrapNullable13 = unwrapNullable(nullableTypeAnnotation), - _unwrapNullable14 = _slicedToArray(_unwrapNullable13, 1), - typeAnnotation = _unwrapNullable14[0]; - switch (typeAnnotation.type) { - case 'VoidTypeAnnotation': - return 'VoidKind'; - case 'PromiseTypeAnnotation': - return 'PromiseKind'; - case 'ObjectTypeAnnotation': - return 'ObjectKind'; - case 'TypeAliasTypeAnnotation': - return 'ObjectKind'; - case 'ArrayTypeAnnotation': - return 'ArrayKind'; - case 'ReservedTypeAnnotation': - return 'NumberKind'; - case 'StringTypeAnnotation': - return 'StringKind'; - case 'NumberTypeAnnotation': - return 'NumberKind'; - case 'FloatTypeAnnotation': - return 'NumberKind'; - case 'DoubleTypeAnnotation': - return 'NumberKind'; - case 'Int32TypeAnnotation': - return 'NumberKind'; - case 'BooleanTypeAnnotation': - return 'BooleanKind'; - case 'GenericObjectTypeAnnotation': - return 'ObjectKind'; - case 'EnumDeclaration': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return 'NumberKind'; - case 'StringTypeAnnotation': - return 'StringKind'; - default: - throw new Error( - `Unsupported return type for ${methodName}. Found: ${typeAnnotation.type}`, - ); - } - case 'UnionTypeAnnotation': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return 'NumberKind'; - case 'ObjectTypeAnnotation': - return 'ObjectKind'; - case 'StringTypeAnnotation': - return 'StringKind'; - default: - throw new Error( - `Unsupported return type for ${methodName}. Found: ${typeAnnotation.type}`, - ); - } - default: - typeAnnotation.type; - throw new Error( - `Unsupported return type for ${methodName}. Found: ${typeAnnotation.type}`, - ); - } -} -function serializeConstantsProtocolMethods( - hasteModuleName, - property, - structCollector, - resolveAlias, -) { - const _unwrapNullable15 = unwrapNullable(property.typeAnnotation), - _unwrapNullable16 = _slicedToArray(_unwrapNullable15, 1), - propertyTypeAnnotation = _unwrapNullable16[0]; - if (propertyTypeAnnotation.params.length !== 0) { - throw new Error( - `${hasteModuleName}.getConstants() may only accept 0 arguments.`, - ); - } - let returnTypeAnnotation = propertyTypeAnnotation.returnTypeAnnotation; - if (returnTypeAnnotation.type === 'TypeAliasTypeAnnotation') { - // The return type is an alias, resolve it to get the expected undelying object literal type - returnTypeAnnotation = resolveAlias(returnTypeAnnotation.name); - } - if (returnTypeAnnotation.type !== 'ObjectTypeAnnotation') { - throw new Error( - `${hasteModuleName}.getConstants() may only return an object literal: {...}` + - ` or a type alias of such. Got '${propertyTypeAnnotation.returnTypeAnnotation.type}'.`, - ); - } - if ( - returnTypeAnnotation.type === 'ObjectTypeAnnotation' && - returnTypeAnnotation.properties.length === 0 - ) { - return []; - } - const realTypeAnnotation = structCollector.process( - 'Constants', - 'CONSTANTS', - resolveAlias, - returnTypeAnnotation, - ); - invariant( - realTypeAnnotation.type === 'TypeAliasTypeAnnotation', - "Unable to generate C++ struct from module's getConstants() method return type.", - ); - const returnObjCType = `facebook::react::ModuleConstants`; - - // $FlowFixMe[missing-type-arg] - return ['constantsToExport', 'getConstants'].map(methodName => { - const protocolMethod = ProtocolMethodTemplate({ - methodName, - returnObjCType, - params: '', - }); - return { - methodName, - protocolMethod, - returnJSType: 'ObjectKind', - selector: `@selector(${methodName})`, - structParamRecords: [], - argCount: 0, - }; - }); -} -module.exports = { - serializeMethod, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/serializeMethod.js.flow b/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/serializeMethod.js.flow deleted file mode 100644 index 14f0ed724..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/serializeMethod.js.flow +++ /dev/null @@ -1,514 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type { - NamedShape, - NativeModuleParamTypeAnnotation, - NativeModulePropertyShape, - NativeModuleReturnTypeAnnotation, - Nullable, -} from '../../../CodegenSchema'; -import type {AliasResolver} from '../Utils'; -import type {StructCollector} from './StructCollector'; - -const { - unwrapNullable, - wrapNullable, -} = require('../../../parsers/parsers-commons'); -const {wrapOptional} = require('../../TypeUtils/Objective-C'); -const {capitalize} = require('../../Utils'); -const {getNamespacedStructName} = require('./Utils'); -const invariant = require('invariant'); - -const ProtocolMethodTemplate = ({ - returnObjCType, - methodName, - params, -}: $ReadOnly<{ - returnObjCType: string, - methodName: string, - params: string, -}>) => `- (${returnObjCType})${methodName}${params};`; - -export type StructParameterRecord = $ReadOnly<{ - paramIndex: number, - structName: string, -}>; - -type ReturnJSType = - | 'VoidKind' - | 'BooleanKind' - | 'PromiseKind' - | 'ObjectKind' - | 'ArrayKind' - | 'NumberKind' - | 'StringKind'; - -export type MethodSerializationOutput = $ReadOnly<{ - methodName: string, - protocolMethod: string, - selector: string, - structParamRecords: $ReadOnlyArray, - returnJSType: ReturnJSType, - argCount: number, -}>; - -function serializeMethod( - hasteModuleName: string, - property: NativeModulePropertyShape, - structCollector: StructCollector, - resolveAlias: AliasResolver, -): $ReadOnlyArray { - const {name: methodName, typeAnnotation: nullableTypeAnnotation} = property; - const [propertyTypeAnnotation] = unwrapNullable(nullableTypeAnnotation); - const {params} = propertyTypeAnnotation; - - if (methodName === 'getConstants') { - return serializeConstantsProtocolMethods( - hasteModuleName, - property, - structCollector, - resolveAlias, - ); - } - - const methodParams: Array<{paramName: string, objCType: string}> = []; - const structParamRecords: Array = []; - - params.forEach((param, index) => { - const structName = getParamStructName(methodName, param); - const {objCType, isStruct} = getParamObjCType( - hasteModuleName, - methodName, - param, - structName, - structCollector, - resolveAlias, - ); - - methodParams.push({paramName: param.name, objCType}); - - if (isStruct) { - structParamRecords.push({paramIndex: index, structName}); - } - }); - - // Unwrap returnTypeAnnotation, so we check if the return type is Promise - // TODO(T76719514): Disallow nullable PromiseTypeAnnotations - const [returnTypeAnnotation] = unwrapNullable( - propertyTypeAnnotation.returnTypeAnnotation, - ); - - if (returnTypeAnnotation.type === 'PromiseTypeAnnotation') { - methodParams.push( - {paramName: 'resolve', objCType: 'RCTPromiseResolveBlock'}, - {paramName: 'reject', objCType: 'RCTPromiseRejectBlock'}, - ); - } - - /** - * Build Protocol Method - **/ - const returnObjCType = getReturnObjCType( - methodName, - propertyTypeAnnotation.returnTypeAnnotation, - ); - const paddingMax = `- (${returnObjCType})${methodName}`.length; - - const objCParams = methodParams.reduce( - ($objCParams, {objCType, paramName}, i) => { - const rhs = `(${objCType})${paramName}`; - const padding = ' '.repeat(Math.max(0, paddingMax - paramName.length)); - return i === 0 - ? `:${rhs}` - : `${$objCParams}\n${padding}${paramName}:${rhs}`; - }, - '', - ); - - const protocolMethod = ProtocolMethodTemplate({ - methodName, - returnObjCType, - params: objCParams, - }); - - /** - * Build ObjC Selector - */ - // $FlowFixMe[missing-type-arg] - const selector = methodParams - .map(({paramName}) => paramName) - .reduce(($selector, paramName, i) => { - return i === 0 ? `${$selector}:` : `${$selector}${paramName}:`; - }, methodName); - - /** - * Build JS Return type - */ - const returnJSType = getReturnJSType(methodName, returnTypeAnnotation); - - return [ - { - methodName, - protocolMethod, - selector: `@selector(${selector})`, - structParamRecords, - returnJSType, - argCount: params.length, - }, - ]; -} - -type Param = NamedShape>; - -function getParamStructName(methodName: string, param: Param): string { - const [typeAnnotation] = unwrapNullable(param.typeAnnotation); - if (typeAnnotation.type === 'TypeAliasTypeAnnotation') { - return typeAnnotation.name; - } - - return `Spec${capitalize(methodName)}${capitalize(param.name)}`; -} - -function getParamObjCType( - hasteModuleName: string, - methodName: string, - param: Param, - structName: string, - structCollector: StructCollector, - resolveAlias: AliasResolver, -): $ReadOnly<{objCType: string, isStruct: boolean}> { - const {name: paramName, typeAnnotation: nullableTypeAnnotation} = param; - const [typeAnnotation, nullable] = unwrapNullable(nullableTypeAnnotation); - const isRequired = !param.optional && !nullable; - - const isStruct = (objCType: string) => ({ - isStruct: true, - objCType, - }); - - const notStruct = (objCType: string) => ({ - isStruct: false, - objCType, - }); - - // Handle types that can only be in parameters - switch (typeAnnotation.type) { - case 'FunctionTypeAnnotation': { - return notStruct('RCTResponseSenderBlock'); - } - case 'ArrayTypeAnnotation': { - /** - * Array in params always codegen NSArray * - * - * TODO(T73933406): Support codegen for Arrays of structs and primitives - * - * For example: - * Array => NSArray - * type Animal = {}; - * Array => NSArray, etc. - */ - return notStruct(wrapOptional('NSArray *', !nullable)); - } - } - - const [structTypeAnnotation] = unwrapNullable( - structCollector.process( - structName, - 'REGULAR', - resolveAlias, - wrapNullable(nullable, typeAnnotation), - ), - ); - - invariant( - structTypeAnnotation.type !== 'ArrayTypeAnnotation', - 'ArrayTypeAnnotations should have been processed earlier', - ); - - switch (structTypeAnnotation.type) { - case 'TypeAliasTypeAnnotation': { - /** - * TODO(T73943261): Support nullable object literals and aliases? - */ - return isStruct( - getNamespacedStructName(hasteModuleName, structTypeAnnotation.name) + - ' &', - ); - } - case 'ReservedTypeAnnotation': - switch (structTypeAnnotation.name) { - case 'RootTag': - return notStruct(isRequired ? 'double' : 'NSNumber *'); - default: - (structTypeAnnotation.name: empty); - throw new Error( - `Unsupported type for param "${paramName}" in ${methodName}. Found: ${structTypeAnnotation.type}`, - ); - } - case 'StringTypeAnnotation': - return notStruct(wrapOptional('NSString *', !nullable)); - case 'NumberTypeAnnotation': - return notStruct(isRequired ? 'double' : 'NSNumber *'); - case 'FloatTypeAnnotation': - return notStruct(isRequired ? 'float' : 'NSNumber *'); - case 'DoubleTypeAnnotation': - return notStruct(isRequired ? 'double' : 'NSNumber *'); - case 'Int32TypeAnnotation': - return notStruct(isRequired ? 'NSInteger' : 'NSNumber *'); - case 'BooleanTypeAnnotation': - return notStruct(isRequired ? 'BOOL' : 'NSNumber *'); - case 'EnumDeclaration': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return notStruct(isRequired ? 'double' : 'NSNumber *'); - case 'StringTypeAnnotation': - return notStruct(wrapOptional('NSString *', !nullable)); - default: - throw new Error( - `Unsupported enum type for param "${paramName}" in ${methodName}. Found: ${typeAnnotation.type}`, - ); - } - case 'GenericObjectTypeAnnotation': - return notStruct(wrapOptional('NSDictionary *', !nullable)); - default: - (structTypeAnnotation.type: empty); - throw new Error( - `Unsupported type for param "${paramName}" in ${methodName}. Found: ${typeAnnotation.type}`, - ); - } -} - -function getReturnObjCType( - methodName: string, - nullableTypeAnnotation: Nullable, -): string { - const [typeAnnotation, nullable] = unwrapNullable(nullableTypeAnnotation); - const isRequired = !nullable; - - switch (typeAnnotation.type) { - case 'VoidTypeAnnotation': - return 'void'; - case 'PromiseTypeAnnotation': - return 'void'; - case 'ObjectTypeAnnotation': - return wrapOptional('NSDictionary *', isRequired); - case 'TypeAliasTypeAnnotation': - return wrapOptional('NSDictionary *', isRequired); - case 'ArrayTypeAnnotation': - if (typeAnnotation.elementType == null) { - return wrapOptional('NSArray> *', isRequired); - } - - return wrapOptional( - `NSArray<${getReturnObjCType( - methodName, - typeAnnotation.elementType, - )}> *`, - isRequired, - ); - case 'ReservedTypeAnnotation': - switch (typeAnnotation.name) { - case 'RootTag': - return wrapOptional('NSNumber *', isRequired); - default: - (typeAnnotation.name: empty); - throw new Error( - `Unsupported return type for ${methodName}. Found: ${typeAnnotation.name}`, - ); - } - case 'StringTypeAnnotation': - // TODO: Can NSString * returns not be _Nullable? - // In the legacy codegen, we don't surround NSSTring * with _Nullable - return wrapOptional('NSString *', isRequired); - case 'NumberTypeAnnotation': - return wrapOptional('NSNumber *', isRequired); - case 'FloatTypeAnnotation': - return wrapOptional('NSNumber *', isRequired); - case 'DoubleTypeAnnotation': - return wrapOptional('NSNumber *', isRequired); - case 'Int32TypeAnnotation': - return wrapOptional('NSNumber *', isRequired); - case 'BooleanTypeAnnotation': - return wrapOptional('NSNumber *', isRequired); - case 'EnumDeclaration': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return wrapOptional('NSNumber *', isRequired); - case 'StringTypeAnnotation': - return wrapOptional('NSString *', isRequired); - default: - throw new Error( - `Unsupported enum return type for ${methodName}. Found: ${typeAnnotation.type}`, - ); - } - case 'UnionTypeAnnotation': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return wrapOptional('NSNumber *', isRequired); - case 'ObjectTypeAnnotation': - return wrapOptional('NSDictionary *', isRequired); - case 'StringTypeAnnotation': - // TODO: Can NSString * returns not be _Nullable? - // In the legacy codegen, we don't surround NSSTring * with _Nullable - return wrapOptional('NSString *', isRequired); - default: - throw new Error( - `Unsupported union return type for ${methodName}, found: ${typeAnnotation.memberType}"`, - ); - } - case 'GenericObjectTypeAnnotation': - return wrapOptional('NSDictionary *', isRequired); - default: - (typeAnnotation.type: 'MixedTypeAnnotation'); - throw new Error( - `Unsupported return type for ${methodName}. Found: ${typeAnnotation.type}`, - ); - } -} - -function getReturnJSType( - methodName: string, - nullableTypeAnnotation: Nullable, -): ReturnJSType { - const [typeAnnotation] = unwrapNullable(nullableTypeAnnotation); - switch (typeAnnotation.type) { - case 'VoidTypeAnnotation': - return 'VoidKind'; - case 'PromiseTypeAnnotation': - return 'PromiseKind'; - case 'ObjectTypeAnnotation': - return 'ObjectKind'; - case 'TypeAliasTypeAnnotation': - return 'ObjectKind'; - case 'ArrayTypeAnnotation': - return 'ArrayKind'; - case 'ReservedTypeAnnotation': - return 'NumberKind'; - case 'StringTypeAnnotation': - return 'StringKind'; - case 'NumberTypeAnnotation': - return 'NumberKind'; - case 'FloatTypeAnnotation': - return 'NumberKind'; - case 'DoubleTypeAnnotation': - return 'NumberKind'; - case 'Int32TypeAnnotation': - return 'NumberKind'; - case 'BooleanTypeAnnotation': - return 'BooleanKind'; - case 'GenericObjectTypeAnnotation': - return 'ObjectKind'; - case 'EnumDeclaration': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return 'NumberKind'; - case 'StringTypeAnnotation': - return 'StringKind'; - default: - throw new Error( - `Unsupported return type for ${methodName}. Found: ${typeAnnotation.type}`, - ); - } - case 'UnionTypeAnnotation': - switch (typeAnnotation.memberType) { - case 'NumberTypeAnnotation': - return 'NumberKind'; - case 'ObjectTypeAnnotation': - return 'ObjectKind'; - case 'StringTypeAnnotation': - return 'StringKind'; - default: - throw new Error( - `Unsupported return type for ${methodName}. Found: ${typeAnnotation.type}`, - ); - } - default: - (typeAnnotation.type: 'MixedTypeAnnotation'); - throw new Error( - `Unsupported return type for ${methodName}. Found: ${typeAnnotation.type}`, - ); - } -} - -function serializeConstantsProtocolMethods( - hasteModuleName: string, - property: NativeModulePropertyShape, - structCollector: StructCollector, - resolveAlias: AliasResolver, -): $ReadOnlyArray { - const [propertyTypeAnnotation] = unwrapNullable(property.typeAnnotation); - if (propertyTypeAnnotation.params.length !== 0) { - throw new Error( - `${hasteModuleName}.getConstants() may only accept 0 arguments.`, - ); - } - - let {returnTypeAnnotation} = propertyTypeAnnotation; - - if (returnTypeAnnotation.type === 'TypeAliasTypeAnnotation') { - // The return type is an alias, resolve it to get the expected undelying object literal type - returnTypeAnnotation = resolveAlias(returnTypeAnnotation.name); - } - - if (returnTypeAnnotation.type !== 'ObjectTypeAnnotation') { - throw new Error( - `${hasteModuleName}.getConstants() may only return an object literal: {...}` + - ` or a type alias of such. Got '${propertyTypeAnnotation.returnTypeAnnotation.type}'.`, - ); - } - - if ( - returnTypeAnnotation.type === 'ObjectTypeAnnotation' && - returnTypeAnnotation.properties.length === 0 - ) { - return []; - } - - const realTypeAnnotation = structCollector.process( - 'Constants', - 'CONSTANTS', - resolveAlias, - returnTypeAnnotation, - ); - - invariant( - realTypeAnnotation.type === 'TypeAliasTypeAnnotation', - "Unable to generate C++ struct from module's getConstants() method return type.", - ); - - const returnObjCType = `facebook::react::ModuleConstants`; - - // $FlowFixMe[missing-type-arg] - return ['constantsToExport', 'getConstants'].map( - methodName => { - const protocolMethod = ProtocolMethodTemplate({ - methodName, - returnObjCType, - params: '', - }); - - return { - methodName, - protocolMethod, - returnJSType: 'ObjectKind', - selector: `@selector(${methodName})`, - structParamRecords: [], - argCount: 0, - }; - }, - ); -} - -module.exports = { - serializeMethod, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/source/serializeModule.js b/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/source/serializeModule.js deleted file mode 100644 index 66235ca3d..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/source/serializeModule.js +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const ModuleTemplate = ({ - hasteModuleName, - structs, - methodSerializationOutputs, -}) => `${structs - .map(struct => - RCTCxxConvertCategoryTemplate({ - hasteModuleName, - structName: struct.name, - }), - ) - .join('\n')} -namespace facebook::react { - ${methodSerializationOutputs - .map(serializedMethodParts => - InlineHostFunctionTemplate({ - hasteModuleName, - methodName: serializedMethodParts.methodName, - returnJSType: serializedMethodParts.returnJSType, - selector: serializedMethodParts.selector, - }), - ) - .join('\n')} - - ${hasteModuleName}SpecJSI::${hasteModuleName}SpecJSI(const ObjCTurboModule::InitParams ¶ms) - : ObjCTurboModule(params) { - ${methodSerializationOutputs - .map(({methodName, structParamRecords, argCount}) => - MethodMapEntryTemplate({ - hasteModuleName, - methodName, - structParamRecords, - argCount, - }), - ) - .join('\n' + ' '.repeat(8))} - } -} // namespace facebook::react`; -const RCTCxxConvertCategoryTemplate = ({ - hasteModuleName, - structName, -}) => `@implementation RCTCxxConvert (${hasteModuleName}_${structName}) -+ (RCTManagedPointer *)JS_${hasteModuleName}_${structName}:(id)json -{ - return facebook::react::managedPointer(json); -} -@end`; -const InlineHostFunctionTemplate = ({ - hasteModuleName, - methodName, - returnJSType, - selector, -}) => ` - static facebook::jsi::Value __hostFunction_${hasteModuleName}SpecJSI_${methodName}(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { - return static_cast(turboModule).invokeObjCMethod(rt, ${returnJSType}, "${methodName}", ${selector}, args, count); - }`; -const MethodMapEntryTemplate = ({ - hasteModuleName, - methodName, - structParamRecords, - argCount, -}) => ` - methodMap_["${methodName}"] = MethodMetadata {${argCount}, __hostFunction_${hasteModuleName}SpecJSI_${methodName}}; - ${structParamRecords - .map(({paramIndex, structName}) => { - return `setMethodArgConversionSelector(@"${methodName}", ${paramIndex}, @"JS_${hasteModuleName}_${structName}:");`; - }) - .join('\n' + ' '.repeat(8))}`; -function serializeModuleSource( - hasteModuleName, - structs, - methodSerializationOutputs, -) { - return ModuleTemplate({ - hasteModuleName, - structs: structs.filter(({context}) => context !== 'CONSTANTS'), - methodSerializationOutputs, - }); -} -module.exports = { - serializeModuleSource, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/source/serializeModule.js.flow b/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/source/serializeModule.js.flow deleted file mode 100644 index 62cc5e204..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleObjCpp/source/serializeModule.js.flow +++ /dev/null @@ -1,119 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type { - MethodSerializationOutput, - StructParameterRecord, -} from '../serializeMethod'; -import type {Struct} from '../StructCollector'; - -const ModuleTemplate = ({ - hasteModuleName, - structs, - methodSerializationOutputs, -}: $ReadOnly<{ - hasteModuleName: string, - structs: $ReadOnlyArray, - methodSerializationOutputs: $ReadOnlyArray, -}>) => `${structs - .map(struct => - RCTCxxConvertCategoryTemplate({hasteModuleName, structName: struct.name}), - ) - .join('\n')} -namespace facebook::react { - ${methodSerializationOutputs - .map(serializedMethodParts => - InlineHostFunctionTemplate({ - hasteModuleName, - methodName: serializedMethodParts.methodName, - returnJSType: serializedMethodParts.returnJSType, - selector: serializedMethodParts.selector, - }), - ) - .join('\n')} - - ${hasteModuleName}SpecJSI::${hasteModuleName}SpecJSI(const ObjCTurboModule::InitParams ¶ms) - : ObjCTurboModule(params) { - ${methodSerializationOutputs - .map(({methodName, structParamRecords, argCount}) => - MethodMapEntryTemplate({ - hasteModuleName, - methodName, - structParamRecords, - argCount, - }), - ) - .join('\n' + ' '.repeat(8))} - } -} // namespace facebook::react`; - -const RCTCxxConvertCategoryTemplate = ({ - hasteModuleName, - structName, -}: $ReadOnly<{ - hasteModuleName: string, - structName: string, -}>) => `@implementation RCTCxxConvert (${hasteModuleName}_${structName}) -+ (RCTManagedPointer *)JS_${hasteModuleName}_${structName}:(id)json -{ - return facebook::react::managedPointer(json); -} -@end`; - -const InlineHostFunctionTemplate = ({ - hasteModuleName, - methodName, - returnJSType, - selector, -}: $ReadOnly<{ - hasteModuleName: string, - methodName: string, - returnJSType: string, - selector: string, -}>) => ` - static facebook::jsi::Value __hostFunction_${hasteModuleName}SpecJSI_${methodName}(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { - return static_cast(turboModule).invokeObjCMethod(rt, ${returnJSType}, "${methodName}", ${selector}, args, count); - }`; - -const MethodMapEntryTemplate = ({ - hasteModuleName, - methodName, - structParamRecords, - argCount, -}: $ReadOnly<{ - hasteModuleName: string, - methodName: string, - structParamRecords: $ReadOnlyArray, - argCount: number, -}>) => ` - methodMap_["${methodName}"] = MethodMetadata {${argCount}, __hostFunction_${hasteModuleName}SpecJSI_${methodName}}; - ${structParamRecords - .map(({paramIndex, structName}) => { - return `setMethodArgConversionSelector(@"${methodName}", ${paramIndex}, @"JS_${hasteModuleName}_${structName}:");`; - }) - .join('\n' + ' '.repeat(8))}`; - -function serializeModuleSource( - hasteModuleName: string, - structs: $ReadOnlyArray, - methodSerializationOutputs: $ReadOnlyArray, -): string { - return ModuleTemplate({ - hasteModuleName, - structs: structs.filter(({context}) => context !== 'CONSTANTS'), - methodSerializationOutputs, - }); -} - -module.exports = { - serializeModuleSource, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/Utils.js b/node_modules/@react-native/codegen/lib/generators/modules/Utils.js deleted file mode 100644 index 18ae6c07a..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/Utils.js +++ /dev/null @@ -1,136 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -function _slicedToArray(arr, i) { - return ( - _arrayWithHoles(arr) || - _iterableToArrayLimit(arr, i) || - _unsupportedIterableToArray(arr, i) || - _nonIterableRest() - ); -} -function _nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.', - ); -} -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === 'string') return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === 'Object' && o.constructor) n = o.constructor.name; - if (n === 'Map' || n === 'Set') return Array.from(o); - if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) - return _arrayLikeToArray(o, minLen); -} -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; -} -function _iterableToArrayLimit(arr, i) { - var _i = - null == arr - ? null - : ('undefined' != typeof Symbol && arr[Symbol.iterator]) || - arr['@@iterator']; - if (null != _i) { - var _s, - _e, - _x, - _r, - _arr = [], - _n = !0, - _d = !1; - try { - if (((_x = (_i = _i.call(arr)).next), 0 === i)) { - if (Object(_i) !== _i) return; - _n = !1; - } else - for ( - ; - !(_n = (_s = _x.call(_i)).done) && - (_arr.push(_s.value), _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - if (!_n && null != _i.return && ((_r = _i.return()), Object(_r) !== _r)) - return; - } finally { - if (_d) throw _e; - } - } - return _arr; - } -} -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} -const _require = require('../../parsers/parsers-commons'), - unwrapNullable = _require.unwrapNullable; -const invariant = require('invariant'); -function createAliasResolver(aliasMap) { - return aliasName => { - const alias = aliasMap[aliasName]; - invariant(alias != null, `Unable to resolve type alias '${aliasName}'.`); - return alias; - }; -} -function getModules(schema) { - return Object.keys(schema.modules).reduce((modules, hasteModuleName) => { - const module = schema.modules[hasteModuleName]; - if (module == null || module.type === 'Component') { - return modules; - } - modules[hasteModuleName] = module; - return modules; - }, {}); -} -function isDirectRecursiveMember( - parentObjectAliasName, - nullableTypeAnnotation, -) { - const _unwrapNullable = unwrapNullable(nullableTypeAnnotation), - _unwrapNullable2 = _slicedToArray(_unwrapNullable, 1), - typeAnnotation = _unwrapNullable2[0]; - return ( - parentObjectAliasName !== undefined && - typeAnnotation.name === parentObjectAliasName - ); -} -function isArrayRecursiveMember(parentObjectAliasName, nullableTypeAnnotation) { - var _typeAnnotation$eleme; - const _unwrapNullable3 = unwrapNullable(nullableTypeAnnotation), - _unwrapNullable4 = _slicedToArray(_unwrapNullable3, 1), - typeAnnotation = _unwrapNullable4[0]; - return ( - parentObjectAliasName !== undefined && - typeAnnotation.type === 'ArrayTypeAnnotation' && - ((_typeAnnotation$eleme = typeAnnotation.elementType) === null || - _typeAnnotation$eleme === void 0 - ? void 0 - : _typeAnnotation$eleme.name) === parentObjectAliasName - ); -} -function getAreEnumMembersInteger(members) { - return !members.some(m => `${m.value}`.includes('.')); -} -module.exports = { - createAliasResolver, - getModules, - getAreEnumMembersInteger, - isDirectRecursiveMember, - isArrayRecursiveMember, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/Utils.js.flow b/node_modules/@react-native/codegen/lib/generators/modules/Utils.js.flow deleted file mode 100644 index 20e7a482b..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/Utils.js.flow +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type { - NativeModuleAliasMap, - NativeModuleEnumMembers, - NativeModuleObjectTypeAnnotation, - NativeModuleSchema, - NativeModuleTypeAnnotation, - Nullable, - SchemaType, -} from '../../CodegenSchema'; - -const {unwrapNullable} = require('../../parsers/parsers-commons'); -const invariant = require('invariant'); - -export type AliasResolver = ( - aliasName: string, -) => NativeModuleObjectTypeAnnotation; - -function createAliasResolver(aliasMap: NativeModuleAliasMap): AliasResolver { - return (aliasName: string) => { - const alias = aliasMap[aliasName]; - invariant(alias != null, `Unable to resolve type alias '${aliasName}'.`); - return alias; - }; -} - -function getModules( - schema: SchemaType, -): $ReadOnly<{[hasteModuleName: string]: NativeModuleSchema}> { - return Object.keys(schema.modules).reduce<{[string]: NativeModuleSchema}>( - (modules, hasteModuleName: string) => { - const module = schema.modules[hasteModuleName]; - if (module == null || module.type === 'Component') { - return modules; - } - modules[hasteModuleName] = module; - return modules; - }, - {}, - ); -} - -function isDirectRecursiveMember( - parentObjectAliasName: ?string, - nullableTypeAnnotation: Nullable, -): boolean { - const [typeAnnotation] = unwrapNullable( - nullableTypeAnnotation, - ); - return ( - parentObjectAliasName !== undefined && - typeAnnotation.name === parentObjectAliasName - ); -} - -function isArrayRecursiveMember( - parentObjectAliasName: ?string, - nullableTypeAnnotation: Nullable, -): boolean { - const [typeAnnotation] = unwrapNullable( - nullableTypeAnnotation, - ); - return ( - parentObjectAliasName !== undefined && - typeAnnotation.type === 'ArrayTypeAnnotation' && - typeAnnotation.elementType?.name === parentObjectAliasName - ); -} - -function getAreEnumMembersInteger(members: NativeModuleEnumMembers): boolean { - return !members.some(m => `${m.value}`.includes('.')); -} - -module.exports = { - createAliasResolver, - getModules, - getAreEnumMembersInteger, - isDirectRecursiveMember, - isArrayRecursiveMember, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/__test_fixtures__/fixtures.js b/node_modules/@react-native/codegen/lib/generators/modules/__test_fixtures__/fixtures.js deleted file mode 100644 index de7bfc39d..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/__test_fixtures__/fixtures.js +++ /dev/null @@ -1,2421 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const EMPTY_NATIVE_MODULES = { - modules: { - NativeSampleTurboModule: { - type: 'NativeModule', - aliasMap: {}, - enumMap: {}, - spec: { - properties: [], - }, - moduleName: 'SampleTurboModule', - }, - }, -}; -const SIMPLE_NATIVE_MODULES = { - modules: { - NativeSampleTurboModule: { - type: 'NativeModule', - aliasMap: {}, - enumMap: { - NumEnum: { - type: 'EnumDeclarationWithMembers', - name: 'NumEnum', - memberType: 'NumberTypeAnnotation', - members: [ - { - name: 'ONE', - value: '1', - }, - { - name: 'TWO', - value: '2', - }, - ], - }, - FloatEnum: { - type: 'EnumDeclarationWithMembers', - name: 'FloatEnum', - memberType: 'NumberTypeAnnotation', - members: [ - { - name: 'POINT_ZERO', - value: '0.0', - }, - { - name: 'POINT_ONE', - value: '0.1', - }, - { - name: 'POINT_TWO', - value: '0.2', - }, - ], - }, - StringEnum: { - type: 'EnumDeclarationWithMembers', - name: 'StringEnum', - memberType: 'StringTypeAnnotation', - members: [ - { - name: 'HELLO', - value: 'hello', - }, - { - name: 'GoodBye', - value: 'goodbye', - }, - ], - }, - }, - spec: { - properties: [ - { - name: 'getConstants', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'const1', - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - { - optional: false, - name: 'const2', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'const3', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - ], - }, - params: [], - }, - }, - { - name: 'voidFunc', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [], - }, - }, - { - name: 'getBool', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'arg', - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getNumber', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'NumberTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'arg', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getString', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'StringTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'arg', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getArray', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'GenericObjectTypeAnnotation', - }, - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'GenericObjectTypeAnnotation', - }, - }, - }, - ], - }, - }, - { - name: 'getObject', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'GenericObjectTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'arg', - typeAnnotation: { - type: 'GenericObjectTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getRootTag', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'ReservedTypeAnnotation', - name: 'RootTag', - }, - params: [ - { - optional: false, - name: 'arg', - typeAnnotation: { - type: 'ReservedTypeAnnotation', - name: 'RootTag', - }, - }, - ], - }, - }, - { - name: 'getValue', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'GenericObjectTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'x', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'y', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: false, - name: 'z', - typeAnnotation: { - type: 'GenericObjectTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getEnumReturn', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'EnumDeclaration', - name: 'NumEnum', - memberType: 'NumberTypeAnnotation', - }, - params: [], - }, - }, - { - name: 'getValueWithCallback', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [ - { - name: 'callback', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - params: [], - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - }, - }, - ], - }, - }, - { - name: 'getValueWithPromise', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'PromiseTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'error', - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getValueWithOptionalArg', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'PromiseTypeAnnotation', - }, - params: [ - { - optional: true, - name: 'parameter', - typeAnnotation: { - type: 'GenericObjectTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getEnums', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'StringTypeAnnotation', - }, - params: [ - { - name: 'enumInt', - optional: false, - typeAnnotation: { - name: 'NumEnum', - type: 'EnumDeclaration', - memberType: 'NumberTypeAnnotation', - }, - }, - { - name: 'enumFloat', - optional: false, - typeAnnotation: { - name: 'FloatEnum', - type: 'EnumDeclaration', - memberType: 'NumberTypeAnnotation', - }, - }, - { - name: 'enumString', - optional: false, - typeAnnotation: { - name: 'StringEnum', - type: 'EnumDeclaration', - memberType: 'StringTypeAnnotation', - }, - }, - ], - }, - }, - ], - }, - moduleName: 'SampleTurboModule', - }, - }, -}; -const TWO_MODULES_DIFFERENT_FILES = { - modules: { - NativeSampleTurboModule: { - type: 'NativeModule', - aliasMap: {}, - enumMap: {}, - spec: { - properties: [ - { - name: 'voidFunc', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [], - }, - }, - ], - }, - moduleName: 'SampleTurboModule', - }, - NativeSampleTurboModule2: { - type: 'NativeModule', - aliasMap: {}, - enumMap: {}, - spec: { - properties: [ - { - name: 'getConstants', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [], - }, - params: [], - }, - }, - { - name: 'voidFunc', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [], - }, - }, - ], - }, - moduleName: 'SampleTurboModule2', - }, - }, -}; -const COMPLEX_OBJECTS = { - modules: { - NativeSampleTurboModule: { - type: 'NativeModule', - aliasMap: {}, - enumMap: {}, - spec: { - properties: [ - { - name: 'difficult', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'D', - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - { - optional: false, - name: 'E', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'F', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - ], - }, - params: [ - { - optional: false, - name: 'A', - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'D', - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - { - optional: false, - name: 'E', - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'D', - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - { - optional: false, - name: 'E', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'F', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: false, - name: 'id', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - { - optional: false, - name: 'F', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - ], - }, - }, - ], - }, - }, - { - name: 'optionals', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'A', - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: true, - name: 'optionalNumberProperty', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: true, - name: 'optionalArrayProperty', - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'NumberTypeAnnotation', - }, - }, - }, - { - optional: true, - name: 'optionalObjectProperty', - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'x', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'y', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - { - optional: true, - name: 'optionalGenericObjectProperty', - typeAnnotation: { - type: 'GenericObjectTypeAnnotation', - }, - }, - { - optional: true, - name: 'optionalBooleanTypeProperty', - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ], - }, - }, - ], - }, - }, - { - name: 'optionalMethod', - optional: true, - typeAnnotation: { - type: 'NullableTypeAnnotation', - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'options', - typeAnnotation: { - type: 'GenericObjectTypeAnnotation', - }, - }, - { - name: 'callback', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - params: [], - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - }, - }, - { - name: 'extras', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'key', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: false, - name: 'value', - typeAnnotation: { - type: 'GenericObjectTypeAnnotation', - }, - }, - ], - }, - }, - }, - ], - }, - }, - }, - { - name: 'getArrays', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'options', - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'arrayOfNumbers', - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'NumberTypeAnnotation', - }, - }, - }, - { - optional: true, - name: 'optionalArrayOfNumbers', - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'NumberTypeAnnotation', - }, - }, - }, - { - optional: false, - name: 'arrayOfStrings', - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'StringTypeAnnotation', - }, - }, - }, - { - optional: true, - name: 'optionalArrayOfStrings', - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'StringTypeAnnotation', - }, - }, - }, - { - optional: false, - name: 'arrayOfObjects', - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'numberProperty', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - }, - ], - }, - }, - ], - }, - }, - { - name: 'getNullableObject', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'NullableTypeAnnotation', - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [], - }, - }, - params: [], - }, - }, - { - name: 'getNullableGenericObject', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'NullableTypeAnnotation', - typeAnnotation: { - type: 'GenericObjectTypeAnnotation', - }, - }, - params: [], - }, - }, - { - name: 'getNullableArray', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'NullableTypeAnnotation', - typeAnnotation: { - type: 'ArrayTypeAnnotation', - }, - }, - params: [], - }, - }, - ], - }, - moduleName: 'SampleTurboModule', - }, - }, -}; -const NATIVE_MODULES_WITH_TYPE_ALIASES = { - modules: { - AliasTurboModule: { - type: 'NativeModule', - aliasMap: { - Options: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'offset', - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'x', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'y', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - { - optional: false, - name: 'size', - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'width', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'height', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - { - optional: true, - name: 'displaySize', - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'width', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'height', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - { - optional: true, - name: 'resizeMode', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: true, - name: 'allowExternalStorage', - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ], - }, - }, - enumMap: {}, - spec: { - properties: [ - { - name: 'getConstants', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [], - }, - params: [], - }, - }, - { - name: 'cropImage', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'cropData', - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'Options', - }, - }, - ], - }, - }, - ], - }, - moduleName: 'AliasTurboModule', - }, - }, -}; -const REAL_MODULE_EXAMPLE = { - modules: { - NativeCameraRollManager: { - type: 'NativeModule', - aliasMap: { - PhotoIdentifierImage: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'uri', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: false, - name: 'playableDuration', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'width', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'height', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: true, - name: 'isStored', - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - { - optional: false, - name: 'filename', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - ], - }, - PhotoIdentifier: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'node', - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'image', - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'PhotoIdentifierImage', - }, - }, - { - optional: false, - name: 'type', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: false, - name: 'group_name', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: false, - name: 'timestamp', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'location', - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'longitude', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'latitude', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: true, - name: 'altitude', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: true, - name: 'heading', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: true, - name: 'speed', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - ], - }, - }, - ], - }, - PhotoIdentifiersPage: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'edges', - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'TypeAliasTypeAnnotation', - name: 'PhotoIdentifier', - }, - }, - }, - { - optional: false, - name: 'page_info', - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'has_next_page', - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - { - optional: true, - name: 'start_cursor', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: true, - name: 'end_cursor', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - ], - }, - }, - ], - }, - GetPhotosParams: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'first', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: true, - name: 'after', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: true, - name: 'groupName', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: true, - name: 'groupTypes', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: true, - name: 'assetType', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: true, - name: 'maxSize', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: true, - name: 'mimeTypes', - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'StringTypeAnnotation', - }, - }, - }, - ], - }, - }, - enumMap: {}, - spec: { - properties: [ - { - name: 'getConstants', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [], - }, - params: [], - }, - }, - { - name: 'getPhotos', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'PromiseTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'params', - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'GetPhotosParams', - }, - }, - ], - }, - }, - { - name: 'saveToCameraRoll', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'PromiseTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'uri', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: false, - name: 'type', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'deletePhotos', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'PromiseTypeAnnotation', - }, - params: [ - { - name: 'assets', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'StringTypeAnnotation', - }, - }, - }, - ], - }, - }, - ], - }, - moduleName: 'CameraRollManager', - }, - NativeExceptionsManager: { - type: 'NativeModule', - aliasMap: { - StackFrame: { - properties: [ - { - optional: true, - name: 'column', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'file', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: true, - name: 'lineNumber', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'methodName', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: true, - name: 'collapse', - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ], - type: 'ObjectTypeAnnotation', - }, - ExceptionData: { - properties: [ - { - optional: false, - name: 'message', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: false, - name: 'originalMessage', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: false, - name: 'name', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: false, - name: 'componentStack', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: false, - name: 'stack', - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'TypeAliasTypeAnnotation', - name: 'StackFrame', - }, - }, - }, - { - optional: false, - name: 'id', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'isFatal', - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - { - optional: true, - name: 'extraData', - typeAnnotation: { - type: 'GenericObjectTypeAnnotation', - }, - }, - ], - type: 'ObjectTypeAnnotation', - }, - }, - enumMap: {}, - spec: { - properties: [ - { - name: 'reportFatalException', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'message', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - name: 'stack', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'TypeAliasTypeAnnotation', - name: 'StackFrame', - }, - }, - }, - { - optional: false, - name: 'exceptionId', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'reportSoftException', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'message', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - name: 'stack', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'TypeAliasTypeAnnotation', - name: 'StackFrame', - }, - }, - }, - { - optional: false, - name: 'exceptionId', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'reportException', - optional: true, - typeAnnotation: { - type: 'NullableTypeAnnotation', - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'data', - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'ExceptionData', - }, - }, - ], - }, - }, - }, - { - name: 'updateExceptionMessage', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'message', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - name: 'stack', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'TypeAliasTypeAnnotation', - name: 'StackFrame', - }, - }, - }, - { - optional: false, - name: 'exceptionId', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'dismissRedbox', - optional: true, - typeAnnotation: { - type: 'NullableTypeAnnotation', - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [], - }, - }, - }, - ], - }, - moduleName: 'ExceptionsManager', - }, - }, -}; -const CXX_ONLY_NATIVE_MODULES = { - modules: { - NativeSampleTurboModule: { - type: 'NativeModule', - aliasMap: { - ConstantsStruct: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'const1', - optional: false, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - { - name: 'const2', - optional: false, - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - name: 'const3', - optional: false, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - ], - }, - CustomHostObject: { - type: 'ObjectTypeAnnotation', - properties: [], - }, - BinaryTreeNode: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'left', - optional: true, - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'BinaryTreeNode', - }, - }, - { - name: 'value', - optional: false, - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - name: 'right', - optional: true, - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'BinaryTreeNode', - }, - }, - ], - }, - GraphNode: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'label', - optional: false, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - name: 'neighbors', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'TypeAliasTypeAnnotation', - name: 'GraphNode', - }, - }, - }, - ], - }, - ObjectStruct: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'a', - optional: false, - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - name: 'b', - optional: false, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - name: 'c', - optional: true, - typeAnnotation: { - type: 'NullableTypeAnnotation', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - }, - ], - }, - ValueStruct: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'x', - optional: false, - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - name: 'y', - optional: false, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - name: 'z', - optional: false, - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'ObjectStruct', - }, - }, - ], - }, - MenuItem: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'label', - optional: false, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - name: 'onPress', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [ - { - name: 'value', - optional: false, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - name: 'flag', - optional: false, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'shortcut', - optional: true, - typeAnnotation: { - type: 'NullableTypeAnnotation', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - }, - { - name: 'items', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'TypeAliasTypeAnnotation', - name: 'MenuItem', - }, - }, - }, - ], - }, - }, - enumMap: { - EnumInt: { - name: 'EnumInt', - type: 'EnumDeclarationWithMembers', - memberType: 'NumberTypeAnnotation', - members: [ - { - name: 'IA', - value: '23', - }, - { - name: 'IB', - value: '42', - }, - ], - }, - EnumFloat: { - name: 'EnumFloat', - type: 'EnumDeclarationWithMembers', - memberType: 'NumberTypeAnnotation', - members: [ - { - name: 'FA', - value: '1.23', - }, - { - name: 'FB', - value: '4.56', - }, - ], - }, - EnumNone: { - name: 'EnumNone', - type: 'EnumDeclarationWithMembers', - memberType: 'StringTypeAnnotation', - members: [ - { - name: 'NA', - value: 'NA', - }, - { - name: 'NB', - value: 'NB', - }, - ], - }, - EnumStr: { - name: 'EnumStr', - type: 'EnumDeclarationWithMembers', - memberType: 'StringTypeAnnotation', - members: [ - { - name: 'SA', - value: 's---a', - }, - { - name: 'SB', - value: 's---b', - }, - ], - }, - }, - spec: { - properties: [ - { - name: 'getArray', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'ArrayTypeAnnotation', - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getBool', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getConstants', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'ConstantsStruct', - }, - params: [], - }, - }, - { - name: 'getCustomEnum', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - name: 'EnumInt', - type: 'EnumDeclaration', - memberType: 'NumberTypeAnnotation', - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - name: 'EnumInt', - type: 'EnumDeclaration', - memberType: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getCustomHostObject', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'CustomHostObject', - }, - params: [], - }, - }, - { - name: 'consumeCustomHostObject', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'StringTypeAnnotation', - }, - params: [ - { - name: 'customHostObject', - optional: false, - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'CustomHostObject', - }, - }, - ], - }, - }, - { - name: 'getBinaryTreeNode', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'BinaryTreeNode', - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'BinaryTreeNode', - }, - }, - ], - }, - }, - { - name: 'getGraphNode', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'GraphNode', - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'GraphNode', - }, - }, - ], - }, - }, - { - name: 'getNumEnum', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - name: 'EnumFloat', - type: 'EnumDeclaration', - memberType: 'NumberTypeAnnotation', - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - name: 'EnumInt', - type: 'EnumDeclaration', - memberType: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getStrEnum', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - name: 'EnumStr', - type: 'EnumDeclaration', - memberType: 'StringTypeAnnotation', - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - name: 'EnumNone', - type: 'EnumDeclaration', - memberType: 'StringTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getMap', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'GenericObjectTypeAnnotation', - dictionaryValueType: { - type: 'NullableTypeAnnotation', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - type: 'GenericObjectTypeAnnotation', - dictionaryValueType: { - type: 'NullableTypeAnnotation', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - }, - }, - ], - }, - }, - { - name: 'getNumber', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'NumberTypeAnnotation', - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getObject', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'ObjectStruct', - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'ObjectStruct', - }, - }, - ], - }, - }, - { - name: 'getSet', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'NumberTypeAnnotation', - }, - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'NumberTypeAnnotation', - }, - }, - }, - ], - }, - }, - { - name: 'getString', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'StringTypeAnnotation', - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getUnion', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'StringTypeAnnotation', - }, - params: [ - { - name: 'x', - optional: false, - typeAnnotation: { - type: 'UnionTypeAnnotation', - memberType: 'NumberTypeAnnotation', - }, - }, - { - name: 'y', - optional: false, - typeAnnotation: { - type: 'UnionTypeAnnotation', - memberType: 'StringTypeAnnotation', - }, - }, - { - name: 'z', - optional: false, - typeAnnotation: { - type: 'UnionTypeAnnotation', - memberType: 'ObjectTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getValue', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'ValueStruct', - }, - params: [ - { - name: 'x', - optional: false, - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - name: 'y', - optional: false, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - name: 'z', - optional: false, - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'ObjectStruct', - }, - }, - ], - }, - }, - { - name: 'getValueWithCallback', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [ - { - name: 'callback', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [ - { - name: 'value', - optional: false, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - ], - }, - }, - ], - }, - }, - { - name: 'getValueWithPromise', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'PromiseTypeAnnotation', - elementType: { - type: 'StringTypeAnnotation', - }, - }, - params: [ - { - name: 'error', - optional: false, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getWithWithOptionalArgs', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'NullableTypeAnnotation', - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - params: [ - { - name: 'optionalArg', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'voidFunc', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [], - }, - }, - { - name: 'setMenu', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [ - { - name: 'menuItem', - optional: false, - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'MenuItem', - }, - }, - ], - }, - }, - { - name: 'emitCustomDeviceEvent', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [ - { - name: 'eventName', - optional: false, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'voidFuncThrows', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [], - }, - }, - { - name: 'getObjectThrows', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'ObjectStruct', - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'ObjectStruct', - }, - }, - ], - }, - }, - { - name: 'voidFuncAssert', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [], - }, - }, - { - name: 'getObjectAssert', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'ObjectStruct', - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'ObjectStruct', - }, - }, - ], - }, - }, - ], - }, - moduleName: 'SampleTurboModuleCxx', - excludedPlatforms: ['iOS', 'android'], - }, - }, -}; -const SAMPLE_WITH_UPPERCASE_NAME = { - modules: { - NativeSampleTurboModule: { - type: 'NativeModule', - enumMap: {}, - aliasMap: {}, - spec: { - properties: [], - }, - moduleName: 'SampleTurboModule', - }, - }, -}; -module.exports = { - complex_objects: COMPLEX_OBJECTS, - two_modules_different_files: TWO_MODULES_DIFFERENT_FILES, - empty_native_modules: EMPTY_NATIVE_MODULES, - simple_native_modules: SIMPLE_NATIVE_MODULES, - native_modules_with_type_aliases: NATIVE_MODULES_WITH_TYPE_ALIASES, - real_module_example: REAL_MODULE_EXAMPLE, - cxx_only_native_modules: CXX_ONLY_NATIVE_MODULES, - SampleWithUppercaseName: SAMPLE_WITH_UPPERCASE_NAME, -}; diff --git a/node_modules/@react-native/codegen/lib/generators/modules/__test_fixtures__/fixtures.js.flow b/node_modules/@react-native/codegen/lib/generators/modules/__test_fixtures__/fixtures.js.flow deleted file mode 100644 index 387126e40..000000000 --- a/node_modules/@react-native/codegen/lib/generators/modules/__test_fixtures__/fixtures.js.flow +++ /dev/null @@ -1,2433 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {SchemaType} from '../../../CodegenSchema.js'; - -const EMPTY_NATIVE_MODULES: SchemaType = { - modules: { - NativeSampleTurboModule: { - type: 'NativeModule', - aliasMap: {}, - enumMap: {}, - spec: { - properties: [], - }, - moduleName: 'SampleTurboModule', - }, - }, -}; - -const SIMPLE_NATIVE_MODULES: SchemaType = { - modules: { - NativeSampleTurboModule: { - type: 'NativeModule', - aliasMap: {}, - enumMap: { - NumEnum: { - type: 'EnumDeclarationWithMembers', - name: 'NumEnum', - memberType: 'NumberTypeAnnotation', - members: [ - { - name: 'ONE', - value: '1', - }, - { - name: 'TWO', - value: '2', - }, - ], - }, - FloatEnum: { - type: 'EnumDeclarationWithMembers', - name: 'FloatEnum', - memberType: 'NumberTypeAnnotation', - members: [ - { - name: 'POINT_ZERO', - value: '0.0', - }, - { - name: 'POINT_ONE', - value: '0.1', - }, - { - name: 'POINT_TWO', - value: '0.2', - }, - ], - }, - StringEnum: { - type: 'EnumDeclarationWithMembers', - name: 'StringEnum', - memberType: 'StringTypeAnnotation', - members: [ - { - name: 'HELLO', - value: 'hello', - }, - { - name: 'GoodBye', - value: 'goodbye', - }, - ], - }, - }, - spec: { - properties: [ - { - name: 'getConstants', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'const1', - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - { - optional: false, - name: 'const2', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'const3', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - ], - }, - params: [], - }, - }, - { - name: 'voidFunc', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [], - }, - }, - { - name: 'getBool', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'arg', - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getNumber', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'NumberTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'arg', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getString', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'StringTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'arg', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getArray', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'GenericObjectTypeAnnotation', - }, - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - - elementType: { - type: 'GenericObjectTypeAnnotation', - }, - }, - }, - ], - }, - }, - { - name: 'getObject', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'GenericObjectTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'arg', - typeAnnotation: { - type: 'GenericObjectTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getRootTag', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'ReservedTypeAnnotation', - name: 'RootTag', - }, - params: [ - { - optional: false, - name: 'arg', - typeAnnotation: { - type: 'ReservedTypeAnnotation', - name: 'RootTag', - }, - }, - ], - }, - }, - { - name: 'getValue', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'GenericObjectTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'x', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'y', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: false, - name: 'z', - typeAnnotation: { - type: 'GenericObjectTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getEnumReturn', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'EnumDeclaration', - name: 'NumEnum', - memberType: 'NumberTypeAnnotation', - }, - params: [], - }, - }, - { - name: 'getValueWithCallback', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [ - { - name: 'callback', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - params: [], - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - }, - }, - ], - }, - }, - { - name: 'getValueWithPromise', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'PromiseTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'error', - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getValueWithOptionalArg', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'PromiseTypeAnnotation', - }, - params: [ - { - optional: true, - name: 'parameter', - typeAnnotation: { - type: 'GenericObjectTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getEnums', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'StringTypeAnnotation', - }, - params: [ - { - name: 'enumInt', - optional: false, - typeAnnotation: { - name: 'NumEnum', - type: 'EnumDeclaration', - memberType: 'NumberTypeAnnotation', - }, - }, - { - name: 'enumFloat', - optional: false, - typeAnnotation: { - name: 'FloatEnum', - type: 'EnumDeclaration', - memberType: 'NumberTypeAnnotation', - }, - }, - { - name: 'enumString', - optional: false, - typeAnnotation: { - name: 'StringEnum', - type: 'EnumDeclaration', - memberType: 'StringTypeAnnotation', - }, - }, - ], - }, - }, - ], - }, - moduleName: 'SampleTurboModule', - }, - }, -}; - -const TWO_MODULES_DIFFERENT_FILES: SchemaType = { - modules: { - NativeSampleTurboModule: { - type: 'NativeModule', - aliasMap: {}, - enumMap: {}, - spec: { - properties: [ - { - name: 'voidFunc', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [], - }, - }, - ], - }, - moduleName: 'SampleTurboModule', - }, - NativeSampleTurboModule2: { - type: 'NativeModule', - aliasMap: {}, - enumMap: {}, - spec: { - properties: [ - { - name: 'getConstants', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [], - }, - params: [], - }, - }, - { - name: 'voidFunc', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [], - }, - }, - ], - }, - moduleName: 'SampleTurboModule2', - }, - }, -}; - -const COMPLEX_OBJECTS: SchemaType = { - modules: { - NativeSampleTurboModule: { - type: 'NativeModule', - aliasMap: {}, - enumMap: {}, - spec: { - properties: [ - { - name: 'difficult', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'D', - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - { - optional: false, - name: 'E', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'F', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - ], - }, - params: [ - { - optional: false, - name: 'A', - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'D', - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - { - optional: false, - name: 'E', - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'D', - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - { - optional: false, - name: 'E', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'F', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: false, - name: 'id', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - { - optional: false, - name: 'F', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - ], - }, - }, - ], - }, - }, - { - name: 'optionals', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'A', - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: true, - name: 'optionalNumberProperty', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: true, - name: 'optionalArrayProperty', - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'NumberTypeAnnotation', - }, - }, - }, - { - optional: true, - name: 'optionalObjectProperty', - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'x', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'y', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - { - optional: true, - name: 'optionalGenericObjectProperty', - typeAnnotation: { - type: 'GenericObjectTypeAnnotation', - }, - }, - { - optional: true, - name: 'optionalBooleanTypeProperty', - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ], - }, - }, - ], - }, - }, - { - name: 'optionalMethod', - optional: true, - typeAnnotation: { - type: 'NullableTypeAnnotation', - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'options', - typeAnnotation: { - type: 'GenericObjectTypeAnnotation', - }, - }, - { - name: 'callback', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - params: [], - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - }, - }, - { - name: 'extras', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'key', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: false, - name: 'value', - typeAnnotation: { - type: 'GenericObjectTypeAnnotation', - }, - }, - ], - }, - }, - }, - ], - }, - }, - }, - { - name: 'getArrays', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'options', - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'arrayOfNumbers', - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'NumberTypeAnnotation', - }, - }, - }, - { - optional: true, - name: 'optionalArrayOfNumbers', - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'NumberTypeAnnotation', - }, - }, - }, - { - optional: false, - name: 'arrayOfStrings', - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'StringTypeAnnotation', - }, - }, - }, - { - optional: true, - name: 'optionalArrayOfStrings', - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'StringTypeAnnotation', - }, - }, - }, - { - optional: false, - name: 'arrayOfObjects', - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'numberProperty', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - }, - ], - }, - }, - ], - }, - }, - { - name: 'getNullableObject', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'NullableTypeAnnotation', - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [], - }, - }, - params: [], - }, - }, - { - name: 'getNullableGenericObject', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'NullableTypeAnnotation', - typeAnnotation: { - type: 'GenericObjectTypeAnnotation', - }, - }, - params: [], - }, - }, - { - name: 'getNullableArray', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'NullableTypeAnnotation', - typeAnnotation: { - type: 'ArrayTypeAnnotation', - }, - }, - params: [], - }, - }, - ], - }, - moduleName: 'SampleTurboModule', - }, - }, -}; - -const NATIVE_MODULES_WITH_TYPE_ALIASES: SchemaType = { - modules: { - AliasTurboModule: { - type: 'NativeModule', - aliasMap: { - Options: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'offset', - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'x', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'y', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - { - optional: false, - name: 'size', - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'width', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'height', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - { - optional: true, - name: 'displaySize', - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'width', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'height', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - { - optional: true, - name: 'resizeMode', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: true, - name: 'allowExternalStorage', - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ], - }, - }, - enumMap: {}, - spec: { - properties: [ - { - name: 'getConstants', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [], - }, - params: [], - }, - }, - { - name: 'cropImage', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'cropData', - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'Options', - }, - }, - ], - }, - }, - ], - }, - moduleName: 'AliasTurboModule', - }, - }, -}; - -const REAL_MODULE_EXAMPLE: SchemaType = { - modules: { - NativeCameraRollManager: { - type: 'NativeModule', - aliasMap: { - PhotoIdentifierImage: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'uri', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: false, - name: 'playableDuration', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'width', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'height', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: true, - name: 'isStored', - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - { - optional: false, - name: 'filename', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - ], - }, - PhotoIdentifier: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'node', - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'image', - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'PhotoIdentifierImage', - }, - }, - { - optional: false, - name: 'type', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: false, - name: 'group_name', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: false, - name: 'timestamp', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'location', - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'longitude', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'latitude', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: true, - name: 'altitude', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: true, - name: 'heading', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: true, - name: 'speed', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - ], - }, - }, - ], - }, - PhotoIdentifiersPage: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'edges', - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'TypeAliasTypeAnnotation', - name: 'PhotoIdentifier', - }, - }, - }, - { - optional: false, - name: 'page_info', - typeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'has_next_page', - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - { - optional: true, - name: 'start_cursor', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: true, - name: 'end_cursor', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - ], - }, - }, - ], - }, - GetPhotosParams: { - type: 'ObjectTypeAnnotation', - properties: [ - { - optional: false, - name: 'first', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: true, - name: 'after', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: true, - name: 'groupName', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: true, - name: 'groupTypes', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: true, - name: 'assetType', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: true, - name: 'maxSize', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: true, - name: 'mimeTypes', - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'StringTypeAnnotation', - }, - }, - }, - ], - }, - }, - enumMap: {}, - spec: { - properties: [ - { - name: 'getConstants', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'ObjectTypeAnnotation', - properties: [], - }, - params: [], - }, - }, - { - name: 'getPhotos', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'PromiseTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'params', - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'GetPhotosParams', - }, - }, - ], - }, - }, - { - name: 'saveToCameraRoll', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'PromiseTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'uri', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: false, - name: 'type', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'deletePhotos', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'PromiseTypeAnnotation', - }, - params: [ - { - name: 'assets', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'StringTypeAnnotation', - }, - }, - }, - ], - }, - }, - ], - }, - moduleName: 'CameraRollManager', - }, - NativeExceptionsManager: { - type: 'NativeModule', - aliasMap: { - StackFrame: { - properties: [ - { - optional: true, - name: 'column', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'file', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: true, - name: 'lineNumber', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'methodName', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: true, - name: 'collapse', - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ], - type: 'ObjectTypeAnnotation', - }, - ExceptionData: { - properties: [ - { - optional: false, - name: 'message', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: false, - name: 'originalMessage', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: false, - name: 'name', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: false, - name: 'componentStack', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - optional: false, - name: 'stack', - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'TypeAliasTypeAnnotation', - name: 'StackFrame', - }, - }, - }, - { - optional: false, - name: 'id', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - optional: false, - name: 'isFatal', - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - { - optional: true, - name: 'extraData', - typeAnnotation: { - type: 'GenericObjectTypeAnnotation', - }, - }, - ], - type: 'ObjectTypeAnnotation', - }, - }, - enumMap: {}, - spec: { - properties: [ - { - name: 'reportFatalException', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'message', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - name: 'stack', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'TypeAliasTypeAnnotation', - name: 'StackFrame', - }, - }, - }, - { - optional: false, - name: 'exceptionId', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'reportSoftException', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'message', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - name: 'stack', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'TypeAliasTypeAnnotation', - name: 'StackFrame', - }, - }, - }, - { - optional: false, - name: 'exceptionId', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'reportException', - optional: true, - typeAnnotation: { - type: 'NullableTypeAnnotation', - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'data', - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'ExceptionData', - }, - }, - ], - }, - }, - }, - { - name: 'updateExceptionMessage', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [ - { - optional: false, - name: 'message', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - name: 'stack', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'TypeAliasTypeAnnotation', - name: 'StackFrame', - }, - }, - }, - { - optional: false, - name: 'exceptionId', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'dismissRedbox', - optional: true, - typeAnnotation: { - type: 'NullableTypeAnnotation', - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [], - }, - }, - }, - ], - }, - moduleName: 'ExceptionsManager', - }, - }, -}; - -const CXX_ONLY_NATIVE_MODULES: SchemaType = { - modules: { - NativeSampleTurboModule: { - type: 'NativeModule', - aliasMap: { - ConstantsStruct: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'const1', - optional: false, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - { - name: 'const2', - optional: false, - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - name: 'const3', - optional: false, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - ], - }, - CustomHostObject: { - type: 'ObjectTypeAnnotation', - properties: [], - }, - BinaryTreeNode: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'left', - optional: true, - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'BinaryTreeNode', - }, - }, - { - name: 'value', - optional: false, - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - name: 'right', - optional: true, - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'BinaryTreeNode', - }, - }, - ], - }, - GraphNode: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'label', - optional: false, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - name: 'neighbors', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'TypeAliasTypeAnnotation', - name: 'GraphNode', - }, - }, - }, - ], - }, - ObjectStruct: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'a', - optional: false, - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - name: 'b', - optional: false, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - name: 'c', - optional: true, - typeAnnotation: { - type: 'NullableTypeAnnotation', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - }, - ], - }, - ValueStruct: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'x', - optional: false, - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - name: 'y', - optional: false, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - name: 'z', - optional: false, - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'ObjectStruct', - }, - }, - ], - }, - MenuItem: { - type: 'ObjectTypeAnnotation', - properties: [ - { - name: 'label', - optional: false, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - name: 'onPress', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [ - { - name: 'value', - optional: false, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - name: 'flag', - optional: false, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'shortcut', - optional: true, - typeAnnotation: { - type: 'NullableTypeAnnotation', - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - }, - { - name: 'items', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'TypeAliasTypeAnnotation', - name: 'MenuItem', - }, - }, - }, - ], - }, - }, - enumMap: { - EnumInt: { - name: 'EnumInt', - type: 'EnumDeclarationWithMembers', - memberType: 'NumberTypeAnnotation', - members: [ - { - name: 'IA', - value: '23', - }, - { - name: 'IB', - value: '42', - }, - ], - }, - EnumFloat: { - name: 'EnumFloat', - type: 'EnumDeclarationWithMembers', - memberType: 'NumberTypeAnnotation', - members: [ - { - name: 'FA', - value: '1.23', - }, - { - name: 'FB', - value: '4.56', - }, - ], - }, - EnumNone: { - name: 'EnumNone', - type: 'EnumDeclarationWithMembers', - memberType: 'StringTypeAnnotation', - members: [ - { - name: 'NA', - value: 'NA', - }, - { - name: 'NB', - value: 'NB', - }, - ], - }, - EnumStr: { - name: 'EnumStr', - type: 'EnumDeclarationWithMembers', - memberType: 'StringTypeAnnotation', - members: [ - { - name: 'SA', - value: 's---a', - }, - { - name: 'SB', - value: 's---b', - }, - ], - }, - }, - spec: { - properties: [ - { - name: 'getArray', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'ArrayTypeAnnotation', - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getBool', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getConstants', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'ConstantsStruct', - }, - params: [], - }, - }, - { - name: 'getCustomEnum', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - name: 'EnumInt', - type: 'EnumDeclaration', - memberType: 'NumberTypeAnnotation', - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - name: 'EnumInt', - type: 'EnumDeclaration', - memberType: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getCustomHostObject', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'CustomHostObject', - }, - params: [], - }, - }, - { - name: 'consumeCustomHostObject', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'StringTypeAnnotation', - }, - params: [ - { - name: 'customHostObject', - optional: false, - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'CustomHostObject', - }, - }, - ], - }, - }, - { - name: 'getBinaryTreeNode', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'BinaryTreeNode', - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'BinaryTreeNode', - }, - }, - ], - }, - }, - { - name: 'getGraphNode', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'GraphNode', - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'GraphNode', - }, - }, - ], - }, - }, - { - name: 'getNumEnum', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - name: 'EnumFloat', - type: 'EnumDeclaration', - memberType: 'NumberTypeAnnotation', - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - name: 'EnumInt', - type: 'EnumDeclaration', - memberType: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getStrEnum', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - name: 'EnumStr', - type: 'EnumDeclaration', - memberType: 'StringTypeAnnotation', - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - name: 'EnumNone', - type: 'EnumDeclaration', - memberType: 'StringTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getMap', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'GenericObjectTypeAnnotation', - dictionaryValueType: { - type: 'NullableTypeAnnotation', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - type: 'GenericObjectTypeAnnotation', - dictionaryValueType: { - type: 'NullableTypeAnnotation', - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - }, - }, - ], - }, - }, - { - name: 'getNumber', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'NumberTypeAnnotation', - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getObject', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'ObjectStruct', - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'ObjectStruct', - }, - }, - ], - }, - }, - { - name: 'getSet', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'NumberTypeAnnotation', - }, - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'NumberTypeAnnotation', - }, - }, - }, - ], - }, - }, - { - name: 'getString', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'StringTypeAnnotation', - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getUnion', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'StringTypeAnnotation', - }, - params: [ - { - name: 'x', - optional: false, - typeAnnotation: { - type: 'UnionTypeAnnotation', - memberType: 'NumberTypeAnnotation', - }, - }, - { - name: 'y', - optional: false, - typeAnnotation: { - type: 'UnionTypeAnnotation', - memberType: 'StringTypeAnnotation', - }, - }, - { - name: 'z', - optional: false, - typeAnnotation: { - type: 'UnionTypeAnnotation', - memberType: 'ObjectTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getValue', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'ValueStruct', - }, - params: [ - { - name: 'x', - optional: false, - typeAnnotation: { - type: 'NumberTypeAnnotation', - }, - }, - { - name: 'y', - optional: false, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - name: 'z', - optional: false, - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'ObjectStruct', - }, - }, - ], - }, - }, - { - name: 'getValueWithCallback', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [ - { - name: 'callback', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [ - { - name: 'value', - optional: false, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - ], - }, - }, - ], - }, - }, - { - name: 'getValueWithPromise', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'PromiseTypeAnnotation', - elementType: { - type: 'StringTypeAnnotation', - }, - }, - params: [ - { - name: 'error', - optional: false, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'getWithWithOptionalArgs', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'NullableTypeAnnotation', - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - params: [ - { - name: 'optionalArg', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'voidFunc', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [], - }, - }, - { - name: 'setMenu', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [ - { - name: 'menuItem', - optional: false, - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'MenuItem', - }, - }, - ], - }, - }, - { - name: 'emitCustomDeviceEvent', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [ - { - name: 'eventName', - optional: false, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - ], - }, - }, - { - name: 'voidFuncThrows', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [], - }, - }, - - { - name: 'getObjectThrows', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'ObjectStruct', - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'ObjectStruct', - }, - }, - ], - }, - }, - { - name: 'voidFuncAssert', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - params: [], - }, - }, - { - name: 'getObjectAssert', - optional: false, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'ObjectStruct', - }, - params: [ - { - name: 'arg', - optional: false, - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: 'ObjectStruct', - }, - }, - ], - }, - }, - ], - }, - moduleName: 'SampleTurboModuleCxx', - excludedPlatforms: ['iOS', 'android'], - }, - }, -}; - -const SAMPLE_WITH_UPPERCASE_NAME: SchemaType = { - modules: { - NativeSampleTurboModule: { - type: 'NativeModule', - enumMap: {}, - aliasMap: {}, - spec: { - properties: [], - }, - moduleName: 'SampleTurboModule', - }, - }, -}; - -module.exports = { - complex_objects: COMPLEX_OBJECTS, - two_modules_different_files: TWO_MODULES_DIFFERENT_FILES, - empty_native_modules: EMPTY_NATIVE_MODULES, - simple_native_modules: SIMPLE_NATIVE_MODULES, - native_modules_with_type_aliases: NATIVE_MODULES_WITH_TYPE_ALIASES, - real_module_example: REAL_MODULE_EXAMPLE, - cxx_only_native_modules: CXX_ONLY_NATIVE_MODULES, - SampleWithUppercaseName: SAMPLE_WITH_UPPERCASE_NAME, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/consistency/compareSnaps.js b/node_modules/@react-native/codegen/lib/parsers/consistency/compareSnaps.js deleted file mode 100644 index 0e549003c..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/consistency/compareSnaps.js +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @oncall react_native - */ - -'use strict'; - -function compareSnaps( - flowFixtures, - flowSnaps, - flowExtraCases, - tsFixtures, - tsSnaps, - tsExtraCases, - ignoredCases, -) { - const flowCases = Object.keys(flowFixtures).sort(); - const tsCases = Object.keys(tsFixtures).sort(); - const commonCases = flowCases.filter(name => tsCases.indexOf(name) !== -1); - describe('RN Codegen Parsers', () => { - it('should not unintentionally contains test case for Flow but not for TypeScript', () => { - expect( - flowCases.filter(name => commonCases.indexOf(name) === -1), - ).toEqual(flowExtraCases); - }); - it('should not unintentionally contains test case for TypeScript but not for Flow', () => { - expect(tsCases.filter(name => commonCases.indexOf(name) === -1)).toEqual( - tsExtraCases, - ); - }); - for (const commonCase of commonCases) { - const flowSnap = - flowSnaps[ - `RN Codegen Flow Parser can generate fixture ${commonCase} 1` - ]; - const tsSnap = - tsSnaps[ - `RN Codegen TypeScript Parser can generate fixture ${commonCase} 1` - ]; - it(`should be able to find the snapshot for Flow for case ${commonCase}`, () => { - expect(typeof flowSnap).toEqual('string'); - }); - it(`should be able to find the snapshot for TypeScript for case ${commonCase}`, () => { - expect(typeof tsSnap).toEqual('string'); - }); - if (ignoredCases.indexOf(commonCase) === -1) { - it(`should generate the same snapshot from Flow and TypeScript for fixture ${commonCase}`, () => { - expect(flowSnap).toEqual(tsSnap); - }); - } else { - it(`should generate the different snapshot from Flow and TypeScript for fixture ${commonCase}`, () => { - expect(flowSnap).not.toEqual(tsSnap); - }); - } - } - }); -} -function compareTsArraySnaps(tsSnaps, tsExtraCases) { - for (const array2Case of tsExtraCases.filter( - name => name.indexOf('ARRAY2') !== -1, - )) { - const arrayCase = array2Case.replace('ARRAY2', 'ARRAY'); - it(`should generate the same snap from fixture ${arrayCase} and ${array2Case}`, () => { - expect( - tsSnaps[ - `RN Codegen TypeScript Parser can generate fixture ${arrayCase}` - ], - ).toEqual( - tsSnaps[ - `RN Codegen TypeScript Parser can generate fixture ${array2Case}` - ], - ); - }); - } -} -module.exports = { - compareSnaps, - compareTsArraySnaps, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/error-utils.js b/node_modules/@react-native/codegen/lib/parsers/error-utils.js deleted file mode 100644 index 142ae4ccf..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/error-utils.js +++ /dev/null @@ -1,345 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('./errors'), - IncorrectModuleRegistryCallArgumentTypeParserError = - _require.IncorrectModuleRegistryCallArgumentTypeParserError, - IncorrectModuleRegistryCallArityParserError = - _require.IncorrectModuleRegistryCallArityParserError, - IncorrectModuleRegistryCallTypeParameterParserError = - _require.IncorrectModuleRegistryCallTypeParameterParserError, - MisnamedModuleInterfaceParserError = - _require.MisnamedModuleInterfaceParserError, - ModuleInterfaceNotFoundParserError = - _require.ModuleInterfaceNotFoundParserError, - MoreThanOneModuleInterfaceParserError = - _require.MoreThanOneModuleInterfaceParserError, - MoreThanOneModuleRegistryCallsParserError = - _require.MoreThanOneModuleRegistryCallsParserError, - UnsupportedArrayElementTypeAnnotationParserError = - _require.UnsupportedArrayElementTypeAnnotationParserError, - UnsupportedFunctionParamTypeAnnotationParserError = - _require.UnsupportedFunctionParamTypeAnnotationParserError, - UnsupportedFunctionReturnTypeAnnotationParserError = - _require.UnsupportedFunctionReturnTypeAnnotationParserError, - UnsupportedModulePropertyParserError = - _require.UnsupportedModulePropertyParserError, - UnsupportedObjectPropertyValueTypeAnnotationParserError = - _require.UnsupportedObjectPropertyValueTypeAnnotationParserError, - UntypedModuleRegistryCallParserError = - _require.UntypedModuleRegistryCallParserError, - UnusedModuleInterfaceParserError = _require.UnusedModuleInterfaceParserError; -function throwIfModuleInterfaceIsMisnamed( - nativeModuleName, - moduleSpecId, - parserType, -) { - if (moduleSpecId.name !== 'Spec') { - throw new MisnamedModuleInterfaceParserError( - nativeModuleName, - moduleSpecId, - parserType, - ); - } -} -function throwIfModuleInterfaceNotFound( - numberOfModuleSpecs, - nativeModuleName, - ast, - parserType, -) { - if (numberOfModuleSpecs === 0) { - throw new ModuleInterfaceNotFoundParserError( - nativeModuleName, - ast, - parserType, - ); - } -} -function throwIfMoreThanOneModuleRegistryCalls( - hasteModuleName, - callExpressions, - callExpressionsLength, -) { - if (callExpressions.length > 1) { - throw new MoreThanOneModuleRegistryCallsParserError( - hasteModuleName, - callExpressions, - callExpressionsLength, - ); - } -} -function throwIfUnusedModuleInterfaceParserError( - nativeModuleName, - moduleSpec, - callExpressions, -) { - if (callExpressions.length === 0) { - throw new UnusedModuleInterfaceParserError(nativeModuleName, moduleSpec); - } -} -function throwIfWrongNumberOfCallExpressionArgs( - nativeModuleName, - flowCallExpression, - methodName, - numberOfCallExpressionArgs, -) { - if (numberOfCallExpressionArgs !== 1) { - throw new IncorrectModuleRegistryCallArityParserError( - nativeModuleName, - flowCallExpression, - methodName, - numberOfCallExpressionArgs, - ); - } -} -function throwIfIncorrectModuleRegistryCallTypeParameterParserError( - nativeModuleName, - typeArguments, - methodName, - moduleName, - parser, -) { - function throwError() { - throw new IncorrectModuleRegistryCallTypeParameterParserError( - nativeModuleName, - typeArguments, - methodName, - moduleName, - ); - } - if (parser.checkIfInvalidModule(typeArguments)) { - throwError(); - } -} -function throwIfUnsupportedFunctionReturnTypeAnnotationParserError( - nativeModuleName, - returnTypeAnnotation, - invalidReturnType, - cxxOnly, - returnType, -) { - if (!cxxOnly && returnType === 'FunctionTypeAnnotation') { - throw new UnsupportedFunctionReturnTypeAnnotationParserError( - nativeModuleName, - returnTypeAnnotation.returnType, - 'FunctionTypeAnnotation', - ); - } -} -function throwIfUntypedModule( - typeArguments, - hasteModuleName, - callExpression, - methodName, - moduleName, -) { - if (typeArguments == null) { - throw new UntypedModuleRegistryCallParserError( - hasteModuleName, - callExpression, - methodName, - moduleName, - ); - } -} -function throwIfModuleTypeIsUnsupported( - nativeModuleName, - propertyValue, - propertyName, - propertyValueType, - parser, -) { - if (!parser.functionTypeAnnotation(propertyValueType)) { - throw new UnsupportedModulePropertyParserError( - nativeModuleName, - propertyValue, - propertyName, - propertyValueType, - parser.language(), - ); - } -} -const UnsupportedObjectPropertyTypeToInvalidPropertyValueTypeMap = { - FunctionTypeAnnotation: 'FunctionTypeAnnotation', - VoidTypeAnnotation: 'void', - PromiseTypeAnnotation: 'Promise', -}; -function throwIfPropertyValueTypeIsUnsupported( - moduleName, - propertyValue, - propertyKey, - type, -) { - const invalidPropertyValueType = - UnsupportedObjectPropertyTypeToInvalidPropertyValueTypeMap[type]; - throw new UnsupportedObjectPropertyValueTypeAnnotationParserError( - moduleName, - propertyValue, - propertyKey, - invalidPropertyValueType, - ); -} -function throwIfMoreThanOneModuleInterfaceParserError( - nativeModuleName, - moduleSpecs, - parserType, -) { - if (moduleSpecs.length > 1) { - throw new MoreThanOneModuleInterfaceParserError( - nativeModuleName, - moduleSpecs, - moduleSpecs.map(node => node.id.name), - parserType, - ); - } -} -function throwIfUnsupportedFunctionParamTypeAnnotationParserError( - nativeModuleName, - languageParamTypeAnnotation, - paramName, - paramTypeAnnotationType, -) { - throw new UnsupportedFunctionParamTypeAnnotationParserError( - nativeModuleName, - languageParamTypeAnnotation, - paramName, - paramTypeAnnotationType, - ); -} -function throwIfArrayElementTypeAnnotationIsUnsupported( - hasteModuleName, - flowElementType, - flowArrayType, - type, -) { - const TypeMap = { - FunctionTypeAnnotation: 'FunctionTypeAnnotation', - VoidTypeAnnotation: 'void', - PromiseTypeAnnotation: 'Promise', - // TODO: Added as a work-around for now until TupleTypeAnnotation are fully supported in both flow and TS - // Right now they are partially treated as UnionTypeAnnotation - UnionTypeAnnotation: 'UnionTypeAnnotation', - }; - if (type in TypeMap) { - throw new UnsupportedArrayElementTypeAnnotationParserError( - hasteModuleName, - flowElementType, - flowArrayType, - TypeMap[type], - ); - } -} -function throwIfIncorrectModuleRegistryCallArgument( - nativeModuleName, - callExpressionArg, - methodName, -) { - if ( - callExpressionArg.type !== 'StringLiteral' && - callExpressionArg.type !== 'Literal' - ) { - const type = callExpressionArg.type; - throw new IncorrectModuleRegistryCallArgumentTypeParserError( - nativeModuleName, - callExpressionArg, - methodName, - type, - ); - } -} -function throwIfPartialNotAnnotatingTypeParameter( - typeAnnotation, - types, - parser, -) { - const annotatedElement = parser.extractAnnotatedElement( - typeAnnotation, - types, - ); - if (!annotatedElement) { - throw new Error('Partials only support annotating a type parameter.'); - } -} -function throwIfPartialWithMoreParameter(typeAnnotation) { - if (typeAnnotation.typeParameters.params.length !== 1) { - throw new Error('Partials only support annotating exactly one parameter.'); - } -} -function throwIfMoreThanOneCodegenNativecommands(commandsTypeNames) { - if (commandsTypeNames.length > 1) { - throw new Error('codegenNativeCommands may only be called once in a file'); - } -} -function throwIfConfigNotfound(foundConfigs) { - if (foundConfigs.length === 0) { - throw new Error('Could not find component config for native component'); - } -} -function throwIfMoreThanOneConfig(foundConfigs) { - if (foundConfigs.length > 1) { - throw new Error('Only one component is supported per file'); - } -} -function throwIfEventHasNoName(typeAnnotation, parser) { - const name = - parser.language() === 'Flow' ? typeAnnotation.id : typeAnnotation.typeName; - if (!name) { - throw new Error("typeAnnotation of event doesn't have a name"); - } -} -function throwIfBubblingTypeIsNull(bubblingType, eventName) { - if (!bubblingType) { - throw new Error( - `Unable to determine event bubbling type for "${eventName}"`, - ); - } - return bubblingType; -} -function throwIfArgumentPropsAreNull(argumentProps, eventName) { - if (!argumentProps) { - throw new Error(`Unable to determine event arguments for "${eventName}"`); - } - return argumentProps; -} -function throwIfTypeAliasIsNotInterface(typeAlias, parser) { - if (typeAlias.type !== parser.interfaceDeclaration) { - throw new Error( - `The type argument for codegenNativeCommands must be an interface, received ${typeAlias.type}`, - ); - } -} -module.exports = { - throwIfModuleInterfaceIsMisnamed, - throwIfUnsupportedFunctionReturnTypeAnnotationParserError, - throwIfModuleInterfaceNotFound, - throwIfMoreThanOneModuleRegistryCalls, - throwIfPropertyValueTypeIsUnsupported, - throwIfUnusedModuleInterfaceParserError, - throwIfWrongNumberOfCallExpressionArgs, - throwIfIncorrectModuleRegistryCallTypeParameterParserError, - throwIfUntypedModule, - throwIfModuleTypeIsUnsupported, - throwIfMoreThanOneModuleInterfaceParserError, - throwIfUnsupportedFunctionParamTypeAnnotationParserError, - throwIfArrayElementTypeAnnotationIsUnsupported, - throwIfIncorrectModuleRegistryCallArgument, - throwIfPartialNotAnnotatingTypeParameter, - throwIfPartialWithMoreParameter, - throwIfMoreThanOneCodegenNativecommands, - throwIfConfigNotfound, - throwIfMoreThanOneConfig, - throwIfEventHasNoName, - throwIfBubblingTypeIsNull, - throwIfArgumentPropsAreNull, - throwIfTypeAliasIsNotInterface, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/error-utils.js.flow b/node_modules/@react-native/codegen/lib/parsers/error-utils.js.flow deleted file mode 100644 index eb11370bd..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/error-utils.js.flow +++ /dev/null @@ -1,378 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type {NativeModuleTypeAnnotation} from '../CodegenSchema'; -import type {TypeDeclarationMap} from '../parsers/utils'; -import type {ParserType} from './errors'; -import type {Parser} from './parser'; - -const { - IncorrectModuleRegistryCallArgumentTypeParserError, - IncorrectModuleRegistryCallArityParserError, - IncorrectModuleRegistryCallTypeParameterParserError, - MisnamedModuleInterfaceParserError, - ModuleInterfaceNotFoundParserError, - MoreThanOneModuleInterfaceParserError, - MoreThanOneModuleRegistryCallsParserError, - UnsupportedArrayElementTypeAnnotationParserError, - UnsupportedFunctionParamTypeAnnotationParserError, - UnsupportedFunctionReturnTypeAnnotationParserError, - UnsupportedModulePropertyParserError, - UnsupportedObjectPropertyValueTypeAnnotationParserError, - UntypedModuleRegistryCallParserError, - UnusedModuleInterfaceParserError, -} = require('./errors'); - -function throwIfModuleInterfaceIsMisnamed( - nativeModuleName: string, - moduleSpecId: $FlowFixMe, - parserType: ParserType, -) { - if (moduleSpecId.name !== 'Spec') { - throw new MisnamedModuleInterfaceParserError( - nativeModuleName, - moduleSpecId, - parserType, - ); - } -} - -function throwIfModuleInterfaceNotFound( - numberOfModuleSpecs: number, - nativeModuleName: string, - ast: $FlowFixMe, - parserType: ParserType, -) { - if (numberOfModuleSpecs === 0) { - throw new ModuleInterfaceNotFoundParserError( - nativeModuleName, - ast, - parserType, - ); - } -} - -function throwIfMoreThanOneModuleRegistryCalls( - hasteModuleName: string, - callExpressions: $FlowFixMe, - callExpressionsLength: number, -) { - if (callExpressions.length > 1) { - throw new MoreThanOneModuleRegistryCallsParserError( - hasteModuleName, - callExpressions, - callExpressionsLength, - ); - } -} - -function throwIfUnusedModuleInterfaceParserError( - nativeModuleName: string, - moduleSpec: $FlowFixMe, - callExpressions: $FlowFixMe, -) { - if (callExpressions.length === 0) { - throw new UnusedModuleInterfaceParserError(nativeModuleName, moduleSpec); - } -} - -function throwIfWrongNumberOfCallExpressionArgs( - nativeModuleName: string, - flowCallExpression: $FlowFixMe, - methodName: string, - numberOfCallExpressionArgs: number, -) { - if (numberOfCallExpressionArgs !== 1) { - throw new IncorrectModuleRegistryCallArityParserError( - nativeModuleName, - flowCallExpression, - methodName, - numberOfCallExpressionArgs, - ); - } -} - -function throwIfIncorrectModuleRegistryCallTypeParameterParserError( - nativeModuleName: string, - typeArguments: $FlowFixMe, - methodName: string, - moduleName: string, - parser: Parser, -) { - function throwError() { - throw new IncorrectModuleRegistryCallTypeParameterParserError( - nativeModuleName, - typeArguments, - methodName, - moduleName, - ); - } - - if (parser.checkIfInvalidModule(typeArguments)) { - throwError(); - } -} - -function throwIfUnsupportedFunctionReturnTypeAnnotationParserError( - nativeModuleName: string, - returnTypeAnnotation: $FlowFixMe, - invalidReturnType: string, - cxxOnly: boolean, - returnType: string, -) { - if (!cxxOnly && returnType === 'FunctionTypeAnnotation') { - throw new UnsupportedFunctionReturnTypeAnnotationParserError( - nativeModuleName, - returnTypeAnnotation.returnType, - 'FunctionTypeAnnotation', - ); - } -} - -function throwIfUntypedModule( - typeArguments: $FlowFixMe, - hasteModuleName: string, - callExpression: $FlowFixMe, - methodName: string, - moduleName: string, -) { - if (typeArguments == null) { - throw new UntypedModuleRegistryCallParserError( - hasteModuleName, - callExpression, - methodName, - moduleName, - ); - } -} - -function throwIfModuleTypeIsUnsupported( - nativeModuleName: string, - propertyValue: $FlowFixMe, - propertyName: string, - propertyValueType: string, - parser: Parser, -) { - if (!parser.functionTypeAnnotation(propertyValueType)) { - throw new UnsupportedModulePropertyParserError( - nativeModuleName, - propertyValue, - propertyName, - propertyValueType, - parser.language(), - ); - } -} - -const UnsupportedObjectPropertyTypeToInvalidPropertyValueTypeMap = { - FunctionTypeAnnotation: 'FunctionTypeAnnotation', - VoidTypeAnnotation: 'void', - PromiseTypeAnnotation: 'Promise', -}; - -function throwIfPropertyValueTypeIsUnsupported( - moduleName: string, - propertyValue: $FlowFixMe, - propertyKey: string, - type: string, -) { - const invalidPropertyValueType = - UnsupportedObjectPropertyTypeToInvalidPropertyValueTypeMap[type]; - - throw new UnsupportedObjectPropertyValueTypeAnnotationParserError( - moduleName, - propertyValue, - propertyKey, - invalidPropertyValueType, - ); -} - -function throwIfMoreThanOneModuleInterfaceParserError( - nativeModuleName: string, - moduleSpecs: $ReadOnlyArray<$FlowFixMe>, - parserType: ParserType, -) { - if (moduleSpecs.length > 1) { - throw new MoreThanOneModuleInterfaceParserError( - nativeModuleName, - moduleSpecs, - moduleSpecs.map(node => node.id.name), - parserType, - ); - } -} - -function throwIfUnsupportedFunctionParamTypeAnnotationParserError( - nativeModuleName: string, - languageParamTypeAnnotation: $FlowFixMe, - paramName: string, - paramTypeAnnotationType: NativeModuleTypeAnnotation['type'], -) { - throw new UnsupportedFunctionParamTypeAnnotationParserError( - nativeModuleName, - languageParamTypeAnnotation, - paramName, - paramTypeAnnotationType, - ); -} - -function throwIfArrayElementTypeAnnotationIsUnsupported( - hasteModuleName: string, - flowElementType: $FlowFixMe, - flowArrayType: 'Array' | '$ReadOnlyArray' | 'ReadonlyArray', - type: string, -) { - const TypeMap = { - FunctionTypeAnnotation: 'FunctionTypeAnnotation', - VoidTypeAnnotation: 'void', - PromiseTypeAnnotation: 'Promise', - // TODO: Added as a work-around for now until TupleTypeAnnotation are fully supported in both flow and TS - // Right now they are partially treated as UnionTypeAnnotation - UnionTypeAnnotation: 'UnionTypeAnnotation', - }; - - if (type in TypeMap) { - throw new UnsupportedArrayElementTypeAnnotationParserError( - hasteModuleName, - flowElementType, - flowArrayType, - TypeMap[type], - ); - } -} - -function throwIfIncorrectModuleRegistryCallArgument( - nativeModuleName: string, - callExpressionArg: $FlowFixMe, - methodName: string, -) { - if ( - callExpressionArg.type !== 'StringLiteral' && - callExpressionArg.type !== 'Literal' - ) { - const {type} = callExpressionArg; - throw new IncorrectModuleRegistryCallArgumentTypeParserError( - nativeModuleName, - callExpressionArg, - methodName, - type, - ); - } -} - -function throwIfPartialNotAnnotatingTypeParameter( - typeAnnotation: $FlowFixMe, - types: TypeDeclarationMap, - parser: Parser, -) { - const annotatedElement = parser.extractAnnotatedElement( - typeAnnotation, - types, - ); - - if (!annotatedElement) { - throw new Error('Partials only support annotating a type parameter.'); - } -} - -function throwIfPartialWithMoreParameter(typeAnnotation: $FlowFixMe) { - if (typeAnnotation.typeParameters.params.length !== 1) { - throw new Error('Partials only support annotating exactly one parameter.'); - } -} - -function throwIfMoreThanOneCodegenNativecommands( - commandsTypeNames: $ReadOnlyArray<$FlowFixMe>, -) { - if (commandsTypeNames.length > 1) { - throw new Error('codegenNativeCommands may only be called once in a file'); - } -} - -function throwIfConfigNotfound(foundConfigs: Array<{[string]: string}>) { - if (foundConfigs.length === 0) { - throw new Error('Could not find component config for native component'); - } -} - -function throwIfMoreThanOneConfig(foundConfigs: Array<{[string]: string}>) { - if (foundConfigs.length > 1) { - throw new Error('Only one component is supported per file'); - } -} - -function throwIfEventHasNoName(typeAnnotation: $FlowFixMe, parser: Parser) { - const name = - parser.language() === 'Flow' ? typeAnnotation.id : typeAnnotation.typeName; - - if (!name) { - throw new Error("typeAnnotation of event doesn't have a name"); - } -} - -function throwIfBubblingTypeIsNull( - bubblingType: ?('direct' | 'bubble'), - eventName: string, -): 'direct' | 'bubble' { - if (!bubblingType) { - throw new Error( - `Unable to determine event bubbling type for "${eventName}"`, - ); - } - - return bubblingType; -} - -function throwIfArgumentPropsAreNull( - argumentProps: ?$ReadOnlyArray<$FlowFixMe>, - eventName: string, -): $ReadOnlyArray<$FlowFixMe> { - if (!argumentProps) { - throw new Error(`Unable to determine event arguments for "${eventName}"`); - } - - return argumentProps; -} - -function throwIfTypeAliasIsNotInterface(typeAlias: $FlowFixMe, parser: Parser) { - if (typeAlias.type !== parser.interfaceDeclaration) { - throw new Error( - `The type argument for codegenNativeCommands must be an interface, received ${typeAlias.type}`, - ); - } -} - -module.exports = { - throwIfModuleInterfaceIsMisnamed, - throwIfUnsupportedFunctionReturnTypeAnnotationParserError, - throwIfModuleInterfaceNotFound, - throwIfMoreThanOneModuleRegistryCalls, - throwIfPropertyValueTypeIsUnsupported, - throwIfUnusedModuleInterfaceParserError, - throwIfWrongNumberOfCallExpressionArgs, - throwIfIncorrectModuleRegistryCallTypeParameterParserError, - throwIfUntypedModule, - throwIfModuleTypeIsUnsupported, - throwIfMoreThanOneModuleInterfaceParserError, - throwIfUnsupportedFunctionParamTypeAnnotationParserError, - throwIfArrayElementTypeAnnotationIsUnsupported, - throwIfIncorrectModuleRegistryCallArgument, - throwIfPartialNotAnnotatingTypeParameter, - throwIfPartialWithMoreParameter, - throwIfMoreThanOneCodegenNativecommands, - throwIfConfigNotfound, - throwIfMoreThanOneConfig, - throwIfEventHasNoName, - throwIfBubblingTypeIsNull, - throwIfArgumentPropsAreNull, - throwIfTypeAliasIsNotInterface, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/errors.d.ts b/node_modules/@react-native/codegen/lib/parsers/errors.d.ts deleted file mode 100644 index c99bd85e0..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/errors.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -export type ParserType = 'Flow' | 'TypeScript'; - -export declare class ParserError extends Error {} diff --git a/node_modules/@react-native/codegen/lib/parsers/errors.js b/node_modules/@react-native/codegen/lib/parsers/errors.js deleted file mode 100644 index e280d4af0..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/errors.js +++ /dev/null @@ -1,334 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -class ParserError extends Error { - constructor(nativeModuleName, astNodeOrNodes, message) { - super(`Module ${nativeModuleName}: ${message}`); - this.nodes = Array.isArray(astNodeOrNodes) - ? astNodeOrNodes - : [astNodeOrNodes]; - - // assign the error class name in your custom error (as a shortcut) - this.name = this.constructor.name; - - // capturing the stack trace keeps the reference to your error class - Error.captureStackTrace(this, this.constructor); - } -} -class MisnamedModuleInterfaceParserError extends ParserError { - constructor(nativeModuleName, id, language) { - super( - nativeModuleName, - id, - `All ${language} interfaces extending TurboModule must be called 'Spec'. Please rename ${language} interface '${id.name}' to 'Spec'.`, - ); - } -} -class ModuleInterfaceNotFoundParserError extends ParserError { - constructor(nativeModuleName, ast, language) { - super( - nativeModuleName, - ast, - `No ${language} interfaces extending TurboModule were detected in this NativeModule spec.`, - ); - } -} -class MoreThanOneModuleInterfaceParserError extends ParserError { - constructor(nativeModuleName, flowModuleInterfaces, names, language) { - const finalName = names[names.length - 1]; - const allButLastName = names.slice(0, -1); - const quote = x => `'${x}'`; - const nameStr = - allButLastName.map(quote).join(', ') + ', and ' + quote(finalName); - super( - nativeModuleName, - flowModuleInterfaces, - `Every NativeModule spec file must declare exactly one NativeModule ${language} interface. This file declares ${names.length}: ${nameStr}. Please remove the extraneous ${language} interface declarations.`, - ); - } -} -class UnsupportedModulePropertyParserError extends ParserError { - constructor( - nativeModuleName, - propertyValue, - propertyName, - invalidPropertyValueType, - language, - ) { - super( - nativeModuleName, - propertyValue, - `${language} interfaces extending TurboModule must only contain 'FunctionTypeAnnotation's. Property '${propertyName}' refers to a '${invalidPropertyValueType}'.`, - ); - } -} -class UnsupportedTypeAnnotationParserError extends ParserError { - constructor(nativeModuleName, typeAnnotation, language) { - super( - nativeModuleName, - typeAnnotation, - `${language} type annotation '${typeAnnotation.type}' is unsupported in NativeModule specs.`, - ); - this.typeAnnotationType = typeAnnotation.type; - } -} -class UnsupportedGenericParserError extends ParserError { - // +genericName: string; - constructor(nativeModuleName, genericTypeAnnotation, parser) { - const genericName = parser.getTypeAnnotationName(genericTypeAnnotation); - super( - nativeModuleName, - genericTypeAnnotation, - `Unrecognized generic type '${genericName}' in NativeModule spec.`, - ); - - // this.genericName = genericName; - } -} - -class MissingTypeParameterGenericParserError extends ParserError { - constructor(nativeModuleName, genericTypeAnnotation, parser) { - const genericName = parser.getTypeAnnotationName(genericTypeAnnotation); - super( - nativeModuleName, - genericTypeAnnotation, - `Generic '${genericName}' must have type parameters.`, - ); - } -} -class MoreThanOneTypeParameterGenericParserError extends ParserError { - constructor(nativeModuleName, genericTypeAnnotation, parser) { - const genericName = parser.getTypeAnnotationName(genericTypeAnnotation); - super( - nativeModuleName, - genericTypeAnnotation, - `Generic '${genericName}' must have exactly one type parameter.`, - ); - } -} - -/** - * Array parsing errors - */ - -class UnsupportedArrayElementTypeAnnotationParserError extends ParserError { - constructor( - nativeModuleName, - arrayElementTypeAST, - arrayType, - invalidArrayElementType, - ) { - super( - nativeModuleName, - arrayElementTypeAST, - `${arrayType} element types cannot be '${invalidArrayElementType}'.`, - ); - } -} - -/** - * Object parsing errors - */ - -class UnsupportedObjectPropertyTypeAnnotationParserError extends ParserError { - constructor(nativeModuleName, propertyAST, invalidPropertyType, language) { - let message = `'ObjectTypeAnnotation' cannot contain '${invalidPropertyType}'.`; - if ( - invalidPropertyType === 'ObjectTypeSpreadProperty' && - language !== 'TypeScript' - ) { - message = "Object spread isn't supported in 'ObjectTypeAnnotation's."; - } - super(nativeModuleName, propertyAST, message); - } -} -class UnsupportedObjectPropertyValueTypeAnnotationParserError extends ParserError { - constructor( - nativeModuleName, - propertyValueAST, - propertyName, - invalidPropertyValueType, - ) { - super( - nativeModuleName, - propertyValueAST, - `Object property '${propertyName}' cannot have type '${invalidPropertyValueType}'.`, - ); - } -} -class UnsupportedObjectDirectRecursivePropertyParserError extends ParserError { - constructor(propertyName, propertyValueAST, nativeModuleName) { - super( - nativeModuleName, - propertyValueAST, - `Object property '${propertyName}' is direct recursive and must be nullable.`, - ); - } -} - -/** - * Function parsing errors - */ - -class UnnamedFunctionParamParserError extends ParserError { - constructor(functionParam, nativeModuleName) { - super( - nativeModuleName, - functionParam, - 'All function parameters must be named.', - ); - } -} -class UnsupportedFunctionParamTypeAnnotationParserError extends ParserError { - constructor( - nativeModuleName, - flowParamTypeAnnotation, - paramName, - invalidParamType, - ) { - super( - nativeModuleName, - flowParamTypeAnnotation, - `Function parameter '${paramName}' cannot have type '${invalidParamType}'.`, - ); - } -} -class UnsupportedFunctionReturnTypeAnnotationParserError extends ParserError { - constructor(nativeModuleName, flowReturnTypeAnnotation, invalidReturnType) { - super( - nativeModuleName, - flowReturnTypeAnnotation, - `Function return cannot have type '${invalidReturnType}'.`, - ); - } -} - -/** - * Enum parsing errors - */ - -class UnsupportedEnumDeclarationParserError extends ParserError { - constructor(nativeModuleName, arrayElementTypeAST, memberType) { - super( - nativeModuleName, - arrayElementTypeAST, - `Unexpected enum member type ${memberType}. Only string and number enum members are supported`, - ); - } -} - -/** - * Union parsing errors - */ - -class UnsupportedUnionTypeAnnotationParserError extends ParserError { - constructor(nativeModuleName, arrayElementTypeAST, types) { - super( - nativeModuleName, - arrayElementTypeAST, - `Union members must be of the same type, but multiple types were found ${types.join( - ', ', - )}'.`, - ); - } -} - -/** - * Module parsing errors - */ - -class UnusedModuleInterfaceParserError extends ParserError { - constructor(nativeModuleName, flowInterface) { - super( - nativeModuleName, - flowInterface, - "Unused NativeModule spec. Please load the NativeModule by calling TurboModuleRegistry.get('').", - ); - } -} -class MoreThanOneModuleRegistryCallsParserError extends ParserError { - constructor(nativeModuleName, flowCallExpressions, numCalls) { - super( - nativeModuleName, - flowCallExpressions, - `Every NativeModule spec file must contain exactly one NativeModule load. This file contains ${numCalls}. Please simplify this spec file, splitting it as necessary, to remove the extraneous loads.`, - ); - } -} -class UntypedModuleRegistryCallParserError extends ParserError { - constructor(nativeModuleName, flowCallExpression, methodName, moduleName) { - super( - nativeModuleName, - flowCallExpression, - `Please type this NativeModule load: TurboModuleRegistry.${methodName}('${moduleName}').`, - ); - } -} -class IncorrectModuleRegistryCallTypeParameterParserError extends ParserError { - constructor(nativeModuleName, flowTypeArguments, methodName, moduleName) { - super( - nativeModuleName, - flowTypeArguments, - `Please change these type arguments to reflect TurboModuleRegistry.${methodName}('${moduleName}').`, - ); - } -} -class IncorrectModuleRegistryCallArityParserError extends ParserError { - constructor( - nativeModuleName, - flowCallExpression, - methodName, - incorrectArity, - ) { - super( - nativeModuleName, - flowCallExpression, - `Please call TurboModuleRegistry.${methodName}() with exactly one argument. Detected ${incorrectArity}.`, - ); - } -} -class IncorrectModuleRegistryCallArgumentTypeParserError extends ParserError { - constructor(nativeModuleName, flowArgument, methodName, type) { - const a = /[aeiouy]/.test(type.toLowerCase()) ? 'an' : 'a'; - super( - nativeModuleName, - flowArgument, - `Please call TurboModuleRegistry.${methodName}() with a string literal. Detected ${a} '${type}'`, - ); - } -} -module.exports = { - ParserError, - MissingTypeParameterGenericParserError, - MoreThanOneTypeParameterGenericParserError, - MisnamedModuleInterfaceParserError, - ModuleInterfaceNotFoundParserError, - MoreThanOneModuleInterfaceParserError, - UnnamedFunctionParamParserError, - UnsupportedArrayElementTypeAnnotationParserError, - UnsupportedGenericParserError, - UnsupportedTypeAnnotationParserError, - UnsupportedFunctionParamTypeAnnotationParserError, - UnsupportedFunctionReturnTypeAnnotationParserError, - UnsupportedEnumDeclarationParserError, - UnsupportedUnionTypeAnnotationParserError, - UnsupportedModulePropertyParserError, - UnsupportedObjectPropertyTypeAnnotationParserError, - UnsupportedObjectPropertyValueTypeAnnotationParserError, - UnsupportedObjectDirectRecursivePropertyParserError, - UnusedModuleInterfaceParserError, - MoreThanOneModuleRegistryCallsParserError, - UntypedModuleRegistryCallParserError, - IncorrectModuleRegistryCallTypeParameterParserError, - IncorrectModuleRegistryCallArityParserError, - IncorrectModuleRegistryCallArgumentTypeParserError, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/errors.js.flow b/node_modules/@react-native/codegen/lib/parsers/errors.js.flow deleted file mode 100644 index 6a13264b2..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/errors.js.flow +++ /dev/null @@ -1,429 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type {UnionTypeAnnotationMemberType} from '../CodegenSchema'; -import type {Parser} from './parser'; -export type ParserType = 'Flow' | 'TypeScript'; - -class ParserError extends Error { - nodes: $ReadOnlyArray<$FlowFixMe>; - constructor( - nativeModuleName: string, - astNodeOrNodes: $FlowFixMe, - message: string, - ) { - super(`Module ${nativeModuleName}: ${message}`); - - this.nodes = Array.isArray(astNodeOrNodes) - ? astNodeOrNodes - : [astNodeOrNodes]; - - // assign the error class name in your custom error (as a shortcut) - this.name = this.constructor.name; - - // capturing the stack trace keeps the reference to your error class - Error.captureStackTrace(this, this.constructor); - } -} -class MisnamedModuleInterfaceParserError extends ParserError { - constructor(nativeModuleName: string, id: $FlowFixMe, language: ParserType) { - super( - nativeModuleName, - id, - `All ${language} interfaces extending TurboModule must be called 'Spec'. Please rename ${language} interface '${id.name}' to 'Spec'.`, - ); - } -} - -class ModuleInterfaceNotFoundParserError extends ParserError { - constructor(nativeModuleName: string, ast: $FlowFixMe, language: ParserType) { - super( - nativeModuleName, - ast, - `No ${language} interfaces extending TurboModule were detected in this NativeModule spec.`, - ); - } -} - -class MoreThanOneModuleInterfaceParserError extends ParserError { - constructor( - nativeModuleName: string, - flowModuleInterfaces: $ReadOnlyArray<$FlowFixMe>, - names: $ReadOnlyArray, - language: ParserType, - ) { - const finalName = names[names.length - 1]; - const allButLastName = names.slice(0, -1); - const quote = (x: string) => `'${x}'`; - - const nameStr = - allButLastName.map(quote).join(', ') + ', and ' + quote(finalName); - - super( - nativeModuleName, - flowModuleInterfaces, - `Every NativeModule spec file must declare exactly one NativeModule ${language} interface. This file declares ${names.length}: ${nameStr}. Please remove the extraneous ${language} interface declarations.`, - ); - } -} - -class UnsupportedModulePropertyParserError extends ParserError { - constructor( - nativeModuleName: string, - propertyValue: $FlowFixMe, - propertyName: string, - invalidPropertyValueType: string, - language: ParserType, - ) { - super( - nativeModuleName, - propertyValue, - `${language} interfaces extending TurboModule must only contain 'FunctionTypeAnnotation's. Property '${propertyName}' refers to a '${invalidPropertyValueType}'.`, - ); - } -} - -class UnsupportedTypeAnnotationParserError extends ParserError { - +typeAnnotationType: string; - constructor( - nativeModuleName: string, - typeAnnotation: $FlowFixMe, - language: ParserType, - ) { - super( - nativeModuleName, - typeAnnotation, - `${language} type annotation '${typeAnnotation.type}' is unsupported in NativeModule specs.`, - ); - - this.typeAnnotationType = typeAnnotation.type; - } -} - -class UnsupportedGenericParserError extends ParserError { - // +genericName: string; - constructor( - nativeModuleName: string, - genericTypeAnnotation: $FlowFixMe, - parser: Parser, - ) { - const genericName = parser.getTypeAnnotationName(genericTypeAnnotation); - super( - nativeModuleName, - genericTypeAnnotation, - `Unrecognized generic type '${genericName}' in NativeModule spec.`, - ); - - // this.genericName = genericName; - } -} - -class MissingTypeParameterGenericParserError extends ParserError { - constructor( - nativeModuleName: string, - genericTypeAnnotation: $FlowFixMe, - parser: Parser, - ) { - const genericName = parser.getTypeAnnotationName(genericTypeAnnotation); - - super( - nativeModuleName, - genericTypeAnnotation, - `Generic '${genericName}' must have type parameters.`, - ); - } -} - -class MoreThanOneTypeParameterGenericParserError extends ParserError { - constructor( - nativeModuleName: string, - genericTypeAnnotation: $FlowFixMe, - parser: Parser, - ) { - const genericName = parser.getTypeAnnotationName(genericTypeAnnotation); - - super( - nativeModuleName, - genericTypeAnnotation, - `Generic '${genericName}' must have exactly one type parameter.`, - ); - } -} - -/** - * Array parsing errors - */ - -class UnsupportedArrayElementTypeAnnotationParserError extends ParserError { - constructor( - nativeModuleName: string, - arrayElementTypeAST: $FlowFixMe, - arrayType: 'Array' | '$ReadOnlyArray' | 'ReadonlyArray', - invalidArrayElementType: string, - ) { - super( - nativeModuleName, - arrayElementTypeAST, - `${arrayType} element types cannot be '${invalidArrayElementType}'.`, - ); - } -} - -/** - * Object parsing errors - */ - -class UnsupportedObjectPropertyTypeAnnotationParserError extends ParserError { - constructor( - nativeModuleName: string, - propertyAST: $FlowFixMe, - invalidPropertyType: string, - language: ParserType, - ) { - let message = `'ObjectTypeAnnotation' cannot contain '${invalidPropertyType}'.`; - - if ( - invalidPropertyType === 'ObjectTypeSpreadProperty' && - language !== 'TypeScript' - ) { - message = "Object spread isn't supported in 'ObjectTypeAnnotation's."; - } - - super(nativeModuleName, propertyAST, message); - } -} - -class UnsupportedObjectPropertyValueTypeAnnotationParserError extends ParserError { - constructor( - nativeModuleName: string, - propertyValueAST: $FlowFixMe, - propertyName: string, - invalidPropertyValueType: string, - ) { - super( - nativeModuleName, - propertyValueAST, - `Object property '${propertyName}' cannot have type '${invalidPropertyValueType}'.`, - ); - } -} - -class UnsupportedObjectDirectRecursivePropertyParserError extends ParserError { - constructor( - propertyName: string, - propertyValueAST: $FlowFixMe, - nativeModuleName: string, - ) { - super( - nativeModuleName, - propertyValueAST, - `Object property '${propertyName}' is direct recursive and must be nullable.`, - ); - } -} - -/** - * Function parsing errors - */ - -class UnnamedFunctionParamParserError extends ParserError { - constructor(functionParam: $FlowFixMe, nativeModuleName: string) { - super( - nativeModuleName, - functionParam, - 'All function parameters must be named.', - ); - } -} - -class UnsupportedFunctionParamTypeAnnotationParserError extends ParserError { - constructor( - nativeModuleName: string, - flowParamTypeAnnotation: $FlowFixMe, - paramName: string, - invalidParamType: string, - ) { - super( - nativeModuleName, - flowParamTypeAnnotation, - `Function parameter '${paramName}' cannot have type '${invalidParamType}'.`, - ); - } -} - -class UnsupportedFunctionReturnTypeAnnotationParserError extends ParserError { - constructor( - nativeModuleName: string, - flowReturnTypeAnnotation: $FlowFixMe, - invalidReturnType: string, - ) { - super( - nativeModuleName, - flowReturnTypeAnnotation, - `Function return cannot have type '${invalidReturnType}'.`, - ); - } -} - -/** - * Enum parsing errors - */ - -class UnsupportedEnumDeclarationParserError extends ParserError { - constructor( - nativeModuleName: string, - arrayElementTypeAST: $FlowFixMe, - memberType: string, - ) { - super( - nativeModuleName, - arrayElementTypeAST, - `Unexpected enum member type ${memberType}. Only string and number enum members are supported`, - ); - } -} - -/** - * Union parsing errors - */ - -class UnsupportedUnionTypeAnnotationParserError extends ParserError { - constructor( - nativeModuleName: string, - arrayElementTypeAST: $FlowFixMe, - types: UnionTypeAnnotationMemberType[], - ) { - super( - nativeModuleName, - arrayElementTypeAST, - `Union members must be of the same type, but multiple types were found ${types.join( - ', ', - )}'.`, - ); - } -} - -/** - * Module parsing errors - */ - -class UnusedModuleInterfaceParserError extends ParserError { - constructor(nativeModuleName: string, flowInterface: $FlowFixMe) { - super( - nativeModuleName, - flowInterface, - "Unused NativeModule spec. Please load the NativeModule by calling TurboModuleRegistry.get('').", - ); - } -} - -class MoreThanOneModuleRegistryCallsParserError extends ParserError { - constructor( - nativeModuleName: string, - flowCallExpressions: $FlowFixMe, - numCalls: number, - ) { - super( - nativeModuleName, - flowCallExpressions, - `Every NativeModule spec file must contain exactly one NativeModule load. This file contains ${numCalls}. Please simplify this spec file, splitting it as necessary, to remove the extraneous loads.`, - ); - } -} - -class UntypedModuleRegistryCallParserError extends ParserError { - constructor( - nativeModuleName: string, - flowCallExpression: $FlowFixMe, - methodName: string, - moduleName: string, - ) { - super( - nativeModuleName, - flowCallExpression, - `Please type this NativeModule load: TurboModuleRegistry.${methodName}('${moduleName}').`, - ); - } -} - -class IncorrectModuleRegistryCallTypeParameterParserError extends ParserError { - constructor( - nativeModuleName: string, - flowTypeArguments: $FlowFixMe, - methodName: string, - moduleName: string, - ) { - super( - nativeModuleName, - flowTypeArguments, - `Please change these type arguments to reflect TurboModuleRegistry.${methodName}('${moduleName}').`, - ); - } -} - -class IncorrectModuleRegistryCallArityParserError extends ParserError { - constructor( - nativeModuleName: string, - flowCallExpression: $FlowFixMe, - methodName: string, - incorrectArity: number, - ) { - super( - nativeModuleName, - flowCallExpression, - `Please call TurboModuleRegistry.${methodName}() with exactly one argument. Detected ${incorrectArity}.`, - ); - } -} - -class IncorrectModuleRegistryCallArgumentTypeParserError extends ParserError { - constructor( - nativeModuleName: string, - flowArgument: $FlowFixMe, - methodName: string, - type: string, - ) { - const a = /[aeiouy]/.test(type.toLowerCase()) ? 'an' : 'a'; - super( - nativeModuleName, - flowArgument, - `Please call TurboModuleRegistry.${methodName}() with a string literal. Detected ${a} '${type}'`, - ); - } -} - -module.exports = { - ParserError, - MissingTypeParameterGenericParserError, - MoreThanOneTypeParameterGenericParserError, - MisnamedModuleInterfaceParserError, - ModuleInterfaceNotFoundParserError, - MoreThanOneModuleInterfaceParserError, - UnnamedFunctionParamParserError, - UnsupportedArrayElementTypeAnnotationParserError, - UnsupportedGenericParserError, - UnsupportedTypeAnnotationParserError, - UnsupportedFunctionParamTypeAnnotationParserError, - UnsupportedFunctionReturnTypeAnnotationParserError, - UnsupportedEnumDeclarationParserError, - UnsupportedUnionTypeAnnotationParserError, - UnsupportedModulePropertyParserError, - UnsupportedObjectPropertyTypeAnnotationParserError, - UnsupportedObjectPropertyValueTypeAnnotationParserError, - UnsupportedObjectDirectRecursivePropertyParserError, - UnusedModuleInterfaceParserError, - MoreThanOneModuleRegistryCallsParserError, - UntypedModuleRegistryCallParserError, - IncorrectModuleRegistryCallTypeParameterParserError, - IncorrectModuleRegistryCallArityParserError, - IncorrectModuleRegistryCallArgumentTypeParserError, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/flow/components/__test_fixtures__/failures.js b/node_modules/@react-native/codegen/lib/parsers/flow/components/__test_fixtures__/failures.js deleted file mode 100644 index 24f2cb1e0..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/flow/components/__test_fixtures__/failures.js +++ /dev/null @@ -1,583 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -// @licenselint-loose-mode - -'use strict'; - -const COMMANDS_DEFINED_INLINE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - // No props -|}>; - -export const Commands = codegenNativeCommands<{ - +hotspotUpdate: (ref: React.Ref<'RCTView'>, x: Int32, y: Int32) => void, -}>({ - supportedCommands: ['hotspotUpdate'], -}); - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; -const COMMANDS_DEFINED_MULTIPLE_TIMES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -interface NativeCommands { - +hotspotUpdate: (viewRef: React.Ref<'RCTView'>, x: Int32, y: Int32) => void; -} - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - // No props or events -|}>; - -export const Commands = codegenNativeCommands({ - supportedCommands: ['hotspotUpdate'], -}); -export const Commands2 = codegenNativeCommands({ - supportedCommands: ['hotspotUpdate'], -}); - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; -const COMMANDS_DEFINED_WITHOUT_REF = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -interface NativeCommands { - +hotspotUpdate: (x: Int32, y: Int32) => void; -} - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - // No props or events -|}>; - -export const Commands = codegenNativeCommands({ - supportedCommands: ['hotspotUpdate'], -}); - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; -const COMMANDS_DEFINED_WITH_NULLABLE_REF = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -interface NativeCommands { - +hotspotUpdate: (viewRef: ?React.Ref<'RCTView'>, x: Int32, y: Int32) => void; -} - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - // No props or events -|}>; - -export const Commands = codegenNativeCommands({ - supportedCommands: ['hotspotUpdate'], -}); - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; -const COMMANDS_DEFINED_WITH_MISMATCHED_METHOD_NAMES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -interface NativeCommands { - +hotspotUpdate: (viewRef: React.Ref<'RCTView'>, x: Int32, y: Int32) => void; - +scrollTo: ( - viewRef: React.Ref<'RCTView'>, - y: Int32, - animated: boolean, - ) => void; -} - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - // No props or events -|}>; - -export const Commands = codegenNativeCommands({ - supportedCommands: ['scrollTo'], -}); - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; -const COMMANDS_DEFINED_WITHOUT_METHOD_NAMES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -interface NativeCommands { - +hotspotUpdate: (viewRef: React.Ref<'RCTView'>, x: Int32, y: Int32) => void; - +scrollTo: ( - viewRef: React.Ref<'RCTView'>, - y: Int32, - animated: boolean, - ) => void; -} - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - // No props or events -|}>; - -export const Commands = codegenNativeCommands(); - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; -const NULLABLE_WITH_DEFAULT = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {WithDefault, Float} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - nullable_with_default: ?WithDefault, -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; -const NON_OPTIONAL_KEY_WITH_DEFAULT_VALUE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {WithDefault, Float} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - required_key_with_default: WithDefault, -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; -const PROPS_CONFLICT_NAMES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - isEnabled: string, - - isEnabled: boolean, -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; -const PROPS_CONFLICT_WITH_SPREAD_PROPS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -type PropsInFile = $ReadOnly<{| - isEnabled: boolean, -|}>; - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - - ...PropsInFile, - isEnabled: boolean, -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; -const PROPS_SPREAD_CONFLICTS_WITH_PROPS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -type PropsInFile = $ReadOnly<{| - isEnabled: boolean, -|}>; - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - - isEnabled: boolean, - ...PropsInFile, -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; -const PROP_NUMBER_TYPE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - - someProp: number -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; -const PROP_MIXED_ENUM = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - - someProp?: WithDefault<'foo' | 1, 1> -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; -const PROP_ENUM_BOOLEAN = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - - someProp?: WithDefault -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; -const PROP_ARRAY_MIXED_ENUM = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - - someProp?: WithDefault<$ReadOnlyArray<'foo' | 1>, 1> -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; -const PROP_ARRAY_ENUM_BOOLEAN = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - - someProp?: WithDefault<$ReadOnlyArray, false> -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; -const PROP_ARRAY_ENUM_INT = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - - someProp?: WithDefault<$ReadOnlyArray<0 | 1>, 0> -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; -module.exports = { - COMMANDS_DEFINED_INLINE, - COMMANDS_DEFINED_MULTIPLE_TIMES, - COMMANDS_DEFINED_WITH_MISMATCHED_METHOD_NAMES, - COMMANDS_DEFINED_WITHOUT_METHOD_NAMES, - COMMANDS_DEFINED_WITHOUT_REF, - COMMANDS_DEFINED_WITH_NULLABLE_REF, - NULLABLE_WITH_DEFAULT, - NON_OPTIONAL_KEY_WITH_DEFAULT_VALUE, - PROPS_CONFLICT_NAMES, - PROPS_CONFLICT_WITH_SPREAD_PROPS, - PROPS_SPREAD_CONFLICTS_WITH_PROPS, - PROP_NUMBER_TYPE, - PROP_MIXED_ENUM, - PROP_ENUM_BOOLEAN, - PROP_ARRAY_MIXED_ENUM, - PROP_ARRAY_ENUM_BOOLEAN, - PROP_ARRAY_ENUM_INT, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/flow/components/__test_fixtures__/failures.js.flow b/node_modules/@react-native/codegen/lib/parsers/flow/components/__test_fixtures__/failures.js.flow deleted file mode 100644 index 1d7072636..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/flow/components/__test_fixtures__/failures.js.flow +++ /dev/null @@ -1,600 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -// @licenselint-loose-mode - -'use strict'; - -const COMMANDS_DEFINED_INLINE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - // No props -|}>; - -export const Commands = codegenNativeCommands<{ - +hotspotUpdate: (ref: React.Ref<'RCTView'>, x: Int32, y: Int32) => void, -}>({ - supportedCommands: ['hotspotUpdate'], -}); - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; - -const COMMANDS_DEFINED_MULTIPLE_TIMES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -interface NativeCommands { - +hotspotUpdate: (viewRef: React.Ref<'RCTView'>, x: Int32, y: Int32) => void; -} - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - // No props or events -|}>; - -export const Commands = codegenNativeCommands({ - supportedCommands: ['hotspotUpdate'], -}); -export const Commands2 = codegenNativeCommands({ - supportedCommands: ['hotspotUpdate'], -}); - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; - -const COMMANDS_DEFINED_WITHOUT_REF = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -interface NativeCommands { - +hotspotUpdate: (x: Int32, y: Int32) => void; -} - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - // No props or events -|}>; - -export const Commands = codegenNativeCommands({ - supportedCommands: ['hotspotUpdate'], -}); - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; - -const COMMANDS_DEFINED_WITH_NULLABLE_REF = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -interface NativeCommands { - +hotspotUpdate: (viewRef: ?React.Ref<'RCTView'>, x: Int32, y: Int32) => void; -} - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - // No props or events -|}>; - -export const Commands = codegenNativeCommands({ - supportedCommands: ['hotspotUpdate'], -}); - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; - -const COMMANDS_DEFINED_WITH_MISMATCHED_METHOD_NAMES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -interface NativeCommands { - +hotspotUpdate: (viewRef: React.Ref<'RCTView'>, x: Int32, y: Int32) => void; - +scrollTo: ( - viewRef: React.Ref<'RCTView'>, - y: Int32, - animated: boolean, - ) => void; -} - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - // No props or events -|}>; - -export const Commands = codegenNativeCommands({ - supportedCommands: ['scrollTo'], -}); - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; - -const COMMANDS_DEFINED_WITHOUT_METHOD_NAMES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -interface NativeCommands { - +hotspotUpdate: (viewRef: React.Ref<'RCTView'>, x: Int32, y: Int32) => void; - +scrollTo: ( - viewRef: React.Ref<'RCTView'>, - y: Int32, - animated: boolean, - ) => void; -} - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - // No props or events -|}>; - -export const Commands = codegenNativeCommands(); - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; - -const NULLABLE_WITH_DEFAULT = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {WithDefault, Float} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - nullable_with_default: ?WithDefault, -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; - -const NON_OPTIONAL_KEY_WITH_DEFAULT_VALUE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {WithDefault, Float} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - required_key_with_default: WithDefault, -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; - -const PROPS_CONFLICT_NAMES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - isEnabled: string, - - isEnabled: boolean, -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; - -const PROPS_CONFLICT_WITH_SPREAD_PROPS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -type PropsInFile = $ReadOnly<{| - isEnabled: boolean, -|}>; - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - - ...PropsInFile, - isEnabled: boolean, -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; - -const PROPS_SPREAD_CONFLICTS_WITH_PROPS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -type PropsInFile = $ReadOnly<{| - isEnabled: boolean, -|}>; - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - - isEnabled: boolean, - ...PropsInFile, -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; - -const PROP_NUMBER_TYPE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - - someProp: number -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; - -const PROP_MIXED_ENUM = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - - someProp?: WithDefault<'foo' | 1, 1> -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; - -const PROP_ENUM_BOOLEAN = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - - someProp?: WithDefault -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; - -const PROP_ARRAY_MIXED_ENUM = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - - someProp?: WithDefault<$ReadOnlyArray<'foo' | 1>, 1> -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; - -const PROP_ARRAY_ENUM_BOOLEAN = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - - someProp?: WithDefault<$ReadOnlyArray, false> -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; - -const PROP_ARRAY_ENUM_INT = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - - someProp?: WithDefault<$ReadOnlyArray<0 | 1>, 0> -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; - -module.exports = { - COMMANDS_DEFINED_INLINE, - COMMANDS_DEFINED_MULTIPLE_TIMES, - COMMANDS_DEFINED_WITH_MISMATCHED_METHOD_NAMES, - COMMANDS_DEFINED_WITHOUT_METHOD_NAMES, - COMMANDS_DEFINED_WITHOUT_REF, - COMMANDS_DEFINED_WITH_NULLABLE_REF, - NULLABLE_WITH_DEFAULT, - NON_OPTIONAL_KEY_WITH_DEFAULT_VALUE, - PROPS_CONFLICT_NAMES, - PROPS_CONFLICT_WITH_SPREAD_PROPS, - PROPS_SPREAD_CONFLICTS_WITH_PROPS, - PROP_NUMBER_TYPE, - PROP_MIXED_ENUM, - PROP_ENUM_BOOLEAN, - PROP_ARRAY_MIXED_ENUM, - PROP_ARRAY_ENUM_BOOLEAN, - PROP_ARRAY_ENUM_INT, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/flow/components/__test_fixtures__/fixtures.js b/node_modules/@react-native/codegen/lib/parsers/flow/components/__test_fixtures__/fixtures.js deleted file mode 100644 index de29b12b6..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/flow/components/__test_fixtures__/fixtures.js +++ /dev/null @@ -1,1080 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -// @licenselint-loose-mode - -'use strict'; - -const EVENT_DEFINITION = ` - boolean_required: boolean, - boolean_optional_key?: boolean, - boolean_optional_value: ?boolean, - boolean_optional_both?: ?boolean, - - string_required: string, - string_optional_key?: string, - string_optional_value: ?string, - string_optional_both?: ?string, - - double_required: Double, - double_optional_key?: Double, - double_optional_value: ?Double, - double_optional_both?: ?Double, - - float_required: Float, - float_optional_key?: Float, - float_optional_value: ?Float, - float_optional_both?: ?Float, - - int32_required: Int32, - int32_optional_key?: Int32, - int32_optional_value: ?Int32, - int32_optional_both?: ?Int32, - - enum_required: ('small' | 'large'), - enum_optional_key?: ('small' | 'large'), - enum_optional_value: ?('small' | 'large'), - enum_optional_both?: ?('small' | 'large'), - - object_required: { - boolean_required: boolean, - }, - - object_optional_key?: { - string_optional_key?: string, - }, - - object_optional_value: ?{ - float_optional_value: ?Float, - }, - - object_optional_both?: ?{ - int32_optional_both?: ?Int32, - }, - - object_required_nested_2_layers: { - object_optional_nested_1_layer?: ?{ - boolean_required: Int32, - string_optional_key?: string, - double_optional_value: ?Double, - float_optional_value: ?Float, - int32_optional_both?: ?Int32, - } - }, - - object_readonly_required: $ReadOnly<{ - boolean_required: boolean, - }>, - - object_readonly_optional_key?: $ReadOnly<{ - string_optional_key?: string, - }>, - - object_readonly_optional_value: ?$ReadOnly<{ - float_optional_value: ?Float, - }>, - - object_readonly_optional_both?: ?$ReadOnly<{ - int32_optional_both?: ?Int32, - }>, - - boolean_array_required: $ReadOnlyArray, - boolean_array_optional_key?: boolean[], - boolean_array_optional_value: ?$ReadOnlyArray, - boolean_array_optional_both?: ?boolean[], - - string_array_required: $ReadOnlyArray, - string_array_optional_key?: string[], - string_array_optional_value: ?$ReadOnlyArray, - string_array_optional_both?: ?string[], - - double_array_required: $ReadOnlyArray, - double_array_optional_key?: Double[], - double_array_optional_value: ?$ReadOnlyArray, - double_array_optional_both?: ?Double[], - - float_array_required: $ReadOnlyArray, - float_array_optional_key?: Float[], - float_array_optional_value: ?$ReadOnlyArray, - float_array_optional_both?: ?Float[], - - int32_array_required: $ReadOnlyArray, - int32_array_optional_key?: Int32[], - int32_array_optional_value: ?$ReadOnlyArray, - int32_array_optional_both?: ?Int32[], - - enum_array_required: $ReadOnlyArray<('small' | 'large')>, - enum_array_optional_key?: ('small' | 'large')[], - enum_array_optional_value: ?$ReadOnlyArray<('small' | 'large')>, - enum_array_optional_both?: ?('small' | 'large')[], - - object_array_required: $ReadOnlyArray<{ - boolean_required: boolean, - }>, - - object_array_optional_key?: { - string_optional_key?: string, - }[], - - object_array_optional_value: ?$ReadOnlyArray<{ - float_optional_value: ?Float, - }>, - - object_array_optional_both?: ?{ - int32_optional_both?: ?Int32, - }[], - - int32_array_array_required: $ReadOnlyArray<$ReadOnlyArray>, - int32_array_array_optional_key?: Int32[][], - int32_array_array_optional_value: ?$ReadOnlyArray<$ReadOnlyArray>, - int32_array_array_optional_both?: ?Int32[][], -`; -const ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type { - BubblingEventHandler, - DirectEventHandler, - WithDefault, -} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -type ModuleProps = $ReadOnly<{| - ...ViewProps, - - // Props - boolean_default_true_optional_both?: WithDefault, - - // Events - onDirectEventDefinedInlineNull: DirectEventHandler, - onBubblingEventDefinedInlineNull: BubblingEventHandler, -|}>; - -export default (codegenNativeComponent('Module', { - interfaceOnly: true, - paperComponentName: 'RCTModule', -}): HostComponent); -`; -const ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS_NO_CAST = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type { - BubblingEventHandler, - DirectEventHandler, - WithDefault, -} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -type ModuleProps = $ReadOnly<{| - ...ViewProps, - - // Props - boolean_default_true_optional_both?: WithDefault, - - // Events - onDirectEventDefinedInlineNull: DirectEventHandler, - onBubblingEventDefinedInlineNull: BubblingEventHandler, -|}>; - -export default codegenNativeComponent('Module', { - interfaceOnly: true, - excludedPlatforms: ['android'], - paperComponentName: 'RCTModule', -}); -`; -const NO_PROPS_EVENTS_ONLY_DEPRECATED_VIEW_CONFIG_NAME_OPTION = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -type ModuleProps = $ReadOnly<{| - ...ViewProps, -|}>; - -export default (codegenNativeComponent('Module', { - deprecatedViewConfigName: 'DeprecateModuleName', -}): HostComponent); -`; -const ALL_PROP_TYPES_NO_EVENTS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32, Double, Float, WithDefault, UnsafeMixed} from 'CodegenTypes'; -import type {ImageSource} from 'ImageSource'; -import type {ColorValue, ColorArrayValue, PointValue, EdgeInsetsValue, DimensionValue} from 'StyleSheetTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -type ModuleProps = $ReadOnly<{| - ...ViewProps, - - // Props - // Boolean props - boolean_required: boolean, - boolean_optional_key?: WithDefault, - boolean_optional_both?: WithDefault, - - // Boolean props, null default - boolean_null_optional_key?: WithDefault, - boolean_null_optional_both?: WithDefault, - - // String props - string_required: string, - string_optional_key?: WithDefault, - string_optional_both?: WithDefault, - - // String props, null default - string_null_optional_key?: WithDefault, - string_null_optional_both?: WithDefault, - - // Stringish props - stringish_required: Stringish, - stringish_optional_key?: WithDefault, - stringish_optional_both?: WithDefault, - - // Stringish props, null default - stringish_null_optional_key?: WithDefault, - stringish_null_optional_both?: WithDefault, - - // Double props - double_required: Double, - double_optional_key?: WithDefault, - double_optional_both?: WithDefault, - - // Float props - float_required: Float, - float_optional_key?: WithDefault, - float_optional_both?: WithDefault, - - // Float props, null default - float_null_optional_key?: WithDefault, - float_null_optional_both?: WithDefault, - - // Int32 props - int32_required: Int32, - int32_optional_key?: WithDefault, - int32_optional_both?: WithDefault, - - // String enum props - enum_optional_key?: WithDefault<'small' | 'large', 'small'>, - enum_optional_both?: WithDefault<'small' | 'large', 'small'>, - - // Int enum props - int_enum_optional_key?: WithDefault<0 | 1, 0>, - - // Object props - object_optional_key?: $ReadOnly<{| prop: string |}>, - object_optional_both?: ?$ReadOnly<{| prop: string |}>, - object_optional_value: ?$ReadOnly<{| prop: string |}>, - - // ImageSource props - image_required: ImageSource, - image_optional_value: ?ImageSource, - image_optional_both?: ?ImageSource, - - // ColorValue props - color_required: ColorValue, - color_optional_key?: ColorValue, - color_optional_value: ?ColorValue, - color_optional_both?: ?ColorValue, - - // ColorArrayValue props - color_array_required: ColorArrayValue, - color_array_optional_key?: ColorArrayValue, - color_array_optional_value: ?ColorArrayValue, - color_array_optional_both?: ?ColorArrayValue, - - // ProcessedColorValue props - processed_color_required: ProcessedColorValue, - processed_color_optional_key?: ProcessedColorValue, - processed_color_optional_value: ?ProcessedColorValue, - processed_color_optional_both?: ?ProcessedColorValue, - - // PointValue props - point_required: PointValue, - point_optional_key?: PointValue, - point_optional_value: ?PointValue, - point_optional_both?: ?PointValue, - - // EdgeInsets props - insets_required: EdgeInsetsValue, - insets_optional_key?: EdgeInsetsValue, - insets_optional_value: ?EdgeInsetsValue, - insets_optional_both?: ?EdgeInsetsValue, - - // DimensionValue props - dimension_required: DimensionValue, - dimension_optional_key?: DimensionValue, - dimension_optional_value: ?DimensionValue, - dimension_optional_both?: ?DimensionValue, - - // Mixed props - mixed_required: UnsafeMixed, - mixed_optional_key?: UnsafeMixed, -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; -const ARRAY_PROP_TYPES_NO_EVENTS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32, Double, Float, WithDefault} from 'CodegenTypes'; -import type {ImageSource} from 'ImageSource'; -import type {ColorValue, PointValue, ProcessColorValue, EdgeInsetsValue, DimensionValue} from 'StyleSheetTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -type ObjectType = $ReadOnly<{| prop: string |}>; -type ArrayObjectType = $ReadOnlyArray<$ReadOnly<{| prop: string |}>>; - -type ModuleProps = $ReadOnly<{| - ...ViewProps, - - // Props - // Boolean props - array_boolean_required: $ReadOnlyArray, - array_boolean_optional_key?: $ReadOnlyArray, - array_boolean_optional_value: ?$ReadOnlyArray, - array_boolean_optional_both?: ?$ReadOnlyArray, - - // String props - array_string_required: $ReadOnlyArray, - array_string_optional_key?: $ReadOnlyArray, - array_string_optional_value: ?$ReadOnlyArray, - array_string_optional_both?: ?$ReadOnlyArray, - - // Double props - array_double_required: $ReadOnlyArray, - array_double_optional_key?: $ReadOnlyArray, - array_double_optional_value: ?$ReadOnlyArray, - array_double_optional_both?: ?$ReadOnlyArray, - - // Float props - array_float_required: $ReadOnlyArray, - array_float_optional_key?: $ReadOnlyArray, - array_float_optional_value: ?$ReadOnlyArray, - array_float_optional_both?: ?$ReadOnlyArray, - - // Int32 props - array_int32_required: $ReadOnlyArray, - array_int32_optional_key?: $ReadOnlyArray, - array_int32_optional_value: ?$ReadOnlyArray, - array_int32_optional_both?: ?$ReadOnlyArray, - - // String enum props - array_enum_optional_key?: WithDefault< - $ReadOnlyArray<'small' | 'large'>, - 'small', - >, - array_enum_optional_both?: WithDefault< - $ReadOnlyArray<'small' | 'large'>, - 'small', - >, - - // ImageSource props - array_image_required: $ReadOnlyArray, - array_image_optional_key?: $ReadOnlyArray, - array_image_optional_value: ?$ReadOnlyArray, - array_image_optional_both?: ?$ReadOnlyArray, - - // ColorValue props - array_color_required: $ReadOnlyArray, - array_color_optional_key?: $ReadOnlyArray, - array_color_optional_value: ?$ReadOnlyArray, - array_color_optional_both?: ?$ReadOnlyArray, - - // PointValue props - array_point_required: $ReadOnlyArray, - array_point_optional_key?: $ReadOnlyArray, - array_point_optional_value: ?$ReadOnlyArray, - array_point_optional_both?: ?$ReadOnlyArray, - - // EdgeInsetsValue props - array_insets_required: $ReadOnlyArray, - array_insets_optional_key?: $ReadOnlyArray, - array_insets_optional_value: ?$ReadOnlyArray, - array_insets_optional_both?: ?$ReadOnlyArray, - - // DimensionValue props - array_dimension_required: $ReadOnlyArray, - array_dimension_optional_key?: $ReadOnlyArray, - array_dimension_optional_value: ?$ReadOnlyArray, - array_dimension_optional_both?: ?$ReadOnlyArray, - - // Object props - array_object_required: $ReadOnlyArray<$ReadOnly<{| prop: string |}>>, - array_object_optional_key?: $ReadOnlyArray<$ReadOnly<{| prop: string |}>>, - array_object_optional_value: ?ArrayObjectType, - array_object_optional_both?: ?$ReadOnlyArray, - - // Nested array object types - array_of_array_object_required: $ReadOnlyArray< - $ReadOnly<{| - // This needs to be the same name as the top level array above - array_object_required: $ReadOnlyArray<$ReadOnly<{| prop: string |}>>, - |}> - >, - array_of_array_object_optional_key?: $ReadOnlyArray< - $ReadOnly<{| - // This needs to be the same name as the top level array above - array_object_optional_key: $ReadOnlyArray<$ReadOnly<{| prop?: string |}>>, - |}> - >, - array_of_array_object_optional_value: ?$ReadOnlyArray< - $ReadOnly<{| - // This needs to be the same name as the top level array above - array_object_optional_value: $ReadOnlyArray<$ReadOnly<{| prop: ?string |}>>, - |}> - >, - array_of_array_object_optional_both?: ?$ReadOnlyArray< - $ReadOnly<{| - // This needs to be the same name as the top level array above - array_object_optional_both: $ReadOnlyArray<$ReadOnly<{| prop?: ?string |}>>, - |}> - >, - - // Nested array of array of object types - array_of_array_of_object_required: $ReadOnlyArray< - $ReadOnlyArray< - $ReadOnly<{| - prop: string, - |}>, - >, - >, - - // Nested array of array of object types (in file) - array_of_array_of_object_required_in_file: $ReadOnlyArray< - $ReadOnlyArray, - >, - - // Nested array of array of object types (with spread) - array_of_array_of_object_required_with_spread: $ReadOnlyArray< - $ReadOnlyArray< - $ReadOnly<{| - ...ObjectType - |}>, - >, - >, -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; -const OBJECT_PROP_TYPES_NO_EVENTS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32, Double, Float, WithDefault} from 'CodegenTypes'; -import type {ImageSource} from 'ImageSource'; -import type {ColorValue, PointValue, EdgeInsetsValue} from 'StyleSheetTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -type ModuleProps = $ReadOnly<{| - ...ViewProps, - - // Props - // Boolean props - boolean_required: $ReadOnly<{|prop: boolean|}>, - boolean_optional: $ReadOnly<{|prop?: WithDefault|}>, - - // String props - string_required: $ReadOnly<{|prop: string|}>, - string_optional: $ReadOnly<{|prop?: WithDefault|}>, - - // Double props - double_required: $ReadOnly<{|prop: Double|}>, - double_optional: $ReadOnly<{|prop?: WithDefault|}>, - - // Float props - float_required: $ReadOnly<{|prop: Float|}>, - float_optional: $ReadOnly<{|prop?: WithDefault|}>, - - // Int32 props - int_required: $ReadOnly<{|prop: Int32|}>, - int_optional: $ReadOnly<{|prop?: WithDefault|}>, - - // String enum props - enum_optional: $ReadOnly<{| - prop?: WithDefault<$ReadOnlyArray<'small' | 'large'>, 'small'>, - |}>, - - // ImageSource props - image_required: $ReadOnly<{|prop: ImageSource|}>, - image_optional_key: $ReadOnly<{|prop?: ImageSource|}>, - image_optional_value: $ReadOnly<{|prop: ?ImageSource|}>, - image_optional_both: $ReadOnly<{|prop?: ?ImageSource|}>, - - // ColorValue props - color_required: $ReadOnly<{|prop: ColorValue|}>, - color_optional_key: $ReadOnly<{|prop?: ColorValue|}>, - color_optional_value: $ReadOnly<{|prop: ?ColorValue|}>, - color_optional_both: $ReadOnly<{|prop?: ?ColorValue|}>, - - // ProcessedColorValue props - processed_color_required: $ReadOnly<{|prop: ProcessedColorValue|}>, - processed_color_optional_key: $ReadOnly<{|prop?: ProcessedColorValue|}>, - processed_color_optional_value: $ReadOnly<{|prop: ?ProcessedColorValue|}>, - processed_color_optional_both: $ReadOnly<{|prop?: ?ProcessedColorValue|}>, - - // PointValue props - point_required: $ReadOnly<{|prop: PointValue|}>, - point_optional_key: $ReadOnly<{|prop?: PointValue|}>, - point_optional_value: $ReadOnly<{|prop: ?PointValue|}>, - point_optional_both: $ReadOnly<{|prop?: ?PointValue|}>, - - // EdgeInsetsValue props - insets_required: $ReadOnly<{|prop: EdgeInsetsValue|}>, - insets_optional_key: $ReadOnly<{|prop?: EdgeInsetsValue|}>, - insets_optional_value: $ReadOnly<{|prop: ?EdgeInsetsValue|}>, - insets_optional_both: $ReadOnly<{|prop?: ?EdgeInsetsValue|}>, - - // DimensionValue props - dimension_required: $ReadOnly<{|prop: DimensionValue|}>, - dimension_optional_key: $ReadOnly<{|prop?: DimensionValue|}>, - dimension_optional_value: $ReadOnly<{|prop: ?DimensionValue|}>, - dimension_optional_both: $ReadOnly<{|prop?: ?DimensionValue|}>, - - // Nested object props - object_required: $ReadOnly<{|prop: $ReadOnly<{nestedProp: string}>|}>, - object_optional_key?: $ReadOnly<{|prop: $ReadOnly<{nestedProp: string}>|}>, - object_optional_value: ?$ReadOnly<{|prop: $ReadOnly<{nestedProp: string}>|}>, - object_optional_both?: ?$ReadOnly<{|prop: $ReadOnly<{nestedProp: string}>|}>, -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; -const PROPS_ALIASED_LOCALLY = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -type DeepSpread = $ReadOnly<{| - otherStringProp: string, -|}>; - -export type PropsInFile = $ReadOnly<{| - ...DeepSpread, - isEnabled: boolean, - label: string, -|}>; - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - - ...PropsInFile, - - localType: $ReadOnly<{| - ...PropsInFile - |}>, - - localArr: $ReadOnlyArray -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; -const EVENTS_DEFINED_INLINE_WITH_ALL_TYPES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -import type {HostComponent} from 'react-native'; -const codegenNativeComponent = require('codegenNativeComponent'); - -import type { - Int32, - Double, - Float, - BubblingEventHandler, - DirectEventHandler, -} from 'CodegenTypes'; - -import type {ViewProps} from 'ViewPropTypes'; - -type ModuleProps = $ReadOnly<{| - ...ViewProps, - // No Props - - // Events - onDirectEventDefinedInline: - DirectEventHandler< - $ReadOnly<{| - ${EVENT_DEFINITION} - |}>, - >, - - onDirectEventDefinedInlineOptionalKey?: - DirectEventHandler< - $ReadOnly<{| - ${EVENT_DEFINITION} - |}>, - >, - - onDirectEventDefinedInlineOptionalValue: ? - DirectEventHandler< - $ReadOnly<{| - ${EVENT_DEFINITION} - |}>, - >, - - onDirectEventDefinedInlineOptionalBoth?: ? - DirectEventHandler< - $ReadOnly<{| - ${EVENT_DEFINITION} - |}>, - >, - - onDirectEventDefinedInlineWithPaperName?: ? - DirectEventHandler< - $ReadOnly<{| - ${EVENT_DEFINITION} - |}>, - 'paperDirectEventDefinedInlineWithPaperName', - >, - - onBubblingEventDefinedInline: - BubblingEventHandler< - $ReadOnly<{| - ${EVENT_DEFINITION} - |}>, - >, - - onBubblingEventDefinedInlineOptionalKey?: - BubblingEventHandler< - $ReadOnly<{| - ${EVENT_DEFINITION} - |}>, - >, - - onBubblingEventDefinedInlineOptionalValue: ? - BubblingEventHandler< - $ReadOnly<{| - ${EVENT_DEFINITION} - |}>, - >, - - onBubblingEventDefinedInlineOptionalBoth?: ? - BubblingEventHandler< - $ReadOnly<{| - ${EVENT_DEFINITION} - |}>, - >, - - onBubblingEventDefinedInlineWithPaperName?: ? - BubblingEventHandler< - $ReadOnly<{| - ${EVENT_DEFINITION} - |}>, - 'paperBubblingEventDefinedInlineWithPaperName' - >, -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; -const EVENTS_DEFINED_AS_NULL_INLINE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {BubblingEventHandler, DirectEventHandler} from 'CodegenTypese'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -type ModuleProps = $ReadOnly<{| - ...ViewProps, - - // No props - - // Events defined inline - onDirectEventDefinedInlineNull: DirectEventHandler, - onDirectEventDefinedInlineNullOptionalKey?: DirectEventHandler, - onDirectEventDefinedInlineNullOptionalValue: ?DirectEventHandler, - onDirectEventDefinedInlineNullOptionalBoth?: DirectEventHandler, - onDirectEventDefinedInlineNullWithPaperName?: ?DirectEventHandler< - null, - 'paperDirectEventDefinedInlineNullWithPaperName', - >, - - onBubblingEventDefinedInlineNull: BubblingEventHandler, - onBubblingEventDefinedInlineNullOptionalKey?: BubblingEventHandler, - onBubblingEventDefinedInlineNullOptionalValue: ?BubblingEventHandler, - onBubblingEventDefinedInlineNullOptionalBoth?: ?BubblingEventHandler, - onBubblingEventDefinedInlineNullWithPaperName?: ?BubblingEventHandler< - null, - 'paperBubblingEventDefinedInlineNullWithPaperName', - >, -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; -const PROPS_AND_EVENTS_TYPES_EXPORTED = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -import type { - BubblingEventHandler, - DirectEventHandler, -} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -export type EventInFile = $ReadOnly<{| - ${EVENT_DEFINITION} -|}>; - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - - // No props - - // Events defined inline - onBubblingEventDefinedInline: BubblingEventHandler, - onBubblingEventDefinedInlineWithPaperName: BubblingEventHandler, - onDirectEventDefinedInline: DirectEventHandler, - onDirectEventDefinedInlineWithPaperName: DirectEventHandler, -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; -const PROPS_AS_EXTERNAL_TYPES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {HostComponent} from 'react-native'; - -export type String = string; -export type AnotherArray = $ReadOnlyArray; - -export type ModuleProps = $ReadOnly<{| - disable: String, - array: AnotherArray, -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; -const COMMANDS_DEFINED_WITH_ALL_TYPES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32, Double, Float} from 'CodegenTypes'; -import type {RootTag} from 'RCTExport'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - // No props or events -|}>; - -type NativeType = HostComponent; - -interface NativeCommands { - +handleRootTag: (viewRef: React.ElementRef, rootTag: RootTag) => void; - +hotspotUpdate: (viewRef: React.ElementRef, x: Int32, y: Int32) => void; - scrollTo( - viewRef: React.ElementRef, - x: Float, - y: Int32, - z: Double, - animated: boolean, - ): void; -} - -export const Commands = codegenNativeCommands({ - supportedCommands: ['handleRootTag', 'hotspotUpdate', 'scrollTo'], -}); - -export default (codegenNativeComponent( - 'Module', -): NativeType); -`; -const COMMANDS_WITH_EXTERNAL_TYPES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export type Boolean = boolean; -export type Int = Int32; -export type Void = void; - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - // No props or events -|}>; - -type NativeType = HostComponent; - -export type ScrollTo = ( - viewRef: React.ElementRef, - y: Int, - animated: Boolean, -) => Void; - -interface NativeCommands { - +scrollTo: ScrollTo; - +addOverlays: ( - viewRef: React.ElementRef, - overlayColorsReadOnly: $ReadOnlyArray, - overlayColorsArray: Array, - overlayColorsArrayAnnotation: string[], - ) => void; -} - -export const Commands = codegenNativeCommands({ - supportedCommands: ['scrollTo', 'addOverlays'], -}); - -export default (codegenNativeComponent( - 'Module', -): NativeType); -`; -const COMMANDS_EVENTS_TYPES_EXPORTED = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -import type { - BubblingEventHandler, - DirectEventHandler, -} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -export type EventInFile = $ReadOnly<{| - ${EVENT_DEFINITION} -|}>; - -export type Boolean = boolean; -export type Int = Int32; -export type Void = void; - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - - // No props - - // Events defined inline - onBubblingEventDefinedInline: BubblingEventHandler, - onBubblingEventDefinedInlineWithPaperName: BubblingEventHandler, - onDirectEventDefinedInline: DirectEventHandler, - onDirectEventDefinedInlineWithPaperName: DirectEventHandler, -|}>; - -type NativeType = HostComponent; - -export type ScrollTo = (viewRef: React.ElementRef, y: Int, animated: Boolean) => Void; - -interface NativeCommands { - +scrollTo: ScrollTo; -} - -export const Commands = codegenNativeCommands({ - supportedCommands: ['scrollTo'] -}); - -export default (codegenNativeComponent( - 'Module', -): NativeType); -`; -module.exports = { - ALL_PROP_TYPES_NO_EVENTS, - ARRAY_PROP_TYPES_NO_EVENTS, - OBJECT_PROP_TYPES_NO_EVENTS, - PROPS_ALIASED_LOCALLY, - ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS, - ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS_NO_CAST, - NO_PROPS_EVENTS_ONLY_DEPRECATED_VIEW_CONFIG_NAME_OPTION, - EVENTS_DEFINED_INLINE_WITH_ALL_TYPES, - EVENTS_DEFINED_AS_NULL_INLINE, - PROPS_AND_EVENTS_TYPES_EXPORTED, - COMMANDS_EVENTS_TYPES_EXPORTED, - COMMANDS_DEFINED_WITH_ALL_TYPES, - PROPS_AS_EXTERNAL_TYPES, - COMMANDS_WITH_EXTERNAL_TYPES, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/flow/components/__test_fixtures__/fixtures.js.flow b/node_modules/@react-native/codegen/lib/parsers/flow/components/__test_fixtures__/fixtures.js.flow deleted file mode 100644 index 7b93444fe..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/flow/components/__test_fixtures__/fixtures.js.flow +++ /dev/null @@ -1,1095 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -// @licenselint-loose-mode - -'use strict'; - -const EVENT_DEFINITION = ` - boolean_required: boolean, - boolean_optional_key?: boolean, - boolean_optional_value: ?boolean, - boolean_optional_both?: ?boolean, - - string_required: string, - string_optional_key?: string, - string_optional_value: ?string, - string_optional_both?: ?string, - - double_required: Double, - double_optional_key?: Double, - double_optional_value: ?Double, - double_optional_both?: ?Double, - - float_required: Float, - float_optional_key?: Float, - float_optional_value: ?Float, - float_optional_both?: ?Float, - - int32_required: Int32, - int32_optional_key?: Int32, - int32_optional_value: ?Int32, - int32_optional_both?: ?Int32, - - enum_required: ('small' | 'large'), - enum_optional_key?: ('small' | 'large'), - enum_optional_value: ?('small' | 'large'), - enum_optional_both?: ?('small' | 'large'), - - object_required: { - boolean_required: boolean, - }, - - object_optional_key?: { - string_optional_key?: string, - }, - - object_optional_value: ?{ - float_optional_value: ?Float, - }, - - object_optional_both?: ?{ - int32_optional_both?: ?Int32, - }, - - object_required_nested_2_layers: { - object_optional_nested_1_layer?: ?{ - boolean_required: Int32, - string_optional_key?: string, - double_optional_value: ?Double, - float_optional_value: ?Float, - int32_optional_both?: ?Int32, - } - }, - - object_readonly_required: $ReadOnly<{ - boolean_required: boolean, - }>, - - object_readonly_optional_key?: $ReadOnly<{ - string_optional_key?: string, - }>, - - object_readonly_optional_value: ?$ReadOnly<{ - float_optional_value: ?Float, - }>, - - object_readonly_optional_both?: ?$ReadOnly<{ - int32_optional_both?: ?Int32, - }>, - - boolean_array_required: $ReadOnlyArray, - boolean_array_optional_key?: boolean[], - boolean_array_optional_value: ?$ReadOnlyArray, - boolean_array_optional_both?: ?boolean[], - - string_array_required: $ReadOnlyArray, - string_array_optional_key?: string[], - string_array_optional_value: ?$ReadOnlyArray, - string_array_optional_both?: ?string[], - - double_array_required: $ReadOnlyArray, - double_array_optional_key?: Double[], - double_array_optional_value: ?$ReadOnlyArray, - double_array_optional_both?: ?Double[], - - float_array_required: $ReadOnlyArray, - float_array_optional_key?: Float[], - float_array_optional_value: ?$ReadOnlyArray, - float_array_optional_both?: ?Float[], - - int32_array_required: $ReadOnlyArray, - int32_array_optional_key?: Int32[], - int32_array_optional_value: ?$ReadOnlyArray, - int32_array_optional_both?: ?Int32[], - - enum_array_required: $ReadOnlyArray<('small' | 'large')>, - enum_array_optional_key?: ('small' | 'large')[], - enum_array_optional_value: ?$ReadOnlyArray<('small' | 'large')>, - enum_array_optional_both?: ?('small' | 'large')[], - - object_array_required: $ReadOnlyArray<{ - boolean_required: boolean, - }>, - - object_array_optional_key?: { - string_optional_key?: string, - }[], - - object_array_optional_value: ?$ReadOnlyArray<{ - float_optional_value: ?Float, - }>, - - object_array_optional_both?: ?{ - int32_optional_both?: ?Int32, - }[], - - int32_array_array_required: $ReadOnlyArray<$ReadOnlyArray>, - int32_array_array_optional_key?: Int32[][], - int32_array_array_optional_value: ?$ReadOnlyArray<$ReadOnlyArray>, - int32_array_array_optional_both?: ?Int32[][], -`; - -const ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type { - BubblingEventHandler, - DirectEventHandler, - WithDefault, -} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -type ModuleProps = $ReadOnly<{| - ...ViewProps, - - // Props - boolean_default_true_optional_both?: WithDefault, - - // Events - onDirectEventDefinedInlineNull: DirectEventHandler, - onBubblingEventDefinedInlineNull: BubblingEventHandler, -|}>; - -export default (codegenNativeComponent('Module', { - interfaceOnly: true, - paperComponentName: 'RCTModule', -}): HostComponent); -`; - -const ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS_NO_CAST = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type { - BubblingEventHandler, - DirectEventHandler, - WithDefault, -} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -type ModuleProps = $ReadOnly<{| - ...ViewProps, - - // Props - boolean_default_true_optional_both?: WithDefault, - - // Events - onDirectEventDefinedInlineNull: DirectEventHandler, - onBubblingEventDefinedInlineNull: BubblingEventHandler, -|}>; - -export default codegenNativeComponent('Module', { - interfaceOnly: true, - excludedPlatforms: ['android'], - paperComponentName: 'RCTModule', -}); -`; - -const NO_PROPS_EVENTS_ONLY_DEPRECATED_VIEW_CONFIG_NAME_OPTION = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -type ModuleProps = $ReadOnly<{| - ...ViewProps, -|}>; - -export default (codegenNativeComponent('Module', { - deprecatedViewConfigName: 'DeprecateModuleName', -}): HostComponent); -`; - -const ALL_PROP_TYPES_NO_EVENTS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32, Double, Float, WithDefault, UnsafeMixed} from 'CodegenTypes'; -import type {ImageSource} from 'ImageSource'; -import type {ColorValue, ColorArrayValue, PointValue, EdgeInsetsValue, DimensionValue} from 'StyleSheetTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -type ModuleProps = $ReadOnly<{| - ...ViewProps, - - // Props - // Boolean props - boolean_required: boolean, - boolean_optional_key?: WithDefault, - boolean_optional_both?: WithDefault, - - // Boolean props, null default - boolean_null_optional_key?: WithDefault, - boolean_null_optional_both?: WithDefault, - - // String props - string_required: string, - string_optional_key?: WithDefault, - string_optional_both?: WithDefault, - - // String props, null default - string_null_optional_key?: WithDefault, - string_null_optional_both?: WithDefault, - - // Stringish props - stringish_required: Stringish, - stringish_optional_key?: WithDefault, - stringish_optional_both?: WithDefault, - - // Stringish props, null default - stringish_null_optional_key?: WithDefault, - stringish_null_optional_both?: WithDefault, - - // Double props - double_required: Double, - double_optional_key?: WithDefault, - double_optional_both?: WithDefault, - - // Float props - float_required: Float, - float_optional_key?: WithDefault, - float_optional_both?: WithDefault, - - // Float props, null default - float_null_optional_key?: WithDefault, - float_null_optional_both?: WithDefault, - - // Int32 props - int32_required: Int32, - int32_optional_key?: WithDefault, - int32_optional_both?: WithDefault, - - // String enum props - enum_optional_key?: WithDefault<'small' | 'large', 'small'>, - enum_optional_both?: WithDefault<'small' | 'large', 'small'>, - - // Int enum props - int_enum_optional_key?: WithDefault<0 | 1, 0>, - - // Object props - object_optional_key?: $ReadOnly<{| prop: string |}>, - object_optional_both?: ?$ReadOnly<{| prop: string |}>, - object_optional_value: ?$ReadOnly<{| prop: string |}>, - - // ImageSource props - image_required: ImageSource, - image_optional_value: ?ImageSource, - image_optional_both?: ?ImageSource, - - // ColorValue props - color_required: ColorValue, - color_optional_key?: ColorValue, - color_optional_value: ?ColorValue, - color_optional_both?: ?ColorValue, - - // ColorArrayValue props - color_array_required: ColorArrayValue, - color_array_optional_key?: ColorArrayValue, - color_array_optional_value: ?ColorArrayValue, - color_array_optional_both?: ?ColorArrayValue, - - // ProcessedColorValue props - processed_color_required: ProcessedColorValue, - processed_color_optional_key?: ProcessedColorValue, - processed_color_optional_value: ?ProcessedColorValue, - processed_color_optional_both?: ?ProcessedColorValue, - - // PointValue props - point_required: PointValue, - point_optional_key?: PointValue, - point_optional_value: ?PointValue, - point_optional_both?: ?PointValue, - - // EdgeInsets props - insets_required: EdgeInsetsValue, - insets_optional_key?: EdgeInsetsValue, - insets_optional_value: ?EdgeInsetsValue, - insets_optional_both?: ?EdgeInsetsValue, - - // DimensionValue props - dimension_required: DimensionValue, - dimension_optional_key?: DimensionValue, - dimension_optional_value: ?DimensionValue, - dimension_optional_both?: ?DimensionValue, - - // Mixed props - mixed_required: UnsafeMixed, - mixed_optional_key?: UnsafeMixed, -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; - -const ARRAY_PROP_TYPES_NO_EVENTS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32, Double, Float, WithDefault} from 'CodegenTypes'; -import type {ImageSource} from 'ImageSource'; -import type {ColorValue, PointValue, ProcessColorValue, EdgeInsetsValue, DimensionValue} from 'StyleSheetTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -type ObjectType = $ReadOnly<{| prop: string |}>; -type ArrayObjectType = $ReadOnlyArray<$ReadOnly<{| prop: string |}>>; - -type ModuleProps = $ReadOnly<{| - ...ViewProps, - - // Props - // Boolean props - array_boolean_required: $ReadOnlyArray, - array_boolean_optional_key?: $ReadOnlyArray, - array_boolean_optional_value: ?$ReadOnlyArray, - array_boolean_optional_both?: ?$ReadOnlyArray, - - // String props - array_string_required: $ReadOnlyArray, - array_string_optional_key?: $ReadOnlyArray, - array_string_optional_value: ?$ReadOnlyArray, - array_string_optional_both?: ?$ReadOnlyArray, - - // Double props - array_double_required: $ReadOnlyArray, - array_double_optional_key?: $ReadOnlyArray, - array_double_optional_value: ?$ReadOnlyArray, - array_double_optional_both?: ?$ReadOnlyArray, - - // Float props - array_float_required: $ReadOnlyArray, - array_float_optional_key?: $ReadOnlyArray, - array_float_optional_value: ?$ReadOnlyArray, - array_float_optional_both?: ?$ReadOnlyArray, - - // Int32 props - array_int32_required: $ReadOnlyArray, - array_int32_optional_key?: $ReadOnlyArray, - array_int32_optional_value: ?$ReadOnlyArray, - array_int32_optional_both?: ?$ReadOnlyArray, - - // String enum props - array_enum_optional_key?: WithDefault< - $ReadOnlyArray<'small' | 'large'>, - 'small', - >, - array_enum_optional_both?: WithDefault< - $ReadOnlyArray<'small' | 'large'>, - 'small', - >, - - // ImageSource props - array_image_required: $ReadOnlyArray, - array_image_optional_key?: $ReadOnlyArray, - array_image_optional_value: ?$ReadOnlyArray, - array_image_optional_both?: ?$ReadOnlyArray, - - // ColorValue props - array_color_required: $ReadOnlyArray, - array_color_optional_key?: $ReadOnlyArray, - array_color_optional_value: ?$ReadOnlyArray, - array_color_optional_both?: ?$ReadOnlyArray, - - // PointValue props - array_point_required: $ReadOnlyArray, - array_point_optional_key?: $ReadOnlyArray, - array_point_optional_value: ?$ReadOnlyArray, - array_point_optional_both?: ?$ReadOnlyArray, - - // EdgeInsetsValue props - array_insets_required: $ReadOnlyArray, - array_insets_optional_key?: $ReadOnlyArray, - array_insets_optional_value: ?$ReadOnlyArray, - array_insets_optional_both?: ?$ReadOnlyArray, - - // DimensionValue props - array_dimension_required: $ReadOnlyArray, - array_dimension_optional_key?: $ReadOnlyArray, - array_dimension_optional_value: ?$ReadOnlyArray, - array_dimension_optional_both?: ?$ReadOnlyArray, - - // Object props - array_object_required: $ReadOnlyArray<$ReadOnly<{| prop: string |}>>, - array_object_optional_key?: $ReadOnlyArray<$ReadOnly<{| prop: string |}>>, - array_object_optional_value: ?ArrayObjectType, - array_object_optional_both?: ?$ReadOnlyArray, - - // Nested array object types - array_of_array_object_required: $ReadOnlyArray< - $ReadOnly<{| - // This needs to be the same name as the top level array above - array_object_required: $ReadOnlyArray<$ReadOnly<{| prop: string |}>>, - |}> - >, - array_of_array_object_optional_key?: $ReadOnlyArray< - $ReadOnly<{| - // This needs to be the same name as the top level array above - array_object_optional_key: $ReadOnlyArray<$ReadOnly<{| prop?: string |}>>, - |}> - >, - array_of_array_object_optional_value: ?$ReadOnlyArray< - $ReadOnly<{| - // This needs to be the same name as the top level array above - array_object_optional_value: $ReadOnlyArray<$ReadOnly<{| prop: ?string |}>>, - |}> - >, - array_of_array_object_optional_both?: ?$ReadOnlyArray< - $ReadOnly<{| - // This needs to be the same name as the top level array above - array_object_optional_both: $ReadOnlyArray<$ReadOnly<{| prop?: ?string |}>>, - |}> - >, - - // Nested array of array of object types - array_of_array_of_object_required: $ReadOnlyArray< - $ReadOnlyArray< - $ReadOnly<{| - prop: string, - |}>, - >, - >, - - // Nested array of array of object types (in file) - array_of_array_of_object_required_in_file: $ReadOnlyArray< - $ReadOnlyArray, - >, - - // Nested array of array of object types (with spread) - array_of_array_of_object_required_with_spread: $ReadOnlyArray< - $ReadOnlyArray< - $ReadOnly<{| - ...ObjectType - |}>, - >, - >, -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; - -const OBJECT_PROP_TYPES_NO_EVENTS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32, Double, Float, WithDefault} from 'CodegenTypes'; -import type {ImageSource} from 'ImageSource'; -import type {ColorValue, PointValue, EdgeInsetsValue} from 'StyleSheetTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -type ModuleProps = $ReadOnly<{| - ...ViewProps, - - // Props - // Boolean props - boolean_required: $ReadOnly<{|prop: boolean|}>, - boolean_optional: $ReadOnly<{|prop?: WithDefault|}>, - - // String props - string_required: $ReadOnly<{|prop: string|}>, - string_optional: $ReadOnly<{|prop?: WithDefault|}>, - - // Double props - double_required: $ReadOnly<{|prop: Double|}>, - double_optional: $ReadOnly<{|prop?: WithDefault|}>, - - // Float props - float_required: $ReadOnly<{|prop: Float|}>, - float_optional: $ReadOnly<{|prop?: WithDefault|}>, - - // Int32 props - int_required: $ReadOnly<{|prop: Int32|}>, - int_optional: $ReadOnly<{|prop?: WithDefault|}>, - - // String enum props - enum_optional: $ReadOnly<{| - prop?: WithDefault<$ReadOnlyArray<'small' | 'large'>, 'small'>, - |}>, - - // ImageSource props - image_required: $ReadOnly<{|prop: ImageSource|}>, - image_optional_key: $ReadOnly<{|prop?: ImageSource|}>, - image_optional_value: $ReadOnly<{|prop: ?ImageSource|}>, - image_optional_both: $ReadOnly<{|prop?: ?ImageSource|}>, - - // ColorValue props - color_required: $ReadOnly<{|prop: ColorValue|}>, - color_optional_key: $ReadOnly<{|prop?: ColorValue|}>, - color_optional_value: $ReadOnly<{|prop: ?ColorValue|}>, - color_optional_both: $ReadOnly<{|prop?: ?ColorValue|}>, - - // ProcessedColorValue props - processed_color_required: $ReadOnly<{|prop: ProcessedColorValue|}>, - processed_color_optional_key: $ReadOnly<{|prop?: ProcessedColorValue|}>, - processed_color_optional_value: $ReadOnly<{|prop: ?ProcessedColorValue|}>, - processed_color_optional_both: $ReadOnly<{|prop?: ?ProcessedColorValue|}>, - - // PointValue props - point_required: $ReadOnly<{|prop: PointValue|}>, - point_optional_key: $ReadOnly<{|prop?: PointValue|}>, - point_optional_value: $ReadOnly<{|prop: ?PointValue|}>, - point_optional_both: $ReadOnly<{|prop?: ?PointValue|}>, - - // EdgeInsetsValue props - insets_required: $ReadOnly<{|prop: EdgeInsetsValue|}>, - insets_optional_key: $ReadOnly<{|prop?: EdgeInsetsValue|}>, - insets_optional_value: $ReadOnly<{|prop: ?EdgeInsetsValue|}>, - insets_optional_both: $ReadOnly<{|prop?: ?EdgeInsetsValue|}>, - - // DimensionValue props - dimension_required: $ReadOnly<{|prop: DimensionValue|}>, - dimension_optional_key: $ReadOnly<{|prop?: DimensionValue|}>, - dimension_optional_value: $ReadOnly<{|prop: ?DimensionValue|}>, - dimension_optional_both: $ReadOnly<{|prop?: ?DimensionValue|}>, - - // Nested object props - object_required: $ReadOnly<{|prop: $ReadOnly<{nestedProp: string}>|}>, - object_optional_key?: $ReadOnly<{|prop: $ReadOnly<{nestedProp: string}>|}>, - object_optional_value: ?$ReadOnly<{|prop: $ReadOnly<{nestedProp: string}>|}>, - object_optional_both?: ?$ReadOnly<{|prop: $ReadOnly<{nestedProp: string}>|}>, -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; - -const PROPS_ALIASED_LOCALLY = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -type DeepSpread = $ReadOnly<{| - otherStringProp: string, -|}>; - -export type PropsInFile = $ReadOnly<{| - ...DeepSpread, - isEnabled: boolean, - label: string, -|}>; - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - - ...PropsInFile, - - localType: $ReadOnly<{| - ...PropsInFile - |}>, - - localArr: $ReadOnlyArray -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; - -const EVENTS_DEFINED_INLINE_WITH_ALL_TYPES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -import type {HostComponent} from 'react-native'; -const codegenNativeComponent = require('codegenNativeComponent'); - -import type { - Int32, - Double, - Float, - BubblingEventHandler, - DirectEventHandler, -} from 'CodegenTypes'; - -import type {ViewProps} from 'ViewPropTypes'; - -type ModuleProps = $ReadOnly<{| - ...ViewProps, - // No Props - - // Events - onDirectEventDefinedInline: - DirectEventHandler< - $ReadOnly<{| - ${EVENT_DEFINITION} - |}>, - >, - - onDirectEventDefinedInlineOptionalKey?: - DirectEventHandler< - $ReadOnly<{| - ${EVENT_DEFINITION} - |}>, - >, - - onDirectEventDefinedInlineOptionalValue: ? - DirectEventHandler< - $ReadOnly<{| - ${EVENT_DEFINITION} - |}>, - >, - - onDirectEventDefinedInlineOptionalBoth?: ? - DirectEventHandler< - $ReadOnly<{| - ${EVENT_DEFINITION} - |}>, - >, - - onDirectEventDefinedInlineWithPaperName?: ? - DirectEventHandler< - $ReadOnly<{| - ${EVENT_DEFINITION} - |}>, - 'paperDirectEventDefinedInlineWithPaperName', - >, - - onBubblingEventDefinedInline: - BubblingEventHandler< - $ReadOnly<{| - ${EVENT_DEFINITION} - |}>, - >, - - onBubblingEventDefinedInlineOptionalKey?: - BubblingEventHandler< - $ReadOnly<{| - ${EVENT_DEFINITION} - |}>, - >, - - onBubblingEventDefinedInlineOptionalValue: ? - BubblingEventHandler< - $ReadOnly<{| - ${EVENT_DEFINITION} - |}>, - >, - - onBubblingEventDefinedInlineOptionalBoth?: ? - BubblingEventHandler< - $ReadOnly<{| - ${EVENT_DEFINITION} - |}>, - >, - - onBubblingEventDefinedInlineWithPaperName?: ? - BubblingEventHandler< - $ReadOnly<{| - ${EVENT_DEFINITION} - |}>, - 'paperBubblingEventDefinedInlineWithPaperName' - >, -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; - -const EVENTS_DEFINED_AS_NULL_INLINE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {BubblingEventHandler, DirectEventHandler} from 'CodegenTypese'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -type ModuleProps = $ReadOnly<{| - ...ViewProps, - - // No props - - // Events defined inline - onDirectEventDefinedInlineNull: DirectEventHandler, - onDirectEventDefinedInlineNullOptionalKey?: DirectEventHandler, - onDirectEventDefinedInlineNullOptionalValue: ?DirectEventHandler, - onDirectEventDefinedInlineNullOptionalBoth?: DirectEventHandler, - onDirectEventDefinedInlineNullWithPaperName?: ?DirectEventHandler< - null, - 'paperDirectEventDefinedInlineNullWithPaperName', - >, - - onBubblingEventDefinedInlineNull: BubblingEventHandler, - onBubblingEventDefinedInlineNullOptionalKey?: BubblingEventHandler, - onBubblingEventDefinedInlineNullOptionalValue: ?BubblingEventHandler, - onBubblingEventDefinedInlineNullOptionalBoth?: ?BubblingEventHandler, - onBubblingEventDefinedInlineNullWithPaperName?: ?BubblingEventHandler< - null, - 'paperBubblingEventDefinedInlineNullWithPaperName', - >, -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; - -const PROPS_AND_EVENTS_TYPES_EXPORTED = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -import type { - BubblingEventHandler, - DirectEventHandler, -} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -export type EventInFile = $ReadOnly<{| - ${EVENT_DEFINITION} -|}>; - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - - // No props - - // Events defined inline - onBubblingEventDefinedInline: BubblingEventHandler, - onBubblingEventDefinedInlineWithPaperName: BubblingEventHandler, - onDirectEventDefinedInline: DirectEventHandler, - onDirectEventDefinedInlineWithPaperName: DirectEventHandler, -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; - -const PROPS_AS_EXTERNAL_TYPES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {HostComponent} from 'react-native'; - -export type String = string; -export type AnotherArray = $ReadOnlyArray; - -export type ModuleProps = $ReadOnly<{| - disable: String, - array: AnotherArray, -|}>; - -export default (codegenNativeComponent( - 'Module', -): HostComponent); -`; - -const COMMANDS_DEFINED_WITH_ALL_TYPES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32, Double, Float} from 'CodegenTypes'; -import type {RootTag} from 'RCTExport'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - // No props or events -|}>; - -type NativeType = HostComponent; - -interface NativeCommands { - +handleRootTag: (viewRef: React.ElementRef, rootTag: RootTag) => void; - +hotspotUpdate: (viewRef: React.ElementRef, x: Int32, y: Int32) => void; - scrollTo( - viewRef: React.ElementRef, - x: Float, - y: Int32, - z: Double, - animated: boolean, - ): void; -} - -export const Commands = codegenNativeCommands({ - supportedCommands: ['handleRootTag', 'hotspotUpdate', 'scrollTo'], -}); - -export default (codegenNativeComponent( - 'Module', -): NativeType); -`; - -const COMMANDS_WITH_EXTERNAL_TYPES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export type Boolean = boolean; -export type Int = Int32; -export type Void = void; - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - // No props or events -|}>; - -type NativeType = HostComponent; - -export type ScrollTo = ( - viewRef: React.ElementRef, - y: Int, - animated: Boolean, -) => Void; - -interface NativeCommands { - +scrollTo: ScrollTo; - +addOverlays: ( - viewRef: React.ElementRef, - overlayColorsReadOnly: $ReadOnlyArray, - overlayColorsArray: Array, - overlayColorsArrayAnnotation: string[], - ) => void; -} - -export const Commands = codegenNativeCommands({ - supportedCommands: ['scrollTo', 'addOverlays'], -}); - -export default (codegenNativeComponent( - 'Module', -): NativeType); -`; - -const COMMANDS_EVENTS_TYPES_EXPORTED = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -import type { - BubblingEventHandler, - DirectEventHandler, -} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -export type EventInFile = $ReadOnly<{| - ${EVENT_DEFINITION} -|}>; - -export type Boolean = boolean; -export type Int = Int32; -export type Void = void; - -export type ModuleProps = $ReadOnly<{| - ...ViewProps, - - // No props - - // Events defined inline - onBubblingEventDefinedInline: BubblingEventHandler, - onBubblingEventDefinedInlineWithPaperName: BubblingEventHandler, - onDirectEventDefinedInline: DirectEventHandler, - onDirectEventDefinedInlineWithPaperName: DirectEventHandler, -|}>; - -type NativeType = HostComponent; - -export type ScrollTo = (viewRef: React.ElementRef, y: Int, animated: Boolean) => Void; - -interface NativeCommands { - +scrollTo: ScrollTo; -} - -export const Commands = codegenNativeCommands({ - supportedCommands: ['scrollTo'] -}); - -export default (codegenNativeComponent( - 'Module', -): NativeType); -`; - -module.exports = { - ALL_PROP_TYPES_NO_EVENTS, - ARRAY_PROP_TYPES_NO_EVENTS, - OBJECT_PROP_TYPES_NO_EVENTS, - PROPS_ALIASED_LOCALLY, - ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS, - ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS_NO_CAST, - NO_PROPS_EVENTS_ONLY_DEPRECATED_VIEW_CONFIG_NAME_OPTION, - EVENTS_DEFINED_INLINE_WITH_ALL_TYPES, - EVENTS_DEFINED_AS_NULL_INLINE, - PROPS_AND_EVENTS_TYPES_EXPORTED, - COMMANDS_EVENTS_TYPES_EXPORTED, - COMMANDS_DEFINED_WITH_ALL_TYPES, - PROPS_AS_EXTERNAL_TYPES, - COMMANDS_WITH_EXTERNAL_TYPES, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/flow/components/commands.js b/node_modules/@react-native/codegen/lib/parsers/flow/components/commands.js deleted file mode 100644 index 2681127ca..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/flow/components/commands.js +++ /dev/null @@ -1,131 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('../utils.js'), - getValueFromTypes = _require.getValueFromTypes; - -// $FlowFixMe[unclear-type] there's no flowtype for ASTs - -function buildCommandSchema(property, types) { - const name = property.key.name; - const optional = property.optional; - const value = getValueFromTypes(property.value, types); - const firstParam = value.params[0].typeAnnotation; - if ( - !( - firstParam.id != null && - firstParam.id.type === 'QualifiedTypeIdentifier' && - firstParam.id.qualification.name === 'React' && - firstParam.id.id.name === 'ElementRef' - ) - ) { - throw new Error( - `The first argument of method ${name} must be of type React.ElementRef<>`, - ); - } - const params = value.params.slice(1).map(param => { - const paramName = param.name.name; - const paramValue = getValueFromTypes(param.typeAnnotation, types); - const type = - paramValue.type === 'GenericTypeAnnotation' - ? paramValue.id.name - : paramValue.type; - let returnType; - switch (type) { - case 'RootTag': - returnType = { - type: 'ReservedTypeAnnotation', - name: 'RootTag', - }; - break; - case 'BooleanTypeAnnotation': - returnType = { - type: 'BooleanTypeAnnotation', - }; - break; - case 'Int32': - returnType = { - type: 'Int32TypeAnnotation', - }; - break; - case 'Double': - returnType = { - type: 'DoubleTypeAnnotation', - }; - break; - case 'Float': - returnType = { - type: 'FloatTypeAnnotation', - }; - break; - case 'StringTypeAnnotation': - returnType = { - type: 'StringTypeAnnotation', - }; - break; - case 'Array': - case '$ReadOnlyArray': - if (!paramValue.type === 'GenericTypeAnnotation') { - throw new Error( - 'Array and $ReadOnlyArray are GenericTypeAnnotation for array', - ); - } - returnType = { - type: 'ArrayTypeAnnotation', - elementType: { - // TODO: T172453752 support complex type annotation for array element - type: paramValue.typeParameters.params[0].type, - }, - }; - break; - case 'ArrayTypeAnnotation': - returnType = { - type: 'ArrayTypeAnnotation', - elementType: { - // TODO: T172453752 support complex type annotation for array element - type: paramValue.elementType.type, - }, - }; - break; - default: - type; - throw new Error( - `Unsupported param type for method "${name}", param "${paramName}". Found ${type}`, - ); - } - return { - name: paramName, - optional: false, - typeAnnotation: returnType, - }; - }); - return { - name, - optional, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - params, - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - }, - }; -} -function getCommands(commandTypeAST, types) { - return commandTypeAST - .filter(property => property.type === 'ObjectTypeProperty') - .map(property => buildCommandSchema(property, types)) - .filter(Boolean); -} -module.exports = { - getCommands, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/flow/components/commands.js.flow b/node_modules/@react-native/codegen/lib/parsers/flow/components/commands.js.flow deleted file mode 100644 index c8ce0b157..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/flow/components/commands.js.flow +++ /dev/null @@ -1,166 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type { - CommandParamTypeAnnotation, - CommandTypeAnnotation, - NamedShape, -} from '../../../CodegenSchema.js'; -import type {TypeDeclarationMap} from '../../utils'; - -const {getValueFromTypes} = require('../utils.js'); - -// $FlowFixMe[unclear-type] there's no flowtype for ASTs -type EventTypeAST = Object; - -function buildCommandSchema( - property: EventTypeAST, - types: TypeDeclarationMap, -): $ReadOnly<{ - name: string, - optional: boolean, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - params: $ReadOnlyArray<{ - name: string, - optional: boolean, - typeAnnotation: CommandParamTypeAnnotation, - }>, - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - }, -}> { - const name = property.key.name; - const optional = property.optional; - const value = getValueFromTypes(property.value, types); - - const firstParam = value.params[0].typeAnnotation; - - if ( - !( - firstParam.id != null && - firstParam.id.type === 'QualifiedTypeIdentifier' && - firstParam.id.qualification.name === 'React' && - firstParam.id.id.name === 'ElementRef' - ) - ) { - throw new Error( - `The first argument of method ${name} must be of type React.ElementRef<>`, - ); - } - - const params = value.params.slice(1).map(param => { - const paramName = param.name.name; - const paramValue = getValueFromTypes(param.typeAnnotation, types); - const type = - paramValue.type === 'GenericTypeAnnotation' - ? paramValue.id.name - : paramValue.type; - let returnType: CommandParamTypeAnnotation; - - switch (type) { - case 'RootTag': - returnType = { - type: 'ReservedTypeAnnotation', - name: 'RootTag', - }; - break; - case 'BooleanTypeAnnotation': - returnType = { - type: 'BooleanTypeAnnotation', - }; - break; - case 'Int32': - returnType = { - type: 'Int32TypeAnnotation', - }; - break; - case 'Double': - returnType = { - type: 'DoubleTypeAnnotation', - }; - break; - case 'Float': - returnType = { - type: 'FloatTypeAnnotation', - }; - break; - case 'StringTypeAnnotation': - returnType = { - type: 'StringTypeAnnotation', - }; - break; - case 'Array': - case '$ReadOnlyArray': - if (!paramValue.type === 'GenericTypeAnnotation') { - throw new Error( - 'Array and $ReadOnlyArray are GenericTypeAnnotation for array', - ); - } - returnType = { - type: 'ArrayTypeAnnotation', - elementType: { - // TODO: T172453752 support complex type annotation for array element - type: paramValue.typeParameters.params[0].type, - }, - }; - break; - case 'ArrayTypeAnnotation': - returnType = { - type: 'ArrayTypeAnnotation', - elementType: { - // TODO: T172453752 support complex type annotation for array element - type: paramValue.elementType.type, - }, - }; - break; - default: - (type: empty); - throw new Error( - `Unsupported param type for method "${name}", param "${paramName}". Found ${type}`, - ); - } - - return { - name: paramName, - optional: false, - typeAnnotation: returnType, - }; - }); - - return { - name, - optional, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - params, - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - }, - }; -} - -function getCommands( - commandTypeAST: $ReadOnlyArray, - types: TypeDeclarationMap, -): $ReadOnlyArray> { - return commandTypeAST - .filter(property => property.type === 'ObjectTypeProperty') - .map(property => buildCommandSchema(property, types)) - .filter(Boolean); -} - -module.exports = { - getCommands, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/flow/components/componentsUtils.js b/node_modules/@react-native/codegen/lib/parsers/flow/components/componentsUtils.js deleted file mode 100644 index b693ba834..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/flow/components/componentsUtils.js +++ /dev/null @@ -1,450 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('../../parsers-commons'), - verifyPropNotAlreadyDefined = _require.verifyPropNotAlreadyDefined; -const _require2 = require('../utils.js'), - getValueFromTypes = _require2.getValueFromTypes; - -// $FlowFixMe[unsupported-variance-annotation] -function getTypeAnnotationForArray( - name, - typeAnnotation, - defaultValue, - types, - parser, - buildSchema, -) { - const extractedTypeAnnotation = getValueFromTypes(typeAnnotation, types); - if (extractedTypeAnnotation.type === 'NullableTypeAnnotation') { - throw new Error( - 'Nested optionals such as "$ReadOnlyArray" are not supported, please declare optionals at the top level of value definitions as in "?$ReadOnlyArray"', - ); - } - if ( - extractedTypeAnnotation.type === 'GenericTypeAnnotation' && - parser.getTypeAnnotationName(extractedTypeAnnotation) === 'WithDefault' - ) { - throw new Error( - 'Nested defaults such as "$ReadOnlyArray>" are not supported, please declare defaults at the top level of value definitions as in "WithDefault<$ReadOnlyArray, false>"', - ); - } - if (extractedTypeAnnotation.type === 'GenericTypeAnnotation') { - // Resolve the type alias if it's not defined inline - const objectType = getValueFromTypes(extractedTypeAnnotation, types); - if (objectType.id.name === '$ReadOnly') { - return { - type: 'ObjectTypeAnnotation', - properties: flattenProperties( - objectType.typeParameters.params[0].properties, - types, - parser, - ) - .map(prop => buildSchema(prop, types, parser)) - .filter(Boolean), - }; - } - if (objectType.id.name === '$ReadOnlyArray') { - // We need to go yet another level deeper to resolve - // types that may be defined in a type alias - const nestedObjectType = getValueFromTypes( - objectType.typeParameters.params[0], - types, - ); - return { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ObjectTypeAnnotation', - properties: flattenProperties( - nestedObjectType.typeParameters.params[0].properties, - types, - parser, - ) - .map(prop => buildSchema(prop, types, parser)) - .filter(Boolean), - }, - }; - } - } - const type = - extractedTypeAnnotation.type === 'GenericTypeAnnotation' - ? parser.getTypeAnnotationName(extractedTypeAnnotation) - : extractedTypeAnnotation.type; - switch (type) { - case 'ImageSource': - return { - type: 'ReservedPropTypeAnnotation', - name: 'ImageSourcePrimitive', - }; - case 'ImageRequest': - return { - type: 'ReservedPropTypeAnnotation', - name: 'ImageRequestPrimitive', - }; - case 'ColorValue': - case 'ProcessedColorValue': - return { - type: 'ReservedPropTypeAnnotation', - name: 'ColorPrimitive', - }; - case 'PointValue': - return { - type: 'ReservedPropTypeAnnotation', - name: 'PointPrimitive', - }; - case 'EdgeInsetsValue': - return { - type: 'ReservedPropTypeAnnotation', - name: 'EdgeInsetsPrimitive', - }; - case 'DimensionValue': - return { - type: 'ReservedPropTypeAnnotation', - name: 'DimensionPrimitive', - }; - case 'Stringish': - return { - type: 'StringTypeAnnotation', - }; - case 'Int32': - return { - type: 'Int32TypeAnnotation', - }; - case 'Double': - return { - type: 'DoubleTypeAnnotation', - }; - case 'Float': - return { - type: 'FloatTypeAnnotation', - }; - case 'BooleanTypeAnnotation': - return { - type: 'BooleanTypeAnnotation', - }; - case 'StringTypeAnnotation': - return { - type: 'StringTypeAnnotation', - }; - case 'UnionTypeAnnotation': - typeAnnotation.types.reduce((lastType, currType) => { - if (lastType && currType.type !== lastType.type) { - throw new Error(`Mixed types are not supported (see "${name}")`); - } - return currType; - }); - if (defaultValue === null) { - throw new Error(`A default enum value is required for "${name}"`); - } - const unionType = typeAnnotation.types[0].type; - if (unionType === 'StringLiteralTypeAnnotation') { - return { - type: 'StringEnumTypeAnnotation', - default: defaultValue, - options: typeAnnotation.types.map(option => option.value), - }; - } else if (unionType === 'NumberLiteralTypeAnnotation') { - throw new Error( - `Arrays of int enums are not supported (see: "${name}")`, - ); - } else { - throw new Error( - `Unsupported union type for "${name}", received "${unionType}"`, - ); - } - default: - throw new Error(`Unknown property type for "${name}": ${type}`); - } -} -function flattenProperties(typeDefinition, types, parser) { - return typeDefinition - .map(property => { - if (property.type === 'ObjectTypeProperty') { - return property; - } else if (property.type === 'ObjectTypeSpreadProperty') { - return flattenProperties( - parser.getProperties(property.argument.id.name, types), - types, - parser, - ); - } - }) - .reduce((acc, item) => { - if (Array.isArray(item)) { - item.forEach(prop => { - verifyPropNotAlreadyDefined(acc, prop); - }); - return acc.concat(item); - } else { - verifyPropNotAlreadyDefined(acc, item); - acc.push(item); - return acc; - } - }, []) - .filter(Boolean); -} - -// $FlowFixMe[unsupported-variance-annotation] -function getTypeAnnotation( - name, - annotation, - defaultValue, - withNullDefault, - types, - parser, - buildSchema, -) { - const typeAnnotation = getValueFromTypes(annotation, types); - if ( - typeAnnotation.type === 'GenericTypeAnnotation' && - parser.getTypeAnnotationName(typeAnnotation) === '$ReadOnlyArray' - ) { - return { - type: 'ArrayTypeAnnotation', - elementType: getTypeAnnotationForArray( - name, - typeAnnotation.typeParameters.params[0], - defaultValue, - types, - parser, - buildSchema, - ), - }; - } - if ( - typeAnnotation.type === 'GenericTypeAnnotation' && - parser.getTypeAnnotationName(typeAnnotation) === '$ReadOnly' - ) { - return { - type: 'ObjectTypeAnnotation', - properties: flattenProperties( - typeAnnotation.typeParameters.params[0].properties, - types, - parser, - ) - .map(prop => buildSchema(prop, types, parser)) - .filter(Boolean), - }; - } - const type = - typeAnnotation.type === 'GenericTypeAnnotation' - ? parser.getTypeAnnotationName(typeAnnotation) - : typeAnnotation.type; - switch (type) { - case 'ImageSource': - return { - type: 'ReservedPropTypeAnnotation', - name: 'ImageSourcePrimitive', - }; - case 'ImageRequest': - return { - type: 'ReservedPropTypeAnnotation', - name: 'ImageRequestPrimitive', - }; - case 'ColorValue': - case 'ProcessedColorValue': - return { - type: 'ReservedPropTypeAnnotation', - name: 'ColorPrimitive', - }; - case 'ColorArrayValue': - return { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ReservedPropTypeAnnotation', - name: 'ColorPrimitive', - }, - }; - case 'PointValue': - return { - type: 'ReservedPropTypeAnnotation', - name: 'PointPrimitive', - }; - case 'EdgeInsetsValue': - return { - type: 'ReservedPropTypeAnnotation', - name: 'EdgeInsetsPrimitive', - }; - case 'DimensionValue': - return { - type: 'ReservedPropTypeAnnotation', - name: 'DimensionPrimitive', - }; - case 'Int32': - return { - type: 'Int32TypeAnnotation', - default: defaultValue ? defaultValue : 0, - }; - case 'Double': - return { - type: 'DoubleTypeAnnotation', - default: defaultValue ? defaultValue : 0, - }; - case 'Float': - return { - type: 'FloatTypeAnnotation', - default: withNullDefault - ? defaultValue - : defaultValue - ? defaultValue - : 0, - }; - case 'BooleanTypeAnnotation': - return { - type: 'BooleanTypeAnnotation', - default: withNullDefault - ? defaultValue - : defaultValue == null - ? false - : defaultValue, - }; - case 'StringTypeAnnotation': - if (typeof defaultValue !== 'undefined') { - return { - type: 'StringTypeAnnotation', - default: defaultValue, - }; - } - throw new Error(`A default string (or null) is required for "${name}"`); - case 'Stringish': - if (typeof defaultValue !== 'undefined') { - return { - type: 'StringTypeAnnotation', - default: defaultValue, - }; - } - throw new Error(`A default string (or null) is required for "${name}"`); - case 'UnionTypeAnnotation': - typeAnnotation.types.reduce((lastType, currType) => { - if (lastType && currType.type !== lastType.type) { - throw new Error(`Mixed types are not supported (see "${name}").`); - } - return currType; - }); - if (defaultValue === null) { - throw new Error(`A default enum value is required for "${name}"`); - } - const unionType = typeAnnotation.types[0].type; - if (unionType === 'StringLiteralTypeAnnotation') { - return { - type: 'StringEnumTypeAnnotation', - default: defaultValue, - options: typeAnnotation.types.map(option => option.value), - }; - } else if (unionType === 'NumberLiteralTypeAnnotation') { - return { - type: 'Int32EnumTypeAnnotation', - default: defaultValue, - options: typeAnnotation.types.map(option => option.value), - }; - } else { - throw new Error( - `Unsupported union type for "${name}", received "${unionType}"`, - ); - } - case 'ObjectTypeAnnotation': - throw new Error( - `Cannot use "${type}" type annotation for "${name}": object types must be declared using $ReadOnly<>`, - ); - case 'NumberTypeAnnotation': - throw new Error( - `Cannot use "${type}" type annotation for "${name}": must use a specific numeric type like Int32, Double, or Float`, - ); - case 'UnsafeMixed': - return { - type: 'MixedTypeAnnotation', - }; - default: - throw new Error( - `Unknown property type for "${name}": "${type}" in the State`, - ); - } -} -function getSchemaInfo(property, types) { - const name = property.key.name; - const value = getValueFromTypes(property.value, types); - let typeAnnotation = - value.type === 'NullableTypeAnnotation' ? value.typeAnnotation : value; - const optional = - value.type === 'NullableTypeAnnotation' || - property.optional || - (value.type === 'GenericTypeAnnotation' && - typeAnnotation.id.name === 'WithDefault'); - if ( - !property.optional && - value.type === 'GenericTypeAnnotation' && - typeAnnotation.id.name === 'WithDefault' - ) { - throw new Error( - `key ${name} must be optional if used with WithDefault<> annotation`, - ); - } - if ( - value.type === 'NullableTypeAnnotation' && - typeAnnotation.type === 'GenericTypeAnnotation' && - typeAnnotation.id.name === 'WithDefault' - ) { - throw new Error( - 'WithDefault<> is optional and does not need to be marked as optional. Please remove the ? annotation in front of it.', - ); - } - let type = typeAnnotation.type; - if ( - type === 'GenericTypeAnnotation' && - (typeAnnotation.id.name === 'DirectEventHandler' || - typeAnnotation.id.name === 'BubblingEventHandler') - ) { - return null; - } - if ( - name === 'style' && - type === 'GenericTypeAnnotation' && - typeAnnotation.id.name === 'ViewStyleProp' - ) { - return null; - } - let defaultValue = null; - let withNullDefault = false; - if ( - type === 'GenericTypeAnnotation' && - typeAnnotation.id.name === 'WithDefault' - ) { - if (typeAnnotation.typeParameters.params.length === 1) { - throw new Error( - `WithDefault requires two parameters, did you forget to provide a default value for "${name}"?`, - ); - } - defaultValue = typeAnnotation.typeParameters.params[1].value; - const defaultValueType = typeAnnotation.typeParameters.params[1].type; - typeAnnotation = typeAnnotation.typeParameters.params[0]; - type = - typeAnnotation.type === 'GenericTypeAnnotation' - ? typeAnnotation.id.name - : typeAnnotation.type; - if (defaultValueType === 'NullLiteralTypeAnnotation') { - defaultValue = null; - withNullDefault = true; - } - } - return { - name, - optional, - typeAnnotation, - defaultValue, - withNullDefault, - }; -} -module.exports = { - getSchemaInfo, - getTypeAnnotation, - flattenProperties, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/flow/components/componentsUtils.js.flow b/node_modules/@react-native/codegen/lib/parsers/flow/components/componentsUtils.js.flow deleted file mode 100644 index 4d6ab405e..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/flow/components/componentsUtils.js.flow +++ /dev/null @@ -1,490 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type {BuildSchemaFN, Parser} from '../../parser'; -import type {ASTNode, PropAST, TypeDeclarationMap} from '../../utils'; - -const {verifyPropNotAlreadyDefined} = require('../../parsers-commons'); -const {getValueFromTypes} = require('../utils.js'); - -// $FlowFixMe[unsupported-variance-annotation] -function getTypeAnnotationForArray<+T>( - name: string, - typeAnnotation: $FlowFixMe, - defaultValue: $FlowFixMe | null, - types: TypeDeclarationMap, - parser: Parser, - buildSchema: BuildSchemaFN, -): $FlowFixMe { - const extractedTypeAnnotation = getValueFromTypes(typeAnnotation, types); - if (extractedTypeAnnotation.type === 'NullableTypeAnnotation') { - throw new Error( - 'Nested optionals such as "$ReadOnlyArray" are not supported, please declare optionals at the top level of value definitions as in "?$ReadOnlyArray"', - ); - } - - if ( - extractedTypeAnnotation.type === 'GenericTypeAnnotation' && - parser.getTypeAnnotationName(extractedTypeAnnotation) === 'WithDefault' - ) { - throw new Error( - 'Nested defaults such as "$ReadOnlyArray>" are not supported, please declare defaults at the top level of value definitions as in "WithDefault<$ReadOnlyArray, false>"', - ); - } - - if (extractedTypeAnnotation.type === 'GenericTypeAnnotation') { - // Resolve the type alias if it's not defined inline - const objectType = getValueFromTypes(extractedTypeAnnotation, types); - - if (objectType.id.name === '$ReadOnly') { - return { - type: 'ObjectTypeAnnotation', - properties: flattenProperties( - objectType.typeParameters.params[0].properties, - types, - parser, - ) - .map(prop => buildSchema(prop, types, parser)) - .filter(Boolean), - }; - } - - if (objectType.id.name === '$ReadOnlyArray') { - // We need to go yet another level deeper to resolve - // types that may be defined in a type alias - const nestedObjectType = getValueFromTypes( - objectType.typeParameters.params[0], - types, - ); - - return { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ObjectTypeAnnotation', - properties: flattenProperties( - nestedObjectType.typeParameters.params[0].properties, - types, - parser, - ) - .map(prop => buildSchema(prop, types, parser)) - .filter(Boolean), - }, - }; - } - } - - const type = - extractedTypeAnnotation.type === 'GenericTypeAnnotation' - ? parser.getTypeAnnotationName(extractedTypeAnnotation) - : extractedTypeAnnotation.type; - - switch (type) { - case 'ImageSource': - return { - type: 'ReservedPropTypeAnnotation', - name: 'ImageSourcePrimitive', - }; - case 'ImageRequest': - return { - type: 'ReservedPropTypeAnnotation', - name: 'ImageRequestPrimitive', - }; - case 'ColorValue': - case 'ProcessedColorValue': - return { - type: 'ReservedPropTypeAnnotation', - name: 'ColorPrimitive', - }; - case 'PointValue': - return { - type: 'ReservedPropTypeAnnotation', - name: 'PointPrimitive', - }; - case 'EdgeInsetsValue': - return { - type: 'ReservedPropTypeAnnotation', - name: 'EdgeInsetsPrimitive', - }; - case 'DimensionValue': - return { - type: 'ReservedPropTypeAnnotation', - name: 'DimensionPrimitive', - }; - case 'Stringish': - return { - type: 'StringTypeAnnotation', - }; - case 'Int32': - return { - type: 'Int32TypeAnnotation', - }; - case 'Double': - return { - type: 'DoubleTypeAnnotation', - }; - case 'Float': - return { - type: 'FloatTypeAnnotation', - }; - case 'BooleanTypeAnnotation': - return { - type: 'BooleanTypeAnnotation', - }; - case 'StringTypeAnnotation': - return { - type: 'StringTypeAnnotation', - }; - case 'UnionTypeAnnotation': - typeAnnotation.types.reduce((lastType, currType) => { - if (lastType && currType.type !== lastType.type) { - throw new Error(`Mixed types are not supported (see "${name}")`); - } - return currType; - }); - - if (defaultValue === null) { - throw new Error(`A default enum value is required for "${name}"`); - } - - const unionType = typeAnnotation.types[0].type; - if (unionType === 'StringLiteralTypeAnnotation') { - return { - type: 'StringEnumTypeAnnotation', - default: (defaultValue: string), - options: typeAnnotation.types.map(option => option.value), - }; - } else if (unionType === 'NumberLiteralTypeAnnotation') { - throw new Error( - `Arrays of int enums are not supported (see: "${name}")`, - ); - } else { - throw new Error( - `Unsupported union type for "${name}", received "${unionType}"`, - ); - } - default: - throw new Error(`Unknown property type for "${name}": ${type}`); - } -} - -function flattenProperties( - typeDefinition: $ReadOnlyArray, - types: TypeDeclarationMap, - parser: Parser, -): $ReadOnlyArray { - return typeDefinition - .map(property => { - if (property.type === 'ObjectTypeProperty') { - return property; - } else if (property.type === 'ObjectTypeSpreadProperty') { - return flattenProperties( - parser.getProperties(property.argument.id.name, types), - types, - parser, - ); - } - }) - .reduce((acc: Array, item) => { - if (Array.isArray(item)) { - item.forEach(prop => { - verifyPropNotAlreadyDefined(acc, prop); - }); - return acc.concat(item); - } else { - verifyPropNotAlreadyDefined(acc, item); - acc.push(item); - return acc; - } - }, []) - .filter(Boolean); -} - -// $FlowFixMe[unsupported-variance-annotation] -function getTypeAnnotation<+T>( - name: string, - annotation: $FlowFixMe | ASTNode, - defaultValue: $FlowFixMe | null, - withNullDefault: boolean, - types: TypeDeclarationMap, - parser: Parser, - buildSchema: BuildSchemaFN, -): $FlowFixMe { - const typeAnnotation = getValueFromTypes(annotation, types); - - if ( - typeAnnotation.type === 'GenericTypeAnnotation' && - parser.getTypeAnnotationName(typeAnnotation) === '$ReadOnlyArray' - ) { - return { - type: 'ArrayTypeAnnotation', - elementType: getTypeAnnotationForArray( - name, - typeAnnotation.typeParameters.params[0], - defaultValue, - types, - parser, - buildSchema, - ), - }; - } - - if ( - typeAnnotation.type === 'GenericTypeAnnotation' && - parser.getTypeAnnotationName(typeAnnotation) === '$ReadOnly' - ) { - return { - type: 'ObjectTypeAnnotation', - properties: flattenProperties( - typeAnnotation.typeParameters.params[0].properties, - types, - parser, - ) - .map(prop => buildSchema(prop, types, parser)) - .filter(Boolean), - }; - } - - const type = - typeAnnotation.type === 'GenericTypeAnnotation' - ? parser.getTypeAnnotationName(typeAnnotation) - : typeAnnotation.type; - - switch (type) { - case 'ImageSource': - return { - type: 'ReservedPropTypeAnnotation', - name: 'ImageSourcePrimitive', - }; - case 'ImageRequest': - return { - type: 'ReservedPropTypeAnnotation', - name: 'ImageRequestPrimitive', - }; - case 'ColorValue': - case 'ProcessedColorValue': - return { - type: 'ReservedPropTypeAnnotation', - name: 'ColorPrimitive', - }; - case 'ColorArrayValue': - return { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ReservedPropTypeAnnotation', - name: 'ColorPrimitive', - }, - }; - case 'PointValue': - return { - type: 'ReservedPropTypeAnnotation', - name: 'PointPrimitive', - }; - case 'EdgeInsetsValue': - return { - type: 'ReservedPropTypeAnnotation', - name: 'EdgeInsetsPrimitive', - }; - case 'DimensionValue': - return { - type: 'ReservedPropTypeAnnotation', - name: 'DimensionPrimitive', - }; - case 'Int32': - return { - type: 'Int32TypeAnnotation', - default: ((defaultValue ? defaultValue : 0): number), - }; - case 'Double': - return { - type: 'DoubleTypeAnnotation', - default: ((defaultValue ? defaultValue : 0): number), - }; - case 'Float': - return { - type: 'FloatTypeAnnotation', - default: withNullDefault - ? (defaultValue: number | null) - : ((defaultValue ? defaultValue : 0): number), - }; - case 'BooleanTypeAnnotation': - return { - type: 'BooleanTypeAnnotation', - default: withNullDefault - ? (defaultValue: boolean | null) - : ((defaultValue == null ? false : defaultValue): boolean), - }; - case 'StringTypeAnnotation': - if (typeof defaultValue !== 'undefined') { - return { - type: 'StringTypeAnnotation', - default: (defaultValue: string | null), - }; - } - throw new Error(`A default string (or null) is required for "${name}"`); - case 'Stringish': - if (typeof defaultValue !== 'undefined') { - return { - type: 'StringTypeAnnotation', - default: (defaultValue: string | null), - }; - } - throw new Error(`A default string (or null) is required for "${name}"`); - case 'UnionTypeAnnotation': - typeAnnotation.types.reduce((lastType, currType) => { - if (lastType && currType.type !== lastType.type) { - throw new Error(`Mixed types are not supported (see "${name}").`); - } - return currType; - }); - - if (defaultValue === null) { - throw new Error(`A default enum value is required for "${name}"`); - } - - const unionType = typeAnnotation.types[0].type; - if (unionType === 'StringLiteralTypeAnnotation') { - return { - type: 'StringEnumTypeAnnotation', - default: (defaultValue: string), - options: typeAnnotation.types.map(option => option.value), - }; - } else if (unionType === 'NumberLiteralTypeAnnotation') { - return { - type: 'Int32EnumTypeAnnotation', - default: (defaultValue: number), - options: typeAnnotation.types.map(option => option.value), - }; - } else { - throw new Error( - `Unsupported union type for "${name}", received "${unionType}"`, - ); - } - case 'ObjectTypeAnnotation': - throw new Error( - `Cannot use "${type}" type annotation for "${name}": object types must be declared using $ReadOnly<>`, - ); - case 'NumberTypeAnnotation': - throw new Error( - `Cannot use "${type}" type annotation for "${name}": must use a specific numeric type like Int32, Double, or Float`, - ); - case 'UnsafeMixed': - return { - type: 'MixedTypeAnnotation', - }; - default: - throw new Error( - `Unknown property type for "${name}": "${type}" in the State`, - ); - } -} - -type SchemaInfo = { - name: string, - optional: boolean, - typeAnnotation: $FlowFixMe, - defaultValue: $FlowFixMe, - withNullDefault: boolean, -}; - -function getSchemaInfo( - property: PropAST, - types: TypeDeclarationMap, -): ?SchemaInfo { - const name = property.key.name; - - const value = getValueFromTypes(property.value, types); - let typeAnnotation = - value.type === 'NullableTypeAnnotation' ? value.typeAnnotation : value; - - const optional = - value.type === 'NullableTypeAnnotation' || - property.optional || - (value.type === 'GenericTypeAnnotation' && - typeAnnotation.id.name === 'WithDefault'); - - if ( - !property.optional && - value.type === 'GenericTypeAnnotation' && - typeAnnotation.id.name === 'WithDefault' - ) { - throw new Error( - `key ${name} must be optional if used with WithDefault<> annotation`, - ); - } - if ( - value.type === 'NullableTypeAnnotation' && - typeAnnotation.type === 'GenericTypeAnnotation' && - typeAnnotation.id.name === 'WithDefault' - ) { - throw new Error( - 'WithDefault<> is optional and does not need to be marked as optional. Please remove the ? annotation in front of it.', - ); - } - - let type = typeAnnotation.type; - if ( - type === 'GenericTypeAnnotation' && - (typeAnnotation.id.name === 'DirectEventHandler' || - typeAnnotation.id.name === 'BubblingEventHandler') - ) { - return null; - } - - if ( - name === 'style' && - type === 'GenericTypeAnnotation' && - typeAnnotation.id.name === 'ViewStyleProp' - ) { - return null; - } - - let defaultValue = null; - let withNullDefault = false; - if ( - type === 'GenericTypeAnnotation' && - typeAnnotation.id.name === 'WithDefault' - ) { - if (typeAnnotation.typeParameters.params.length === 1) { - throw new Error( - `WithDefault requires two parameters, did you forget to provide a default value for "${name}"?`, - ); - } - - defaultValue = typeAnnotation.typeParameters.params[1].value; - const defaultValueType = typeAnnotation.typeParameters.params[1].type; - - typeAnnotation = typeAnnotation.typeParameters.params[0]; - type = - typeAnnotation.type === 'GenericTypeAnnotation' - ? typeAnnotation.id.name - : typeAnnotation.type; - - if (defaultValueType === 'NullLiteralTypeAnnotation') { - defaultValue = null; - withNullDefault = true; - } - } - - return { - name, - optional, - typeAnnotation, - defaultValue, - withNullDefault, - }; -} - -module.exports = { - getSchemaInfo, - getTypeAnnotation, - flattenProperties, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/flow/components/events.js b/node_modules/@react-native/codegen/lib/parsers/flow/components/events.js deleted file mode 100644 index c0b829162..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/flow/components/events.js +++ /dev/null @@ -1,256 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('../../error-utils'), - throwIfArgumentPropsAreNull = _require.throwIfArgumentPropsAreNull, - throwIfBubblingTypeIsNull = _require.throwIfBubblingTypeIsNull, - throwIfEventHasNoName = _require.throwIfEventHasNoName; -const _require2 = require('../../parsers-commons'), - buildPropertiesForEvent = _require2.buildPropertiesForEvent, - emitBuildEventSchema = _require2.emitBuildEventSchema, - getEventArgument = _require2.getEventArgument, - handleEventHandler = _require2.handleEventHandler; -const _require3 = require('../../parsers-primitives'), - emitBoolProp = _require3.emitBoolProp, - emitDoubleProp = _require3.emitDoubleProp, - emitFloatProp = _require3.emitFloatProp, - emitInt32Prop = _require3.emitInt32Prop, - emitMixedProp = _require3.emitMixedProp, - emitObjectProp = _require3.emitObjectProp, - emitStringProp = _require3.emitStringProp, - emitUnionProp = _require3.emitUnionProp; -function getPropertyType( - /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's - * LTI update could not be added via codemod */ - name, - optional, - typeAnnotation, - parser, -) { - const type = extractTypeFromTypeAnnotation(typeAnnotation, parser); - switch (type) { - case 'BooleanTypeAnnotation': - return emitBoolProp(name, optional); - case 'StringTypeAnnotation': - return emitStringProp(name, optional); - case 'Int32': - return emitInt32Prop(name, optional); - case 'Double': - return emitDoubleProp(name, optional); - case 'Float': - return emitFloatProp(name, optional); - case '$ReadOnly': - return getPropertyType( - name, - optional, - typeAnnotation.typeParameters.params[0], - parser, - ); - case 'ObjectTypeAnnotation': - return emitObjectProp( - name, - optional, - parser, - typeAnnotation, - extractArrayElementType, - ); - case 'UnionTypeAnnotation': - return emitUnionProp(name, optional, parser, typeAnnotation); - case 'UnsafeMixed': - return emitMixedProp(name, optional); - case 'ArrayTypeAnnotation': - case '$ReadOnlyArray': - return { - name, - optional, - typeAnnotation: extractArrayElementType(typeAnnotation, name, parser), - }; - default: - throw new Error(`Unable to determine event type for "${name}": ${type}`); - } -} -function extractArrayElementType(typeAnnotation, name, parser) { - const type = extractTypeFromTypeAnnotation(typeAnnotation, parser); - switch (type) { - case 'BooleanTypeAnnotation': - return { - type: 'BooleanTypeAnnotation', - }; - case 'StringTypeAnnotation': - return { - type: 'StringTypeAnnotation', - }; - case 'Int32': - return { - type: 'Int32TypeAnnotation', - }; - case 'Float': - return { - type: 'FloatTypeAnnotation', - }; - case 'NumberTypeAnnotation': - case 'Double': - return { - type: 'DoubleTypeAnnotation', - }; - case 'UnionTypeAnnotation': - return { - type: 'StringEnumTypeAnnotation', - options: typeAnnotation.types.map(option => - parser.getLiteralValue(option), - ), - }; - case 'UnsafeMixed': - return { - type: 'MixedTypeAnnotation', - }; - case 'ObjectTypeAnnotation': - return { - type: 'ObjectTypeAnnotation', - properties: parser - .getObjectProperties(typeAnnotation) - .map(member => - buildPropertiesForEvent(member, parser, getPropertyType), - ), - }; - case 'ArrayTypeAnnotation': - return { - type: 'ArrayTypeAnnotation', - elementType: extractArrayElementType( - typeAnnotation.elementType, - name, - parser, - ), - }; - case '$ReadOnlyArray': - const genericParams = typeAnnotation.typeParameters.params; - if (genericParams.length !== 1) { - throw new Error( - `Events only supports arrays with 1 Generic type. Found ${ - genericParams.length - } types:\n${prettify(genericParams)}`, - ); - } - return { - type: 'ArrayTypeAnnotation', - elementType: extractArrayElementType(genericParams[0], name, parser), - }; - default: - throw new Error( - `Unrecognized ${type} for Array ${name} in events.\n${prettify( - typeAnnotation, - )}`, - ); - } -} -function prettify(jsonObject) { - return JSON.stringify(jsonObject, null, 2); -} -function extractTypeFromTypeAnnotation(typeAnnotation, parser) { - return typeAnnotation.type === 'GenericTypeAnnotation' - ? parser.getTypeAnnotationName(typeAnnotation) - : typeAnnotation.type; -} -function findEventArgumentsAndType( - parser, - typeAnnotation, - types, - bubblingType, - paperName, -) { - throwIfEventHasNoName(typeAnnotation, parser); - const name = parser.getTypeAnnotationName(typeAnnotation); - if (name === '$ReadOnly') { - return { - argumentProps: typeAnnotation.typeParameters.params[0].properties, - paperTopLevelNameDeprecated: paperName, - bubblingType, - }; - } else if (name === 'BubblingEventHandler' || name === 'DirectEventHandler') { - return handleEventHandler( - name, - typeAnnotation, - parser, - types, - findEventArgumentsAndType, - ); - } else if (types[name]) { - return findEventArgumentsAndType( - parser, - types[name].right, - types, - bubblingType, - paperName, - ); - } else { - return { - argumentProps: null, - bubblingType: null, - paperTopLevelNameDeprecated: null, - }; - } -} -function buildEventSchema(types, property, parser) { - const name = property.key.name; - const optional = - property.optional || property.value.type === 'NullableTypeAnnotation'; - let typeAnnotation = - property.value.type === 'NullableTypeAnnotation' - ? property.value.typeAnnotation - : property.value; - if ( - typeAnnotation.type !== 'GenericTypeAnnotation' || - (parser.getTypeAnnotationName(typeAnnotation) !== 'BubblingEventHandler' && - parser.getTypeAnnotationName(typeAnnotation) !== 'DirectEventHandler') - ) { - return null; - } - const _findEventArgumentsAn = findEventArgumentsAndType( - parser, - typeAnnotation, - types, - ), - argumentProps = _findEventArgumentsAn.argumentProps, - bubblingType = _findEventArgumentsAn.bubblingType, - paperTopLevelNameDeprecated = - _findEventArgumentsAn.paperTopLevelNameDeprecated; - const nonNullableArgumentProps = throwIfArgumentPropsAreNull( - argumentProps, - name, - ); - const nonNullableBubblingType = throwIfBubblingTypeIsNull(bubblingType, name); - const argument = getEventArgument( - nonNullableArgumentProps, - parser, - getPropertyType, - ); - return emitBuildEventSchema( - paperTopLevelNameDeprecated, - name, - optional, - nonNullableBubblingType, - argument, - ); -} - -// $FlowFixMe[unclear-type] there's no flowtype for ASTs - -function getEvents(eventTypeAST, types, parser) { - return eventTypeAST - .filter(property => property.type === 'ObjectTypeProperty') - .map(property => buildEventSchema(types, property, parser)) - .filter(Boolean); -} -module.exports = { - getEvents, - extractArrayElementType, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/flow/components/events.js.flow b/node_modules/@react-native/codegen/lib/parsers/flow/components/events.js.flow deleted file mode 100644 index 940706e08..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/flow/components/events.js.flow +++ /dev/null @@ -1,287 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type { - EventTypeAnnotation, - EventTypeShape, - NamedShape, -} from '../../../CodegenSchema.js'; -import type {Parser} from '../../parser'; -import type {EventArgumentReturnType} from '../../parsers-commons'; - -const { - throwIfArgumentPropsAreNull, - throwIfBubblingTypeIsNull, - throwIfEventHasNoName, -} = require('../../error-utils'); -const { - buildPropertiesForEvent, - emitBuildEventSchema, - getEventArgument, - handleEventHandler, -} = require('../../parsers-commons'); -const { - emitBoolProp, - emitDoubleProp, - emitFloatProp, - emitInt32Prop, - emitMixedProp, - emitObjectProp, - emitStringProp, - emitUnionProp, -} = require('../../parsers-primitives'); - -function getPropertyType( - /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's - * LTI update could not be added via codemod */ - name: string, - optional: boolean, - typeAnnotation: $FlowFixMe, - parser: Parser, -): NamedShape { - const type = extractTypeFromTypeAnnotation(typeAnnotation, parser); - - switch (type) { - case 'BooleanTypeAnnotation': - return emitBoolProp(name, optional); - case 'StringTypeAnnotation': - return emitStringProp(name, optional); - case 'Int32': - return emitInt32Prop(name, optional); - case 'Double': - return emitDoubleProp(name, optional); - case 'Float': - return emitFloatProp(name, optional); - case '$ReadOnly': - return getPropertyType( - name, - optional, - typeAnnotation.typeParameters.params[0], - parser, - ); - case 'ObjectTypeAnnotation': - return emitObjectProp( - name, - optional, - parser, - typeAnnotation, - extractArrayElementType, - ); - case 'UnionTypeAnnotation': - return emitUnionProp(name, optional, parser, typeAnnotation); - case 'UnsafeMixed': - return emitMixedProp(name, optional); - case 'ArrayTypeAnnotation': - case '$ReadOnlyArray': - return { - name, - optional, - typeAnnotation: extractArrayElementType(typeAnnotation, name, parser), - }; - default: - throw new Error(`Unable to determine event type for "${name}": ${type}`); - } -} - -function extractArrayElementType( - typeAnnotation: $FlowFixMe, - name: string, - parser: Parser, -): EventTypeAnnotation { - const type = extractTypeFromTypeAnnotation(typeAnnotation, parser); - - switch (type) { - case 'BooleanTypeAnnotation': - return {type: 'BooleanTypeAnnotation'}; - case 'StringTypeAnnotation': - return {type: 'StringTypeAnnotation'}; - case 'Int32': - return {type: 'Int32TypeAnnotation'}; - case 'Float': - return {type: 'FloatTypeAnnotation'}; - case 'NumberTypeAnnotation': - case 'Double': - return { - type: 'DoubleTypeAnnotation', - }; - case 'UnionTypeAnnotation': - return { - type: 'StringEnumTypeAnnotation', - options: typeAnnotation.types.map(option => - parser.getLiteralValue(option), - ), - }; - case 'UnsafeMixed': - return {type: 'MixedTypeAnnotation'}; - case 'ObjectTypeAnnotation': - return { - type: 'ObjectTypeAnnotation', - properties: parser - .getObjectProperties(typeAnnotation) - .map(member => - buildPropertiesForEvent(member, parser, getPropertyType), - ), - }; - case 'ArrayTypeAnnotation': - return { - type: 'ArrayTypeAnnotation', - elementType: extractArrayElementType( - typeAnnotation.elementType, - name, - parser, - ), - }; - case '$ReadOnlyArray': - const genericParams = typeAnnotation.typeParameters.params; - if (genericParams.length !== 1) { - throw new Error( - `Events only supports arrays with 1 Generic type. Found ${ - genericParams.length - } types:\n${prettify(genericParams)}`, - ); - } - return { - type: 'ArrayTypeAnnotation', - elementType: extractArrayElementType(genericParams[0], name, parser), - }; - default: - throw new Error( - `Unrecognized ${type} for Array ${name} in events.\n${prettify( - typeAnnotation, - )}`, - ); - } -} - -function prettify(jsonObject: $FlowFixMe): string { - return JSON.stringify(jsonObject, null, 2); -} - -function extractTypeFromTypeAnnotation( - typeAnnotation: $FlowFixMe, - parser: Parser, -): string { - return typeAnnotation.type === 'GenericTypeAnnotation' - ? parser.getTypeAnnotationName(typeAnnotation) - : typeAnnotation.type; -} - -function findEventArgumentsAndType( - parser: Parser, - typeAnnotation: $FlowFixMe, - types: TypeMap, - bubblingType: void | 'direct' | 'bubble', - paperName: ?$FlowFixMe, -): EventArgumentReturnType { - throwIfEventHasNoName(typeAnnotation, parser); - const name = parser.getTypeAnnotationName(typeAnnotation); - if (name === '$ReadOnly') { - return { - argumentProps: typeAnnotation.typeParameters.params[0].properties, - paperTopLevelNameDeprecated: paperName, - bubblingType, - }; - } else if (name === 'BubblingEventHandler' || name === 'DirectEventHandler') { - return handleEventHandler( - name, - typeAnnotation, - parser, - types, - findEventArgumentsAndType, - ); - } else if (types[name]) { - return findEventArgumentsAndType( - parser, - types[name].right, - types, - bubblingType, - paperName, - ); - } else { - return { - argumentProps: null, - bubblingType: null, - paperTopLevelNameDeprecated: null, - }; - } -} - -function buildEventSchema( - types: TypeMap, - property: EventTypeAST, - parser: Parser, -): ?EventTypeShape { - const name = property.key.name; - const optional = - property.optional || property.value.type === 'NullableTypeAnnotation'; - - let typeAnnotation = - property.value.type === 'NullableTypeAnnotation' - ? property.value.typeAnnotation - : property.value; - - if ( - typeAnnotation.type !== 'GenericTypeAnnotation' || - (parser.getTypeAnnotationName(typeAnnotation) !== 'BubblingEventHandler' && - parser.getTypeAnnotationName(typeAnnotation) !== 'DirectEventHandler') - ) { - return null; - } - - const {argumentProps, bubblingType, paperTopLevelNameDeprecated} = - findEventArgumentsAndType(parser, typeAnnotation, types); - - const nonNullableArgumentProps = throwIfArgumentPropsAreNull( - argumentProps, - name, - ); - const nonNullableBubblingType = throwIfBubblingTypeIsNull(bubblingType, name); - - const argument = getEventArgument( - nonNullableArgumentProps, - parser, - getPropertyType, - ); - - return emitBuildEventSchema( - paperTopLevelNameDeprecated, - name, - optional, - nonNullableBubblingType, - argument, - ); -} - -// $FlowFixMe[unclear-type] there's no flowtype for ASTs -type EventTypeAST = Object; - -type TypeMap = { - // $FlowFixMe[unclear-type] there's no flowtype for ASTs - [string]: Object, - ... -}; - -function getEvents( - eventTypeAST: $ReadOnlyArray, - types: TypeMap, - parser: Parser, -): $ReadOnlyArray { - return eventTypeAST - .filter(property => property.type === 'ObjectTypeProperty') - .map(property => buildEventSchema(types, property, parser)) - .filter(Boolean); -} - -module.exports = { - getEvents, - extractArrayElementType, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/flow/components/index.js b/node_modules/@react-native/codegen/lib/parsers/flow/components/index.js deleted file mode 100644 index de65761a8..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/flow/components/index.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('../../parsers-commons'), - findComponentConfig = _require.findComponentConfig, - getCommandProperties = _require.getCommandProperties, - getOptions = _require.getOptions; -const _require2 = require('./commands'), - getCommands = _require2.getCommands; -const _require3 = require('./events'), - getEvents = _require3.getEvents; - -// $FlowFixMe[signature-verification-failure] there's no flowtype for AST -function buildComponentSchema(ast, parser) { - const _findComponentConfig = findComponentConfig(ast, parser), - componentName = _findComponentConfig.componentName, - propsTypeName = _findComponentConfig.propsTypeName, - optionsExpression = _findComponentConfig.optionsExpression; - const types = parser.getTypes(ast); - const propProperties = parser.getProperties(propsTypeName, types); - const commandProperties = getCommandProperties(ast, parser); - const _parser$getProps = parser.getProps(propProperties, types), - extendsProps = _parser$getProps.extendsProps, - props = _parser$getProps.props; - const options = getOptions(optionsExpression); - const events = getEvents(propProperties, types, parser); - const commands = getCommands(commandProperties, types); - return { - filename: componentName, - componentName, - options, - extendsProps, - events, - props, - commands, - }; -} -module.exports = { - buildComponentSchema, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/flow/components/index.js.flow b/node_modules/@react-native/codegen/lib/parsers/flow/components/index.js.flow deleted file mode 100644 index 0cae27b06..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/flow/components/index.js.flow +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; -import type {Parser} from '../../parser'; -import type {ComponentSchemaBuilderConfig} from '../../schema.js'; - -const { - findComponentConfig, - getCommandProperties, - getOptions, -} = require('../../parsers-commons'); -const {getCommands} = require('./commands'); -const {getEvents} = require('./events'); - -// $FlowFixMe[signature-verification-failure] there's no flowtype for AST -function buildComponentSchema( - ast: $FlowFixMe, - parser: Parser, -): ComponentSchemaBuilderConfig { - const {componentName, propsTypeName, optionsExpression} = findComponentConfig( - ast, - parser, - ); - - const types = parser.getTypes(ast); - - const propProperties = parser.getProperties(propsTypeName, types); - const commandProperties = getCommandProperties(ast, parser); - const {extendsProps, props} = parser.getProps(propProperties, types); - - const options = getOptions(optionsExpression); - const events = getEvents(propProperties, types, parser); - const commands = getCommands(commandProperties, types); - - return { - filename: componentName, - componentName, - options, - extendsProps, - events, - props, - commands, - }; -} - -module.exports = { - buildComponentSchema, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/flow/modules/__test_fixtures__/failures.js b/node_modules/@react-native/codegen/lib/parsers/flow/modules/__test_fixtures__/failures.js deleted file mode 100644 index 59309dcc7..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/flow/modules/__test_fixtures__/failures.js +++ /dev/null @@ -1,269 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -// @licenselint-loose-mode - -'use strict'; - -const NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - getString: (arg: string) => Array; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT_AS_PARAM = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - getString: (arg : Array) => string; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULES_WITH_READ_ONLY_OBJECT_NO_TYPE_FOR_CONTENT = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - getString: (arg : $ReadOnly<>) => string; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULES_WITH_NOT_ONLY_METHODS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - +getBool: (arg: boolean) => boolean; - +getNumber: (arg: number) => number; - +getString: (arg: string) => string; - sampleBool: boolean, - -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULES_WITH_UNNAMED_PARAMS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - +getBool: (boolean) => boolean; - -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULES_WITH_PROMISE_WITHOUT_TYPE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - +getBool: (arg: boolean) => Promise; - -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const TWO_NATIVE_MODULES_EXPORTED_WITH_DEFAULT = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule1'); -export default TurboModuleRegistry.getEnforcing('SampleTurboModule2'); - -`; -const TWO_NATIVE_EXTENDING_TURBO_MODULE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - +getSth: (a : ?number) => void -} - -export interface Spec2 extends TurboModule { - +getSth: (a : ?number) => void -} - - -`; -const EMPTY_ENUM_NATIVE_MODULE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export enum SomeEnum { -} - -export interface Spec extends TurboModule { - +getEnums: (a: SomeEnum) => string; -} - -export default TurboModuleRegistry.getEnforcing('EmptyEnumNativeModule'); -`; -const MIXED_VALUES_ENUM_NATIVE_MODULE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export enum SomeEnum { - NUM = 1, - STR = 'str', -} - -export interface Spec extends TurboModule { - +getEnums: (a: SomeEnum) => string; -} - -export default TurboModuleRegistry.getEnforcing('MixedValuesEnumNativeModule'); -`; -module.exports = { - NATIVE_MODULES_WITH_READ_ONLY_OBJECT_NO_TYPE_FOR_CONTENT, - NATIVE_MODULES_WITH_UNNAMED_PARAMS, - NATIVE_MODULES_WITH_PROMISE_WITHOUT_TYPE, - NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT_AS_PARAM, - NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT, - TWO_NATIVE_MODULES_EXPORTED_WITH_DEFAULT, - NATIVE_MODULES_WITH_NOT_ONLY_METHODS, - TWO_NATIVE_EXTENDING_TURBO_MODULE, - EMPTY_ENUM_NATIVE_MODULE, - MIXED_VALUES_ENUM_NATIVE_MODULE, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/flow/modules/__test_fixtures__/failures.js.flow b/node_modules/@react-native/codegen/lib/parsers/flow/modules/__test_fixtures__/failures.js.flow deleted file mode 100644 index 8734095f4..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/flow/modules/__test_fixtures__/failures.js.flow +++ /dev/null @@ -1,279 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -// @licenselint-loose-mode - -'use strict'; - -const NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - getString: (arg: string) => Array; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT_AS_PARAM = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - getString: (arg : Array) => string; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULES_WITH_READ_ONLY_OBJECT_NO_TYPE_FOR_CONTENT = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - getString: (arg : $ReadOnly<>) => string; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULES_WITH_NOT_ONLY_METHODS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - +getBool: (arg: boolean) => boolean; - +getNumber: (arg: number) => number; - +getString: (arg: string) => string; - sampleBool: boolean, - -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULES_WITH_UNNAMED_PARAMS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - +getBool: (boolean) => boolean; - -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULES_WITH_PROMISE_WITHOUT_TYPE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - +getBool: (arg: boolean) => Promise; - -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const TWO_NATIVE_MODULES_EXPORTED_WITH_DEFAULT = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule1'); -export default TurboModuleRegistry.getEnforcing('SampleTurboModule2'); - -`; - -const TWO_NATIVE_EXTENDING_TURBO_MODULE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - +getSth: (a : ?number) => void -} - -export interface Spec2 extends TurboModule { - +getSth: (a : ?number) => void -} - - -`; - -const EMPTY_ENUM_NATIVE_MODULE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export enum SomeEnum { -} - -export interface Spec extends TurboModule { - +getEnums: (a: SomeEnum) => string; -} - -export default TurboModuleRegistry.getEnforcing('EmptyEnumNativeModule'); -`; - -const MIXED_VALUES_ENUM_NATIVE_MODULE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export enum SomeEnum { - NUM = 1, - STR = 'str', -} - -export interface Spec extends TurboModule { - +getEnums: (a: SomeEnum) => string; -} - -export default TurboModuleRegistry.getEnforcing('MixedValuesEnumNativeModule'); -`; - -module.exports = { - NATIVE_MODULES_WITH_READ_ONLY_OBJECT_NO_TYPE_FOR_CONTENT, - NATIVE_MODULES_WITH_UNNAMED_PARAMS, - NATIVE_MODULES_WITH_PROMISE_WITHOUT_TYPE, - NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT_AS_PARAM, - NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT, - TWO_NATIVE_MODULES_EXPORTED_WITH_DEFAULT, - NATIVE_MODULES_WITH_NOT_ONLY_METHODS, - TWO_NATIVE_EXTENDING_TURBO_MODULE, - EMPTY_ENUM_NATIVE_MODULE, - MIXED_VALUES_ENUM_NATIVE_MODULE, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/flow/modules/__test_fixtures__/fixtures.js b/node_modules/@react-native/codegen/lib/parsers/flow/modules/__test_fixtures__/fixtures.js deleted file mode 100644 index caae6abc5..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/flow/modules/__test_fixtures__/fixtures.js +++ /dev/null @@ -1,800 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -// @licenselint-loose-mode - -'use strict'; - -const EMPTY_NATIVE_MODULE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - // no methods -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULE_WITH_COMPLEX_OBJECTS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export type String = string; - -export interface Spec extends TurboModule { - // Exported methods. - +getObject: (arg: {|const1: {|const1: boolean|}|}) => {| - const1: {|const1: boolean|}, - |}; - +getReadOnlyObject: (arg: $ReadOnly<{|const1: $ReadOnly<{|const1: boolean|}>|}>) => $ReadOnly<{| - const1: {|const1: boolean|}, - |}>; - +getObject2: (arg: { a: String }) => Object; - +getObjectInArray: (arg: {const1: {|const1: boolean|}}) => Array<{| - const1: {const1: boolean}, - |}>; -} -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULE_WITH_COMPLEX_OBJECTS_WITH_NULLABLE_KEY = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - +getConstants: () => {| - isTesting: boolean, - reactNativeVersion: {| - major: number, - minor: number, - patch?: number, - prerelease: ?number, - |}, - forceTouchAvailable: boolean, - osVersion: string, - systemName: string, - interfaceIdiom: string, - |}; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULE_WITH_BASIC_PARAM_TYPES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - +passBool?: (arg: boolean) => void; - +passNumber: (arg: number) => void; - +passString: (arg: string) => void; - +passStringish: (arg: Stringish) => void; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULE_WITH_ALIASES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -type NumNum = number; -export type Num = (arg: NumNum) => void; -type Num2 = Num; -export type Void = void; -export type A = number; -export type B = number; -export type ObjectAlias = {| - x: number, - y: number, - label: string, - truthy: boolean, -|}; -export type ReadOnlyAlias = $ReadOnly; - -export interface Spec extends TurboModule { - // Exported methods. - +getNumber: Num2; - +getVoid: () => Void; - +getArray: (a: Array) => {| a: B |}; - +getStringFromAlias: (a: ObjectAlias) => string; - +getStringFromNullableAlias: (a: ?ObjectAlias) => string; - +getStringFromReadOnlyAlias: (a: ReadOnlyAlias) => string; - +getStringFromNullableReadOnlyAlias: (a: ?ReadOnlyAlias) => string; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULE_WITH_NESTED_ALIASES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -type Bar = {| - z: number -|}; - -type Foo = {| - bar1: Bar, - bar2: Bar, -|}; - -export interface Spec extends TurboModule { - // Exported methods. - foo1: (x: Foo) => Foo; - foo2: (x: Foo) => void; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULE_WITH_FLOAT_AND_INT32 = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; -import type {Int32, Float} from 'react-native/Libraries/Types/CodegenTypes'; - -export interface Spec extends TurboModule { - +getInt: (arg: Int32) => Int32; - +getFloat: (arg: Float) => Float; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; -const NATIVE_MODULE_WITH_SIMPLE_OBJECT = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - +getObject: (o: Object) => Object, -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULE_WITH_UNSAFE_OBJECT = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; -import type {UnsafeObject} from 'react-native/Libraries/Types/CodegenTypes'; - -export interface Spec extends TurboModule { - +getUnsafeObject: (o: UnsafeObject) => UnsafeObject, -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULE_WITH_PARTIALS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export type SomeObj = {| - a: string, - b?: boolean, -|}; - -export interface Spec extends TurboModule { - +getSomeObj: () => SomeObj; - +getPartialSomeObj: () => Partial; - +getSomeObjFromPartialSomeObj: (value: Partial) => SomeObj; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULE_WITH_PARTIALS_COMPLEX = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export type SomeObj = {| - a: string, - b?: boolean, -|}; - -export type PartialSomeObj = Partial; - -export interface Spec extends TurboModule { - +getPartialPartial: (value1: Partial, value2: PartialSomeObj) => SomeObj -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULE_WITH_ROOT_TAG = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {RootTag, TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - +getRootTag: (rootTag: RootTag) => RootTag, -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULE_WITH_NULLABLE_PARAM = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - // Exported methods. - +voidFunc: (arg: ?string) => void; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULE_WITH_BASIC_ARRAY = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - +getArray: (arg: Array) => Array; - +getArray: (arg: $ReadOnlyArray) => $ReadOnlyArray; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULE_WITH_OBJECT_WITH_OBJECT_DEFINED_IN_FILE_AS_PROPERTY = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -type DisplayMetricsAndroid = {| - width: number, -|}; - -export interface Spec extends TurboModule { - +getConstants: () => {| - +Dimensions: { - windowPhysicalPixels: DisplayMetricsAndroid, - }, - |}; - +getConstants2: () => $ReadOnly<{| - +Dimensions: { - windowPhysicalPixels: DisplayMetricsAndroid, - }, - |}>; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULE_WITH_ARRAY_WITH_UNION_AND_TOUPLE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - +getArray: (arg: Array<[string, string]>) => Array; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULE_WITH_ARRAY_WITH_ALIAS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export type SomeString = string; - -export interface Spec extends TurboModule { - +getArray: (arg: Array) => Array; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULE_WITH_COMPLEX_ARRAY = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - +getArray: (arg: Array>>>>) => Array>>; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULE_WITH_PROMISE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export type String = string; -export type SomeObj = {| a: string |}; - -export interface Spec extends TurboModule { - +getValueWithPromise: () => Promise; - +getValueWithPromiseDefinedSomewhereElse: () => Promise; - +getValueWithPromiseObjDefinedSomewhereElse: () => Promise; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULE_WITH_CALLBACK = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - // Exported methods. - +getValueWithCallback: ( - callback: (value: string, arr: Array>) => void, - ) => void; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULE_WITH_UNION = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export type ChooseInt = 1 | 2 | 3; -export type ChooseFloat = 1.44 | 2.88 | 5.76; -export type ChooseObject = {} | {low: string}; -export type ChooseString = 'One' | 'Two' | 'Three'; - -export interface Spec extends TurboModule { - +getUnion: (chooseInt: ChooseInt, chooseFloat: ChooseFloat, chooseObject: ChooseObject, chooseString: ChooseString) => ChooseObject; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const ANDROID_ONLY_NATIVE_MODULE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - // no methods -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModuleAndroid'); - -`; -const IOS_ONLY_NATIVE_MODULE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export enum Quality { - SD, - HD, -} - -export enum Resolution { - Low = 720, - High = 1080, -} - -export enum Floppy { - LowDensity = 0.72, - HighDensity = 1.44, -} - -export enum StringOptions { - One = 'one', - Two = 'two', - Three = 'three', -} - -export interface Spec extends TurboModule { - getEnums(quality: Quality, resolution?: Resolution, floppy: Floppy, stringOptions: StringOptions): string; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModuleIOS'); - -`; -const CXX_ONLY_NATIVE_MODULE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export type ChooseInt = 1 | 2 | 3; -export type ChooseFloat = 1.44 | 2.88 | 5.76; -export type ChooseObject = {} | {low: string}; -export type ChooseString = 'One' | 'Two' | 'Three'; - -export enum Quality { - SD, - HD, -} - -export enum Resolution { - Low = 720, - High = 1080, -} - -export enum Floppy { - LowDensity = 0.72, - HighDensity = 1.44, -} - -export enum StringOptions { - One = 'one', - Two = 'two', - Three = 'three', -} - -export type BinaryTreeNode = { - left?: BinaryTreeNode, - value: number, - right?: BinaryTreeNode, -}; - -export type GraphNode = { - label: string, - neighbors?: Array, -}; - -export interface Spec extends TurboModule { - +getCallback: () => () => void; - +getMixed: (arg: mixed) => mixed; - +getEnums: (quality: Quality, resolution?: Resolution, floppy: Floppy, stringOptions: StringOptions) => string; - +getBinaryTreeNode: (arg: BinaryTreeNode) => BinaryTreeNode; - +getGraphNode: (arg: GraphNode) => GraphNode; - +getMap: (arg: {[a: string]: ?number}) => {[b: string]: ?number}; - +getAnotherMap: (arg: {[string]: string}) => {[string]: string}; - +getUnion: (chooseInt: ChooseInt, chooseFloat: ChooseFloat, chooseObject: ChooseObject, chooseString: ChooseString) => ChooseObject; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModuleCxx'); - -`; -const PROMISE_WITH_COMMONLY_USED_TYPES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export type Season = 'Spring' | 'Summer' | 'Autumn' | 'Winter'; - -export type CustomObject = {| - field1: Array, - field2: boolean, - field3: string, - type: 'A_String_Literal', -|}; - -export interface Spec extends TurboModule { - returnStringArray(): Promise>; - returnObjectArray(): Promise>; - returnNullableNumber(): Promise; - returnEmpty(): Promise; - returnUnsupportedIndex(): Promise<{ [string]: 'authorized' | 'denied' | 'undetermined' | true | false }>; - returnSupportedIndex(): Promise<{ [string]: CustomObject }>; - returnEnum() : Promise; - returnObject() : Promise; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; -module.exports = { - NATIVE_MODULE_WITH_OBJECT_WITH_OBJECT_DEFINED_IN_FILE_AS_PROPERTY, - NATIVE_MODULE_WITH_ARRAY_WITH_UNION_AND_TOUPLE, - NATIVE_MODULE_WITH_FLOAT_AND_INT32, - NATIVE_MODULE_WITH_ALIASES, - NATIVE_MODULE_WITH_NESTED_ALIASES, - NATIVE_MODULE_WITH_PROMISE, - NATIVE_MODULE_WITH_COMPLEX_OBJECTS, - NATIVE_MODULE_WITH_COMPLEX_OBJECTS_WITH_NULLABLE_KEY, - NATIVE_MODULE_WITH_SIMPLE_OBJECT, - NATIVE_MODULE_WITH_UNSAFE_OBJECT, - NATIVE_MODULE_WITH_PARTIALS, - NATIVE_MODULE_WITH_PARTIALS_COMPLEX, - NATIVE_MODULE_WITH_ROOT_TAG, - NATIVE_MODULE_WITH_NULLABLE_PARAM, - NATIVE_MODULE_WITH_BASIC_ARRAY, - NATIVE_MODULE_WITH_COMPLEX_ARRAY, - NATIVE_MODULE_WITH_ARRAY_WITH_ALIAS, - NATIVE_MODULE_WITH_BASIC_PARAM_TYPES, - NATIVE_MODULE_WITH_CALLBACK, - NATIVE_MODULE_WITH_UNION, - EMPTY_NATIVE_MODULE, - ANDROID_ONLY_NATIVE_MODULE, - IOS_ONLY_NATIVE_MODULE, - CXX_ONLY_NATIVE_MODULE, - PROMISE_WITH_COMMONLY_USED_TYPES, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/flow/modules/__test_fixtures__/fixtures.js.flow b/node_modules/@react-native/codegen/lib/parsers/flow/modules/__test_fixtures__/fixtures.js.flow deleted file mode 100644 index c661f9885..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/flow/modules/__test_fixtures__/fixtures.js.flow +++ /dev/null @@ -1,825 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -// @licenselint-loose-mode - -'use strict'; - -const EMPTY_NATIVE_MODULE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - // no methods -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULE_WITH_COMPLEX_OBJECTS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export type String = string; - -export interface Spec extends TurboModule { - // Exported methods. - +getObject: (arg: {|const1: {|const1: boolean|}|}) => {| - const1: {|const1: boolean|}, - |}; - +getReadOnlyObject: (arg: $ReadOnly<{|const1: $ReadOnly<{|const1: boolean|}>|}>) => $ReadOnly<{| - const1: {|const1: boolean|}, - |}>; - +getObject2: (arg: { a: String }) => Object; - +getObjectInArray: (arg: {const1: {|const1: boolean|}}) => Array<{| - const1: {const1: boolean}, - |}>; -} -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULE_WITH_COMPLEX_OBJECTS_WITH_NULLABLE_KEY = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - +getConstants: () => {| - isTesting: boolean, - reactNativeVersion: {| - major: number, - minor: number, - patch?: number, - prerelease: ?number, - |}, - forceTouchAvailable: boolean, - osVersion: string, - systemName: string, - interfaceIdiom: string, - |}; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULE_WITH_BASIC_PARAM_TYPES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - +passBool?: (arg: boolean) => void; - +passNumber: (arg: number) => void; - +passString: (arg: string) => void; - +passStringish: (arg: Stringish) => void; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULE_WITH_ALIASES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -type NumNum = number; -export type Num = (arg: NumNum) => void; -type Num2 = Num; -export type Void = void; -export type A = number; -export type B = number; -export type ObjectAlias = {| - x: number, - y: number, - label: string, - truthy: boolean, -|}; -export type ReadOnlyAlias = $ReadOnly; - -export interface Spec extends TurboModule { - // Exported methods. - +getNumber: Num2; - +getVoid: () => Void; - +getArray: (a: Array) => {| a: B |}; - +getStringFromAlias: (a: ObjectAlias) => string; - +getStringFromNullableAlias: (a: ?ObjectAlias) => string; - +getStringFromReadOnlyAlias: (a: ReadOnlyAlias) => string; - +getStringFromNullableReadOnlyAlias: (a: ?ReadOnlyAlias) => string; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULE_WITH_NESTED_ALIASES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -type Bar = {| - z: number -|}; - -type Foo = {| - bar1: Bar, - bar2: Bar, -|}; - -export interface Spec extends TurboModule { - // Exported methods. - foo1: (x: Foo) => Foo; - foo2: (x: Foo) => void; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULE_WITH_FLOAT_AND_INT32 = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; -import type {Int32, Float} from 'react-native/Libraries/Types/CodegenTypes'; - -export interface Spec extends TurboModule { - +getInt: (arg: Int32) => Int32; - +getFloat: (arg: Float) => Float; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; - -const NATIVE_MODULE_WITH_SIMPLE_OBJECT = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - +getObject: (o: Object) => Object, -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULE_WITH_UNSAFE_OBJECT = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; -import type {UnsafeObject} from 'react-native/Libraries/Types/CodegenTypes'; - -export interface Spec extends TurboModule { - +getUnsafeObject: (o: UnsafeObject) => UnsafeObject, -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULE_WITH_PARTIALS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export type SomeObj = {| - a: string, - b?: boolean, -|}; - -export interface Spec extends TurboModule { - +getSomeObj: () => SomeObj; - +getPartialSomeObj: () => Partial; - +getSomeObjFromPartialSomeObj: (value: Partial) => SomeObj; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULE_WITH_PARTIALS_COMPLEX = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export type SomeObj = {| - a: string, - b?: boolean, -|}; - -export type PartialSomeObj = Partial; - -export interface Spec extends TurboModule { - +getPartialPartial: (value1: Partial, value2: PartialSomeObj) => SomeObj -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULE_WITH_ROOT_TAG = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {RootTag, TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - +getRootTag: (rootTag: RootTag) => RootTag, -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULE_WITH_NULLABLE_PARAM = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - // Exported methods. - +voidFunc: (arg: ?string) => void; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULE_WITH_BASIC_ARRAY = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - +getArray: (arg: Array) => Array; - +getArray: (arg: $ReadOnlyArray) => $ReadOnlyArray; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULE_WITH_OBJECT_WITH_OBJECT_DEFINED_IN_FILE_AS_PROPERTY = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -type DisplayMetricsAndroid = {| - width: number, -|}; - -export interface Spec extends TurboModule { - +getConstants: () => {| - +Dimensions: { - windowPhysicalPixels: DisplayMetricsAndroid, - }, - |}; - +getConstants2: () => $ReadOnly<{| - +Dimensions: { - windowPhysicalPixels: DisplayMetricsAndroid, - }, - |}>; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULE_WITH_ARRAY_WITH_UNION_AND_TOUPLE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - +getArray: (arg: Array<[string, string]>) => Array; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULE_WITH_ARRAY_WITH_ALIAS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export type SomeString = string; - -export interface Spec extends TurboModule { - +getArray: (arg: Array) => Array; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULE_WITH_COMPLEX_ARRAY = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - +getArray: (arg: Array>>>>) => Array>>; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULE_WITH_PROMISE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export type String = string; -export type SomeObj = {| a: string |}; - -export interface Spec extends TurboModule { - +getValueWithPromise: () => Promise; - +getValueWithPromiseDefinedSomewhereElse: () => Promise; - +getValueWithPromiseObjDefinedSomewhereElse: () => Promise; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULE_WITH_CALLBACK = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - // Exported methods. - +getValueWithCallback: ( - callback: (value: string, arr: Array>) => void, - ) => void; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULE_WITH_UNION = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export type ChooseInt = 1 | 2 | 3; -export type ChooseFloat = 1.44 | 2.88 | 5.76; -export type ChooseObject = {} | {low: string}; -export type ChooseString = 'One' | 'Two' | 'Three'; - -export interface Spec extends TurboModule { - +getUnion: (chooseInt: ChooseInt, chooseFloat: ChooseFloat, chooseObject: ChooseObject, chooseString: ChooseString) => ChooseObject; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const ANDROID_ONLY_NATIVE_MODULE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - // no methods -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModuleAndroid'); - -`; - -const IOS_ONLY_NATIVE_MODULE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export enum Quality { - SD, - HD, -} - -export enum Resolution { - Low = 720, - High = 1080, -} - -export enum Floppy { - LowDensity = 0.72, - HighDensity = 1.44, -} - -export enum StringOptions { - One = 'one', - Two = 'two', - Three = 'three', -} - -export interface Spec extends TurboModule { - getEnums(quality: Quality, resolution?: Resolution, floppy: Floppy, stringOptions: StringOptions): string; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModuleIOS'); - -`; - -const CXX_ONLY_NATIVE_MODULE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export type ChooseInt = 1 | 2 | 3; -export type ChooseFloat = 1.44 | 2.88 | 5.76; -export type ChooseObject = {} | {low: string}; -export type ChooseString = 'One' | 'Two' | 'Three'; - -export enum Quality { - SD, - HD, -} - -export enum Resolution { - Low = 720, - High = 1080, -} - -export enum Floppy { - LowDensity = 0.72, - HighDensity = 1.44, -} - -export enum StringOptions { - One = 'one', - Two = 'two', - Three = 'three', -} - -export type BinaryTreeNode = { - left?: BinaryTreeNode, - value: number, - right?: BinaryTreeNode, -}; - -export type GraphNode = { - label: string, - neighbors?: Array, -}; - -export interface Spec extends TurboModule { - +getCallback: () => () => void; - +getMixed: (arg: mixed) => mixed; - +getEnums: (quality: Quality, resolution?: Resolution, floppy: Floppy, stringOptions: StringOptions) => string; - +getBinaryTreeNode: (arg: BinaryTreeNode) => BinaryTreeNode; - +getGraphNode: (arg: GraphNode) => GraphNode; - +getMap: (arg: {[a: string]: ?number}) => {[b: string]: ?number}; - +getAnotherMap: (arg: {[string]: string}) => {[string]: string}; - +getUnion: (chooseInt: ChooseInt, chooseFloat: ChooseFloat, chooseObject: ChooseObject, chooseString: ChooseString) => ChooseObject; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModuleCxx'); - -`; - -const PROMISE_WITH_COMMONLY_USED_TYPES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export type Season = 'Spring' | 'Summer' | 'Autumn' | 'Winter'; - -export type CustomObject = {| - field1: Array, - field2: boolean, - field3: string, - type: 'A_String_Literal', -|}; - -export interface Spec extends TurboModule { - returnStringArray(): Promise>; - returnObjectArray(): Promise>; - returnNullableNumber(): Promise; - returnEmpty(): Promise; - returnUnsupportedIndex(): Promise<{ [string]: 'authorized' | 'denied' | 'undetermined' | true | false }>; - returnSupportedIndex(): Promise<{ [string]: CustomObject }>; - returnEnum() : Promise; - returnObject() : Promise; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; - -module.exports = { - NATIVE_MODULE_WITH_OBJECT_WITH_OBJECT_DEFINED_IN_FILE_AS_PROPERTY, - NATIVE_MODULE_WITH_ARRAY_WITH_UNION_AND_TOUPLE, - NATIVE_MODULE_WITH_FLOAT_AND_INT32, - NATIVE_MODULE_WITH_ALIASES, - NATIVE_MODULE_WITH_NESTED_ALIASES, - NATIVE_MODULE_WITH_PROMISE, - NATIVE_MODULE_WITH_COMPLEX_OBJECTS, - NATIVE_MODULE_WITH_COMPLEX_OBJECTS_WITH_NULLABLE_KEY, - NATIVE_MODULE_WITH_SIMPLE_OBJECT, - NATIVE_MODULE_WITH_UNSAFE_OBJECT, - NATIVE_MODULE_WITH_PARTIALS, - NATIVE_MODULE_WITH_PARTIALS_COMPLEX, - NATIVE_MODULE_WITH_ROOT_TAG, - NATIVE_MODULE_WITH_NULLABLE_PARAM, - NATIVE_MODULE_WITH_BASIC_ARRAY, - NATIVE_MODULE_WITH_COMPLEX_ARRAY, - NATIVE_MODULE_WITH_ARRAY_WITH_ALIAS, - NATIVE_MODULE_WITH_BASIC_PARAM_TYPES, - NATIVE_MODULE_WITH_CALLBACK, - NATIVE_MODULE_WITH_UNION, - EMPTY_NATIVE_MODULE, - ANDROID_ONLY_NATIVE_MODULE, - IOS_ONLY_NATIVE_MODULE, - CXX_ONLY_NATIVE_MODULE, - PROMISE_WITH_COMMONLY_USED_TYPES, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/flow/modules/index.js b/node_modules/@react-native/codegen/lib/parsers/flow/modules/index.js deleted file mode 100644 index fd5e18e2d..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/flow/modules/index.js +++ /dev/null @@ -1,317 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -function _slicedToArray(arr, i) { - return ( - _arrayWithHoles(arr) || - _iterableToArrayLimit(arr, i) || - _unsupportedIterableToArray(arr, i) || - _nonIterableRest() - ); -} -function _nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.', - ); -} -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === 'string') return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === 'Object' && o.constructor) n = o.constructor.name; - if (n === 'Map' || n === 'Set') return Array.from(o); - if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) - return _arrayLikeToArray(o, minLen); -} -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; -} -function _iterableToArrayLimit(arr, i) { - var _i = - null == arr - ? null - : ('undefined' != typeof Symbol && arr[Symbol.iterator]) || - arr['@@iterator']; - if (null != _i) { - var _s, - _e, - _x, - _r, - _arr = [], - _n = !0, - _d = !1; - try { - if (((_x = (_i = _i.call(arr)).next), 0 === i)) { - if (Object(_i) !== _i) return; - _n = !1; - } else - for ( - ; - !(_n = (_s = _x.call(_i)).done) && - (_arr.push(_s.value), _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - if (!_n && null != _i.return && ((_r = _i.return()), Object(_r) !== _r)) - return; - } finally { - if (_d) throw _e; - } - } - return _arr; - } -} -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} -const _require = require('../../errors'), - UnsupportedGenericParserError = _require.UnsupportedGenericParserError, - UnsupportedTypeAnnotationParserError = - _require.UnsupportedTypeAnnotationParserError; -const _require2 = require('../../parsers-commons'), - assertGenericTypeAnnotationHasExactlyOneTypeParameter = - _require2.assertGenericTypeAnnotationHasExactlyOneTypeParameter, - parseObjectProperty = _require2.parseObjectProperty, - unwrapNullable = _require2.unwrapNullable, - wrapNullable = _require2.wrapNullable; -const _require3 = require('../../parsers-primitives'), - emitArrayType = _require3.emitArrayType, - emitCommonTypes = _require3.emitCommonTypes, - emitDictionary = _require3.emitDictionary, - emitFunction = _require3.emitFunction, - emitPromise = _require3.emitPromise, - emitRootTag = _require3.emitRootTag, - emitUnion = _require3.emitUnion, - typeAliasResolution = _require3.typeAliasResolution, - typeEnumResolution = _require3.typeEnumResolution; -function translateTypeAnnotation( - hasteModuleName, - /** - * TODO(T71778680): Flow-type this node. - */ - flowTypeAnnotation, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, -) { - const resolveTypeAnnotationFN = parser.getResolveTypeAnnotationFN(); - const _resolveTypeAnnotatio = resolveTypeAnnotationFN( - flowTypeAnnotation, - types, - parser, - ), - nullable = _resolveTypeAnnotatio.nullable, - typeAnnotation = _resolveTypeAnnotatio.typeAnnotation, - typeResolutionStatus = _resolveTypeAnnotatio.typeResolutionStatus; - switch (typeAnnotation.type) { - case 'GenericTypeAnnotation': { - switch (parser.getTypeAnnotationName(typeAnnotation)) { - case 'RootTag': { - return emitRootTag(nullable); - } - case 'Promise': { - return emitPromise( - hasteModuleName, - typeAnnotation, - parser, - nullable, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - translateTypeAnnotation, - ); - } - case 'Array': - case '$ReadOnlyArray': { - return emitArrayType( - hasteModuleName, - typeAnnotation, - parser, - types, - aliasMap, - enumMap, - cxxOnly, - nullable, - translateTypeAnnotation, - ); - } - case '$ReadOnly': { - assertGenericTypeAnnotationHasExactlyOneTypeParameter( - hasteModuleName, - typeAnnotation, - parser, - ); - const _unwrapNullable = unwrapNullable( - translateTypeAnnotation( - hasteModuleName, - typeAnnotation.typeParameters.params[0], - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, - ), - ), - _unwrapNullable2 = _slicedToArray(_unwrapNullable, 2), - paramType = _unwrapNullable2[0], - isParamNullable = _unwrapNullable2[1]; - return wrapNullable(nullable || isParamNullable, paramType); - } - default: { - const commonType = emitCommonTypes( - hasteModuleName, - types, - typeAnnotation, - aliasMap, - enumMap, - tryParse, - cxxOnly, - nullable, - parser, - ); - if (!commonType) { - throw new UnsupportedGenericParserError( - hasteModuleName, - typeAnnotation, - parser, - ); - } - return commonType; - } - } - } - case 'ObjectTypeAnnotation': { - // if there is any indexer, then it is a dictionary - if (typeAnnotation.indexers) { - const indexers = typeAnnotation.indexers.filter( - member => member.type === 'ObjectTypeIndexer', - ); - if (indexers.length > 0) { - // check the property type to prevent developers from using unsupported types - // the return value from `translateTypeAnnotation` is unused - const propertyType = indexers[0].value; - const valueType = translateTypeAnnotation( - hasteModuleName, - propertyType, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, - ); - // no need to do further checking - return emitDictionary(nullable, valueType); - } - } - const objectTypeAnnotation = { - type: 'ObjectTypeAnnotation', - // $FlowFixMe[missing-type-arg] - properties: [...typeAnnotation.properties, ...typeAnnotation.indexers] - .map(property => { - return tryParse(() => { - return parseObjectProperty( - flowTypeAnnotation, - property, - hasteModuleName, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - nullable, - translateTypeAnnotation, - parser, - ); - }); - }) - .filter(Boolean), - }; - return typeAliasResolution( - typeResolutionStatus, - objectTypeAnnotation, - aliasMap, - nullable, - ); - } - case 'FunctionTypeAnnotation': { - return emitFunction( - nullable, - hasteModuleName, - typeAnnotation, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - translateTypeAnnotation, - parser, - ); - } - case 'UnionTypeAnnotation': { - return emitUnion(nullable, hasteModuleName, typeAnnotation, parser); - } - case 'StringLiteralTypeAnnotation': { - // 'a' is a special case for 'a' | 'b' but the type name is different - return wrapNullable(nullable, { - type: 'UnionTypeAnnotation', - memberType: 'StringTypeAnnotation', - }); - } - case 'EnumStringBody': - case 'EnumNumberBody': { - return typeEnumResolution( - typeAnnotation, - typeResolutionStatus, - nullable, - hasteModuleName, - enumMap, - parser, - ); - } - default: { - const commonType = emitCommonTypes( - hasteModuleName, - types, - typeAnnotation, - aliasMap, - enumMap, - tryParse, - cxxOnly, - nullable, - parser, - ); - if (!commonType) { - throw new UnsupportedTypeAnnotationParserError( - hasteModuleName, - typeAnnotation, - parser.language(), - ); - } - return commonType; - } - } -} -module.exports = { - flowTranslateTypeAnnotation: translateTypeAnnotation, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/flow/modules/index.js.flow b/node_modules/@react-native/codegen/lib/parsers/flow/modules/index.js.flow deleted file mode 100644 index 93e689553..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/flow/modules/index.js.flow +++ /dev/null @@ -1,266 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type { - NamedShape, - NativeModuleAliasMap, - NativeModuleBaseTypeAnnotation, - NativeModuleEnumMap, - NativeModuleTypeAnnotation, - Nullable, -} from '../../../CodegenSchema'; -import type {Parser} from '../../parser'; -import type {ParserErrorCapturer, TypeDeclarationMap} from '../../utils'; - -const { - UnsupportedGenericParserError, - UnsupportedTypeAnnotationParserError, -} = require('../../errors'); -const { - assertGenericTypeAnnotationHasExactlyOneTypeParameter, - parseObjectProperty, - unwrapNullable, - wrapNullable, -} = require('../../parsers-commons'); -const { - emitArrayType, - emitCommonTypes, - emitDictionary, - emitFunction, - emitPromise, - emitRootTag, - emitUnion, - typeAliasResolution, - typeEnumResolution, -} = require('../../parsers-primitives'); - -function translateTypeAnnotation( - hasteModuleName: string, - /** - * TODO(T71778680): Flow-type this node. - */ - flowTypeAnnotation: $FlowFixMe, - types: TypeDeclarationMap, - aliasMap: {...NativeModuleAliasMap}, - enumMap: {...NativeModuleEnumMap}, - tryParse: ParserErrorCapturer, - cxxOnly: boolean, - parser: Parser, -): Nullable { - const resolveTypeAnnotationFN = parser.getResolveTypeAnnotationFN(); - const {nullable, typeAnnotation, typeResolutionStatus} = - resolveTypeAnnotationFN(flowTypeAnnotation, types, parser); - - switch (typeAnnotation.type) { - case 'GenericTypeAnnotation': { - switch (parser.getTypeAnnotationName(typeAnnotation)) { - case 'RootTag': { - return emitRootTag(nullable); - } - case 'Promise': { - return emitPromise( - hasteModuleName, - typeAnnotation, - parser, - nullable, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - translateTypeAnnotation, - ); - } - case 'Array': - case '$ReadOnlyArray': { - return emitArrayType( - hasteModuleName, - typeAnnotation, - parser, - types, - aliasMap, - enumMap, - cxxOnly, - nullable, - translateTypeAnnotation, - ); - } - case '$ReadOnly': { - assertGenericTypeAnnotationHasExactlyOneTypeParameter( - hasteModuleName, - typeAnnotation, - parser, - ); - - const [paramType, isParamNullable] = unwrapNullable( - translateTypeAnnotation( - hasteModuleName, - typeAnnotation.typeParameters.params[0], - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, - ), - ); - - return wrapNullable(nullable || isParamNullable, paramType); - } - default: { - const commonType = emitCommonTypes( - hasteModuleName, - types, - typeAnnotation, - aliasMap, - enumMap, - tryParse, - cxxOnly, - nullable, - parser, - ); - - if (!commonType) { - throw new UnsupportedGenericParserError( - hasteModuleName, - typeAnnotation, - parser, - ); - } - return commonType; - } - } - } - case 'ObjectTypeAnnotation': { - // if there is any indexer, then it is a dictionary - if (typeAnnotation.indexers) { - const indexers = typeAnnotation.indexers.filter( - member => member.type === 'ObjectTypeIndexer', - ); - if (indexers.length > 0) { - // check the property type to prevent developers from using unsupported types - // the return value from `translateTypeAnnotation` is unused - const propertyType = indexers[0].value; - const valueType = translateTypeAnnotation( - hasteModuleName, - propertyType, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, - ); - // no need to do further checking - return emitDictionary(nullable, valueType); - } - } - - const objectTypeAnnotation = { - type: 'ObjectTypeAnnotation', - // $FlowFixMe[missing-type-arg] - properties: ([ - ...typeAnnotation.properties, - ...typeAnnotation.indexers, - ]: Array<$FlowFixMe>) - .map>>( - property => { - return tryParse(() => { - return parseObjectProperty( - flowTypeAnnotation, - property, - hasteModuleName, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - nullable, - translateTypeAnnotation, - parser, - ); - }); - }, - ) - .filter(Boolean), - }; - - return typeAliasResolution( - typeResolutionStatus, - objectTypeAnnotation, - aliasMap, - nullable, - ); - } - case 'FunctionTypeAnnotation': { - return emitFunction( - nullable, - hasteModuleName, - typeAnnotation, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - translateTypeAnnotation, - parser, - ); - } - case 'UnionTypeAnnotation': { - return emitUnion(nullable, hasteModuleName, typeAnnotation, parser); - } - case 'StringLiteralTypeAnnotation': { - // 'a' is a special case for 'a' | 'b' but the type name is different - return wrapNullable(nullable, { - type: 'UnionTypeAnnotation', - memberType: 'StringTypeAnnotation', - }); - } - case 'EnumStringBody': - case 'EnumNumberBody': { - return typeEnumResolution( - typeAnnotation, - typeResolutionStatus, - nullable, - hasteModuleName, - enumMap, - parser, - ); - } - default: { - const commonType = emitCommonTypes( - hasteModuleName, - types, - typeAnnotation, - aliasMap, - enumMap, - tryParse, - cxxOnly, - nullable, - parser, - ); - - if (!commonType) { - throw new UnsupportedTypeAnnotationParserError( - hasteModuleName, - typeAnnotation, - parser.language(), - ); - } - return commonType; - } - } -} - -module.exports = { - flowTranslateTypeAnnotation: translateTypeAnnotation, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/flow/parseFlowAndThrowErrors.js b/node_modules/@react-native/codegen/lib/parsers/flow/parseFlowAndThrowErrors.js deleted file mode 100644 index a2ce0d84d..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/flow/parseFlowAndThrowErrors.js +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && - (symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), - keys.push.apply(keys, symbols); - } - return keys; -} -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 - ? ownKeys(Object(source), !0).forEach(function (key) { - _defineProperty(target, key, source[key]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties( - target, - Object.getOwnPropertyDescriptors(source), - ) - : ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty( - target, - key, - Object.getOwnPropertyDescriptor(source, key), - ); - }); - } - return target; -} -function _defineProperty(obj, key, value) { - key = _toPropertyKey(key); - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true, - }); - } else { - obj[key] = value; - } - return obj; -} -function _toPropertyKey(arg) { - var key = _toPrimitive(arg, 'string'); - return typeof key === 'symbol' ? key : String(key); -} -function _toPrimitive(input, hint) { - if (typeof input !== 'object' || input === null) return input; - var prim = input[Symbol.toPrimitive]; - if (prim !== undefined) { - var res = prim.call(input, hint || 'default'); - if (typeof res !== 'object') return res; - throw new TypeError('@@toPrimitive must return a primitive value.'); - } - return (hint === 'string' ? String : Number)(input); -} -const hermesParser = require('hermes-parser'); -function parseFlowAndThrowErrors(code, options = {}) { - let ast; - try { - ast = hermesParser.parse( - code, - _objectSpread( - { - // Produce an ESTree-compliant AST - babel: false, - // Parse Flow without a pragma - flow: 'all', - }, - options.filename != null - ? { - sourceFilename: options.filename, - } - : {}, - ), - ); - } catch (e) { - if (options.filename != null) { - e.message = `Syntax error in ${options.filename}: ${e.message}`; - } - throw e; - } - return ast; -} -module.exports = { - parseFlowAndThrowErrors, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/flow/parseFlowAndThrowErrors.js.flow b/node_modules/@react-native/codegen/lib/parsers/flow/parseFlowAndThrowErrors.js.flow deleted file mode 100644 index 8ffb03422..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/flow/parseFlowAndThrowErrors.js.flow +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type {Program as ESTreeProgram} from 'hermes-estree'; - -const hermesParser = require('hermes-parser'); - -function parseFlowAndThrowErrors( - code: string, - options: $ReadOnly<{filename?: ?string}> = {}, -): ESTreeProgram { - let ast; - try { - ast = hermesParser.parse(code, { - // Produce an ESTree-compliant AST - babel: false, - // Parse Flow without a pragma - flow: 'all', - ...(options.filename != null ? {sourceFilename: options.filename} : {}), - }); - } catch (e) { - if (options.filename != null) { - e.message = `Syntax error in ${options.filename}: ${e.message}`; - } - throw e; - } - return ast; -} - -module.exports = { - parseFlowAndThrowErrors, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/flow/parser.d.ts b/node_modules/@react-native/codegen/lib/parsers/flow/parser.d.ts deleted file mode 100644 index 2a60b3683..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/flow/parser.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -import type { Parser } from '../parser'; -import type { SchemaType } from '../../CodegenSchema'; -import type { ParserType } from '../errors'; - -export declare class FlowParser implements Parser { - language(): ParserType; - parseFile(filename: string): SchemaType; - parseString(contents: string, filename?: string): SchemaType; - parseModuleFixture(filename: string): SchemaType; -} diff --git a/node_modules/@react-native/codegen/lib/parsers/flow/parser.js b/node_modules/@react-native/codegen/lib/parsers/flow/parser.js deleted file mode 100644 index ad6bb128a..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/flow/parser.js +++ /dev/null @@ -1,481 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -function _defineProperty(obj, key, value) { - key = _toPropertyKey(key); - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true, - }); - } else { - obj[key] = value; - } - return obj; -} -function _toPropertyKey(arg) { - var key = _toPrimitive(arg, 'string'); - return typeof key === 'symbol' ? key : String(key); -} -function _toPrimitive(input, hint) { - if (typeof input !== 'object' || input === null) return input; - var prim = input[Symbol.toPrimitive]; - if (prim !== undefined) { - var res = prim.call(input, hint || 'default'); - if (typeof res !== 'object') return res; - throw new TypeError('@@toPrimitive must return a primitive value.'); - } - return (hint === 'string' ? String : Number)(input); -} -const _require = require('../errors'), - UnsupportedObjectPropertyTypeAnnotationParserError = - _require.UnsupportedObjectPropertyTypeAnnotationParserError; -const _require2 = require('../parsers-commons'), - buildModuleSchema = _require2.buildModuleSchema, - buildPropSchema = _require2.buildPropSchema, - buildSchema = _require2.buildSchema, - handleGenericTypeAnnotation = _require2.handleGenericTypeAnnotation; -const _require3 = require('../parsers-primitives'), - Visitor = _require3.Visitor; -const _require4 = require('../schema.js'), - wrapComponentSchema = _require4.wrapComponentSchema; -const _require5 = require('./components'), - buildComponentSchema = _require5.buildComponentSchema; -const _require6 = require('./components/componentsUtils'), - flattenProperties = _require6.flattenProperties, - getSchemaInfo = _require6.getSchemaInfo, - getTypeAnnotation = _require6.getTypeAnnotation; -const _require7 = require('./modules'), - flowTranslateTypeAnnotation = _require7.flowTranslateTypeAnnotation; -const _require8 = require('./parseFlowAndThrowErrors'), - parseFlowAndThrowErrors = _require8.parseFlowAndThrowErrors; -const fs = require('fs'); -const invariant = require('invariant'); -class FlowParser { - constructor() { - _defineProperty( - this, - 'typeParameterInstantiation', - 'TypeParameterInstantiation', - ); - _defineProperty(this, 'typeAlias', 'TypeAlias'); - _defineProperty(this, 'enumDeclaration', 'EnumDeclaration'); - _defineProperty(this, 'interfaceDeclaration', 'InterfaceDeclaration'); - _defineProperty( - this, - 'nullLiteralTypeAnnotation', - 'NullLiteralTypeAnnotation', - ); - _defineProperty( - this, - 'undefinedLiteralTypeAnnotation', - 'VoidLiteralTypeAnnotation', - ); - } - isProperty(property) { - return property.type === 'ObjectTypeProperty'; - } - getKeyName(property, hasteModuleName) { - if (!this.isProperty(property)) { - throw new UnsupportedObjectPropertyTypeAnnotationParserError( - hasteModuleName, - property, - property.type, - this.language(), - ); - } - return property.key.name; - } - language() { - return 'Flow'; - } - getTypeAnnotationName(typeAnnotation) { - var _typeAnnotation$id; - return typeAnnotation === null || typeAnnotation === void 0 - ? void 0 - : (_typeAnnotation$id = typeAnnotation.id) === null || - _typeAnnotation$id === void 0 - ? void 0 - : _typeAnnotation$id.name; - } - checkIfInvalidModule(typeArguments) { - return ( - typeArguments.type !== 'TypeParameterInstantiation' || - typeArguments.params.length !== 1 || - typeArguments.params[0].type !== 'GenericTypeAnnotation' || - typeArguments.params[0].id.name !== 'Spec' - ); - } - remapUnionTypeAnnotationMemberNames(membersTypes) { - const remapLiteral = item => { - return item.type - .replace('NumberLiteralTypeAnnotation', 'NumberTypeAnnotation') - .replace('StringLiteralTypeAnnotation', 'StringTypeAnnotation'); - }; - return [...new Set(membersTypes.map(remapLiteral))]; - } - parseFile(filename) { - const contents = fs.readFileSync(filename, 'utf8'); - return this.parseString(contents, filename); - } - parseString(contents, filename) { - return buildSchema( - contents, - filename, - wrapComponentSchema, - buildComponentSchema, - buildModuleSchema, - Visitor, - this, - flowTranslateTypeAnnotation, - ); - } - parseModuleFixture(filename) { - const contents = fs.readFileSync(filename, 'utf8'); - return this.parseString(contents, 'path/NativeSampleTurboModule.js'); - } - getAst(contents, filename) { - return parseFlowAndThrowErrors(contents, { - filename, - }); - } - getFunctionTypeAnnotationParameters(functionTypeAnnotation) { - return functionTypeAnnotation.params; - } - getFunctionNameFromParameter(parameter) { - return parameter.name; - } - getParameterName(parameter) { - return parameter.name.name; - } - getParameterTypeAnnotation(parameter) { - return parameter.typeAnnotation; - } - getFunctionTypeAnnotationReturnType(functionTypeAnnotation) { - return functionTypeAnnotation.returnType; - } - parseEnumMembersType(typeAnnotation) { - const enumMembersType = - typeAnnotation.type === 'EnumStringBody' - ? 'StringTypeAnnotation' - : typeAnnotation.type === 'EnumNumberBody' - ? 'NumberTypeAnnotation' - : null; - if (!enumMembersType) { - throw new Error( - `Unknown enum type annotation type. Got: ${typeAnnotation.type}. Expected: EnumStringBody or EnumNumberBody.`, - ); - } - return enumMembersType; - } - validateEnumMembersSupported(typeAnnotation, enumMembersType) { - if (!typeAnnotation.members || typeAnnotation.members.length === 0) { - // passing mixed members to flow would result in a flow error - // if the tool is launched ignoring that error, the enum would appear like not having enums - throw new Error( - 'Enums should have at least one member and member values can not be mixed- they all must be either blank, number, or string values.', - ); - } - typeAnnotation.members.forEach(member => { - if ( - enumMembersType === 'StringTypeAnnotation' && - (!member.init || typeof member.init.value === 'string') - ) { - return; - } - if ( - enumMembersType === 'NumberTypeAnnotation' && - member.init && - typeof member.init.value === 'number' - ) { - return; - } - throw new Error( - 'Enums can not be mixed- they all must be either blank, number, or string values.', - ); - }); - } - parseEnumMembers(typeAnnotation) { - return typeAnnotation.members.map(member => { - var _member$init$value, _member$init; - return { - name: member.id.name, - value: - (_member$init$value = - (_member$init = member.init) === null || _member$init === void 0 - ? void 0 - : _member$init.value) !== null && _member$init$value !== void 0 - ? _member$init$value - : member.id.name, - }; - }); - } - isModuleInterface(node) { - return ( - node.type === 'InterfaceDeclaration' && - node.extends.length === 1 && - node.extends[0].type === 'InterfaceExtends' && - node.extends[0].id.name === 'TurboModule' - ); - } - isGenericTypeAnnotation(type) { - return type === 'GenericTypeAnnotation'; - } - extractAnnotatedElement(typeAnnotation, types) { - return types[typeAnnotation.typeParameters.params[0].id.name]; - } - - /** - * This FlowFixMe is supposed to refer to an InterfaceDeclaration or TypeAlias - * declaration type. Unfortunately, we don't have those types, because flow-parser - * generates them, and flow-parser is not type-safe. In the future, we should find - * a way to get these types from our flow parser library. - * - * TODO(T71778680): Flow type AST Nodes - */ - - getTypes(ast) { - return ast.body.reduce((types, node) => { - if ( - node.type === 'ExportNamedDeclaration' && - node.exportKind === 'type' - ) { - if ( - node.declaration != null && - (node.declaration.type === 'TypeAlias' || - node.declaration.type === 'InterfaceDeclaration') - ) { - types[node.declaration.id.name] = node.declaration; - } - } else if ( - node.type === 'ExportNamedDeclaration' && - node.exportKind === 'value' && - node.declaration && - node.declaration.type === 'EnumDeclaration' - ) { - types[node.declaration.id.name] = node.declaration; - } else if ( - node.type === 'TypeAlias' || - node.type === 'InterfaceDeclaration' || - node.type === 'EnumDeclaration' - ) { - types[node.id.name] = node; - } - return types; - }, {}); - } - callExpressionTypeParameters(callExpression) { - return callExpression.typeArguments || null; - } - computePartialProperties( - properties, - hasteModuleName, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - ) { - return properties.map(prop => { - return { - name: prop.key.name, - optional: true, - typeAnnotation: flowTranslateTypeAnnotation( - hasteModuleName, - prop.value, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - this, - ), - }; - }); - } - functionTypeAnnotation(propertyValueType) { - return propertyValueType === 'FunctionTypeAnnotation'; - } - getTypeArgumentParamsFromDeclaration(declaration) { - return declaration.typeArguments.params; - } - - /** - * This FlowFixMe is supposed to refer to typeArgumentParams and - * funcArgumentParams of generated AST. - */ - getNativeComponentType(typeArgumentParams, funcArgumentParams) { - return { - propsTypeName: typeArgumentParams[0].id.name, - componentName: funcArgumentParams[0].value, - }; - } - getAnnotatedElementProperties(annotatedElement) { - return annotatedElement.right.properties; - } - bodyProperties(typeAlias) { - return typeAlias.body.properties; - } - convertKeywordToTypeAnnotation(keyword) { - return keyword; - } - argumentForProp(prop) { - return prop.argument; - } - nameForArgument(prop) { - return prop.argument.id.name; - } - isOptionalProperty(property) { - return ( - property.value.type === 'NullableTypeAnnotation' || property.optional - ); - } - getGetSchemaInfoFN() { - return getSchemaInfo; - } - getTypeAnnotationFromProperty(property) { - return property.value.type === 'NullableTypeAnnotation' - ? property.value.typeAnnotation - : property.value; - } - getGetTypeAnnotationFN() { - return getTypeAnnotation; - } - getResolvedTypeAnnotation(typeAnnotation, types, parser) { - invariant( - typeAnnotation != null, - 'resolveTypeAnnotation(): typeAnnotation cannot be null', - ); - let node = typeAnnotation; - let nullable = false; - let typeResolutionStatus = { - successful: false, - }; - for (;;) { - if (node.type === 'NullableTypeAnnotation') { - nullable = true; - node = node.typeAnnotation; - continue; - } - if (node.type !== 'GenericTypeAnnotation') { - break; - } - const typeAnnotationName = this.getTypeAnnotationName(node); - const resolvedTypeAnnotation = types[typeAnnotationName]; - if (resolvedTypeAnnotation == null) { - break; - } - const _handleGenericTypeAnn = handleGenericTypeAnnotation( - node, - resolvedTypeAnnotation, - this, - ), - typeAnnotationNode = _handleGenericTypeAnn.typeAnnotation, - status = _handleGenericTypeAnn.typeResolutionStatus; - typeResolutionStatus = status; - node = typeAnnotationNode; - } - return { - nullable: nullable, - typeAnnotation: node, - typeResolutionStatus, - }; - } - getResolveTypeAnnotationFN() { - return (typeAnnotation, types, parser) => - this.getResolvedTypeAnnotation(typeAnnotation, types, parser); - } - extendsForProp(prop, types, parser) { - const argument = this.argumentForProp(prop); - if (!argument) { - console.log('null', prop); - } - const name = parser.nameForArgument(prop); - if (types[name] != null) { - // This type is locally defined in the file - return null; - } - switch (name) { - case 'ViewProps': - return { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }; - default: { - throw new Error(`Unable to handle prop spread: ${name}`); - } - } - } - removeKnownExtends(typeDefinition, types) { - return typeDefinition.filter( - prop => - prop.type !== 'ObjectTypeSpreadProperty' || - this.extendsForProp(prop, types, this) === null, - ); - } - getExtendsProps(typeDefinition, types) { - return typeDefinition - .filter(prop => prop.type === 'ObjectTypeSpreadProperty') - .map(prop => this.extendsForProp(prop, types, this)) - .filter(Boolean); - } - getProps(typeDefinition, types) { - const nonExtendsProps = this.removeKnownExtends(typeDefinition, types); - const props = flattenProperties(nonExtendsProps, types, this) - .map(property => buildPropSchema(property, types, this)) - .filter(Boolean); - return { - props, - extendsProps: this.getExtendsProps(typeDefinition, types), - }; - } - getProperties(typeName, types) { - const typeAlias = types[typeName]; - try { - return typeAlias.right.typeParameters.params[0].properties; - } catch (e) { - throw new Error( - `Failed to find type definition for "${typeName}", please check that you have a valid codegen flow file`, - ); - } - } - nextNodeForTypeAlias(typeAnnotation) { - return typeAnnotation.right; - } - nextNodeForEnum(typeAnnotation) { - return typeAnnotation.body; - } - genericTypeAnnotationErrorMessage(typeAnnotation) { - return `A non GenericTypeAnnotation must be a type declaration ('${this.typeAlias}') or enum ('${this.enumDeclaration}'). Instead, got the unsupported ${typeAnnotation.type}.`; - } - extractTypeFromTypeAnnotation(typeAnnotation) { - return typeAnnotation.type === 'GenericTypeAnnotation' - ? typeAnnotation.id.name - : typeAnnotation.type; - } - getObjectProperties(typeAnnotation) { - return typeAnnotation.properties; - } - getLiteralValue(option) { - return option.value; - } - getPaperTopLevelNameDeprecated(typeAnnotation) { - return typeAnnotation.typeParameters.params.length > 1 - ? typeAnnotation.typeParameters.params[1].value - : null; - } -} -module.exports = { - FlowParser, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/flow/parser.js.flow b/node_modules/@react-native/codegen/lib/parsers/flow/parser.js.flow deleted file mode 100644 index 91cac322b..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/flow/parser.js.flow +++ /dev/null @@ -1,551 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type { - ExtendsPropsShape, - NamedShape, - NativeModuleAliasMap, - NativeModuleEnumMap, - NativeModuleEnumMembers, - NativeModuleEnumMemberType, - NativeModuleParamTypeAnnotation, - Nullable, - PropTypeAnnotation, - SchemaType, - UnionTypeAnnotationMemberType, -} from '../../CodegenSchema'; -import type {ParserType} from '../errors'; -import type { - GetSchemaInfoFN, - GetTypeAnnotationFN, - Parser, - ResolveTypeAnnotationFN, -} from '../parser'; -import type { - ParserErrorCapturer, - PropAST, - TypeDeclarationMap, - TypeResolutionStatus, -} from '../utils'; - -const { - UnsupportedObjectPropertyTypeAnnotationParserError, -} = require('../errors'); -const { - buildModuleSchema, - buildPropSchema, - buildSchema, - handleGenericTypeAnnotation, -} = require('../parsers-commons'); -const {Visitor} = require('../parsers-primitives'); -const {wrapComponentSchema} = require('../schema.js'); -const {buildComponentSchema} = require('./components'); -const { - flattenProperties, - getSchemaInfo, - getTypeAnnotation, -} = require('./components/componentsUtils'); -const {flowTranslateTypeAnnotation} = require('./modules'); -const {parseFlowAndThrowErrors} = require('./parseFlowAndThrowErrors'); -const fs = require('fs'); -const invariant = require('invariant'); - -type ExtendsForProp = null | { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', -}; - -class FlowParser implements Parser { - typeParameterInstantiation: string = 'TypeParameterInstantiation'; - typeAlias: string = 'TypeAlias'; - enumDeclaration: string = 'EnumDeclaration'; - interfaceDeclaration: string = 'InterfaceDeclaration'; - nullLiteralTypeAnnotation: string = 'NullLiteralTypeAnnotation'; - undefinedLiteralTypeAnnotation: string = 'VoidLiteralTypeAnnotation'; - - isProperty(property: $FlowFixMe): boolean { - return property.type === 'ObjectTypeProperty'; - } - - getKeyName(property: $FlowFixMe, hasteModuleName: string): string { - if (!this.isProperty(property)) { - throw new UnsupportedObjectPropertyTypeAnnotationParserError( - hasteModuleName, - property, - property.type, - this.language(), - ); - } - return property.key.name; - } - - language(): ParserType { - return 'Flow'; - } - - getTypeAnnotationName(typeAnnotation: $FlowFixMe): string { - return typeAnnotation?.id?.name; - } - - checkIfInvalidModule(typeArguments: $FlowFixMe): boolean { - return ( - typeArguments.type !== 'TypeParameterInstantiation' || - typeArguments.params.length !== 1 || - typeArguments.params[0].type !== 'GenericTypeAnnotation' || - typeArguments.params[0].id.name !== 'Spec' - ); - } - - remapUnionTypeAnnotationMemberNames( - membersTypes: $FlowFixMe[], - ): UnionTypeAnnotationMemberType[] { - const remapLiteral = (item: $FlowFixMe) => { - return item.type - .replace('NumberLiteralTypeAnnotation', 'NumberTypeAnnotation') - .replace('StringLiteralTypeAnnotation', 'StringTypeAnnotation'); - }; - - return [...new Set(membersTypes.map(remapLiteral))]; - } - - parseFile(filename: string): SchemaType { - const contents = fs.readFileSync(filename, 'utf8'); - - return this.parseString(contents, filename); - } - - parseString(contents: string, filename: ?string): SchemaType { - return buildSchema( - contents, - filename, - wrapComponentSchema, - buildComponentSchema, - buildModuleSchema, - Visitor, - this, - flowTranslateTypeAnnotation, - ); - } - - parseModuleFixture(filename: string): SchemaType { - const contents = fs.readFileSync(filename, 'utf8'); - - return this.parseString(contents, 'path/NativeSampleTurboModule.js'); - } - - getAst(contents: string, filename?: ?string): $FlowFixMe { - return parseFlowAndThrowErrors(contents, {filename}); - } - - getFunctionTypeAnnotationParameters( - functionTypeAnnotation: $FlowFixMe, - ): $ReadOnlyArray<$FlowFixMe> { - return functionTypeAnnotation.params; - } - - getFunctionNameFromParameter( - parameter: NamedShape>, - ): $FlowFixMe { - return parameter.name; - } - - getParameterName(parameter: $FlowFixMe): string { - return parameter.name.name; - } - - getParameterTypeAnnotation(parameter: $FlowFixMe): $FlowFixMe { - return parameter.typeAnnotation; - } - - getFunctionTypeAnnotationReturnType( - functionTypeAnnotation: $FlowFixMe, - ): $FlowFixMe { - return functionTypeAnnotation.returnType; - } - - parseEnumMembersType(typeAnnotation: $FlowFixMe): NativeModuleEnumMemberType { - const enumMembersType: ?NativeModuleEnumMemberType = - typeAnnotation.type === 'EnumStringBody' - ? 'StringTypeAnnotation' - : typeAnnotation.type === 'EnumNumberBody' - ? 'NumberTypeAnnotation' - : null; - if (!enumMembersType) { - throw new Error( - `Unknown enum type annotation type. Got: ${typeAnnotation.type}. Expected: EnumStringBody or EnumNumberBody.`, - ); - } - return enumMembersType; - } - - validateEnumMembersSupported( - typeAnnotation: $FlowFixMe, - enumMembersType: NativeModuleEnumMemberType, - ): void { - if (!typeAnnotation.members || typeAnnotation.members.length === 0) { - // passing mixed members to flow would result in a flow error - // if the tool is launched ignoring that error, the enum would appear like not having enums - throw new Error( - 'Enums should have at least one member and member values can not be mixed- they all must be either blank, number, or string values.', - ); - } - - typeAnnotation.members.forEach(member => { - if ( - enumMembersType === 'StringTypeAnnotation' && - (!member.init || typeof member.init.value === 'string') - ) { - return; - } - - if ( - enumMembersType === 'NumberTypeAnnotation' && - member.init && - typeof member.init.value === 'number' - ) { - return; - } - - throw new Error( - 'Enums can not be mixed- they all must be either blank, number, or string values.', - ); - }); - } - - parseEnumMembers(typeAnnotation: $FlowFixMe): NativeModuleEnumMembers { - return typeAnnotation.members.map(member => ({ - name: member.id.name, - value: member.init?.value ?? member.id.name, - })); - } - - isModuleInterface(node: $FlowFixMe): boolean { - return ( - node.type === 'InterfaceDeclaration' && - node.extends.length === 1 && - node.extends[0].type === 'InterfaceExtends' && - node.extends[0].id.name === 'TurboModule' - ); - } - - isGenericTypeAnnotation(type: $FlowFixMe): boolean { - return type === 'GenericTypeAnnotation'; - } - - extractAnnotatedElement( - typeAnnotation: $FlowFixMe, - types: TypeDeclarationMap, - ): $FlowFixMe { - return types[typeAnnotation.typeParameters.params[0].id.name]; - } - - /** - * This FlowFixMe is supposed to refer to an InterfaceDeclaration or TypeAlias - * declaration type. Unfortunately, we don't have those types, because flow-parser - * generates them, and flow-parser is not type-safe. In the future, we should find - * a way to get these types from our flow parser library. - * - * TODO(T71778680): Flow type AST Nodes - */ - - getTypes(ast: $FlowFixMe): TypeDeclarationMap { - return ast.body.reduce((types, node) => { - if ( - node.type === 'ExportNamedDeclaration' && - node.exportKind === 'type' - ) { - if ( - node.declaration != null && - (node.declaration.type === 'TypeAlias' || - node.declaration.type === 'InterfaceDeclaration') - ) { - types[node.declaration.id.name] = node.declaration; - } - } else if ( - node.type === 'ExportNamedDeclaration' && - node.exportKind === 'value' && - node.declaration && - node.declaration.type === 'EnumDeclaration' - ) { - types[node.declaration.id.name] = node.declaration; - } else if ( - node.type === 'TypeAlias' || - node.type === 'InterfaceDeclaration' || - node.type === 'EnumDeclaration' - ) { - types[node.id.name] = node; - } - return types; - }, {}); - } - - callExpressionTypeParameters(callExpression: $FlowFixMe): $FlowFixMe | null { - return callExpression.typeArguments || null; - } - - computePartialProperties( - properties: Array<$FlowFixMe>, - hasteModuleName: string, - types: TypeDeclarationMap, - aliasMap: {...NativeModuleAliasMap}, - enumMap: {...NativeModuleEnumMap}, - tryParse: ParserErrorCapturer, - cxxOnly: boolean, - ): Array<$FlowFixMe> { - return properties.map(prop => { - return { - name: prop.key.name, - optional: true, - typeAnnotation: flowTranslateTypeAnnotation( - hasteModuleName, - prop.value, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - this, - ), - }; - }); - } - - functionTypeAnnotation(propertyValueType: string): boolean { - return propertyValueType === 'FunctionTypeAnnotation'; - } - - getTypeArgumentParamsFromDeclaration(declaration: $FlowFixMe): $FlowFixMe { - return declaration.typeArguments.params; - } - - /** - * This FlowFixMe is supposed to refer to typeArgumentParams and - * funcArgumentParams of generated AST. - */ - getNativeComponentType( - typeArgumentParams: $FlowFixMe, - funcArgumentParams: $FlowFixMe, - ): {[string]: string} { - return { - propsTypeName: typeArgumentParams[0].id.name, - componentName: funcArgumentParams[0].value, - }; - } - - getAnnotatedElementProperties(annotatedElement: $FlowFixMe): $FlowFixMe { - return annotatedElement.right.properties; - } - - bodyProperties(typeAlias: $FlowFixMe): $ReadOnlyArray<$FlowFixMe> { - return typeAlias.body.properties; - } - - convertKeywordToTypeAnnotation(keyword: string): string { - return keyword; - } - - argumentForProp(prop: PropAST): $FlowFixMe { - return prop.argument; - } - - nameForArgument(prop: PropAST): $FlowFixMe { - return prop.argument.id.name; - } - - isOptionalProperty(property: $FlowFixMe): boolean { - return ( - property.value.type === 'NullableTypeAnnotation' || property.optional - ); - } - - getGetSchemaInfoFN(): GetSchemaInfoFN { - return getSchemaInfo; - } - - getTypeAnnotationFromProperty(property: PropAST): $FlowFixMe { - return property.value.type === 'NullableTypeAnnotation' - ? property.value.typeAnnotation - : property.value; - } - - getGetTypeAnnotationFN(): GetTypeAnnotationFN { - return getTypeAnnotation; - } - - getResolvedTypeAnnotation( - typeAnnotation: $FlowFixMe, - types: TypeDeclarationMap, - parser: Parser, - ): { - nullable: boolean, - typeAnnotation: $FlowFixMe, - typeResolutionStatus: TypeResolutionStatus, - } { - invariant( - typeAnnotation != null, - 'resolveTypeAnnotation(): typeAnnotation cannot be null', - ); - - let node = typeAnnotation; - let nullable = false; - let typeResolutionStatus: TypeResolutionStatus = { - successful: false, - }; - - for (;;) { - if (node.type === 'NullableTypeAnnotation') { - nullable = true; - node = node.typeAnnotation; - continue; - } - - if (node.type !== 'GenericTypeAnnotation') { - break; - } - - const typeAnnotationName = this.getTypeAnnotationName(node); - const resolvedTypeAnnotation = types[typeAnnotationName]; - if (resolvedTypeAnnotation == null) { - break; - } - - const {typeAnnotation: typeAnnotationNode, typeResolutionStatus: status} = - handleGenericTypeAnnotation(node, resolvedTypeAnnotation, this); - typeResolutionStatus = status; - node = typeAnnotationNode; - } - - return { - nullable: nullable, - typeAnnotation: node, - typeResolutionStatus, - }; - } - - getResolveTypeAnnotationFN(): ResolveTypeAnnotationFN { - return (typeAnnotation, types, parser) => - this.getResolvedTypeAnnotation(typeAnnotation, types, parser); - } - extendsForProp( - prop: PropAST, - types: TypeDeclarationMap, - parser: Parser, - ): ExtendsForProp { - const argument = this.argumentForProp(prop); - if (!argument) { - console.log('null', prop); - } - const name = parser.nameForArgument(prop); - - if (types[name] != null) { - // This type is locally defined in the file - return null; - } - - switch (name) { - case 'ViewProps': - return { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }; - default: { - throw new Error(`Unable to handle prop spread: ${name}`); - } - } - } - - removeKnownExtends( - typeDefinition: $ReadOnlyArray, - types: TypeDeclarationMap, - ): $ReadOnlyArray { - return typeDefinition.filter( - prop => - prop.type !== 'ObjectTypeSpreadProperty' || - this.extendsForProp(prop, types, this) === null, - ); - } - - getExtendsProps( - typeDefinition: $ReadOnlyArray, - types: TypeDeclarationMap, - ): $ReadOnlyArray { - return typeDefinition - .filter(prop => prop.type === 'ObjectTypeSpreadProperty') - .map(prop => this.extendsForProp(prop, types, this)) - .filter(Boolean); - } - - getProps( - typeDefinition: $ReadOnlyArray, - types: TypeDeclarationMap, - ): { - props: $ReadOnlyArray>, - extendsProps: $ReadOnlyArray, - } { - const nonExtendsProps = this.removeKnownExtends(typeDefinition, types); - const props = flattenProperties(nonExtendsProps, types, this) - .map(property => buildPropSchema(property, types, this)) - .filter(Boolean); - - return { - props, - extendsProps: this.getExtendsProps(typeDefinition, types), - }; - } - - getProperties(typeName: string, types: TypeDeclarationMap): $FlowFixMe { - const typeAlias = types[typeName]; - try { - return typeAlias.right.typeParameters.params[0].properties; - } catch (e) { - throw new Error( - `Failed to find type definition for "${typeName}", please check that you have a valid codegen flow file`, - ); - } - } - - nextNodeForTypeAlias(typeAnnotation: $FlowFixMe): $FlowFixMe { - return typeAnnotation.right; - } - - nextNodeForEnum(typeAnnotation: $FlowFixMe): $FlowFixMe { - return typeAnnotation.body; - } - - genericTypeAnnotationErrorMessage(typeAnnotation: $FlowFixMe): string { - return `A non GenericTypeAnnotation must be a type declaration ('${this.typeAlias}') or enum ('${this.enumDeclaration}'). Instead, got the unsupported ${typeAnnotation.type}.`; - } - - extractTypeFromTypeAnnotation(typeAnnotation: $FlowFixMe): string { - return typeAnnotation.type === 'GenericTypeAnnotation' - ? typeAnnotation.id.name - : typeAnnotation.type; - } - - getObjectProperties(typeAnnotation: $FlowFixMe): $FlowFixMe { - return typeAnnotation.properties; - } - - getLiteralValue(option: $FlowFixMe): $FlowFixMe { - return option.value; - } - - getPaperTopLevelNameDeprecated(typeAnnotation: $FlowFixMe): $FlowFixMe { - return typeAnnotation.typeParameters.params.length > 1 - ? typeAnnotation.typeParameters.params[1].value - : null; - } -} - -module.exports = { - FlowParser, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/flow/utils.js b/node_modules/@react-native/codegen/lib/parsers/flow/utils.js deleted file mode 100644 index 31446ab11..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/flow/utils.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -function getValueFromTypes(value, types) { - if (value.type === 'GenericTypeAnnotation' && types[value.id.name]) { - return getValueFromTypes(types[value.id.name].right, types); - } - return value; -} -module.exports = { - getValueFromTypes, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/flow/utils.js.flow b/node_modules/@react-native/codegen/lib/parsers/flow/utils.js.flow deleted file mode 100644 index 02af59166..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/flow/utils.js.flow +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type {ASTNode, TypeDeclarationMap} from '../utils'; - -function getValueFromTypes(value: ASTNode, types: TypeDeclarationMap): ASTNode { - if (value.type === 'GenericTypeAnnotation' && types[value.id.name]) { - return getValueFromTypes(types[value.id.name].right, types); - } - return value; -} - -module.exports = { - getValueFromTypes, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/parser.d.ts b/node_modules/@react-native/codegen/lib/parsers/parser.d.ts deleted file mode 100644 index ae6017a31..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/parser.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -import type { SchemaType } from '../CodegenSchema'; -import type { ParserType } from './errors'; - -// useful members only for downstream -export interface Parser { - language(): ParserType; - parseFile(filename: string): SchemaType; - parseString(contents: string, filename?: string): SchemaType; - parseModuleFixture(filename: string): SchemaType; -} diff --git a/node_modules/@react-native/codegen/lib/parsers/parser.js b/node_modules/@react-native/codegen/lib/parsers/parser.js deleted file mode 100644 index 4949d716c..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/parser.js +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; diff --git a/node_modules/@react-native/codegen/lib/parsers/parser.js.flow b/node_modules/@react-native/codegen/lib/parsers/parser.js.flow deleted file mode 100644 index 4c0d0257e..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/parser.js.flow +++ /dev/null @@ -1,433 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type { - ExtendsPropsShape, - NamedShape, - NativeModuleAliasMap, - NativeModuleEnumMap, - NativeModuleEnumMembers, - NativeModuleEnumMemberType, - NativeModuleParamTypeAnnotation, - Nullable, - PropTypeAnnotation, - SchemaType, - UnionTypeAnnotationMemberType, -} from '../CodegenSchema'; -import type {ParserType} from './errors'; -import type { - ASTNode, - ParserErrorCapturer, - PropAST, - TypeDeclarationMap, - TypeResolutionStatus, -} from './utils'; - -export type GetTypeAnnotationFN = ( - name: string, - annotation: $FlowFixMe | ASTNode, - defaultValue: $FlowFixMe | void, - withNullDefault: boolean, - types: TypeDeclarationMap, - parser: Parser, - buildSchema: ( - property: PropAST, - types: TypeDeclarationMap, - parser: Parser, - ) => $FlowFixMe, -) => $FlowFixMe; - -export type SchemaInfo = { - name: string, - optional: boolean, - typeAnnotation: $FlowFixMe, - defaultValue: $FlowFixMe, - withNullDefault: boolean, -}; - -export type GetSchemaInfoFN = ( - property: PropAST, - types: TypeDeclarationMap, -) => ?SchemaInfo; - -export type BuildSchemaFN = ( - property: PropAST, - types: TypeDeclarationMap, - parser: Parser, -) => ?NamedShape; - -export type ResolveTypeAnnotationFN = ( - typeAnnotation: $FlowFixMe, - types: TypeDeclarationMap, - parser: Parser, -) => { - nullable: boolean, - typeAnnotation: $FlowFixMe, - typeResolutionStatus: TypeResolutionStatus, -}; - -/** - * This is the main interface for Parsers of various languages. - * It exposes all the methods that contain language-specific logic. - */ -export interface Parser { - /** - * This is the TypeParameterInstantiation value - */ - typeParameterInstantiation: string; - - /** - * TypeAlias property of the Parser - */ - typeAlias: string; - - /** - * enumDeclaration Property of the Parser - */ - enumDeclaration: string; - - /** - * InterfaceDeclaration property of the Parser - */ - interfaceDeclaration: string; - - /** - * This is the NullLiteralTypeAnnotation value - */ - nullLiteralTypeAnnotation: string; - - /** - * UndefinedLiteralTypeAnnotation property of the Parser - */ - undefinedLiteralTypeAnnotation: string; - - /** - * Given a declaration, it returns true if it is a property - */ - isProperty(property: $FlowFixMe): boolean; - /** - * Given a property declaration, it returns the key name. - * @parameter property: an object containing a property declaration. - * @parameter hasteModuleName: a string with the native module name. - * @returns: the key name. - * @throws if property does not contain a property declaration. - */ - getKeyName(property: $FlowFixMe, hasteModuleName: string): string; - /** - * @returns: the Parser language. - */ - language(): ParserType; - /** - * Given a type annotation, it returns the type name. - * @parameter typeAnnotation: the annotation for a type in the AST. - * @returns: the name of the type. - */ - getTypeAnnotationName(typeAnnotation: $FlowFixMe): string; - /** - * Given a type arguments, it returns a boolean specifying if the Module is Invalid. - * @parameter typeArguments: the type arguments. - * @returns: a boolean specifying if the Module is Invalid. - */ - checkIfInvalidModule(typeArguments: $FlowFixMe): boolean; - /** - * Given a union annotation members types, it returns an array of remaped members names without duplicates. - * @parameter membersTypes: union annotation members types - * @returns: an array of remaped members names without duplicates. - */ - remapUnionTypeAnnotationMemberNames( - types: $FlowFixMe, - ): UnionTypeAnnotationMemberType[]; - /** - * Given the name of a file, it returns a Schema. - * @parameter filename: the name of the file. - * @returns: the Schema of the file. - */ - parseFile(filename: string): SchemaType; - /** - * Given the content of a file, it returns a Schema. - * @parameter contents: the content of the file. - * @parameter filename: the name of the file. - * @returns: the Schema of the file. - */ - parseString(contents: string, filename: ?string): SchemaType; - /** - * Given the name of a file, it returns a Schema. - * @parameter filename: the name of the file. - * @returns: the Schema of the file. - */ - parseModuleFixture(filename: string): SchemaType; - - /** - * Given the content of a file, it returns an AST. - * @parameter contents: the content of the file. - * @parameter filename: the name of the file, if available. - * @throws if there is a syntax error. - * @returns: the AST of the file. - */ - getAst(contents: string, filename?: ?string): $FlowFixMe; - - /** - * Given a FunctionTypeAnnotation, it returns an array of its parameters. - * @parameter functionTypeAnnotation: a FunctionTypeAnnotation - * @returns: the parameters of the FunctionTypeAnnotation. - */ - getFunctionTypeAnnotationParameters( - functionTypeAnnotation: $FlowFixMe, - ): $ReadOnlyArray<$FlowFixMe>; - - /** - * Given a parameter, it returns the function name of the parameter. - * @parameter parameter: a parameter of a FunctionTypeAnnotation. - * @returns: the function name of the parameter. - */ - getFunctionNameFromParameter( - parameter: NamedShape>, - ): $FlowFixMe; - - /** - * Given a parameter, it returns its name. - * @parameter parameter: a parameter of a FunctionTypeAnnotation. - * @returns: the name of the parameter. - */ - getParameterName(parameter: $FlowFixMe): string; - - /** - * Given a parameter, it returns its typeAnnotation. - * @parameter parameter: a parameter of a FunctionTypeAnnotation. - * @returns: the typeAnnotation of the parameter. - */ - getParameterTypeAnnotation(param: $FlowFixMe): $FlowFixMe; - - /** - * Given a FunctionTypeAnnotation, it returns its returnType. - * @parameter functionTypeAnnotation: a FunctionTypeAnnotation - * @returns: the returnType of the FunctionTypeAnnotation. - */ - getFunctionTypeAnnotationReturnType( - functionTypeAnnotation: $FlowFixMe, - ): $FlowFixMe; - - /** - * Calculates an enum's members type - */ - parseEnumMembersType(typeAnnotation: $FlowFixMe): NativeModuleEnumMemberType; - - /** - * Throws if enum mebers are not supported - */ - validateEnumMembersSupported( - typeAnnotation: $FlowFixMe, - enumMembersType: NativeModuleEnumMemberType, - ): void; - - /** - * Calculates enum's members - */ - parseEnumMembers(typeAnnotation: $FlowFixMe): NativeModuleEnumMembers; - - /** - * Given a node, it returns true if it is a module interface - */ - isModuleInterface(node: $FlowFixMe): boolean; - - /** - * Given a type name, it returns true if it is a generic type annotation - */ - isGenericTypeAnnotation(type: $FlowFixMe): boolean; - - /** - * Given a typeAnnotation, it returns the annotated element. - * @parameter typeAnnotation: the annotation for a type. - * @parameter types: a map of type declarations. - * @returns: the annotated element. - */ - extractAnnotatedElement( - typeAnnotation: $FlowFixMe, - types: TypeDeclarationMap, - ): $FlowFixMe; - - /** - * Given the AST, returns the TypeDeclarationMap - */ - getTypes(ast: $FlowFixMe): TypeDeclarationMap; - - /** - * Given a callExpression, it returns the typeParameters of the callExpression. - * @parameter callExpression: the callExpression. - * @returns: the typeParameters of the callExpression or null if it does not exist. - */ - callExpressionTypeParameters(callExpression: $FlowFixMe): $FlowFixMe | null; - - /** - * Given an array of properties from a Partial type, it returns an array of remaped properties. - * @parameter properties: properties from a Partial types. - * @parameter hasteModuleName: a string with the native module name. - * @parameter types: a map of type declarations. - * @parameter aliasMap: a map of type aliases. - * @parameter enumMap: a map of type enums. - * @parameter tryParse: a parser error capturer. - * @parameter cxxOnly: a boolean specifying if the module is Cxx only. - * @returns: an array of remaped properties - */ - computePartialProperties( - properties: Array<$FlowFixMe>, - hasteModuleName: string, - types: TypeDeclarationMap, - aliasMap: {...NativeModuleAliasMap}, - enumMap: {...NativeModuleEnumMap}, - tryParse: ParserErrorCapturer, - cxxOnly: boolean, - ): Array<$FlowFixMe>; - - /** - * Given a propertyValueType, it returns a boolean specifying if the property is a function type annotation. - * @parameter propertyValueType: the propertyValueType. - * @returns: a boolean specifying if the property is a function type annotation. - */ - functionTypeAnnotation(propertyValueType: string): boolean; - - /** - * Given a declaration, it returns the typeArgumentParams of the declaration. - * @parameter declaration: the declaration. - * @returns: the typeArgumentParams of the declaration. - */ - getTypeArgumentParamsFromDeclaration(declaration: $FlowFixMe): $FlowFixMe; - - /** - * Given a typeArgumentParams and funcArgumentParams it returns a native component type. - * @parameter typeArgumentParams: the typeArgumentParams. - * @parameter funcArgumentParams: the funcArgumentParams. - * @returns: a native component type. - */ - getNativeComponentType( - typeArgumentParams: $FlowFixMe, - funcArgumentParams: $FlowFixMe, - ): {[string]: string}; - - /** - * Given a annotatedElement, it returns the properties of annotated element. - * @parameter annotatedElement: the annotated element. - * @returns: the properties of annotated element. - */ - getAnnotatedElementProperties(annotatedElement: $FlowFixMe): $FlowFixMe; - - /** - * Given a typeAlias, it returns an array of properties. - * @parameter typeAlias: the type alias. - * @returns: an array of properties. - */ - bodyProperties(typeAlias: $FlowFixMe): $ReadOnlyArray<$FlowFixMe>; - - /** - * Given a keyword convert it to TypeAnnotation. - * @parameter keyword - * @returns: converted TypeAnnotation to Keywords - */ - convertKeywordToTypeAnnotation(keyword: string): string; - - /** - * Given a prop return its arguments. - * @parameter prop - * @returns: Arguments of the prop - */ - argumentForProp(prop: PropAST): $FlowFixMe; - - /** - * Given a prop return its name. - * @parameter prop - * @returns: name property - */ - nameForArgument(prop: PropAST): $FlowFixMe; - - /** - * Given a property return if it is optional. - * @parameter property - * @returns: a boolean specifying if the Property is optional - */ - isOptionalProperty(property: $FlowFixMe): boolean; - - getGetTypeAnnotationFN(): GetTypeAnnotationFN; - - getGetSchemaInfoFN(): GetSchemaInfoFN; - - /** - * Given a property return the type annotation. - * @parameter property - * @returns: the annotation for a type in the AST. - */ - getTypeAnnotationFromProperty(property: PropAST): $FlowFixMe; - - getResolvedTypeAnnotation( - typeAnnotation: $FlowFixMe, - types: TypeDeclarationMap, - parser: Parser, - ): { - nullable: boolean, - typeAnnotation: $FlowFixMe, - typeResolutionStatus: TypeResolutionStatus, - }; - - getResolveTypeAnnotationFN(): ResolveTypeAnnotationFN; - - getProps( - typeDefinition: $ReadOnlyArray, - types: TypeDeclarationMap, - ): { - props: $ReadOnlyArray>, - extendsProps: $ReadOnlyArray, - }; - - getProperties(typeName: string, types: TypeDeclarationMap): $FlowFixMe; - - /** - * Given a typeAlias, it returns the next node. - */ - nextNodeForTypeAlias(typeAnnotation: $FlowFixMe): $FlowFixMe; - - /** - * Given an enum Declaration, it returns the next node. - */ - nextNodeForEnum(typeAnnotation: $FlowFixMe): $FlowFixMe; - - /** - * Given a unsupported typeAnnotation, returns an error message. - */ - genericTypeAnnotationErrorMessage(typeAnnotation: $FlowFixMe): string; - - /** - * Given a type annotation, it extracts the type. - * @parameter typeAnnotation: the annotation for a type in the AST. - * @returns: the extracted type. - */ - extractTypeFromTypeAnnotation(typeAnnotation: $FlowFixMe): string; - - /** - * Given a typeAnnotation return the properties of an object. - * @parameter property - * @returns: the properties of an object represented by a type annotation. - */ - getObjectProperties(typeAnnotation: $FlowFixMe): $FlowFixMe; - - /** - * Given a option return the literal value. - * @parameter option - * @returns: the literal value of an union represented. - */ - getLiteralValue(option: $FlowFixMe): $FlowFixMe; - - /** - * Given a type annotation, it returns top level name in the AST if it exists else returns null. - * @parameter typeAnnotation: the annotation for a type in the AST. - * @returns: the top level name properties in the AST if it exists else null. - */ - getPaperTopLevelNameDeprecated(typeAnnotation: $FlowFixMe): $FlowFixMe; -} diff --git a/node_modules/@react-native/codegen/lib/parsers/parserMock.js b/node_modules/@react-native/codegen/lib/parsers/parserMock.js deleted file mode 100644 index b16040960..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/parserMock.js +++ /dev/null @@ -1,417 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -function _defineProperty(obj, key, value) { - key = _toPropertyKey(key); - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true, - }); - } else { - obj[key] = value; - } - return obj; -} -function _toPropertyKey(arg) { - var key = _toPrimitive(arg, 'string'); - return typeof key === 'symbol' ? key : String(key); -} -function _toPrimitive(input, hint) { - if (typeof input !== 'object' || input === null) return input; - var prim = input[Symbol.toPrimitive]; - if (prim !== undefined) { - var res = prim.call(input, hint || 'default'); - if (typeof res !== 'object') return res; - throw new TypeError('@@toPrimitive must return a primitive value.'); - } - return (hint === 'string' ? String : Number)(input); -} -import invariant from 'invariant'; -const _require = require('./errors'), - UnsupportedObjectPropertyTypeAnnotationParserError = - _require.UnsupportedObjectPropertyTypeAnnotationParserError; -const _require2 = require('./flow/parseFlowAndThrowErrors'), - parseFlowAndThrowErrors = _require2.parseFlowAndThrowErrors; -const _require3 = require('./parsers-commons'), - buildPropSchema = _require3.buildPropSchema; -const _require4 = require('./typescript/components/componentsUtils'), - flattenProperties = _require4.flattenProperties; -const schemaMock = { - modules: { - StringPropNativeComponentView: { - type: 'Component', - components: { - StringPropNativeComponentView: { - extendsProps: [], - events: [], - props: [], - commands: [], - }, - }, - }, - }, -}; -export class MockedParser { - constructor() { - _defineProperty( - this, - 'typeParameterInstantiation', - 'TypeParameterInstantiation', - ); - _defineProperty(this, 'typeAlias', 'TypeAlias'); - _defineProperty(this, 'enumDeclaration', 'EnumDeclaration'); - _defineProperty(this, 'interfaceDeclaration', 'InterfaceDeclaration'); - _defineProperty( - this, - 'nullLiteralTypeAnnotation', - 'NullLiteralTypeAnnotation', - ); - _defineProperty( - this, - 'undefinedLiteralTypeAnnotation', - 'VoidLiteralTypeAnnotation', - ); - } - isProperty(property) { - return property.type === 'ObjectTypeProperty'; - } - getKeyName(property, hasteModuleName) { - if (!this.isProperty(property)) { - throw new UnsupportedObjectPropertyTypeAnnotationParserError( - hasteModuleName, - property, - property.type, - this.language(), - ); - } - return property.key.name; - } - language() { - return 'Flow'; - } - getTypeAnnotationName(typeAnnotation) { - var _typeAnnotation$id; - return typeAnnotation === null || typeAnnotation === void 0 - ? void 0 - : (_typeAnnotation$id = typeAnnotation.id) === null || - _typeAnnotation$id === void 0 - ? void 0 - : _typeAnnotation$id.name; - } - checkIfInvalidModule(typeArguments) { - return false; - } - remapUnionTypeAnnotationMemberNames(membersTypes) { - return []; - } - parseFile(filename) { - return schemaMock; - } - parseString(contents, filename) { - return schemaMock; - } - parseModuleFixture(filename) { - return schemaMock; - } - getAst(contents, filename) { - return parseFlowAndThrowErrors(contents, { - filename, - }); - } - getFunctionTypeAnnotationParameters(functionTypeAnnotation) { - return functionTypeAnnotation.params; - } - getFunctionNameFromParameter(parameter) { - return parameter.name; - } - getParameterName(parameter) { - return parameter.name.name; - } - getParameterTypeAnnotation(parameter) { - return parameter.typeAnnotation; - } - getFunctionTypeAnnotationReturnType(functionTypeAnnotation) { - return functionTypeAnnotation.returnType; - } - parseEnumMembersType(typeAnnotation) { - return typeAnnotation.type; - } - validateEnumMembersSupported(typeAnnotation, enumMembersType) { - return; - } - parseEnumMembers(typeAnnotation) { - return typeAnnotation.type === 'StringTypeAnnotation' - ? [ - { - name: 'Hello', - value: 'hello', - }, - { - name: 'Goodbye', - value: 'goodbye', - }, - ] - : [ - { - name: 'On', - value: '1', - }, - { - name: 'Off', - value: '0', - }, - ]; - } - isModuleInterface(node) { - return ( - node.type === 'InterfaceDeclaration' && - node.extends.length === 1 && - node.extends[0].type === 'InterfaceExtends' && - node.extends[0].id.name === 'TurboModule' - ); - } - isGenericTypeAnnotation(type) { - return true; - } - extractAnnotatedElement(typeAnnotation, types) { - return types[typeAnnotation.typeParameters.params[0].id.name]; - } - getTypes(ast) { - return {}; - } - callExpressionTypeParameters(callExpression) { - return callExpression.typeArguments || null; - } - computePartialProperties( - properties, - hasteModuleName, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - ) { - return [ - { - name: 'a', - optional: true, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }, - { - name: 'b', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }, - ]; - } - functionTypeAnnotation(propertyValueType) { - return propertyValueType === 'FunctionTypeAnnotation'; - } - getTypeArgumentParamsFromDeclaration(declaration) { - return declaration.typeArguments.params; - } - getNativeComponentType(typeArgumentParams, funcArgumentParams) { - return { - propsTypeName: typeArgumentParams[0].id.name, - componentName: funcArgumentParams[0].value, - }; - } - getAnnotatedElementProperties(annotatedElement) { - return annotatedElement.right.properties; - } - bodyProperties(typeAlias) { - return typeAlias.body.properties; - } - convertKeywordToTypeAnnotation(keyword) { - return keyword; - } - argumentForProp(prop) { - return prop.expression; - } - nameForArgument(prop) { - return prop.expression.name; - } - isOptionalProperty(property) { - return property.optional || false; - } - getTypeAnnotationFromProperty(property) { - return property.typeAnnotation.typeAnnotation; - } - getGetTypeAnnotationFN() { - return () => { - return {}; - }; - } - getGetSchemaInfoFN() { - return () => { - return { - name: 'MockedSchema', - optional: false, - typeAnnotation: 'BooleanTypeAnnotation', - defaultValue: false, - withNullDefault: false, - }; - }; - } - getResolveTypeAnnotationFN() { - return () => { - return { - nullable: false, - typeAnnotation: null, - typeResolutionStatus: { - successful: false, - }, - }; - }; - } - getResolvedTypeAnnotation(typeAnnotation, types) { - invariant( - typeAnnotation != null, - 'resolveTypeAnnotation(): typeAnnotation cannot be null', - ); - let node = typeAnnotation; - let nullable = false; - let typeResolutionStatus = { - successful: false, - }; - for (;;) { - if (node.type === 'NullableTypeAnnotation') { - nullable = true; - node = node.typeAnnotation; - continue; - } - if (node.type !== 'GenericTypeAnnotation') { - break; - } - const resolvedTypeAnnotation = types[node.id.name]; - if (resolvedTypeAnnotation == null) { - break; - } - switch (resolvedTypeAnnotation.type) { - case 'TypeAlias': { - typeResolutionStatus = { - successful: true, - type: 'alias', - name: node.id.name, - }; - node = resolvedTypeAnnotation.right; - break; - } - case 'EnumDeclaration': { - typeResolutionStatus = { - successful: true, - type: 'enum', - name: node.id.name, - }; - node = resolvedTypeAnnotation.body; - break; - } - default: { - throw new TypeError( - `A non GenericTypeAnnotation must be a type declaration ('TypeAlias') or enum ('EnumDeclaration'). Instead, got the unsupported ${resolvedTypeAnnotation.type}.`, - ); - } - } - } - return { - nullable: nullable, - typeAnnotation: node, - typeResolutionStatus, - }; - } - getExtendsProps(typeDefinition, types) { - return typeDefinition - .filter(prop => prop.type === 'ObjectTypeSpreadProperty') - .map(prop => this.extendsForProp(prop, types, this)) - .filter(Boolean); - } - extendsForProp(prop, types, parser) { - const argument = this.argumentForProp(prop); - if (!argument) { - console.log('null', prop); - } - const name = parser.nameForArgument(prop); - if (types[name] != null) { - // This type is locally defined in the file - return null; - } - switch (name) { - case 'ViewProps': - return { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }; - default: { - throw new Error(`Unable to handle prop spread: ${name}`); - } - } - } - removeKnownExtends(typeDefinition, types) { - return typeDefinition.filter( - prop => - prop.type !== 'ObjectTypeSpreadProperty' || - this.extendsForProp(prop, types, this) === null, - ); - } - getProps(typeDefinition, types) { - const nonExtendsProps = this.removeKnownExtends(typeDefinition, types); - const props = flattenProperties(nonExtendsProps, types, this) - .map(property => buildPropSchema(property, types, this)) - .filter(Boolean); - return { - props, - extendsProps: this.getExtendsProps(typeDefinition, types), - }; - } - getProperties(typeName, types) { - const typeAlias = types[typeName]; - try { - return typeAlias.right.typeParameters.params[0].properties; - } catch (e) { - throw new Error( - `Failed to find type definition for "${typeName}", please check that you have a valid codegen flow file`, - ); - } - } - nextNodeForTypeAlias(typeAnnotation) { - return typeAnnotation.right; - } - nextNodeForEnum(typeAnnotation) { - return typeAnnotation.body; - } - genericTypeAnnotationErrorMessage(typeAnnotation) { - return `A non GenericTypeAnnotation must be a type declaration ('${this.typeAlias}') or enum ('${this.enumDeclaration}'). Instead, got the unsupported ${typeAnnotation.type}.`; - } - extractTypeFromTypeAnnotation(typeAnnotation) { - return typeAnnotation.type === 'GenericTypeAnnotation' - ? typeAnnotation.id.name - : typeAnnotation.type; - } - getObjectProperties(typeAnnotation) { - return typeAnnotation.properties; - } - getLiteralValue(option) { - return option.value; - } - getPaperTopLevelNameDeprecated(typeAnnotation) { - return typeAnnotation.typeParameters.params.length > 1 - ? typeAnnotation.typeParameters.params[1].value - : null; - } -} diff --git a/node_modules/@react-native/codegen/lib/parsers/parserMock.js.flow b/node_modules/@react-native/codegen/lib/parsers/parserMock.js.flow deleted file mode 100644 index 7b0cc7ed5..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/parserMock.js.flow +++ /dev/null @@ -1,492 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type { - ExtendsPropsShape, - NamedShape, - NativeModuleAliasMap, - NativeModuleEnumMap, - NativeModuleEnumMembers, - NativeModuleEnumMemberType, - NativeModuleParamTypeAnnotation, - Nullable, - PropTypeAnnotation, - SchemaType, - UnionTypeAnnotationMemberType, -} from '../CodegenSchema'; -import type {ParserType} from './errors'; -import type { - GetSchemaInfoFN, - GetTypeAnnotationFN, - Parser, - ResolveTypeAnnotationFN, -} from './parser'; -import type { - ParserErrorCapturer, - PropAST, - TypeDeclarationMap, - TypeResolutionStatus, -} from './utils'; - -import invariant from 'invariant'; - -const { - UnsupportedObjectPropertyTypeAnnotationParserError, -} = require('./errors'); -const {parseFlowAndThrowErrors} = require('./flow/parseFlowAndThrowErrors'); -const {buildPropSchema} = require('./parsers-commons'); -const {flattenProperties} = require('./typescript/components/componentsUtils'); - -type ExtendsForProp = null | { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', -}; - -const schemaMock = { - modules: { - StringPropNativeComponentView: { - type: 'Component', - components: { - StringPropNativeComponentView: { - extendsProps: [], - events: [], - props: [], - commands: [], - }, - }, - }, - }, -}; - -export class MockedParser implements Parser { - typeParameterInstantiation: string = 'TypeParameterInstantiation'; - typeAlias: string = 'TypeAlias'; - enumDeclaration: string = 'EnumDeclaration'; - interfaceDeclaration: string = 'InterfaceDeclaration'; - nullLiteralTypeAnnotation: string = 'NullLiteralTypeAnnotation'; - undefinedLiteralTypeAnnotation: string = 'VoidLiteralTypeAnnotation'; - - isProperty(property: $FlowFixMe): boolean { - return property.type === 'ObjectTypeProperty'; - } - - getKeyName(property: $FlowFixMe, hasteModuleName: string): string { - if (!this.isProperty(property)) { - throw new UnsupportedObjectPropertyTypeAnnotationParserError( - hasteModuleName, - property, - property.type, - this.language(), - ); - } - return property.key.name; - } - - language(): ParserType { - return 'Flow'; - } - - getTypeAnnotationName(typeAnnotation: $FlowFixMe): string { - return typeAnnotation?.id?.name; - } - - checkIfInvalidModule(typeArguments: $FlowFixMe): boolean { - return false; - } - - remapUnionTypeAnnotationMemberNames( - membersTypes: $FlowFixMe[], - ): UnionTypeAnnotationMemberType[] { - return []; - } - - parseFile(filename: string): SchemaType { - return schemaMock; - } - - parseString(contents: string, filename: ?string): SchemaType { - return schemaMock; - } - - parseModuleFixture(filename: string): SchemaType { - return schemaMock; - } - - getAst(contents: string, filename?: ?string): $FlowFixMe { - return parseFlowAndThrowErrors(contents, {filename}); - } - - getFunctionTypeAnnotationParameters( - functionTypeAnnotation: $FlowFixMe, - ): $ReadOnlyArray<$FlowFixMe> { - return functionTypeAnnotation.params; - } - - getFunctionNameFromParameter( - parameter: NamedShape>, - ): $FlowFixMe { - return parameter.name; - } - - getParameterName(parameter: $FlowFixMe): string { - return parameter.name.name; - } - - getParameterTypeAnnotation(parameter: $FlowFixMe): $FlowFixMe { - return parameter.typeAnnotation; - } - - getFunctionTypeAnnotationReturnType( - functionTypeAnnotation: $FlowFixMe, - ): $FlowFixMe { - return functionTypeAnnotation.returnType; - } - - parseEnumMembersType(typeAnnotation: $FlowFixMe): NativeModuleEnumMemberType { - return typeAnnotation.type; - } - - validateEnumMembersSupported( - typeAnnotation: $FlowFixMe, - enumMembersType: NativeModuleEnumMemberType, - ): void { - return; - } - - parseEnumMembers(typeAnnotation: $FlowFixMe): NativeModuleEnumMembers { - return typeAnnotation.type === 'StringTypeAnnotation' - ? [ - { - name: 'Hello', - value: 'hello', - }, - { - name: 'Goodbye', - value: 'goodbye', - }, - ] - : [ - { - name: 'On', - value: '1', - }, - { - name: 'Off', - value: '0', - }, - ]; - } - - isModuleInterface(node: $FlowFixMe): boolean { - return ( - node.type === 'InterfaceDeclaration' && - node.extends.length === 1 && - node.extends[0].type === 'InterfaceExtends' && - node.extends[0].id.name === 'TurboModule' - ); - } - - isGenericTypeAnnotation(type: $FlowFixMe): boolean { - return true; - } - - extractAnnotatedElement( - typeAnnotation: $FlowFixMe, - types: TypeDeclarationMap, - ): $FlowFixMe { - return types[typeAnnotation.typeParameters.params[0].id.name]; - } - - getTypes(ast: $FlowFixMe): TypeDeclarationMap { - return {}; - } - - callExpressionTypeParameters(callExpression: $FlowFixMe): $FlowFixMe | null { - return callExpression.typeArguments || null; - } - - computePartialProperties( - properties: Array<$FlowFixMe>, - hasteModuleName: string, - types: TypeDeclarationMap, - aliasMap: {...NativeModuleAliasMap}, - enumMap: {...NativeModuleEnumMap}, - tryParse: ParserErrorCapturer, - cxxOnly: boolean, - ): Array<$FlowFixMe> { - return [ - { - name: 'a', - optional: true, - typeAnnotation: {type: 'StringTypeAnnotation'}, - }, - { - name: 'b', - optional: true, - typeAnnotation: {type: 'BooleanTypeAnnotation'}, - }, - ]; - } - - functionTypeAnnotation(propertyValueType: string): boolean { - return propertyValueType === 'FunctionTypeAnnotation'; - } - - getTypeArgumentParamsFromDeclaration(declaration: $FlowFixMe): $FlowFixMe { - return declaration.typeArguments.params; - } - - getNativeComponentType( - typeArgumentParams: $FlowFixMe, - funcArgumentParams: $FlowFixMe, - ): {[string]: string} { - return { - propsTypeName: typeArgumentParams[0].id.name, - componentName: funcArgumentParams[0].value, - }; - } - - getAnnotatedElementProperties(annotatedElement: $FlowFixMe): $FlowFixMe { - return annotatedElement.right.properties; - } - - bodyProperties(typeAlias: $FlowFixMe): $ReadOnlyArray<$FlowFixMe> { - return typeAlias.body.properties; - } - - convertKeywordToTypeAnnotation(keyword: string): string { - return keyword; - } - - argumentForProp(prop: PropAST): $FlowFixMe { - return prop.expression; - } - - nameForArgument(prop: PropAST): $FlowFixMe { - return prop.expression.name; - } - - isOptionalProperty(property: $FlowFixMe): boolean { - return property.optional || false; - } - - getTypeAnnotationFromProperty(property: PropAST): $FlowFixMe { - return property.typeAnnotation.typeAnnotation; - } - - getGetTypeAnnotationFN(): GetTypeAnnotationFN { - return () => { - return {}; - }; - } - - getGetSchemaInfoFN(): GetSchemaInfoFN { - return () => { - return { - name: 'MockedSchema', - optional: false, - typeAnnotation: 'BooleanTypeAnnotation', - defaultValue: false, - withNullDefault: false, - }; - }; - } - - getResolveTypeAnnotationFN(): ResolveTypeAnnotationFN { - return () => { - return { - nullable: false, - typeAnnotation: null, - typeResolutionStatus: {successful: false}, - }; - }; - } - - getResolvedTypeAnnotation( - typeAnnotation: $FlowFixMe, - types: TypeDeclarationMap, - ): { - nullable: boolean, - typeAnnotation: $FlowFixMe, - typeResolutionStatus: TypeResolutionStatus, - } { - invariant( - typeAnnotation != null, - 'resolveTypeAnnotation(): typeAnnotation cannot be null', - ); - - let node = typeAnnotation; - let nullable = false; - let typeResolutionStatus: TypeResolutionStatus = { - successful: false, - }; - - for (;;) { - if (node.type === 'NullableTypeAnnotation') { - nullable = true; - node = node.typeAnnotation; - continue; - } - - if (node.type !== 'GenericTypeAnnotation') { - break; - } - - const resolvedTypeAnnotation = types[node.id.name]; - if (resolvedTypeAnnotation == null) { - break; - } - - switch (resolvedTypeAnnotation.type) { - case 'TypeAlias': { - typeResolutionStatus = { - successful: true, - type: 'alias', - name: node.id.name, - }; - node = resolvedTypeAnnotation.right; - break; - } - case 'EnumDeclaration': { - typeResolutionStatus = { - successful: true, - type: 'enum', - name: node.id.name, - }; - node = resolvedTypeAnnotation.body; - break; - } - default: { - throw new TypeError( - `A non GenericTypeAnnotation must be a type declaration ('TypeAlias') or enum ('EnumDeclaration'). Instead, got the unsupported ${resolvedTypeAnnotation.type}.`, - ); - } - } - } - - return { - nullable: nullable, - typeAnnotation: node, - typeResolutionStatus, - }; - } - - getExtendsProps( - typeDefinition: $ReadOnlyArray, - types: TypeDeclarationMap, - ): $ReadOnlyArray { - return typeDefinition - .filter(prop => prop.type === 'ObjectTypeSpreadProperty') - .map(prop => this.extendsForProp(prop, types, this)) - .filter(Boolean); - } - - extendsForProp( - prop: PropAST, - types: TypeDeclarationMap, - parser: Parser, - ): ExtendsForProp { - const argument = this.argumentForProp(prop); - if (!argument) { - console.log('null', prop); - } - const name = parser.nameForArgument(prop); - - if (types[name] != null) { - // This type is locally defined in the file - return null; - } - - switch (name) { - case 'ViewProps': - return { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }; - default: { - throw new Error(`Unable to handle prop spread: ${name}`); - } - } - } - - removeKnownExtends( - typeDefinition: $ReadOnlyArray, - types: TypeDeclarationMap, - ): $ReadOnlyArray { - return typeDefinition.filter( - prop => - prop.type !== 'ObjectTypeSpreadProperty' || - this.extendsForProp(prop, types, this) === null, - ); - } - - getProps( - typeDefinition: $ReadOnlyArray, - types: TypeDeclarationMap, - ): { - props: $ReadOnlyArray>, - extendsProps: $ReadOnlyArray, - } { - const nonExtendsProps = this.removeKnownExtends(typeDefinition, types); - const props = flattenProperties(nonExtendsProps, types, this) - .map(property => buildPropSchema(property, types, this)) - .filter(Boolean); - - return { - props, - extendsProps: this.getExtendsProps(typeDefinition, types), - }; - } - - getProperties(typeName: string, types: TypeDeclarationMap): $FlowFixMe { - const typeAlias = types[typeName]; - try { - return typeAlias.right.typeParameters.params[0].properties; - } catch (e) { - throw new Error( - `Failed to find type definition for "${typeName}", please check that you have a valid codegen flow file`, - ); - } - } - - nextNodeForTypeAlias(typeAnnotation: $FlowFixMe): $FlowFixMe { - return typeAnnotation.right; - } - - nextNodeForEnum(typeAnnotation: $FlowFixMe): $FlowFixMe { - return typeAnnotation.body; - } - - genericTypeAnnotationErrorMessage(typeAnnotation: $FlowFixMe): string { - return `A non GenericTypeAnnotation must be a type declaration ('${this.typeAlias}') or enum ('${this.enumDeclaration}'). Instead, got the unsupported ${typeAnnotation.type}.`; - } - - extractTypeFromTypeAnnotation(typeAnnotation: $FlowFixMe): string { - return typeAnnotation.type === 'GenericTypeAnnotation' - ? typeAnnotation.id.name - : typeAnnotation.type; - } - - getObjectProperties(typeAnnotation: $FlowFixMe): $FlowFixMe { - return typeAnnotation.properties; - } - - getLiteralValue(option: $FlowFixMe): $FlowFixMe { - return option.value; - } - - getPaperTopLevelNameDeprecated(typeAnnotation: $FlowFixMe): $FlowFixMe { - return typeAnnotation.typeParameters.params.length > 1 - ? typeAnnotation.typeParameters.params[1].value - : null; - } -} diff --git a/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js b/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js deleted file mode 100644 index c2c8786a1..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js +++ /dev/null @@ -1,1150 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && - (symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), - keys.push.apply(keys, symbols); - } - return keys; -} -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 - ? ownKeys(Object(source), !0).forEach(function (key) { - _defineProperty(target, key, source[key]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties( - target, - Object.getOwnPropertyDescriptors(source), - ) - : ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty( - target, - key, - Object.getOwnPropertyDescriptor(source, key), - ); - }); - } - return target; -} -function _defineProperty(obj, key, value) { - key = _toPropertyKey(key); - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true, - }); - } else { - obj[key] = value; - } - return obj; -} -function _toPropertyKey(arg) { - var key = _toPrimitive(arg, 'string'); - return typeof key === 'symbol' ? key : String(key); -} -function _toPrimitive(input, hint) { - if (typeof input !== 'object' || input === null) return input; - var prim = input[Symbol.toPrimitive]; - if (prim !== undefined) { - var res = prim.call(input, hint || 'default'); - if (typeof res !== 'object') return res; - throw new TypeError('@@toPrimitive must return a primitive value.'); - } - return (hint === 'string' ? String : Number)(input); -} -function _slicedToArray(arr, i) { - return ( - _arrayWithHoles(arr) || - _iterableToArrayLimit(arr, i) || - _unsupportedIterableToArray(arr, i) || - _nonIterableRest() - ); -} -function _nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.', - ); -} -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === 'string') return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === 'Object' && o.constructor) n = o.constructor.name; - if (n === 'Map' || n === 'Set') return Array.from(o); - if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) - return _arrayLikeToArray(o, minLen); -} -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; -} -function _iterableToArrayLimit(arr, i) { - var _i = - null == arr - ? null - : ('undefined' != typeof Symbol && arr[Symbol.iterator]) || - arr['@@iterator']; - if (null != _i) { - var _s, - _e, - _x, - _r, - _arr = [], - _n = !0, - _d = !1; - try { - if (((_x = (_i = _i.call(arr)).next), 0 === i)) { - if (Object(_i) !== _i) return; - _n = !1; - } else - for ( - ; - !(_n = (_s = _x.call(_i)).done) && - (_arr.push(_s.value), _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - if (!_n && null != _i.return && ((_r = _i.return()), Object(_r) !== _r)) - return; - } finally { - if (_d) throw _e; - } - } - return _arr; - } -} -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} -const _require = require('./error-utils'), - throwIfConfigNotfound = _require.throwIfConfigNotfound, - throwIfIncorrectModuleRegistryCallArgument = - _require.throwIfIncorrectModuleRegistryCallArgument, - throwIfIncorrectModuleRegistryCallTypeParameterParserError = - _require.throwIfIncorrectModuleRegistryCallTypeParameterParserError, - throwIfModuleInterfaceIsMisnamed = _require.throwIfModuleInterfaceIsMisnamed, - throwIfModuleInterfaceNotFound = _require.throwIfModuleInterfaceNotFound, - throwIfModuleTypeIsUnsupported = _require.throwIfModuleTypeIsUnsupported, - throwIfMoreThanOneCodegenNativecommands = - _require.throwIfMoreThanOneCodegenNativecommands, - throwIfMoreThanOneConfig = _require.throwIfMoreThanOneConfig, - throwIfMoreThanOneModuleInterfaceParserError = - _require.throwIfMoreThanOneModuleInterfaceParserError, - throwIfMoreThanOneModuleRegistryCalls = - _require.throwIfMoreThanOneModuleRegistryCalls, - throwIfPropertyValueTypeIsUnsupported = - _require.throwIfPropertyValueTypeIsUnsupported, - throwIfTypeAliasIsNotInterface = _require.throwIfTypeAliasIsNotInterface, - throwIfUnsupportedFunctionParamTypeAnnotationParserError = - _require.throwIfUnsupportedFunctionParamTypeAnnotationParserError, - throwIfUnsupportedFunctionReturnTypeAnnotationParserError = - _require.throwIfUnsupportedFunctionReturnTypeAnnotationParserError, - throwIfUntypedModule = _require.throwIfUntypedModule, - throwIfUnusedModuleInterfaceParserError = - _require.throwIfUnusedModuleInterfaceParserError, - throwIfWrongNumberOfCallExpressionArgs = - _require.throwIfWrongNumberOfCallExpressionArgs; -const _require2 = require('./errors'), - MissingTypeParameterGenericParserError = - _require2.MissingTypeParameterGenericParserError, - MoreThanOneTypeParameterGenericParserError = - _require2.MoreThanOneTypeParameterGenericParserError, - UnnamedFunctionParamParserError = _require2.UnnamedFunctionParamParserError, - UnsupportedObjectDirectRecursivePropertyParserError = - _require2.UnsupportedObjectDirectRecursivePropertyParserError; -const _require3 = require('./utils'), - createParserErrorCapturer = _require3.createParserErrorCapturer, - extractNativeModuleName = _require3.extractNativeModuleName, - getConfigType = _require3.getConfigType, - isModuleRegistryCall = _require3.isModuleRegistryCall, - verifyPlatforms = _require3.verifyPlatforms, - visit = _require3.visit; -const invariant = require('invariant'); -function wrapModuleSchema(nativeModuleSchema, hasteModuleName) { - return { - modules: { - [hasteModuleName]: nativeModuleSchema, - }, - }; -} - -// $FlowFixMe[unsupported-variance-annotation] -function unwrapNullable(x) { - if (x.type === 'NullableTypeAnnotation') { - return [x.typeAnnotation, true]; - } - return [x, false]; -} - -// $FlowFixMe[unsupported-variance-annotation] -function wrapNullable(nullable, typeAnnotation) { - if (!nullable) { - return typeAnnotation; - } - return { - type: 'NullableTypeAnnotation', - typeAnnotation, - }; -} -function assertGenericTypeAnnotationHasExactlyOneTypeParameter( - moduleName, - /** - * TODO(T108222691): Use flow-types for @babel/parser - */ - typeAnnotation, - parser, -) { - if (typeAnnotation.typeParameters == null) { - throw new MissingTypeParameterGenericParserError( - moduleName, - typeAnnotation, - parser, - ); - } - const typeAnnotationType = parser.typeParameterInstantiation; - invariant( - typeAnnotation.typeParameters.type === typeAnnotationType, - `assertGenericTypeAnnotationHasExactlyOneTypeParameter: Type parameters must be an AST node of type '${typeAnnotationType}'`, - ); - if (typeAnnotation.typeParameters.params.length !== 1) { - throw new MoreThanOneTypeParameterGenericParserError( - moduleName, - typeAnnotation, - parser, - ); - } -} -function isObjectProperty(property, language) { - switch (language) { - case 'Flow': - return property.type === 'ObjectTypeProperty'; - case 'TypeScript': - return property.type === 'TSPropertySignature'; - default: - return false; - } -} -function parseObjectProperty( - parentObject, - property, - hasteModuleName, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - nullable, - translateTypeAnnotation, - parser, -) { - const language = parser.language(); - const name = parser.getKeyName(property, hasteModuleName); - const _property$optional = property.optional, - optional = _property$optional === void 0 ? false : _property$optional; - const languageTypeAnnotation = - language === 'TypeScript' - ? property.typeAnnotation.typeAnnotation - : property.value; - - // Handle recursive types - if (parentObject) { - var _languageTypeAnnotati, _languageTypeAnnotati2; - const propertyType = parser.getResolveTypeAnnotationFN()( - languageTypeAnnotation, - types, - parser, - ); - if ( - propertyType.typeResolutionStatus.successful === true && - propertyType.typeResolutionStatus.type === 'alias' && - (language === 'TypeScript' - ? parentObject.typeName && - parentObject.typeName.name === - ((_languageTypeAnnotati = languageTypeAnnotation.typeName) === - null || _languageTypeAnnotati === void 0 - ? void 0 - : _languageTypeAnnotati.name) - : parentObject.id && - parentObject.id.name === - ((_languageTypeAnnotati2 = languageTypeAnnotation.id) === null || - _languageTypeAnnotati2 === void 0 - ? void 0 - : _languageTypeAnnotati2.name)) - ) { - if (!optional) { - throw new UnsupportedObjectDirectRecursivePropertyParserError( - name, - languageTypeAnnotation, - hasteModuleName, - ); - } - return { - name, - optional, - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: propertyType.typeResolutionStatus.name, - }, - }; - } - } - - // Handle non-recursive types - const _unwrapNullable = unwrapNullable( - translateTypeAnnotation( - hasteModuleName, - languageTypeAnnotation, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, - ), - ), - _unwrapNullable2 = _slicedToArray(_unwrapNullable, 2), - propertyTypeAnnotation = _unwrapNullable2[0], - isPropertyNullable = _unwrapNullable2[1]; - if ( - (propertyTypeAnnotation.type === 'FunctionTypeAnnotation' && !cxxOnly) || - propertyTypeAnnotation.type === 'PromiseTypeAnnotation' || - propertyTypeAnnotation.type === 'VoidTypeAnnotation' - ) { - throwIfPropertyValueTypeIsUnsupported( - hasteModuleName, - languageTypeAnnotation, - property.key, - propertyTypeAnnotation.type, - ); - } - return { - name, - optional, - typeAnnotation: wrapNullable(isPropertyNullable, propertyTypeAnnotation), - }; -} -function translateFunctionTypeAnnotation( - hasteModuleName, - // TODO(T108222691): Use flow-types for @babel/parser - // TODO(T71778680): This is a FunctionTypeAnnotation. Type this. - functionTypeAnnotation, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - translateTypeAnnotation, - parser, -) { - const params = []; - for (const param of parser.getFunctionTypeAnnotationParameters( - functionTypeAnnotation, - )) { - const parsedParam = tryParse(() => { - if (parser.getFunctionNameFromParameter(param) == null) { - throw new UnnamedFunctionParamParserError(param, hasteModuleName); - } - const paramName = parser.getParameterName(param); - const _unwrapNullable3 = unwrapNullable( - translateTypeAnnotation( - hasteModuleName, - parser.getParameterTypeAnnotation(param), - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, - ), - ), - _unwrapNullable4 = _slicedToArray(_unwrapNullable3, 2), - paramTypeAnnotation = _unwrapNullable4[0], - isParamTypeAnnotationNullable = _unwrapNullable4[1]; - if ( - paramTypeAnnotation.type === 'VoidTypeAnnotation' || - paramTypeAnnotation.type === 'PromiseTypeAnnotation' - ) { - return throwIfUnsupportedFunctionParamTypeAnnotationParserError( - hasteModuleName, - param.typeAnnotation, - paramName, - paramTypeAnnotation.type, - ); - } - return { - name: paramName, - optional: Boolean(param.optional), - typeAnnotation: wrapNullable( - isParamTypeAnnotationNullable, - paramTypeAnnotation, - ), - }; - }); - if (parsedParam != null) { - params.push(parsedParam); - } - } - const _unwrapNullable5 = unwrapNullable( - translateTypeAnnotation( - hasteModuleName, - parser.getFunctionTypeAnnotationReturnType(functionTypeAnnotation), - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, - ), - ), - _unwrapNullable6 = _slicedToArray(_unwrapNullable5, 2), - returnTypeAnnotation = _unwrapNullable6[0], - isReturnTypeAnnotationNullable = _unwrapNullable6[1]; - throwIfUnsupportedFunctionReturnTypeAnnotationParserError( - hasteModuleName, - functionTypeAnnotation, - 'FunctionTypeAnnotation', - cxxOnly, - returnTypeAnnotation.type, - ); - return { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: wrapNullable( - isReturnTypeAnnotationNullable, - returnTypeAnnotation, - ), - params, - }; -} -function buildPropertySchema( - hasteModuleName, - // TODO(T108222691): [TS] Use flow-types for @babel/parser - // TODO(T71778680): [Flow] This is an ObjectTypeProperty containing either: - // - a FunctionTypeAnnotation or GenericTypeAnnotation - // - a NullableTypeAnnoation containing a FunctionTypeAnnotation or GenericTypeAnnotation - // Flow type this node - property, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - translateTypeAnnotation, - parser, -) { - let nullable = false; - let key = property.key, - value = property.value; - const methodName = key.name; - if (parser.language() === 'TypeScript') { - value = - property.type === 'TSMethodSignature' - ? property - : property.typeAnnotation; - } - const resolveTypeAnnotationFN = parser.getResolveTypeAnnotationFN(); - var _resolveTypeAnnotatio = resolveTypeAnnotationFN(value, types, parser); - nullable = _resolveTypeAnnotatio.nullable; - value = _resolveTypeAnnotatio.typeAnnotation; - throwIfModuleTypeIsUnsupported( - hasteModuleName, - property.value, - key.name, - value.type, - parser, - ); - return { - name: methodName, - optional: Boolean(property.optional), - typeAnnotation: wrapNullable( - nullable, - translateFunctionTypeAnnotation( - hasteModuleName, - value, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - translateTypeAnnotation, - parser, - ), - ), - }; -} -function buildSchemaFromConfigType( - configType, - filename, - ast, - wrapComponentSchema, - buildComponentSchema, - buildModuleSchema, - parser, - translateTypeAnnotation, -) { - switch (configType) { - case 'component': { - return wrapComponentSchema(buildComponentSchema(ast, parser)); - } - case 'module': { - if (filename === undefined || filename === null) { - throw new Error('Filepath expected while parasing a module'); - } - const nativeModuleName = extractNativeModuleName(filename); - const _createParserErrorCap = createParserErrorCapturer(), - _createParserErrorCap2 = _slicedToArray(_createParserErrorCap, 2), - parsingErrors = _createParserErrorCap2[0], - tryParse = _createParserErrorCap2[1]; - const schema = tryParse(() => - buildModuleSchema( - nativeModuleName, - ast, - tryParse, - parser, - translateTypeAnnotation, - ), - ); - if (parsingErrors.length > 0) { - /** - * TODO(T77968131): We have two options: - * - Throw the first error, but indicate there are more then one errors. - * - Display all errors, nicely formatted. - * - * For the time being, we're just throw the first error. - **/ - - throw parsingErrors[0]; - } - invariant( - schema != null, - 'When there are no parsing errors, the schema should not be null', - ); - return wrapModuleSchema(schema, nativeModuleName); - } - default: - return { - modules: {}, - }; - } -} -function buildSchema( - contents, - filename, - wrapComponentSchema, - buildComponentSchema, - buildModuleSchema, - Visitor, - parser, - translateTypeAnnotation, -) { - // Early return for non-Spec JavaScript files - if ( - !contents.includes('codegenNativeComponent') && - !contents.includes('TurboModule') - ) { - return { - modules: {}, - }; - } - const ast = parser.getAst(contents, filename); - const configType = getConfigType(ast, Visitor); - return buildSchemaFromConfigType( - configType, - filename, - ast, - wrapComponentSchema, - buildComponentSchema, - buildModuleSchema, - parser, - translateTypeAnnotation, - ); -} -function createComponentConfig(foundConfig, commandsTypeNames) { - return _objectSpread( - _objectSpread({}, foundConfig), - {}, - { - commandTypeName: - commandsTypeNames[0] == null - ? null - : commandsTypeNames[0].commandTypeName, - commandOptionsExpression: - commandsTypeNames[0] == null - ? null - : commandsTypeNames[0].commandOptionsExpression, - }, - ); -} -const parseModuleName = (hasteModuleName, moduleSpec, ast, parser) => { - const callExpressions = []; - visit(ast, { - CallExpression(node) { - if (isModuleRegistryCall(node)) { - callExpressions.push(node); - } - }, - }); - throwIfUnusedModuleInterfaceParserError( - hasteModuleName, - moduleSpec, - callExpressions, - ); - throwIfMoreThanOneModuleRegistryCalls( - hasteModuleName, - callExpressions, - callExpressions.length, - ); - const callExpression = callExpressions[0]; - const typeParameters = parser.callExpressionTypeParameters(callExpression); - const methodName = callExpression.callee.property.name; - throwIfWrongNumberOfCallExpressionArgs( - hasteModuleName, - callExpression, - methodName, - callExpression.arguments.length, - ); - throwIfIncorrectModuleRegistryCallArgument( - hasteModuleName, - callExpression.arguments[0], - methodName, - ); - const $moduleName = callExpression.arguments[0].value; - throwIfUntypedModule( - typeParameters, - hasteModuleName, - callExpression, - methodName, - $moduleName, - ); - throwIfIncorrectModuleRegistryCallTypeParameterParserError( - hasteModuleName, - typeParameters, - methodName, - $moduleName, - parser, - ); - return $moduleName; -}; -const buildModuleSchema = ( - hasteModuleName, - ast, - tryParse, - parser, - translateTypeAnnotation, -) => { - const language = parser.language(); - const types = parser.getTypes(ast); - const moduleSpecs = Object.values(types).filter(t => - parser.isModuleInterface(t), - ); - throwIfModuleInterfaceNotFound( - moduleSpecs.length, - hasteModuleName, - ast, - language, - ); - throwIfMoreThanOneModuleInterfaceParserError( - hasteModuleName, - moduleSpecs, - language, - ); - const _moduleSpecs = _slicedToArray(moduleSpecs, 1), - moduleSpec = _moduleSpecs[0]; - throwIfModuleInterfaceIsMisnamed(hasteModuleName, moduleSpec.id, language); - - // Parse Module Name - const moduleName = parseModuleName(hasteModuleName, moduleSpec, ast, parser); - - // Some module names use platform suffix to indicate platform-exclusive modules. - // Eventually this should be made explicit in the Flow type itself. - // Also check the hasteModuleName for platform suffix. - // Note: this shape is consistent with ComponentSchema. - const _verifyPlatforms = verifyPlatforms(hasteModuleName, moduleName), - cxxOnly = _verifyPlatforms.cxxOnly, - excludedPlatforms = _verifyPlatforms.excludedPlatforms; - const properties = - language === 'Flow' ? moduleSpec.body.properties : moduleSpec.body.body; - - // $FlowFixMe[missing-type-arg] - return properties - .filter( - property => - property.type === 'ObjectTypeProperty' || - property.type === 'TSPropertySignature' || - property.type === 'TSMethodSignature', - ) - .map(property => { - const aliasMap = {}; - const enumMap = {}; - return tryParse(() => ({ - aliasMap, - enumMap, - propertyShape: buildPropertySchema( - hasteModuleName, - property, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - translateTypeAnnotation, - parser, - ), - })); - }) - .filter(Boolean) - .reduce( - (moduleSchema, {aliasMap, enumMap, propertyShape}) => ({ - type: 'NativeModule', - aliasMap: _objectSpread( - _objectSpread({}, moduleSchema.aliasMap), - aliasMap, - ), - enumMap: _objectSpread( - _objectSpread({}, moduleSchema.enumMap), - enumMap, - ), - spec: { - properties: [...moduleSchema.spec.properties, propertyShape], - }, - moduleName: moduleSchema.moduleName, - excludedPlatforms: moduleSchema.excludedPlatforms, - }), - { - type: 'NativeModule', - aliasMap: {}, - enumMap: {}, - spec: { - properties: [], - }, - moduleName, - excludedPlatforms: - excludedPlatforms.length !== 0 ? [...excludedPlatforms] : undefined, - }, - ); -}; - -/** - * This function is used to find the type of a native component - * provided the default exports statement from generated AST. - * @param statement The statement to be parsed. - * @param foundConfigs The 'mutable' array of configs that have been found. - * @param parser The language parser to be used. - * @returns void - */ -function findNativeComponentType(statement, foundConfigs, parser) { - let declaration = statement.declaration; - - // codegenNativeComponent can be nested inside a cast - // expression so we need to go one level deeper - if ( - declaration.type === 'TSAsExpression' || - declaration.type === 'AsExpression' || - declaration.type === 'TypeCastExpression' - ) { - declaration = declaration.expression; - } - try { - if (declaration.callee.name === 'codegenNativeComponent') { - const typeArgumentParams = - parser.getTypeArgumentParamsFromDeclaration(declaration); - const funcArgumentParams = declaration.arguments; - const nativeComponentType = parser.getNativeComponentType( - typeArgumentParams, - funcArgumentParams, - ); - if (funcArgumentParams.length > 1) { - nativeComponentType.optionsExpression = funcArgumentParams[1]; - } - foundConfigs.push(nativeComponentType); - } - } catch (e) { - // ignore - } -} -function getCommandOptions(commandOptionsExpression) { - if (commandOptionsExpression == null) { - return null; - } - let foundOptions; - try { - foundOptions = commandOptionsExpression.properties.reduce( - (options, prop) => { - options[prop.key.name] = ( - (prop && prop.value && prop.value.elements) || - [] - ).map(element => element && element.value); - return options; - }, - {}, - ); - } catch (e) { - throw new Error( - 'Failed to parse command options, please check that they are defined correctly', - ); - } - return foundOptions; -} -function getOptions(optionsExpression) { - if (!optionsExpression) { - return null; - } - let foundOptions; - try { - foundOptions = optionsExpression.properties.reduce((options, prop) => { - if (prop.value.type === 'ArrayExpression') { - options[prop.key.name] = prop.value.elements.map( - element => element.value, - ); - } else { - options[prop.key.name] = prop.value.value; - } - return options; - }, {}); - } catch (e) { - throw new Error( - 'Failed to parse codegen options, please check that they are defined correctly', - ); - } - if ( - foundOptions.paperComponentName && - foundOptions.paperComponentNameDeprecated - ) { - throw new Error( - 'Failed to parse codegen options, cannot use both paperComponentName and paperComponentNameDeprecated', - ); - } - return foundOptions; -} -function getCommandTypeNameAndOptionsExpression(namedExport, parser) { - let callExpression; - let calleeName; - try { - callExpression = namedExport.declaration.declarations[0].init; - calleeName = callExpression.callee.name; - } catch (e) { - return; - } - if (calleeName !== 'codegenNativeCommands') { - return; - } - if (callExpression.arguments.length !== 1) { - throw new Error( - 'codegenNativeCommands must be passed options including the supported commands', - ); - } - const typeArgumentParam = - parser.getTypeArgumentParamsFromDeclaration(callExpression)[0]; - if (!parser.isGenericTypeAnnotation(typeArgumentParam.type)) { - throw new Error( - "codegenNativeCommands doesn't support inline definitions. Specify a file local type alias", - ); - } - return { - commandTypeName: parser.getTypeAnnotationName(typeArgumentParam), - commandOptionsExpression: callExpression.arguments[0], - }; -} -function propertyNames(properties) { - return properties - .map(property => property && property.key && property.key.name) - .filter(Boolean); -} -function extendsForProp(prop, types, parser) { - const argument = parser.argumentForProp(prop); - if (!argument) { - console.log('null', prop); - } - const name = parser.nameForArgument(prop); - if (types[name] != null) { - // This type is locally defined in the file - return null; - } - switch (name) { - case 'ViewProps': - return { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }; - default: { - throw new Error(`Unable to handle prop spread: ${name}`); - } - } -} -function buildPropSchema(property, types, parser) { - const getSchemaInfoFN = parser.getGetSchemaInfoFN(); - const info = getSchemaInfoFN(property, types); - if (info == null) { - return null; - } - const name = info.name, - optional = info.optional, - typeAnnotation = info.typeAnnotation, - defaultValue = info.defaultValue, - withNullDefault = info.withNullDefault; - const getTypeAnnotationFN = parser.getGetTypeAnnotationFN(); - return { - name, - optional, - typeAnnotation: getTypeAnnotationFN( - name, - typeAnnotation, - defaultValue, - withNullDefault, - types, - parser, - buildPropSchema, - ), - }; -} - -/* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's - * LTI update could not be added via codemod */ -function getEventArgument(argumentProps, parser, getPropertyType) { - return { - type: 'ObjectTypeAnnotation', - properties: argumentProps.map(member => - buildPropertiesForEvent(member, parser, getPropertyType), - ), - }; -} - -/* $FlowFixMe[signature-verification-failure] there's no flowtype for AST. - * TODO(T108222691): Use flow-types for @babel/parser */ -function findComponentConfig(ast, parser) { - const foundConfigs = []; - const defaultExports = ast.body.filter( - node => node.type === 'ExportDefaultDeclaration', - ); - defaultExports.forEach(statement => { - findNativeComponentType(statement, foundConfigs, parser); - }); - throwIfConfigNotfound(foundConfigs); - throwIfMoreThanOneConfig(foundConfigs); - const foundConfig = foundConfigs[0]; - const namedExports = ast.body.filter( - node => node.type === 'ExportNamedDeclaration', - ); - const commandsTypeNames = namedExports - .map(statement => getCommandTypeNameAndOptionsExpression(statement, parser)) - .filter(Boolean); - throwIfMoreThanOneCodegenNativecommands(commandsTypeNames); - return createComponentConfig(foundConfig, commandsTypeNames); -} - -// $FlowFixMe[signature-verification-failure] there's no flowtype for AST -function getCommandProperties(ast, parser) { - const _findComponentConfig = findComponentConfig(ast, parser), - commandTypeName = _findComponentConfig.commandTypeName, - commandOptionsExpression = _findComponentConfig.commandOptionsExpression; - if (commandTypeName == null) { - return []; - } - const types = parser.getTypes(ast); - const typeAlias = types[commandTypeName]; - throwIfTypeAliasIsNotInterface(typeAlias, parser); - const properties = parser.bodyProperties(typeAlias); - if (!properties) { - throw new Error( - `Failed to find type definition for "${commandTypeName}", please check that you have a valid codegen file`, - ); - } - const commandPropertyNames = propertyNames(properties); - const commandOptions = getCommandOptions(commandOptionsExpression); - if (commandOptions == null || commandOptions.supportedCommands == null) { - throw new Error( - 'codegenNativeCommands must be given an options object with supportedCommands array', - ); - } - if ( - commandOptions.supportedCommands.length !== commandPropertyNames.length || - !commandOptions.supportedCommands.every(supportedCommand => - commandPropertyNames.includes(supportedCommand), - ) - ) { - throw new Error( - `codegenNativeCommands expected the same supportedCommands specified in the ${commandTypeName} interface: ${commandPropertyNames.join( - ', ', - )}`, - ); - } - return properties; -} -function getTypeResolutionStatus(type, typeAnnotation, parser) { - return { - successful: true, - type, - name: parser.getTypeAnnotationName(typeAnnotation), - }; -} -function handleGenericTypeAnnotation( - typeAnnotation, - resolvedTypeAnnotation, - parser, -) { - let typeResolutionStatus; - let node; - switch (resolvedTypeAnnotation.type) { - case parser.typeAlias: { - typeResolutionStatus = getTypeResolutionStatus( - 'alias', - typeAnnotation, - parser, - ); - node = parser.nextNodeForTypeAlias(resolvedTypeAnnotation); - break; - } - case parser.enumDeclaration: { - typeResolutionStatus = getTypeResolutionStatus( - 'enum', - typeAnnotation, - parser, - ); - node = parser.nextNodeForEnum(resolvedTypeAnnotation); - break; - } - // parser.interfaceDeclaration is not used here because for flow it should fall through to default case and throw an error - case 'TSInterfaceDeclaration': { - typeResolutionStatus = getTypeResolutionStatus( - 'alias', - typeAnnotation, - parser, - ); - node = resolvedTypeAnnotation; - break; - } - default: { - throw new TypeError( - parser.genericTypeAnnotationErrorMessage(resolvedTypeAnnotation), - ); - } - } - return { - typeAnnotation: node, - typeResolutionStatus, - }; -} -function buildPropertiesForEvent(property, parser, getPropertyType) { - const name = property.key.name; - const optional = parser.isOptionalProperty(property); - const typeAnnotation = parser.getTypeAnnotationFromProperty(property); - return getPropertyType(name, optional, typeAnnotation, parser); -} -function verifyPropNotAlreadyDefined(props, needleProp) { - const propName = needleProp.key.name; - const foundProp = props.some(prop => prop.key.name === propName); - if (foundProp) { - throw new Error(`A prop was already defined with the name ${propName}`); - } -} -function handleEventHandler( - name, - typeAnnotation, - parser, - types, - findEventArgumentsAndType, -) { - const eventType = name === 'BubblingEventHandler' ? 'bubble' : 'direct'; - const paperTopLevelNameDeprecated = - parser.getPaperTopLevelNameDeprecated(typeAnnotation); - switch (typeAnnotation.typeParameters.params[0].type) { - case parser.nullLiteralTypeAnnotation: - case parser.undefinedLiteralTypeAnnotation: - return { - argumentProps: [], - bubblingType: eventType, - paperTopLevelNameDeprecated, - }; - default: - return findEventArgumentsAndType( - parser, - typeAnnotation.typeParameters.params[0], - types, - eventType, - paperTopLevelNameDeprecated, - ); - } -} -function emitBuildEventSchema( - paperTopLevelNameDeprecated, - name, - optional, - nonNullableBubblingType, - argument, -) { - if (paperTopLevelNameDeprecated != null) { - return { - name, - optional, - bubblingType: nonNullableBubblingType, - paperTopLevelNameDeprecated, - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: argument, - }, - }; - } - return { - name, - optional, - bubblingType: nonNullableBubblingType, - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: argument, - }, - }; -} -module.exports = { - wrapModuleSchema, - unwrapNullable, - wrapNullable, - assertGenericTypeAnnotationHasExactlyOneTypeParameter, - isObjectProperty, - parseObjectProperty, - translateFunctionTypeAnnotation, - buildPropertySchema, - buildSchemaFromConfigType, - buildSchema, - createComponentConfig, - parseModuleName, - buildModuleSchema, - findNativeComponentType, - propertyNames, - getCommandOptions, - getOptions, - getCommandTypeNameAndOptionsExpression, - extendsForProp, - buildPropSchema, - getEventArgument, - findComponentConfig, - getCommandProperties, - handleGenericTypeAnnotation, - getTypeResolutionStatus, - buildPropertiesForEvent, - verifyPropNotAlreadyDefined, - handleEventHandler, - emitBuildEventSchema, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js.flow b/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js.flow deleted file mode 100644 index 81b7a446a..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js.flow +++ /dev/null @@ -1,1226 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type { - EventTypeAnnotation, - EventTypeShape, - NamedShape, - NativeModuleAliasMap, - NativeModuleBaseTypeAnnotation, - NativeModuleEnumMap, - NativeModuleFunctionTypeAnnotation, - NativeModuleParamTypeAnnotation, - NativeModulePropertyShape, - NativeModuleSchema, - NativeModuleTypeAnnotation, - Nullable, - ObjectTypeAnnotation, - OptionsShape, - PropTypeAnnotation, - SchemaType, -} from '../CodegenSchema.js'; -import type {ParserType} from './errors'; -import type {Parser} from './parser'; -import type {ComponentSchemaBuilderConfig} from './schema.js'; -import type { - ParserErrorCapturer, - PropAST, - TypeDeclarationMap, - TypeResolutionStatus, -} from './utils'; - -const { - throwIfConfigNotfound, - throwIfIncorrectModuleRegistryCallArgument, - throwIfIncorrectModuleRegistryCallTypeParameterParserError, - throwIfModuleInterfaceIsMisnamed, - throwIfModuleInterfaceNotFound, - throwIfModuleTypeIsUnsupported, - throwIfMoreThanOneCodegenNativecommands, - throwIfMoreThanOneConfig, - throwIfMoreThanOneModuleInterfaceParserError, - throwIfMoreThanOneModuleRegistryCalls, - throwIfPropertyValueTypeIsUnsupported, - throwIfTypeAliasIsNotInterface, - throwIfUnsupportedFunctionParamTypeAnnotationParserError, - throwIfUnsupportedFunctionReturnTypeAnnotationParserError, - throwIfUntypedModule, - throwIfUnusedModuleInterfaceParserError, - throwIfWrongNumberOfCallExpressionArgs, -} = require('./error-utils'); -const { - MissingTypeParameterGenericParserError, - MoreThanOneTypeParameterGenericParserError, - UnnamedFunctionParamParserError, - UnsupportedObjectDirectRecursivePropertyParserError, -} = require('./errors'); -const { - createParserErrorCapturer, - extractNativeModuleName, - getConfigType, - isModuleRegistryCall, - verifyPlatforms, - visit, -} = require('./utils'); -const invariant = require('invariant'); - -export type CommandOptions = $ReadOnly<{ - supportedCommands: $ReadOnlyArray, -}>; - -// $FlowFixMe[unclear-type] TODO(T108222691): Use flow-types for @babel/parser -type OptionsAST = Object; - -type ExtendedPropResult = { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', -} | null; - -export type EventArgumentReturnType = { - argumentProps: ?$ReadOnlyArray<$FlowFixMe>, - paperTopLevelNameDeprecated: ?$FlowFixMe, - bubblingType: ?'direct' | 'bubble', -}; - -function wrapModuleSchema( - nativeModuleSchema: NativeModuleSchema, - hasteModuleName: string, -): SchemaType { - return { - modules: { - [hasteModuleName]: nativeModuleSchema, - }, - }; -} - -// $FlowFixMe[unsupported-variance-annotation] -function unwrapNullable<+T: NativeModuleTypeAnnotation>( - x: Nullable, -): [T, boolean] { - if (x.type === 'NullableTypeAnnotation') { - return [x.typeAnnotation, true]; - } - - return [x, false]; -} - -// $FlowFixMe[unsupported-variance-annotation] -function wrapNullable<+T: NativeModuleTypeAnnotation>( - nullable: boolean, - typeAnnotation: T, -): Nullable { - if (!nullable) { - return typeAnnotation; - } - - return { - type: 'NullableTypeAnnotation', - typeAnnotation, - }; -} - -function assertGenericTypeAnnotationHasExactlyOneTypeParameter( - moduleName: string, - /** - * TODO(T108222691): Use flow-types for @babel/parser - */ - typeAnnotation: $FlowFixMe, - parser: Parser, -) { - if (typeAnnotation.typeParameters == null) { - throw new MissingTypeParameterGenericParserError( - moduleName, - typeAnnotation, - parser, - ); - } - - const typeAnnotationType = parser.typeParameterInstantiation; - - invariant( - typeAnnotation.typeParameters.type === typeAnnotationType, - `assertGenericTypeAnnotationHasExactlyOneTypeParameter: Type parameters must be an AST node of type '${typeAnnotationType}'`, - ); - - if (typeAnnotation.typeParameters.params.length !== 1) { - throw new MoreThanOneTypeParameterGenericParserError( - moduleName, - typeAnnotation, - parser, - ); - } -} - -function isObjectProperty(property: $FlowFixMe, language: ParserType): boolean { - switch (language) { - case 'Flow': - return property.type === 'ObjectTypeProperty'; - case 'TypeScript': - return property.type === 'TSPropertySignature'; - default: - return false; - } -} - -function parseObjectProperty( - parentObject?: $FlowFixMe, - property: $FlowFixMe, - hasteModuleName: string, - types: TypeDeclarationMap, - aliasMap: {...NativeModuleAliasMap}, - enumMap: {...NativeModuleEnumMap}, - tryParse: ParserErrorCapturer, - cxxOnly: boolean, - nullable: boolean, - translateTypeAnnotation: $FlowFixMe, - parser: Parser, -): NamedShape> { - const language = parser.language(); - - const name = parser.getKeyName(property, hasteModuleName); - const {optional = false} = property; - const languageTypeAnnotation = - language === 'TypeScript' - ? property.typeAnnotation.typeAnnotation - : property.value; - - // Handle recursive types - if (parentObject) { - const propertyType = parser.getResolveTypeAnnotationFN()( - languageTypeAnnotation, - types, - parser, - ); - if ( - propertyType.typeResolutionStatus.successful === true && - propertyType.typeResolutionStatus.type === 'alias' && - (language === 'TypeScript' - ? parentObject.typeName && - parentObject.typeName.name === languageTypeAnnotation.typeName?.name - : parentObject.id && - parentObject.id.name === languageTypeAnnotation.id?.name) - ) { - if (!optional) { - throw new UnsupportedObjectDirectRecursivePropertyParserError( - name, - languageTypeAnnotation, - hasteModuleName, - ); - } - return { - name, - optional, - typeAnnotation: { - type: 'TypeAliasTypeAnnotation', - name: propertyType.typeResolutionStatus.name, - }, - }; - } - } - - // Handle non-recursive types - const [propertyTypeAnnotation, isPropertyNullable] = - unwrapNullable<$FlowFixMe>( - translateTypeAnnotation( - hasteModuleName, - languageTypeAnnotation, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, - ), - ); - - if ( - (propertyTypeAnnotation.type === 'FunctionTypeAnnotation' && !cxxOnly) || - propertyTypeAnnotation.type === 'PromiseTypeAnnotation' || - propertyTypeAnnotation.type === 'VoidTypeAnnotation' - ) { - throwIfPropertyValueTypeIsUnsupported( - hasteModuleName, - languageTypeAnnotation, - property.key, - propertyTypeAnnotation.type, - ); - } - - return { - name, - optional, - typeAnnotation: wrapNullable(isPropertyNullable, propertyTypeAnnotation), - }; -} - -function translateFunctionTypeAnnotation( - hasteModuleName: string, - // TODO(T108222691): Use flow-types for @babel/parser - // TODO(T71778680): This is a FunctionTypeAnnotation. Type this. - functionTypeAnnotation: $FlowFixMe, - types: TypeDeclarationMap, - aliasMap: {...NativeModuleAliasMap}, - enumMap: {...NativeModuleEnumMap}, - tryParse: ParserErrorCapturer, - cxxOnly: boolean, - translateTypeAnnotation: $FlowFixMe, - parser: Parser, -): NativeModuleFunctionTypeAnnotation { - type Param = NamedShape>; - const params: Array = []; - - for (const param of parser.getFunctionTypeAnnotationParameters( - functionTypeAnnotation, - )) { - const parsedParam = tryParse(() => { - if (parser.getFunctionNameFromParameter(param) == null) { - throw new UnnamedFunctionParamParserError(param, hasteModuleName); - } - - const paramName = parser.getParameterName(param); - - const [paramTypeAnnotation, isParamTypeAnnotationNullable] = - unwrapNullable<$FlowFixMe>( - translateTypeAnnotation( - hasteModuleName, - parser.getParameterTypeAnnotation(param), - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, - ), - ); - - if ( - paramTypeAnnotation.type === 'VoidTypeAnnotation' || - paramTypeAnnotation.type === 'PromiseTypeAnnotation' - ) { - return throwIfUnsupportedFunctionParamTypeAnnotationParserError( - hasteModuleName, - param.typeAnnotation, - paramName, - paramTypeAnnotation.type, - ); - } - - return { - name: paramName, - optional: Boolean(param.optional), - typeAnnotation: wrapNullable( - isParamTypeAnnotationNullable, - paramTypeAnnotation, - ), - }; - }); - - if (parsedParam != null) { - params.push(parsedParam); - } - } - - const [returnTypeAnnotation, isReturnTypeAnnotationNullable] = - unwrapNullable<$FlowFixMe>( - translateTypeAnnotation( - hasteModuleName, - parser.getFunctionTypeAnnotationReturnType(functionTypeAnnotation), - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, - ), - ); - - throwIfUnsupportedFunctionReturnTypeAnnotationParserError( - hasteModuleName, - functionTypeAnnotation, - 'FunctionTypeAnnotation', - cxxOnly, - returnTypeAnnotation.type, - ); - - return { - type: 'FunctionTypeAnnotation', - returnTypeAnnotation: wrapNullable( - isReturnTypeAnnotationNullable, - returnTypeAnnotation, - ), - params, - }; -} - -function buildPropertySchema( - hasteModuleName: string, - // TODO(T108222691): [TS] Use flow-types for @babel/parser - // TODO(T71778680): [Flow] This is an ObjectTypeProperty containing either: - // - a FunctionTypeAnnotation or GenericTypeAnnotation - // - a NullableTypeAnnoation containing a FunctionTypeAnnotation or GenericTypeAnnotation - // Flow type this node - property: $FlowFixMe, - types: TypeDeclarationMap, - aliasMap: {...NativeModuleAliasMap}, - enumMap: {...NativeModuleEnumMap}, - tryParse: ParserErrorCapturer, - cxxOnly: boolean, - translateTypeAnnotation: $FlowFixMe, - parser: Parser, -): NativeModulePropertyShape { - let nullable: boolean = false; - let {key, value} = property; - const methodName: string = key.name; - - if (parser.language() === 'TypeScript') { - value = - property.type === 'TSMethodSignature' - ? property - : property.typeAnnotation; - } - - const resolveTypeAnnotationFN = parser.getResolveTypeAnnotationFN(); - ({nullable, typeAnnotation: value} = resolveTypeAnnotationFN( - value, - types, - parser, - )); - - throwIfModuleTypeIsUnsupported( - hasteModuleName, - property.value, - key.name, - value.type, - parser, - ); - - return { - name: methodName, - optional: Boolean(property.optional), - typeAnnotation: wrapNullable( - nullable, - translateFunctionTypeAnnotation( - hasteModuleName, - value, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - translateTypeAnnotation, - parser, - ), - ), - }; -} - -function buildSchemaFromConfigType( - configType: 'module' | 'component' | 'none', - filename: ?string, - ast: $FlowFixMe, - wrapComponentSchema: (config: ComponentSchemaBuilderConfig) => SchemaType, - buildComponentSchema: ( - ast: $FlowFixMe, - parser: Parser, - ) => ComponentSchemaBuilderConfig, - buildModuleSchema: ( - hasteModuleName: string, - ast: $FlowFixMe, - tryParse: ParserErrorCapturer, - parser: Parser, - translateTypeAnnotation: $FlowFixMe, - ) => NativeModuleSchema, - parser: Parser, - translateTypeAnnotation: $FlowFixMe, -): SchemaType { - switch (configType) { - case 'component': { - return wrapComponentSchema(buildComponentSchema(ast, parser)); - } - case 'module': { - if (filename === undefined || filename === null) { - throw new Error('Filepath expected while parasing a module'); - } - const nativeModuleName = extractNativeModuleName(filename); - - const [parsingErrors, tryParse] = createParserErrorCapturer(); - - const schema = tryParse(() => - buildModuleSchema( - nativeModuleName, - ast, - tryParse, - parser, - translateTypeAnnotation, - ), - ); - - if (parsingErrors.length > 0) { - /** - * TODO(T77968131): We have two options: - * - Throw the first error, but indicate there are more then one errors. - * - Display all errors, nicely formatted. - * - * For the time being, we're just throw the first error. - **/ - - throw parsingErrors[0]; - } - - invariant( - schema != null, - 'When there are no parsing errors, the schema should not be null', - ); - - return wrapModuleSchema(schema, nativeModuleName); - } - default: - return {modules: {}}; - } -} - -function buildSchema( - contents: string, - filename: ?string, - wrapComponentSchema: (config: ComponentSchemaBuilderConfig) => SchemaType, - buildComponentSchema: ( - ast: $FlowFixMe, - parser: Parser, - ) => ComponentSchemaBuilderConfig, - buildModuleSchema: ( - hasteModuleName: string, - ast: $FlowFixMe, - tryParse: ParserErrorCapturer, - parser: Parser, - translateTypeAnnotation: $FlowFixMe, - ) => NativeModuleSchema, - Visitor: ({isComponent: boolean, isModule: boolean}) => { - [type: string]: (node: $FlowFixMe) => void, - }, - parser: Parser, - translateTypeAnnotation: $FlowFixMe, -): SchemaType { - // Early return for non-Spec JavaScript files - if ( - !contents.includes('codegenNativeComponent') && - !contents.includes('TurboModule') - ) { - return {modules: {}}; - } - - const ast = parser.getAst(contents, filename); - const configType = getConfigType(ast, Visitor); - - return buildSchemaFromConfigType( - configType, - filename, - ast, - wrapComponentSchema, - buildComponentSchema, - buildModuleSchema, - parser, - translateTypeAnnotation, - ); -} - -function createComponentConfig( - foundConfig: $FlowFixMe, - commandsTypeNames: $FlowFixMe, -): $FlowFixMe { - return { - ...foundConfig, - commandTypeName: - commandsTypeNames[0] == null - ? null - : commandsTypeNames[0].commandTypeName, - commandOptionsExpression: - commandsTypeNames[0] == null - ? null - : commandsTypeNames[0].commandOptionsExpression, - }; -} - -const parseModuleName = ( - hasteModuleName: string, - moduleSpec: $FlowFixMe, - ast: $FlowFixMe, - parser: Parser, -): string => { - const callExpressions = []; - visit(ast, { - CallExpression(node) { - if (isModuleRegistryCall(node)) { - callExpressions.push(node); - } - }, - }); - - throwIfUnusedModuleInterfaceParserError( - hasteModuleName, - moduleSpec, - callExpressions, - ); - - throwIfMoreThanOneModuleRegistryCalls( - hasteModuleName, - callExpressions, - callExpressions.length, - ); - - const [callExpression] = callExpressions; - const typeParameters = parser.callExpressionTypeParameters(callExpression); - const methodName = callExpression.callee.property.name; - - throwIfWrongNumberOfCallExpressionArgs( - hasteModuleName, - callExpression, - methodName, - callExpression.arguments.length, - ); - - throwIfIncorrectModuleRegistryCallArgument( - hasteModuleName, - callExpression.arguments[0], - methodName, - ); - - const $moduleName = callExpression.arguments[0].value; - - throwIfUntypedModule( - typeParameters, - hasteModuleName, - callExpression, - methodName, - $moduleName, - ); - - throwIfIncorrectModuleRegistryCallTypeParameterParserError( - hasteModuleName, - typeParameters, - methodName, - $moduleName, - parser, - ); - - return $moduleName; -}; - -const buildModuleSchema = ( - hasteModuleName: string, - /** - * TODO(T71778680): Flow-type this node. - */ - ast: $FlowFixMe, - tryParse: ParserErrorCapturer, - parser: Parser, - translateTypeAnnotation: $FlowFixMe, -): NativeModuleSchema => { - const language = parser.language(); - const types = parser.getTypes(ast); - const moduleSpecs = (Object.values(types): $ReadOnlyArray<$FlowFixMe>).filter( - t => parser.isModuleInterface(t), - ); - - throwIfModuleInterfaceNotFound( - moduleSpecs.length, - hasteModuleName, - ast, - language, - ); - - throwIfMoreThanOneModuleInterfaceParserError( - hasteModuleName, - moduleSpecs, - language, - ); - - const [moduleSpec] = moduleSpecs; - - throwIfModuleInterfaceIsMisnamed(hasteModuleName, moduleSpec.id, language); - - // Parse Module Name - const moduleName = parseModuleName(hasteModuleName, moduleSpec, ast, parser); - - // Some module names use platform suffix to indicate platform-exclusive modules. - // Eventually this should be made explicit in the Flow type itself. - // Also check the hasteModuleName for platform suffix. - // Note: this shape is consistent with ComponentSchema. - const {cxxOnly, excludedPlatforms} = verifyPlatforms( - hasteModuleName, - moduleName, - ); - - const properties: $ReadOnlyArray<$FlowFixMe> = - language === 'Flow' ? moduleSpec.body.properties : moduleSpec.body.body; - - // $FlowFixMe[missing-type-arg] - return properties - .filter( - property => - property.type === 'ObjectTypeProperty' || - property.type === 'TSPropertySignature' || - property.type === 'TSMethodSignature', - ) - .map(property => { - const aliasMap: {...NativeModuleAliasMap} = {}; - const enumMap: {...NativeModuleEnumMap} = {}; - - return tryParse(() => ({ - aliasMap, - enumMap, - propertyShape: buildPropertySchema( - hasteModuleName, - property, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - translateTypeAnnotation, - parser, - ), - })); - }) - .filter(Boolean) - .reduce( - ( - moduleSchema: NativeModuleSchema, - {aliasMap, enumMap, propertyShape}, - ) => ({ - type: 'NativeModule', - aliasMap: {...moduleSchema.aliasMap, ...aliasMap}, - enumMap: {...moduleSchema.enumMap, ...enumMap}, - spec: { - properties: [...moduleSchema.spec.properties, propertyShape], - }, - moduleName: moduleSchema.moduleName, - excludedPlatforms: moduleSchema.excludedPlatforms, - }), - { - type: 'NativeModule', - aliasMap: {}, - enumMap: {}, - spec: {properties: []}, - moduleName, - excludedPlatforms: - excludedPlatforms.length !== 0 ? [...excludedPlatforms] : undefined, - }, - ); -}; - -/** - * This function is used to find the type of a native component - * provided the default exports statement from generated AST. - * @param statement The statement to be parsed. - * @param foundConfigs The 'mutable' array of configs that have been found. - * @param parser The language parser to be used. - * @returns void - */ -function findNativeComponentType( - statement: $FlowFixMe, - foundConfigs: Array<{[string]: string}>, - parser: Parser, -): void { - let declaration = statement.declaration; - - // codegenNativeComponent can be nested inside a cast - // expression so we need to go one level deeper - if ( - declaration.type === 'TSAsExpression' || - declaration.type === 'AsExpression' || - declaration.type === 'TypeCastExpression' - ) { - declaration = declaration.expression; - } - - try { - if (declaration.callee.name === 'codegenNativeComponent') { - const typeArgumentParams = - parser.getTypeArgumentParamsFromDeclaration(declaration); - const funcArgumentParams = declaration.arguments; - - const nativeComponentType: {[string]: string} = - parser.getNativeComponentType(typeArgumentParams, funcArgumentParams); - if (funcArgumentParams.length > 1) { - nativeComponentType.optionsExpression = funcArgumentParams[1]; - } - foundConfigs.push(nativeComponentType); - } - } catch (e) { - // ignore - } -} - -function getCommandOptions( - commandOptionsExpression: OptionsAST, -): ?CommandOptions { - if (commandOptionsExpression == null) { - return null; - } - - let foundOptions; - try { - foundOptions = commandOptionsExpression.properties.reduce( - (options, prop) => { - options[prop.key.name] = ( - (prop && prop.value && prop.value.elements) || - [] - ).map(element => element && element.value); - return options; - }, - {}, - ); - } catch (e) { - throw new Error( - 'Failed to parse command options, please check that they are defined correctly', - ); - } - - return foundOptions; -} - -function getOptions(optionsExpression: OptionsAST): ?OptionsShape { - if (!optionsExpression) { - return null; - } - let foundOptions; - try { - foundOptions = optionsExpression.properties.reduce((options, prop) => { - if (prop.value.type === 'ArrayExpression') { - options[prop.key.name] = prop.value.elements.map( - element => element.value, - ); - } else { - options[prop.key.name] = prop.value.value; - } - return options; - }, {}); - } catch (e) { - throw new Error( - 'Failed to parse codegen options, please check that they are defined correctly', - ); - } - - if ( - foundOptions.paperComponentName && - foundOptions.paperComponentNameDeprecated - ) { - throw new Error( - 'Failed to parse codegen options, cannot use both paperComponentName and paperComponentNameDeprecated', - ); - } - return foundOptions; -} - -function getCommandTypeNameAndOptionsExpression( - namedExport: $FlowFixMe, - parser: Parser, -): { - commandOptionsExpression: OptionsAST, - commandTypeName: string, -} | void { - let callExpression; - let calleeName; - try { - callExpression = namedExport.declaration.declarations[0].init; - calleeName = callExpression.callee.name; - } catch (e) { - return; - } - - if (calleeName !== 'codegenNativeCommands') { - return; - } - - if (callExpression.arguments.length !== 1) { - throw new Error( - 'codegenNativeCommands must be passed options including the supported commands', - ); - } - - const typeArgumentParam = - parser.getTypeArgumentParamsFromDeclaration(callExpression)[0]; - - if (!parser.isGenericTypeAnnotation(typeArgumentParam.type)) { - throw new Error( - "codegenNativeCommands doesn't support inline definitions. Specify a file local type alias", - ); - } - - return { - commandTypeName: parser.getTypeAnnotationName(typeArgumentParam), - commandOptionsExpression: callExpression.arguments[0], - }; -} - -function propertyNames( - properties: $ReadOnlyArray<$FlowFixMe>, -): $ReadOnlyArray<$FlowFixMe> { - return properties - .map(property => property && property.key && property.key.name) - .filter(Boolean); -} - -function extendsForProp( - prop: PropAST, - types: TypeDeclarationMap, - parser: Parser, -): ExtendedPropResult { - const argument = parser.argumentForProp(prop); - - if (!argument) { - console.log('null', prop); - } - - const name = parser.nameForArgument(prop); - - if (types[name] != null) { - // This type is locally defined in the file - return null; - } - - switch (name) { - case 'ViewProps': - return { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }; - default: { - throw new Error(`Unable to handle prop spread: ${name}`); - } - } -} - -function buildPropSchema( - property: PropAST, - types: TypeDeclarationMap, - parser: Parser, -): ?NamedShape { - const getSchemaInfoFN = parser.getGetSchemaInfoFN(); - const info = getSchemaInfoFN(property, types); - if (info == null) { - return null; - } - const {name, optional, typeAnnotation, defaultValue, withNullDefault} = info; - - const getTypeAnnotationFN = parser.getGetTypeAnnotationFN(); - - return { - name, - optional, - typeAnnotation: getTypeAnnotationFN( - name, - typeAnnotation, - defaultValue, - withNullDefault, - types, - parser, - buildPropSchema, - ), - }; -} - -/* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's - * LTI update could not be added via codemod */ -function getEventArgument( - argumentProps: PropAST, - parser: Parser, - getPropertyType: ( - name: $FlowFixMe, - optional: boolean, - typeAnnotation: $FlowFixMe, - parser: Parser, - ) => NamedShape, -): ObjectTypeAnnotation { - return { - type: 'ObjectTypeAnnotation', - properties: argumentProps.map(member => - buildPropertiesForEvent(member, parser, getPropertyType), - ), - }; -} - -/* $FlowFixMe[signature-verification-failure] there's no flowtype for AST. - * TODO(T108222691): Use flow-types for @babel/parser */ -function findComponentConfig(ast: $FlowFixMe, parser: Parser) { - const foundConfigs: Array<{[string]: string}> = []; - - const defaultExports = ast.body.filter( - node => node.type === 'ExportDefaultDeclaration', - ); - - defaultExports.forEach(statement => { - findNativeComponentType(statement, foundConfigs, parser); - }); - - throwIfConfigNotfound(foundConfigs); - throwIfMoreThanOneConfig(foundConfigs); - - const foundConfig = foundConfigs[0]; - - const namedExports = ast.body.filter( - node => node.type === 'ExportNamedDeclaration', - ); - - const commandsTypeNames = namedExports - .map(statement => getCommandTypeNameAndOptionsExpression(statement, parser)) - .filter(Boolean); - - throwIfMoreThanOneCodegenNativecommands(commandsTypeNames); - - return createComponentConfig(foundConfig, commandsTypeNames); -} - -// $FlowFixMe[signature-verification-failure] there's no flowtype for AST -function getCommandProperties(ast: $FlowFixMe, parser: Parser) { - const {commandTypeName, commandOptionsExpression} = findComponentConfig( - ast, - parser, - ); - - if (commandTypeName == null) { - return []; - } - const types = parser.getTypes(ast); - - const typeAlias = types[commandTypeName]; - - throwIfTypeAliasIsNotInterface(typeAlias, parser); - - const properties = parser.bodyProperties(typeAlias); - if (!properties) { - throw new Error( - `Failed to find type definition for "${commandTypeName}", please check that you have a valid codegen file`, - ); - } - - const commandPropertyNames = propertyNames(properties); - - const commandOptions = getCommandOptions(commandOptionsExpression); - - if (commandOptions == null || commandOptions.supportedCommands == null) { - throw new Error( - 'codegenNativeCommands must be given an options object with supportedCommands array', - ); - } - - if ( - commandOptions.supportedCommands.length !== commandPropertyNames.length || - !commandOptions.supportedCommands.every(supportedCommand => - commandPropertyNames.includes(supportedCommand), - ) - ) { - throw new Error( - `codegenNativeCommands expected the same supportedCommands specified in the ${commandTypeName} interface: ${commandPropertyNames.join( - ', ', - )}`, - ); - } - - return properties; -} - -function getTypeResolutionStatus( - type: 'alias' | 'enum', - typeAnnotation: $FlowFixMe, - parser: Parser, -): TypeResolutionStatus { - return { - successful: true, - type, - name: parser.getTypeAnnotationName(typeAnnotation), - }; -} - -function handleGenericTypeAnnotation( - typeAnnotation: $FlowFixMe, - resolvedTypeAnnotation: TypeDeclarationMap, - parser: Parser, -): { - typeAnnotation: $FlowFixMe, - typeResolutionStatus: TypeResolutionStatus, -} { - let typeResolutionStatus; - let node; - - switch (resolvedTypeAnnotation.type) { - case parser.typeAlias: { - typeResolutionStatus = getTypeResolutionStatus( - 'alias', - typeAnnotation, - parser, - ); - node = parser.nextNodeForTypeAlias(resolvedTypeAnnotation); - break; - } - case parser.enumDeclaration: { - typeResolutionStatus = getTypeResolutionStatus( - 'enum', - typeAnnotation, - parser, - ); - node = parser.nextNodeForEnum(resolvedTypeAnnotation); - break; - } - // parser.interfaceDeclaration is not used here because for flow it should fall through to default case and throw an error - case 'TSInterfaceDeclaration': { - typeResolutionStatus = getTypeResolutionStatus( - 'alias', - typeAnnotation, - parser, - ); - node = resolvedTypeAnnotation; - break; - } - default: { - throw new TypeError( - parser.genericTypeAnnotationErrorMessage(resolvedTypeAnnotation), - ); - } - } - - return { - typeAnnotation: node, - typeResolutionStatus, - }; -} - -function buildPropertiesForEvent( - property: $FlowFixMe, - parser: Parser, - getPropertyType: ( - name: $FlowFixMe, - optional: boolean, - typeAnnotation: $FlowFixMe, - parser: Parser, - ) => NamedShape, -): NamedShape { - const name = property.key.name; - const optional = parser.isOptionalProperty(property); - const typeAnnotation = parser.getTypeAnnotationFromProperty(property); - - return getPropertyType(name, optional, typeAnnotation, parser); -} - -function verifyPropNotAlreadyDefined( - props: $ReadOnlyArray, - needleProp: PropAST, -) { - const propName = needleProp.key.name; - const foundProp = props.some(prop => prop.key.name === propName); - if (foundProp) { - throw new Error(`A prop was already defined with the name ${propName}`); - } -} - -function handleEventHandler( - name: 'BubblingEventHandler' | 'DirectEventHandler', - typeAnnotation: $FlowFixMe, - parser: Parser, - types: TypeDeclarationMap, - findEventArgumentsAndType: ( - parser: Parser, - typeAnnotation: $FlowFixMe, - types: TypeDeclarationMap, - bubblingType: void | 'direct' | 'bubble', - paperName: ?$FlowFixMe, - ) => EventArgumentReturnType, -): EventArgumentReturnType { - const eventType = name === 'BubblingEventHandler' ? 'bubble' : 'direct'; - const paperTopLevelNameDeprecated = - parser.getPaperTopLevelNameDeprecated(typeAnnotation); - - switch (typeAnnotation.typeParameters.params[0].type) { - case parser.nullLiteralTypeAnnotation: - case parser.undefinedLiteralTypeAnnotation: - return { - argumentProps: [], - bubblingType: eventType, - paperTopLevelNameDeprecated, - }; - default: - return findEventArgumentsAndType( - parser, - typeAnnotation.typeParameters.params[0], - types, - eventType, - paperTopLevelNameDeprecated, - ); - } -} - -function emitBuildEventSchema( - paperTopLevelNameDeprecated: $FlowFixMe, - name: $FlowFixMe, - optional: $FlowFixMe, - nonNullableBubblingType: 'direct' | 'bubble', - argument: ObjectTypeAnnotation, -): ?EventTypeShape { - if (paperTopLevelNameDeprecated != null) { - return { - name, - optional, - bubblingType: nonNullableBubblingType, - paperTopLevelNameDeprecated, - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: argument, - }, - }; - } - - return { - name, - optional, - bubblingType: nonNullableBubblingType, - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: argument, - }, - }; -} - -module.exports = { - wrapModuleSchema, - unwrapNullable, - wrapNullable, - assertGenericTypeAnnotationHasExactlyOneTypeParameter, - isObjectProperty, - parseObjectProperty, - translateFunctionTypeAnnotation, - buildPropertySchema, - buildSchemaFromConfigType, - buildSchema, - createComponentConfig, - parseModuleName, - buildModuleSchema, - findNativeComponentType, - propertyNames, - getCommandOptions, - getOptions, - getCommandTypeNameAndOptionsExpression, - extendsForProp, - buildPropSchema, - getEventArgument, - findComponentConfig, - getCommandProperties, - handleGenericTypeAnnotation, - getTypeResolutionStatus, - buildPropertiesForEvent, - verifyPropNotAlreadyDefined, - handleEventHandler, - emitBuildEventSchema, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/parsers-primitives.js b/node_modules/@react-native/codegen/lib/parsers/parsers-primitives.js deleted file mode 100644 index ba1c0173b..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/parsers-primitives.js +++ /dev/null @@ -1,662 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -function _slicedToArray(arr, i) { - return ( - _arrayWithHoles(arr) || - _iterableToArrayLimit(arr, i) || - _unsupportedIterableToArray(arr, i) || - _nonIterableRest() - ); -} -function _nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.', - ); -} -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === 'string') return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === 'Object' && o.constructor) n = o.constructor.name; - if (n === 'Map' || n === 'Set') return Array.from(o); - if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) - return _arrayLikeToArray(o, minLen); -} -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; -} -function _iterableToArrayLimit(arr, i) { - var _i = - null == arr - ? null - : ('undefined' != typeof Symbol && arr[Symbol.iterator]) || - arr['@@iterator']; - if (null != _i) { - var _s, - _e, - _x, - _r, - _arr = [], - _n = !0, - _d = !1; - try { - if (((_x = (_i = _i.call(arr)).next), 0 === i)) { - if (Object(_i) !== _i) return; - _n = !1; - } else - for ( - ; - !(_n = (_s = _x.call(_i)).done) && - (_arr.push(_s.value), _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - if (!_n && null != _i.return && ((_r = _i.return()), Object(_r) !== _r)) - return; - } finally { - if (_d) throw _e; - } - } - return _arr; - } -} -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} -const _require = require('./error-utils'), - throwIfArrayElementTypeAnnotationIsUnsupported = - _require.throwIfArrayElementTypeAnnotationIsUnsupported, - throwIfPartialNotAnnotatingTypeParameter = - _require.throwIfPartialNotAnnotatingTypeParameter, - throwIfPartialWithMoreParameter = _require.throwIfPartialWithMoreParameter; -const _require2 = require('./errors'), - ParserError = _require2.ParserError, - UnsupportedTypeAnnotationParserError = - _require2.UnsupportedTypeAnnotationParserError, - UnsupportedUnionTypeAnnotationParserError = - _require2.UnsupportedUnionTypeAnnotationParserError; -const _require3 = require('./parsers-commons'), - assertGenericTypeAnnotationHasExactlyOneTypeParameter = - _require3.assertGenericTypeAnnotationHasExactlyOneTypeParameter, - translateFunctionTypeAnnotation = _require3.translateFunctionTypeAnnotation, - unwrapNullable = _require3.unwrapNullable, - wrapNullable = _require3.wrapNullable; -const _require4 = require('./parsers-utils'), - nullGuard = _require4.nullGuard; -const _require5 = require('./utils'), - isModuleRegistryCall = _require5.isModuleRegistryCall; -function emitBoolean(nullable) { - return wrapNullable(nullable, { - type: 'BooleanTypeAnnotation', - }); -} -function emitInt32(nullable) { - return wrapNullable(nullable, { - type: 'Int32TypeAnnotation', - }); -} -function emitInt32Prop(name, optional) { - return { - name, - optional, - typeAnnotation: { - type: 'Int32TypeAnnotation', - }, - }; -} -function emitNumber(nullable) { - return wrapNullable(nullable, { - type: 'NumberTypeAnnotation', - }); -} -function emitRootTag(nullable) { - return wrapNullable(nullable, { - type: 'ReservedTypeAnnotation', - name: 'RootTag', - }); -} -function emitDouble(nullable) { - return wrapNullable(nullable, { - type: 'DoubleTypeAnnotation', - }); -} -function emitDoubleProp(name, optional) { - return { - name, - optional, - typeAnnotation: { - type: 'DoubleTypeAnnotation', - }, - }; -} -function emitVoid(nullable) { - return wrapNullable(nullable, { - type: 'VoidTypeAnnotation', - }); -} -function emitStringish(nullable) { - return wrapNullable(nullable, { - type: 'StringTypeAnnotation', - }); -} -function emitFunction( - nullable, - hasteModuleName, - typeAnnotation, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - translateTypeAnnotation, - parser, -) { - const translateFunctionTypeAnnotationValue = translateFunctionTypeAnnotation( - hasteModuleName, - typeAnnotation, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - translateTypeAnnotation, - parser, - ); - return wrapNullable(nullable, translateFunctionTypeAnnotationValue); -} -function emitMixed(nullable) { - return wrapNullable(nullable, { - type: 'MixedTypeAnnotation', - }); -} -function emitString(nullable) { - return wrapNullable(nullable, { - type: 'StringTypeAnnotation', - }); -} -function emitStringProp(name, optional) { - return { - name, - optional, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }; -} -function typeAliasResolution( - typeResolution, - objectTypeAnnotation, - aliasMap, - nullable, -) { - if (!typeResolution.successful) { - return wrapNullable(nullable, objectTypeAnnotation); - } - - /** - * All aliases RHS are required. - */ - aliasMap[typeResolution.name] = objectTypeAnnotation; - - /** - * Nullability of type aliases is transitive. - * - * Consider this case: - * - * type Animal = ?{ - * name: string, - * }; - * - * type B = Animal - * - * export interface Spec extends TurboModule { - * +greet: (animal: B) => void; - * } - * - * In this case, we follow B to Animal, and then Animal to ?{name: string}. - * - * We: - * 1. Replace `+greet: (animal: B) => void;` with `+greet: (animal: ?Animal) => void;`, - * 2. Pretend that Animal = {name: string}. - * - * Why do we do this? - * 1. In ObjC, we need to generate a struct called Animal, not B. - * 2. This design is simpler than managing nullability within both the type alias usage, and the type alias RHS. - * 3. What does it mean for a C++ struct, which is what this type alias RHS will generate, to be nullable? ¯\_(ツ)_/¯ - * Nullability is a concept that only makes sense when talking about instances (i.e: usages) of the C++ structs. - * Hence, it's better to manage nullability within the actual TypeAliasTypeAnnotation nodes, and not the - * associated ObjectTypeAnnotations. - */ - return wrapNullable(nullable, { - type: 'TypeAliasTypeAnnotation', - name: typeResolution.name, - }); -} -function typeEnumResolution( - typeAnnotation, - typeResolution, - nullable, - hasteModuleName, - enumMap, - parser, -) { - if (!typeResolution.successful || typeResolution.type !== 'enum') { - throw new UnsupportedTypeAnnotationParserError( - hasteModuleName, - typeAnnotation, - parser.language(), - ); - } - const enumName = typeResolution.name; - const enumMemberType = parser.parseEnumMembersType(typeAnnotation); - try { - parser.validateEnumMembersSupported(typeAnnotation, enumMemberType); - } catch (e) { - if (e instanceof Error) { - throw new ParserError( - hasteModuleName, - typeAnnotation, - `Failed parsing the enum ${enumName} in ${hasteModuleName} with the error: ${e.message}`, - ); - } else { - throw e; - } - } - const enumMembers = parser.parseEnumMembers(typeAnnotation); - enumMap[enumName] = { - name: enumName, - type: 'EnumDeclarationWithMembers', - memberType: enumMemberType, - members: enumMembers, - }; - return wrapNullable(nullable, { - name: enumName, - type: 'EnumDeclaration', - memberType: enumMemberType, - }); -} -function emitPromise( - hasteModuleName, - typeAnnotation, - parser, - nullable, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - translateTypeAnnotation, -) { - assertGenericTypeAnnotationHasExactlyOneTypeParameter( - hasteModuleName, - typeAnnotation, - parser, - ); - const elementType = typeAnnotation.typeParameters.params[0]; - if ( - elementType.type === 'ExistsTypeAnnotation' || - elementType.type === 'EmptyTypeAnnotation' - ) { - return wrapNullable(nullable, { - type: 'PromiseTypeAnnotation', - }); - } else { - try { - return wrapNullable(nullable, { - type: 'PromiseTypeAnnotation', - elementType: translateTypeAnnotation( - hasteModuleName, - typeAnnotation.typeParameters.params[0], - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, - ), - }); - } catch { - return wrapNullable(nullable, { - type: 'PromiseTypeAnnotation', - }); - } - } -} -function emitGenericObject(nullable) { - return wrapNullable(nullable, { - type: 'GenericObjectTypeAnnotation', - }); -} -function emitDictionary(nullable, valueType) { - return wrapNullable(nullable, { - type: 'GenericObjectTypeAnnotation', - dictionaryValueType: valueType, - }); -} -function emitObject(nullable, properties) { - return wrapNullable(nullable, { - type: 'ObjectTypeAnnotation', - properties, - }); -} -function emitFloat(nullable) { - return wrapNullable(nullable, { - type: 'FloatTypeAnnotation', - }); -} -function emitFloatProp(name, optional) { - return { - name, - optional, - typeAnnotation: { - type: 'FloatTypeAnnotation', - }, - }; -} -function emitUnion(nullable, hasteModuleName, typeAnnotation, parser) { - const unionTypes = parser.remapUnionTypeAnnotationMemberNames( - typeAnnotation.types, - ); - - // Only support unionTypes of the same kind - if (unionTypes.length > 1) { - throw new UnsupportedUnionTypeAnnotationParserError( - hasteModuleName, - typeAnnotation, - unionTypes, - ); - } - return wrapNullable(nullable, { - type: 'UnionTypeAnnotation', - memberType: unionTypes[0], - }); -} -function translateArrayTypeAnnotation( - hasteModuleName, - types, - aliasMap, - enumMap, - cxxOnly, - arrayType, - elementType, - nullable, - translateTypeAnnotation, - parser, -) { - try { - /** - * TODO(T72031674): Migrate all our NativeModule specs to not use - * invalid Array ElementTypes. Then, make the elementType a required - * parameter. - */ - const _unwrapNullable = unwrapNullable( - translateTypeAnnotation( - hasteModuleName, - elementType, - types, - aliasMap, - enumMap, - /** - * TODO(T72031674): Ensure that all ParsingErrors that are thrown - * while parsing the array element don't get captured and collected. - * Why? If we detect any parsing error while parsing the element, - * we should default it to null down the line, here. This is - * the correct behaviour until we migrate all our NativeModule specs - * to be parseable. - */ - nullGuard, - cxxOnly, - parser, - ), - ), - _unwrapNullable2 = _slicedToArray(_unwrapNullable, 2), - _elementType = _unwrapNullable2[0], - isElementTypeNullable = _unwrapNullable2[1]; - throwIfArrayElementTypeAnnotationIsUnsupported( - hasteModuleName, - elementType, - arrayType, - _elementType.type, - ); - return wrapNullable(nullable, { - type: 'ArrayTypeAnnotation', - // $FlowFixMe[incompatible-call] - elementType: wrapNullable(isElementTypeNullable, _elementType), - }); - } catch (ex) { - return wrapNullable(nullable, { - type: 'ArrayTypeAnnotation', - }); - } -} -function emitArrayType( - hasteModuleName, - typeAnnotation, - parser, - types, - aliasMap, - enumMap, - cxxOnly, - nullable, - translateTypeAnnotation, -) { - assertGenericTypeAnnotationHasExactlyOneTypeParameter( - hasteModuleName, - typeAnnotation, - parser, - ); - return translateArrayTypeAnnotation( - hasteModuleName, - types, - aliasMap, - enumMap, - cxxOnly, - typeAnnotation.type, - typeAnnotation.typeParameters.params[0], - nullable, - translateTypeAnnotation, - parser, - ); -} -function Visitor(infoMap) { - return { - CallExpression(node) { - if ( - node.callee.type === 'Identifier' && - node.callee.name === 'codegenNativeComponent' - ) { - infoMap.isComponent = true; - } - if (isModuleRegistryCall(node)) { - infoMap.isModule = true; - } - }, - InterfaceExtends(node) { - if (node.id.name === 'TurboModule') { - infoMap.isModule = true; - } - }, - TSInterfaceDeclaration(node) { - if ( - Array.isArray(node.extends) && - node.extends.some( - extension => extension.expression.name === 'TurboModule', - ) - ) { - infoMap.isModule = true; - } - }, - }; -} -function emitPartial( - nullable, - hasteModuleName, - typeAnnotation, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, -) { - throwIfPartialWithMoreParameter(typeAnnotation); - throwIfPartialNotAnnotatingTypeParameter(typeAnnotation, types, parser); - const annotatedElement = parser.extractAnnotatedElement( - typeAnnotation, - types, - ); - const annotatedElementProperties = - parser.getAnnotatedElementProperties(annotatedElement); - const partialProperties = parser.computePartialProperties( - annotatedElementProperties, - hasteModuleName, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - ); - return emitObject(nullable, partialProperties); -} -function emitCommonTypes( - hasteModuleName, - types, - typeAnnotation, - aliasMap, - enumMap, - tryParse, - cxxOnly, - nullable, - parser, -) { - const typeMap = { - Stringish: emitStringish, - Int32: emitInt32, - Double: emitDouble, - Float: emitFloat, - UnsafeObject: emitGenericObject, - Object: emitGenericObject, - $Partial: emitPartial, - Partial: emitPartial, - BooleanTypeAnnotation: emitBoolean, - NumberTypeAnnotation: emitNumber, - VoidTypeAnnotation: emitVoid, - StringTypeAnnotation: emitString, - MixedTypeAnnotation: cxxOnly ? emitMixed : emitGenericObject, - }; - const typeAnnotationName = parser.convertKeywordToTypeAnnotation( - typeAnnotation.type, - ); - const simpleEmitter = typeMap[typeAnnotationName]; - if (simpleEmitter) { - return simpleEmitter(nullable); - } - const genericTypeAnnotationName = - parser.getTypeAnnotationName(typeAnnotation); - const emitter = typeMap[genericTypeAnnotationName]; - if (!emitter) { - return null; - } - return emitter( - nullable, - hasteModuleName, - typeAnnotation, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, - ); -} -function emitBoolProp(name, optional) { - return { - name, - optional, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }; -} -function emitMixedProp(name, optional) { - return { - name, - optional, - typeAnnotation: { - type: 'MixedTypeAnnotation', - }, - }; -} -function emitObjectProp( - name, - optional, - parser, - typeAnnotation, - extractArrayElementType, -) { - return { - name, - optional, - typeAnnotation: extractArrayElementType(typeAnnotation, name, parser), - }; -} -function emitUnionProp(name, optional, parser, typeAnnotation) { - return { - name, - optional, - typeAnnotation: { - type: 'StringEnumTypeAnnotation', - options: typeAnnotation.types.map(option => - parser.getLiteralValue(option), - ), - }, - }; -} -module.exports = { - emitArrayType, - emitBoolean, - emitBoolProp, - emitDouble, - emitDoubleProp, - emitFloat, - emitFloatProp, - emitFunction, - emitInt32, - emitInt32Prop, - emitMixedProp, - emitNumber, - emitGenericObject, - emitDictionary, - emitObject, - emitPromise, - emitRootTag, - emitVoid, - emitString, - emitStringish, - emitStringProp, - emitMixed, - emitUnion, - emitPartial, - emitCommonTypes, - typeAliasResolution, - typeEnumResolution, - translateArrayTypeAnnotation, - Visitor, - emitObjectProp, - emitUnionProp, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/parsers-primitives.js.flow b/node_modules/@react-native/codegen/lib/parsers/parsers-primitives.js.flow deleted file mode 100644 index dbc2c564c..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/parsers-primitives.js.flow +++ /dev/null @@ -1,726 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type { - BooleanTypeAnnotation, - DoubleTypeAnnotation, - EventTypeAnnotation, - Int32TypeAnnotation, - NamedShape, - NativeModuleAliasMap, - NativeModuleBaseTypeAnnotation, - NativeModuleEnumDeclaration, - NativeModuleEnumMap, - NativeModuleFloatTypeAnnotation, - NativeModuleFunctionTypeAnnotation, - NativeModuleGenericObjectTypeAnnotation, - NativeModuleMixedTypeAnnotation, - NativeModuleNumberTypeAnnotation, - NativeModuleObjectTypeAnnotation, - NativeModulePromiseTypeAnnotation, - NativeModuleTypeAliasTypeAnnotation, - NativeModuleTypeAnnotation, - NativeModuleUnionTypeAnnotation, - Nullable, - ObjectTypeAnnotation, - ReservedTypeAnnotation, - StringTypeAnnotation, - VoidTypeAnnotation, -} from '../CodegenSchema'; -import type {Parser} from './parser'; -import type { - ParserErrorCapturer, - TypeDeclarationMap, - TypeResolutionStatus, -} from './utils'; - -const { - throwIfArrayElementTypeAnnotationIsUnsupported, - throwIfPartialNotAnnotatingTypeParameter, - throwIfPartialWithMoreParameter, -} = require('./error-utils'); -const { - ParserError, - UnsupportedTypeAnnotationParserError, - UnsupportedUnionTypeAnnotationParserError, -} = require('./errors'); -const { - assertGenericTypeAnnotationHasExactlyOneTypeParameter, - translateFunctionTypeAnnotation, - unwrapNullable, - wrapNullable, -} = require('./parsers-commons'); -const {nullGuard} = require('./parsers-utils'); -const {isModuleRegistryCall} = require('./utils'); - -function emitBoolean(nullable: boolean): Nullable { - return wrapNullable(nullable, { - type: 'BooleanTypeAnnotation', - }); -} - -function emitInt32(nullable: boolean): Nullable { - return wrapNullable(nullable, { - type: 'Int32TypeAnnotation', - }); -} - -function emitInt32Prop( - name: string, - optional: boolean, -): NamedShape { - return { - name, - optional, - typeAnnotation: { - type: 'Int32TypeAnnotation', - }, - }; -} - -function emitNumber( - nullable: boolean, -): Nullable { - return wrapNullable(nullable, { - type: 'NumberTypeAnnotation', - }); -} - -function emitRootTag(nullable: boolean): Nullable { - return wrapNullable(nullable, { - type: 'ReservedTypeAnnotation', - name: 'RootTag', - }); -} - -function emitDouble(nullable: boolean): Nullable { - return wrapNullable(nullable, { - type: 'DoubleTypeAnnotation', - }); -} - -function emitDoubleProp( - name: string, - optional: boolean, -): NamedShape { - return { - name, - optional, - typeAnnotation: { - type: 'DoubleTypeAnnotation', - }, - }; -} - -function emitVoid(nullable: boolean): Nullable { - return wrapNullable(nullable, { - type: 'VoidTypeAnnotation', - }); -} - -function emitStringish(nullable: boolean): Nullable { - return wrapNullable(nullable, { - type: 'StringTypeAnnotation', - }); -} - -function emitFunction( - nullable: boolean, - hasteModuleName: string, - typeAnnotation: $FlowFixMe, - types: TypeDeclarationMap, - aliasMap: {...NativeModuleAliasMap}, - enumMap: {...NativeModuleEnumMap}, - tryParse: ParserErrorCapturer, - cxxOnly: boolean, - translateTypeAnnotation: $FlowFixMe, - parser: Parser, -): Nullable { - const translateFunctionTypeAnnotationValue: NativeModuleFunctionTypeAnnotation = - translateFunctionTypeAnnotation( - hasteModuleName, - typeAnnotation, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - translateTypeAnnotation, - parser, - ); - return wrapNullable(nullable, translateFunctionTypeAnnotationValue); -} - -function emitMixed( - nullable: boolean, -): Nullable { - return wrapNullable(nullable, { - type: 'MixedTypeAnnotation', - }); -} - -function emitString(nullable: boolean): Nullable { - return wrapNullable(nullable, { - type: 'StringTypeAnnotation', - }); -} - -function emitStringProp( - name: string, - optional: boolean, -): NamedShape { - return { - name, - optional, - typeAnnotation: { - type: 'StringTypeAnnotation', - }, - }; -} - -function typeAliasResolution( - typeResolution: TypeResolutionStatus, - objectTypeAnnotation: ObjectTypeAnnotation< - Nullable, - >, - aliasMap: {...NativeModuleAliasMap}, - nullable: boolean, -): - | Nullable - | Nullable>> { - if (!typeResolution.successful) { - return wrapNullable(nullable, objectTypeAnnotation); - } - - /** - * All aliases RHS are required. - */ - aliasMap[typeResolution.name] = objectTypeAnnotation; - - /** - * Nullability of type aliases is transitive. - * - * Consider this case: - * - * type Animal = ?{ - * name: string, - * }; - * - * type B = Animal - * - * export interface Spec extends TurboModule { - * +greet: (animal: B) => void; - * } - * - * In this case, we follow B to Animal, and then Animal to ?{name: string}. - * - * We: - * 1. Replace `+greet: (animal: B) => void;` with `+greet: (animal: ?Animal) => void;`, - * 2. Pretend that Animal = {name: string}. - * - * Why do we do this? - * 1. In ObjC, we need to generate a struct called Animal, not B. - * 2. This design is simpler than managing nullability within both the type alias usage, and the type alias RHS. - * 3. What does it mean for a C++ struct, which is what this type alias RHS will generate, to be nullable? ¯\_(ツ)_/¯ - * Nullability is a concept that only makes sense when talking about instances (i.e: usages) of the C++ structs. - * Hence, it's better to manage nullability within the actual TypeAliasTypeAnnotation nodes, and not the - * associated ObjectTypeAnnotations. - */ - return wrapNullable(nullable, { - type: 'TypeAliasTypeAnnotation', - name: typeResolution.name, - }); -} - -function typeEnumResolution( - typeAnnotation: $FlowFixMe, - typeResolution: TypeResolutionStatus, - nullable: boolean, - hasteModuleName: string, - enumMap: {...NativeModuleEnumMap}, - parser: Parser, -): Nullable { - if (!typeResolution.successful || typeResolution.type !== 'enum') { - throw new UnsupportedTypeAnnotationParserError( - hasteModuleName, - typeAnnotation, - parser.language(), - ); - } - - const enumName = typeResolution.name; - - const enumMemberType = parser.parseEnumMembersType(typeAnnotation); - - try { - parser.validateEnumMembersSupported(typeAnnotation, enumMemberType); - } catch (e) { - if (e instanceof Error) { - throw new ParserError( - hasteModuleName, - typeAnnotation, - `Failed parsing the enum ${enumName} in ${hasteModuleName} with the error: ${e.message}`, - ); - } else { - throw e; - } - } - - const enumMembers = parser.parseEnumMembers(typeAnnotation); - - enumMap[enumName] = { - name: enumName, - type: 'EnumDeclarationWithMembers', - memberType: enumMemberType, - members: enumMembers, - }; - - return wrapNullable(nullable, { - name: enumName, - type: 'EnumDeclaration', - memberType: enumMemberType, - }); -} - -function emitPromise( - hasteModuleName: string, - typeAnnotation: $FlowFixMe, - parser: Parser, - nullable: boolean, - types: TypeDeclarationMap, - aliasMap: {...NativeModuleAliasMap}, - enumMap: {...NativeModuleEnumMap}, - tryParse: ParserErrorCapturer, - cxxOnly: boolean, - translateTypeAnnotation: $FlowFixMe, -): Nullable { - assertGenericTypeAnnotationHasExactlyOneTypeParameter( - hasteModuleName, - typeAnnotation, - parser, - ); - - const elementType = typeAnnotation.typeParameters.params[0]; - if ( - elementType.type === 'ExistsTypeAnnotation' || - elementType.type === 'EmptyTypeAnnotation' - ) { - return wrapNullable(nullable, { - type: 'PromiseTypeAnnotation', - }); - } else { - try { - return wrapNullable(nullable, { - type: 'PromiseTypeAnnotation', - elementType: translateTypeAnnotation( - hasteModuleName, - typeAnnotation.typeParameters.params[0], - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, - ), - }); - } catch { - return wrapNullable(nullable, { - type: 'PromiseTypeAnnotation', - }); - } - } -} - -function emitGenericObject( - nullable: boolean, -): Nullable { - return wrapNullable(nullable, { - type: 'GenericObjectTypeAnnotation', - }); -} - -function emitDictionary( - nullable: boolean, - valueType: Nullable, -): Nullable { - return wrapNullable(nullable, { - type: 'GenericObjectTypeAnnotation', - dictionaryValueType: valueType, - }); -} - -function emitObject( - nullable: boolean, - properties: Array<$FlowFixMe>, -): Nullable { - return wrapNullable(nullable, { - type: 'ObjectTypeAnnotation', - properties, - }); -} - -function emitFloat( - nullable: boolean, -): Nullable { - return wrapNullable(nullable, { - type: 'FloatTypeAnnotation', - }); -} - -function emitFloatProp( - name: string, - optional: boolean, -): NamedShape { - return { - name, - optional, - typeAnnotation: { - type: 'FloatTypeAnnotation', - }, - }; -} - -function emitUnion( - nullable: boolean, - hasteModuleName: string, - typeAnnotation: $FlowFixMe, - parser: Parser, -): Nullable { - const unionTypes = parser.remapUnionTypeAnnotationMemberNames( - typeAnnotation.types, - ); - - // Only support unionTypes of the same kind - if (unionTypes.length > 1) { - throw new UnsupportedUnionTypeAnnotationParserError( - hasteModuleName, - typeAnnotation, - unionTypes, - ); - } - - return wrapNullable(nullable, { - type: 'UnionTypeAnnotation', - memberType: unionTypes[0], - }); -} - -function translateArrayTypeAnnotation( - hasteModuleName: string, - types: TypeDeclarationMap, - aliasMap: {...NativeModuleAliasMap}, - enumMap: {...NativeModuleEnumMap}, - cxxOnly: boolean, - arrayType: 'Array' | 'ReadonlyArray', - elementType: $FlowFixMe, - nullable: boolean, - translateTypeAnnotation: $FlowFixMe, - parser: Parser, -): Nullable { - try { - /** - * TODO(T72031674): Migrate all our NativeModule specs to not use - * invalid Array ElementTypes. Then, make the elementType a required - * parameter. - */ - const [_elementType, isElementTypeNullable] = unwrapNullable<$FlowFixMe>( - translateTypeAnnotation( - hasteModuleName, - elementType, - types, - aliasMap, - enumMap, - /** - * TODO(T72031674): Ensure that all ParsingErrors that are thrown - * while parsing the array element don't get captured and collected. - * Why? If we detect any parsing error while parsing the element, - * we should default it to null down the line, here. This is - * the correct behaviour until we migrate all our NativeModule specs - * to be parseable. - */ - nullGuard, - cxxOnly, - parser, - ), - ); - - throwIfArrayElementTypeAnnotationIsUnsupported( - hasteModuleName, - elementType, - arrayType, - _elementType.type, - ); - - return wrapNullable(nullable, { - type: 'ArrayTypeAnnotation', - // $FlowFixMe[incompatible-call] - elementType: wrapNullable(isElementTypeNullable, _elementType), - }); - } catch (ex) { - return wrapNullable(nullable, { - type: 'ArrayTypeAnnotation', - }); - } -} - -function emitArrayType( - hasteModuleName: string, - typeAnnotation: $FlowFixMe, - parser: Parser, - types: TypeDeclarationMap, - aliasMap: {...NativeModuleAliasMap}, - enumMap: {...NativeModuleEnumMap}, - cxxOnly: boolean, - nullable: boolean, - translateTypeAnnotation: $FlowFixMe, -): Nullable { - assertGenericTypeAnnotationHasExactlyOneTypeParameter( - hasteModuleName, - typeAnnotation, - parser, - ); - - return translateArrayTypeAnnotation( - hasteModuleName, - types, - aliasMap, - enumMap, - cxxOnly, - typeAnnotation.type, - typeAnnotation.typeParameters.params[0], - nullable, - translateTypeAnnotation, - parser, - ); -} - -function Visitor(infoMap: {isComponent: boolean, isModule: boolean}): { - [type: string]: (node: $FlowFixMe) => void, -} { - return { - CallExpression(node: $FlowFixMe) { - if ( - node.callee.type === 'Identifier' && - node.callee.name === 'codegenNativeComponent' - ) { - infoMap.isComponent = true; - } - - if (isModuleRegistryCall(node)) { - infoMap.isModule = true; - } - }, - InterfaceExtends(node: $FlowFixMe) { - if (node.id.name === 'TurboModule') { - infoMap.isModule = true; - } - }, - TSInterfaceDeclaration(node: $FlowFixMe) { - if ( - Array.isArray(node.extends) && - node.extends.some( - extension => extension.expression.name === 'TurboModule', - ) - ) { - infoMap.isModule = true; - } - }, - }; -} - -function emitPartial( - nullable: boolean, - hasteModuleName: string, - typeAnnotation: $FlowFixMe, - types: TypeDeclarationMap, - aliasMap: {...NativeModuleAliasMap}, - enumMap: {...NativeModuleEnumMap}, - tryParse: ParserErrorCapturer, - cxxOnly: boolean, - parser: Parser, -): Nullable { - throwIfPartialWithMoreParameter(typeAnnotation); - - throwIfPartialNotAnnotatingTypeParameter(typeAnnotation, types, parser); - - const annotatedElement = parser.extractAnnotatedElement( - typeAnnotation, - types, - ); - const annotatedElementProperties = - parser.getAnnotatedElementProperties(annotatedElement); - - const partialProperties = parser.computePartialProperties( - annotatedElementProperties, - hasteModuleName, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - ); - - return emitObject(nullable, partialProperties); -} - -function emitCommonTypes( - hasteModuleName: string, - types: TypeDeclarationMap, - typeAnnotation: $FlowFixMe, - aliasMap: {...NativeModuleAliasMap}, - enumMap: {...NativeModuleEnumMap}, - tryParse: ParserErrorCapturer, - cxxOnly: boolean, - nullable: boolean, - parser: Parser, -): $FlowFixMe { - const typeMap = { - Stringish: emitStringish, - Int32: emitInt32, - Double: emitDouble, - Float: emitFloat, - UnsafeObject: emitGenericObject, - Object: emitGenericObject, - $Partial: emitPartial, - Partial: emitPartial, - BooleanTypeAnnotation: emitBoolean, - NumberTypeAnnotation: emitNumber, - VoidTypeAnnotation: emitVoid, - StringTypeAnnotation: emitString, - MixedTypeAnnotation: cxxOnly ? emitMixed : emitGenericObject, - }; - - const typeAnnotationName = parser.convertKeywordToTypeAnnotation( - typeAnnotation.type, - ); - - const simpleEmitter = typeMap[typeAnnotationName]; - if (simpleEmitter) { - return simpleEmitter(nullable); - } - - const genericTypeAnnotationName = - parser.getTypeAnnotationName(typeAnnotation); - - const emitter = typeMap[genericTypeAnnotationName]; - if (!emitter) { - return null; - } - - return emitter( - nullable, - hasteModuleName, - typeAnnotation, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, - ); -} - -function emitBoolProp( - name: string, - optional: boolean, -): NamedShape { - return { - name, - optional, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - }, - }; -} - -function emitMixedProp( - name: string, - optional: boolean, -): NamedShape { - return { - name, - optional, - typeAnnotation: { - type: 'MixedTypeAnnotation', - }, - }; -} - -function emitObjectProp( - name: string, - optional: boolean, - parser: Parser, - typeAnnotation: $FlowFixMe, - extractArrayElementType: ( - typeAnnotation: $FlowFixMe, - name: string, - parser: Parser, - ) => EventTypeAnnotation, -): NamedShape { - return { - name, - optional, - typeAnnotation: extractArrayElementType(typeAnnotation, name, parser), - }; -} - -function emitUnionProp( - name: string, - optional: boolean, - parser: Parser, - typeAnnotation: $FlowFixMe, -): NamedShape { - return { - name, - optional, - typeAnnotation: { - type: 'StringEnumTypeAnnotation', - options: typeAnnotation.types.map(option => - parser.getLiteralValue(option), - ), - }, - }; -} - -module.exports = { - emitArrayType, - emitBoolean, - emitBoolProp, - emitDouble, - emitDoubleProp, - emitFloat, - emitFloatProp, - emitFunction, - emitInt32, - emitInt32Prop, - emitMixedProp, - emitNumber, - emitGenericObject, - emitDictionary, - emitObject, - emitPromise, - emitRootTag, - emitVoid, - emitString, - emitStringish, - emitStringProp, - emitMixed, - emitUnion, - emitPartial, - emitCommonTypes, - typeAliasResolution, - typeEnumResolution, - translateArrayTypeAnnotation, - Visitor, - emitObjectProp, - emitUnionProp, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/parsers-utils.js b/node_modules/@react-native/codegen/lib/parsers/parsers-utils.js deleted file mode 100644 index fd91c47e0..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/parsers-utils.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * - */ - -'use strict'; - -function nullGuard(fn) { - return fn(); -} -module.exports = { - nullGuard, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/parsers-utils.js.flow b/node_modules/@react-native/codegen/lib/parsers/parsers-utils.js.flow deleted file mode 100644 index 696d308c9..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/parsers-utils.js.flow +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict - */ - -'use strict'; - -function nullGuard(fn: () => T): ?T { - return fn(); -} - -module.exports = { - nullGuard, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/schema.js b/node_modules/@react-native/codegen/lib/parsers/schema.js deleted file mode 100644 index d7d1a0eea..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/schema.js +++ /dev/null @@ -1,106 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * - */ - -'use strict'; - -function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && - (symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), - keys.push.apply(keys, symbols); - } - return keys; -} -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 - ? ownKeys(Object(source), !0).forEach(function (key) { - _defineProperty(target, key, source[key]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties( - target, - Object.getOwnPropertyDescriptors(source), - ) - : ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty( - target, - key, - Object.getOwnPropertyDescriptor(source, key), - ); - }); - } - return target; -} -function _defineProperty(obj, key, value) { - key = _toPropertyKey(key); - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true, - }); - } else { - obj[key] = value; - } - return obj; -} -function _toPropertyKey(arg) { - var key = _toPrimitive(arg, 'string'); - return typeof key === 'symbol' ? key : String(key); -} -function _toPrimitive(input, hint) { - if (typeof input !== 'object' || input === null) return input; - var prim = input[Symbol.toPrimitive]; - if (prim !== undefined) { - var res = prim.call(input, hint || 'default'); - if (typeof res !== 'object') return res; - throw new TypeError('@@toPrimitive must return a primitive value.'); - } - return (hint === 'string' ? String : Number)(input); -} -function wrapComponentSchema({ - filename, - componentName, - extendsProps, - events, - props, - options, - commands, -}) { - return { - modules: { - [filename]: { - type: 'Component', - components: { - [componentName]: _objectSpread( - _objectSpread({}, options || {}), - {}, - { - extendsProps, - events, - props, - commands, - }, - ), - }, - }, - }, - }; -} -module.exports = { - wrapComponentSchema, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/schema.js.flow b/node_modules/@react-native/codegen/lib/parsers/schema.js.flow deleted file mode 100644 index 2ebf6158b..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/schema.js.flow +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict - */ - -'use strict'; - -import type { - CommandTypeAnnotation, - EventTypeShape, - ExtendsPropsShape, - NamedShape, - OptionsShape, - PropTypeAnnotation, - SchemaType, -} from '../CodegenSchema.js'; - -export type ComponentSchemaBuilderConfig = $ReadOnly<{ - filename: string, - componentName: string, - extendsProps: $ReadOnlyArray, - events: $ReadOnlyArray, - props: $ReadOnlyArray>, - commands: $ReadOnlyArray>, - options?: ?OptionsShape, -}>; - -function wrapComponentSchema({ - filename, - componentName, - extendsProps, - events, - props, - options, - commands, -}: ComponentSchemaBuilderConfig): SchemaType { - return { - modules: { - [filename]: { - type: 'Component', - components: { - [componentName]: { - ...(options || {}), - extendsProps, - events, - props, - commands, - }, - }, - }, - }, - }; -} - -module.exports = { - wrapComponentSchema, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/schema/index.d.ts b/node_modules/@react-native/codegen/lib/parsers/schema/index.d.ts deleted file mode 100644 index cb298ccc9..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/schema/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -import type { SchemaType } from '../../CodegenSchema'; - -export declare function parse(filename: string): SchemaType | undefined; diff --git a/node_modules/@react-native/codegen/lib/parsers/schema/index.js b/node_modules/@react-native/codegen/lib/parsers/schema/index.js deleted file mode 100644 index 6016ece25..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/schema/index.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -function parse(filename) { - try { - // $FlowFixMe[unsupported-syntax] Can't require dynamic variables - return require(filename); - } catch (err) { - // Ignore - } -} -module.exports = { - parse, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/schema/index.js.flow b/node_modules/@react-native/codegen/lib/parsers/schema/index.js.flow deleted file mode 100644 index 646aa86fc..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/schema/index.js.flow +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type {SchemaType} from '../../CodegenSchema.js'; - -function parse(filename: string): ?SchemaType { - try { - // $FlowFixMe[unsupported-syntax] Can't require dynamic variables - return require(filename); - } catch (err) { - // Ignore - } -} - -module.exports = { - parse, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/typescript/components/__test_fixtures__/failures.js b/node_modules/@react-native/codegen/lib/parsers/typescript/components/__test_fixtures__/failures.js deleted file mode 100644 index fe90d8645..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/typescript/components/__test_fixtures__/failures.js +++ /dev/null @@ -1,489 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -// @licenselint-loose-mode - -'use strict'; - -const COMMANDS_DEFINED_INLINE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export interface ModuleProps extends ViewProps { - // No props -} - -export const Commands = codegenNativeCommands<{ - readonly hotspotUpdate: ( - ref: React.Ref<'RCTView'>, - x: Int32, - y: Int32, - ) => void; -}>({ - supportedCommands: ['hotspotUpdate'], -}); - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; -const COMMANDS_DEFINED_MULTIPLE_TIMES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -interface NativeCommands { - readonly hotspotUpdate: ( - viewRef: React.Ref<'RCTView'>, - x: Int32, - y: Int32, - ) => void; -} - -export interface ModuleProps extends ViewProps { - // No props or events -} - -export const Commands = codegenNativeCommands({ - supportedCommands: ['hotspotUpdate'], -}); -export const Commands2 = codegenNativeCommands({ - supportedCommands: ['hotspotUpdate'], -}); - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; -const COMMANDS_DEFINED_WITHOUT_REF = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -interface NativeCommands { - readonly hotspotUpdate: (x: Int32, y: Int32) => void; -} - -export interface ModuleProps extends ViewProps { - // No props or events -} - -export const Commands = codegenNativeCommands({ - supportedCommands: ['hotspotUpdate'], -}); - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; -const COMMANDS_DEFINED_WITH_NULLABLE_REF = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -interface NativeCommands { - readonly hotspotUpdate: (viewRef: React.Ref<'RCTView'> | null | undefined, x: Int32, y: Int32) => void; -} - -export interface ModuleProps extends ViewProps { - // No props or events -} - -export const Commands = codegenNativeCommands({ - supportedCommands: ['hotspotUpdate'], -}); - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; -const COMMANDS_DEFINED_WITH_MISMATCHED_METHOD_NAMES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -interface NativeCommands { - readonly hotspotUpdate: (viewRef: React.Ref<'RCTView'>, x: Int32, y: Int32) => void; - readonly scrollTo: ( - viewRef: React.Ref<'RCTView'>, - y: Int32, - animated: boolean, - ) => void; -} - -export interface ModuleProps extends ViewProps { - // No props or events -} - -export const Commands = codegenNativeCommands({ - supportedCommands: ['scrollTo'], -}); -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; -const COMMANDS_DEFINED_WITHOUT_METHOD_NAMES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -interface NativeCommands { - readonly hotspotUpdate: (viewRef: React.Ref<'RCTView'>, x: Int32, y: Int32) => void; - readonly scrollTo: ( - viewRef: React.Ref<'RCTView'>, - y: Int32, - animated: boolean, - ) => void; -} - -export interface ModuleProps extends ViewProps { - // No props or events -} - -export const Commands = codegenNativeCommands(); - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; -const NULLABLE_WITH_DEFAULT = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {WithDefault, Float} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export interface ModuleProps extends ViewProps { - nullable_with_default: WithDefault | null | undefined; -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; -const NON_OPTIONAL_KEY_WITH_DEFAULT_VALUE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {WithDefault, Float} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export interface ModuleProps extends ViewProps { - required_key_with_default: WithDefault; -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; -const PROPS_CONFLICT_NAMES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export interface ModuleProps extends ViewProps { - isEnabled: string, - - isEnabled: boolean, -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; -const PROPS_CONFLICT_WITH_SPREAD_PROPS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -type PropsInFile = Readonly<{ - isEnabled: boolean, -}>; - -export interface ModuleProps extends ViewProps, PropsInFile { - isEnabled: boolean, -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; -const PROP_NUMBER_TYPE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export interface ModuleProps extends ViewProps { - someProp: number -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; -const PROP_MIXED_ENUM = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; -import type {WithDefault} from 'CodegenTypes'; - -export interface ModuleProps extends ViewProps { - someProp?: WithDefault<'foo' | 1, 1>; -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; -const PROP_ENUM_BOOLEAN = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; -import type {WithDefault} from 'CodegenTypes'; - -export interface ModuleProps extends ViewProps { - someProp?: WithDefault -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; -const PROP_ARRAY_MIXED_ENUM = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; -import type {WithDefault} from 'CodegenTypes'; - -export interface ModuleProps extends ViewProps { - someProp?: WithDefault, 1>; -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; -const PROP_ARRAY_ENUM_BOOLEAN = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; -import type {WithDefault} from 'CodegenTypes'; - -export interface ModuleProps extends ViewProps { - someProp?: WithDefault, false>; -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; -const PROP_ARRAY_ENUM_INT = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; -import type {WithDefault} from 'CodegenTypes'; - -export interface ModuleProps extends ViewProps { - someProp?: WithDefault, 0>; -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; -module.exports = { - COMMANDS_DEFINED_INLINE, - COMMANDS_DEFINED_MULTIPLE_TIMES, - COMMANDS_DEFINED_WITH_MISMATCHED_METHOD_NAMES, - COMMANDS_DEFINED_WITHOUT_METHOD_NAMES, - COMMANDS_DEFINED_WITHOUT_REF, - COMMANDS_DEFINED_WITH_NULLABLE_REF, - NULLABLE_WITH_DEFAULT, - NON_OPTIONAL_KEY_WITH_DEFAULT_VALUE, - PROPS_CONFLICT_NAMES, - PROPS_CONFLICT_WITH_SPREAD_PROPS, - PROP_NUMBER_TYPE, - PROP_MIXED_ENUM, - PROP_ENUM_BOOLEAN, - PROP_ARRAY_MIXED_ENUM, - PROP_ARRAY_ENUM_BOOLEAN, - PROP_ARRAY_ENUM_INT, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/typescript/components/__test_fixtures__/failures.js.flow b/node_modules/@react-native/codegen/lib/parsers/typescript/components/__test_fixtures__/failures.js.flow deleted file mode 100644 index eefd9e316..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/typescript/components/__test_fixtures__/failures.js.flow +++ /dev/null @@ -1,505 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -// @licenselint-loose-mode - -'use strict'; - -const COMMANDS_DEFINED_INLINE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export interface ModuleProps extends ViewProps { - // No props -} - -export const Commands = codegenNativeCommands<{ - readonly hotspotUpdate: ( - ref: React.Ref<'RCTView'>, - x: Int32, - y: Int32, - ) => void; -}>({ - supportedCommands: ['hotspotUpdate'], -}); - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; - -const COMMANDS_DEFINED_MULTIPLE_TIMES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -interface NativeCommands { - readonly hotspotUpdate: ( - viewRef: React.Ref<'RCTView'>, - x: Int32, - y: Int32, - ) => void; -} - -export interface ModuleProps extends ViewProps { - // No props or events -} - -export const Commands = codegenNativeCommands({ - supportedCommands: ['hotspotUpdate'], -}); -export const Commands2 = codegenNativeCommands({ - supportedCommands: ['hotspotUpdate'], -}); - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; - -const COMMANDS_DEFINED_WITHOUT_REF = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -interface NativeCommands { - readonly hotspotUpdate: (x: Int32, y: Int32) => void; -} - -export interface ModuleProps extends ViewProps { - // No props or events -} - -export const Commands = codegenNativeCommands({ - supportedCommands: ['hotspotUpdate'], -}); - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; - -const COMMANDS_DEFINED_WITH_NULLABLE_REF = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -interface NativeCommands { - readonly hotspotUpdate: (viewRef: React.Ref<'RCTView'> | null | undefined, x: Int32, y: Int32) => void; -} - -export interface ModuleProps extends ViewProps { - // No props or events -} - -export const Commands = codegenNativeCommands({ - supportedCommands: ['hotspotUpdate'], -}); - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; - -const COMMANDS_DEFINED_WITH_MISMATCHED_METHOD_NAMES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -interface NativeCommands { - readonly hotspotUpdate: (viewRef: React.Ref<'RCTView'>, x: Int32, y: Int32) => void; - readonly scrollTo: ( - viewRef: React.Ref<'RCTView'>, - y: Int32, - animated: boolean, - ) => void; -} - -export interface ModuleProps extends ViewProps { - // No props or events -} - -export const Commands = codegenNativeCommands({ - supportedCommands: ['scrollTo'], -}); -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; - -const COMMANDS_DEFINED_WITHOUT_METHOD_NAMES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -interface NativeCommands { - readonly hotspotUpdate: (viewRef: React.Ref<'RCTView'>, x: Int32, y: Int32) => void; - readonly scrollTo: ( - viewRef: React.Ref<'RCTView'>, - y: Int32, - animated: boolean, - ) => void; -} - -export interface ModuleProps extends ViewProps { - // No props or events -} - -export const Commands = codegenNativeCommands(); - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; - -const NULLABLE_WITH_DEFAULT = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {WithDefault, Float} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export interface ModuleProps extends ViewProps { - nullable_with_default: WithDefault | null | undefined; -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; - -const NON_OPTIONAL_KEY_WITH_DEFAULT_VALUE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {WithDefault, Float} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export interface ModuleProps extends ViewProps { - required_key_with_default: WithDefault; -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; - -const PROPS_CONFLICT_NAMES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export interface ModuleProps extends ViewProps { - isEnabled: string, - - isEnabled: boolean, -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; - -const PROPS_CONFLICT_WITH_SPREAD_PROPS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -type PropsInFile = Readonly<{ - isEnabled: boolean, -}>; - -export interface ModuleProps extends ViewProps, PropsInFile { - isEnabled: boolean, -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; - -const PROP_NUMBER_TYPE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export interface ModuleProps extends ViewProps { - someProp: number -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; - -const PROP_MIXED_ENUM = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; -import type {WithDefault} from 'CodegenTypes'; - -export interface ModuleProps extends ViewProps { - someProp?: WithDefault<'foo' | 1, 1>; -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; - -const PROP_ENUM_BOOLEAN = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; -import type {WithDefault} from 'CodegenTypes'; - -export interface ModuleProps extends ViewProps { - someProp?: WithDefault -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; - -const PROP_ARRAY_MIXED_ENUM = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; -import type {WithDefault} from 'CodegenTypes'; - -export interface ModuleProps extends ViewProps { - someProp?: WithDefault, 1>; -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; - -const PROP_ARRAY_ENUM_BOOLEAN = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; -import type {WithDefault} from 'CodegenTypes'; - -export interface ModuleProps extends ViewProps { - someProp?: WithDefault, false>; -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; - -const PROP_ARRAY_ENUM_INT = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; -import type {WithDefault} from 'CodegenTypes'; - -export interface ModuleProps extends ViewProps { - someProp?: WithDefault, 0>; -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; - -module.exports = { - COMMANDS_DEFINED_INLINE, - COMMANDS_DEFINED_MULTIPLE_TIMES, - COMMANDS_DEFINED_WITH_MISMATCHED_METHOD_NAMES, - COMMANDS_DEFINED_WITHOUT_METHOD_NAMES, - COMMANDS_DEFINED_WITHOUT_REF, - COMMANDS_DEFINED_WITH_NULLABLE_REF, - NULLABLE_WITH_DEFAULT, - NON_OPTIONAL_KEY_WITH_DEFAULT_VALUE, - PROPS_CONFLICT_NAMES, - PROPS_CONFLICT_WITH_SPREAD_PROPS, - PROP_NUMBER_TYPE, - PROP_MIXED_ENUM, - PROP_ENUM_BOOLEAN, - PROP_ARRAY_MIXED_ENUM, - PROP_ARRAY_ENUM_BOOLEAN, - PROP_ARRAY_ENUM_INT, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/typescript/components/__test_fixtures__/fixtures.js b/node_modules/@react-native/codegen/lib/parsers/typescript/components/__test_fixtures__/fixtures.js deleted file mode 100644 index 042b6a582..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/typescript/components/__test_fixtures__/fixtures.js +++ /dev/null @@ -1,1235 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -// @licenselint-loose-mode - -'use strict'; - -const EVENT_DEFINITION = ` - boolean_required: boolean; - boolean_optional_key?: boolean; - boolean_optional_value: boolean | null | undefined; - boolean_optional_both?: boolean | null | undefined; - - string_required: string; - string_optional_key?: (string); - string_optional_value: (string) | null | undefined; - string_optional_both?: (string | null | undefined); - - double_required: Double; - double_optional_key?: Double; - double_optional_value: Double | null | undefined; - double_optional_both?: Double | null | undefined; - - float_required: Float; - float_optional_key?: Float; - float_optional_value: Float | null | undefined; - float_optional_both?: Float | null | undefined; - - int32_required: Int32; - int32_optional_key?: Int32; - int32_optional_value: Int32 | null | undefined; - int32_optional_both?: Int32 | null | undefined; - - enum_required: 'small' | 'large'; - enum_optional_key?: 'small' | 'large'; - enum_optional_value: ('small' | 'large') | null | undefined; - enum_optional_both?: ('small' | 'large') | null | undefined; - - object_required: { - boolean_required: boolean; - }; - - object_optional_key?: { - string_optional_key?: string; - }; - - object_optional_value: { - float_optional_value: Float | null | undefined; - } | null | undefined; - - object_optional_both?: { - int32_optional_both?: Int32 | null | undefined; - } | null | undefined; - - object_required_nested_2_layers: { - object_optional_nested_1_layer?: { - boolean_required: Int32; - string_optional_key?: string; - double_optional_value: Double | null | undefined; - float_optional_value: Float | null | undefined; - int32_optional_both?: Int32 | null | undefined; - } | null | undefined; - }; - - object_readonly_required: Readonly<{ - boolean_required: boolean; - }>; - - object_readonly_optional_key?: Readonly<{ - string_optional_key?: string; - }>; - - object_readonly_optional_value: Readonly<{ - float_optional_value: Float | null | undefined; - }> | null | undefined; - - object_readonly_optional_both?: Readonly<{ - int32_optional_both?: Int32 | null | undefined; - }> | null | undefined; - - boolean_array_required: boolean[]; - boolean_array_optional_key?: boolean[]; - boolean_array_optional_value: boolean[] | null | undefined; - boolean_array_optional_both?: boolean[] | null | undefined; - - string_array_required: string[]; - string_array_optional_key?: (string[]); - string_array_optional_value: (string[]) | null | undefined; - string_array_optional_both?: (string[] | null | undefined); - - double_array_required: Double[]; - double_array_optional_key?: Double[]; - double_array_optional_value: Double[] | null | undefined; - double_array_optional_both?: Double[] | null | undefined; - - float_array_required: Float[]; - float_array_optional_key?: Float[]; - float_array_optional_value: Float[] | null | undefined; - float_array_optional_both?: Float[] | null | undefined; - - int32_array_required: Int32[]; - int32_array_optional_key?: Int32[]; - int32_array_optional_value: Int32[] | null | undefined; - int32_array_optional_both?: Int32[] | null | undefined; - - enum_array_required: ('small' | 'large')[]; - enum_array_optional_key?: ('small' | 'large')[]; - enum_array_optional_value: ('small' | 'large')[] | null | undefined; - enum_array_optional_both?: ('small' | 'large')[] | null | undefined; - - object_array_required: { - boolean_required: boolean; - }[]; - - object_array_optional_key?: { - string_optional_key?: string; - }[]; - - object_array_optional_value: { - float_optional_value: Float | null | undefined; - }[] | null | undefined; - - object_array_optional_both?: { - int32_optional_both?: Int32 | null | undefined; - }[] | null | undefined; - - int32_array_array_required: Int32[][]; - int32_array_array_optional_key?: Int32[][]; - int32_array_array_optional_value: Int32[][] | null | undefined; - int32_array_array_optional_both?: Int32[][] | null | undefined; -`; -const ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -'use strict'; - -import type { - BubblingEventHandler, - DirectEventHandler, - WithDefault, -} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -export interface ModuleProps extends ViewProps { - // Props - boolean_default_true_optional_both?: WithDefault; - - // Events - onDirectEventDefinedInlineNull: DirectEventHandler; - onBubblingEventDefinedInlineNull: BubblingEventHandler; -} - -export default codegenNativeComponent('Module', { - interfaceOnly: true, - paperComponentName: 'RCTModule', -}) as HostComponent; -`; -const ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS_NO_CAST = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type { - BubblingEventHandler, - DirectEventHandler, - WithDefault, -} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export interface ModuleProps extends ViewProps { - // Props - boolean_default_true_optional_both?: WithDefault; - - // Events - onDirectEventDefinedInlineNull: DirectEventHandler; - onBubblingEventDefinedInlineNull: BubblingEventHandler; -} - -export default codegenNativeComponent('Module', { - interfaceOnly: true, - excludedPlatforms: ['android'], - paperComponentName: 'RCTModule', -}) as HostComponent; -`; -const NO_PROPS_EVENTS_ONLY_DEPRECATED_VIEW_CONFIG_NAME_OPTION = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export interface ModuleProps extends ViewProps { - -} - -export default codegenNativeComponent('Module', { - deprecatedViewConfigName: 'DeprecateModuleName', -}) as HostComponent; -`; -const ALL_PROP_TYPES_NO_EVENTS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32, Double, Float, WithDefault, UnsafeMixed} from 'CodegenTypes'; -import type {ImageSource} from 'ImageSource'; -import type { - ColorValue, - ColorArrayValue, - PointValue, - EdgeInsetsValue, - DimensionValue, -} from 'StyleSheetTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export interface ModuleProps extends ViewProps { - // Props - // Boolean props - boolean_required: boolean; - boolean_optional_key?: WithDefault; - boolean_optional_both?: WithDefault; - - // Boolean props, null default - boolean_null_optional_key?: WithDefault; - boolean_null_optional_both?: WithDefault; - - // String props - string_required: string; - string_optional_key?: WithDefault; - string_optional_both?: WithDefault; - - // String props, null default - string_null_optional_key?: WithDefault; - string_null_optional_both?: WithDefault; - - // Stringish props - stringish_required: Stringish; - stringish_optional_key?: WithDefault; - stringish_optional_both?: WithDefault; - - // Stringish props, null default - stringish_null_optional_key?: WithDefault; - stringish_null_optional_both?: WithDefault; - - // Double props - double_required: Double; - double_optional_key?: WithDefault; - double_optional_both?: WithDefault; - - // Float props - float_required: Float; - float_optional_key?: WithDefault; - float_optional_both?: WithDefault; - - // Float props, null default - float_null_optional_key?: WithDefault; - float_null_optional_both?: WithDefault; - - // Int32 props - int32_required: Int32; - int32_optional_key?: WithDefault; - int32_optional_both?: WithDefault; - - // String enum props - enum_optional_key?: WithDefault<'small' | 'large', 'small'>; - enum_optional_both?: WithDefault<'small' | 'large', 'small'>; - - // Int enum props - int_enum_optional_key?: WithDefault<0 | 1, 0>; - - // Object props - object_optional_key?: Readonly<{prop: string}>; - object_optional_both?: Readonly<{prop: string} | null | undefined>; - object_optional_value: Readonly<{prop: string} | null | undefined>; - - // ImageSource props - image_required: ImageSource; - image_optional_value: ImageSource | null | undefined; - image_optional_both?: ImageSource | null | undefined; - - // ColorValue props - color_required: ColorValue; - color_optional_key?: ColorValue; - color_optional_value: ColorValue | null | undefined; - color_optional_both?: ColorValue | null | undefined; - - // ColorArrayValue props - color_array_required: ColorArrayValue; - color_array_optional_key?: ColorArrayValue; - color_array_optional_value: ColorArrayValue | null | undefined; - color_array_optional_both?: ColorArrayValue | null | undefined; - - // ProcessedColorValue props - processed_color_required: ProcessedColorValue; - processed_color_optional_key?: ProcessedColorValue; - processed_color_optional_value: ProcessedColorValue | null | undefined; - processed_color_optional_both?: ProcessedColorValue | null | undefined; - - // PointValue props - point_required: PointValue; - point_optional_key?: PointValue; - point_optional_value: PointValue | null | undefined; - point_optional_both?: PointValue | null | undefined; - - // EdgeInsets props - insets_required: EdgeInsetsValue; - insets_optional_key?: EdgeInsetsValue; - insets_optional_value: EdgeInsetsValue | null | undefined; - insets_optional_both?: EdgeInsetsValue | null | undefined; - - - // DimensionValue props - dimension_required: DimensionValue; - dimension_optional_key?: DimensionValue; - dimension_optional_value: DimensionValue | null | undefined; - dimension_optional_both?: DimensionValue | null | undefined; - - // Mixed props - mixed_required: UnsafeMixed, - mixed_optional_key?: UnsafeMixed, -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; -const ARRAY_PROP_TYPES_NO_EVENTS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32, Double, Float, WithDefault} from 'CodegenTypes'; -import type {ImageSource} from 'ImageSource'; -import type { - ColorValue, - ColorArrayValue, - PointValue, - EdgeInsetsValue, - DimensionValue, -} from 'StyleSheetTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -type ObjectType = Readonly<{prop: string}>; -type ArrayObjectType = ReadonlyArray>; - -export interface ModuleProps extends ViewProps { - // Props - // Boolean props - array_boolean_required: ReadonlyArray; - array_boolean_optional_key?: ReadonlyArray; - array_boolean_optional_value: ReadonlyArray | null | undefined; - array_boolean_optional_both?: ReadonlyArray | null | undefined; - - // String props - array_string_required: ReadonlyArray; - array_string_optional_key?: ReadonlyArray; - array_string_optional_value: ReadonlyArray | null | undefined; - array_string_optional_both?: ReadonlyArray | null | undefined; - - // Double props - array_double_required: ReadonlyArray; - array_double_optional_key?: ReadonlyArray; - array_double_optional_value: ReadonlyArray | null | undefined; - array_double_optional_both?: ReadonlyArray | null | undefined; - - // Float props - array_float_required: ReadonlyArray; - array_float_optional_key?: ReadonlyArray; - array_float_optional_value: ReadonlyArray | null | undefined; - array_float_optional_both?: ReadonlyArray | null | undefined; - - // Int32 props - array_int32_required: ReadonlyArray; - array_int32_optional_key?: ReadonlyArray; - array_int32_optional_value: ReadonlyArray | null | undefined; - array_int32_optional_both?: ReadonlyArray | null | undefined; - - // String enum props - array_enum_optional_key?: WithDefault< - ReadonlyArray<'small' | 'large'>, - 'small' - >; - array_enum_optional_both?: WithDefault< - ReadonlyArray<'small' | 'large'>, - 'small' - >; - - // ImageSource props - array_image_required: ReadonlyArray; - array_image_optional_key?: ReadonlyArray; - array_image_optional_value: ReadonlyArray | null | undefined; - array_image_optional_both?: ReadonlyArray | null | undefined; - - // ColorValue props - array_color_required: ReadonlyArray; - array_color_optional_key?: ReadonlyArray; - array_color_optional_value: ReadonlyArray | null | undefined; - array_color_optional_both?: ReadonlyArray | null | undefined; - - // PointValue props - array_point_required: ReadonlyArray; - array_point_optional_key?: ReadonlyArray; - array_point_optional_value: ReadonlyArray | null | undefined; - array_point_optional_both?: ReadonlyArray | null | undefined; - - // EdgeInsetsValue props - array_insets_required: ReadonlyArray; - array_insets_optional_key?: ReadonlyArray; - array_insets_optional_value: ReadonlyArray | null | undefined; - array_insets_optional_both?: ReadonlyArray | null | undefined; - - // DimensionValue props - array_dimension_required: ReadonlyArray; - array_dimension_optional_key?: ReadonlyArray; - array_dimension_optional_value: ReadonlyArray | null | undefined; - array_dimension_optional_both?: ReadonlyArray | null | undefined; - - // Object props - array_object_required: ReadonlyArray>; - array_object_optional_key?: ReadonlyArray>; - array_object_optional_value: ArrayObjectType | null | undefined; - array_object_optional_both?: ReadonlyArray | null | undefined; - - // Nested array object types - array_of_array_object_required: ReadonlyArray< - Readonly<{ - // This needs to be the same name as the top level array above - array_object_required: ReadonlyArray>; - }> - >; - array_of_array_object_optional_key?: ReadonlyArray< - Readonly<{ - // This needs to be the same name as the top level array above - array_object_optional_key: ReadonlyArray>; - }> - >; - array_of_array_object_optional_value: ReadonlyArray< - Readonly<{ - // This needs to be the same name as the top level array above - array_object_optional_value: ReadonlyArray< - Readonly<{prop: string | null | undefined}> - >; - }> - > | null | undefined; - array_of_array_object_optional_both?: ReadonlyArray< - Readonly<{ - // This needs to be the same name as the top level array above - array_object_optional_both: ReadonlyArray< - Readonly<{prop?: string | null | undefined}> - >; - }> - > | null | undefined; - - // Nested array of array of object types - array_of_array_of_object_required: ReadonlyArray< - ReadonlyArray< - Readonly<{ - prop: string; - }> - > - >; - - // Nested array of array of object types (in file) - array_of_array_of_object_required_in_file: ReadonlyArray< - ReadonlyArray - >; - - // Nested array of array of object types (with spread) - array_of_array_of_object_required_with_spread: ReadonlyArray< - ReadonlyArray< - Readonly, - >, - >, -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; -const ARRAY2_PROP_TYPES_NO_EVENTS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32, Double, Float, WithDefault} from 'CodegenTypes'; -import type {ImageSource} from 'ImageSource'; -import type { - ColorValue, - ColorArrayValue, - PointValue, - EdgeInsetsValue, -} from 'StyleSheetTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -type ObjectType = Readonly<{prop: string}>; -type ArrayObjectType = readonly Readonly<{prop: string}>[]; - -export interface ModuleProps extends ViewProps { - // Props - // Boolean props - array_boolean_required: readonly boolean[]; - array_boolean_optional_key?: readonly boolean[]; - array_boolean_optional_value: readonly boolean[] | null | undefined; - array_boolean_optional_both?: readonly boolean[] | null | undefined; - - // String props - array_string_required: readonly string[]; - array_string_optional_key?: readonly string[]; - array_string_optional_value: readonly string[] | null | undefined; - array_string_optional_both?: readonly string[] | null | undefined; - - // Double props - array_double_required: readonly Double[]; - array_double_optional_key?: readonly Double[]; - array_double_optional_value: readonly Double[] | null | undefined; - array_double_optional_both?: readonly Double[] | null | undefined; - - // Float props - array_float_required: readonly Float[]; - array_float_optional_key?: readonly Float[]; - array_float_optional_value: readonly Float[] | null | undefined; - array_float_optional_both?: readonly Float[] | null | undefined; - - // Int32 props - array_int32_required: readonly Int32[]; - array_int32_optional_key?: readonly Int32[]; - array_int32_optional_value: readonly Int32[] | null | undefined; - array_int32_optional_both?: readonly Int32[] | null | undefined; - - // String enum props - array_enum_optional_key?: WithDefault< - readonly ('small' | 'large')[], - 'small' - >; - array_enum_optional_both?: WithDefault< - readonly ('small' | 'large')[], - 'small' - >; - - // ImageSource props - array_image_required: readonly ImageSource[]; - array_image_optional_key?: readonly ImageSource[]; - array_image_optional_value: readonly ImageSource[] | null | undefined; - array_image_optional_both?: readonly ImageSource[] | null | undefined; - - // ColorValue props - array_color_required: readonly ColorValue[]; - array_color_optional_key?: readonly ColorValue[]; - array_color_optional_value: readonly ColorValue[] | null | undefined; - array_color_optional_both?: readonly ColorValue[] | null | undefined; - - // PointValue props - array_point_required: readonly PointValue[]; - array_point_optional_key?: readonly PointValue[]; - array_point_optional_value: readonly PointValue[] | null | undefined; - array_point_optional_both?: readonly PointValue[] | null | undefined; - - // EdgeInsetsValue props - array_insets_required: readonly EdgeInsetsValue[]; - array_insets_optional_key?: readonly EdgeInsetsValue[]; - array_insets_optional_value: readonly EdgeInsetsValue[] | null | undefined; - array_insets_optional_both?: readonly EdgeInsetsValue[] | null | undefined; - - // Object props - array_object_required: readonly Readonly<{prop: string}>[]; - array_object_optional_key?: readonly Readonly<{prop: string}>[]; - array_object_optional_value: ArrayObjectType | null | undefined; - array_object_optional_both?: readonly ObjectType[] | null | undefined; - - // Nested array object types - array_of_array_object_required: readonly Readonly<{ - // This needs to be the same name as the top level array above - array_object_required: readonly Readonly<{prop: string}>[]; - }>[]; - array_of_array_object_optional_key?: readonly Readonly<{ - // This needs to be the same name as the top level array above - array_object_optional_key: readonly Readonly<{prop?: string}>[]; - }>[]; - array_of_array_object_optional_value: readonly Readonly<{ - // This needs to be the same name as the top level array above - array_object_optional_value: readonly Readonly<{prop: string | null | undefined}>[]; - }>[] | null | undefined; - array_of_array_object_optional_both?: readonly Readonly<{ - // This needs to be the same name as the top level array above - array_object_optional_both: readonly Readonly<{prop?: string | null | undefined}>[]; - }>[] | null | undefined; - - // Nested array of array of object types - array_of_array_of_object_required: readonly Readonly<{ - prop: string; - }>[][]; - - // Nested array of array of object types (in file) - array_of_array_of_object_required_in_file: readonly ObjectType[][]; - - // Nested array of array of object types (with spread) - array_of_array_of_object_required_with_spread: readonly Readonly[][]; -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; -const OBJECT_PROP_TYPES_NO_EVENTS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32, Double, Float, WithDefault} from 'CodegenTypes'; -import type {ImageSource} from 'ImageSource'; -import type { - ColorValue, - ColorArrayValue, - PointValue, - EdgeInsetsValue, - DimensionValue, -} from 'StyleSheetTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export interface ModuleProps extends ViewProps { - // Props - // Boolean props - boolean_required: Readonly<{prop: boolean}>; - boolean_optional: Readonly<{prop?: WithDefault}>; - - // String props - string_required: Readonly<{prop: string}>; - string_optional: Readonly<{prop?: WithDefault}>; - - // Double props - double_required: Readonly<{prop: Double}>; - double_optional: Readonly<{prop?: WithDefault}>; - - // Float props - float_required: Readonly<{prop: Float}>; - float_optional: Readonly<{prop?: WithDefault}>; - - // Int32 props - int_required: Readonly<{prop: Int32}>; - int_optional: Readonly<{prop?: WithDefault}>; - - // String enum props - enum_optional: Readonly<{ - prop?: WithDefault, 'small'>; - }>; - - // ImageSource props - image_required: Readonly<{prop: ImageSource}>; - image_optional_key: Readonly<{prop?: ImageSource}>; - image_optional_value: Readonly<{prop: ImageSource | null | undefined}>; - image_optional_both: Readonly<{prop?: ImageSource | null | undefined}>; - - // ColorValue props - color_required: Readonly<{prop: ColorValue}>; - color_optional_key: Readonly<{prop?: ColorValue}>; - color_optional_value: Readonly<{prop: ColorValue | null | undefined}>; - color_optional_both: Readonly<{prop?: ColorValue | null | undefined}>; - - // ProcessedColorValue props - processed_color_required: Readonly<{prop: ProcessedColorValue}>; - processed_color_optional_key: Readonly<{prop?: ProcessedColorValue}>; - processed_color_optional_value: Readonly<{ - prop: ProcessedColorValue | null | undefined; - }>; - processed_color_optional_both: Readonly<{ - prop?: ProcessedColorValue | null | undefined; - }>; - - // PointValue props - point_required: Readonly<{prop: PointValue}>; - point_optional_key: Readonly<{prop?: PointValue}>; - point_optional_value: Readonly<{prop: PointValue | null | undefined}>; - point_optional_both: Readonly<{prop?: PointValue | null | undefined}>; - - // EdgeInsetsValue props - insets_required: Readonly<{prop: EdgeInsetsValue}>; - insets_optional_key: Readonly<{prop?: EdgeInsetsValue}>; - insets_optional_value: Readonly<{prop: EdgeInsetsValue | null | undefined}>; - insets_optional_both: Readonly<{prop?: EdgeInsetsValue | null | undefined}>; - - // DimensionValue props - dimension_required: Readonly<{prop: DimensionValue}>; - dimension_optional_key: Readonly<{prop?: DimensionValue}>; - dimension_optional_value: Readonly<{prop: DimensionValue | null | undefined}>; - dimension_optional_both: Readonly<{prop?: DimensionValue | null | undefined}>; - - // Nested object props - object_required: Readonly<{prop: Readonly<{nestedProp: string}>}>; - object_optional_key?: Readonly<{prop: Readonly<{nestedProp: string}>}>; - object_optional_value: Readonly<{ - prop: Readonly<{nestedProp: string}>; - }> | null | undefined; - object_optional_both?: Readonly<{ - prop: Readonly<{nestedProp: string}>; - }> | null | undefined; -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; -const PROPS_ALIASED_LOCALLY = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -'use strict'; - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -type DeepSpread = Readonly<{ - otherStringProp: string; -}>; - -export interface PropsInFile extends DeepSpread { - isEnabled: boolean; - label: string; -} - -type ReadOnlyPropsInFile = Readonly; - -export interface ModuleProps extends ViewProps, ReadOnlyPropsInFile { - localType: ReadOnlyPropsInFile; - localArr: ReadonlyArray; -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; -const EVENTS_DEFINED_INLINE_WITH_ALL_TYPES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {HostComponent} from 'react-native'; -const codegenNativeComponent = require('codegenNativeComponent'); - -import type { - Int32, - Double, - Float, - BubblingEventHandler, - DirectEventHandler, -} from 'CodegenTypes'; - -import type {ViewProps} from 'ViewPropTypes'; - -export interface ModuleProps extends ViewProps { - // No Props - - // Events - onDirectEventDefinedInline: DirectEventHandler< - Readonly<{ - ${EVENT_DEFINITION} - }> - >; - - onDirectEventDefinedInlineOptionalKey?: (DirectEventHandler< - Readonly<{ - ${EVENT_DEFINITION} - }> - >); - - onDirectEventDefinedInlineOptionalValue: (DirectEventHandler< - Readonly<{ - ${EVENT_DEFINITION} - }> - >) | null | undefined; - - onDirectEventDefinedInlineOptionalBoth?: (DirectEventHandler< - Readonly<{ - ${EVENT_DEFINITION} - }> - > | null | undefined); - - onDirectEventDefinedInlineWithPaperName?: DirectEventHandler< - Readonly<{ - ${EVENT_DEFINITION} - }>, - 'paperDirectEventDefinedInlineWithPaperName' - > | null | undefined; - - onBubblingEventDefinedInline: BubblingEventHandler< - Readonly<{ - ${EVENT_DEFINITION} - }> - >; - - onBubblingEventDefinedInlineOptionalKey?: BubblingEventHandler< - Readonly<{ - ${EVENT_DEFINITION} - }> - >; - - onBubblingEventDefinedInlineOptionalValue: BubblingEventHandler< - Readonly<{ - ${EVENT_DEFINITION} - }> - > | null | undefined; - - onBubblingEventDefinedInlineOptionalBoth?: BubblingEventHandler< - Readonly<{ - ${EVENT_DEFINITION} - }> - > | null | undefined; - - onBubblingEventDefinedInlineWithPaperName?: BubblingEventHandler< - Readonly<{ - ${EVENT_DEFINITION} - }>, - 'paperBubblingEventDefinedInlineWithPaperName' - > | null | undefined; -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; -const EVENTS_DEFINED_AS_NULL_INLINE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {BubblingEventHandler, DirectEventHandler} from 'CodegenTypese'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export interface ModuleProps extends ViewProps { - // No props - - // Events defined inline - onDirectEventDefinedInlineNull: DirectEventHandler; - onDirectEventDefinedInlineNullOptionalKey?: DirectEventHandler; - onDirectEventDefinedInlineNullOptionalValue: DirectEventHandler | null | undefined; - onDirectEventDefinedInlineNullOptionalBoth?: DirectEventHandler; - onDirectEventDefinedInlineNullWithPaperName?: DirectEventHandler< - null, - 'paperDirectEventDefinedInlineNullWithPaperName' - > | null | undefined; - - onBubblingEventDefinedInlineNull: BubblingEventHandler; - onBubblingEventDefinedInlineNullOptionalKey?: BubblingEventHandler; - onBubblingEventDefinedInlineNullOptionalValue: BubblingEventHandler | null | undefined; - onBubblingEventDefinedInlineNullOptionalBoth?: BubblingEventHandler | null | undefined; - onBubblingEventDefinedInlineNullWithPaperName?: BubblingEventHandler< - undefined, - 'paperBubblingEventDefinedInlineNullWithPaperName' - > | null | undefined; -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; -const PROPS_AND_EVENTS_TYPES_EXPORTED = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; -import type { - BubblingEventHandler, - DirectEventHandler, -} from 'CodegenTypes'; - -export type EventInFile = Readonly<{ - ${EVENT_DEFINITION} -}>; - -export interface ModuleProps extends ViewProps { - // No props - - // Events defined inline - onBubblingEventDefinedInline: BubblingEventHandler; - onBubblingEventDefinedInlineWithPaperName: BubblingEventHandler< - EventInFile, - 'paperBubblingEventDefinedInlineWithPaperName' - >; - onDirectEventDefinedInline: DirectEventHandler; - onDirectEventDefinedInlineWithPaperName: DirectEventHandler< - EventInFile, - 'paperDirectEventDefinedInlineWithPaperName' - >; -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; -const PROPS_AS_EXTERNAL_TYPES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {HostComponent} from 'react-native'; - -export type String = string; -export type AnotherArray = ReadonlyArray; - -export interface ModuleProps { - disable: String; - array: AnotherArray; -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; -const COMMANDS_DEFINED_WITH_ALL_TYPES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - - const codegenNativeCommands = require('codegenNativeCommands'); - const codegenNativeComponent = require('codegenNativeComponent'); - - import type {Int32, Double, Float} from 'CodegenTypes'; - import type {RootTag} from 'RCTExport'; - import type {ViewProps} from 'ViewPropTypes'; - import type {HostComponent} from 'react-native'; - - -export interface ModuleProps extends ViewProps { - // No props or events -} - -type NativeType = HostComponent; - - interface NativeCommands { - readonly handleRootTag: (viewRef: React.ElementRef, rootTag: RootTag) => void; - readonly hotspotUpdate: (viewRef: React.ElementRef, x: Int32, y: Int32) => void; - scrollTo( - viewRef: React.ElementRef, - x: Float, - y: Int32, - z: Double, - animated: boolean, - ): void; - } - - export const Commands = codegenNativeCommands({ - supportedCommands: ['handleRootTag', 'hotspotUpdate', 'scrollTo'], - }); - -export default codegenNativeComponent( - 'Module', -) as NativeType; -`; -const COMMANDS_WITH_EXTERNAL_TYPES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export type Boolean = boolean; -export type Int = Int32; -export type Void = void; - -export interface ModuleProps extends ViewProps { - // No props or events -} - -type NativeType = HostComponent; - -export type ScrollTo = ( - viewRef: React.ElementRef, - y: Int, - animated: Boolean, -) => Void; -export type AddOverlays = ( - viewRef: React.ElementRef, - overlayColorsReadOnly: ReadOnlyArray, - overlayColorsArray: Array, - overlayColorsArrayAnnotation: string[], -) => Void; - -interface NativeCommands { - readonly scrollTo: ScrollTo; - readonly addOverlays: AddOverlays; -} - -export const Commands = codegenNativeCommands({ - supportedCommands: ['scrollTo', 'addOverlays'], -}); - -export default codegenNativeComponent('Module') as NativeType; - -`; -const COMMANDS_EVENTS_TYPES_EXPORTED = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type { - BubblingEventHandler, - DirectEventHandler, -} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -export type EventInFile = Readonly<{ - ${EVENT_DEFINITION} -}>; - -export type Boolean = boolean; -export type Int = Int32; -export type Void = void; - -export interface ModuleProps extends ViewProps { - // No props - - // Events defined inline - onBubblingEventDefinedInline: BubblingEventHandler, - onBubblingEventDefinedInlineWithPaperName: BubblingEventHandler, - onDirectEventDefinedInline: DirectEventHandler, - onDirectEventDefinedInlineWithPaperName: DirectEventHandler, -} - -// Add state here -export interface ModuleNativeState { - boolean_required: boolean, - boolean_optional_key?: WithDefault, - boolean_optional_both?: WithDefault, -} - -type NativeType = HostComponent; - -export type ScrollTo = (viewRef: React.ElementRef, y: Int, animated: Boolean) => Void; - -interface NativeCommands { - readonly scrollTo: ScrollTo; -} - -export const Commands = codegenNativeCommands({ - supportedCommands: ['scrollTo'] -}); - -export default codegenNativeComponent( - 'Module', -) as NativeType; -`; -const PROPS_AND_EVENTS_WITH_INTERFACES = ` -import type { - BubblingEventHandler, - DirectEventHandler, - Int32, -} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -export interface Base1 { - readonly x: string; -} - -export interface Base2 { - readonly y: Int32; -} - -export interface Derived extends Base1, Base2 { - readonly z: boolean; -} - -export interface ModuleProps extends ViewProps { - // Props - ordinary_prop: Derived; - readonly_prop: Readonly; - ordinary_array_prop?: readonly Derived[]; - readonly_array_prop?: readonly Readonly[]; - ordinary_nested_array_prop?: readonly Derived[][]; - readonly_nested_array_prop?: readonly Readonly[][]; - - // Events - onDirect: DirectEventHandler; - onBubbling: BubblingEventHandler>; -} - -export default codegenNativeComponent('Module', { - interfaceOnly: true, - paperComponentName: 'RCTModule', -}) as HostComponent; -`; -module.exports = { - ALL_PROP_TYPES_NO_EVENTS, - ARRAY_PROP_TYPES_NO_EVENTS, - ARRAY2_PROP_TYPES_NO_EVENTS, - OBJECT_PROP_TYPES_NO_EVENTS, - PROPS_ALIASED_LOCALLY, - ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS, - ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS_NO_CAST, - NO_PROPS_EVENTS_ONLY_DEPRECATED_VIEW_CONFIG_NAME_OPTION, - EVENTS_DEFINED_INLINE_WITH_ALL_TYPES, - EVENTS_DEFINED_AS_NULL_INLINE, - PROPS_AND_EVENTS_TYPES_EXPORTED, - COMMANDS_EVENTS_TYPES_EXPORTED, - COMMANDS_DEFINED_WITH_ALL_TYPES, - PROPS_AS_EXTERNAL_TYPES, - COMMANDS_WITH_EXTERNAL_TYPES, - PROPS_AND_EVENTS_WITH_INTERFACES, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/typescript/components/__test_fixtures__/fixtures.js.flow b/node_modules/@react-native/codegen/lib/parsers/typescript/components/__test_fixtures__/fixtures.js.flow deleted file mode 100644 index ed237a0b6..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/typescript/components/__test_fixtures__/fixtures.js.flow +++ /dev/null @@ -1,1252 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -// @licenselint-loose-mode - -'use strict'; - -const EVENT_DEFINITION = ` - boolean_required: boolean; - boolean_optional_key?: boolean; - boolean_optional_value: boolean | null | undefined; - boolean_optional_both?: boolean | null | undefined; - - string_required: string; - string_optional_key?: (string); - string_optional_value: (string) | null | undefined; - string_optional_both?: (string | null | undefined); - - double_required: Double; - double_optional_key?: Double; - double_optional_value: Double | null | undefined; - double_optional_both?: Double | null | undefined; - - float_required: Float; - float_optional_key?: Float; - float_optional_value: Float | null | undefined; - float_optional_both?: Float | null | undefined; - - int32_required: Int32; - int32_optional_key?: Int32; - int32_optional_value: Int32 | null | undefined; - int32_optional_both?: Int32 | null | undefined; - - enum_required: 'small' | 'large'; - enum_optional_key?: 'small' | 'large'; - enum_optional_value: ('small' | 'large') | null | undefined; - enum_optional_both?: ('small' | 'large') | null | undefined; - - object_required: { - boolean_required: boolean; - }; - - object_optional_key?: { - string_optional_key?: string; - }; - - object_optional_value: { - float_optional_value: Float | null | undefined; - } | null | undefined; - - object_optional_both?: { - int32_optional_both?: Int32 | null | undefined; - } | null | undefined; - - object_required_nested_2_layers: { - object_optional_nested_1_layer?: { - boolean_required: Int32; - string_optional_key?: string; - double_optional_value: Double | null | undefined; - float_optional_value: Float | null | undefined; - int32_optional_both?: Int32 | null | undefined; - } | null | undefined; - }; - - object_readonly_required: Readonly<{ - boolean_required: boolean; - }>; - - object_readonly_optional_key?: Readonly<{ - string_optional_key?: string; - }>; - - object_readonly_optional_value: Readonly<{ - float_optional_value: Float | null | undefined; - }> | null | undefined; - - object_readonly_optional_both?: Readonly<{ - int32_optional_both?: Int32 | null | undefined; - }> | null | undefined; - - boolean_array_required: boolean[]; - boolean_array_optional_key?: boolean[]; - boolean_array_optional_value: boolean[] | null | undefined; - boolean_array_optional_both?: boolean[] | null | undefined; - - string_array_required: string[]; - string_array_optional_key?: (string[]); - string_array_optional_value: (string[]) | null | undefined; - string_array_optional_both?: (string[] | null | undefined); - - double_array_required: Double[]; - double_array_optional_key?: Double[]; - double_array_optional_value: Double[] | null | undefined; - double_array_optional_both?: Double[] | null | undefined; - - float_array_required: Float[]; - float_array_optional_key?: Float[]; - float_array_optional_value: Float[] | null | undefined; - float_array_optional_both?: Float[] | null | undefined; - - int32_array_required: Int32[]; - int32_array_optional_key?: Int32[]; - int32_array_optional_value: Int32[] | null | undefined; - int32_array_optional_both?: Int32[] | null | undefined; - - enum_array_required: ('small' | 'large')[]; - enum_array_optional_key?: ('small' | 'large')[]; - enum_array_optional_value: ('small' | 'large')[] | null | undefined; - enum_array_optional_both?: ('small' | 'large')[] | null | undefined; - - object_array_required: { - boolean_required: boolean; - }[]; - - object_array_optional_key?: { - string_optional_key?: string; - }[]; - - object_array_optional_value: { - float_optional_value: Float | null | undefined; - }[] | null | undefined; - - object_array_optional_both?: { - int32_optional_both?: Int32 | null | undefined; - }[] | null | undefined; - - int32_array_array_required: Int32[][]; - int32_array_array_optional_key?: Int32[][]; - int32_array_array_optional_value: Int32[][] | null | undefined; - int32_array_array_optional_both?: Int32[][] | null | undefined; -`; - -const ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -'use strict'; - -import type { - BubblingEventHandler, - DirectEventHandler, - WithDefault, -} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -export interface ModuleProps extends ViewProps { - // Props - boolean_default_true_optional_both?: WithDefault; - - // Events - onDirectEventDefinedInlineNull: DirectEventHandler; - onBubblingEventDefinedInlineNull: BubblingEventHandler; -} - -export default codegenNativeComponent('Module', { - interfaceOnly: true, - paperComponentName: 'RCTModule', -}) as HostComponent; -`; - -const ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS_NO_CAST = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type { - BubblingEventHandler, - DirectEventHandler, - WithDefault, -} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export interface ModuleProps extends ViewProps { - // Props - boolean_default_true_optional_both?: WithDefault; - - // Events - onDirectEventDefinedInlineNull: DirectEventHandler; - onBubblingEventDefinedInlineNull: BubblingEventHandler; -} - -export default codegenNativeComponent('Module', { - interfaceOnly: true, - excludedPlatforms: ['android'], - paperComponentName: 'RCTModule', -}) as HostComponent; -`; - -const NO_PROPS_EVENTS_ONLY_DEPRECATED_VIEW_CONFIG_NAME_OPTION = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export interface ModuleProps extends ViewProps { - -} - -export default codegenNativeComponent('Module', { - deprecatedViewConfigName: 'DeprecateModuleName', -}) as HostComponent; -`; - -const ALL_PROP_TYPES_NO_EVENTS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32, Double, Float, WithDefault, UnsafeMixed} from 'CodegenTypes'; -import type {ImageSource} from 'ImageSource'; -import type { - ColorValue, - ColorArrayValue, - PointValue, - EdgeInsetsValue, - DimensionValue, -} from 'StyleSheetTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export interface ModuleProps extends ViewProps { - // Props - // Boolean props - boolean_required: boolean; - boolean_optional_key?: WithDefault; - boolean_optional_both?: WithDefault; - - // Boolean props, null default - boolean_null_optional_key?: WithDefault; - boolean_null_optional_both?: WithDefault; - - // String props - string_required: string; - string_optional_key?: WithDefault; - string_optional_both?: WithDefault; - - // String props, null default - string_null_optional_key?: WithDefault; - string_null_optional_both?: WithDefault; - - // Stringish props - stringish_required: Stringish; - stringish_optional_key?: WithDefault; - stringish_optional_both?: WithDefault; - - // Stringish props, null default - stringish_null_optional_key?: WithDefault; - stringish_null_optional_both?: WithDefault; - - // Double props - double_required: Double; - double_optional_key?: WithDefault; - double_optional_both?: WithDefault; - - // Float props - float_required: Float; - float_optional_key?: WithDefault; - float_optional_both?: WithDefault; - - // Float props, null default - float_null_optional_key?: WithDefault; - float_null_optional_both?: WithDefault; - - // Int32 props - int32_required: Int32; - int32_optional_key?: WithDefault; - int32_optional_both?: WithDefault; - - // String enum props - enum_optional_key?: WithDefault<'small' | 'large', 'small'>; - enum_optional_both?: WithDefault<'small' | 'large', 'small'>; - - // Int enum props - int_enum_optional_key?: WithDefault<0 | 1, 0>; - - // Object props - object_optional_key?: Readonly<{prop: string}>; - object_optional_both?: Readonly<{prop: string} | null | undefined>; - object_optional_value: Readonly<{prop: string} | null | undefined>; - - // ImageSource props - image_required: ImageSource; - image_optional_value: ImageSource | null | undefined; - image_optional_both?: ImageSource | null | undefined; - - // ColorValue props - color_required: ColorValue; - color_optional_key?: ColorValue; - color_optional_value: ColorValue | null | undefined; - color_optional_both?: ColorValue | null | undefined; - - // ColorArrayValue props - color_array_required: ColorArrayValue; - color_array_optional_key?: ColorArrayValue; - color_array_optional_value: ColorArrayValue | null | undefined; - color_array_optional_both?: ColorArrayValue | null | undefined; - - // ProcessedColorValue props - processed_color_required: ProcessedColorValue; - processed_color_optional_key?: ProcessedColorValue; - processed_color_optional_value: ProcessedColorValue | null | undefined; - processed_color_optional_both?: ProcessedColorValue | null | undefined; - - // PointValue props - point_required: PointValue; - point_optional_key?: PointValue; - point_optional_value: PointValue | null | undefined; - point_optional_both?: PointValue | null | undefined; - - // EdgeInsets props - insets_required: EdgeInsetsValue; - insets_optional_key?: EdgeInsetsValue; - insets_optional_value: EdgeInsetsValue | null | undefined; - insets_optional_both?: EdgeInsetsValue | null | undefined; - - - // DimensionValue props - dimension_required: DimensionValue; - dimension_optional_key?: DimensionValue; - dimension_optional_value: DimensionValue | null | undefined; - dimension_optional_both?: DimensionValue | null | undefined; - - // Mixed props - mixed_required: UnsafeMixed, - mixed_optional_key?: UnsafeMixed, -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; - -const ARRAY_PROP_TYPES_NO_EVENTS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32, Double, Float, WithDefault} from 'CodegenTypes'; -import type {ImageSource} from 'ImageSource'; -import type { - ColorValue, - ColorArrayValue, - PointValue, - EdgeInsetsValue, - DimensionValue, -} from 'StyleSheetTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -type ObjectType = Readonly<{prop: string}>; -type ArrayObjectType = ReadonlyArray>; - -export interface ModuleProps extends ViewProps { - // Props - // Boolean props - array_boolean_required: ReadonlyArray; - array_boolean_optional_key?: ReadonlyArray; - array_boolean_optional_value: ReadonlyArray | null | undefined; - array_boolean_optional_both?: ReadonlyArray | null | undefined; - - // String props - array_string_required: ReadonlyArray; - array_string_optional_key?: ReadonlyArray; - array_string_optional_value: ReadonlyArray | null | undefined; - array_string_optional_both?: ReadonlyArray | null | undefined; - - // Double props - array_double_required: ReadonlyArray; - array_double_optional_key?: ReadonlyArray; - array_double_optional_value: ReadonlyArray | null | undefined; - array_double_optional_both?: ReadonlyArray | null | undefined; - - // Float props - array_float_required: ReadonlyArray; - array_float_optional_key?: ReadonlyArray; - array_float_optional_value: ReadonlyArray | null | undefined; - array_float_optional_both?: ReadonlyArray | null | undefined; - - // Int32 props - array_int32_required: ReadonlyArray; - array_int32_optional_key?: ReadonlyArray; - array_int32_optional_value: ReadonlyArray | null | undefined; - array_int32_optional_both?: ReadonlyArray | null | undefined; - - // String enum props - array_enum_optional_key?: WithDefault< - ReadonlyArray<'small' | 'large'>, - 'small' - >; - array_enum_optional_both?: WithDefault< - ReadonlyArray<'small' | 'large'>, - 'small' - >; - - // ImageSource props - array_image_required: ReadonlyArray; - array_image_optional_key?: ReadonlyArray; - array_image_optional_value: ReadonlyArray | null | undefined; - array_image_optional_both?: ReadonlyArray | null | undefined; - - // ColorValue props - array_color_required: ReadonlyArray; - array_color_optional_key?: ReadonlyArray; - array_color_optional_value: ReadonlyArray | null | undefined; - array_color_optional_both?: ReadonlyArray | null | undefined; - - // PointValue props - array_point_required: ReadonlyArray; - array_point_optional_key?: ReadonlyArray; - array_point_optional_value: ReadonlyArray | null | undefined; - array_point_optional_both?: ReadonlyArray | null | undefined; - - // EdgeInsetsValue props - array_insets_required: ReadonlyArray; - array_insets_optional_key?: ReadonlyArray; - array_insets_optional_value: ReadonlyArray | null | undefined; - array_insets_optional_both?: ReadonlyArray | null | undefined; - - // DimensionValue props - array_dimension_required: ReadonlyArray; - array_dimension_optional_key?: ReadonlyArray; - array_dimension_optional_value: ReadonlyArray | null | undefined; - array_dimension_optional_both?: ReadonlyArray | null | undefined; - - // Object props - array_object_required: ReadonlyArray>; - array_object_optional_key?: ReadonlyArray>; - array_object_optional_value: ArrayObjectType | null | undefined; - array_object_optional_both?: ReadonlyArray | null | undefined; - - // Nested array object types - array_of_array_object_required: ReadonlyArray< - Readonly<{ - // This needs to be the same name as the top level array above - array_object_required: ReadonlyArray>; - }> - >; - array_of_array_object_optional_key?: ReadonlyArray< - Readonly<{ - // This needs to be the same name as the top level array above - array_object_optional_key: ReadonlyArray>; - }> - >; - array_of_array_object_optional_value: ReadonlyArray< - Readonly<{ - // This needs to be the same name as the top level array above - array_object_optional_value: ReadonlyArray< - Readonly<{prop: string | null | undefined}> - >; - }> - > | null | undefined; - array_of_array_object_optional_both?: ReadonlyArray< - Readonly<{ - // This needs to be the same name as the top level array above - array_object_optional_both: ReadonlyArray< - Readonly<{prop?: string | null | undefined}> - >; - }> - > | null | undefined; - - // Nested array of array of object types - array_of_array_of_object_required: ReadonlyArray< - ReadonlyArray< - Readonly<{ - prop: string; - }> - > - >; - - // Nested array of array of object types (in file) - array_of_array_of_object_required_in_file: ReadonlyArray< - ReadonlyArray - >; - - // Nested array of array of object types (with spread) - array_of_array_of_object_required_with_spread: ReadonlyArray< - ReadonlyArray< - Readonly, - >, - >, -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; - -const ARRAY2_PROP_TYPES_NO_EVENTS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32, Double, Float, WithDefault} from 'CodegenTypes'; -import type {ImageSource} from 'ImageSource'; -import type { - ColorValue, - ColorArrayValue, - PointValue, - EdgeInsetsValue, -} from 'StyleSheetTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -type ObjectType = Readonly<{prop: string}>; -type ArrayObjectType = readonly Readonly<{prop: string}>[]; - -export interface ModuleProps extends ViewProps { - // Props - // Boolean props - array_boolean_required: readonly boolean[]; - array_boolean_optional_key?: readonly boolean[]; - array_boolean_optional_value: readonly boolean[] | null | undefined; - array_boolean_optional_both?: readonly boolean[] | null | undefined; - - // String props - array_string_required: readonly string[]; - array_string_optional_key?: readonly string[]; - array_string_optional_value: readonly string[] | null | undefined; - array_string_optional_both?: readonly string[] | null | undefined; - - // Double props - array_double_required: readonly Double[]; - array_double_optional_key?: readonly Double[]; - array_double_optional_value: readonly Double[] | null | undefined; - array_double_optional_both?: readonly Double[] | null | undefined; - - // Float props - array_float_required: readonly Float[]; - array_float_optional_key?: readonly Float[]; - array_float_optional_value: readonly Float[] | null | undefined; - array_float_optional_both?: readonly Float[] | null | undefined; - - // Int32 props - array_int32_required: readonly Int32[]; - array_int32_optional_key?: readonly Int32[]; - array_int32_optional_value: readonly Int32[] | null | undefined; - array_int32_optional_both?: readonly Int32[] | null | undefined; - - // String enum props - array_enum_optional_key?: WithDefault< - readonly ('small' | 'large')[], - 'small' - >; - array_enum_optional_both?: WithDefault< - readonly ('small' | 'large')[], - 'small' - >; - - // ImageSource props - array_image_required: readonly ImageSource[]; - array_image_optional_key?: readonly ImageSource[]; - array_image_optional_value: readonly ImageSource[] | null | undefined; - array_image_optional_both?: readonly ImageSource[] | null | undefined; - - // ColorValue props - array_color_required: readonly ColorValue[]; - array_color_optional_key?: readonly ColorValue[]; - array_color_optional_value: readonly ColorValue[] | null | undefined; - array_color_optional_both?: readonly ColorValue[] | null | undefined; - - // PointValue props - array_point_required: readonly PointValue[]; - array_point_optional_key?: readonly PointValue[]; - array_point_optional_value: readonly PointValue[] | null | undefined; - array_point_optional_both?: readonly PointValue[] | null | undefined; - - // EdgeInsetsValue props - array_insets_required: readonly EdgeInsetsValue[]; - array_insets_optional_key?: readonly EdgeInsetsValue[]; - array_insets_optional_value: readonly EdgeInsetsValue[] | null | undefined; - array_insets_optional_both?: readonly EdgeInsetsValue[] | null | undefined; - - // Object props - array_object_required: readonly Readonly<{prop: string}>[]; - array_object_optional_key?: readonly Readonly<{prop: string}>[]; - array_object_optional_value: ArrayObjectType | null | undefined; - array_object_optional_both?: readonly ObjectType[] | null | undefined; - - // Nested array object types - array_of_array_object_required: readonly Readonly<{ - // This needs to be the same name as the top level array above - array_object_required: readonly Readonly<{prop: string}>[]; - }>[]; - array_of_array_object_optional_key?: readonly Readonly<{ - // This needs to be the same name as the top level array above - array_object_optional_key: readonly Readonly<{prop?: string}>[]; - }>[]; - array_of_array_object_optional_value: readonly Readonly<{ - // This needs to be the same name as the top level array above - array_object_optional_value: readonly Readonly<{prop: string | null | undefined}>[]; - }>[] | null | undefined; - array_of_array_object_optional_both?: readonly Readonly<{ - // This needs to be the same name as the top level array above - array_object_optional_both: readonly Readonly<{prop?: string | null | undefined}>[]; - }>[] | null | undefined; - - // Nested array of array of object types - array_of_array_of_object_required: readonly Readonly<{ - prop: string; - }>[][]; - - // Nested array of array of object types (in file) - array_of_array_of_object_required_in_file: readonly ObjectType[][]; - - // Nested array of array of object types (with spread) - array_of_array_of_object_required_with_spread: readonly Readonly[][]; -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; - -const OBJECT_PROP_TYPES_NO_EVENTS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32, Double, Float, WithDefault} from 'CodegenTypes'; -import type {ImageSource} from 'ImageSource'; -import type { - ColorValue, - ColorArrayValue, - PointValue, - EdgeInsetsValue, - DimensionValue, -} from 'StyleSheetTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export interface ModuleProps extends ViewProps { - // Props - // Boolean props - boolean_required: Readonly<{prop: boolean}>; - boolean_optional: Readonly<{prop?: WithDefault}>; - - // String props - string_required: Readonly<{prop: string}>; - string_optional: Readonly<{prop?: WithDefault}>; - - // Double props - double_required: Readonly<{prop: Double}>; - double_optional: Readonly<{prop?: WithDefault}>; - - // Float props - float_required: Readonly<{prop: Float}>; - float_optional: Readonly<{prop?: WithDefault}>; - - // Int32 props - int_required: Readonly<{prop: Int32}>; - int_optional: Readonly<{prop?: WithDefault}>; - - // String enum props - enum_optional: Readonly<{ - prop?: WithDefault, 'small'>; - }>; - - // ImageSource props - image_required: Readonly<{prop: ImageSource}>; - image_optional_key: Readonly<{prop?: ImageSource}>; - image_optional_value: Readonly<{prop: ImageSource | null | undefined}>; - image_optional_both: Readonly<{prop?: ImageSource | null | undefined}>; - - // ColorValue props - color_required: Readonly<{prop: ColorValue}>; - color_optional_key: Readonly<{prop?: ColorValue}>; - color_optional_value: Readonly<{prop: ColorValue | null | undefined}>; - color_optional_both: Readonly<{prop?: ColorValue | null | undefined}>; - - // ProcessedColorValue props - processed_color_required: Readonly<{prop: ProcessedColorValue}>; - processed_color_optional_key: Readonly<{prop?: ProcessedColorValue}>; - processed_color_optional_value: Readonly<{ - prop: ProcessedColorValue | null | undefined; - }>; - processed_color_optional_both: Readonly<{ - prop?: ProcessedColorValue | null | undefined; - }>; - - // PointValue props - point_required: Readonly<{prop: PointValue}>; - point_optional_key: Readonly<{prop?: PointValue}>; - point_optional_value: Readonly<{prop: PointValue | null | undefined}>; - point_optional_both: Readonly<{prop?: PointValue | null | undefined}>; - - // EdgeInsetsValue props - insets_required: Readonly<{prop: EdgeInsetsValue}>; - insets_optional_key: Readonly<{prop?: EdgeInsetsValue}>; - insets_optional_value: Readonly<{prop: EdgeInsetsValue | null | undefined}>; - insets_optional_both: Readonly<{prop?: EdgeInsetsValue | null | undefined}>; - - // DimensionValue props - dimension_required: Readonly<{prop: DimensionValue}>; - dimension_optional_key: Readonly<{prop?: DimensionValue}>; - dimension_optional_value: Readonly<{prop: DimensionValue | null | undefined}>; - dimension_optional_both: Readonly<{prop?: DimensionValue | null | undefined}>; - - // Nested object props - object_required: Readonly<{prop: Readonly<{nestedProp: string}>}>; - object_optional_key?: Readonly<{prop: Readonly<{nestedProp: string}>}>; - object_optional_value: Readonly<{ - prop: Readonly<{nestedProp: string}>; - }> | null | undefined; - object_optional_both?: Readonly<{ - prop: Readonly<{nestedProp: string}>; - }> | null | undefined; -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; - -const PROPS_ALIASED_LOCALLY = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -'use strict'; - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -type DeepSpread = Readonly<{ - otherStringProp: string; -}>; - -export interface PropsInFile extends DeepSpread { - isEnabled: boolean; - label: string; -} - -type ReadOnlyPropsInFile = Readonly; - -export interface ModuleProps extends ViewProps, ReadOnlyPropsInFile { - localType: ReadOnlyPropsInFile; - localArr: ReadonlyArray; -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; - -const EVENTS_DEFINED_INLINE_WITH_ALL_TYPES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {HostComponent} from 'react-native'; -const codegenNativeComponent = require('codegenNativeComponent'); - -import type { - Int32, - Double, - Float, - BubblingEventHandler, - DirectEventHandler, -} from 'CodegenTypes'; - -import type {ViewProps} from 'ViewPropTypes'; - -export interface ModuleProps extends ViewProps { - // No Props - - // Events - onDirectEventDefinedInline: DirectEventHandler< - Readonly<{ - ${EVENT_DEFINITION} - }> - >; - - onDirectEventDefinedInlineOptionalKey?: (DirectEventHandler< - Readonly<{ - ${EVENT_DEFINITION} - }> - >); - - onDirectEventDefinedInlineOptionalValue: (DirectEventHandler< - Readonly<{ - ${EVENT_DEFINITION} - }> - >) | null | undefined; - - onDirectEventDefinedInlineOptionalBoth?: (DirectEventHandler< - Readonly<{ - ${EVENT_DEFINITION} - }> - > | null | undefined); - - onDirectEventDefinedInlineWithPaperName?: DirectEventHandler< - Readonly<{ - ${EVENT_DEFINITION} - }>, - 'paperDirectEventDefinedInlineWithPaperName' - > | null | undefined; - - onBubblingEventDefinedInline: BubblingEventHandler< - Readonly<{ - ${EVENT_DEFINITION} - }> - >; - - onBubblingEventDefinedInlineOptionalKey?: BubblingEventHandler< - Readonly<{ - ${EVENT_DEFINITION} - }> - >; - - onBubblingEventDefinedInlineOptionalValue: BubblingEventHandler< - Readonly<{ - ${EVENT_DEFINITION} - }> - > | null | undefined; - - onBubblingEventDefinedInlineOptionalBoth?: BubblingEventHandler< - Readonly<{ - ${EVENT_DEFINITION} - }> - > | null | undefined; - - onBubblingEventDefinedInlineWithPaperName?: BubblingEventHandler< - Readonly<{ - ${EVENT_DEFINITION} - }>, - 'paperBubblingEventDefinedInlineWithPaperName' - > | null | undefined; -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; - -const EVENTS_DEFINED_AS_NULL_INLINE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -'use strict'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {BubblingEventHandler, DirectEventHandler} from 'CodegenTypese'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export interface ModuleProps extends ViewProps { - // No props - - // Events defined inline - onDirectEventDefinedInlineNull: DirectEventHandler; - onDirectEventDefinedInlineNullOptionalKey?: DirectEventHandler; - onDirectEventDefinedInlineNullOptionalValue: DirectEventHandler | null | undefined; - onDirectEventDefinedInlineNullOptionalBoth?: DirectEventHandler; - onDirectEventDefinedInlineNullWithPaperName?: DirectEventHandler< - null, - 'paperDirectEventDefinedInlineNullWithPaperName' - > | null | undefined; - - onBubblingEventDefinedInlineNull: BubblingEventHandler; - onBubblingEventDefinedInlineNullOptionalKey?: BubblingEventHandler; - onBubblingEventDefinedInlineNullOptionalValue: BubblingEventHandler | null | undefined; - onBubblingEventDefinedInlineNullOptionalBoth?: BubblingEventHandler | null | undefined; - onBubblingEventDefinedInlineNullWithPaperName?: BubblingEventHandler< - undefined, - 'paperBubblingEventDefinedInlineNullWithPaperName' - > | null | undefined; -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; - -const PROPS_AND_EVENTS_TYPES_EXPORTED = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; -import type { - BubblingEventHandler, - DirectEventHandler, -} from 'CodegenTypes'; - -export type EventInFile = Readonly<{ - ${EVENT_DEFINITION} -}>; - -export interface ModuleProps extends ViewProps { - // No props - - // Events defined inline - onBubblingEventDefinedInline: BubblingEventHandler; - onBubblingEventDefinedInlineWithPaperName: BubblingEventHandler< - EventInFile, - 'paperBubblingEventDefinedInlineWithPaperName' - >; - onDirectEventDefinedInline: DirectEventHandler; - onDirectEventDefinedInlineWithPaperName: DirectEventHandler< - EventInFile, - 'paperDirectEventDefinedInlineWithPaperName' - >; -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; - -const PROPS_AS_EXTERNAL_TYPES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {HostComponent} from 'react-native'; - -export type String = string; -export type AnotherArray = ReadonlyArray; - -export interface ModuleProps { - disable: String; - array: AnotherArray; -} - -export default codegenNativeComponent( - 'Module', -) as HostComponent; -`; - -const COMMANDS_DEFINED_WITH_ALL_TYPES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - - const codegenNativeCommands = require('codegenNativeCommands'); - const codegenNativeComponent = require('codegenNativeComponent'); - - import type {Int32, Double, Float} from 'CodegenTypes'; - import type {RootTag} from 'RCTExport'; - import type {ViewProps} from 'ViewPropTypes'; - import type {HostComponent} from 'react-native'; - - -export interface ModuleProps extends ViewProps { - // No props or events -} - -type NativeType = HostComponent; - - interface NativeCommands { - readonly handleRootTag: (viewRef: React.ElementRef, rootTag: RootTag) => void; - readonly hotspotUpdate: (viewRef: React.ElementRef, x: Int32, y: Int32) => void; - scrollTo( - viewRef: React.ElementRef, - x: Float, - y: Int32, - z: Double, - animated: boolean, - ): void; - } - - export const Commands = codegenNativeCommands({ - supportedCommands: ['handleRootTag', 'hotspotUpdate', 'scrollTo'], - }); - -export default codegenNativeComponent( - 'Module', -) as NativeType; -`; - -const COMMANDS_WITH_EXTERNAL_TYPES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -const codegenNativeCommands = require('codegenNativeCommands'); -const codegenNativeComponent = require('codegenNativeComponent'); - -import type {Int32} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -export type Boolean = boolean; -export type Int = Int32; -export type Void = void; - -export interface ModuleProps extends ViewProps { - // No props or events -} - -type NativeType = HostComponent; - -export type ScrollTo = ( - viewRef: React.ElementRef, - y: Int, - animated: Boolean, -) => Void; -export type AddOverlays = ( - viewRef: React.ElementRef, - overlayColorsReadOnly: ReadOnlyArray, - overlayColorsArray: Array, - overlayColorsArrayAnnotation: string[], -) => Void; - -interface NativeCommands { - readonly scrollTo: ScrollTo; - readonly addOverlays: AddOverlays; -} - -export const Commands = codegenNativeCommands({ - supportedCommands: ['scrollTo', 'addOverlays'], -}); - -export default codegenNativeComponent('Module') as NativeType; - -`; - -const COMMANDS_EVENTS_TYPES_EXPORTED = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type { - BubblingEventHandler, - DirectEventHandler, -} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -export type EventInFile = Readonly<{ - ${EVENT_DEFINITION} -}>; - -export type Boolean = boolean; -export type Int = Int32; -export type Void = void; - -export interface ModuleProps extends ViewProps { - // No props - - // Events defined inline - onBubblingEventDefinedInline: BubblingEventHandler, - onBubblingEventDefinedInlineWithPaperName: BubblingEventHandler, - onDirectEventDefinedInline: DirectEventHandler, - onDirectEventDefinedInlineWithPaperName: DirectEventHandler, -} - -// Add state here -export interface ModuleNativeState { - boolean_required: boolean, - boolean_optional_key?: WithDefault, - boolean_optional_both?: WithDefault, -} - -type NativeType = HostComponent; - -export type ScrollTo = (viewRef: React.ElementRef, y: Int, animated: Boolean) => Void; - -interface NativeCommands { - readonly scrollTo: ScrollTo; -} - -export const Commands = codegenNativeCommands({ - supportedCommands: ['scrollTo'] -}); - -export default codegenNativeComponent( - 'Module', -) as NativeType; -`; - -const PROPS_AND_EVENTS_WITH_INTERFACES = ` -import type { - BubblingEventHandler, - DirectEventHandler, - Int32, -} from 'CodegenTypes'; -import type {ViewProps} from 'ViewPropTypes'; -import type {HostComponent} from 'react-native'; - -const codegenNativeComponent = require('codegenNativeComponent'); - -export interface Base1 { - readonly x: string; -} - -export interface Base2 { - readonly y: Int32; -} - -export interface Derived extends Base1, Base2 { - readonly z: boolean; -} - -export interface ModuleProps extends ViewProps { - // Props - ordinary_prop: Derived; - readonly_prop: Readonly; - ordinary_array_prop?: readonly Derived[]; - readonly_array_prop?: readonly Readonly[]; - ordinary_nested_array_prop?: readonly Derived[][]; - readonly_nested_array_prop?: readonly Readonly[][]; - - // Events - onDirect: DirectEventHandler; - onBubbling: BubblingEventHandler>; -} - -export default codegenNativeComponent('Module', { - interfaceOnly: true, - paperComponentName: 'RCTModule', -}) as HostComponent; -`; - -module.exports = { - ALL_PROP_TYPES_NO_EVENTS, - ARRAY_PROP_TYPES_NO_EVENTS, - ARRAY2_PROP_TYPES_NO_EVENTS, - OBJECT_PROP_TYPES_NO_EVENTS, - PROPS_ALIASED_LOCALLY, - ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS, - ONE_OF_EACH_PROP_EVENT_DEFAULT_AND_OPTIONS_NO_CAST, - NO_PROPS_EVENTS_ONLY_DEPRECATED_VIEW_CONFIG_NAME_OPTION, - EVENTS_DEFINED_INLINE_WITH_ALL_TYPES, - EVENTS_DEFINED_AS_NULL_INLINE, - PROPS_AND_EVENTS_TYPES_EXPORTED, - COMMANDS_EVENTS_TYPES_EXPORTED, - COMMANDS_DEFINED_WITH_ALL_TYPES, - PROPS_AS_EXTERNAL_TYPES, - COMMANDS_WITH_EXTERNAL_TYPES, - PROPS_AND_EVENTS_WITH_INTERFACES, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/typescript/components/commands.js b/node_modules/@react-native/codegen/lib/parsers/typescript/components/commands.js deleted file mode 100644 index 9c76cd653..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/typescript/components/commands.js +++ /dev/null @@ -1,143 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('../parseTopLevelType'), - parseTopLevelType = _require.parseTopLevelType; -const _require2 = require('./componentsUtils'), - getPrimitiveTypeAnnotation = _require2.getPrimitiveTypeAnnotation; - -// $FlowFixMe[unclear-type] there's no flowtype for ASTs - -function buildCommandSchemaInternal(name, optional, parameters, types) { - var _firstParam$typeAnnot, _firstParam$typeAnnot2; - const firstParam = parameters[0].typeAnnotation; - if ( - !( - firstParam.typeAnnotation != null && - firstParam.typeAnnotation.type === 'TSTypeReference' && - ((_firstParam$typeAnnot = firstParam.typeAnnotation.typeName.left) === - null || _firstParam$typeAnnot === void 0 - ? void 0 - : _firstParam$typeAnnot.name) === 'React' && - ((_firstParam$typeAnnot2 = firstParam.typeAnnotation.typeName.right) === - null || _firstParam$typeAnnot2 === void 0 - ? void 0 - : _firstParam$typeAnnot2.name) === 'ElementRef' - ) - ) { - throw new Error( - `The first argument of method ${name} must be of type React.ElementRef<>`, - ); - } - const params = parameters.slice(1).map(param => { - const paramName = param.name; - const paramValue = parseTopLevelType( - param.typeAnnotation.typeAnnotation, - types, - ).type; - const type = - paramValue.type === 'TSTypeReference' - ? paramValue.typeName.name - : paramValue.type; - let returnType; - switch (type) { - case 'RootTag': - returnType = { - type: 'ReservedTypeAnnotation', - name: 'RootTag', - }; - break; - case 'TSBooleanKeyword': - case 'Int32': - case 'Double': - case 'Float': - case 'TSStringKeyword': - returnType = getPrimitiveTypeAnnotation(type); - break; - case 'Array': - case 'ReadOnlyArray': - if (!paramValue.type === 'TSTypeReference') { - throw new Error( - 'Array and ReadOnlyArray are TSTypeReference for array', - ); - } - returnType = { - type: 'ArrayTypeAnnotation', - elementType: getPrimitiveTypeAnnotation( - // TODO: T172453752 support complex type annotation for array element - paramValue.typeParameters.params[0].type, - ), - }; - break; - case 'TSArrayType': - returnType = { - type: 'ArrayTypeAnnotation', - elementType: { - // TODO: T172453752 support complex type annotation for array element - type: getPrimitiveTypeAnnotation(paramValue.elementType.type).type, - }, - }; - break; - default: - type; - throw new Error( - `Unsupported param type for method "${name}", param "${paramName}". Found ${type}`, - ); - } - return { - name: paramName, - optional: false, - typeAnnotation: returnType, - }; - }); - return { - name, - optional, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - params, - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - }, - }; -} -function buildCommandSchema(property, types) { - if (property.type === 'TSPropertySignature') { - const topLevelType = parseTopLevelType( - property.typeAnnotation.typeAnnotation, - types, - ); - const name = property.key.name; - const optional = property.optional || topLevelType.optional; - const parameters = topLevelType.type.parameters || topLevelType.type.params; - return buildCommandSchemaInternal(name, optional, parameters, types); - } else { - const name = property.key.name; - const optional = property.optional || false; - const parameters = property.parameters || property.params; - return buildCommandSchemaInternal(name, optional, parameters, types); - } -} -function getCommands(commandTypeAST, types) { - return commandTypeAST - .filter( - property => - property.type === 'TSPropertySignature' || - property.type === 'TSMethodSignature', - ) - .map(property => buildCommandSchema(property, types)) - .filter(Boolean); -} -module.exports = { - getCommands, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/typescript/components/commands.js.flow b/node_modules/@react-native/codegen/lib/parsers/typescript/components/commands.js.flow deleted file mode 100644 index 882f7002d..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/typescript/components/commands.js.flow +++ /dev/null @@ -1,160 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type { - CommandTypeAnnotation, - NamedShape, -} from '../../../CodegenSchema.js'; -import type {TypeDeclarationMap} from '../../utils'; - -const {parseTopLevelType} = require('../parseTopLevelType'); -const {getPrimitiveTypeAnnotation} = require('./componentsUtils'); - -// $FlowFixMe[unclear-type] there's no flowtype for ASTs -type EventTypeAST = Object; - -function buildCommandSchemaInternal( - name: string, - optional: boolean, - parameters: Array<$FlowFixMe>, - types: TypeDeclarationMap, -): NamedShape { - const firstParam = parameters[0].typeAnnotation; - if ( - !( - firstParam.typeAnnotation != null && - firstParam.typeAnnotation.type === 'TSTypeReference' && - firstParam.typeAnnotation.typeName.left?.name === 'React' && - firstParam.typeAnnotation.typeName.right?.name === 'ElementRef' - ) - ) { - throw new Error( - `The first argument of method ${name} must be of type React.ElementRef<>`, - ); - } - - const params = parameters.slice(1).map(param => { - const paramName = param.name; - const paramValue = parseTopLevelType( - param.typeAnnotation.typeAnnotation, - types, - ).type; - - const type = - paramValue.type === 'TSTypeReference' - ? paramValue.typeName.name - : paramValue.type; - let returnType; - - switch (type) { - case 'RootTag': - returnType = { - type: 'ReservedTypeAnnotation', - name: 'RootTag', - }; - break; - case 'TSBooleanKeyword': - case 'Int32': - case 'Double': - case 'Float': - case 'TSStringKeyword': - returnType = getPrimitiveTypeAnnotation(type); - break; - case 'Array': - case 'ReadOnlyArray': - if (!paramValue.type === 'TSTypeReference') { - throw new Error( - 'Array and ReadOnlyArray are TSTypeReference for array', - ); - } - returnType = { - type: 'ArrayTypeAnnotation', - elementType: getPrimitiveTypeAnnotation( - // TODO: T172453752 support complex type annotation for array element - paramValue.typeParameters.params[0].type, - ), - }; - break; - case 'TSArrayType': - returnType = { - type: 'ArrayTypeAnnotation', - elementType: { - // TODO: T172453752 support complex type annotation for array element - type: getPrimitiveTypeAnnotation(paramValue.elementType.type).type, - }, - }; - break; - default: - (type: empty); - throw new Error( - `Unsupported param type for method "${name}", param "${paramName}". Found ${type}`, - ); - } - - return { - name: paramName, - optional: false, - typeAnnotation: returnType, - }; - }); - - return { - name, - optional, - typeAnnotation: { - type: 'FunctionTypeAnnotation', - params, - returnTypeAnnotation: { - type: 'VoidTypeAnnotation', - }, - }, - }; -} - -function buildCommandSchema( - property: EventTypeAST, - types: TypeDeclarationMap, -): NamedShape { - if (property.type === 'TSPropertySignature') { - const topLevelType = parseTopLevelType( - property.typeAnnotation.typeAnnotation, - types, - ); - const name = property.key.name; - const optional = property.optional || topLevelType.optional; - const parameters = topLevelType.type.parameters || topLevelType.type.params; - return buildCommandSchemaInternal(name, optional, parameters, types); - } else { - const name = property.key.name; - const optional = property.optional || false; - const parameters = property.parameters || property.params; - return buildCommandSchemaInternal(name, optional, parameters, types); - } -} - -function getCommands( - commandTypeAST: $ReadOnlyArray, - types: TypeDeclarationMap, -): $ReadOnlyArray> { - return commandTypeAST - .filter( - property => - property.type === 'TSPropertySignature' || - property.type === 'TSMethodSignature', - ) - .map(property => buildCommandSchema(property, types)) - .filter(Boolean); -} - -module.exports = { - getCommands, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/typescript/components/componentsUtils.js b/node_modules/@react-native/codegen/lib/parsers/typescript/components/componentsUtils.js deleted file mode 100644 index 348305582..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/typescript/components/componentsUtils.js +++ /dev/null @@ -1,490 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('../../parsers-commons'), - verifyPropNotAlreadyDefined = _require.verifyPropNotAlreadyDefined; -const _require2 = require('../parseTopLevelType'), - flattenIntersectionType = _require2.flattenIntersectionType, - parseTopLevelType = _require2.parseTopLevelType; -function getUnionOfLiterals(name, forArray, elementTypes, defaultValue, types) { - var _elementTypes$0$liter, _elementTypes$0$liter2; - elementTypes.reduce((lastType, currType) => { - const lastFlattenedType = - lastType && lastType.type === 'TSLiteralType' - ? lastType.literal.type - : lastType.type; - const currFlattenedType = - currType.type === 'TSLiteralType' ? currType.literal.type : currType.type; - if (lastFlattenedType && currFlattenedType !== lastFlattenedType) { - throw new Error(`Mixed types are not supported (see "${name}")`); - } - return currType; - }); - if (defaultValue === undefined) { - throw new Error(`A default enum value is required for "${name}"`); - } - const unionType = elementTypes[0].type; - if ( - unionType === 'TSLiteralType' && - ((_elementTypes$0$liter = elementTypes[0].literal) === null || - _elementTypes$0$liter === void 0 - ? void 0 - : _elementTypes$0$liter.type) === 'StringLiteral' - ) { - return { - type: 'StringEnumTypeAnnotation', - default: defaultValue, - options: elementTypes.map(option => option.literal.value), - }; - } else if ( - unionType === 'TSLiteralType' && - ((_elementTypes$0$liter2 = elementTypes[0].literal) === null || - _elementTypes$0$liter2 === void 0 - ? void 0 - : _elementTypes$0$liter2.type) === 'NumericLiteral' - ) { - if (forArray) { - throw new Error(`Arrays of int enums are not supported (see: "${name}")`); - } else { - return { - type: 'Int32EnumTypeAnnotation', - default: defaultValue, - options: elementTypes.map(option => option.literal.value), - }; - } - } else { - var _elementTypes$0$liter3; - throw new Error( - `Unsupported union type for "${name}", received "${ - unionType === 'TSLiteralType' - ? (_elementTypes$0$liter3 = elementTypes[0].literal) === null || - _elementTypes$0$liter3 === void 0 - ? void 0 - : _elementTypes$0$liter3.type - : unionType - }"`, - ); - } -} -function detectArrayType( - name, - typeAnnotation, - defaultValue, - types, - parser, - buildSchema, -) { - // Covers: readonly T[] - if ( - typeAnnotation.type === 'TSTypeOperator' && - typeAnnotation.operator === 'readonly' && - typeAnnotation.typeAnnotation.type === 'TSArrayType' - ) { - return { - type: 'ArrayTypeAnnotation', - elementType: getTypeAnnotationForArray( - name, - typeAnnotation.typeAnnotation.elementType, - defaultValue, - types, - parser, - buildSchema, - ), - }; - } - - // Covers: T[] - if (typeAnnotation.type === 'TSArrayType') { - return { - type: 'ArrayTypeAnnotation', - elementType: getTypeAnnotationForArray( - name, - typeAnnotation.elementType, - defaultValue, - types, - parser, - buildSchema, - ), - }; - } - - // Covers: Array and ReadonlyArray - if ( - typeAnnotation.type === 'TSTypeReference' && - (parser.getTypeAnnotationName(typeAnnotation) === 'ReadonlyArray' || - parser.getTypeAnnotationName(typeAnnotation) === 'Array') - ) { - return { - type: 'ArrayTypeAnnotation', - elementType: getTypeAnnotationForArray( - name, - typeAnnotation.typeParameters.params[0], - defaultValue, - types, - parser, - buildSchema, - ), - }; - } - return null; -} -function buildObjectType(rawProperties, types, parser, buildSchema) { - const flattenedProperties = flattenProperties(rawProperties, types, parser); - const properties = flattenedProperties - .map(prop => buildSchema(prop, types, parser)) - .filter(Boolean); - return { - type: 'ObjectTypeAnnotation', - properties, - }; -} -function getPrimitiveTypeAnnotation(type) { - switch (type) { - case 'Int32': - return { - type: 'Int32TypeAnnotation', - }; - case 'Double': - return { - type: 'DoubleTypeAnnotation', - }; - case 'Float': - return { - type: 'FloatTypeAnnotation', - }; - case 'TSBooleanKeyword': - return { - type: 'BooleanTypeAnnotation', - }; - case 'Stringish': - case 'TSStringKeyword': - return { - type: 'StringTypeAnnotation', - }; - default: - throw new Error(`Unknown primitive type "${type}"`); - } -} -function getCommonTypeAnnotation( - name, - forArray, - type, - typeAnnotation, - defaultValue, - types, - parser, - buildSchema, -) { - switch (type) { - case 'TSTypeLiteral': - return buildObjectType( - typeAnnotation.members, - types, - parser, - buildSchema, - ); - case 'TSInterfaceDeclaration': - return buildObjectType([typeAnnotation], types, parser, buildSchema); - case 'TSIntersectionType': - return buildObjectType( - flattenIntersectionType(typeAnnotation, types), - types, - parser, - buildSchema, - ); - case 'ImageSource': - return { - type: 'ReservedPropTypeAnnotation', - name: 'ImageSourcePrimitive', - }; - case 'ImageRequest': - return { - type: 'ReservedPropTypeAnnotation', - name: 'ImageRequestPrimitive', - }; - case 'ColorValue': - case 'ProcessedColorValue': - return { - type: 'ReservedPropTypeAnnotation', - name: 'ColorPrimitive', - }; - case 'PointValue': - return { - type: 'ReservedPropTypeAnnotation', - name: 'PointPrimitive', - }; - case 'EdgeInsetsValue': - return { - type: 'ReservedPropTypeAnnotation', - name: 'EdgeInsetsPrimitive', - }; - case 'DimensionValue': - return { - type: 'ReservedPropTypeAnnotation', - name: 'DimensionPrimitive', - }; - case 'TSUnionType': - return getUnionOfLiterals( - name, - forArray, - typeAnnotation.types, - defaultValue, - types, - ); - case 'Int32': - case 'Double': - case 'Float': - case 'TSBooleanKeyword': - case 'Stringish': - case 'TSStringKeyword': - return getPrimitiveTypeAnnotation(type); - case 'UnsafeMixed': - return { - type: 'MixedTypeAnnotation', - }; - default: - return undefined; - } -} -function getTypeAnnotationForArray( - name, - typeAnnotation, - defaultValue, - types, - parser, - buildSchema, -) { - var _extractedTypeAnnotat, _extractedTypeAnnotat2; - // unpack WithDefault, (T) or T|U - const topLevelType = parseTopLevelType(typeAnnotation, types); - if (topLevelType.defaultValue !== undefined) { - throw new Error( - 'Nested optionals such as "ReadonlyArray" are not supported, please declare optionals at the top level of value definitions as in "ReadonlyArray | null | undefined"', - ); - } - if (topLevelType.optional) { - throw new Error( - 'Nested optionals such as "ReadonlyArray" are not supported, please declare optionals at the top level of value definitions as in "ReadonlyArray | null | undefined"', - ); - } - const extractedTypeAnnotation = topLevelType.type; - const arrayType = detectArrayType( - name, - extractedTypeAnnotation, - defaultValue, - types, - parser, - buildSchema, - ); - if (arrayType) { - if (arrayType.elementType.type !== 'ObjectTypeAnnotation') { - throw new Error( - `Only array of array of object is supported for "${name}".`, - ); - } - return arrayType; - } - const type = - extractedTypeAnnotation.elementType === 'TSTypeReference' - ? extractedTypeAnnotation.elementType.typeName.name - : ((_extractedTypeAnnotat = extractedTypeAnnotation.elementType) === - null || _extractedTypeAnnotat === void 0 - ? void 0 - : _extractedTypeAnnotat.type) || - ((_extractedTypeAnnotat2 = extractedTypeAnnotation.typeName) === null || - _extractedTypeAnnotat2 === void 0 - ? void 0 - : _extractedTypeAnnotat2.name) || - extractedTypeAnnotation.type; - const common = getCommonTypeAnnotation( - name, - true, - type, - extractedTypeAnnotation, - defaultValue, - types, - parser, - buildSchema, - ); - if (common) { - return common; - } - switch (type) { - case 'TSNumberKeyword': - return { - type: 'FloatTypeAnnotation', - }; - default: - type; - throw new Error(`Unknown prop type for "${name}": ${type}`); - } -} -function setDefaultValue(common, defaultValue) { - switch (common.type) { - case 'Int32TypeAnnotation': - case 'DoubleTypeAnnotation': - common.default = defaultValue ? defaultValue : 0; - break; - case 'FloatTypeAnnotation': - common.default = - defaultValue === null ? null : defaultValue ? defaultValue : 0; - break; - case 'BooleanTypeAnnotation': - common.default = defaultValue === null ? null : !!defaultValue; - break; - case 'StringTypeAnnotation': - common.default = defaultValue === undefined ? null : defaultValue; - break; - } -} -function getTypeAnnotation( - name, - annotation, - defaultValue, - withNullDefault, - // Just to make `getTypeAnnotation` signature match with the one from Flow - types, - parser, - buildSchema, -) { - // unpack WithDefault, (T) or T|U - const topLevelType = parseTopLevelType(annotation, types); - const typeAnnotation = topLevelType.type; - const arrayType = detectArrayType( - name, - typeAnnotation, - defaultValue, - types, - parser, - buildSchema, - ); - if (arrayType) { - return arrayType; - } - const type = - typeAnnotation.type === 'TSTypeReference' || - typeAnnotation.type === 'TSTypeAliasDeclaration' - ? parser.getTypeAnnotationName(typeAnnotation) - : typeAnnotation.type; - const common = getCommonTypeAnnotation( - name, - false, - type, - typeAnnotation, - defaultValue, - types, - parser, - buildSchema, - ); - if (common) { - setDefaultValue(common, defaultValue); - return common; - } - switch (type) { - case 'ColorArrayValue': - return { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ReservedPropTypeAnnotation', - name: 'ColorPrimitive', - }, - }; - case 'TSNumberKeyword': - throw new Error( - `Cannot use "${type}" type annotation for "${name}": must use a specific numeric type like Int32, Double, or Float`, - ); - case 'TSFunctionType': - throw new Error( - `Cannot use "${type}" type annotation for "${name}": must use a specific function type like BubblingEventHandler, or DirectEventHandler`, - ); - default: - throw new Error(`Unknown prop type for "${name}": "${type}"`); - } -} -function getSchemaInfo(property, types) { - // unpack WithDefault, (T) or T|U - const topLevelType = parseTopLevelType( - property.typeAnnotation.typeAnnotation, - types, - ); - const name = property.key.name; - if (!property.optional && topLevelType.defaultValue !== undefined) { - throw new Error( - `key ${name} must be optional if used with WithDefault<> annotation`, - ); - } - return { - name, - optional: property.optional || topLevelType.optional, - typeAnnotation: topLevelType.type, - defaultValue: topLevelType.defaultValue, - withNullDefault: false, // Just to make `getTypeAnnotation` signature match with the one from Flow - }; -} - -function flattenProperties(typeDefinition, types, parser) { - return typeDefinition - .map(property => { - if (property.type === 'TSPropertySignature') { - return property; - } else if (property.type === 'TSTypeReference') { - return flattenProperties( - parser.getProperties(property.typeName.name, types), - types, - parser, - ); - } else if ( - property.type === 'TSExpressionWithTypeArguments' || - property.type === 'TSInterfaceHeritage' - ) { - return flattenProperties( - parser.getProperties(property.expression.name, types), - types, - parser, - ); - } else if (property.type === 'TSTypeLiteral') { - return flattenProperties(property.members, types, parser); - } else if (property.type === 'TSInterfaceDeclaration') { - return flattenProperties( - parser.getProperties(property.id.name, types), - types, - parser, - ); - } else if (property.type === 'TSIntersectionType') { - return flattenProperties(property.types, types, parser); - } else { - throw new Error( - `${property.type} is not a supported object literal type.`, - ); - } - }) - .filter(Boolean) - .reduce((acc, item) => { - if (Array.isArray(item)) { - item.forEach(prop => { - verifyPropNotAlreadyDefined(acc, prop); - }); - return acc.concat(item); - } else { - verifyPropNotAlreadyDefined(acc, item); - acc.push(item); - return acc; - } - }, []) - .filter(Boolean); -} -module.exports = { - getSchemaInfo, - getTypeAnnotation, - getPrimitiveTypeAnnotation, - flattenProperties, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/typescript/components/componentsUtils.js.flow b/node_modules/@react-native/codegen/lib/parsers/typescript/components/componentsUtils.js.flow deleted file mode 100644 index f6eb2f120..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/typescript/components/componentsUtils.js.flow +++ /dev/null @@ -1,533 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type {BuildSchemaFN, Parser} from '../../parser'; -import type {ASTNode, PropAST, TypeDeclarationMap} from '../../utils'; - -const {verifyPropNotAlreadyDefined} = require('../../parsers-commons'); -const { - flattenIntersectionType, - parseTopLevelType, -} = require('../parseTopLevelType'); - -function getUnionOfLiterals( - name: string, - forArray: boolean, - elementTypes: $FlowFixMe[], - defaultValue: $FlowFixMe | void, - types: TypeDeclarationMap, -) { - elementTypes.reduce((lastType, currType) => { - const lastFlattenedType = - lastType && lastType.type === 'TSLiteralType' - ? lastType.literal.type - : lastType.type; - const currFlattenedType = - currType.type === 'TSLiteralType' ? currType.literal.type : currType.type; - - if (lastFlattenedType && currFlattenedType !== lastFlattenedType) { - throw new Error(`Mixed types are not supported (see "${name}")`); - } - return currType; - }); - - if (defaultValue === undefined) { - throw new Error(`A default enum value is required for "${name}"`); - } - - const unionType = elementTypes[0].type; - if ( - unionType === 'TSLiteralType' && - elementTypes[0].literal?.type === 'StringLiteral' - ) { - return { - type: 'StringEnumTypeAnnotation', - default: (defaultValue: string), - options: elementTypes.map(option => option.literal.value), - }; - } else if ( - unionType === 'TSLiteralType' && - elementTypes[0].literal?.type === 'NumericLiteral' - ) { - if (forArray) { - throw new Error(`Arrays of int enums are not supported (see: "${name}")`); - } else { - return { - type: 'Int32EnumTypeAnnotation', - default: (defaultValue: number), - options: elementTypes.map(option => option.literal.value), - }; - } - } else { - throw new Error( - `Unsupported union type for "${name}", received "${ - unionType === 'TSLiteralType' - ? elementTypes[0].literal?.type - : unionType - }"`, - ); - } -} - -function detectArrayType( - name: string, - typeAnnotation: $FlowFixMe | ASTNode, - defaultValue: $FlowFixMe | void, - types: TypeDeclarationMap, - parser: Parser, - buildSchema: BuildSchemaFN, -): $FlowFixMe { - // Covers: readonly T[] - if ( - typeAnnotation.type === 'TSTypeOperator' && - typeAnnotation.operator === 'readonly' && - typeAnnotation.typeAnnotation.type === 'TSArrayType' - ) { - return { - type: 'ArrayTypeAnnotation', - elementType: getTypeAnnotationForArray( - name, - typeAnnotation.typeAnnotation.elementType, - defaultValue, - types, - parser, - buildSchema, - ), - }; - } - - // Covers: T[] - if (typeAnnotation.type === 'TSArrayType') { - return { - type: 'ArrayTypeAnnotation', - elementType: getTypeAnnotationForArray( - name, - typeAnnotation.elementType, - defaultValue, - types, - parser, - buildSchema, - ), - }; - } - - // Covers: Array and ReadonlyArray - if ( - typeAnnotation.type === 'TSTypeReference' && - (parser.getTypeAnnotationName(typeAnnotation) === 'ReadonlyArray' || - parser.getTypeAnnotationName(typeAnnotation) === 'Array') - ) { - return { - type: 'ArrayTypeAnnotation', - elementType: getTypeAnnotationForArray( - name, - typeAnnotation.typeParameters.params[0], - defaultValue, - types, - parser, - buildSchema, - ), - }; - } - - return null; -} - -function buildObjectType( - rawProperties: Array<$FlowFixMe>, - types: TypeDeclarationMap, - parser: Parser, - buildSchema: BuildSchemaFN, -): $FlowFixMe { - const flattenedProperties = flattenProperties(rawProperties, types, parser); - const properties = flattenedProperties - .map(prop => buildSchema(prop, types, parser)) - .filter(Boolean); - - return { - type: 'ObjectTypeAnnotation', - properties, - }; -} - -function getPrimitiveTypeAnnotation(type: string): $FlowFixMe { - switch (type) { - case 'Int32': - return { - type: 'Int32TypeAnnotation', - }; - case 'Double': - return { - type: 'DoubleTypeAnnotation', - }; - case 'Float': - return { - type: 'FloatTypeAnnotation', - }; - case 'TSBooleanKeyword': - return { - type: 'BooleanTypeAnnotation', - }; - case 'Stringish': - case 'TSStringKeyword': - return { - type: 'StringTypeAnnotation', - }; - default: - throw new Error(`Unknown primitive type "${type}"`); - } -} - -function getCommonTypeAnnotation( - name: string, - forArray: boolean, - type: string, - typeAnnotation: $FlowFixMe, - defaultValue: $FlowFixMe | void, - types: TypeDeclarationMap, - parser: Parser, - buildSchema: BuildSchemaFN, -): $FlowFixMe { - switch (type) { - case 'TSTypeLiteral': - return buildObjectType( - typeAnnotation.members, - types, - parser, - buildSchema, - ); - case 'TSInterfaceDeclaration': - return buildObjectType([typeAnnotation], types, parser, buildSchema); - case 'TSIntersectionType': - return buildObjectType( - flattenIntersectionType(typeAnnotation, types), - types, - parser, - buildSchema, - ); - case 'ImageSource': - return { - type: 'ReservedPropTypeAnnotation', - name: 'ImageSourcePrimitive', - }; - case 'ImageRequest': - return { - type: 'ReservedPropTypeAnnotation', - name: 'ImageRequestPrimitive', - }; - case 'ColorValue': - case 'ProcessedColorValue': - return { - type: 'ReservedPropTypeAnnotation', - name: 'ColorPrimitive', - }; - case 'PointValue': - return { - type: 'ReservedPropTypeAnnotation', - name: 'PointPrimitive', - }; - case 'EdgeInsetsValue': - return { - type: 'ReservedPropTypeAnnotation', - name: 'EdgeInsetsPrimitive', - }; - case 'DimensionValue': - return { - type: 'ReservedPropTypeAnnotation', - name: 'DimensionPrimitive', - }; - case 'TSUnionType': - return getUnionOfLiterals( - name, - forArray, - typeAnnotation.types, - defaultValue, - types, - ); - case 'Int32': - case 'Double': - case 'Float': - case 'TSBooleanKeyword': - case 'Stringish': - case 'TSStringKeyword': - return getPrimitiveTypeAnnotation(type); - case 'UnsafeMixed': - return { - type: 'MixedTypeAnnotation', - }; - default: - return undefined; - } -} - -function getTypeAnnotationForArray( - name: string, - typeAnnotation: $FlowFixMe, - defaultValue: $FlowFixMe | void, - types: TypeDeclarationMap, - parser: Parser, - buildSchema: BuildSchemaFN, -): $FlowFixMe { - // unpack WithDefault, (T) or T|U - const topLevelType = parseTopLevelType(typeAnnotation, types); - if (topLevelType.defaultValue !== undefined) { - throw new Error( - 'Nested optionals such as "ReadonlyArray" are not supported, please declare optionals at the top level of value definitions as in "ReadonlyArray | null | undefined"', - ); - } - if (topLevelType.optional) { - throw new Error( - 'Nested optionals such as "ReadonlyArray" are not supported, please declare optionals at the top level of value definitions as in "ReadonlyArray | null | undefined"', - ); - } - - const extractedTypeAnnotation = topLevelType.type; - const arrayType = detectArrayType( - name, - extractedTypeAnnotation, - defaultValue, - types, - parser, - buildSchema, - ); - if (arrayType) { - if (arrayType.elementType.type !== 'ObjectTypeAnnotation') { - throw new Error( - `Only array of array of object is supported for "${name}".`, - ); - } - return arrayType; - } - - const type = - extractedTypeAnnotation.elementType === 'TSTypeReference' - ? extractedTypeAnnotation.elementType.typeName.name - : extractedTypeAnnotation.elementType?.type || - extractedTypeAnnotation.typeName?.name || - extractedTypeAnnotation.type; - - const common = getCommonTypeAnnotation( - name, - true, - type, - extractedTypeAnnotation, - defaultValue, - types, - parser, - buildSchema, - ); - if (common) { - return common; - } - - switch (type) { - case 'TSNumberKeyword': - return { - type: 'FloatTypeAnnotation', - }; - default: - (type: empty); - throw new Error(`Unknown prop type for "${name}": ${type}`); - } -} - -function setDefaultValue( - common: $FlowFixMe, - defaultValue: $FlowFixMe | void, -): void { - switch (common.type) { - case 'Int32TypeAnnotation': - case 'DoubleTypeAnnotation': - common.default = ((defaultValue ? defaultValue : 0): number); - break; - case 'FloatTypeAnnotation': - common.default = ((defaultValue === null - ? null - : defaultValue - ? defaultValue - : 0): number | null); - break; - case 'BooleanTypeAnnotation': - common.default = defaultValue === null ? null : !!defaultValue; - break; - case 'StringTypeAnnotation': - common.default = ((defaultValue === undefined ? null : defaultValue): - | string - | null); - break; - } -} - -function getTypeAnnotation( - name: string, - annotation: $FlowFixMe | ASTNode, - defaultValue: $FlowFixMe | void, - withNullDefault: boolean, // Just to make `getTypeAnnotation` signature match with the one from Flow - types: TypeDeclarationMap, - parser: Parser, - buildSchema: BuildSchemaFN, -): $FlowFixMe { - // unpack WithDefault, (T) or T|U - const topLevelType = parseTopLevelType(annotation, types); - const typeAnnotation = topLevelType.type; - const arrayType = detectArrayType( - name, - typeAnnotation, - defaultValue, - types, - parser, - buildSchema, - ); - if (arrayType) { - return arrayType; - } - - const type = - typeAnnotation.type === 'TSTypeReference' || - typeAnnotation.type === 'TSTypeAliasDeclaration' - ? parser.getTypeAnnotationName(typeAnnotation) - : typeAnnotation.type; - - const common = getCommonTypeAnnotation( - name, - false, - type, - typeAnnotation, - defaultValue, - types, - parser, - buildSchema, - ); - if (common) { - setDefaultValue(common, defaultValue); - return common; - } - - switch (type) { - case 'ColorArrayValue': - return { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'ReservedPropTypeAnnotation', - name: 'ColorPrimitive', - }, - }; - case 'TSNumberKeyword': - throw new Error( - `Cannot use "${type}" type annotation for "${name}": must use a specific numeric type like Int32, Double, or Float`, - ); - case 'TSFunctionType': - throw new Error( - `Cannot use "${type}" type annotation for "${name}": must use a specific function type like BubblingEventHandler, or DirectEventHandler`, - ); - default: - throw new Error(`Unknown prop type for "${name}": "${type}"`); - } -} - -type SchemaInfo = { - name: string, - optional: boolean, - typeAnnotation: $FlowFixMe, - defaultValue: $FlowFixMe, - withNullDefault: boolean, // Just to make `getTypeAnnotation` signature match with the one from Flow -}; - -function getSchemaInfo( - property: PropAST, - types: TypeDeclarationMap, -): SchemaInfo { - // unpack WithDefault, (T) or T|U - const topLevelType = parseTopLevelType( - property.typeAnnotation.typeAnnotation, - types, - ); - - const name = property.key.name; - - if (!property.optional && topLevelType.defaultValue !== undefined) { - throw new Error( - `key ${name} must be optional if used with WithDefault<> annotation`, - ); - } - - return { - name, - optional: property.optional || topLevelType.optional, - typeAnnotation: topLevelType.type, - defaultValue: topLevelType.defaultValue, - withNullDefault: false, // Just to make `getTypeAnnotation` signature match with the one from Flow - }; -} - -function flattenProperties( - typeDefinition: $ReadOnlyArray, - types: TypeDeclarationMap, - parser: Parser, -): $ReadOnlyArray { - return typeDefinition - .map(property => { - if (property.type === 'TSPropertySignature') { - return property; - } else if (property.type === 'TSTypeReference') { - return flattenProperties( - parser.getProperties(property.typeName.name, types), - types, - parser, - ); - } else if ( - property.type === 'TSExpressionWithTypeArguments' || - property.type === 'TSInterfaceHeritage' - ) { - return flattenProperties( - parser.getProperties(property.expression.name, types), - types, - parser, - ); - } else if (property.type === 'TSTypeLiteral') { - return flattenProperties(property.members, types, parser); - } else if (property.type === 'TSInterfaceDeclaration') { - return flattenProperties( - parser.getProperties(property.id.name, types), - types, - parser, - ); - } else if (property.type === 'TSIntersectionType') { - return flattenProperties(property.types, types, parser); - } else { - throw new Error( - `${property.type} is not a supported object literal type.`, - ); - } - }) - .filter(Boolean) - .reduce((acc: Array, item) => { - if (Array.isArray(item)) { - item.forEach((prop: PropAST) => { - verifyPropNotAlreadyDefined(acc, prop); - }); - return acc.concat(item); - } else { - verifyPropNotAlreadyDefined(acc, item); - acc.push(item); - return acc; - } - }, []) - .filter(Boolean); -} - -module.exports = { - getSchemaInfo, - getTypeAnnotation, - getPrimitiveTypeAnnotation, - flattenProperties, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/typescript/components/events.js b/node_modules/@react-native/codegen/lib/parsers/typescript/components/events.js deleted file mode 100644 index 216752c45..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/typescript/components/events.js +++ /dev/null @@ -1,261 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('../../error-utils'), - throwIfArgumentPropsAreNull = _require.throwIfArgumentPropsAreNull, - throwIfBubblingTypeIsNull = _require.throwIfBubblingTypeIsNull, - throwIfEventHasNoName = _require.throwIfEventHasNoName; -const _require2 = require('../../parsers-commons'), - buildPropertiesForEvent = _require2.buildPropertiesForEvent, - emitBuildEventSchema = _require2.emitBuildEventSchema, - getEventArgument = _require2.getEventArgument, - handleEventHandler = _require2.handleEventHandler; -const _require3 = require('../../parsers-primitives'), - emitBoolProp = _require3.emitBoolProp, - emitDoubleProp = _require3.emitDoubleProp, - emitFloatProp = _require3.emitFloatProp, - emitInt32Prop = _require3.emitInt32Prop, - emitMixedProp = _require3.emitMixedProp, - emitObjectProp = _require3.emitObjectProp, - emitStringProp = _require3.emitStringProp, - emitUnionProp = _require3.emitUnionProp; -const _require4 = require('../parseTopLevelType'), - parseTopLevelType = _require4.parseTopLevelType; -const _require5 = require('./componentsUtils'), - flattenProperties = _require5.flattenProperties; -function getPropertyType( - /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's - * LTI update could not be added via codemod */ - name, - optionalProperty, - /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's - * LTI update could not be added via codemod */ - annotation, - parser, -) { - const topLevelType = parseTopLevelType(annotation); - const typeAnnotation = topLevelType.type; - const optional = optionalProperty || topLevelType.optional; - const type = - typeAnnotation.type === 'TSTypeReference' - ? parser.getTypeAnnotationName(typeAnnotation) - : typeAnnotation.type; - switch (type) { - case 'TSBooleanKeyword': - return emitBoolProp(name, optional); - case 'TSStringKeyword': - return emitStringProp(name, optional); - case 'Int32': - return emitInt32Prop(name, optional); - case 'Double': - return emitDoubleProp(name, optional); - case 'Float': - return emitFloatProp(name, optional); - case 'TSTypeLiteral': - return emitObjectProp( - name, - optional, - parser, - typeAnnotation, - extractArrayElementType, - ); - case 'TSUnionType': - return emitUnionProp(name, optional, parser, typeAnnotation); - case 'UnsafeMixed': - return emitMixedProp(name, optional); - case 'TSArrayType': - return { - name, - optional, - typeAnnotation: extractArrayElementType(typeAnnotation, name, parser), - }; - default: - throw new Error(`Unable to determine event type for "${name}": ${type}`); - } -} -function extractArrayElementType(typeAnnotation, name, parser) { - const type = extractTypeFromTypeAnnotation(typeAnnotation, parser); - switch (type) { - case 'TSParenthesizedType': - return extractArrayElementType( - typeAnnotation.typeAnnotation, - name, - parser, - ); - case 'TSBooleanKeyword': - return { - type: 'BooleanTypeAnnotation', - }; - case 'TSStringKeyword': - return { - type: 'StringTypeAnnotation', - }; - case 'Float': - return { - type: 'FloatTypeAnnotation', - }; - case 'Int32': - return { - type: 'Int32TypeAnnotation', - }; - case 'TSNumberKeyword': - case 'Double': - return { - type: 'DoubleTypeAnnotation', - }; - case 'TSUnionType': - return { - type: 'StringEnumTypeAnnotation', - options: typeAnnotation.types.map(option => - parser.getLiteralValue(option), - ), - }; - case 'TSTypeLiteral': - return { - type: 'ObjectTypeAnnotation', - properties: parser - .getObjectProperties(typeAnnotation) - .map(member => - buildPropertiesForEvent(member, parser, getPropertyType), - ), - }; - case 'TSArrayType': - return { - type: 'ArrayTypeAnnotation', - elementType: extractArrayElementType( - typeAnnotation.elementType, - name, - parser, - ), - }; - default: - throw new Error( - `Unrecognized ${type} for Array ${name} in events.\n${JSON.stringify( - typeAnnotation, - null, - 2, - )}`, - ); - } -} -function extractTypeFromTypeAnnotation(typeAnnotation, parser) { - return typeAnnotation.type === 'TSTypeReference' - ? parser.getTypeAnnotationName(typeAnnotation) - : typeAnnotation.type; -} -function findEventArgumentsAndType( - parser, - typeAnnotation, - types, - bubblingType, - paperName, -) { - if (typeAnnotation.type === 'TSInterfaceDeclaration') { - return { - argumentProps: flattenProperties([typeAnnotation], types, parser), - paperTopLevelNameDeprecated: paperName, - bubblingType, - }; - } - if (typeAnnotation.type === 'TSTypeLiteral') { - return { - argumentProps: parser.getObjectProperties(typeAnnotation), - paperTopLevelNameDeprecated: paperName, - bubblingType, - }; - } - throwIfEventHasNoName(typeAnnotation, parser); - const name = parser.getTypeAnnotationName(typeAnnotation); - if (name === 'Readonly') { - return findEventArgumentsAndType( - parser, - typeAnnotation.typeParameters.params[0], - types, - bubblingType, - paperName, - ); - } else if (name === 'BubblingEventHandler' || name === 'DirectEventHandler') { - return handleEventHandler( - name, - typeAnnotation, - parser, - types, - findEventArgumentsAndType, - ); - } else if (types[name]) { - let elementType = types[name]; - if (elementType.type === 'TSTypeAliasDeclaration') { - elementType = elementType.typeAnnotation; - } - return findEventArgumentsAndType( - parser, - elementType, - types, - bubblingType, - paperName, - ); - } else { - return { - argumentProps: null, - bubblingType: null, - paperTopLevelNameDeprecated: null, - }; - } -} - -// $FlowFixMe[unclear-type] TODO(T108222691): Use flow-types for @babel/parser - -function buildEventSchema(types, property, parser) { - // unpack WithDefault, (T) or T|U - const topLevelType = parseTopLevelType( - property.typeAnnotation.typeAnnotation, - types, - ); - const name = property.key.name; - const typeAnnotation = topLevelType.type; - const optional = property.optional || topLevelType.optional; - const _findEventArgumentsAn = findEventArgumentsAndType( - parser, - typeAnnotation, - types, - ), - argumentProps = _findEventArgumentsAn.argumentProps, - bubblingType = _findEventArgumentsAn.bubblingType, - paperTopLevelNameDeprecated = - _findEventArgumentsAn.paperTopLevelNameDeprecated; - const nonNullableArgumentProps = throwIfArgumentPropsAreNull( - argumentProps, - name, - ); - const nonNullableBubblingType = throwIfBubblingTypeIsNull(bubblingType, name); - const argument = getEventArgument( - nonNullableArgumentProps, - parser, - getPropertyType, - ); - return emitBuildEventSchema( - paperTopLevelNameDeprecated, - name, - optional, - nonNullableBubblingType, - argument, - ); -} -function getEvents(eventTypeAST, types, parser) { - return eventTypeAST - .map(property => buildEventSchema(types, property, parser)) - .filter(Boolean); -} -module.exports = { - getEvents, - extractArrayElementType, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/typescript/components/events.js.flow b/node_modules/@react-native/codegen/lib/parsers/typescript/components/events.js.flow deleted file mode 100644 index a0672ac35..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/typescript/components/events.js.flow +++ /dev/null @@ -1,292 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type { - EventTypeAnnotation, - EventTypeShape, - NamedShape, -} from '../../../CodegenSchema.js'; -import type {Parser} from '../../parser'; -import type {TypeDeclarationMap} from '../../utils'; - -const { - throwIfArgumentPropsAreNull, - throwIfBubblingTypeIsNull, - throwIfEventHasNoName, -} = require('../../error-utils'); -const { - buildPropertiesForEvent, - emitBuildEventSchema, - getEventArgument, - handleEventHandler, -} = require('../../parsers-commons'); -const { - emitBoolProp, - emitDoubleProp, - emitFloatProp, - emitInt32Prop, - emitMixedProp, - emitObjectProp, - emitStringProp, - emitUnionProp, -} = require('../../parsers-primitives'); -const {parseTopLevelType} = require('../parseTopLevelType'); -const {flattenProperties} = require('./componentsUtils'); -function getPropertyType( - /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's - * LTI update could not be added via codemod */ - name, - optionalProperty: boolean, - /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's - * LTI update could not be added via codemod */ - annotation, - parser: Parser, -): NamedShape { - const topLevelType = parseTopLevelType(annotation); - const typeAnnotation = topLevelType.type; - const optional = optionalProperty || topLevelType.optional; - const type = - typeAnnotation.type === 'TSTypeReference' - ? parser.getTypeAnnotationName(typeAnnotation) - : typeAnnotation.type; - - switch (type) { - case 'TSBooleanKeyword': - return emitBoolProp(name, optional); - case 'TSStringKeyword': - return emitStringProp(name, optional); - case 'Int32': - return emitInt32Prop(name, optional); - case 'Double': - return emitDoubleProp(name, optional); - case 'Float': - return emitFloatProp(name, optional); - case 'TSTypeLiteral': - return emitObjectProp( - name, - optional, - parser, - typeAnnotation, - extractArrayElementType, - ); - case 'TSUnionType': - return emitUnionProp(name, optional, parser, typeAnnotation); - case 'UnsafeMixed': - return emitMixedProp(name, optional); - case 'TSArrayType': - return { - name, - optional, - typeAnnotation: extractArrayElementType(typeAnnotation, name, parser), - }; - default: - throw new Error(`Unable to determine event type for "${name}": ${type}`); - } -} - -function extractArrayElementType( - typeAnnotation: $FlowFixMe, - name: string, - parser: Parser, -): EventTypeAnnotation { - const type = extractTypeFromTypeAnnotation(typeAnnotation, parser); - - switch (type) { - case 'TSParenthesizedType': - return extractArrayElementType( - typeAnnotation.typeAnnotation, - name, - parser, - ); - case 'TSBooleanKeyword': - return {type: 'BooleanTypeAnnotation'}; - case 'TSStringKeyword': - return {type: 'StringTypeAnnotation'}; - case 'Float': - return { - type: 'FloatTypeAnnotation', - }; - case 'Int32': - return { - type: 'Int32TypeAnnotation', - }; - case 'TSNumberKeyword': - case 'Double': - return { - type: 'DoubleTypeAnnotation', - }; - case 'TSUnionType': - return { - type: 'StringEnumTypeAnnotation', - options: typeAnnotation.types.map(option => - parser.getLiteralValue(option), - ), - }; - case 'TSTypeLiteral': - return { - type: 'ObjectTypeAnnotation', - properties: parser - .getObjectProperties(typeAnnotation) - .map(member => - buildPropertiesForEvent(member, parser, getPropertyType), - ), - }; - case 'TSArrayType': - return { - type: 'ArrayTypeAnnotation', - elementType: extractArrayElementType( - typeAnnotation.elementType, - name, - parser, - ), - }; - default: - throw new Error( - `Unrecognized ${type} for Array ${name} in events.\n${JSON.stringify( - typeAnnotation, - null, - 2, - )}`, - ); - } -} - -function extractTypeFromTypeAnnotation( - typeAnnotation: $FlowFixMe, - parser: Parser, -): string { - return typeAnnotation.type === 'TSTypeReference' - ? parser.getTypeAnnotationName(typeAnnotation) - : typeAnnotation.type; -} - -function findEventArgumentsAndType( - parser: Parser, - typeAnnotation: $FlowFixMe, - types: TypeDeclarationMap, - bubblingType: void | 'direct' | 'bubble', - paperName: ?$FlowFixMe, -): { - argumentProps: ?$ReadOnlyArray<$FlowFixMe>, - paperTopLevelNameDeprecated: ?$FlowFixMe, - bubblingType: ?'direct' | 'bubble', -} { - if (typeAnnotation.type === 'TSInterfaceDeclaration') { - return { - argumentProps: flattenProperties([typeAnnotation], types, parser), - paperTopLevelNameDeprecated: paperName, - bubblingType, - }; - } - - if (typeAnnotation.type === 'TSTypeLiteral') { - return { - argumentProps: parser.getObjectProperties(typeAnnotation), - paperTopLevelNameDeprecated: paperName, - bubblingType, - }; - } - - throwIfEventHasNoName(typeAnnotation, parser); - const name = parser.getTypeAnnotationName(typeAnnotation); - if (name === 'Readonly') { - return findEventArgumentsAndType( - parser, - typeAnnotation.typeParameters.params[0], - types, - bubblingType, - paperName, - ); - } else if (name === 'BubblingEventHandler' || name === 'DirectEventHandler') { - return handleEventHandler( - name, - typeAnnotation, - parser, - types, - findEventArgumentsAndType, - ); - } else if (types[name]) { - let elementType = types[name]; - if (elementType.type === 'TSTypeAliasDeclaration') { - elementType = elementType.typeAnnotation; - } - return findEventArgumentsAndType( - parser, - elementType, - types, - bubblingType, - paperName, - ); - } else { - return { - argumentProps: null, - bubblingType: null, - paperTopLevelNameDeprecated: null, - }; - } -} - -// $FlowFixMe[unclear-type] TODO(T108222691): Use flow-types for @babel/parser -type EventTypeAST = Object; - -function buildEventSchema( - types: TypeDeclarationMap, - property: EventTypeAST, - parser: Parser, -): ?EventTypeShape { - // unpack WithDefault, (T) or T|U - const topLevelType = parseTopLevelType( - property.typeAnnotation.typeAnnotation, - types, - ); - - const name = property.key.name; - const typeAnnotation = topLevelType.type; - const optional = property.optional || topLevelType.optional; - const {argumentProps, bubblingType, paperTopLevelNameDeprecated} = - findEventArgumentsAndType(parser, typeAnnotation, types); - - const nonNullableArgumentProps = throwIfArgumentPropsAreNull( - argumentProps, - name, - ); - const nonNullableBubblingType = throwIfBubblingTypeIsNull(bubblingType, name); - - const argument = getEventArgument( - nonNullableArgumentProps, - parser, - getPropertyType, - ); - - return emitBuildEventSchema( - paperTopLevelNameDeprecated, - name, - optional, - nonNullableBubblingType, - argument, - ); -} - -function getEvents( - eventTypeAST: $ReadOnlyArray, - types: TypeDeclarationMap, - parser: Parser, -): $ReadOnlyArray { - return eventTypeAST - .map(property => buildEventSchema(types, property, parser)) - .filter(Boolean); -} - -module.exports = { - getEvents, - extractArrayElementType, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/typescript/components/extends.js b/node_modules/@react-native/codegen/lib/parsers/typescript/components/extends.js deleted file mode 100644 index 4c1f72301..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/typescript/components/extends.js +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('../parseTopLevelType'), - parseTopLevelType = _require.parseTopLevelType; -function isEvent(typeAnnotation) { - if (typeAnnotation.type !== 'TSTypeReference') { - return false; - } - const eventNames = new Set(['BubblingEventHandler', 'DirectEventHandler']); - return eventNames.has(typeAnnotation.typeName.name); -} - -// $FlowFixMe[unclear-type] TODO(T108222691): Use flow-types for @babel/parser - -function categorizeProps(typeDefinition, types, events) { - // find events - for (const prop of typeDefinition) { - if (prop.type === 'TSPropertySignature') { - const topLevelType = parseTopLevelType( - prop.typeAnnotation.typeAnnotation, - types, - ); - if (isEvent(topLevelType.type)) { - events.push(prop); - } - } - } -} -module.exports = { - categorizeProps, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/typescript/components/extends.js.flow b/node_modules/@react-native/codegen/lib/parsers/typescript/components/extends.js.flow deleted file mode 100644 index 6e29af9ca..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/typescript/components/extends.js.flow +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type {TypeDeclarationMap} from '../../utils'; - -const {parseTopLevelType} = require('../parseTopLevelType'); - -function isEvent(typeAnnotation: $FlowFixMe): boolean { - if (typeAnnotation.type !== 'TSTypeReference') { - return false; - } - const eventNames = new Set(['BubblingEventHandler', 'DirectEventHandler']); - return eventNames.has(typeAnnotation.typeName.name); -} - -// $FlowFixMe[unclear-type] TODO(T108222691): Use flow-types for @babel/parser -type PropsAST = Object; - -function categorizeProps( - typeDefinition: $ReadOnlyArray, - types: TypeDeclarationMap, - events: Array, -): void { - // find events - for (const prop of typeDefinition) { - if (prop.type === 'TSPropertySignature') { - const topLevelType = parseTopLevelType( - prop.typeAnnotation.typeAnnotation, - types, - ); - - if (isEvent(topLevelType.type)) { - events.push(prop); - } - } - } -} - -module.exports = { - categorizeProps, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/typescript/components/index.js b/node_modules/@react-native/codegen/lib/parsers/typescript/components/index.js deleted file mode 100644 index c7ca2e729..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/typescript/components/index.js +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('../../parsers-commons'), - findComponentConfig = _require.findComponentConfig, - getCommandProperties = _require.getCommandProperties, - getOptions = _require.getOptions; -const _require2 = require('./commands'), - getCommands = _require2.getCommands; -const _require3 = require('./events'), - getEvents = _require3.getEvents; -const _require4 = require('./extends'), - categorizeProps = _require4.categorizeProps; - -// $FlowFixMe[unclear-type] TODO(T108222691): Use flow-types for @babel/parser - -// $FlowFixMe[signature-verification-failure] TODO(T108222691): Use flow-types for @babel/parser -function buildComponentSchema(ast, parser) { - const _findComponentConfig = findComponentConfig(ast, parser), - componentName = _findComponentConfig.componentName, - propsTypeName = _findComponentConfig.propsTypeName, - optionsExpression = _findComponentConfig.optionsExpression; - const types = parser.getTypes(ast); - const propProperties = parser.getProperties(propsTypeName, types); - const commandProperties = getCommandProperties(ast, parser); - const options = getOptions(optionsExpression); - const componentEventAsts = []; - categorizeProps(propProperties, types, componentEventAsts); - const _parser$getProps = parser.getProps(propProperties, types), - props = _parser$getProps.props, - extendsProps = _parser$getProps.extendsProps; - const events = getEvents(componentEventAsts, types, parser); - const commands = getCommands(commandProperties, types); - return { - filename: componentName, - componentName, - options, - extendsProps, - events, - props, - commands, - }; -} -module.exports = { - buildComponentSchema, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/typescript/components/index.js.flow b/node_modules/@react-native/codegen/lib/parsers/typescript/components/index.js.flow deleted file mode 100644 index fa95c8f7e..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/typescript/components/index.js.flow +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; -import type {Parser} from '../../parser'; -import type {ComponentSchemaBuilderConfig} from '../../schema.js'; - -const { - findComponentConfig, - getCommandProperties, - getOptions, -} = require('../../parsers-commons'); -const {getCommands} = require('./commands'); -const {getEvents} = require('./events'); -const {categorizeProps} = require('./extends'); - -// $FlowFixMe[unclear-type] TODO(T108222691): Use flow-types for @babel/parser -type PropsAST = Object; - -// $FlowFixMe[signature-verification-failure] TODO(T108222691): Use flow-types for @babel/parser -function buildComponentSchema( - ast: $FlowFixMe, - parser: Parser, -): ComponentSchemaBuilderConfig { - const {componentName, propsTypeName, optionsExpression} = findComponentConfig( - ast, - parser, - ); - - const types = parser.getTypes(ast); - - const propProperties = parser.getProperties(propsTypeName, types); - - const commandProperties = getCommandProperties(ast, parser); - - const options = getOptions(optionsExpression); - - const componentEventAsts: Array = []; - categorizeProps(propProperties, types, componentEventAsts); - const {props, extendsProps} = parser.getProps(propProperties, types); - const events = getEvents(componentEventAsts, types, parser); - const commands = getCommands(commandProperties, types); - - return { - filename: componentName, - componentName, - options, - extendsProps, - events, - props, - commands, - }; -} - -module.exports = { - buildComponentSchema, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/typescript/modules/__test_fixtures__/failures.js b/node_modules/@react-native/codegen/lib/parsers/typescript/modules/__test_fixtures__/failures.js deleted file mode 100644 index 59f52acef..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/typescript/modules/__test_fixtures__/failures.js +++ /dev/null @@ -1,212 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -// @licenselint-loose-mode - -const NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - getString: (arg: string) => Array; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; -const NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT_AS_PARAM = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - getString: (arg: Array) => string; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; -const NATIVE_MODULES_WITH_NOT_ONLY_METHODS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly getBool: (arg: boolean) => boolean; - readonly getNumber: (arg: number) => number; - readonly getString: (arg: string) => string; - sampleBool: boolean, - -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULES_WITH_UNNAMED_PARAMS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly getBool: (boolean) => boolean; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; -const NATIVE_MODULES_WITH_PROMISE_WITHOUT_TYPE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly getBool: (arg: boolean) => Promise; - -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const TWO_NATIVE_MODULES_EXPORTED_WITH_DEFAULT = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule1'); -export default TurboModuleRegistry.getEnforcing('SampleTurboModule2'); -`; -const TWO_NATIVE_EXTENDING_TURBO_MODULE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly getSth: (a: number | null | undefined) => void; -} - -export interface Spec2 extends TurboModule { - readonly getSth: (a: number | null | undefined) => void; -} -`; -const EMPTY_ENUM_NATIVE_MODULE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export enum SomeEnum { -} - -export interface Spec extends TurboModule { - readonly getEnums: (a: SomeEnum) => string; -} - -export default TurboModuleRegistry.getEnforcing( - 'EmptyEnumNativeModule', -); -`; -const MIXED_VALUES_ENUM_NATIVE_MODULE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export enum SomeEnum { - NUM = 1, - STR = 'str', -} - -export interface Spec extends TurboModule { - readonly getEnums: (a: SomeEnum) => string; -} - -export default TurboModuleRegistry.getEnforcing( - 'MixedValuesEnumNativeModule', -); -`; -module.exports = { - NATIVE_MODULES_WITH_UNNAMED_PARAMS, - NATIVE_MODULES_WITH_PROMISE_WITHOUT_TYPE, - NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT_AS_PARAM, - NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT, - TWO_NATIVE_MODULES_EXPORTED_WITH_DEFAULT, - NATIVE_MODULES_WITH_NOT_ONLY_METHODS, - TWO_NATIVE_EXTENDING_TURBO_MODULE, - EMPTY_ENUM_NATIVE_MODULE, - MIXED_VALUES_ENUM_NATIVE_MODULE, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/typescript/modules/__test_fixtures__/failures.js.flow b/node_modules/@react-native/codegen/lib/parsers/typescript/modules/__test_fixtures__/failures.js.flow deleted file mode 100644 index a8d08e839..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/typescript/modules/__test_fixtures__/failures.js.flow +++ /dev/null @@ -1,221 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -// @licenselint-loose-mode - -const NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - getString: (arg: string) => Array; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; - -const NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT_AS_PARAM = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - getString: (arg: Array) => string; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; - -const NATIVE_MODULES_WITH_NOT_ONLY_METHODS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly getBool: (arg: boolean) => boolean; - readonly getNumber: (arg: number) => number; - readonly getString: (arg: string) => string; - sampleBool: boolean, - -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULES_WITH_UNNAMED_PARAMS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly getBool: (boolean) => boolean; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; - -const NATIVE_MODULES_WITH_PROMISE_WITHOUT_TYPE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly getBool: (arg: boolean) => Promise; - -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const TWO_NATIVE_MODULES_EXPORTED_WITH_DEFAULT = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule1'); -export default TurboModuleRegistry.getEnforcing('SampleTurboModule2'); -`; - -const TWO_NATIVE_EXTENDING_TURBO_MODULE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly getSth: (a: number | null | undefined) => void; -} - -export interface Spec2 extends TurboModule { - readonly getSth: (a: number | null | undefined) => void; -} -`; - -const EMPTY_ENUM_NATIVE_MODULE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export enum SomeEnum { -} - -export interface Spec extends TurboModule { - readonly getEnums: (a: SomeEnum) => string; -} - -export default TurboModuleRegistry.getEnforcing( - 'EmptyEnumNativeModule', -); -`; - -const MIXED_VALUES_ENUM_NATIVE_MODULE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export enum SomeEnum { - NUM = 1, - STR = 'str', -} - -export interface Spec extends TurboModule { - readonly getEnums: (a: SomeEnum) => string; -} - -export default TurboModuleRegistry.getEnforcing( - 'MixedValuesEnumNativeModule', -); -`; - -module.exports = { - NATIVE_MODULES_WITH_UNNAMED_PARAMS, - NATIVE_MODULES_WITH_PROMISE_WITHOUT_TYPE, - NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT_AS_PARAM, - NATIVE_MODULES_WITH_ARRAY_WITH_NO_TYPE_FOR_CONTENT, - TWO_NATIVE_MODULES_EXPORTED_WITH_DEFAULT, - NATIVE_MODULES_WITH_NOT_ONLY_METHODS, - TWO_NATIVE_EXTENDING_TURBO_MODULE, - EMPTY_ENUM_NATIVE_MODULE, - MIXED_VALUES_ENUM_NATIVE_MODULE, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/typescript/modules/__test_fixtures__/fixtures.js b/node_modules/@react-native/codegen/lib/parsers/typescript/modules/__test_fixtures__/fixtures.js deleted file mode 100644 index c78cdb63f..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/typescript/modules/__test_fixtures__/fixtures.js +++ /dev/null @@ -1,856 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -// @licenselint-loose-mode - -const EMPTY_NATIVE_MODULE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; -const NATIVE_MODULE_WITH_COMPLEX_OBJECTS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export type String = string; - -export interface Spec extends TurboModule { - // Exported methods. - readonly getObject: (arg: {const1: {const1: boolean}}) => { - const1: {const1: boolean}, - }; - readonly getReadOnlyObject: (arg: Readonly<{const1: Readonly<{const1: boolean}>}>) => Readonly<{ - const1: {const1: boolean}, - }>; - readonly getObject2: (arg: { a: String }) => Object; - readonly getObjectInArray: (arg: {const1: {const1: boolean}}) => Array<{ - const1: {const1: boolean}, - }>; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; -const NATIVE_MODULE_WITH_COMPLEX_OBJECTS_WITH_NULLABLE_KEY = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export type String = string; - -export interface Spec extends TurboModule { - readonly getConstants: () => { - isTesting: boolean; - reactNativeVersion: { - major: number; - minor: number; - patch?: number; - prerelease: number | null | undefined; - }; - forceTouchAvailable: boolean; - osVersion: string; - systemName: string; - interfaceIdiom: string; - }; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; -const NATIVE_MODULE_WITH_BASIC_PARAM_TYPES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly passBool?: (arg: boolean) => void; - readonly passNumber: (arg: number) => void; - readonly passString: (arg: string) => void; - readonly passStringish: (arg: Stringish) => void; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULE_WITH_ALIASES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -type NumNum = number; -export type Num = (arg: NumNum) => void; -type Num2 = Num; -export type Void = void; -export type A = number; -export type B = number; -export type ObjectAlias = { - x: number; - y: number; - label: string; - truthy: boolean; -}; -export type ReadOnlyAlias = Readonly; - -export interface Spec extends TurboModule { - // Exported methods. - readonly getNumber: Num2; - readonly getVoid: () => Void; - readonly getArray: (a: Array) => {a: B}; - readonly getStringFromAlias: (a: ObjectAlias) => string; - readonly getStringFromNullableAlias: (a: ObjectAlias | null) => string; - readonly getStringFromReadOnlyAlias: (a: ReadOnlyAlias) => string; - readonly getStringFromNullableReadOnlyAlias: (a: ReadOnlyAlias | null) => string; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; -const NATIVE_MODULE_WITH_NESTED_ALIASES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -type Bar = { - z: number -}; - -type Foo = { - bar1: Bar, - bar2: Bar, -}; - -export interface Spec extends TurboModule { - // Exported methods. - foo1: (x: Foo) => Foo; - foo2: (x: Foo) => void; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULE_WITH_NESTED_INTERFACES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -interface Bar { - z: number -}; - -interface Base1 { - bar1: Bar, -} - -interface Base2 { - bar2: Bar, -} - -interface Base3 extends Base2 { - bar3: Bar, -} - -interface Foo extends Base1, Base3 { - bar4: Bar, -}; - -export interface Spec extends TurboModule { - // Exported methods. - foo1: (x: Foo) => Foo; - foo2: (x: Foo) => void; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULE_WITH_INTERSECTION_TYPES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -type Bar = { - z: number -}; - -type Base1 = { - bar1: Bar, -} - -type Base2 = { - bar2: Bar, -} - -type Base3 = Base2 & { - bar3: Bar, -} - -type Foo = Base1 & Base3 & { - bar4: Bar, -}; - -export interface Spec extends TurboModule { - // Exported methods. - foo1: (x: Foo) => Foo; - foo2: (x: Foo) => void; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const NATIVE_MODULE_WITH_FLOAT_AND_INT32 = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import type {Int32, Float} from 'react-native/Libraries/Types/CodegenTypes'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly getInt: (arg: Int32) => Int32; - readonly getFloat: (arg: Float) => Float; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; -const NATIVE_MODULE_WITH_SIMPLE_OBJECT = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly getObject: (o: Object) => Object, -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; -const NATIVE_MODULE_WITH_UNSAFE_OBJECT = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; -import type {UnsafeObject} from 'react-native/Libraries/Types/CodegenTypes'; - -export interface Spec extends TurboModule { - readonly getUnsafeObject: (o: UnsafeObject) => UnsafeObject; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; -const NATIVE_MODULE_WITH_PARTIALS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export type SomeObj = { - a: string, - b?: boolean, -}; - -export interface Spec extends TurboModule { - getSomeObj: () => SomeObj; - getPartialSomeObj: () => Partial; - getSomeObjFromPartialSomeObj: (value: Partial) => SomeObj; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; -const NATIVE_MODULE_WITH_PARTIALS_COMPLEX = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export type SomeObj = { - a: string, - b?: boolean, -}; - -export type PartialSomeObj = Partial; - -export interface Spec extends TurboModule { - getPartialPartial: (value1: Partial, value2: PartialSomeObj) => SomeObj; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; -const NATIVE_MODULE_WITH_ROOT_TAG = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type { - TurboModule, - RootTag, -} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly getRootTag: (rootTag: RootTag) => RootTag; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; -const NATIVE_MODULE_WITH_NULLABLE_PARAM = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly voidFunc: (arg: string | null | undefined) => void; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; -const NATIVE_MODULE_WITH_BASIC_ARRAY = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly getArray: (arg: Array) => (Array<(string)>); - readonly getArray: (arg: ReadonlyArray) => (ReadonlyArray<(string)>); -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; -const NATIVE_MODULE_WITH_BASIC_ARRAY2 = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly getArray: (arg: string[]) => ((string)[]); - readonly getArray: (arg: readonly string[]) => (readonly (string)[]); -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; -const NATIVE_MODULE_WITH_OBJECT_WITH_OBJECT_DEFINED_IN_FILE_AS_PROPERTY = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -type DisplayMetricsAndroid = { - width: number; -}; - -export interface Spec extends TurboModule { - readonly getConstants: () => { - readonly Dimensions: { - windowPhysicalPixels: DisplayMetricsAndroid; - }; - }; - readonly getConstants2: () => Readonly<{ - readonly Dimensions: { - windowPhysicalPixels: DisplayMetricsAndroid; - }; - }>; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; -const NATIVE_MODULE_WITH_ARRAY_WITH_UNION_AND_TOUPLE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly getArray: ( - arg: Array<[string, string]>, - ) => Array; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; -const NATIVE_MODULE_WITH_ARRAY2_WITH_UNION_AND_TOUPLE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - getArray( - arg: [string, string][], - ): (string | number | boolean)[]; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; -const NATIVE_MODULE_WITH_ARRAY_WITH_ALIAS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export type SomeString = string; - -export interface Spec extends TurboModule { - readonly getArray: (arg: Array) => Array; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; -const NATIVE_MODULE_WITH_ARRAY2_WITH_ALIAS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export type SomeString = string; - -export interface Spec extends TurboModule { - readonly getArray: (arg: SomeString[]) => string[]; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; -const NATIVE_MODULE_WITH_COMPLEX_ARRAY = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly getArray: ( - arg: Array>>>>, - ) => Array>>; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; -const NATIVE_MODULE_WITH_COMPLEX_ARRAY2 = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly getArray: ( - arg: string[][][][][], - ) => string[][][]; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; -const NATIVE_MODULE_WITH_PROMISE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export type String = string; -export type SomeObj = { a: string }; - -export interface Spec extends TurboModule { - readonly getValueWithPromise: () => Promise; - readonly getValueWithPromiseDefinedSomewhereElse: () => Promise; - readonly getValueWithPromiseObjDefinedSomewhereElse: () => Promise; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; -const NATIVE_MODULE_WITH_CALLBACK = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly getValueWithCallback: ( - callback: (value: string, arr: Array>) => void, - ) => void; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; -const NATIVE_MODULE_WITH_UNION = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export type ChooseInt = 1 | 2 | 3; -export type ChooseFloat = 1.44 | 2.88 | 5.76; -export type ChooseObject = {} | {low: string}; -export type ChooseString = 'One' | 'Two' | 'Three'; - -export interface Spec extends TurboModule { - readonly getUnion: (chooseInt: ChooseInt, chooseFloat: ChooseFloat, chooseObject: ChooseObject, chooseString: ChooseString) => ChooseObject; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; -const ANDROID_ONLY_NATIVE_MODULE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule {} - -export default TurboModuleRegistry.getEnforcing( - 'SampleTurboModuleAndroid', -); -`; -const IOS_ONLY_NATIVE_MODULE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export enum Quality { - SD, - HD, -} - -export enum Resolution { - Low = 720, - High = 1080, -} - -export enum Floppy { - LowDensity = 0.72, - HighDensity = 1.44, -} - -export enum StringOptions { - One = 'one', - Two = 'two', - Three = 'three', -} - -export interface Spec extends TurboModule { - readonly getEnums: (quality: Quality, resolution?: Resolution, floppy: Floppy, stringOptions: StringOptions) => string; -} - -export default TurboModuleRegistry.getEnforcing( - 'SampleTurboModuleIOS', -); -`; -const CXX_ONLY_NATIVE_MODULE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export enum Quality { - SD, - HD, -} - -export enum Resolution { - Low = 720, - High = 1080, -} - -export enum Floppy { - LowDensity = 0.72, - HighDensity = 1.44, -} - -export enum StringOptions { - One = 'one', - Two = 'two', - Three = 'three', -} - -export type ChooseInt = 1 | 2 | 3; -export type ChooseFloat = 1.44 | 2.88 | 5.76; -export type ChooseObject = {} | {low: string}; -export type ChooseString = 'One' | 'Two' | 'Three'; - -export type BinaryTreeNode = { - left?: BinaryTreeNode, - value: number, - right?: BinaryTreeNode, -}; - -export type GraphNode = { - label: string, - neighbors?: Array, -}; - -export interface Spec extends TurboModule { - readonly getCallback: () => () => void; - readonly getMixed: (arg: unknown) => unknown; - readonly getEnums: (quality: Quality, resolution?: Resolution, floppy: Floppy, stringOptions: StringOptions) => string; - readonly getBinaryTreeNode: (arg: BinaryTreeNode) => BinaryTreeNode; - readonly getGraphNode: (arg: GraphNode) => GraphNode; - readonly getMap: (arg: {[a: string]: number | null;}) => {[b: string]: number | null;}; - readonly getAnotherMap: (arg: {[key: string]: string}) => {[key: string]: string}; - readonly getUnion: (chooseInt: ChooseInt, chooseFloat: ChooseFloat, chooseObject: ChooseObject, chooseString: ChooseString) => ChooseObject; -} - -export default TurboModuleRegistry.getEnforcing( - 'SampleTurboModuleCxx', -); -`; -module.exports = { - NATIVE_MODULE_WITH_OBJECT_WITH_OBJECT_DEFINED_IN_FILE_AS_PROPERTY, - NATIVE_MODULE_WITH_ARRAY_WITH_UNION_AND_TOUPLE, - NATIVE_MODULE_WITH_ARRAY2_WITH_UNION_AND_TOUPLE, - NATIVE_MODULE_WITH_FLOAT_AND_INT32, - NATIVE_MODULE_WITH_ALIASES, - NATIVE_MODULE_WITH_NESTED_ALIASES, - NATIVE_MODULE_WITH_NESTED_INTERFACES, - NATIVE_MODULE_WITH_INTERSECTION_TYPES, - NATIVE_MODULE_WITH_PROMISE, - NATIVE_MODULE_WITH_COMPLEX_OBJECTS, - NATIVE_MODULE_WITH_COMPLEX_OBJECTS_WITH_NULLABLE_KEY, - NATIVE_MODULE_WITH_SIMPLE_OBJECT, - NATIVE_MODULE_WITH_UNSAFE_OBJECT, - NATIVE_MODULE_WITH_PARTIALS, - NATIVE_MODULE_WITH_PARTIALS_COMPLEX, - NATIVE_MODULE_WITH_ROOT_TAG, - NATIVE_MODULE_WITH_NULLABLE_PARAM, - NATIVE_MODULE_WITH_BASIC_ARRAY, - NATIVE_MODULE_WITH_BASIC_ARRAY2, - NATIVE_MODULE_WITH_COMPLEX_ARRAY, - NATIVE_MODULE_WITH_COMPLEX_ARRAY2, - NATIVE_MODULE_WITH_ARRAY_WITH_ALIAS, - NATIVE_MODULE_WITH_ARRAY2_WITH_ALIAS, - NATIVE_MODULE_WITH_BASIC_PARAM_TYPES, - NATIVE_MODULE_WITH_CALLBACK, - NATIVE_MODULE_WITH_UNION, - EMPTY_NATIVE_MODULE, - ANDROID_ONLY_NATIVE_MODULE, - IOS_ONLY_NATIVE_MODULE, - CXX_ONLY_NATIVE_MODULE, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/typescript/modules/__test_fixtures__/fixtures.js.flow b/node_modules/@react-native/codegen/lib/parsers/typescript/modules/__test_fixtures__/fixtures.js.flow deleted file mode 100644 index 09a26837f..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/typescript/modules/__test_fixtures__/fixtures.js.flow +++ /dev/null @@ -1,886 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -// @licenselint-loose-mode - -const EMPTY_NATIVE_MODULE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; - -const NATIVE_MODULE_WITH_COMPLEX_OBJECTS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export type String = string; - -export interface Spec extends TurboModule { - // Exported methods. - readonly getObject: (arg: {const1: {const1: boolean}}) => { - const1: {const1: boolean}, - }; - readonly getReadOnlyObject: (arg: Readonly<{const1: Readonly<{const1: boolean}>}>) => Readonly<{ - const1: {const1: boolean}, - }>; - readonly getObject2: (arg: { a: String }) => Object; - readonly getObjectInArray: (arg: {const1: {const1: boolean}}) => Array<{ - const1: {const1: boolean}, - }>; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; - -const NATIVE_MODULE_WITH_COMPLEX_OBJECTS_WITH_NULLABLE_KEY = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export type String = string; - -export interface Spec extends TurboModule { - readonly getConstants: () => { - isTesting: boolean; - reactNativeVersion: { - major: number; - minor: number; - patch?: number; - prerelease: number | null | undefined; - }; - forceTouchAvailable: boolean; - osVersion: string; - systemName: string; - interfaceIdiom: string; - }; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; - -const NATIVE_MODULE_WITH_BASIC_PARAM_TYPES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly passBool?: (arg: boolean) => void; - readonly passNumber: (arg: number) => void; - readonly passString: (arg: string) => void; - readonly passStringish: (arg: Stringish) => void; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULE_WITH_ALIASES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -type NumNum = number; -export type Num = (arg: NumNum) => void; -type Num2 = Num; -export type Void = void; -export type A = number; -export type B = number; -export type ObjectAlias = { - x: number; - y: number; - label: string; - truthy: boolean; -}; -export type ReadOnlyAlias = Readonly; - -export interface Spec extends TurboModule { - // Exported methods. - readonly getNumber: Num2; - readonly getVoid: () => Void; - readonly getArray: (a: Array) => {a: B}; - readonly getStringFromAlias: (a: ObjectAlias) => string; - readonly getStringFromNullableAlias: (a: ObjectAlias | null) => string; - readonly getStringFromReadOnlyAlias: (a: ReadOnlyAlias) => string; - readonly getStringFromNullableReadOnlyAlias: (a: ReadOnlyAlias | null) => string; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; - -const NATIVE_MODULE_WITH_NESTED_ALIASES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -type Bar = { - z: number -}; - -type Foo = { - bar1: Bar, - bar2: Bar, -}; - -export interface Spec extends TurboModule { - // Exported methods. - foo1: (x: Foo) => Foo; - foo2: (x: Foo) => void; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULE_WITH_NESTED_INTERFACES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -interface Bar { - z: number -}; - -interface Base1 { - bar1: Bar, -} - -interface Base2 { - bar2: Bar, -} - -interface Base3 extends Base2 { - bar3: Bar, -} - -interface Foo extends Base1, Base3 { - bar4: Bar, -}; - -export interface Spec extends TurboModule { - // Exported methods. - foo1: (x: Foo) => Foo; - foo2: (x: Foo) => void; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULE_WITH_INTERSECTION_TYPES = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - - -import type {TurboModule} from '../RCTExport'; -import * as TurboModuleRegistry from '../TurboModuleRegistry'; - -type Bar = { - z: number -}; - -type Base1 = { - bar1: Bar, -} - -type Base2 = { - bar2: Bar, -} - -type Base3 = Base2 & { - bar3: Bar, -} - -type Foo = Base1 & Base3 & { - bar4: Bar, -}; - -export interface Spec extends TurboModule { - // Exported methods. - foo1: (x: Foo) => Foo; - foo2: (x: Foo) => void; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const NATIVE_MODULE_WITH_FLOAT_AND_INT32 = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import type {Int32, Float} from 'react-native/Libraries/Types/CodegenTypes'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly getInt: (arg: Int32) => Int32; - readonly getFloat: (arg: Float) => Float; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; - -const NATIVE_MODULE_WITH_SIMPLE_OBJECT = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly getObject: (o: Object) => Object, -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; - -const NATIVE_MODULE_WITH_UNSAFE_OBJECT = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; -import type {UnsafeObject} from 'react-native/Libraries/Types/CodegenTypes'; - -export interface Spec extends TurboModule { - readonly getUnsafeObject: (o: UnsafeObject) => UnsafeObject; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; - -const NATIVE_MODULE_WITH_PARTIALS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export type SomeObj = { - a: string, - b?: boolean, -}; - -export interface Spec extends TurboModule { - getSomeObj: () => SomeObj; - getPartialSomeObj: () => Partial; - getSomeObjFromPartialSomeObj: (value: Partial) => SomeObj; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; - -const NATIVE_MODULE_WITH_PARTIALS_COMPLEX = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export type SomeObj = { - a: string, - b?: boolean, -}; - -export type PartialSomeObj = Partial; - -export interface Spec extends TurboModule { - getPartialPartial: (value1: Partial, value2: PartialSomeObj) => SomeObj; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; - -const NATIVE_MODULE_WITH_ROOT_TAG = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type { - TurboModule, - RootTag, -} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly getRootTag: (rootTag: RootTag) => RootTag; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; - -const NATIVE_MODULE_WITH_NULLABLE_PARAM = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly voidFunc: (arg: string | null | undefined) => void; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; - -const NATIVE_MODULE_WITH_BASIC_ARRAY = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly getArray: (arg: Array) => (Array<(string)>); - readonly getArray: (arg: ReadonlyArray) => (ReadonlyArray<(string)>); -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; - -const NATIVE_MODULE_WITH_BASIC_ARRAY2 = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly getArray: (arg: string[]) => ((string)[]); - readonly getArray: (arg: readonly string[]) => (readonly (string)[]); -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; - -const NATIVE_MODULE_WITH_OBJECT_WITH_OBJECT_DEFINED_IN_FILE_AS_PROPERTY = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -type DisplayMetricsAndroid = { - width: number; -}; - -export interface Spec extends TurboModule { - readonly getConstants: () => { - readonly Dimensions: { - windowPhysicalPixels: DisplayMetricsAndroid; - }; - }; - readonly getConstants2: () => Readonly<{ - readonly Dimensions: { - windowPhysicalPixels: DisplayMetricsAndroid; - }; - }>; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; - -const NATIVE_MODULE_WITH_ARRAY_WITH_UNION_AND_TOUPLE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly getArray: ( - arg: Array<[string, string]>, - ) => Array; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; - -const NATIVE_MODULE_WITH_ARRAY2_WITH_UNION_AND_TOUPLE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - getArray( - arg: [string, string][], - ): (string | number | boolean)[]; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; - -const NATIVE_MODULE_WITH_ARRAY_WITH_ALIAS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export type SomeString = string; - -export interface Spec extends TurboModule { - readonly getArray: (arg: Array) => Array; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; - -const NATIVE_MODULE_WITH_ARRAY2_WITH_ALIAS = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export type SomeString = string; - -export interface Spec extends TurboModule { - readonly getArray: (arg: SomeString[]) => string[]; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; - -const NATIVE_MODULE_WITH_COMPLEX_ARRAY = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly getArray: ( - arg: Array>>>>, - ) => Array>>; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; - -const NATIVE_MODULE_WITH_COMPLEX_ARRAY2 = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly getArray: ( - arg: string[][][][][], - ) => string[][][]; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; - -const NATIVE_MODULE_WITH_PROMISE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export type String = string; -export type SomeObj = { a: string }; - -export interface Spec extends TurboModule { - readonly getValueWithPromise: () => Promise; - readonly getValueWithPromiseDefinedSomewhereElse: () => Promise; - readonly getValueWithPromiseObjDefinedSomewhereElse: () => Promise; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; - -const NATIVE_MODULE_WITH_CALLBACK = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule { - readonly getValueWithCallback: ( - callback: (value: string, arr: Array>) => void, - ) => void; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); -`; - -const NATIVE_MODULE_WITH_UNION = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export type ChooseInt = 1 | 2 | 3; -export type ChooseFloat = 1.44 | 2.88 | 5.76; -export type ChooseObject = {} | {low: string}; -export type ChooseString = 'One' | 'Two' | 'Three'; - -export interface Spec extends TurboModule { - readonly getUnion: (chooseInt: ChooseInt, chooseFloat: ChooseFloat, chooseObject: ChooseObject, chooseString: ChooseString) => ChooseObject; -} - -export default TurboModuleRegistry.getEnforcing('SampleTurboModule'); - -`; - -const ANDROID_ONLY_NATIVE_MODULE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export interface Spec extends TurboModule {} - -export default TurboModuleRegistry.getEnforcing( - 'SampleTurboModuleAndroid', -); -`; - -const IOS_ONLY_NATIVE_MODULE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export enum Quality { - SD, - HD, -} - -export enum Resolution { - Low = 720, - High = 1080, -} - -export enum Floppy { - LowDensity = 0.72, - HighDensity = 1.44, -} - -export enum StringOptions { - One = 'one', - Two = 'two', - Three = 'three', -} - -export interface Spec extends TurboModule { - readonly getEnums: (quality: Quality, resolution?: Resolution, floppy: Floppy, stringOptions: StringOptions) => string; -} - -export default TurboModuleRegistry.getEnforcing( - 'SampleTurboModuleIOS', -); -`; - -const CXX_ONLY_NATIVE_MODULE = ` -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; -import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry'; - -export enum Quality { - SD, - HD, -} - -export enum Resolution { - Low = 720, - High = 1080, -} - -export enum Floppy { - LowDensity = 0.72, - HighDensity = 1.44, -} - -export enum StringOptions { - One = 'one', - Two = 'two', - Three = 'three', -} - -export type ChooseInt = 1 | 2 | 3; -export type ChooseFloat = 1.44 | 2.88 | 5.76; -export type ChooseObject = {} | {low: string}; -export type ChooseString = 'One' | 'Two' | 'Three'; - -export type BinaryTreeNode = { - left?: BinaryTreeNode, - value: number, - right?: BinaryTreeNode, -}; - -export type GraphNode = { - label: string, - neighbors?: Array, -}; - -export interface Spec extends TurboModule { - readonly getCallback: () => () => void; - readonly getMixed: (arg: unknown) => unknown; - readonly getEnums: (quality: Quality, resolution?: Resolution, floppy: Floppy, stringOptions: StringOptions) => string; - readonly getBinaryTreeNode: (arg: BinaryTreeNode) => BinaryTreeNode; - readonly getGraphNode: (arg: GraphNode) => GraphNode; - readonly getMap: (arg: {[a: string]: number | null;}) => {[b: string]: number | null;}; - readonly getAnotherMap: (arg: {[key: string]: string}) => {[key: string]: string}; - readonly getUnion: (chooseInt: ChooseInt, chooseFloat: ChooseFloat, chooseObject: ChooseObject, chooseString: ChooseString) => ChooseObject; -} - -export default TurboModuleRegistry.getEnforcing( - 'SampleTurboModuleCxx', -); -`; - -module.exports = { - NATIVE_MODULE_WITH_OBJECT_WITH_OBJECT_DEFINED_IN_FILE_AS_PROPERTY, - NATIVE_MODULE_WITH_ARRAY_WITH_UNION_AND_TOUPLE, - NATIVE_MODULE_WITH_ARRAY2_WITH_UNION_AND_TOUPLE, - NATIVE_MODULE_WITH_FLOAT_AND_INT32, - NATIVE_MODULE_WITH_ALIASES, - NATIVE_MODULE_WITH_NESTED_ALIASES, - NATIVE_MODULE_WITH_NESTED_INTERFACES, - NATIVE_MODULE_WITH_INTERSECTION_TYPES, - NATIVE_MODULE_WITH_PROMISE, - NATIVE_MODULE_WITH_COMPLEX_OBJECTS, - NATIVE_MODULE_WITH_COMPLEX_OBJECTS_WITH_NULLABLE_KEY, - NATIVE_MODULE_WITH_SIMPLE_OBJECT, - NATIVE_MODULE_WITH_UNSAFE_OBJECT, - NATIVE_MODULE_WITH_PARTIALS, - NATIVE_MODULE_WITH_PARTIALS_COMPLEX, - NATIVE_MODULE_WITH_ROOT_TAG, - NATIVE_MODULE_WITH_NULLABLE_PARAM, - NATIVE_MODULE_WITH_BASIC_ARRAY, - NATIVE_MODULE_WITH_BASIC_ARRAY2, - NATIVE_MODULE_WITH_COMPLEX_ARRAY, - NATIVE_MODULE_WITH_COMPLEX_ARRAY2, - NATIVE_MODULE_WITH_ARRAY_WITH_ALIAS, - NATIVE_MODULE_WITH_ARRAY2_WITH_ALIAS, - NATIVE_MODULE_WITH_BASIC_PARAM_TYPES, - NATIVE_MODULE_WITH_CALLBACK, - NATIVE_MODULE_WITH_UNION, - EMPTY_NATIVE_MODULE, - ANDROID_ONLY_NATIVE_MODULE, - IOS_ONLY_NATIVE_MODULE, - CXX_ONLY_NATIVE_MODULE, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/typescript/modules/index.js b/node_modules/@react-native/codegen/lib/parsers/typescript/modules/index.js deleted file mode 100644 index 01a56dd34..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/typescript/modules/index.js +++ /dev/null @@ -1,388 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('../../errors'), - UnsupportedGenericParserError = _require.UnsupportedGenericParserError, - UnsupportedTypeAnnotationParserError = - _require.UnsupportedTypeAnnotationParserError; -const _require2 = require('../../parsers-commons'), - parseObjectProperty = _require2.parseObjectProperty; -const _require3 = require('../../parsers-primitives'), - emitArrayType = _require3.emitArrayType, - emitCommonTypes = _require3.emitCommonTypes, - emitDictionary = _require3.emitDictionary, - emitFunction = _require3.emitFunction, - emitPromise = _require3.emitPromise, - emitRootTag = _require3.emitRootTag, - emitUnion = _require3.emitUnion, - translateArrayTypeAnnotation = _require3.translateArrayTypeAnnotation, - typeAliasResolution = _require3.typeAliasResolution, - typeEnumResolution = _require3.typeEnumResolution; -const _require4 = require('../components/componentsUtils'), - flattenProperties = _require4.flattenProperties; -const _require5 = require('../parseTopLevelType'), - flattenIntersectionType = _require5.flattenIntersectionType; -function translateObjectTypeAnnotation( - hasteModuleName, - /** - * TODO(T108222691): Use flow-types for @babel/parser - */ - typeScriptTypeAnnotation, - nullable, - objectMembers, - typeResolutionStatus, - baseTypes, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, -) { - // $FlowFixMe[missing-type-arg] - const properties = objectMembers - .map(property => { - return tryParse(() => { - return parseObjectProperty( - typeScriptTypeAnnotation, - property, - hasteModuleName, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - nullable, - translateTypeAnnotation, - parser, - ); - }); - }) - .filter(Boolean); - let objectTypeAnnotation; - if (baseTypes.length === 0) { - objectTypeAnnotation = { - type: 'ObjectTypeAnnotation', - properties, - }; - } else { - objectTypeAnnotation = { - type: 'ObjectTypeAnnotation', - properties, - baseTypes, - }; - } - return typeAliasResolution( - typeResolutionStatus, - objectTypeAnnotation, - aliasMap, - nullable, - ); -} -function translateTypeReferenceAnnotation( - typeName, - nullable, - typeAnnotation, - hasteModuleName, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, -) { - switch (typeName) { - case 'RootTag': { - return emitRootTag(nullable); - } - case 'Promise': { - return emitPromise( - hasteModuleName, - typeAnnotation, - parser, - nullable, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - translateTypeAnnotation, - ); - } - case 'Array': - case 'ReadonlyArray': { - return emitArrayType( - hasteModuleName, - typeAnnotation, - parser, - types, - aliasMap, - enumMap, - cxxOnly, - nullable, - translateTypeAnnotation, - ); - } - default: { - const commonType = emitCommonTypes( - hasteModuleName, - types, - typeAnnotation, - aliasMap, - enumMap, - tryParse, - cxxOnly, - nullable, - parser, - ); - if (!commonType) { - throw new UnsupportedGenericParserError( - hasteModuleName, - typeAnnotation, - parser, - ); - } - return commonType; - } - } -} -function translateTypeAnnotation( - hasteModuleName, - /** - * TODO(T108222691): Use flow-types for @babel/parser - */ - typeScriptTypeAnnotation, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, -) { - const _parser$getResolvedTy = parser.getResolvedTypeAnnotation( - typeScriptTypeAnnotation, - types, - parser, - ), - nullable = _parser$getResolvedTy.nullable, - typeAnnotation = _parser$getResolvedTy.typeAnnotation, - typeResolutionStatus = _parser$getResolvedTy.typeResolutionStatus; - const resolveTypeaAnnotationFn = parser.getResolveTypeAnnotationFN(); - resolveTypeaAnnotationFn(typeScriptTypeAnnotation, types, parser); - switch (typeAnnotation.type) { - case 'TSArrayType': { - return translateArrayTypeAnnotation( - hasteModuleName, - types, - aliasMap, - enumMap, - cxxOnly, - 'Array', - typeAnnotation.elementType, - nullable, - translateTypeAnnotation, - parser, - ); - } - case 'TSTypeOperator': { - if ( - typeAnnotation.operator === 'readonly' && - typeAnnotation.typeAnnotation.type === 'TSArrayType' - ) { - return translateArrayTypeAnnotation( - hasteModuleName, - types, - aliasMap, - enumMap, - cxxOnly, - 'ReadonlyArray', - typeAnnotation.typeAnnotation.elementType, - nullable, - translateTypeAnnotation, - parser, - ); - } else { - throw new UnsupportedGenericParserError( - hasteModuleName, - typeAnnotation, - parser, - ); - } - } - case 'TSTypeReference': { - return translateTypeReferenceAnnotation( - parser.getTypeAnnotationName(typeAnnotation), - nullable, - typeAnnotation, - hasteModuleName, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, - ); - } - case 'TSInterfaceDeclaration': { - var _typeAnnotation$exten; - const baseTypes = ( - (_typeAnnotation$exten = typeAnnotation.extends) !== null && - _typeAnnotation$exten !== void 0 - ? _typeAnnotation$exten - : [] - ).map(extend => extend.expression.name); - for (const baseType of baseTypes) { - // ensure base types exist and appear in aliasMap - translateTypeAnnotation( - hasteModuleName, - { - type: 'TSTypeReference', - typeName: { - type: 'Identifier', - name: baseType, - }, - }, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, - ); - } - return translateObjectTypeAnnotation( - hasteModuleName, - typeScriptTypeAnnotation, - nullable, - flattenProperties([typeAnnotation], types, parser), - typeResolutionStatus, - baseTypes, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, - ); - } - case 'TSIntersectionType': { - return translateObjectTypeAnnotation( - hasteModuleName, - typeScriptTypeAnnotation, - nullable, - flattenProperties( - flattenIntersectionType(typeAnnotation, types), - types, - parser, - ), - typeResolutionStatus, - [], - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, - ); - } - case 'TSTypeLiteral': { - // if there is TSIndexSignature, then it is a dictionary - if (typeAnnotation.members) { - const indexSignatures = typeAnnotation.members.filter( - member => member.type === 'TSIndexSignature', - ); - if (indexSignatures.length > 0) { - // check the property type to prevent developers from using unsupported types - // the return value from `translateTypeAnnotation` is unused - const propertyType = indexSignatures[0].typeAnnotation; - const valueType = translateTypeAnnotation( - hasteModuleName, - propertyType, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, - ); - // no need to do further checking - return emitDictionary(nullable, valueType); - } - } - return translateObjectTypeAnnotation( - hasteModuleName, - typeScriptTypeAnnotation, - nullable, - typeAnnotation.members, - typeResolutionStatus, - [], - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, - ); - } - case 'TSEnumDeclaration': { - return typeEnumResolution( - typeAnnotation, - typeResolutionStatus, - nullable, - hasteModuleName, - enumMap, - parser, - ); - } - case 'TSFunctionType': { - return emitFunction( - nullable, - hasteModuleName, - typeAnnotation, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - translateTypeAnnotation, - parser, - ); - } - case 'TSUnionType': { - return emitUnion(nullable, hasteModuleName, typeAnnotation, parser); - } - default: { - const commonType = emitCommonTypes( - hasteModuleName, - types, - typeAnnotation, - aliasMap, - enumMap, - tryParse, - cxxOnly, - nullable, - parser, - ); - if (!commonType) { - throw new UnsupportedTypeAnnotationParserError( - hasteModuleName, - typeAnnotation, - parser.language(), - ); - } - return commonType; - } - } -} -module.exports = { - typeScriptTranslateTypeAnnotation: translateTypeAnnotation, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/typescript/modules/index.js.flow b/node_modules/@react-native/codegen/lib/parsers/typescript/modules/index.js.flow deleted file mode 100644 index 0b9206170..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/typescript/modules/index.js.flow +++ /dev/null @@ -1,398 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type { - NamedShape, - NativeModuleAliasMap, - NativeModuleBaseTypeAnnotation, - NativeModuleEnumMap, - NativeModuleTypeAnnotation, - Nullable, -} from '../../../CodegenSchema'; -import type {Parser} from '../../parser'; -import type { - ParserErrorCapturer, - TypeDeclarationMap, - TypeResolutionStatus, -} from '../../utils'; - -const { - UnsupportedGenericParserError, - UnsupportedTypeAnnotationParserError, -} = require('../../errors'); -const {parseObjectProperty} = require('../../parsers-commons'); -const { - emitArrayType, - emitCommonTypes, - emitDictionary, - emitFunction, - emitPromise, - emitRootTag, - emitUnion, - translateArrayTypeAnnotation, - typeAliasResolution, - typeEnumResolution, -} = require('../../parsers-primitives'); -const {flattenProperties} = require('../components/componentsUtils'); -const {flattenIntersectionType} = require('../parseTopLevelType'); - -function translateObjectTypeAnnotation( - hasteModuleName: string, - /** - * TODO(T108222691): Use flow-types for @babel/parser - */ - typeScriptTypeAnnotation: $FlowFixMe, - nullable: boolean, - objectMembers: $ReadOnlyArray<$FlowFixMe>, - typeResolutionStatus: TypeResolutionStatus, - baseTypes: $ReadOnlyArray, - types: TypeDeclarationMap, - aliasMap: {...NativeModuleAliasMap}, - enumMap: {...NativeModuleEnumMap}, - tryParse: ParserErrorCapturer, - cxxOnly: boolean, - parser: Parser, -): Nullable { - // $FlowFixMe[missing-type-arg] - const properties = objectMembers - .map>>(property => { - return tryParse(() => { - return parseObjectProperty( - typeScriptTypeAnnotation, - property, - hasteModuleName, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - nullable, - translateTypeAnnotation, - parser, - ); - }); - }) - .filter(Boolean); - - let objectTypeAnnotation; - if (baseTypes.length === 0) { - objectTypeAnnotation = { - type: 'ObjectTypeAnnotation', - properties, - }; - } else { - objectTypeAnnotation = { - type: 'ObjectTypeAnnotation', - properties, - baseTypes, - }; - } - - return typeAliasResolution( - typeResolutionStatus, - objectTypeAnnotation, - aliasMap, - nullable, - ); -} - -function translateTypeReferenceAnnotation( - typeName: string, - nullable: boolean, - typeAnnotation: $FlowFixMe, - hasteModuleName: string, - types: TypeDeclarationMap, - aliasMap: {...NativeModuleAliasMap}, - enumMap: {...NativeModuleEnumMap}, - tryParse: ParserErrorCapturer, - cxxOnly: boolean, - parser: Parser, -): Nullable { - switch (typeName) { - case 'RootTag': { - return emitRootTag(nullable); - } - case 'Promise': { - return emitPromise( - hasteModuleName, - typeAnnotation, - parser, - nullable, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - translateTypeAnnotation, - ); - } - case 'Array': - case 'ReadonlyArray': { - return emitArrayType( - hasteModuleName, - typeAnnotation, - parser, - types, - aliasMap, - enumMap, - cxxOnly, - nullable, - translateTypeAnnotation, - ); - } - default: { - const commonType = emitCommonTypes( - hasteModuleName, - types, - typeAnnotation, - aliasMap, - enumMap, - tryParse, - cxxOnly, - nullable, - parser, - ); - - if (!commonType) { - throw new UnsupportedGenericParserError( - hasteModuleName, - typeAnnotation, - parser, - ); - } - return commonType; - } - } -} -function translateTypeAnnotation( - hasteModuleName: string, - /** - * TODO(T108222691): Use flow-types for @babel/parser - */ - typeScriptTypeAnnotation: $FlowFixMe, - types: TypeDeclarationMap, - aliasMap: {...NativeModuleAliasMap}, - enumMap: {...NativeModuleEnumMap}, - tryParse: ParserErrorCapturer, - cxxOnly: boolean, - parser: Parser, -): Nullable { - const {nullable, typeAnnotation, typeResolutionStatus} = - parser.getResolvedTypeAnnotation(typeScriptTypeAnnotation, types, parser); - const resolveTypeaAnnotationFn = parser.getResolveTypeAnnotationFN(); - resolveTypeaAnnotationFn(typeScriptTypeAnnotation, types, parser); - - switch (typeAnnotation.type) { - case 'TSArrayType': { - return translateArrayTypeAnnotation( - hasteModuleName, - types, - aliasMap, - enumMap, - cxxOnly, - 'Array', - typeAnnotation.elementType, - nullable, - translateTypeAnnotation, - parser, - ); - } - case 'TSTypeOperator': { - if ( - typeAnnotation.operator === 'readonly' && - typeAnnotation.typeAnnotation.type === 'TSArrayType' - ) { - return translateArrayTypeAnnotation( - hasteModuleName, - types, - aliasMap, - enumMap, - cxxOnly, - 'ReadonlyArray', - typeAnnotation.typeAnnotation.elementType, - nullable, - translateTypeAnnotation, - parser, - ); - } else { - throw new UnsupportedGenericParserError( - hasteModuleName, - typeAnnotation, - parser, - ); - } - } - case 'TSTypeReference': { - return translateTypeReferenceAnnotation( - parser.getTypeAnnotationName(typeAnnotation), - nullable, - typeAnnotation, - hasteModuleName, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, - ); - } - case 'TSInterfaceDeclaration': { - const baseTypes = (typeAnnotation.extends ?? []).map( - extend => extend.expression.name, - ); - for (const baseType of baseTypes) { - // ensure base types exist and appear in aliasMap - translateTypeAnnotation( - hasteModuleName, - { - type: 'TSTypeReference', - typeName: {type: 'Identifier', name: baseType}, - }, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, - ); - } - - return translateObjectTypeAnnotation( - hasteModuleName, - typeScriptTypeAnnotation, - nullable, - flattenProperties([typeAnnotation], types, parser), - typeResolutionStatus, - baseTypes, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, - ); - } - case 'TSIntersectionType': { - return translateObjectTypeAnnotation( - hasteModuleName, - typeScriptTypeAnnotation, - nullable, - flattenProperties( - flattenIntersectionType(typeAnnotation, types), - types, - parser, - ), - typeResolutionStatus, - [], - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, - ); - } - case 'TSTypeLiteral': { - // if there is TSIndexSignature, then it is a dictionary - if (typeAnnotation.members) { - const indexSignatures = typeAnnotation.members.filter( - member => member.type === 'TSIndexSignature', - ); - if (indexSignatures.length > 0) { - // check the property type to prevent developers from using unsupported types - // the return value from `translateTypeAnnotation` is unused - const propertyType = indexSignatures[0].typeAnnotation; - const valueType = translateTypeAnnotation( - hasteModuleName, - propertyType, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, - ); - // no need to do further checking - return emitDictionary(nullable, valueType); - } - } - - return translateObjectTypeAnnotation( - hasteModuleName, - typeScriptTypeAnnotation, - nullable, - typeAnnotation.members, - typeResolutionStatus, - [], - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - parser, - ); - } - case 'TSEnumDeclaration': { - return typeEnumResolution( - typeAnnotation, - typeResolutionStatus, - nullable, - hasteModuleName, - enumMap, - parser, - ); - } - case 'TSFunctionType': { - return emitFunction( - nullable, - hasteModuleName, - typeAnnotation, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - translateTypeAnnotation, - parser, - ); - } - case 'TSUnionType': { - return emitUnion(nullable, hasteModuleName, typeAnnotation, parser); - } - default: { - const commonType = emitCommonTypes( - hasteModuleName, - types, - typeAnnotation, - aliasMap, - enumMap, - tryParse, - cxxOnly, - nullable, - parser, - ); - - if (!commonType) { - throw new UnsupportedTypeAnnotationParserError( - hasteModuleName, - typeAnnotation, - parser.language(), - ); - } - return commonType; - } - } -} - -module.exports = { - typeScriptTranslateTypeAnnotation: translateTypeAnnotation, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/typescript/parseTopLevelType.js b/node_modules/@react-native/codegen/lib/parsers/typescript/parseTopLevelType.js deleted file mode 100644 index 0ef998d89..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/typescript/parseTopLevelType.js +++ /dev/null @@ -1,203 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -function getValueFromTypes(value, types) { - switch (value.type) { - case 'TSTypeReference': - if (types[value.typeName.name]) { - return getValueFromTypes(types[value.typeName.name], types); - } else { - return value; - } - case 'TSTypeAliasDeclaration': - return getValueFromTypes(value.typeAnnotation, types); - default: - return value; - } -} -function isNull(t) { - return t.type === 'TSNullKeyword' || t.type === 'TSUndefinedKeyword'; -} -function isNullOrVoid(t) { - return isNull(t) || t.type === 'TSVoidKeyword'; -} -function couldBeNumericLiteral(type) { - return type === 'Literal' || type === 'NumericLiteral'; -} -function couldBeSimpleLiteral(type) { - return ( - couldBeNumericLiteral(type) || - type === 'StringLiteral' || - type === 'BooleanLiteral' - ); -} -function evaluateLiteral(literalNode) { - const valueType = literalNode.type; - if (valueType === 'TSLiteralType') { - const literal = literalNode.literal; - if (couldBeSimpleLiteral(literal.type)) { - if ( - typeof literal.value === 'string' || - typeof literal.value === 'number' || - typeof literal.value === 'boolean' - ) { - return literal.value; - } - } else if ( - literal.type === 'UnaryExpression' && - literal.operator === '-' && - couldBeNumericLiteral(literal.argument.type) && - typeof literal.argument.value === 'number' - ) { - return -literal.argument.value; - } - } else if (isNull(literalNode)) { - return null; - } - throw new Error( - 'The default value in WithDefault must be string, number, boolean or null .', - ); -} -function handleUnionAndParen(type, result, knownTypes) { - switch (type.type) { - case 'TSParenthesizedType': { - handleUnionAndParen(type.typeAnnotation, result, knownTypes); - break; - } - case 'TSUnionType': { - // the order is important - // result.optional must be set first - for (const t of type.types) { - if (isNullOrVoid(t)) { - result.optional = true; - } - } - for (const t of type.types) { - if (!isNullOrVoid(t)) { - handleUnionAndParen(t, result, knownTypes); - } - } - break; - } - case 'TSTypeReference': - if (type.typeName.name === 'Readonly') { - handleUnionAndParen(type.typeParameters.params[0], result, knownTypes); - } else if (type.typeName.name === 'WithDefault') { - if (result.optional) { - throw new Error( - 'WithDefault<> is optional and does not need to be marked as optional. Please remove the union of undefined and/or null', - ); - } - if (type.typeParameters.params.length !== 2) { - throw new Error( - 'WithDefault requires two parameters: type and default value.', - ); - } - if (result.defaultValue !== undefined) { - throw new Error( - 'Multiple WithDefault is not allowed nested or in a union type.', - ); - } - result.optional = true; - result.defaultValue = evaluateLiteral(type.typeParameters.params[1]); - handleUnionAndParen(type.typeParameters.params[0], result, knownTypes); - } else if (!knownTypes) { - result.unions.push(type); - } else { - const resolvedType = getValueFromTypes(type, knownTypes); - if ( - resolvedType.type === 'TSTypeReference' && - resolvedType.typeName.name === type.typeName.name - ) { - result.unions.push(type); - } else { - handleUnionAndParen(resolvedType, result, knownTypes); - } - } - break; - default: - result.unions.push(type); - } -} -function parseTopLevelType(type, knownTypes) { - let result = { - unions: [], - optional: false, - }; - handleUnionAndParen(type, result, knownTypes); - if (result.unions.length === 0) { - throw new Error('Union type could not be just null or undefined.'); - } else if (result.unions.length === 1) { - return { - type: result.unions[0], - optional: result.optional, - defaultValue: result.defaultValue, - }; - } else { - return { - type: { - type: 'TSUnionType', - types: result.unions, - }, - optional: result.optional, - defaultValue: result.defaultValue, - }; - } -} -function handleIntersectionAndParen(type, result, knownTypes) { - switch (type.type) { - case 'TSParenthesizedType': { - handleIntersectionAndParen(type.typeAnnotation, result, knownTypes); - break; - } - case 'TSIntersectionType': { - for (const t of type.types) { - handleIntersectionAndParen(t, result, knownTypes); - } - break; - } - case 'TSTypeReference': - if (type.typeName.name === 'Readonly') { - handleIntersectionAndParen( - type.typeParameters.params[0], - result, - knownTypes, - ); - } else if (type.typeName.name === 'WithDefault') { - throw new Error('WithDefault<> is now allowed in intersection types.'); - } else if (!knownTypes) { - result.push(type); - } else { - const resolvedType = getValueFromTypes(type, knownTypes); - if ( - resolvedType.type === 'TSTypeReference' && - resolvedType.typeName.name === type.typeName.name - ) { - result.push(type); - } else { - handleIntersectionAndParen(resolvedType, result, knownTypes); - } - } - break; - default: - result.push(type); - } -} -function flattenIntersectionType(type, knownTypes) { - const result = []; - handleIntersectionAndParen(type, result, knownTypes); - return result; -} -module.exports = { - parseTopLevelType, - flattenIntersectionType, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/typescript/parseTopLevelType.js.flow b/node_modules/@react-native/codegen/lib/parsers/typescript/parseTopLevelType.js.flow deleted file mode 100644 index eb43a78a0..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/typescript/parseTopLevelType.js.flow +++ /dev/null @@ -1,243 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type {TypeDeclarationMap} from '../utils'; - -export type LegalDefaultValues = string | number | boolean | null; - -type TopLevelTypeInternal = { - unions: Array<$FlowFixMe>, - optional: boolean, - defaultValue?: LegalDefaultValues, -}; - -export type TopLevelType = { - type: $FlowFixMe, - optional: boolean, - defaultValue?: LegalDefaultValues, -}; - -function getValueFromTypes( - value: $FlowFixMe, - types: TypeDeclarationMap, -): $FlowFixMe { - switch (value.type) { - case 'TSTypeReference': - if (types[value.typeName.name]) { - return getValueFromTypes(types[value.typeName.name], types); - } else { - return value; - } - case 'TSTypeAliasDeclaration': - return getValueFromTypes(value.typeAnnotation, types); - default: - return value; - } -} - -function isNull(t: $FlowFixMe) { - return t.type === 'TSNullKeyword' || t.type === 'TSUndefinedKeyword'; -} - -function isNullOrVoid(t: $FlowFixMe) { - return isNull(t) || t.type === 'TSVoidKeyword'; -} - -function couldBeNumericLiteral(type: string) { - return type === 'Literal' || type === 'NumericLiteral'; -} - -function couldBeSimpleLiteral(type: string) { - return ( - couldBeNumericLiteral(type) || - type === 'StringLiteral' || - type === 'BooleanLiteral' - ); -} - -function evaluateLiteral( - literalNode: $FlowFixMe, -): string | number | boolean | null { - const valueType = literalNode.type; - if (valueType === 'TSLiteralType') { - const literal = literalNode.literal; - if (couldBeSimpleLiteral(literal.type)) { - if ( - typeof literal.value === 'string' || - typeof literal.value === 'number' || - typeof literal.value === 'boolean' - ) { - return literal.value; - } - } else if ( - literal.type === 'UnaryExpression' && - literal.operator === '-' && - couldBeNumericLiteral(literal.argument.type) && - typeof literal.argument.value === 'number' - ) { - return -literal.argument.value; - } - } else if (isNull(literalNode)) { - return null; - } - - throw new Error( - 'The default value in WithDefault must be string, number, boolean or null .', - ); -} - -function handleUnionAndParen( - type: $FlowFixMe, - result: TopLevelTypeInternal, - knownTypes?: TypeDeclarationMap, -): void { - switch (type.type) { - case 'TSParenthesizedType': { - handleUnionAndParen(type.typeAnnotation, result, knownTypes); - break; - } - case 'TSUnionType': { - // the order is important - // result.optional must be set first - for (const t of type.types) { - if (isNullOrVoid(t)) { - result.optional = true; - } - } - for (const t of type.types) { - if (!isNullOrVoid(t)) { - handleUnionAndParen(t, result, knownTypes); - } - } - break; - } - case 'TSTypeReference': - if (type.typeName.name === 'Readonly') { - handleUnionAndParen(type.typeParameters.params[0], result, knownTypes); - } else if (type.typeName.name === 'WithDefault') { - if (result.optional) { - throw new Error( - 'WithDefault<> is optional and does not need to be marked as optional. Please remove the union of undefined and/or null', - ); - } - if (type.typeParameters.params.length !== 2) { - throw new Error( - 'WithDefault requires two parameters: type and default value.', - ); - } - if (result.defaultValue !== undefined) { - throw new Error( - 'Multiple WithDefault is not allowed nested or in a union type.', - ); - } - result.optional = true; - result.defaultValue = evaluateLiteral(type.typeParameters.params[1]); - handleUnionAndParen(type.typeParameters.params[0], result, knownTypes); - } else if (!knownTypes) { - result.unions.push(type); - } else { - const resolvedType = getValueFromTypes(type, knownTypes); - if ( - resolvedType.type === 'TSTypeReference' && - resolvedType.typeName.name === type.typeName.name - ) { - result.unions.push(type); - } else { - handleUnionAndParen(resolvedType, result, knownTypes); - } - } - break; - default: - result.unions.push(type); - } -} - -function parseTopLevelType( - type: $FlowFixMe, - knownTypes?: TypeDeclarationMap, -): TopLevelType { - let result: TopLevelTypeInternal = {unions: [], optional: false}; - handleUnionAndParen(type, result, knownTypes); - if (result.unions.length === 0) { - throw new Error('Union type could not be just null or undefined.'); - } else if (result.unions.length === 1) { - return { - type: result.unions[0], - optional: result.optional, - defaultValue: result.defaultValue, - }; - } else { - return { - type: {type: 'TSUnionType', types: result.unions}, - optional: result.optional, - defaultValue: result.defaultValue, - }; - } -} - -function handleIntersectionAndParen( - type: $FlowFixMe, - result: Array<$FlowFixMe>, - knownTypes?: TypeDeclarationMap, -): void { - switch (type.type) { - case 'TSParenthesizedType': { - handleIntersectionAndParen(type.typeAnnotation, result, knownTypes); - break; - } - case 'TSIntersectionType': { - for (const t of type.types) { - handleIntersectionAndParen(t, result, knownTypes); - } - break; - } - case 'TSTypeReference': - if (type.typeName.name === 'Readonly') { - handleIntersectionAndParen( - type.typeParameters.params[0], - result, - knownTypes, - ); - } else if (type.typeName.name === 'WithDefault') { - throw new Error('WithDefault<> is now allowed in intersection types.'); - } else if (!knownTypes) { - result.push(type); - } else { - const resolvedType = getValueFromTypes(type, knownTypes); - if ( - resolvedType.type === 'TSTypeReference' && - resolvedType.typeName.name === type.typeName.name - ) { - result.push(type); - } else { - handleIntersectionAndParen(resolvedType, result, knownTypes); - } - } - break; - default: - result.push(type); - } -} - -function flattenIntersectionType( - type: $FlowFixMe, - knownTypes?: TypeDeclarationMap, -): Array<$FlowFixMe> { - const result: Array<$FlowFixMe> = []; - handleIntersectionAndParen(type, result, knownTypes); - return result; -} - -module.exports = { - parseTopLevelType, - flattenIntersectionType, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/typescript/parser.d.ts b/node_modules/@react-native/codegen/lib/parsers/typescript/parser.d.ts deleted file mode 100644 index eeec1a78a..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/typescript/parser.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -import type { Parser } from '../parser'; -import type { SchemaType } from '../../CodegenSchema'; -import type { ParserType } from '../errors'; - -export declare class TypeScriptParser implements Parser { - language(): ParserType; - parseFile(filename: string): SchemaType; - parseString(contents: string, filename?: string): SchemaType; - parseModuleFixture(filename: string): SchemaType; -} diff --git a/node_modules/@react-native/codegen/lib/parsers/typescript/parser.js b/node_modules/@react-native/codegen/lib/parsers/typescript/parser.js deleted file mode 100644 index 25cbae4fa..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/typescript/parser.js +++ /dev/null @@ -1,532 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -function _defineProperty(obj, key, value) { - key = _toPropertyKey(key); - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true, - }); - } else { - obj[key] = value; - } - return obj; -} -function _toPropertyKey(arg) { - var key = _toPrimitive(arg, 'string'); - return typeof key === 'symbol' ? key : String(key); -} -function _toPrimitive(input, hint) { - if (typeof input !== 'object' || input === null) return input; - var prim = input[Symbol.toPrimitive]; - if (prim !== undefined) { - var res = prim.call(input, hint || 'default'); - if (typeof res !== 'object') return res; - throw new TypeError('@@toPrimitive must return a primitive value.'); - } - return (hint === 'string' ? String : Number)(input); -} -const _require = require('../errors'), - UnsupportedObjectPropertyTypeAnnotationParserError = - _require.UnsupportedObjectPropertyTypeAnnotationParserError; -const _require2 = require('../parsers-commons.js'), - buildModuleSchema = _require2.buildModuleSchema, - buildPropSchema = _require2.buildPropSchema, - buildSchema = _require2.buildSchema, - extendsForProp = _require2.extendsForProp, - handleGenericTypeAnnotation = _require2.handleGenericTypeAnnotation; -const _require3 = require('../parsers-primitives'), - Visitor = _require3.Visitor; -const _require4 = require('../schema.js'), - wrapComponentSchema = _require4.wrapComponentSchema; -const _require5 = require('./components'), - buildComponentSchema = _require5.buildComponentSchema; -const _require6 = require('./components/componentsUtils'), - flattenProperties = _require6.flattenProperties, - getSchemaInfo = _require6.getSchemaInfo, - getTypeAnnotation = _require6.getTypeAnnotation; -const _require7 = require('./modules'), - typeScriptTranslateTypeAnnotation = - _require7.typeScriptTranslateTypeAnnotation; -const _require8 = require('./parseTopLevelType'), - parseTopLevelType = _require8.parseTopLevelType; -// $FlowFixMe[untyped-import] Use flow-types for @babel/parser -const babelParser = require('@babel/parser'); -const fs = require('fs'); -const invariant = require('invariant'); -class TypeScriptParser { - constructor() { - _defineProperty( - this, - 'typeParameterInstantiation', - 'TSTypeParameterInstantiation', - ); - _defineProperty(this, 'typeAlias', 'TSTypeAliasDeclaration'); - _defineProperty(this, 'enumDeclaration', 'TSEnumDeclaration'); - _defineProperty(this, 'interfaceDeclaration', 'TSInterfaceDeclaration'); - _defineProperty(this, 'nullLiteralTypeAnnotation', 'TSNullKeyword'); - _defineProperty( - this, - 'undefinedLiteralTypeAnnotation', - 'TSUndefinedKeyword', - ); - } - isProperty(property) { - return property.type === 'TSPropertySignature'; - } - getKeyName(property, hasteModuleName) { - if (!this.isProperty(property)) { - throw new UnsupportedObjectPropertyTypeAnnotationParserError( - hasteModuleName, - property, - property.type, - this.language(), - ); - } - return property.key.name; - } - language() { - return 'TypeScript'; - } - getTypeAnnotationName(typeAnnotation) { - var _typeAnnotation$typeN; - return typeAnnotation === null || typeAnnotation === void 0 - ? void 0 - : (_typeAnnotation$typeN = typeAnnotation.typeName) === null || - _typeAnnotation$typeN === void 0 - ? void 0 - : _typeAnnotation$typeN.name; - } - checkIfInvalidModule(typeArguments) { - return ( - typeArguments.type !== 'TSTypeParameterInstantiation' || - typeArguments.params.length !== 1 || - typeArguments.params[0].type !== 'TSTypeReference' || - typeArguments.params[0].typeName.name !== 'Spec' - ); - } - remapUnionTypeAnnotationMemberNames(membersTypes) { - const remapLiteral = item => { - return item.literal - ? item.literal.type - .replace('NumericLiteral', 'NumberTypeAnnotation') - .replace('StringLiteral', 'StringTypeAnnotation') - : 'ObjectTypeAnnotation'; - }; - return [...new Set(membersTypes.map(remapLiteral))]; - } - parseFile(filename) { - const contents = fs.readFileSync(filename, 'utf8'); - return this.parseString(contents, filename); - } - parseString(contents, filename) { - return buildSchema( - contents, - filename, - wrapComponentSchema, - buildComponentSchema, - buildModuleSchema, - Visitor, - this, - typeScriptTranslateTypeAnnotation, - ); - } - parseModuleFixture(filename) { - const contents = fs.readFileSync(filename, 'utf8'); - return this.parseString(contents, 'path/NativeSampleTurboModule.ts'); - } - getAst(contents, filename) { - return babelParser.parse(contents, { - sourceType: 'module', - plugins: ['typescript'], - }).program; - } - getFunctionTypeAnnotationParameters(functionTypeAnnotation) { - return functionTypeAnnotation.parameters; - } - getFunctionNameFromParameter(parameter) { - return parameter.typeAnnotation; - } - getParameterName(parameter) { - return parameter.name; - } - getParameterTypeAnnotation(parameter) { - return parameter.typeAnnotation.typeAnnotation; - } - getFunctionTypeAnnotationReturnType(functionTypeAnnotation) { - return functionTypeAnnotation.typeAnnotation.typeAnnotation; - } - parseEnumMembersType(typeAnnotation) { - var _typeAnnotation$membe; - const enumInitializer = - (_typeAnnotation$membe = typeAnnotation.members[0]) === null || - _typeAnnotation$membe === void 0 - ? void 0 - : _typeAnnotation$membe.initializer; - const enumMembersType = - !enumInitializer || enumInitializer.type === 'StringLiteral' - ? 'StringTypeAnnotation' - : enumInitializer.type === 'NumericLiteral' - ? 'NumberTypeAnnotation' - : null; - if (!enumMembersType) { - throw new Error( - 'Enum values must be either blank, number, or string values.', - ); - } - return enumMembersType; - } - validateEnumMembersSupported(typeAnnotation, enumMembersType) { - if (!typeAnnotation.members || typeAnnotation.members.length === 0) { - throw new Error('Enums should have at least one member.'); - } - const enumInitializerType = - enumMembersType === 'StringTypeAnnotation' - ? 'StringLiteral' - : enumMembersType === 'NumberTypeAnnotation' - ? 'NumericLiteral' - : null; - typeAnnotation.members.forEach(member => { - var _member$initializer$t, _member$initializer; - if ( - ((_member$initializer$t = - (_member$initializer = member.initializer) === null || - _member$initializer === void 0 - ? void 0 - : _member$initializer.type) !== null && - _member$initializer$t !== void 0 - ? _member$initializer$t - : 'StringLiteral') !== enumInitializerType - ) { - throw new Error( - 'Enum values can not be mixed. They all must be either blank, number, or string values.', - ); - } - }); - } - parseEnumMembers(typeAnnotation) { - return typeAnnotation.members.map(member => { - var _member$initializer$v, _member$initializer2; - return { - name: member.id.name, - value: - (_member$initializer$v = - (_member$initializer2 = member.initializer) === null || - _member$initializer2 === void 0 - ? void 0 - : _member$initializer2.value) !== null && - _member$initializer$v !== void 0 - ? _member$initializer$v - : member.id.name, - }; - }); - } - isModuleInterface(node) { - var _node$extends; - return ( - node.type === 'TSInterfaceDeclaration' && - ((_node$extends = node.extends) === null || _node$extends === void 0 - ? void 0 - : _node$extends.length) === 1 && - node.extends[0].type === 'TSExpressionWithTypeArguments' && - node.extends[0].expression.name === 'TurboModule' - ); - } - isGenericTypeAnnotation(type) { - return type === 'TSTypeReference'; - } - extractAnnotatedElement(typeAnnotation, types) { - return types[typeAnnotation.typeParameters.params[0].typeName.name]; - } - - /** - * TODO(T108222691): Use flow-types for @babel/parser - */ - getTypes(ast) { - return ast.body.reduce((types, node) => { - switch (node.type) { - case 'ExportNamedDeclaration': { - if (node.declaration) { - switch (node.declaration.type) { - case 'TSTypeAliasDeclaration': - case 'TSInterfaceDeclaration': - case 'TSEnumDeclaration': { - types[node.declaration.id.name] = node.declaration; - break; - } - } - } - break; - } - case 'TSTypeAliasDeclaration': - case 'TSInterfaceDeclaration': - case 'TSEnumDeclaration': { - types[node.id.name] = node; - break; - } - } - return types; - }, {}); - } - callExpressionTypeParameters(callExpression) { - return callExpression.typeParameters || null; - } - computePartialProperties( - properties, - hasteModuleName, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - ) { - return properties.map(prop => { - return { - name: prop.key.name, - optional: true, - typeAnnotation: typeScriptTranslateTypeAnnotation( - hasteModuleName, - prop.typeAnnotation.typeAnnotation, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - this, - ), - }; - }); - } - functionTypeAnnotation(propertyValueType) { - return ( - propertyValueType === 'TSFunctionType' || - propertyValueType === 'TSMethodSignature' - ); - } - getTypeArgumentParamsFromDeclaration(declaration) { - return declaration.typeParameters.params; - } - - // This FlowFixMe is supposed to refer to typeArgumentParams and funcArgumentParams of generated AST. - getNativeComponentType(typeArgumentParams, funcArgumentParams) { - return { - propsTypeName: typeArgumentParams[0].typeName.name, - componentName: funcArgumentParams[0].value, - }; - } - getAnnotatedElementProperties(annotatedElement) { - return annotatedElement.typeAnnotation.members; - } - bodyProperties(typeAlias) { - return typeAlias.body.body; - } - convertKeywordToTypeAnnotation(keyword) { - switch (keyword) { - case 'TSBooleanKeyword': - return 'BooleanTypeAnnotation'; - case 'TSNumberKeyword': - return 'NumberTypeAnnotation'; - case 'TSVoidKeyword': - return 'VoidTypeAnnotation'; - case 'TSStringKeyword': - return 'StringTypeAnnotation'; - case 'TSUnknownKeyword': - return 'MixedTypeAnnotation'; - } - return keyword; - } - argumentForProp(prop) { - return prop.expression; - } - nameForArgument(prop) { - return prop.expression.name; - } - isOptionalProperty(property) { - return property.optional || false; - } - getGetSchemaInfoFN() { - return getSchemaInfo; - } - getTypeAnnotationFromProperty(property) { - return property.typeAnnotation.typeAnnotation; - } - getGetTypeAnnotationFN() { - return getTypeAnnotation; - } - getResolvedTypeAnnotation( - // TODO(T108222691): Use flow-types for @babel/parser - typeAnnotation, - types, - parser, - ) { - invariant( - typeAnnotation != null, - 'resolveTypeAnnotation(): typeAnnotation cannot be null', - ); - let node = - typeAnnotation.type === 'TSTypeAnnotation' - ? typeAnnotation.typeAnnotation - : typeAnnotation; - let nullable = false; - let typeResolutionStatus = { - successful: false, - }; - for (;;) { - const topLevelType = parseTopLevelType(node); - nullable = nullable || topLevelType.optional; - node = topLevelType.type; - if (node.type !== 'TSTypeReference') { - break; - } - const typeAnnotationName = this.getTypeAnnotationName(node); - const resolvedTypeAnnotation = types[typeAnnotationName]; - if (resolvedTypeAnnotation == null) { - break; - } - const _handleGenericTypeAnn = handleGenericTypeAnnotation( - node, - resolvedTypeAnnotation, - this, - ), - typeAnnotationNode = _handleGenericTypeAnn.typeAnnotation, - status = _handleGenericTypeAnn.typeResolutionStatus; - typeResolutionStatus = status; - node = typeAnnotationNode; - } - return { - nullable: nullable, - typeAnnotation: node, - typeResolutionStatus, - }; - } - getResolveTypeAnnotationFN() { - return (typeAnnotation, types, parser) => { - return this.getResolvedTypeAnnotation(typeAnnotation, types, parser); - }; - } - isEvent(typeAnnotation) { - if (typeAnnotation.type !== 'TSTypeReference') { - return false; - } - const eventNames = new Set(['BubblingEventHandler', 'DirectEventHandler']); - return eventNames.has(this.getTypeAnnotationName(typeAnnotation)); - } - isProp(name, typeAnnotation) { - if (typeAnnotation.type !== 'TSTypeReference') { - return true; - } - const isStyle = - name === 'style' && - typeAnnotation.type === 'GenericTypeAnnotation' && - this.getTypeAnnotationName(typeAnnotation) === 'ViewStyleProp'; - return !isStyle; - } - getProps(typeDefinition, types) { - const extendsProps = []; - const componentPropAsts = []; - const remaining = []; - for (const prop of typeDefinition) { - // find extends - if (prop.type === 'TSExpressionWithTypeArguments') { - const extend = extendsForProp(prop, types, this); - if (extend) { - extendsProps.push(extend); - continue; - } - } - remaining.push(prop); - } - - // find events and props - for (const prop of flattenProperties(remaining, types, this)) { - const topLevelType = parseTopLevelType( - prop.typeAnnotation.typeAnnotation, - types, - ); - if ( - prop.type === 'TSPropertySignature' && - !this.isEvent(topLevelType.type) && - this.isProp(prop.key.name, prop) - ) { - componentPropAsts.push(prop); - } - } - return { - props: componentPropAsts - .map(property => buildPropSchema(property, types, this)) - .filter(Boolean), - extendsProps, - }; - } - getProperties(typeName, types) { - const alias = types[typeName]; - if (!alias) { - throw new Error( - `Failed to find definition for "${typeName}", please check that you have a valid codegen typescript file`, - ); - } - const aliasKind = - alias.type === 'TSInterfaceDeclaration' ? 'interface' : 'type'; - try { - if (aliasKind === 'interface') { - var _alias$extends; - return [ - ...((_alias$extends = alias.extends) !== null && - _alias$extends !== void 0 - ? _alias$extends - : []), - ...alias.body.body, - ]; - } - return ( - alias.typeAnnotation.members || - alias.typeAnnotation.typeParameters.params[0].members || - alias.typeAnnotation.typeParameters.params - ); - } catch (e) { - throw new Error( - `Failed to find ${aliasKind} definition for "${typeName}", please check that you have a valid codegen typescript file`, - ); - } - } - nextNodeForTypeAlias(typeAnnotation) { - return typeAnnotation.typeAnnotation; - } - nextNodeForEnum(typeAnnotation) { - return typeAnnotation; - } - genericTypeAnnotationErrorMessage(typeAnnotation) { - return `A non GenericTypeAnnotation must be a type declaration ('${this.typeAlias}'), an interface ('${this.interfaceDeclaration}'), or enum ('${this.enumDeclaration}'). Instead, got the unsupported ${typeAnnotation.type}.`; - } - extractTypeFromTypeAnnotation(typeAnnotation) { - return typeAnnotation.type === 'TSTypeReference' - ? typeAnnotation.typeName.name - : typeAnnotation.type; - } - getObjectProperties(typeAnnotation) { - return typeAnnotation.members; - } - getLiteralValue(option) { - return option.literal.value; - } - getPaperTopLevelNameDeprecated(typeAnnotation) { - return typeAnnotation.typeParameters.params.length > 1 - ? typeAnnotation.typeParameters.params[1].literal.value - : null; - } -} -module.exports = { - TypeScriptParser, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/typescript/parser.js.flow b/node_modules/@react-native/codegen/lib/parsers/typescript/parser.js.flow deleted file mode 100644 index 7262b6030..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/typescript/parser.js.flow +++ /dev/null @@ -1,570 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -import type { - ExtendsPropsShape, - NamedShape, - NativeModuleAliasMap, - NativeModuleEnumMap, - NativeModuleEnumMembers, - NativeModuleEnumMemberType, - NativeModuleParamTypeAnnotation, - Nullable, - PropTypeAnnotation, - SchemaType, - UnionTypeAnnotationMemberType, -} from '../../CodegenSchema'; -import type {ParserType} from '../errors'; -import type { - GetSchemaInfoFN, - GetTypeAnnotationFN, - Parser, - ResolveTypeAnnotationFN, -} from '../parser'; -import type { - ParserErrorCapturer, - PropAST, - TypeDeclarationMap, - TypeResolutionStatus, -} from '../utils'; - -const { - UnsupportedObjectPropertyTypeAnnotationParserError, -} = require('../errors'); -const { - buildModuleSchema, - buildPropSchema, - buildSchema, - extendsForProp, - handleGenericTypeAnnotation, -} = require('../parsers-commons.js'); -const {Visitor} = require('../parsers-primitives'); -const {wrapComponentSchema} = require('../schema.js'); -const {buildComponentSchema} = require('./components'); -const { - flattenProperties, - getSchemaInfo, - getTypeAnnotation, -} = require('./components/componentsUtils'); -const {typeScriptTranslateTypeAnnotation} = require('./modules'); -const {parseTopLevelType} = require('./parseTopLevelType'); -// $FlowFixMe[untyped-import] Use flow-types for @babel/parser -const babelParser = require('@babel/parser'); -const fs = require('fs'); -const invariant = require('invariant'); - -class TypeScriptParser implements Parser { - typeParameterInstantiation: string = 'TSTypeParameterInstantiation'; - typeAlias: string = 'TSTypeAliasDeclaration'; - enumDeclaration: string = 'TSEnumDeclaration'; - interfaceDeclaration: string = 'TSInterfaceDeclaration'; - nullLiteralTypeAnnotation: string = 'TSNullKeyword'; - undefinedLiteralTypeAnnotation: string = 'TSUndefinedKeyword'; - - isProperty(property: $FlowFixMe): boolean { - return property.type === 'TSPropertySignature'; - } - - getKeyName(property: $FlowFixMe, hasteModuleName: string): string { - if (!this.isProperty(property)) { - throw new UnsupportedObjectPropertyTypeAnnotationParserError( - hasteModuleName, - property, - property.type, - this.language(), - ); - } - return property.key.name; - } - - language(): ParserType { - return 'TypeScript'; - } - - getTypeAnnotationName(typeAnnotation: $FlowFixMe): string { - return typeAnnotation?.typeName?.name; - } - - checkIfInvalidModule(typeArguments: $FlowFixMe): boolean { - return ( - typeArguments.type !== 'TSTypeParameterInstantiation' || - typeArguments.params.length !== 1 || - typeArguments.params[0].type !== 'TSTypeReference' || - typeArguments.params[0].typeName.name !== 'Spec' - ); - } - - remapUnionTypeAnnotationMemberNames( - membersTypes: $FlowFixMe[], - ): UnionTypeAnnotationMemberType[] { - const remapLiteral = (item: $FlowFixMe) => { - return item.literal - ? item.literal.type - .replace('NumericLiteral', 'NumberTypeAnnotation') - .replace('StringLiteral', 'StringTypeAnnotation') - : 'ObjectTypeAnnotation'; - }; - - return [...new Set(membersTypes.map(remapLiteral))]; - } - - parseFile(filename: string): SchemaType { - const contents = fs.readFileSync(filename, 'utf8'); - - return this.parseString(contents, filename); - } - - parseString(contents: string, filename: ?string): SchemaType { - return buildSchema( - contents, - filename, - wrapComponentSchema, - buildComponentSchema, - buildModuleSchema, - Visitor, - this, - typeScriptTranslateTypeAnnotation, - ); - } - - parseModuleFixture(filename: string): SchemaType { - const contents = fs.readFileSync(filename, 'utf8'); - - return this.parseString(contents, 'path/NativeSampleTurboModule.ts'); - } - - getAst(contents: string, filename?: ?string): $FlowFixMe { - return babelParser.parse(contents, { - sourceType: 'module', - plugins: ['typescript'], - }).program; - } - - getFunctionTypeAnnotationParameters( - functionTypeAnnotation: $FlowFixMe, - ): $ReadOnlyArray<$FlowFixMe> { - return functionTypeAnnotation.parameters; - } - - getFunctionNameFromParameter( - parameter: NamedShape>, - ): $FlowFixMe { - return parameter.typeAnnotation; - } - - getParameterName(parameter: $FlowFixMe): string { - return parameter.name; - } - - getParameterTypeAnnotation(parameter: $FlowFixMe): $FlowFixMe { - return parameter.typeAnnotation.typeAnnotation; - } - - getFunctionTypeAnnotationReturnType( - functionTypeAnnotation: $FlowFixMe, - ): $FlowFixMe { - return functionTypeAnnotation.typeAnnotation.typeAnnotation; - } - - parseEnumMembersType(typeAnnotation: $FlowFixMe): NativeModuleEnumMemberType { - const enumInitializer = typeAnnotation.members[0]?.initializer; - const enumMembersType: ?NativeModuleEnumMemberType = - !enumInitializer || enumInitializer.type === 'StringLiteral' - ? 'StringTypeAnnotation' - : enumInitializer.type === 'NumericLiteral' - ? 'NumberTypeAnnotation' - : null; - if (!enumMembersType) { - throw new Error( - 'Enum values must be either blank, number, or string values.', - ); - } - return enumMembersType; - } - - validateEnumMembersSupported( - typeAnnotation: $FlowFixMe, - enumMembersType: NativeModuleEnumMemberType, - ): void { - if (!typeAnnotation.members || typeAnnotation.members.length === 0) { - throw new Error('Enums should have at least one member.'); - } - - const enumInitializerType = - enumMembersType === 'StringTypeAnnotation' - ? 'StringLiteral' - : enumMembersType === 'NumberTypeAnnotation' - ? 'NumericLiteral' - : null; - - typeAnnotation.members.forEach(member => { - if ( - (member.initializer?.type ?? 'StringLiteral') !== enumInitializerType - ) { - throw new Error( - 'Enum values can not be mixed. They all must be either blank, number, or string values.', - ); - } - }); - } - - parseEnumMembers(typeAnnotation: $FlowFixMe): NativeModuleEnumMembers { - return typeAnnotation.members.map(member => ({ - name: member.id.name, - value: member.initializer?.value ?? member.id.name, - })); - } - - isModuleInterface(node: $FlowFixMe): boolean { - return ( - node.type === 'TSInterfaceDeclaration' && - node.extends?.length === 1 && - node.extends[0].type === 'TSExpressionWithTypeArguments' && - node.extends[0].expression.name === 'TurboModule' - ); - } - - isGenericTypeAnnotation(type: $FlowFixMe): boolean { - return type === 'TSTypeReference'; - } - - extractAnnotatedElement( - typeAnnotation: $FlowFixMe, - types: TypeDeclarationMap, - ): $FlowFixMe { - return types[typeAnnotation.typeParameters.params[0].typeName.name]; - } - - /** - * TODO(T108222691): Use flow-types for @babel/parser - */ - getTypes(ast: $FlowFixMe): TypeDeclarationMap { - return ast.body.reduce((types, node) => { - switch (node.type) { - case 'ExportNamedDeclaration': { - if (node.declaration) { - switch (node.declaration.type) { - case 'TSTypeAliasDeclaration': - case 'TSInterfaceDeclaration': - case 'TSEnumDeclaration': { - types[node.declaration.id.name] = node.declaration; - break; - } - } - } - break; - } - case 'TSTypeAliasDeclaration': - case 'TSInterfaceDeclaration': - case 'TSEnumDeclaration': { - types[node.id.name] = node; - break; - } - } - return types; - }, {}); - } - - callExpressionTypeParameters(callExpression: $FlowFixMe): $FlowFixMe | null { - return callExpression.typeParameters || null; - } - - computePartialProperties( - properties: Array<$FlowFixMe>, - hasteModuleName: string, - types: TypeDeclarationMap, - aliasMap: {...NativeModuleAliasMap}, - enumMap: {...NativeModuleEnumMap}, - tryParse: ParserErrorCapturer, - cxxOnly: boolean, - ): Array<$FlowFixMe> { - return properties.map(prop => { - return { - name: prop.key.name, - optional: true, - typeAnnotation: typeScriptTranslateTypeAnnotation( - hasteModuleName, - prop.typeAnnotation.typeAnnotation, - types, - aliasMap, - enumMap, - tryParse, - cxxOnly, - this, - ), - }; - }); - } - - functionTypeAnnotation(propertyValueType: string): boolean { - return ( - propertyValueType === 'TSFunctionType' || - propertyValueType === 'TSMethodSignature' - ); - } - - getTypeArgumentParamsFromDeclaration(declaration: $FlowFixMe): $FlowFixMe { - return declaration.typeParameters.params; - } - - // This FlowFixMe is supposed to refer to typeArgumentParams and funcArgumentParams of generated AST. - getNativeComponentType( - typeArgumentParams: $FlowFixMe, - funcArgumentParams: $FlowFixMe, - ): {[string]: string} { - return { - propsTypeName: typeArgumentParams[0].typeName.name, - componentName: funcArgumentParams[0].value, - }; - } - - getAnnotatedElementProperties(annotatedElement: $FlowFixMe): $FlowFixMe { - return annotatedElement.typeAnnotation.members; - } - - bodyProperties(typeAlias: TypeDeclarationMap): $ReadOnlyArray<$FlowFixMe> { - return typeAlias.body.body; - } - - convertKeywordToTypeAnnotation(keyword: string): string { - switch (keyword) { - case 'TSBooleanKeyword': - return 'BooleanTypeAnnotation'; - case 'TSNumberKeyword': - return 'NumberTypeAnnotation'; - case 'TSVoidKeyword': - return 'VoidTypeAnnotation'; - case 'TSStringKeyword': - return 'StringTypeAnnotation'; - case 'TSUnknownKeyword': - return 'MixedTypeAnnotation'; - } - - return keyword; - } - - argumentForProp(prop: PropAST): $FlowFixMe { - return prop.expression; - } - - nameForArgument(prop: PropAST): $FlowFixMe { - return prop.expression.name; - } - - isOptionalProperty(property: $FlowFixMe): boolean { - return property.optional || false; - } - - getGetSchemaInfoFN(): GetSchemaInfoFN { - return getSchemaInfo; - } - - getTypeAnnotationFromProperty(property: PropAST): $FlowFixMe { - return property.typeAnnotation.typeAnnotation; - } - - getGetTypeAnnotationFN(): GetTypeAnnotationFN { - return getTypeAnnotation; - } - - getResolvedTypeAnnotation( - // TODO(T108222691): Use flow-types for @babel/parser - typeAnnotation: $FlowFixMe, - types: TypeDeclarationMap, - parser: Parser, - ): { - nullable: boolean, - typeAnnotation: $FlowFixMe, - typeResolutionStatus: TypeResolutionStatus, - } { - invariant( - typeAnnotation != null, - 'resolveTypeAnnotation(): typeAnnotation cannot be null', - ); - - let node = - typeAnnotation.type === 'TSTypeAnnotation' - ? typeAnnotation.typeAnnotation - : typeAnnotation; - let nullable = false; - let typeResolutionStatus: TypeResolutionStatus = { - successful: false, - }; - - for (;;) { - const topLevelType = parseTopLevelType(node); - nullable = nullable || topLevelType.optional; - node = topLevelType.type; - - if (node.type !== 'TSTypeReference') { - break; - } - - const typeAnnotationName = this.getTypeAnnotationName(node); - const resolvedTypeAnnotation = types[typeAnnotationName]; - if (resolvedTypeAnnotation == null) { - break; - } - - const {typeAnnotation: typeAnnotationNode, typeResolutionStatus: status} = - handleGenericTypeAnnotation(node, resolvedTypeAnnotation, this); - typeResolutionStatus = status; - node = typeAnnotationNode; - } - - return { - nullable: nullable, - typeAnnotation: node, - typeResolutionStatus, - }; - } - - getResolveTypeAnnotationFN(): ResolveTypeAnnotationFN { - return ( - typeAnnotation: $FlowFixMe, - types: TypeDeclarationMap, - parser: Parser, - ) => { - return this.getResolvedTypeAnnotation(typeAnnotation, types, parser); - }; - } - - isEvent(typeAnnotation: $FlowFixMe): boolean { - if (typeAnnotation.type !== 'TSTypeReference') { - return false; - } - const eventNames = new Set(['BubblingEventHandler', 'DirectEventHandler']); - return eventNames.has(this.getTypeAnnotationName(typeAnnotation)); - } - - isProp(name: string, typeAnnotation: $FlowFixMe): boolean { - if (typeAnnotation.type !== 'TSTypeReference') { - return true; - } - const isStyle = - name === 'style' && - typeAnnotation.type === 'GenericTypeAnnotation' && - this.getTypeAnnotationName(typeAnnotation) === 'ViewStyleProp'; - return !isStyle; - } - - getProps( - typeDefinition: $ReadOnlyArray, - types: TypeDeclarationMap, - ): { - props: $ReadOnlyArray>, - extendsProps: $ReadOnlyArray, - } { - const extendsProps: Array = []; - const componentPropAsts: Array = []; - const remaining: Array = []; - - for (const prop of typeDefinition) { - // find extends - if (prop.type === 'TSExpressionWithTypeArguments') { - const extend = extendsForProp(prop, types, this); - if (extend) { - extendsProps.push(extend); - continue; - } - } - - remaining.push(prop); - } - - // find events and props - for (const prop of flattenProperties(remaining, types, this)) { - const topLevelType = parseTopLevelType( - prop.typeAnnotation.typeAnnotation, - types, - ); - - if ( - prop.type === 'TSPropertySignature' && - !this.isEvent(topLevelType.type) && - this.isProp(prop.key.name, prop) - ) { - componentPropAsts.push(prop); - } - } - - return { - props: componentPropAsts - .map(property => buildPropSchema(property, types, this)) - .filter(Boolean), - extendsProps, - }; - } - - getProperties(typeName: string, types: TypeDeclarationMap): $FlowFixMe { - const alias = types[typeName]; - if (!alias) { - throw new Error( - `Failed to find definition for "${typeName}", please check that you have a valid codegen typescript file`, - ); - } - const aliasKind = - alias.type === 'TSInterfaceDeclaration' ? 'interface' : 'type'; - - try { - if (aliasKind === 'interface') { - return [...(alias.extends ?? []), ...alias.body.body]; - } - - return ( - alias.typeAnnotation.members || - alias.typeAnnotation.typeParameters.params[0].members || - alias.typeAnnotation.typeParameters.params - ); - } catch (e) { - throw new Error( - `Failed to find ${aliasKind} definition for "${typeName}", please check that you have a valid codegen typescript file`, - ); - } - } - - nextNodeForTypeAlias(typeAnnotation: $FlowFixMe): $FlowFixMe { - return typeAnnotation.typeAnnotation; - } - - nextNodeForEnum(typeAnnotation: $FlowFixMe): $FlowFixMe { - return typeAnnotation; - } - - genericTypeAnnotationErrorMessage(typeAnnotation: $FlowFixMe): string { - return `A non GenericTypeAnnotation must be a type declaration ('${this.typeAlias}'), an interface ('${this.interfaceDeclaration}'), or enum ('${this.enumDeclaration}'). Instead, got the unsupported ${typeAnnotation.type}.`; - } - - extractTypeFromTypeAnnotation(typeAnnotation: $FlowFixMe): string { - return typeAnnotation.type === 'TSTypeReference' - ? typeAnnotation.typeName.name - : typeAnnotation.type; - } - - getObjectProperties(typeAnnotation: $FlowFixMe): $FlowFixMe { - return typeAnnotation.members; - } - - getLiteralValue(option: $FlowFixMe): $FlowFixMe { - return option.literal.value; - } - - getPaperTopLevelNameDeprecated(typeAnnotation: $FlowFixMe): $FlowFixMe { - return typeAnnotation.typeParameters.params.length > 1 - ? typeAnnotation.typeParameters.params[1].literal.value - : null; - } -} - -module.exports = { - TypeScriptParser, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/utils.js b/node_modules/@react-native/codegen/lib/parsers/utils.js deleted file mode 100644 index 0d51fd9fc..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/utils.js +++ /dev/null @@ -1,157 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - */ - -'use strict'; - -const _require = require('./errors'), - ParserError = _require.ParserError; -const path = require('path'); -function extractNativeModuleName(filename) { - // this should drop everything after the file name. For Example it will drop: - // .android.js, .android.ts, .android.tsx, .ios.js, .ios.ts, .ios.tsx, .js, .ts, .tsx - return path.basename(filename).split('.')[0]; -} -function createParserErrorCapturer() { - // $FlowFixMe[missing-empty-array-annot] - const errors = []; - function guard(fn) { - try { - return fn(); - } catch (error) { - if (!(error instanceof ParserError)) { - throw error; - } - // $FlowFixMe[incompatible-call] - errors.push(error); - return null; - } - } - - // $FlowFixMe[incompatible-return] - return [errors, guard]; -} -function verifyPlatforms(hasteModuleName, moduleName) { - let cxxOnly = false; - const excludedPlatforms = new Set(); - const namesToValidate = [moduleName, hasteModuleName]; - namesToValidate.forEach(name => { - if (name.endsWith('Android')) { - excludedPlatforms.add('iOS'); - return; - } - if (name.endsWith('IOS')) { - excludedPlatforms.add('android'); - return; - } - if (name.endsWith('Windows')) { - excludedPlatforms.add('iOS'); - excludedPlatforms.add('android'); - return; - } - if (name.endsWith('Cxx')) { - cxxOnly = true; - excludedPlatforms.add('iOS'); - excludedPlatforms.add('android'); - return; - } - }); - return { - cxxOnly, - excludedPlatforms: Array.from(excludedPlatforms), - }; -} - -// TODO(T108222691): Use flow-types for @babel/parser -function visit(astNode, visitor) { - const queue = [astNode]; - while (queue.length !== 0) { - let item = queue.shift(); - if (!(typeof item === 'object' && item != null)) { - continue; - } - if ( - typeof item.type === 'string' && - typeof visitor[item.type] === 'function' - ) { - // Don't visit any children - visitor[item.type](item); - } else if (Array.isArray(item)) { - queue.push(...item); - } else { - queue.push(...Object.values(item)); - } - } -} -function getConfigType( - // TODO(T71778680): Flow-type this node. - ast, - Visitor, -) { - let infoMap = { - isComponent: false, - isModule: false, - }; - visit(ast, Visitor(infoMap)); - const isModule = infoMap.isModule, - isComponent = infoMap.isComponent; - if (isModule && isComponent) { - throw new Error( - 'Found type extending "TurboModule" and exported "codegenNativeComponent" declaration in one file. Split them into separated files.', - ); - } - if (isModule) { - return 'module'; - } else if (isComponent) { - return 'component'; - } else { - return 'none'; - } -} - -// TODO(T71778680): Flow-type ASTNodes. -function isModuleRegistryCall(node) { - if (node.type !== 'CallExpression') { - return false; - } - const callExpression = node; - if (callExpression.callee.type !== 'MemberExpression') { - return false; - } - const memberExpression = callExpression.callee; - if ( - !( - memberExpression.object.type === 'Identifier' && - memberExpression.object.name === 'TurboModuleRegistry' - ) - ) { - return false; - } - if ( - !( - memberExpression.property.type === 'Identifier' && - (memberExpression.property.name === 'get' || - memberExpression.property.name === 'getEnforcing') - ) - ) { - return false; - } - if (memberExpression.computed) { - return false; - } - return true; -} -module.exports = { - getConfigType, - extractNativeModuleName, - createParserErrorCapturer, - verifyPlatforms, - visit, - isModuleRegistryCall, -}; diff --git a/node_modules/@react-native/codegen/lib/parsers/utils.js.flow b/node_modules/@react-native/codegen/lib/parsers/utils.js.flow deleted file mode 100644 index 77c302759..000000000 --- a/node_modules/@react-native/codegen/lib/parsers/utils.js.flow +++ /dev/null @@ -1,213 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -const {ParserError} = require('./errors'); -const path = require('path'); - -export type TypeDeclarationMap = {[declarationName: string]: $FlowFixMe}; - -export type TypeResolutionStatus = - | $ReadOnly<{ - type: 'alias' | 'enum', - successful: true, - name: string, - }> - | $ReadOnly<{ - successful: false, - }>; - -function extractNativeModuleName(filename: string): string { - // this should drop everything after the file name. For Example it will drop: - // .android.js, .android.ts, .android.tsx, .ios.js, .ios.ts, .ios.tsx, .js, .ts, .tsx - return path.basename(filename).split('.')[0]; -} - -export type ParserErrorCapturer = (fn: () => T) => ?T; - -// $FlowFixMe[unclear-type] there's no flowtype for ASTs -export type PropAST = Object; - -// $FlowFixMe[unclear-type] there's no flowtype for ASTs -export type ASTNode = Object; - -function createParserErrorCapturer(): [ - Array, - ParserErrorCapturer, -] { - // $FlowFixMe[missing-empty-array-annot] - const errors = []; - function guard(fn: () => T): ?T { - try { - return fn(); - } catch (error) { - if (!(error instanceof ParserError)) { - throw error; - } - // $FlowFixMe[incompatible-call] - errors.push(error); - - return null; - } - } - - // $FlowFixMe[incompatible-return] - return [errors, guard]; -} - -function verifyPlatforms( - hasteModuleName: string, - moduleName: string, -): $ReadOnly<{ - cxxOnly: boolean, - excludedPlatforms: Array<'iOS' | 'android'>, -}> { - let cxxOnly = false; - const excludedPlatforms = new Set<'iOS' | 'android'>(); - const namesToValidate = [moduleName, hasteModuleName]; - - namesToValidate.forEach(name => { - if (name.endsWith('Android')) { - excludedPlatforms.add('iOS'); - return; - } - - if (name.endsWith('IOS')) { - excludedPlatforms.add('android'); - return; - } - - if (name.endsWith('Windows')) { - excludedPlatforms.add('iOS'); - excludedPlatforms.add('android'); - return; - } - - if (name.endsWith('Cxx')) { - cxxOnly = true; - excludedPlatforms.add('iOS'); - excludedPlatforms.add('android'); - return; - } - }); - - return { - cxxOnly, - excludedPlatforms: Array.from(excludedPlatforms), - }; -} - -// TODO(T108222691): Use flow-types for @babel/parser -function visit( - astNode: $FlowFixMe, - visitor: { - [type: string]: (node: $FlowFixMe) => void, - }, -) { - const queue = [astNode]; - while (queue.length !== 0) { - let item = queue.shift(); - - if (!(typeof item === 'object' && item != null)) { - continue; - } - - if ( - typeof item.type === 'string' && - typeof visitor[item.type] === 'function' - ) { - // Don't visit any children - visitor[item.type](item); - } else if (Array.isArray(item)) { - queue.push(...item); - } else { - queue.push(...Object.values(item)); - } - } -} - -function getConfigType( - // TODO(T71778680): Flow-type this node. - ast: $FlowFixMe, - Visitor: ({isComponent: boolean, isModule: boolean}) => { - [type: string]: (node: $FlowFixMe) => void, - }, -): 'module' | 'component' | 'none' { - let infoMap = { - isComponent: false, - isModule: false, - }; - - visit(ast, Visitor(infoMap)); - - const {isModule, isComponent} = infoMap; - if (isModule && isComponent) { - throw new Error( - 'Found type extending "TurboModule" and exported "codegenNativeComponent" declaration in one file. Split them into separated files.', - ); - } - - if (isModule) { - return 'module'; - } else if (isComponent) { - return 'component'; - } else { - return 'none'; - } -} - -// TODO(T71778680): Flow-type ASTNodes. -function isModuleRegistryCall(node: $FlowFixMe): boolean { - if (node.type !== 'CallExpression') { - return false; - } - - const callExpression = node; - - if (callExpression.callee.type !== 'MemberExpression') { - return false; - } - - const memberExpression = callExpression.callee; - if ( - !( - memberExpression.object.type === 'Identifier' && - memberExpression.object.name === 'TurboModuleRegistry' - ) - ) { - return false; - } - - if ( - !( - memberExpression.property.type === 'Identifier' && - (memberExpression.property.name === 'get' || - memberExpression.property.name === 'getEnforcing') - ) - ) { - return false; - } - - if (memberExpression.computed) { - return false; - } - - return true; -} - -module.exports = { - getConfigType, - extractNativeModuleName, - createParserErrorCapturer, - verifyPlatforms, - visit, - isModuleRegistryCall, -}; diff --git a/node_modules/@react-native/codegen/package.json b/node_modules/@react-native/codegen/package.json deleted file mode 100644 index 07787086b..000000000 --- a/node_modules/@react-native/codegen/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "@react-native/codegen", - "version": "0.74.87", - "description": "Code generation tools for React Native", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/facebook/react-native.git", - "directory": "packages/react-native-codegen" - }, - "homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/react-native-codegen#readme", - "keywords": [ - "code", - "generation", - "codegen", - "tools", - "react-native" - ], - "bugs": "https://github.com/facebook/react-native/issues", - "engines": { - "node": ">=18" - }, - "scripts": { - "build": "yarn clean && node scripts/build.js --verbose", - "clean": "rimraf lib", - "prepare": "yarn run build" - }, - "files": [ - "lib" - ], - "dependencies": { - "@babel/parser": "^7.20.0", - "glob": "^7.1.1", - "hermes-parser": "0.19.1", - "invariant": "^2.2.4", - "jscodeshift": "^0.14.0", - "mkdirp": "^0.5.1", - "nullthrows": "^1.1.1" - }, - "devDependencies": { - "@babel/core": "^7.20.0", - "@babel/plugin-proposal-class-properties": "^7.18.0", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.0", - "@babel/plugin-proposal-object-rest-spread": "^7.20.0", - "@babel/plugin-proposal-optional-chaining": "^7.20.0", - "@babel/plugin-syntax-dynamic-import": "^7.8.0", - "@babel/plugin-transform-async-to-generator": "^7.20.0", - "@babel/plugin-transform-destructuring": "^7.20.0", - "@babel/plugin-transform-flow-strip-types": "^7.20.0", - "@babel/preset-env": "^7.20.0", - "chalk": "^4.0.0", - "hermes-estree": "0.19.1", - "micromatch": "^4.0.4", - "prettier": "2.8.8", - "rimraf": "^3.0.2", - "yargs": "^17.6.2" - }, - "peerDependencies": { - "@babel/preset-env": "^7.1.6" - } -} diff --git a/node_modules/@react-native/community-cli-plugin/README.md b/node_modules/@react-native/community-cli-plugin/README.md deleted file mode 100644 index aebbf39d1..000000000 --- a/node_modules/@react-native/community-cli-plugin/README.md +++ /dev/null @@ -1,92 +0,0 @@ -# @react-native/community-cli-plugin - -> This is an internal dependency of React Native. **Please don't depend on it directly.** - -CLI entry points supporting core React Native development features. - -Formerly [@react-native-community/cli-plugin-metro](https://www.npmjs.com/package/@react-native-community/cli-plugin-metro). - -## Commands - -### `start` - -Start the React Native development server. - -#### Usage - -```sh -npx react-native start [options] -``` - -#### Options - -| Option | Description | -| - | - | -| `--port ` | Set the server port. | -| `--host ` | Set the server host. | -| `--projectRoot ` | Set the path to the project root. | -| `--watchFolders ` | Specify additional folders to be added to the watch list. | -| `--assetPlugins ` | Specify additional asset plugins. | -| `--sourceExts ` | Specify additional source extensions to bundle. | -| `--max-workers ` | Set the maximum number of workers the worker-pool will spawn for transforming files. Defaults to the number of the cores available on your machine. | -| `--transformer ` | Specify a custom transformer. | -| `--reset-cache` | Remove cached files. | -| `--custom-log-reporter-path ` | Specify a module path exporting a replacement for `TerminalReporter`. | -| `--https` | Enable HTTPS connections. | -| `--key `| Specify path to a custom SSL key. | -| `--cert ` | Specify path to a custom SSL cert. | -| `--config ` | Path to the CLI configuration file. | -| `--no-interactive` | Disable interactive mode. | - -### `bundle` - -Build the bundle for the provided JavaScript entry file. - -#### Usage - -```sh -npx react-native bundle --entry-file [options] -``` - -#### Options - -| Option | Description | -| - | - | -| `--entry-file ` | Set the path to the root JavaScript entry file. | -| `--platform ` | Set the target platform (either `"android"` or `"ios"`). Defaults to `"ios"`. | -| `--transformer ` | Specify a custom transformer. | -| `--dev [boolean]` | If `false`, warnings are disabled and the bundle is minified. Defaults to `true`. | -| `--minify [boolean]` | Allows overriding whether bundle is minified. Defaults to `false` if `--dev` is set. Disabling minification can be useful for speeding up production builds for testing purposes. | -| `--bundle-output ` | Specify the path to store the resulting bundle. | -| `--bundle-encoding ` | Specify the encoding for writing the bundle (). | -| `--resolver-option ` | Custom resolver options of the form key=value. URL-encoded. May be specified multiple times. | -| `--sourcemap-output ` | Specify the path to store the source map file for the resulting bundle. | -| `--sourcemap-sources-root ` | Set the root path for source map entries. | -| `--sourcemap-use-absolute-path` | Report `SourceMapURL` using its full path. | -| `--max-workers ` | Set the maximum number of workers the worker-pool will spawn for transforming files. Defaults to the number of the cores available on your machine. | -| `--assets-dest ` | Specify the directory path for storing assets referenced in the bundle. | -| `--reset-cache` | Remove cached files. | -| `--read-global-cache` | Attempt to fetch transformed JS code from the global cache, if configured. Defaults to `false`. | -| `--config ` | Path to the CLI configuration file. | - -### `ram-bundle` - -Build the [RAM bundle](https://reactnative.dev/docs/ram-bundles-inline-requires) for the provided JavaScript entry file. - -#### Usage - -```sh -npx react-native ram-bundle --entry-file [options] -``` - -#### Options - -Accepts all options supported by [`bundle`](#bundle) and the following: - -| Option | Description | -| - | - | -| `--indexed-ram-bundle` | Force the "Indexed RAM" bundle file format, even when building for Android. | - -## Contributing - -Changes to this package can be made locally and tested against the `rn-tester` app, per the [Contributing guide](https://reactnative.dev/contributing/overview#contributing-code). During development, this package is automatically run from source with no build step. diff --git a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/assetCatalogIOS.js b/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/assetCatalogIOS.js deleted file mode 100644 index 6080de02d..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/assetCatalogIOS.js +++ /dev/null @@ -1,77 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true, -}); -exports.cleanAssetCatalog = cleanAssetCatalog; -exports.getImageSet = getImageSet; -exports.isCatalogAsset = isCatalogAsset; -exports.writeImageSet = writeImageSet; -var _assetPathUtils = _interopRequireDefault(require("./assetPathUtils")); -var _fs = _interopRequireDefault(require("fs")); -var _path = _interopRequireDefault(require("path")); -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; -} -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - * @oncall react_native - */ - -function cleanAssetCatalog(catalogDir) { - const files = _fs.default - .readdirSync(catalogDir) - .filter((file) => file.endsWith(".imageset")); - for (const file of files) { - _fs.default.rmSync(_path.default.join(catalogDir, file), { - recursive: true, - force: true, - }); - } -} -function getImageSet(catalogDir, asset, scales) { - const fileName = _assetPathUtils.default.getResourceIdentifier(asset); - return { - basePath: _path.default.join(catalogDir, `${fileName}.imageset`), - files: scales.map((scale, idx) => { - const suffix = scale === 1 ? "" : `@${scale}x`; - return { - name: `${fileName + suffix}.${asset.type}`, - scale, - src: asset.files[idx], - }; - }), - }; -} -function isCatalogAsset(asset) { - return asset.type === "png" || asset.type === "jpg" || asset.type === "jpeg"; -} -function writeImageSet(imageSet) { - _fs.default.mkdirSync(imageSet.basePath, { - recursive: true, - }); - for (const file of imageSet.files) { - const dest = _path.default.join(imageSet.basePath, file.name); - _fs.default.copyFileSync(file.src, dest); - } - _fs.default.writeFileSync( - _path.default.join(imageSet.basePath, "Contents.json"), - JSON.stringify({ - images: imageSet.files.map((file) => ({ - filename: file.name, - idiom: "universal", - scale: `${file.scale}x`, - })), - info: { - author: "xcode", - version: 1, - }, - }) - ); -} diff --git a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/assetCatalogIOS.js.flow b/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/assetCatalogIOS.js.flow deleted file mode 100644 index 0a5a98b50..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/assetCatalogIOS.js.flow +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - * @oncall react_native - */ - -import type { AssetData } from "metro/src/Assets"; - -declare export function cleanAssetCatalog(catalogDir: string): void; - -type ImageSet = { - basePath: string, - files: { name: string, src: string, scale: number }[], -}; - -declare export function getImageSet( - catalogDir: string, - asset: AssetData, - scales: $ReadOnlyArray -): ImageSet; - -declare export function isCatalogAsset(asset: AssetData): boolean; - -declare export function writeImageSet(imageSet: ImageSet): void; diff --git a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/assetPathUtils.js b/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/assetPathUtils.js deleted file mode 100644 index 8e1b85961..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/assetPathUtils.js +++ /dev/null @@ -1,79 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true, -}); -exports.default = void 0; -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - * @oncall react_native - */ - -/** - * FIXME: using number to represent discrete scale numbers is fragile in essence because of - * floating point numbers imprecision. - */ -function getAndroidAssetSuffix(scale) { - switch (scale) { - case 0.75: - return "ldpi"; - case 1: - return "mdpi"; - case 1.5: - return "hdpi"; - case 2: - return "xhdpi"; - case 3: - return "xxhdpi"; - case 4: - return "xxxhdpi"; - default: - return ""; - } -} - -// See https://developer.android.com/guide/topics/resources/drawable-resource.html -const drawableFileTypes = new Set(["gif", "jpeg", "jpg", "png", "webp", "xml"]); -function getAndroidResourceFolderName(asset, scale) { - if (!drawableFileTypes.has(asset.type)) { - return "raw"; - } - const suffix = getAndroidAssetSuffix(scale); - if (!suffix) { - throw new Error( - `Don't know which android drawable suffix to use for asset: ${JSON.stringify( - asset - )}` - ); - } - return `drawable-${suffix}`; -} -function getResourceIdentifier(asset) { - const folderPath = getBasePath(asset); - return `${folderPath}/${asset.name}` - .toLowerCase() - .replace(/\//g, "_") // Encode folder structure in file name - .replace(/([^a-z0-9_])/g, "") // Remove illegal chars - .replace(/^assets_/, ""); // Remove "assets_" prefix -} - -function getBasePath(asset) { - let basePath = asset.httpServerLocation; - if (basePath[0] === "/") { - basePath = basePath.substr(1); - } - return basePath; -} -var _default = { - getAndroidAssetSuffix, - getAndroidResourceFolderName, - getResourceIdentifier, - getBasePath, -}; -exports.default = _default; diff --git a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/assetPathUtils.js.flow b/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/assetPathUtils.js.flow deleted file mode 100644 index c9b7c848e..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/assetPathUtils.js.flow +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - * @oncall react_native - */ - -export type PackagerAsset = $ReadOnly<{ - httpServerLocation: string, - name: string, - type: string, - ... -}>; - -/** - * FIXME: using number to represent discrete scale numbers is fragile in essence because of - * floating point numbers imprecision. - */ -declare function getAndroidAssetSuffix(scale: number): string; - -declare function getAndroidResourceFolderName( - asset: PackagerAsset, - scale: number -): string; - -declare function getResourceIdentifier(asset: PackagerAsset): string; - -declare function getBasePath(asset: PackagerAsset): string; - -declare export default { - getAndroidAssetSuffix: getAndroidAssetSuffix, - getAndroidResourceFolderName: getAndroidResourceFolderName, - getResourceIdentifier: getResourceIdentifier, - getBasePath: getBasePath, -}; diff --git a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/buildBundle.js b/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/buildBundle.js deleted file mode 100644 index 74cee69b8..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/buildBundle.js +++ /dev/null @@ -1,128 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true, -}); -exports.unstable_buildBundleWithConfig = exports.default = void 0; -var _loadMetroConfig = _interopRequireDefault( - require("../../utils/loadMetroConfig") -); -var _parseKeyValueParamArray = _interopRequireDefault( - require("../../utils/parseKeyValueParamArray") -); -var _saveAssets = _interopRequireDefault(require("./saveAssets")); -var _cliTools = require("@react-native-community/cli-tools"); -var _chalk = _interopRequireDefault(require("chalk")); -var _Server = _interopRequireDefault(require("metro/src/Server")); -var _bundle = _interopRequireDefault(require("metro/src/shared/output/bundle")); -var _RamBundle = _interopRequireDefault( - require("metro/src/shared/output/RamBundle") -); -var _path = _interopRequireDefault(require("path")); -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; -} -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - * @oncall react_native - */ - -async function buildBundle(_argv, ctx, args, bundleImpl = _bundle.default) { - const config = await (0, _loadMetroConfig.default)(ctx, { - maxWorkers: args.maxWorkers, - resetCache: args.resetCache, - config: args.config, - }); - return buildBundleWithConfig(args, config, bundleImpl); -} -async function buildBundleWithConfig( - args, - config, - bundleImpl = _bundle.default -) { - const customResolverOptions = (0, _parseKeyValueParamArray.default)( - args.resolverOption ?? [] - ); - if (config.resolver.platforms.indexOf(args.platform) === -1) { - _cliTools.logger.error( - `Invalid platform ${ - args.platform ? `"${_chalk.default.bold(args.platform)}" ` : "" - }selected.` - ); - _cliTools.logger.info( - `Available platforms are: ${config.resolver.platforms - .map((x) => `"${_chalk.default.bold(x)}"`) - .join( - ", " - )}. If you are trying to bundle for an out-of-tree platform, it may not be installed.` - ); - throw new Error("Bundling failed"); - } - - // This is used by a bazillion of npm modules we don't control so we don't - // have other choice than defining it as an env variable here. - process.env.NODE_ENV = args.dev ? "development" : "production"; - let sourceMapUrl = args.sourcemapOutput; - if (sourceMapUrl != null && !args.sourcemapUseAbsolutePath) { - sourceMapUrl = _path.default.basename(sourceMapUrl); - } - - // $FlowIgnore[prop-missing] - const requestOpts = { - entryFile: args.entryFile, - sourceMapUrl, - dev: args.dev, - minify: args.minify !== undefined ? args.minify : !args.dev, - platform: args.platform, - unstable_transformProfile: args.unstableTransformProfile, - customResolverOptions, - }; - const server = new _Server.default(config); - try { - const bundle = await bundleImpl.build(server, requestOpts); - - // $FlowIgnore[class-object-subtyping] - // $FlowIgnore[incompatible-call] - // $FlowIgnore[prop-missing] - // $FlowIgnore[incompatible-exact] - await bundleImpl.save(bundle, args, _cliTools.logger.info); - - // Save the assets of the bundle - const outputAssets = await server.getAssets({ - ..._Server.default.DEFAULT_BUNDLE_OPTIONS, - ...requestOpts, - bundleType: "todo", - }); - - // When we're done saving bundle output and the assets, we're done. - return await (0, _saveAssets.default)( - outputAssets, - args.platform, - args.assetsDest, - args.assetCatalogDest - ); - } finally { - server.end(); - } -} - -/** - * UNSTABLE: This function is likely to be relocated and its API changed in - * the near future. `@react-native/community-cli-plugin` should not be directly - * depended on by projects or integrators -- this is exported for legacy - * compatibility. - * - * Create a bundle using a pre-loaded Metro config. The config can be - * re-used for several bundling calls if multiple platforms are being - * bundled. - */ -const unstable_buildBundleWithConfig = buildBundleWithConfig; -exports.unstable_buildBundleWithConfig = unstable_buildBundleWithConfig; -var _default = buildBundle; -exports.default = _default; diff --git a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/buildBundle.js.flow b/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/buildBundle.js.flow deleted file mode 100644 index bbf557475..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/buildBundle.js.flow +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - * @oncall react_native - */ - -import type { Config } from "@react-native-community/cli-types"; -import type { ConfigT } from "metro-config"; -import metroBundle from "metro/src/shared/output/bundle"; -import metroRamBundle from "metro/src/shared/output/RamBundle"; -export type BundleCommandArgs = { - assetsDest?: string, - assetCatalogDest?: string, - entryFile: string, - resetCache: boolean, - resetGlobalCache: boolean, - transformer?: string, - minify?: boolean, - config?: string, - platform: string, - dev: boolean, - bundleOutput: string, - bundleEncoding?: "utf8" | "utf16le" | "ascii", - maxWorkers?: number, - sourcemapOutput?: string, - sourcemapSourcesRoot?: string, - sourcemapUseAbsolutePath: boolean, - verbose: boolean, - unstableTransformProfile: string, - indexedRamBundle?: boolean, - resolverOption?: Array, -}; - -declare function buildBundle( - _argv: Array, - ctx: Config, - args: BundleCommandArgs, - bundleImpl: typeof metroBundle | typeof metroRamBundle -): Promise; - -declare function buildBundleWithConfig( - args: BundleCommandArgs, - config: ConfigT, - bundleImpl: typeof metroBundle | typeof metroRamBundle -): Promise; - -/** - * UNSTABLE: This function is likely to be relocated and its API changed in - * the near future. `@react-native/community-cli-plugin` should not be directly - * depended on by projects or integrators -- this is exported for legacy - * compatibility. - * - * Create a bundle using a pre-loaded Metro config. The config can be - * re-used for several bundling calls if multiple platforms are being - * bundled. - */ -declare export const unstable_buildBundleWithConfig: typeof buildBundleWithConfig; - -declare export default typeof buildBundle; diff --git a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/filterPlatformAssetScales.js b/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/filterPlatformAssetScales.js deleted file mode 100644 index 6ff75f6c7..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/filterPlatformAssetScales.js +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true, -}); -exports.default = void 0; -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - * @oncall react_native - */ - -const ALLOWED_SCALES = { - ios: [1, 2, 3], -}; -function filterPlatformAssetScales(platform, scales) { - const whitelist = ALLOWED_SCALES[platform]; - if (!whitelist) { - return scales; - } - const result = scales.filter((scale) => whitelist.indexOf(scale) > -1); - if (result.length === 0 && scales.length > 0) { - // No matching scale found, but there are some available. Ideally we don't - // want to be in this situation and should throw, but for now as a fallback - // let's just use the closest larger image - const maxScale = whitelist[whitelist.length - 1]; - for (const scale of scales) { - if (scale > maxScale) { - result.push(scale); - break; - } - } - - // There is no larger scales available, use the largest we have - if (result.length === 0) { - result.push(scales[scales.length - 1]); - } - } - return result; -} -var _default = filterPlatformAssetScales; -exports.default = _default; diff --git a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/filterPlatformAssetScales.js.flow b/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/filterPlatformAssetScales.js.flow deleted file mode 100644 index 22a2c5490..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/filterPlatformAssetScales.js.flow +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - * @oncall react_native - */ - -declare function filterPlatformAssetScales( - platform: string, - scales: $ReadOnlyArray -): $ReadOnlyArray; - -declare export default typeof filterPlatformAssetScales; diff --git a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/getAssetDestPathAndroid.js b/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/getAssetDestPathAndroid.js deleted file mode 100644 index 0b91f998c..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/getAssetDestPathAndroid.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true, -}); -exports.default = void 0; -var _assetPathUtils = _interopRequireDefault(require("./assetPathUtils")); -var _path = _interopRequireDefault(require("path")); -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; -} -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - * @oncall react_native - */ - -function getAssetDestPathAndroid(asset, scale) { - const androidFolder = _assetPathUtils.default.getAndroidResourceFolderName( - asset, - scale - ); - const fileName = _assetPathUtils.default.getResourceIdentifier(asset); - return _path.default.join(androidFolder, `${fileName}.${asset.type}`); -} -var _default = getAssetDestPathAndroid; -exports.default = _default; diff --git a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/getAssetDestPathAndroid.js.flow b/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/getAssetDestPathAndroid.js.flow deleted file mode 100644 index 34a79be1a..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/getAssetDestPathAndroid.js.flow +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - * @oncall react_native - */ - -import type { PackagerAsset } from "./assetPathUtils"; - -declare function getAssetDestPathAndroid( - asset: PackagerAsset, - scale: number -): string; - -declare export default typeof getAssetDestPathAndroid; diff --git a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/getAssetDestPathIOS.js b/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/getAssetDestPathIOS.js deleted file mode 100644 index efd1efcc7..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/getAssetDestPathIOS.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true, -}); -exports.default = void 0; -var _path = _interopRequireDefault(require("path")); -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; -} -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - * @oncall react_native - */ - -function getAssetDestPathIOS(asset, scale) { - const suffix = scale === 1 ? "" : `@${scale}x`; - const fileName = `${asset.name + suffix}.${asset.type}`; - return _path.default.join( - // Assets can have relative paths outside of the project root. - // Replace `../` with `_` to make sure they don't end up outside of - // the expected assets directory. - asset.httpServerLocation.substr(1).replace(/\.\.\//g, "_"), - fileName - ); -} -var _default = getAssetDestPathIOS; -exports.default = _default; diff --git a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/getAssetDestPathIOS.js.flow b/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/getAssetDestPathIOS.js.flow deleted file mode 100644 index ddf4e59bd..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/getAssetDestPathIOS.js.flow +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - * @oncall react_native - */ - -import type { PackagerAsset } from "./assetPathUtils"; - -declare function getAssetDestPathIOS( - asset: PackagerAsset, - scale: number -): string; - -declare export default typeof getAssetDestPathIOS; diff --git a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/index.js b/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/index.js deleted file mode 100644 index e0cafe718..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/index.js +++ /dev/null @@ -1,130 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true, -}); -exports.default = void 0; -var _buildBundle = _interopRequireDefault(require("./buildBundle")); -var _path = _interopRequireDefault(require("path")); -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; -} -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - * @oncall react_native - */ - -const bundleCommand = { - name: "bundle", - description: "Build the bundle for the provided JavaScript entry file.", - func: _buildBundle.default, - options: [ - { - name: "--entry-file ", - description: - "Path to the root JS file, either absolute or relative to JS root", - }, - { - name: "--platform ", - description: 'Either "ios" or "android"', - default: "ios", - }, - { - name: "--transformer ", - description: "Specify a custom transformer to be used", - }, - { - name: "--dev [boolean]", - description: "If false, warnings are disabled and the bundle is minified", - parse: (val) => val !== "false", - default: true, - }, - { - name: "--minify [boolean]", - description: - "Allows overriding whether bundle is minified. This defaults to " + - "false if dev is true, and true if dev is false. Disabling minification " + - "can be useful for speeding up production builds for testing purposes.", - parse: (val) => val !== "false", - }, - { - name: "--bundle-output ", - description: - "File name where to store the resulting bundle, ex. /tmp/groups.bundle", - }, - { - name: "--bundle-encoding ", - description: - "Encoding the bundle should be written in (https://nodejs.org/api/buffer.html#buffer_buffer).", - default: "utf8", - }, - { - name: "--max-workers ", - description: - "Specifies the maximum number of workers the worker-pool " + - "will spawn for transforming files. This defaults to the number of the " + - "cores available on your machine.", - parse: (workers) => Number(workers), - }, - { - name: "--sourcemap-output ", - description: - "File name where to store the sourcemap file for resulting bundle, ex. /tmp/groups.map", - }, - { - name: "--sourcemap-sources-root ", - description: - "Path to make sourcemap's sources entries relative to, ex. /root/dir", - }, - { - name: "--sourcemap-use-absolute-path", - description: "Report SourceMapURL using its full path", - default: false, - }, - { - name: "--assets-dest ", - description: - "Directory name where to store assets referenced in the bundle", - }, - { - name: "--unstable-transform-profile ", - description: - "Experimental, transform JS for a specific JS engine. Currently supported: hermes, hermes-canary, default", - default: "default", - }, - { - name: "--asset-catalog-dest [string]", - description: "Path where to create an iOS Asset Catalog for images", - }, - { - name: "--reset-cache", - description: "Removes cached files", - default: false, - }, - { - name: "--read-global-cache", - description: - "Try to fetch transformed JS code from the global cache, if configured.", - default: false, - }, - { - name: "--config ", - description: "Path to the CLI configuration file", - parse: (val) => _path.default.resolve(val), - }, - { - name: "--resolver-option ", - description: - "Custom resolver options of the form key=value. URL-encoded. May be specified multiple times.", - parse: (val, previous = []) => previous.concat([val]), - }, - ], -}; -var _default = bundleCommand; -exports.default = _default; diff --git a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/index.js.flow b/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/index.js.flow deleted file mode 100644 index 275924d63..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/index.js.flow +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - * @oncall react_native - */ - -import type { Command } from "@react-native-community/cli-types"; - -export type { BundleCommandArgs } from "./buildBundle"; - -declare const bundleCommand: Command; - -declare export default typeof bundleCommand; diff --git a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/saveAssets.js b/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/saveAssets.js deleted file mode 100644 index 675008a58..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/saveAssets.js +++ /dev/null @@ -1,138 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true, -}); -exports.default = void 0; -var _assetCatalogIOS = require("./assetCatalogIOS"); -var _filterPlatformAssetScales = _interopRequireDefault( - require("./filterPlatformAssetScales") -); -var _getAssetDestPathAndroid = _interopRequireDefault( - require("./getAssetDestPathAndroid") -); -var _getAssetDestPathIOS = _interopRequireDefault( - require("./getAssetDestPathIOS") -); -var _cliTools = require("@react-native-community/cli-tools"); -var _fs = _interopRequireDefault(require("fs")); -var _path = _interopRequireDefault(require("path")); -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; -} -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - * @oncall react_native - */ - -async function saveAssets(assets, platform, assetsDest, assetCatalogDest) { - if (assetsDest == null) { - _cliTools.logger.warn("Assets destination folder is not set, skipping..."); - return; - } - const filesToCopy = {}; - const getAssetDestPath = - platform === "android" - ? _getAssetDestPathAndroid.default - : _getAssetDestPathIOS.default; - const addAssetToCopy = (asset) => { - const validScales = new Set( - (0, _filterPlatformAssetScales.default)(platform, asset.scales) - ); - asset.scales.forEach((scale, idx) => { - if (!validScales.has(scale)) { - return; - } - const src = asset.files[idx]; - const dest = _path.default.join( - assetsDest, - getAssetDestPath(asset, scale) - ); - filesToCopy[src] = dest; - }); - }; - if (platform === "ios" && assetCatalogDest != null) { - // Use iOS Asset Catalog for images. This will allow Apple app thinning to - // remove unused scales from the optimized bundle. - const catalogDir = _path.default.join( - assetCatalogDest, - "RNAssets.xcassets" - ); - if (!_fs.default.existsSync(catalogDir)) { - _cliTools.logger.error( - `Could not find asset catalog 'RNAssets.xcassets' in ${assetCatalogDest}. Make sure to create it if it does not exist.` - ); - return; - } - _cliTools.logger.info("Adding images to asset catalog", catalogDir); - (0, _assetCatalogIOS.cleanAssetCatalog)(catalogDir); - for (const asset of assets) { - if ((0, _assetCatalogIOS.isCatalogAsset)(asset)) { - const imageSet = (0, _assetCatalogIOS.getImageSet)( - catalogDir, - asset, - (0, _filterPlatformAssetScales.default)(platform, asset.scales) - ); - (0, _assetCatalogIOS.writeImageSet)(imageSet); - } else { - addAssetToCopy(asset); - } - } - _cliTools.logger.info("Done adding images to asset catalog"); - } else { - assets.forEach(addAssetToCopy); - } - return copyAll(filesToCopy); -} -function copyAll(filesToCopy) { - const queue = Object.keys(filesToCopy); - if (queue.length === 0) { - return Promise.resolve(); - } - _cliTools.logger.info(`Copying ${queue.length} asset files`); - return new Promise((resolve, reject) => { - const copyNext = (error) => { - if (error) { - reject(error); - return; - } - if (queue.length === 0) { - _cliTools.logger.info("Done copying assets"); - resolve(); - } else { - // queue.length === 0 is checked in previous branch, so this is string - const src = queue.shift(); - const dest = filesToCopy[src]; - copy(src, dest, copyNext); - } - }; - copyNext(); - }); -} -function copy(src, dest, callback) { - const destDir = _path.default.dirname(dest); - _fs.default.mkdir( - destDir, - { - recursive: true, - }, - (err) => { - if (err) { - callback(err); - return; - } - _fs.default - .createReadStream(src) - .pipe(_fs.default.createWriteStream(dest)) - .on("finish", callback); - } - ); -} -var _default = saveAssets; -exports.default = _default; diff --git a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/saveAssets.js.flow b/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/saveAssets.js.flow deleted file mode 100644 index 1a3f1b4c0..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/commands/bundle/saveAssets.js.flow +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - * @oncall react_native - */ - -import type { AssetData } from "metro/src/Assets"; - -declare function saveAssets( - assets: $ReadOnlyArray, - platform: string, - assetsDest?: string, - assetCatalogDest?: string -): Promise; - -declare export default typeof saveAssets; diff --git a/node_modules/@react-native/community-cli-plugin/dist/commands/ram-bundle/index.js b/node_modules/@react-native/community-cli-plugin/dist/commands/ram-bundle/index.js deleted file mode 100644 index 3bcdaba22..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/commands/ram-bundle/index.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true, -}); -exports.default = void 0; -var _bundle = _interopRequireDefault(require("../bundle")); -var _buildBundle = _interopRequireDefault(require("../bundle/buildBundle")); -var _RamBundle = _interopRequireDefault( - require("metro/src/shared/output/RamBundle") -); -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; -} -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - * @oncall react_native - */ - -const ramBundleCommand = { - name: "ram-bundle", - description: - "Build the RAM bundle for the provided JavaScript entry file. See https://reactnative.dev/docs/ram-bundles-inline-requires.", - func: (argv, config, args) => { - return (0, _buildBundle.default)(argv, config, args, _RamBundle.default); - }, - options: [ - // $FlowFixMe[incompatible-type] options is nonnull - ..._bundle.default.options, - { - name: "--indexed-ram-bundle", - description: - 'Force the "Indexed RAM" bundle file format, even when building for android', - default: false, - }, - ], -}; -var _default = ramBundleCommand; -exports.default = _default; diff --git a/node_modules/@react-native/community-cli-plugin/dist/commands/ram-bundle/index.js.flow b/node_modules/@react-native/community-cli-plugin/dist/commands/ram-bundle/index.js.flow deleted file mode 100644 index 20be77814..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/commands/ram-bundle/index.js.flow +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - * @oncall react_native - */ - -import type { Command } from "@react-native-community/cli-types"; - -declare const ramBundleCommand: Command; - -declare export default typeof ramBundleCommand; diff --git a/node_modules/@react-native/community-cli-plugin/dist/commands/start/attachKeyHandlers.js b/node_modules/@react-native/community-cli-plugin/dist/commands/start/attachKeyHandlers.js deleted file mode 100644 index e246cbb94..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/commands/start/attachKeyHandlers.js +++ /dev/null @@ -1,114 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true, -}); -exports.default = attachKeyHandlers; -var _KeyPressHandler = require("../../utils/KeyPressHandler"); -var _cliTools = require("@react-native-community/cli-tools"); -var _chalk = _interopRequireDefault(require("chalk")); -var _execa = _interopRequireDefault(require("execa")); -var _nodeFetch = _interopRequireDefault(require("node-fetch")); -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; -} -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - * @oncall react_native - */ - -const CTRL_C = "\u0003"; -const CTRL_D = "\u0004"; -function attachKeyHandlers({ - cliConfig, - devServerUrl, - messageSocket, - experimentalDebuggerFrontend, -}) { - if (process.stdin.isTTY !== true) { - _cliTools.logger.debug( - "Interactive mode is not supported in this environment" - ); - return; - } - const execaOptions = { - env: { - FORCE_COLOR: _chalk.default.supportsColor ? "true" : "false", - }, - }; - const keyPressHandler = new _KeyPressHandler.KeyPressHandler(async (key) => { - switch (key) { - case "r": - _cliTools.logger.info("Reloading connected app(s)..."); - messageSocket.broadcast("reload", null); - break; - case "d": - _cliTools.logger.info("Opening Dev Menu..."); - messageSocket.broadcast("devMenu", null); - break; - case "i": - _cliTools.logger.info("Opening app on iOS..."); - (0, _execa.default)( - "npx", - [ - "react-native", - "run-ios", - ...(cliConfig.project.ios?.watchModeCommandParams ?? []), - ], - execaOptions - ).stdout?.pipe(process.stdout); - break; - case "a": - _cliTools.logger.info("Opening app on Android..."); - (0, _execa.default)( - "npx", - [ - "react-native", - "run-android", - ...(cliConfig.project.android?.watchModeCommandParams ?? []), - ], - execaOptions - ).stdout?.pipe(process.stdout); - break; - case "j": - if (!experimentalDebuggerFrontend) { - return; - } - await (0, _nodeFetch.default)(devServerUrl + "/open-debugger", { - method: "POST", - }); - break; - case CTRL_C: - case CTRL_D: - _cliTools.logger.info("Stopping server"); - keyPressHandler.stopInterceptingKeyStrokes(); - process.emit("SIGINT"); - process.exit(); - } - }); - keyPressHandler.createInteractionListener(); - keyPressHandler.startInterceptingKeyStrokes(); - _cliTools.logger.log( - [ - "", - `${_chalk.default.bold("i")} - run on iOS`, - `${_chalk.default.bold("a")} - run on Android`, - `${_chalk.default.bold("d")} - open Dev Menu`, - ...(experimentalDebuggerFrontend - ? [ - `${_chalk.default.bold( - "j" - )} - open debugger (experimental, Hermes only)`, - ] - : []), - `${_chalk.default.bold("r")} - reload app`, - "", - ].join("\n") - ); -} diff --git a/node_modules/@react-native/community-cli-plugin/dist/commands/start/attachKeyHandlers.js.flow b/node_modules/@react-native/community-cli-plugin/dist/commands/start/attachKeyHandlers.js.flow deleted file mode 100644 index 9f5161bd3..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/commands/start/attachKeyHandlers.js.flow +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - * @oncall react_native - */ - -import type { Config } from "@react-native-community/cli-types"; - -declare export default function attachKeyHandlers({ - cliConfig: Config, - devServerUrl: string, - messageSocket: $ReadOnly<{ - broadcast: (type: string, params?: Record | null) => void, - ... - }>, - experimentalDebuggerFrontend: boolean, -}): void; diff --git a/node_modules/@react-native/community-cli-plugin/dist/commands/start/index.js b/node_modules/@react-native/community-cli-plugin/dist/commands/start/index.js deleted file mode 100644 index d3bf1ecc9..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/commands/start/index.js +++ /dev/null @@ -1,112 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true, -}); -exports.default = void 0; -var _runServer = _interopRequireDefault(require("./runServer")); -var _path = _interopRequireDefault(require("path")); -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; -} -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - * @oncall react_native - */ - -const startCommand = { - name: "start", - func: _runServer.default, - description: "Start the React Native development server.", - options: [ - { - name: "--port ", - parse: Number, - }, - { - name: "--host ", - default: "", - }, - { - name: "--projectRoot ", - description: "Path to a custom project root", - parse: (val) => _path.default.resolve(val), - }, - { - name: "--watchFolders ", - description: - "Specify any additional folders to be added to the watch list", - parse: (val) => - val.split(",").map((folder) => _path.default.resolve(folder)), - }, - { - name: "--assetPlugins ", - description: - "Specify any additional asset plugins to be used by the packager by full filepath", - parse: (val) => val.split(","), - }, - { - name: "--sourceExts ", - description: - "Specify any additional source extensions to be used by the packager", - parse: (val) => val.split(","), - }, - { - name: "--max-workers ", - description: - "Specifies the maximum number of workers the worker-pool " + - "will spawn for transforming files. This defaults to the number of the " + - "cores available on your machine.", - parse: (workers) => Number(workers), - }, - { - name: "--transformer ", - description: "Specify a custom transformer to be used", - }, - { - name: "--reset-cache, --resetCache", - description: "Removes cached files", - }, - { - name: "--custom-log-reporter-path, --customLogReporterPath ", - description: - "Path to a JavaScript file that exports a log reporter as a replacement for TerminalReporter", - }, - { - name: "--https", - description: "Enables https connections to the server", - }, - { - name: "--key ", - description: "Path to custom SSL key", - }, - { - name: "--cert ", - description: "Path to custom SSL cert", - }, - { - name: "--config ", - description: "Path to the CLI configuration file", - parse: (val) => _path.default.resolve(val), - }, - { - name: "--no-interactive", - description: "Disables interactive mode", - }, - { - name: "--experimental-debugger", - description: - "[Experimental] Enable the new debugger experience and 'j' to " + - "debug. This enables the new frontend experience only: connection " + - "reliability and some basic features are unstable in this release.", - }, - ], -}; -var _default = startCommand; -exports.default = _default; diff --git a/node_modules/@react-native/community-cli-plugin/dist/commands/start/index.js.flow b/node_modules/@react-native/community-cli-plugin/dist/commands/start/index.js.flow deleted file mode 100644 index 78a84eeab..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/commands/start/index.js.flow +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - * @oncall react_native - */ - -import type { Command } from "@react-native-community/cli-types"; - -export type { StartCommandArgs } from "./runServer"; - -declare const startCommand: Command; - -declare export default typeof startCommand; diff --git a/node_modules/@react-native/community-cli-plugin/dist/commands/start/runServer.js b/node_modules/@react-native/community-cli-plugin/dist/commands/start/runServer.js deleted file mode 100644 index 50e05760f..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/commands/start/runServer.js +++ /dev/null @@ -1,176 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true, -}); -exports.default = void 0; -var _isDevServerRunning = _interopRequireDefault( - require("../../utils/isDevServerRunning") -); -var _loadMetroConfig = _interopRequireDefault( - require("../../utils/loadMetroConfig") -); -var _attachKeyHandlers = _interopRequireDefault(require("./attachKeyHandlers")); -var _cliServerApi = require("@react-native-community/cli-server-api"); -var _cliTools = require("@react-native-community/cli-tools"); -var _devMiddleware = require("@react-native/dev-middleware"); -var _chalk = _interopRequireDefault(require("chalk")); -var _metro = _interopRequireDefault(require("metro")); -var _metroCore = require("metro-core"); -var _path = _interopRequireDefault(require("path")); -var _url = _interopRequireDefault(require("url")); -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; -} -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - * @oncall react_native - */ - -async function runServer(_argv, ctx, args) { - const metroConfig = await (0, _loadMetroConfig.default)(ctx, { - config: args.config, - maxWorkers: args.maxWorkers, - port: args.port ?? 8081, - resetCache: args.resetCache, - watchFolders: args.watchFolders, - projectRoot: args.projectRoot, - sourceExts: args.sourceExts, - }); - const hostname = args.host?.length ? args.host : "localhost"; - const { - projectRoot, - server: { port }, - watchFolders, - } = metroConfig; - const protocol = args.https === true ? "https" : "http"; - const devServerUrl = _url.default.format({ - protocol, - hostname, - port, - }); - _cliTools.logger.info(`Welcome to React Native v${ctx.reactNativeVersion}`); - const serverStatus = await (0, _isDevServerRunning.default)( - devServerUrl, - projectRoot - ); - if (serverStatus === "matched_server_running") { - _cliTools.logger.info( - `A dev server is already running for this project on port ${port}. Exiting.` - ); - return; - } else if (serverStatus === "port_taken") { - _cliTools.logger.error( - `Another process is running on port ${port}. Please terminate this ` + - 'process and try again, or use another port with "--port".' - ); - return; - } - _cliTools.logger.info( - `Starting dev server on port ${_chalk.default.bold(String(port))}...` - ); - if (args.assetPlugins) { - // $FlowIgnore[cannot-write] Assigning to readonly property - metroConfig.transformer.assetPlugins = args.assetPlugins.map((plugin) => - require.resolve(plugin) - ); - } - const { - middleware: communityMiddleware, - websocketEndpoints: communityWebsocketEndpoints, - messageSocketEndpoint, - eventsSocketEndpoint, - } = (0, _cliServerApi.createDevServerMiddleware)({ - host: hostname, - port, - watchFolders, - }); - const { middleware, websocketEndpoints } = (0, - _devMiddleware.createDevMiddleware)({ - projectRoot, - serverBaseUrl: devServerUrl, - logger: _cliTools.logger, - unstable_experiments: { - // NOTE: Only affects the /open-debugger endpoint - enableNewDebugger: args.experimentalDebugger, - }, - }); - let reportEvent; - const terminal = new _metroCore.Terminal(process.stdout); - const ReporterImpl = getReporterImpl(args.customLogReporterPath); - const terminalReporter = new ReporterImpl(terminal); - // $FlowIgnore[cannot-write] Assigning to readonly property - metroConfig.reporter = { - update(event) { - terminalReporter.update(event); - if (reportEvent) { - reportEvent(event); - } - if (args.interactive && event.type === "initialize_done") { - _cliTools.logger.info("Dev server ready"); - (0, _attachKeyHandlers.default)({ - cliConfig: ctx, - devServerUrl, - messageSocket: messageSocketEndpoint, - experimentalDebuggerFrontend: args.experimentalDebugger, - }); - } - }, - }; - const serverInstance = await _metro.default.runServer(metroConfig, { - host: args.host, - secure: args.https, - secureCert: args.cert, - secureKey: args.key, - unstable_extraMiddleware: [ - communityMiddleware, - _cliServerApi.indexPageMiddleware, - middleware, - ], - websocketEndpoints: { - ...communityWebsocketEndpoints, - ...websocketEndpoints, - }, - }); - reportEvent = eventsSocketEndpoint.reportEvent; - - // In Node 8, the default keep-alive for an HTTP connection is 5 seconds. In - // early versions of Node 8, this was implemented in a buggy way which caused - // some HTTP responses (like those containing large JS bundles) to be - // terminated early. - // - // As a workaround, arbitrarily increase the keep-alive from 5 to 30 seconds, - // which should be enough to send even the largest of JS bundles. - // - // For more info: https://github.com/nodejs/node/issues/13391 - // - serverInstance.keepAliveTimeout = 30000; - await _cliTools.version.logIfUpdateAvailable(ctx.root); -} -function getReporterImpl(customLogReporterPath) { - if (customLogReporterPath == null) { - return require("metro/src/lib/TerminalReporter"); - } - try { - // First we let require resolve it, so we can require packages in node_modules - // as expected. eg: require('my-package/reporter'); - // $FlowIgnore[unsupported-syntax] - return require(customLogReporterPath); - } catch (e) { - if (e.code !== "MODULE_NOT_FOUND") { - throw e; - } - // If that doesn't work, then we next try relative to the cwd, eg: - // require('./reporter'); - // $FlowIgnore[unsupported-syntax] - return require(_path.default.resolve(customLogReporterPath)); - } -} -var _default = runServer; -exports.default = _default; diff --git a/node_modules/@react-native/community-cli-plugin/dist/commands/start/runServer.js.flow b/node_modules/@react-native/community-cli-plugin/dist/commands/start/runServer.js.flow deleted file mode 100644 index 1a5a66740..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/commands/start/runServer.js.flow +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - * @oncall react_native - */ - -import type { Config } from "@react-native-community/cli-types"; -export type StartCommandArgs = { - assetPlugins?: string[], - cert?: string, - customLogReporterPath?: string, - experimentalDebugger: boolean, - host?: string, - https?: boolean, - maxWorkers?: number, - key?: string, - platforms?: string[], - port?: number, - resetCache?: boolean, - sourceExts?: string[], - transformer?: string, - watchFolders?: string[], - config?: string, - projectRoot?: string, - interactive: boolean, -}; - -declare function runServer( - _argv: Array, - ctx: Config, - args: StartCommandArgs -): void; - -declare export default typeof runServer; diff --git a/node_modules/@react-native/community-cli-plugin/dist/index.flow.js b/node_modules/@react-native/community-cli-plugin/dist/index.flow.js deleted file mode 100644 index d49efa1b4..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/index.flow.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true, -}); -Object.defineProperty(exports, "bundleCommand", { - enumerable: true, - get: function () { - return _bundle.default; - }, -}); -Object.defineProperty(exports, "ramBundleCommand", { - enumerable: true, - get: function () { - return _ramBundle.default; - }, -}); -Object.defineProperty(exports, "startCommand", { - enumerable: true, - get: function () { - return _start.default; - }, -}); -Object.defineProperty(exports, "unstable_buildBundleWithConfig", { - enumerable: true, - get: function () { - return _buildBundle.unstable_buildBundleWithConfig; - }, -}); -var _bundle = _interopRequireDefault(require("./commands/bundle")); -var _ramBundle = _interopRequireDefault(require("./commands/ram-bundle")); -var _start = _interopRequireDefault(require("./commands/start")); -var _buildBundle = require("./commands/bundle/buildBundle"); -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; -} diff --git a/node_modules/@react-native/community-cli-plugin/dist/index.flow.js.flow b/node_modules/@react-native/community-cli-plugin/dist/index.flow.js.flow deleted file mode 100644 index 6324da8fe..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/index.flow.js.flow +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - * @oncall react_native - */ - -export { default as bundleCommand } from "./commands/bundle"; -export { default as ramBundleCommand } from "./commands/ram-bundle"; -export { default as startCommand } from "./commands/start"; - -export { unstable_buildBundleWithConfig } from "./commands/bundle/buildBundle"; diff --git a/node_modules/@react-native/community-cli-plugin/dist/index.js b/node_modules/@react-native/community-cli-plugin/dist/index.js deleted file mode 100644 index ec68054e9..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./index.flow"); diff --git a/node_modules/@react-native/community-cli-plugin/dist/index.js.flow b/node_modules/@react-native/community-cli-plugin/dist/index.js.flow deleted file mode 100644 index c734a2841..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/index.js.flow +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - * @format - * @oncall react_native - */ - -declare module.exports: $FlowFixMe; diff --git a/node_modules/@react-native/community-cli-plugin/dist/utils/KeyPressHandler.js b/node_modules/@react-native/community-cli-plugin/dist/utils/KeyPressHandler.js deleted file mode 100644 index 7472950d8..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/utils/KeyPressHandler.js +++ /dev/null @@ -1,91 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true, -}); -exports.KeyPressHandler = void 0; -var _cliTools = require("@react-native-community/cli-tools"); -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - * @oncall react_native - */ - -const CTRL_C = "\u0003"; - -/** An abstract key stroke interceptor. */ -class KeyPressHandler { - _isInterceptingKeyStrokes = false; - _isHandlingKeyPress = false; - constructor(onPress) { - this._onPress = onPress; - } - - /** Start observing interaction pause listeners. */ - createInteractionListener() { - // Support observing prompts. - let wasIntercepting = false; - const listener = ({ pause }) => { - if (pause) { - // Track if we were already intercepting key strokes before pausing, so we can - // resume after pausing. - wasIntercepting = this._isInterceptingKeyStrokes; - this.stopInterceptingKeyStrokes(); - } else if (wasIntercepting) { - // Only start if we were previously intercepting. - this.startInterceptingKeyStrokes(); - } - }; - return listener; - } - _handleKeypress = async (key) => { - // Prevent sending another event until the previous event has finished. - if (this._isHandlingKeyPress && key !== CTRL_C) { - return; - } - this._isHandlingKeyPress = true; - try { - _cliTools.logger.debug(`Key pressed: ${key}`); - await this._onPress(key); - } catch (error) { - return new _cliTools.CLIError( - "There was an error with the key press handler." - ); - } finally { - this._isHandlingKeyPress = false; - } - }; - - /** Start intercepting all key strokes and passing them to the input `onPress` method. */ - startInterceptingKeyStrokes() { - if (this._isInterceptingKeyStrokes) { - return; - } - this._isInterceptingKeyStrokes = true; - const { stdin } = process; - // $FlowFixMe[prop-missing] - stdin.setRawMode(true); - stdin.resume(); - stdin.setEncoding("utf8"); - stdin.on("data", this._handleKeypress); - } - - /** Stop intercepting all key strokes. */ - stopInterceptingKeyStrokes() { - if (!this._isInterceptingKeyStrokes) { - return; - } - this._isInterceptingKeyStrokes = false; - const { stdin } = process; - stdin.removeListener("data", this._handleKeypress); - // $FlowFixMe[prop-missing] - stdin.setRawMode(false); - stdin.resume(); - } -} -exports.KeyPressHandler = KeyPressHandler; diff --git a/node_modules/@react-native/community-cli-plugin/dist/utils/KeyPressHandler.js.flow b/node_modules/@react-native/community-cli-plugin/dist/utils/KeyPressHandler.js.flow deleted file mode 100644 index 0c4597c20..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/utils/KeyPressHandler.js.flow +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - * @oncall react_native - */ - -/** An abstract key stroke interceptor. */ -declare export class KeyPressHandler { - _isInterceptingKeyStrokes: $FlowFixMe; - _isHandlingKeyPress: $FlowFixMe; - _onPress: (key: string) => Promise; - constructor(onPress: (key: string) => Promise): void; - createInteractionListener(): ({ pause: boolean, ... }) => void; - _handleKeypress: $FlowFixMe; - startInterceptingKeyStrokes(): void; - stopInterceptingKeyStrokes(): void; -} diff --git a/node_modules/@react-native/community-cli-plugin/dist/utils/isDevServerRunning.js b/node_modules/@react-native/community-cli-plugin/dist/utils/isDevServerRunning.js deleted file mode 100644 index 2a2a391b0..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/utils/isDevServerRunning.js +++ /dev/null @@ -1,75 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true, -}); -exports.default = isDevServerRunning; -var _net = _interopRequireDefault(require("net")); -var _nodeFetch = _interopRequireDefault(require("node-fetch")); -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; -} -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - * @oncall react_native - */ - -/** - * Determine whether we can run the dev server. - * - * Return values: - * - `not_running`: The port is unoccupied. - * - `matched_server_running`: The port is occupied by another instance of this - * dev server (matching the passed `projectRoot`). - * - `port_taken`: The port is occupied by another process. - * - `unknown`: An error was encountered; attempt server creation anyway. - */ -async function isDevServerRunning(devServerUrl, projectRoot) { - const { hostname, port } = new URL(devServerUrl); - try { - if (!(await isPortOccupied(hostname, port))) { - return "not_running"; - } - const statusResponse = await (0, _nodeFetch.default)( - `${devServerUrl}/status` - ); - const body = await statusResponse.text(); - return body === "packager-status:running" && - statusResponse.headers.get("X-React-Native-Project-Root") === projectRoot - ? "matched_server_running" - : "port_taken"; - } catch (e) { - return "unknown"; - } -} -async function isPortOccupied(hostname, port) { - let result = false; - const server = _net.default.createServer(); - return new Promise((resolve, reject) => { - server.once("error", (e) => { - server.close(); - if (e.code === "EADDRINUSE") { - result = true; - } else { - reject(e); - } - }); - server.once("listening", () => { - result = false; - server.close(); - }); - server.once("close", () => { - resolve(result); - }); - server.listen({ - host: hostname, - port, - }); - }); -} diff --git a/node_modules/@react-native/community-cli-plugin/dist/utils/isDevServerRunning.js.flow b/node_modules/@react-native/community-cli-plugin/dist/utils/isDevServerRunning.js.flow deleted file mode 100644 index e0bbba4e6..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/utils/isDevServerRunning.js.flow +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - * @oncall react_native - */ - -/** - * Determine whether we can run the dev server. - * - * Return values: - * - `not_running`: The port is unoccupied. - * - `matched_server_running`: The port is occupied by another instance of this - * dev server (matching the passed `projectRoot`). - * - `port_taken`: The port is occupied by another process. - * - `unknown`: An error was encountered; attempt server creation anyway. - */ -declare export default function isDevServerRunning( - devServerUrl: string, - projectRoot: string -): Promise<"not_running" | "matched_server_running" | "port_taken" | "unknown">; diff --git a/node_modules/@react-native/community-cli-plugin/dist/utils/loadMetroConfig.js b/node_modules/@react-native/community-cli-plugin/dist/utils/loadMetroConfig.js deleted file mode 100644 index 636c0d80e..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/utils/loadMetroConfig.js +++ /dev/null @@ -1,109 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true, -}); -exports.default = loadMetroConfig; -var _metroPlatformResolver = require("./metroPlatformResolver"); -var _cliTools = require("@react-native-community/cli-tools"); -var _metroConfig = require("metro-config"); -var _path = _interopRequireDefault(require("path")); -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; -} -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - * @oncall react_native - */ - -/** - * Get the config options to override based on RN CLI inputs. - */ -function getOverrideConfig(ctx, config) { - const outOfTreePlatforms = Object.keys(ctx.platforms).filter( - (platform) => ctx.platforms[platform].npmPackageName - ); - const resolver = { - platforms: [...Object.keys(ctx.platforms), "native"], - }; - if (outOfTreePlatforms.length) { - resolver.resolveRequest = (0, - _metroPlatformResolver.reactNativePlatformResolver)( - outOfTreePlatforms.reduce((result, platform) => { - result[platform] = ctx.platforms[platform].npmPackageName; - return result; - }, {}), - config.resolver?.resolveRequest - ); - } - return { - resolver, - serializer: { - // We can include multiple copies of InitializeCore here because metro will - // only add ones that are already part of the bundle - getModulesRunBeforeMainModule: () => [ - require.resolve( - _path.default.join( - ctx.reactNativePath, - "Libraries/Core/InitializeCore" - ), - { - paths: [ctx.root], - } - ), - ...outOfTreePlatforms.map((platform) => - require.resolve( - `${ctx.platforms[platform].npmPackageName}/Libraries/Core/InitializeCore`, - { - paths: [ctx.root], - } - ) - ), - ], - }, - }; -} - -/** - * Load Metro config. - * - * Allows the CLI to override select values in `metro.config.js` based on - * dynamic user options in `ctx`. - */ -async function loadMetroConfig(ctx, options = {}) { - const cwd = ctx.root; - const projectConfig = await (0, _metroConfig.resolveConfig)( - options.config, - cwd - ); - if (projectConfig.isEmpty) { - throw new _cliTools.CLIError(`No Metro config found in ${cwd}`); - } - _cliTools.logger.debug(`Reading Metro config from ${projectConfig.filepath}`); - if (!global.__REACT_NATIVE_METRO_CONFIG_LOADED) { - for (const line of ` -================================================================================================= -From React Native 0.73, your project's Metro config should extend '@react-native/metro-config' -or it will fail to build. Please copy the template at: -https://github.com/facebook/react-native/blob/main/packages/react-native/template/metro.config.js -This warning will be removed in future (https://github.com/facebook/metro/issues/1018). -================================================================================================= - ` - .trim() - .split("\n")) { - _cliTools.logger.warn(line); - } - } - const config = await (0, _metroConfig.loadConfig)({ - cwd, - ...options, - }); - const overrideConfig = getOverrideConfig(ctx, config); - return (0, _metroConfig.mergeConfig)(config, overrideConfig); -} diff --git a/node_modules/@react-native/community-cli-plugin/dist/utils/loadMetroConfig.js.flow b/node_modules/@react-native/community-cli-plugin/dist/utils/loadMetroConfig.js.flow deleted file mode 100644 index 7b5931085..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/utils/loadMetroConfig.js.flow +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - * @oncall react_native - */ - -import type { Config } from "@react-native-community/cli-types"; -import type { ConfigT, YargArguments } from "metro-config"; - -export type { Config }; - -export type ConfigLoadingContext = $ReadOnly<{ - root: Config["root"], - reactNativePath: Config["reactNativePath"], - platforms: Config["platforms"], - ... -}>; - -/** - * Load Metro config. - * - * Allows the CLI to override select values in `metro.config.js` based on - * dynamic user options in `ctx`. - */ -declare export default function loadMetroConfig( - ctx: ConfigLoadingContext, - options: YargArguments -): Promise; diff --git a/node_modules/@react-native/community-cli-plugin/dist/utils/metroPlatformResolver.js b/node_modules/@react-native/community-cli-plugin/dist/utils/metroPlatformResolver.js deleted file mode 100644 index 2d2e6cc88..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/utils/metroPlatformResolver.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true, -}); -exports.reactNativePlatformResolver = reactNativePlatformResolver; -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - * @oncall react_native - */ - -/** - * This is an implementation of a metro resolveRequest option which will remap react-native imports - * to different npm packages based on the platform requested. This allows a single metro instance/config - * to produce bundles for multiple out of tree platforms at a time. - * - * @param platformImplementations - * A map of platform to npm package that implements that platform - * - * Ex: - * { - * windows: 'react-native-windows' - * macos: 'react-native-macos' - * } - */ -function reactNativePlatformResolver(platformImplementations, customResolver) { - return (context, moduleName, platform) => { - let modifiedModuleName = moduleName; - if (platform != null && platformImplementations[platform]) { - if (moduleName === "react-native") { - modifiedModuleName = platformImplementations[platform]; - } else if (moduleName.startsWith("react-native/")) { - modifiedModuleName = `${ - platformImplementations[platform] - }/${modifiedModuleName.slice("react-native/".length)}`; - } - } - if (customResolver) { - return customResolver(context, modifiedModuleName, platform); - } - return context.resolveRequest(context, modifiedModuleName, platform); - }; -} diff --git a/node_modules/@react-native/community-cli-plugin/dist/utils/metroPlatformResolver.js.flow b/node_modules/@react-native/community-cli-plugin/dist/utils/metroPlatformResolver.js.flow deleted file mode 100644 index 0bf469e1f..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/utils/metroPlatformResolver.js.flow +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - * @oncall react_native - */ - -import type { CustomResolver } from "metro-resolver"; - -/** - * This is an implementation of a metro resolveRequest option which will remap react-native imports - * to different npm packages based on the platform requested. This allows a single metro instance/config - * to produce bundles for multiple out of tree platforms at a time. - * - * @param platformImplementations - * A map of platform to npm package that implements that platform - * - * Ex: - * { - * windows: 'react-native-windows' - * macos: 'react-native-macos' - * } - */ -declare export function reactNativePlatformResolver( - platformImplementations: { - [platform: string]: string, - }, - customResolver: ?CustomResolver -): CustomResolver; diff --git a/node_modules/@react-native/community-cli-plugin/dist/utils/parseKeyValueParamArray.js b/node_modules/@react-native/community-cli-plugin/dist/utils/parseKeyValueParamArray.js deleted file mode 100644 index 11e33c2c3..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/utils/parseKeyValueParamArray.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true, -}); -exports.default = parseKeyValueParamArray; -var _querystring = _interopRequireDefault(require("querystring")); -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; -} -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - * @format - * @oncall react_native - */ - -function parseKeyValueParamArray(keyValueArray) { - const result = {}; - for (const item of keyValueArray) { - if (item.indexOf("=") === -1) { - throw new Error('Expected parameter to include "=" but found: ' + item); - } - if (item.indexOf("&") !== -1) { - throw new Error('Parameter cannot include "&" but found: ' + item); - } - Object.assign(result, _querystring.default.parse(item)); - } - return result; -} diff --git a/node_modules/@react-native/community-cli-plugin/dist/utils/parseKeyValueParamArray.js.flow b/node_modules/@react-native/community-cli-plugin/dist/utils/parseKeyValueParamArray.js.flow deleted file mode 100644 index 97c8bccec..000000000 --- a/node_modules/@react-native/community-cli-plugin/dist/utils/parseKeyValueParamArray.js.flow +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - * @oncall react_native - */ - -declare export default function parseKeyValueParamArray( - keyValueArray: $ReadOnlyArray -): Record; diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/BUILD_INFO b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/BUILD_INFO deleted file mode 100644 index ccaa289b9..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/BUILD_INFO +++ /dev/null @@ -1,10 +0,0 @@ -@generated SignedSource<> -Git revision: 12a45e0628384aa80075493354159ef5d91b2698 -Built with --nohooks: false -Is local checkout: false -Remote URL: https://github.com/facebookexperimental/rn-chrome-devtools-frontend -Remote branch: main -GN build args (overrides only): - is_official_build = true -Git status in checkout: - diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/README.md b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/README.md deleted file mode 100644 index 741ba72a3..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# @react-native/debugger-frontend - -![npm package](https://img.shields.io/npm/v/@react-native/debugger-frontend?color=brightgreen&label=npm%20package) - -Debugger frontend for React Native based on Chrome DevTools. - -This package is internal to React Native and is intended to be used via [`@react-native/dev-middleware`](https://www.npmjs.com/package/@react-native/dev-middleware). - -## Usage - -The package exports the absolute path to the directory containing the frontend assets. - -```js -const frontendPath = require('@react-native/debugger-frontend'); - -// Pass frontendPath to a static server, etc -``` - -## Contributing - -### Source repo - -Source code for this package lives in the [facebookexperimental/rn-chrome-devtools-frontend](https://github.com/facebookexperimental/rn-chrome-devtools-frontend) repo. See below for how we build and check in changes. - -### Updating the frontend assets - -The compiled assets for the debugger frontend are periodically checked into this package under the `dist/` folder. To update these, run `node scripts/debugger-frontend/sync-and-build` from the root of your `react-native` checkout. - -```sh -# For main -node scripts/debugger-frontend/sync-and-build --branch main - -# For stable branches (e.g. '0.73-stable') -node scripts/debugger-frontend/sync-and-build --branch 0.73-stable -``` - -By default, this will clone and build from [facebookexperimental/rn-chrome-devtools-frontend](https://github.com/facebookexperimental/rn-chrome-devtools-frontend). diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/LICENSE b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/LICENSE deleted file mode 100644 index 45bb88761..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Meta Platforms, Inc. and affiliates. -// Copyright 2014 The Chromium Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc., Meta Platforms, Inc., nor the -// names of its contributors may be used to endorse or promote products -// derived from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/3d-center.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/3d-center.svg deleted file mode 100644 index 4b527189c..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/3d-center.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/3d-pan.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/3d-pan.svg deleted file mode 100644 index 5e10f2990..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/3d-pan.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/3d-rotate.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/3d-rotate.svg deleted file mode 100644 index 60fcf9855..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/3d-rotate.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/Images.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/Images.js deleted file mode 100644 index 0977e3575..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/Images.js +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright 2023 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -const sheet = new CSSStyleSheet(); -sheet.replaceSync(':root {}'); -const style = sheet.cssRules[0].style; - -style.setProperty('--image-file-accelerometer-bottom', 'url(\"' + new URL('./accelerometer-bottom.png', import.meta.url).toString() + '\")'); -style.setProperty('--image-file-accelerometer-left', 'url(\"' + new URL('./accelerometer-left.png', import.meta.url).toString() + '\")'); -style.setProperty('--image-file-accelerometer-right', 'url(\"' + new URL('./accelerometer-right.png', import.meta.url).toString() + '\")'); -style.setProperty('--image-file-accelerometer-top', 'url(\"' + new URL('./accelerometer-top.png', import.meta.url).toString() + '\")'); -style.setProperty('--image-file-chromeLeft', 'url(\"' + new URL('./chromeLeft.avif', import.meta.url).toString() + '\")'); -style.setProperty('--image-file-chromeMiddle', 'url(\"' + new URL('./chromeMiddle.avif', import.meta.url).toString() + '\")'); -style.setProperty('--image-file-chromeRight', 'url(\"' + new URL('./chromeRight.avif', import.meta.url).toString() + '\")'); -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() + '\")'); -style.setProperty('--image-file-navigationControls', 'url(\"' + new URL('./navigationControls.png', import.meta.url).toString() + '\")'); -style.setProperty('--image-file-nodeIcon', 'url(\"' + new URL('./nodeIcon.avif', import.meta.url).toString() + '\")'); -style.setProperty('--image-file-popoverArrows', 'url(\"' + new URL('./popoverArrows.png', import.meta.url).toString() + '\")'); -style.setProperty('--image-file-react_native/welcomeIcon', 'url(\"' + new URL('./react_native/welcomeIcon.png', import.meta.url).toString() + '\")'); -style.setProperty('--image-file-toolbarResizerVertical', 'url(\"' + new URL('./toolbarResizerVertical.png', import.meta.url).toString() + '\")'); -style.setProperty('--image-file-touchCursor_2x', 'url(\"' + new URL('./touchCursor_2x.png', import.meta.url).toString() + '\")'); -style.setProperty('--image-file-touchCursor', 'url(\"' + new URL('./touchCursor.png', import.meta.url).toString() + '\")'); -style.setProperty('--image-file-whatsnew', 'url(\"' + new URL('./whatsnew.avif', import.meta.url).toString() + '\")'); -style.setProperty('--image-file-3d-center', 'url(\"' + new URL(new URL('3d-center.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-3d-pan', 'url(\"' + new URL(new URL('3d-pan.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-3d-rotate', 'url(\"' + new URL(new URL('3d-rotate.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-accelerometer-back', 'url(\"' + new URL(new URL('accelerometer-back.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-accelerometer-front', 'url(\"' + new URL(new URL('accelerometer-front.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-align-content-center', 'url(\"' + new URL(new URL('align-content-center.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-align-content-end', 'url(\"' + new URL(new URL('align-content-end.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-align-content-space-around', 'url(\"' + new URL(new URL('align-content-space-around.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-align-content-space-between', 'url(\"' + new URL(new URL('align-content-space-between.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-align-content-space-evenly', 'url(\"' + new URL(new URL('align-content-space-evenly.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-align-content-start', 'url(\"' + new URL(new URL('align-content-start.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-align-content-stretch', 'url(\"' + new URL(new URL('align-content-stretch.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-align-items-baseline', 'url(\"' + new URL(new URL('align-items-baseline.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-align-items-center', 'url(\"' + new URL(new URL('align-items-center.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-align-items-end', 'url(\"' + new URL(new URL('align-items-end.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-align-items-start', 'url(\"' + new URL(new URL('align-items-start.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-align-items-stretch', 'url(\"' + new URL(new URL('align-items-stretch.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-align-self-center', 'url(\"' + new URL(new URL('align-self-center.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-align-self-end', 'url(\"' + new URL(new URL('align-self-end.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-align-self-start', 'url(\"' + new URL(new URL('align-self-start.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-align-self-stretch', 'url(\"' + new URL(new URL('align-self-stretch.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-arrow-down', 'url(\"' + new URL(new URL('arrow-down.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-arrow-drop-down-dark', 'url(\"' + new URL(new URL('arrow-drop-down-dark.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-arrow-drop-down-light', 'url(\"' + new URL(new URL('arrow-drop-down-light.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-arrow-up-down-circle', 'url(\"' + new URL(new URL('arrow-up-down-circle.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-arrow-up-down', 'url(\"' + new URL(new URL('arrow-up-down.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-arrow-up', 'url(\"' + new URL(new URL('arrow-up.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-bell', 'url(\"' + new URL(new URL('bell.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-bezier-curve-filled', 'url(\"' + new URL(new URL('bezier-curve-filled.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-bin', 'url(\"' + new URL(new URL('bin.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-bottom-panel-close', 'url(\"' + new URL(new URL('bottom-panel-close.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-bottom-panel-open', 'url(\"' + new URL(new URL('bottom-panel-open.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-brackets', 'url(\"' + new URL(new URL('brackets.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-breakpoint-circle', 'url(\"' + new URL(new URL('breakpoint-circle.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-breakpoint-crossed-filled', 'url(\"' + new URL(new URL('breakpoint-crossed-filled.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-breakpoint-crossed', 'url(\"' + new URL(new URL('breakpoint-crossed.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-brush-filled', 'url(\"' + new URL(new URL('brush-filled.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-brush', 'url(\"' + new URL(new URL('brush.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-bug', 'url(\"' + new URL(new URL('bug.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-bundle', 'url(\"' + new URL(new URL('bundle.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-check-circle', 'url(\"' + new URL(new URL('check-circle.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-check-double', 'url(\"' + new URL(new URL('check-double.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-checker', 'url(\"' + new URL(new URL('checker.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-checkmark', 'url(\"' + new URL(new URL('checkmark.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-chevron-double-right', 'url(\"' + new URL(new URL('chevron-double-right.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-chevron-down', 'url(\"' + new URL(new URL('chevron-down.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-chevron-left-dot', 'url(\"' + new URL(new URL('chevron-left-dot.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-chevron-left', 'url(\"' + new URL(new URL('chevron-left.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-chevron-right', 'url(\"' + new URL(new URL('chevron-right.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-chevron-up', 'url(\"' + new URL(new URL('chevron-up.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-clear-list', 'url(\"' + new URL(new URL('clear-list.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-clear', 'url(\"' + new URL(new URL('clear.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-cloud', 'url(\"' + new URL(new URL('cloud.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-code-circle', 'url(\"' + new URL(new URL('code-circle.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-code', 'url(\"' + new URL(new URL('code.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-colon', 'url(\"' + new URL(new URL('colon.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-color-picker-filled', 'url(\"' + new URL(new URL('color-picker-filled.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-color-picker', 'url(\"' + new URL(new URL('color-picker.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-console-conditional-breakpoint', 'url(\"' + new URL(new URL('console-conditional-breakpoint.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-console-logpoint', 'url(\"' + new URL(new URL('console-logpoint.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-cookie', 'url(\"' + new URL(new URL('cookie.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-copy', 'url(\"' + new URL(new URL('copy.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-credit-card', 'url(\"' + new URL(new URL('credit-card.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-cross-circle-filled', 'url(\"' + new URL(new URL('cross-circle-filled.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-cross-circle', 'url(\"' + new URL(new URL('cross-circle.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-cross', 'url(\"' + new URL(new URL('cross.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-custom-typography', 'url(\"' + new URL(new URL('custom-typography.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-database', 'url(\"' + new URL(new URL('database.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-deployed', 'url(\"' + new URL(new URL('deployed.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-device-fold', 'url(\"' + new URL(new URL('device-fold.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-devices', 'url(\"' + new URL(new URL('devices.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-dock-bottom', 'url(\"' + new URL(new URL('dock-bottom.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-dock-left', 'url(\"' + new URL(new URL('dock-left.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-dock-right', 'url(\"' + new URL(new URL('dock-right.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-dock-window', 'url(\"' + new URL(new URL('dock-window.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-document', 'url(\"' + new URL(new URL('document.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-dots-horizontal', 'url(\"' + new URL(new URL('dots-horizontal.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-dots-vertical', 'url(\"' + new URL(new URL('dots-vertical.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-download', 'url(\"' + new URL(new URL('download.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-edit', 'url(\"' + new URL(new URL('edit.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-empty', 'url(\"' + new URL(new URL('empty.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-errorWave', 'url(\"' + new URL(new URL('errorWave.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-exclamation', 'url(\"' + new URL(new URL('exclamation.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-experiment-check', 'url(\"' + new URL(new URL('experiment-check.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-experiment', 'url(\"' + new URL(new URL('experiment.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-eye', 'url(\"' + new URL(new URL('eye.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-file-document', 'url(\"' + new URL(new URL('file-document.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-file-font', 'url(\"' + new URL(new URL('file-font.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-file-generic', 'url(\"' + new URL(new URL('file-generic.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-file-image', 'url(\"' + new URL(new URL('file-image.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-file-script', 'url(\"' + new URL(new URL('file-script.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-file-snippet', 'url(\"' + new URL(new URL('file-snippet.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-file-stylesheet', 'url(\"' + new URL(new URL('file-stylesheet.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-filter-clear', 'url(\"' + new URL(new URL('filter-clear.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-filter-filled', 'url(\"' + new URL(new URL('filter-filled.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-filter', 'url(\"' + new URL(new URL('filter.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-flex-direction', 'url(\"' + new URL(new URL('flex-direction.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-flex-no-wrap', 'url(\"' + new URL(new URL('flex-no-wrap.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-flex-wrap', 'url(\"' + new URL(new URL('flex-wrap.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-flow', 'url(\"' + new URL(new URL('flow.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-fold-more', 'url(\"' + new URL(new URL('fold-more.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-folder', 'url(\"' + new URL(new URL('folder.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-frame-crossed', 'url(\"' + new URL(new URL('frame-crossed.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-frame-icon', 'url(\"' + new URL(new URL('frame-icon.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-frame', 'url(\"' + new URL(new URL('frame.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-gear-filled', 'url(\"' + new URL(new URL('gear-filled.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-gear', 'url(\"' + new URL(new URL('gear.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-gears', 'url(\"' + new URL(new URL('gears.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-heap-snapshot', 'url(\"' + new URL(new URL('heap-snapshot.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-heap-snapshots', 'url(\"' + new URL(new URL('heap-snapshots.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-help', 'url(\"' + new URL(new URL('help.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-iframe-crossed', 'url(\"' + new URL(new URL('iframe-crossed.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-iframe', 'url(\"' + new URL(new URL('iframe.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-import', 'url(\"' + new URL(new URL('import.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-info-filled', 'url(\"' + new URL(new URL('info-filled.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-info', 'url(\"' + new URL(new URL('info.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-issue-cross-filled', 'url(\"' + new URL(new URL('issue-cross-filled.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-issue-exclamation-filled', 'url(\"' + new URL(new URL('issue-exclamation-filled.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-issue-questionmark-filled', 'url(\"' + new URL(new URL('issue-questionmark-filled.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-issue-text-filled', 'url(\"' + new URL(new URL('issue-text-filled.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-justify-content-center', 'url(\"' + new URL(new URL('justify-content-center.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-justify-content-end', 'url(\"' + new URL(new URL('justify-content-end.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-justify-content-space-around', 'url(\"' + new URL(new URL('justify-content-space-around.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-justify-content-space-between', 'url(\"' + new URL(new URL('justify-content-space-between.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-justify-content-space-evenly', 'url(\"' + new URL(new URL('justify-content-space-evenly.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-justify-content-start', 'url(\"' + new URL(new URL('justify-content-start.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-justify-items-center', 'url(\"' + new URL(new URL('justify-items-center.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-justify-items-end', 'url(\"' + new URL(new URL('justify-items-end.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-justify-items-start', 'url(\"' + new URL(new URL('justify-items-start.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-justify-items-stretch', 'url(\"' + new URL(new URL('justify-items-stretch.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-keyboard-pen', 'url(\"' + new URL(new URL('keyboard-pen.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-large-arrow-right-filled', 'url(\"' + new URL(new URL('large-arrow-right-filled.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-largeIcons', 'url(\"' + new URL(new URL('largeIcons.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-layers-filled', 'url(\"' + new URL(new URL('layers-filled.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-layers', 'url(\"' + new URL(new URL('layers.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-left-panel-close', 'url(\"' + new URL(new URL('left-panel-close.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-left-panel-open', 'url(\"' + new URL(new URL('left-panel-open.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-lighthouse_logo', 'url(\"' + new URL(new URL('lighthouse_logo.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-list', 'url(\"' + new URL(new URL('list.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-mediumIcons', 'url(\"' + new URL(new URL('mediumIcons.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-memory', 'url(\"' + new URL(new URL('memory.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-minus', 'url(\"' + new URL(new URL('minus.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-minus_icon', 'url(\"' + new URL(new URL('minus_icon.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-network-settings', 'url(\"' + new URL(new URL('network-settings.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-node_search_icon', 'url(\"' + new URL(new URL('node_search_icon.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-open-externally', 'url(\"' + new URL(new URL('open-externally.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-pause', 'url(\"' + new URL(new URL('pause.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-performance', 'url(\"' + new URL(new URL('performance.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-person', 'url(\"' + new URL(new URL('person.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-play', 'url(\"' + new URL(new URL('play.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-plus', 'url(\"' + new URL(new URL('plus.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-popup', 'url(\"' + new URL(new URL('popup.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-preview_feature_video_thumbnail', 'url(\"' + new URL(new URL('preview_feature_video_thumbnail.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-profile', 'url(\"' + new URL(new URL('profile.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-record-start', 'url(\"' + new URL(new URL('record-start.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-record-stop', 'url(\"' + new URL(new URL('record-stop.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-redo', 'url(\"' + new URL(new URL('redo.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-refresh', 'url(\"' + new URL(new URL('refresh.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-replace', 'url(\"' + new URL(new URL('replace.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-replay', 'url(\"' + new URL(new URL('replay.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-resizeDiagonal', 'url(\"' + new URL(new URL('resizeDiagonal.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-resizeHorizontal', 'url(\"' + new URL(new URL('resizeHorizontal.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-resizeVertical', 'url(\"' + new URL(new URL('resizeVertical.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-resume', 'url(\"' + new URL(new URL('resume.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-review', 'url(\"' + new URL(new URL('review.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-right-panel-close', 'url(\"' + new URL(new URL('right-panel-close.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-right-panel-open', 'url(\"' + new URL(new URL('right-panel-open.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-screen-rotation', 'url(\"' + new URL(new URL('screen-rotation.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-search', 'url(\"' + new URL(new URL('search.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-securityIcons', 'url(\"' + new URL(new URL('securityIcons.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-select-element', 'url(\"' + new URL(new URL('select-element.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-settings_14x14_icon', 'url(\"' + new URL(new URL('settings_14x14_icon.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-shadow', 'url(\"' + new URL(new URL('shadow.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-smallIcons', 'url(\"' + new URL(new URL('smallIcons.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-snippet', 'url(\"' + new URL(new URL('snippet.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-star', 'url(\"' + new URL(new URL('star.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-step-into', 'url(\"' + new URL(new URL('step-into.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-step-out', 'url(\"' + new URL(new URL('step-out.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-step-over', 'url(\"' + new URL(new URL('step-over.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-step', 'url(\"' + new URL(new URL('step.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-stop', 'url(\"' + new URL(new URL('stop.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-symbol', 'url(\"' + new URL(new URL('symbol.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-sync', 'url(\"' + new URL(new URL('sync.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-table', 'url(\"' + new URL(new URL('table.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-top-panel-close', 'url(\"' + new URL(new URL('top-panel-close.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-top-panel-open', 'url(\"' + new URL(new URL('top-panel-open.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-triangle-bottom-right', 'url(\"' + new URL(new URL('triangle-bottom-right.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-triangle-down', 'url(\"' + new URL(new URL('triangle-down.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-triangle-left', 'url(\"' + new URL(new URL('triangle-left.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-triangle-right', 'url(\"' + new URL(new URL('triangle-right.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-triangle-up', 'url(\"' + new URL(new URL('triangle-up.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-undo', 'url(\"' + new URL(new URL('undo.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-warning-filled', 'url(\"' + new URL(new URL('warning-filled.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-warning', 'url(\"' + new URL(new URL('warning.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-warning_icon', 'url(\"' + new URL(new URL('warning_icon.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-watch', 'url(\"' + new URL(new URL('watch.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-width', 'url(\"' + new URL(new URL('width.svg', import.meta.url).href, import.meta.url).toString() + '\")'); - -document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet]; diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/accelerometer-back.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/accelerometer-back.svg deleted file mode 100644 index 577440d9c..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/accelerometer-back.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/accelerometer-bottom.png b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/accelerometer-bottom.png deleted file mode 100644 index 997b5498f..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/accelerometer-bottom.png and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/accelerometer-front.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/accelerometer-front.svg deleted file mode 100644 index e4c195d56..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/accelerometer-front.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/accelerometer-left.png b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/accelerometer-left.png deleted file mode 100644 index 26db4cfa0..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/accelerometer-left.png and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/accelerometer-right.png b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/accelerometer-right.png deleted file mode 100644 index 034c882b8..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/accelerometer-right.png and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/accelerometer-top.png b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/accelerometer-top.png deleted file mode 100644 index 71a07f090..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/accelerometer-top.png and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-content-center.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-content-center.svg deleted file mode 100644 index ed7848c89..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-content-center.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-content-end.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-content-end.svg deleted file mode 100644 index 8df858f6f..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-content-end.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-content-space-around.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-content-space-around.svg deleted file mode 100644 index 0c12364a9..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-content-space-around.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-content-space-between.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-content-space-between.svg deleted file mode 100644 index 31f038c6a..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-content-space-between.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-content-space-evenly.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-content-space-evenly.svg deleted file mode 100644 index a1d5f2527..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-content-space-evenly.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-content-start.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-content-start.svg deleted file mode 100644 index 2da35f5c0..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-content-start.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-content-stretch.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-content-stretch.svg deleted file mode 100644 index b608b2606..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-content-stretch.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-items-baseline.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-items-baseline.svg deleted file mode 100644 index ea9f1e6c5..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-items-baseline.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-items-center.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-items-center.svg deleted file mode 100644 index 2d98cc577..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-items-center.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-items-end.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-items-end.svg deleted file mode 100644 index 5acb9305d..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-items-end.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-items-start.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-items-start.svg deleted file mode 100644 index 598ca72f9..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-items-start.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-items-stretch.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-items-stretch.svg deleted file mode 100644 index aafd6c4b1..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-items-stretch.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-self-center.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-self-center.svg deleted file mode 100644 index c8750045d..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-self-center.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-self-end.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-self-end.svg deleted file mode 100644 index 8c28a8974..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-self-end.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-self-start.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-self-start.svg deleted file mode 100644 index 28b567dd6..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-self-start.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-self-stretch.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-self-stretch.svg deleted file mode 100644 index 24c4091f4..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/align-self-stretch.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/arrow-down.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/arrow-down.svg deleted file mode 100644 index 7c994d51d..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/arrow-down.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/arrow-drop-down-dark.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/arrow-drop-down-dark.svg deleted file mode 100644 index f62a8e095..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/arrow-drop-down-dark.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/arrow-drop-down-light.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/arrow-drop-down-light.svg deleted file mode 100644 index a960cfe67..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/arrow-drop-down-light.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/arrow-up-down-circle.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/arrow-up-down-circle.svg deleted file mode 100644 index f80215967..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/arrow-up-down-circle.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/arrow-up-down.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/arrow-up-down.svg deleted file mode 100644 index 7f79a92a1..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/arrow-up-down.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/arrow-up.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/arrow-up.svg deleted file mode 100644 index a404a0339..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/arrow-up.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/bell.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/bell.svg deleted file mode 100644 index 7ff95090d..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/bell.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/bezier-curve-filled.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/bezier-curve-filled.svg deleted file mode 100644 index 79bf5b7f1..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/bezier-curve-filled.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/bin.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/bin.svg deleted file mode 100644 index 9c03f6e3a..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/bin.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/bottom-panel-close.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/bottom-panel-close.svg deleted file mode 100644 index e299cafe0..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/bottom-panel-close.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/bottom-panel-open.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/bottom-panel-open.svg deleted file mode 100644 index 234f01aea..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/bottom-panel-open.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/brackets.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/brackets.svg deleted file mode 100644 index d6e7dd4fd..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/brackets.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/breakpoint-circle.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/breakpoint-circle.svg deleted file mode 100644 index d7ddce672..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/breakpoint-circle.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/breakpoint-crossed-filled.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/breakpoint-crossed-filled.svg deleted file mode 100644 index 3ecc5745d..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/breakpoint-crossed-filled.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/breakpoint-crossed.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/breakpoint-crossed.svg deleted file mode 100644 index fcf888258..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/breakpoint-crossed.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/brush-filled.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/brush-filled.svg deleted file mode 100644 index 63b0610c0..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/brush-filled.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/brush.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/brush.svg deleted file mode 100644 index 36a002052..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/brush.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/bug.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/bug.svg deleted file mode 100644 index 304d42133..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/bug.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/bundle.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/bundle.svg deleted file mode 100644 index 0044f9722..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/bundle.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/check-circle.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/check-circle.svg deleted file mode 100644 index e1781e67b..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/check-circle.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/check-double.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/check-double.svg deleted file mode 100644 index 2a7dcf496..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/check-double.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/checker.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/checker.svg deleted file mode 100644 index 8625e3f33..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/checker.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/checkmark.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/checkmark.svg deleted file mode 100644 index 11a490ab8..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/checkmark.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/chevron-double-right.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/chevron-double-right.svg deleted file mode 100644 index 0c41ab0bc..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/chevron-double-right.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/chevron-down.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/chevron-down.svg deleted file mode 100644 index b83df843b..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/chevron-down.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/chevron-left-dot.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/chevron-left-dot.svg deleted file mode 100644 index f8b466433..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/chevron-left-dot.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/chevron-left.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/chevron-left.svg deleted file mode 100644 index 1f3ec5352..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/chevron-left.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/chevron-right.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/chevron-right.svg deleted file mode 100644 index 3ee9088c1..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/chevron-right.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/chevron-up.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/chevron-up.svg deleted file mode 100644 index fbbed9e5e..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/chevron-up.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/chromeLeft.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/chromeLeft.avif deleted file mode 100644 index 25d181577..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/chromeLeft.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/chromeMiddle.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/chromeMiddle.avif deleted file mode 100644 index 13087d039..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/chromeMiddle.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/chromeRight.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/chromeRight.avif deleted file mode 100644 index 81472dd51..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/chromeRight.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/clear-list.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/clear-list.svg deleted file mode 100644 index 21e26c56b..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/clear-list.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/clear.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/clear.svg deleted file mode 100644 index b0b70ebf6..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/clear.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/cloud.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/cloud.svg deleted file mode 100644 index 75fd42b65..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/cloud.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/code-circle.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/code-circle.svg deleted file mode 100644 index 7b8a2cd50..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/code-circle.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/code.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/code.svg deleted file mode 100644 index cc3a4664d..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/code.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/colon.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/colon.svg deleted file mode 100644 index ee785d3c2..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/colon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/color-picker-filled.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/color-picker-filled.svg deleted file mode 100644 index 5db9aed7e..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/color-picker-filled.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/color-picker.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/color-picker.svg deleted file mode 100644 index a44e4d4f7..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/color-picker.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/console-conditional-breakpoint.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/console-conditional-breakpoint.svg deleted file mode 100644 index a7c27cca7..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/console-conditional-breakpoint.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/console-logpoint.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/console-logpoint.svg deleted file mode 100644 index f7a8eb524..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/console-logpoint.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/cookie.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/cookie.svg deleted file mode 100644 index 6ea4ccd4e..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/cookie.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/copy.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/copy.svg deleted file mode 100644 index 7a08debbe..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/copy.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/credit-card.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/credit-card.svg deleted file mode 100644 index d8c361c78..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/credit-card.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/cross-circle-filled.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/cross-circle-filled.svg deleted file mode 100644 index e83a53211..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/cross-circle-filled.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/cross-circle.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/cross-circle.svg deleted file mode 100644 index 3aa22bba9..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/cross-circle.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/cross.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/cross.svg deleted file mode 100644 index 09b786b89..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/cross.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/cssoverview_icons_2x.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/cssoverview_icons_2x.avif deleted file mode 100644 index 28a74d19d..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/cssoverview_icons_2x.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/custom-typography.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/custom-typography.svg deleted file mode 100644 index c7ade5753..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/custom-typography.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/database.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/database.svg deleted file mode 100644 index 249d04e26..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/database.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/deployed.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/deployed.svg deleted file mode 100644 index 68347cd27..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/deployed.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/device-fold.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/device-fold.svg deleted file mode 100644 index 486025dbd..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/device-fold.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/devices.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/devices.svg deleted file mode 100644 index 0608faaf3..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/devices.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/dock-bottom.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/dock-bottom.svg deleted file mode 100644 index afcbef067..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/dock-bottom.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/dock-left.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/dock-left.svg deleted file mode 100644 index 7fc52f06f..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/dock-left.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/dock-right.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/dock-right.svg deleted file mode 100644 index 3003a19e9..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/dock-right.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/dock-window.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/dock-window.svg deleted file mode 100644 index b3bf51fde..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/dock-window.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/document.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/document.svg deleted file mode 100644 index 327f70f4b..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/document.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/dots-horizontal.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/dots-horizontal.svg deleted file mode 100644 index 2bfabf4f0..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/dots-horizontal.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/dots-vertical.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/dots-vertical.svg deleted file mode 100644 index 4a1017162..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/dots-vertical.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/download.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/download.svg deleted file mode 100644 index 1405094af..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/download.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/edit.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/edit.svg deleted file mode 100644 index 986dfb0eb..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/edit.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/empty.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/empty.svg deleted file mode 100644 index cdbb6fae5..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/empty.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/errorWave.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/errorWave.svg deleted file mode 100644 index 97ea21e1e..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/errorWave.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/exclamation.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/exclamation.svg deleted file mode 100644 index 62505958f..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/exclamation.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/experiment-check.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/experiment-check.svg deleted file mode 100644 index 619cd3f59..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/experiment-check.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/experiment.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/experiment.svg deleted file mode 100644 index 842b3c8aa..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/experiment.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/eye.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/eye.svg deleted file mode 100644 index eec812ff0..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/eye.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/favicon.ico b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/favicon.ico deleted file mode 100644 index 5c125de5d..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/favicon.ico and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/file-document.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/file-document.svg deleted file mode 100644 index 56b536d0e..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/file-document.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/file-font.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/file-font.svg deleted file mode 100644 index 35145dfad..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/file-font.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/file-generic.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/file-generic.svg deleted file mode 100644 index 5f20ccc22..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/file-generic.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/file-image.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/file-image.svg deleted file mode 100644 index 3f3c3db1c..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/file-image.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/file-script.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/file-script.svg deleted file mode 100644 index c1d673587..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/file-script.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/file-snippet.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/file-snippet.svg deleted file mode 100644 index 482b4cd54..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/file-snippet.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/file-stylesheet.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/file-stylesheet.svg deleted file mode 100644 index 849cb274f..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/file-stylesheet.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/filter-clear.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/filter-clear.svg deleted file mode 100644 index ce5f8aa5b..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/filter-clear.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/filter-filled.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/filter-filled.svg deleted file mode 100644 index aa5f90890..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/filter-filled.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/filter.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/filter.svg deleted file mode 100644 index 19cf2d653..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/filter.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/flex-direction.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/flex-direction.svg deleted file mode 100644 index 43969a791..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/flex-direction.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/flex-no-wrap.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/flex-no-wrap.svg deleted file mode 100644 index 1eda6c292..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/flex-no-wrap.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/flex-wrap.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/flex-wrap.svg deleted file mode 100644 index e06565da9..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/flex-wrap.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/flow.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/flow.svg deleted file mode 100644 index 7f1132f5b..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/flow.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/fold-more.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/fold-more.svg deleted file mode 100644 index 737b499ed..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/fold-more.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/folder.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/folder.svg deleted file mode 100644 index b7fcc3399..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/folder.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/frame-crossed.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/frame-crossed.svg deleted file mode 100644 index 5d7f72580..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/frame-crossed.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/frame-icon.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/frame-icon.svg deleted file mode 100644 index f4c97e360..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/frame-icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/frame.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/frame.svg deleted file mode 100644 index c6856d1f3..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/frame.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/gear-filled.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/gear-filled.svg deleted file mode 100644 index 369a88a33..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/gear-filled.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/gear.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/gear.svg deleted file mode 100644 index 4ffdcee8f..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/gear.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/gears.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/gears.svg deleted file mode 100644 index 966a25829..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/gears.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/heap-snapshot.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/heap-snapshot.svg deleted file mode 100644 index 586b88788..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/heap-snapshot.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/heap-snapshots.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/heap-snapshots.svg deleted file mode 100644 index 4fa46f254..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/heap-snapshots.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/help.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/help.svg deleted file mode 100644 index 1b6be502a..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/help.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/iframe-crossed.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/iframe-crossed.svg deleted file mode 100644 index d3b20eefb..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/iframe-crossed.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/iframe.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/iframe.svg deleted file mode 100644 index 189b4c48f..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/iframe.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/import.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/import.svg deleted file mode 100644 index 295583e51..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/import.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/info-filled.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/info-filled.svg deleted file mode 100644 index 5a3f34648..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/info-filled.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/info.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/info.svg deleted file mode 100644 index eb801215d..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/info.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/issue-cross-filled.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/issue-cross-filled.svg deleted file mode 100644 index f257c1d6e..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/issue-cross-filled.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/issue-exclamation-filled.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/issue-exclamation-filled.svg deleted file mode 100644 index 6ac2096d6..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/issue-exclamation-filled.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/issue-questionmark-filled.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/issue-questionmark-filled.svg deleted file mode 100644 index 3c981aad0..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/issue-questionmark-filled.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/issue-text-filled.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/issue-text-filled.svg deleted file mode 100644 index e025eb40a..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/issue-text-filled.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-content-center.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-content-center.svg deleted file mode 100644 index fd849a2a6..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-content-center.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-content-end.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-content-end.svg deleted file mode 100644 index 02789e609..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-content-end.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-content-space-around.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-content-space-around.svg deleted file mode 100644 index f75eeda2d..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-content-space-around.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-content-space-between.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-content-space-between.svg deleted file mode 100644 index 832d34d35..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-content-space-between.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-content-space-evenly.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-content-space-evenly.svg deleted file mode 100644 index 86d09f7ea..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-content-space-evenly.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-content-start.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-content-start.svg deleted file mode 100644 index 7a9ac995c..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-content-start.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-items-center.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-items-center.svg deleted file mode 100644 index 584bf2914..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-items-center.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-items-end.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-items-end.svg deleted file mode 100644 index 2178cadff..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-items-end.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-items-start.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-items-start.svg deleted file mode 100644 index 0d98312a5..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-items-start.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-items-stretch.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-items-stretch.svg deleted file mode 100644 index f6423361c..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/justify-items-stretch.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/keyboard-pen.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/keyboard-pen.svg deleted file mode 100644 index a71bc36e3..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/keyboard-pen.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/large-arrow-right-filled.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/large-arrow-right-filled.svg deleted file mode 100644 index df059e0a7..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/large-arrow-right-filled.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/largeIcons.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/largeIcons.svg deleted file mode 100644 index 76ca1fc94..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/largeIcons.svg +++ /dev/null @@ -1,2 +0,0 @@ -abcdefgh123456789i9Sprites are deprecated, do not modify this file. -See readme in front_end/Images for the new workflow. \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/layers-filled.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/layers-filled.svg deleted file mode 100644 index d068f383b..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/layers-filled.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/layers.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/layers.svg deleted file mode 100644 index 2c222fc08..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/layers.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/left-panel-close.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/left-panel-close.svg deleted file mode 100644 index c0d1f09e3..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/left-panel-close.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/left-panel-open.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/left-panel-open.svg deleted file mode 100644 index c899d1e02..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/left-panel-open.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/lighthouse_logo.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/lighthouse_logo.svg deleted file mode 100644 index 5f8e9c6b9..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/lighthouse_logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/list.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/list.svg deleted file mode 100644 index b6d68eb25..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/list.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/mediumIcons.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/mediumIcons.svg deleted file mode 100644 index de7b92939..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/mediumIcons.svg +++ /dev/null @@ -1 +0,0 @@ -1234abcd5eAB6fgSprites are deprecated, do not modify this file.See readme in front_end/Images for the new workflow. \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/memory.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/memory.svg deleted file mode 100644 index f025edd82..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/memory.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/minus.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/minus.svg deleted file mode 100644 index c9cbc60a8..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/minus.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/minus_icon.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/minus_icon.svg deleted file mode 100644 index 67b121358..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/minus_icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/navigationControls.png b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/navigationControls.png deleted file mode 100644 index de8ecc77e..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/navigationControls.png and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/navigationControls_2x.png b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/navigationControls_2x.png deleted file mode 100644 index 01dff78e6..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/navigationControls_2x.png and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/network-settings.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/network-settings.svg deleted file mode 100644 index 252f46378..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/network-settings.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/nodeIcon.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/nodeIcon.avif deleted file mode 100644 index ce1a7dffc..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/nodeIcon.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/node_search_icon.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/node_search_icon.svg deleted file mode 100644 index bf82df215..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/node_search_icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/open-externally.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/open-externally.svg deleted file mode 100644 index dca6f5924..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/open-externally.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/pause.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/pause.svg deleted file mode 100644 index ea1a4275f..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/pause.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/performance.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/performance.svg deleted file mode 100644 index 37c2f07dc..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/performance.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/person.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/person.svg deleted file mode 100644 index 03aaab271..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/person.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/play.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/play.svg deleted file mode 100644 index 6c48f3f05..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/play.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/plus.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/plus.svg deleted file mode 100644 index d5a63dd39..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/plus.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/popoverArrows.png b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/popoverArrows.png deleted file mode 100644 index 0e427a7f1..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/popoverArrows.png and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/popup.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/popup.svg deleted file mode 100644 index 321eb4489..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/popup.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/preview_feature_video_thumbnail.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/preview_feature_video_thumbnail.svg deleted file mode 100644 index 77d006298..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/preview_feature_video_thumbnail.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/profile.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/profile.svg deleted file mode 100644 index 142fd97fa..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/profile.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/react_native/welcomeIcon.png b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/react_native/welcomeIcon.png deleted file mode 100644 index 724667420..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/react_native/welcomeIcon.png and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/record-start.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/record-start.svg deleted file mode 100644 index 5ac3d58d7..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/record-start.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/record-stop.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/record-stop.svg deleted file mode 100644 index 4e5f28671..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/record-stop.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/redo.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/redo.svg deleted file mode 100644 index 3318dd6a7..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/redo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/refresh.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/refresh.svg deleted file mode 100644 index 46531ea3e..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/refresh.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/replace.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/replace.svg deleted file mode 100644 index 02be3b5c9..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/replace.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/replay.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/replay.svg deleted file mode 100644 index 097a82339..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/replay.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/resizeDiagonal.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/resizeDiagonal.svg deleted file mode 100644 index 29955155b..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/resizeDiagonal.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/resizeHorizontal.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/resizeHorizontal.svg deleted file mode 100644 index eed4f6e0b..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/resizeHorizontal.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/resizeVertical.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/resizeVertical.svg deleted file mode 100644 index 5b0b69fa4..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/resizeVertical.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/resume.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/resume.svg deleted file mode 100644 index 7a32780ce..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/resume.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/review.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/review.svg deleted file mode 100644 index 4a4a7ac36..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/review.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/right-panel-close.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/right-panel-close.svg deleted file mode 100644 index 50b616a12..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/right-panel-close.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/right-panel-open.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/right-panel-open.svg deleted file mode 100644 index 400af5ae3..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/right-panel-open.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/screen-rotation.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/screen-rotation.svg deleted file mode 100644 index 66bc81fa4..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/screen-rotation.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/search.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/search.svg deleted file mode 100644 index 428f46c9e..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/search.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/securityIcons.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/securityIcons.svg deleted file mode 100644 index 9e14a4172..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/securityIcons.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/select-element.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/select-element.svg deleted file mode 100644 index 6d8c0e0ad..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/select-element.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/settings_14x14_icon.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/settings_14x14_icon.svg deleted file mode 100644 index 174a91777..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/settings_14x14_icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/shadow.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/shadow.svg deleted file mode 100644 index a6c1c060a..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/shadow.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/smallIcons.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/smallIcons.svg deleted file mode 100644 index e5476e9c1..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/smallIcons.svg +++ /dev/null @@ -1 +0,0 @@ -abcde123456fgSprites are deprecated, do not modify this file.See readme in front_end/Images for the new workflow. \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/snippet.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/snippet.svg deleted file mode 100644 index dcc24486f..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/snippet.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/star.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/star.svg deleted file mode 100644 index f9a4d0daa..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/star.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/step-into.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/step-into.svg deleted file mode 100644 index 73cfea675..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/step-into.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/step-out.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/step-out.svg deleted file mode 100644 index 5de032dc9..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/step-out.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/step-over.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/step-over.svg deleted file mode 100644 index db53d3407..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/step-over.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/step.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/step.svg deleted file mode 100644 index b5fcc90e0..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/step.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/stop.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/stop.svg deleted file mode 100644 index 96b549487..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/stop.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/symbol.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/symbol.svg deleted file mode 100644 index 592ed1946..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/symbol.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/sync.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/sync.svg deleted file mode 100644 index ff87f0fb5..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/sync.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/table.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/table.svg deleted file mode 100644 index 02238a1a2..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/table.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/toolbarResizerVertical.png b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/toolbarResizerVertical.png deleted file mode 100644 index 5da3f6c24..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/toolbarResizerVertical.png and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/top-panel-close.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/top-panel-close.svg deleted file mode 100644 index f05df27a1..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/top-panel-close.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/top-panel-open.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/top-panel-open.svg deleted file mode 100644 index 724e84b40..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/top-panel-open.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/touchCursor.png b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/touchCursor.png deleted file mode 100644 index a6e0e80b9..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/touchCursor.png and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/touchCursor_2x.png b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/touchCursor_2x.png deleted file mode 100644 index b3bbb5a61..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/touchCursor_2x.png and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/triangle-bottom-right.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/triangle-bottom-right.svg deleted file mode 100644 index 9226c680f..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/triangle-bottom-right.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/triangle-down.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/triangle-down.svg deleted file mode 100644 index fe3293458..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/triangle-down.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/triangle-left.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/triangle-left.svg deleted file mode 100644 index b75ee6ddc..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/triangle-left.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/triangle-right.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/triangle-right.svg deleted file mode 100644 index 1799a0b78..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/triangle-right.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/triangle-up.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/triangle-up.svg deleted file mode 100644 index d5db901af..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/triangle-up.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/undo.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/undo.svg deleted file mode 100644 index 901fc49f2..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/undo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/warning-filled.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/warning-filled.svg deleted file mode 100644 index 4243beb46..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/warning-filled.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/warning.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/warning.svg deleted file mode 100644 index 30f90c810..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/warning.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/warning_icon.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/warning_icon.svg deleted file mode 100644 index 6db9f9e62..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/warning_icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/watch.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/watch.svg deleted file mode 100644 index 6f9a8e545..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/watch.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/whatsnew.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/whatsnew.avif deleted file mode 100644 index 865406575..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/whatsnew.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/width.svg b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/width.svg deleted file mode 100644 index 73267cbc9..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Images/width.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Tests.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Tests.js deleted file mode 100644 index 083f87fb6..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/Tests.js +++ /dev/null @@ -1,1662 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -/* eslint-disable indent */ - -/** - * @fileoverview This file contains small testing framework along with the - * test suite for the frontend. These tests are a part of the continues build - * and are executed by the devtools_browsertest.cc as a part of the - * Interactive UI Test suite. - * FIXME: change field naming style to use trailing underscore. - */ - -(function createTestSuite(window) { - - const TestSuite = class { - /** - * Test suite for interactive UI tests. - * @param {Object} domAutomationController DomAutomationController instance. - */ - constructor(domAutomationController) { - this.domAutomationController_ = domAutomationController; - this.controlTaken_ = false; - this.timerId_ = -1; - this._asyncInvocationId = 0; - } - - /** - * Key event with given key identifier. - */ - static createKeyEvent(key) { - return new KeyboardEvent('keydown', {bubbles: true, cancelable: true, key: key}); - } - }; - - /** - * Reports test failure. - * @param {string} message Failure description. - */ - TestSuite.prototype.fail = function(message) { - if (this.controlTaken_) { - this.reportFailure_(message); - } else { - throw message; - } - }; - - /** - * Equals assertion tests that expected === actual. - * @param {!Object|boolean} expected Expected object. - * @param {!Object|boolean} actual Actual object. - * @param {string} opt_message User message to print if the test fails. - */ - TestSuite.prototype.assertEquals = function(expected, actual, opt_message) { - if (expected !== actual) { - let message = 'Expected: \'' + expected + '\', but was \'' + actual + '\''; - if (opt_message) { - message = opt_message + '(' + message + ')'; - } - this.fail(message); - } - }; - - /** - * True assertion tests that value == true. - * @param {!Object} value Actual object. - * @param {string} opt_message User message to print if the test fails. - */ - TestSuite.prototype.assertTrue = function(value, opt_message) { - this.assertEquals(true, Boolean(value), opt_message); - }; - - /** - * Takes control over execution. - * @param {{slownessFactor:number}=} options - */ - TestSuite.prototype.takeControl = function(options) { - const {slownessFactor} = {slownessFactor: 1, ...options}; - this.controlTaken_ = true; - // Set up guard timer. - const self = this; - const timeoutInSec = 20 * slownessFactor; - this.timerId_ = setTimeout(function() { - self.reportFailure_(`Timeout exceeded: ${timeoutInSec} sec`); - }, timeoutInSec * 1000); - }; - - /** - * Releases control over execution. - */ - TestSuite.prototype.releaseControl = function() { - if (this.timerId_ !== -1) { - clearTimeout(this.timerId_); - this.timerId_ = -1; - } - this.controlTaken_ = false; - this.reportOk_(); - }; - - /** - * Async tests use this one to report that they are completed. - */ - TestSuite.prototype.reportOk_ = function() { - this.domAutomationController_.send('[OK]'); - }; - - /** - * Async tests use this one to report failures. - */ - TestSuite.prototype.reportFailure_ = function(error) { - if (this.timerId_ !== -1) { - clearTimeout(this.timerId_); - this.timerId_ = -1; - } - this.domAutomationController_.send('[FAILED] ' + error); - }; - - TestSuite.prototype.setupLegacyFilesForTest = async function() { - try { - await Promise.all([ - self.runtime.loadLegacyModule('core/common/common-legacy.js'), - self.runtime.loadLegacyModule('core/sdk/sdk-legacy.js'), - self.runtime.loadLegacyModule('core/host/host-legacy.js'), - self.runtime.loadLegacyModule('ui/legacy/legacy-legacy.js'), - self.runtime.loadLegacyModule('models/workspace/workspace-legacy.js'), - ]); - this.reportOk_(); - } catch (e) { - this.reportFailure_(e); - } - }; - - /** - * Run specified test on a fresh instance of the test suite. - * @param {Array} args method name followed by its parameters. - */ - TestSuite.prototype.dispatchOnTestSuite = async function(args) { - const methodName = args.shift(); - try { - await this[methodName].apply(this, args); - if (!this.controlTaken_) { - this.reportOk_(); - } - } catch (e) { - this.reportFailure_(e); - } - }; - - /** - * Wrap an async method with TestSuite.{takeControl(), releaseControl()} - * and invoke TestSuite.reportOk_ upon completion. - * @param {Array} args method name followed by its parameters. - */ - TestSuite.prototype.waitForAsync = function(var_args) { - const args = Array.prototype.slice.call(arguments); - this.takeControl(); - args.push(this.releaseControl.bind(this)); - this.dispatchOnTestSuite(args); - }; - - /** - * Overrides the method with specified name until it's called first time. - * @param {!Object} receiver An object whose method to override. - * @param {string} methodName Name of the method to override. - * @param {!Function} override A function that should be called right after the - * overridden method returns. - * @param {?boolean} opt_sticky Whether restore original method after first run - * or not. - */ - TestSuite.prototype.addSniffer = function(receiver, methodName, override, opt_sticky) { - const orig = receiver[methodName]; - if (typeof orig !== 'function') { - this.fail('Cannot find method to override: ' + methodName); - } - const test = this; - receiver[methodName] = function(var_args) { - let result; - try { - result = orig.apply(this, arguments); - } finally { - if (!opt_sticky) { - receiver[methodName] = orig; - } - } - // In case of exception the override won't be called. - try { - override.apply(this, arguments); - } catch (e) { - test.fail('Exception in overriden method \'' + methodName + '\': ' + e); - } - return result; - }; - }; - - /** - * Waits for current throttler invocations, if any. - * @param {!Common.Throttler} throttler - * @param {function()} callback - */ - TestSuite.prototype.waitForThrottler = function(throttler, callback) { - const test = this; - let scheduleShouldFail = true; - test.addSniffer(throttler, 'schedule', onSchedule); - - function hasSomethingScheduled() { - return throttler._isRunningProcess || throttler._process; - } - - function checkState() { - if (!hasSomethingScheduled()) { - scheduleShouldFail = false; - callback(); - return; - } - - test.addSniffer(throttler, 'processCompletedForTests', checkState); - } - - function onSchedule() { - if (scheduleShouldFail) { - test.fail('Unexpected Throttler.schedule'); - } - } - - checkState(); - }; - - /** - * @param {string} panelName Name of the panel to show. - */ - TestSuite.prototype.showPanel = function(panelName) { - return self.UI.inspectorView.showPanel(panelName); - }; - - // UI Tests - - /** - * Tests that scripts tab can be open and populated with inspected scripts. - */ - TestSuite.prototype.testShowScriptsTab = function() { - const test = this; - this.showPanel('sources').then(function() { - // There should be at least main page script. - this._waitUntilScriptsAreParsed(['debugger_test_page.html'], function() { - test.releaseControl(); - }); - }.bind(this)); - // Wait until all scripts are added to the debugger. - this.takeControl(); - }; - - /** - * Tests that scripts list contains content scripts. - */ - TestSuite.prototype.testContentScriptIsPresent = function() { - const test = this; - this.showPanel('sources').then(function() { - test._waitUntilScriptsAreParsed(['page_with_content_script.html', 'simple_content_script.js'], function() { - test.releaseControl(); - }); - }); - - // Wait until all scripts are added to the debugger. - this.takeControl(); - }; - - /** - * Tests that scripts are not duplicaed on Scripts tab switch. - */ - TestSuite.prototype.testNoScriptDuplicatesOnPanelSwitch = function() { - const test = this; - - function switchToElementsTab() { - test.showPanel('elements').then(function() { - setTimeout(switchToScriptsTab, 0); - }); - } - - function switchToScriptsTab() { - test.showPanel('sources').then(function() { - setTimeout(checkScriptsPanel, 0); - }); - } - - function checkScriptsPanel() { - test.assertTrue(test._scriptsAreParsed(['debugger_test_page.html']), 'Some scripts are missing.'); - checkNoDuplicates(); - test.releaseControl(); - } - - function checkNoDuplicates() { - const uiSourceCodes = test.nonAnonymousUISourceCodes_(); - for (let i = 0; i < uiSourceCodes.length; i++) { - for (let j = i + 1; j < uiSourceCodes.length; j++) { - test.assertTrue( - uiSourceCodes[i].url() !== uiSourceCodes[j].url(), - 'Found script duplicates: ' + test.uiSourceCodesToString_(uiSourceCodes)); - } - } - } - - this.showPanel('sources').then(function() { - test._waitUntilScriptsAreParsed(['debugger_test_page.html'], function() { - checkNoDuplicates(); - setTimeout(switchToElementsTab, 0); - }); - }); - - // Wait until all scripts are added to the debugger. - this.takeControl({slownessFactor: 10}); - }; - - // Tests that debugger works correctly if pause event occurs when DevTools - // frontend is being loaded. - TestSuite.prototype.testPauseWhenLoadingDevTools = function() { - const debuggerModel = self.SDK.targetManager.primaryPageTarget().model(SDK.DebuggerModel); - if (debuggerModel.debuggerPausedDetails) { - return; - } - - this.showPanel('sources').then(function() { - // Script execution can already be paused. - - this._waitForScriptPause(this.releaseControl.bind(this)); - }.bind(this)); - - this.takeControl(); - }; - - /** - * Tests network size. - */ - TestSuite.prototype.testNetworkSize = function() { - const test = this; - - function finishRequest(request, finishTime) { - test.assertEquals(25, request.resourceSize, 'Incorrect total data length'); - test.releaseControl(); - } - - this.addSniffer(SDK.NetworkDispatcher.prototype, 'finishNetworkRequest', finishRequest); - - // Reload inspected page to sniff network events - test.evaluateInConsole_('window.location.reload(true);', function(resultText) {}); - - this.takeControl({slownessFactor: 10}); - }; - - /** - * Tests network sync size. - */ - TestSuite.prototype.testNetworkSyncSize = function() { - const test = this; - - function finishRequest(request, finishTime) { - test.assertEquals(25, request.resourceSize, 'Incorrect total data length'); - test.releaseControl(); - } - - this.addSniffer(SDK.NetworkDispatcher.prototype, 'finishNetworkRequest', finishRequest); - - // Send synchronous XHR to sniff network events - test.evaluateInConsole_( - 'let xhr = new XMLHttpRequest(); xhr.open("GET", "chunked", false); xhr.send(null);', function() {}); - - this.takeControl({slownessFactor: 10}); - }; - - /** - * Tests network raw headers text. - */ - TestSuite.prototype.testNetworkRawHeadersText = function() { - const test = this; - - function finishRequest(request, finishTime) { - if (!request.responseHeadersText) { - test.fail('Failure: resource does not have response headers text'); - } - const index = request.responseHeadersText.indexOf('Date:'); - test.assertEquals( - 112, request.responseHeadersText.substring(index).length, 'Incorrect response headers text length'); - test.releaseControl(); - } - - this.addSniffer(SDK.NetworkDispatcher.prototype, 'finishNetworkRequest', finishRequest); - - // Reload inspected page to sniff network events - test.evaluateInConsole_('window.location.reload(true);', function(resultText) {}); - - this.takeControl({slownessFactor: 10}); - }; - - /** - * Tests network timing. - */ - TestSuite.prototype.testNetworkTiming = function() { - const test = this; - - function finishRequest(request, finishTime) { - // Setting relaxed expectations to reduce flakiness. - // Server sends headers after 100ms, then sends data during another 100ms. - // We expect these times to be measured at least as 70ms. - test.assertTrue( - request.timing.receiveHeadersEnd - request.timing.connectStart >= 70, - 'Time between receiveHeadersEnd and connectStart should be >=70ms, but was ' + - 'receiveHeadersEnd=' + request.timing.receiveHeadersEnd + ', connectStart=' + - request.timing.connectStart + '.'); - test.assertTrue( - request.responseReceivedTime - request.startTime >= 0.07, - 'Time between responseReceivedTime and startTime should be >=0.07s, but was ' + - 'responseReceivedTime=' + request.responseReceivedTime + ', startTime=' + request.startTime + '.'); - test.assertTrue( - request.endTime - request.startTime >= 0.14, - 'Time between endTime and startTime should be >=0.14s, but was ' + - 'endtime=' + request.endTime + ', startTime=' + request.startTime + '.'); - - test.releaseControl(); - } - - this.addSniffer(SDK.NetworkDispatcher.prototype, 'finishNetworkRequest', finishRequest); - - // Reload inspected page to sniff network events - test.evaluateInConsole_('window.location.reload(true);', function(resultText) {}); - - this.takeControl({slownessFactor: 10}); - }; - - TestSuite.prototype.testPushTimes = function(url) { - const test = this; - let pendingRequestCount = 2; - - function finishRequest(request, finishTime) { - test.assertTrue( - typeof request.timing.pushStart === 'number' && request.timing.pushStart > 0, - `pushStart is invalid: ${request.timing.pushStart}`); - test.assertTrue(typeof request.timing.pushEnd === 'number', `pushEnd is invalid: ${request.timing.pushEnd}`); - test.assertTrue(request.timing.pushStart < request.startTime, 'pushStart should be before startTime'); - if (request.url().endsWith('?pushUseNullEndTime')) { - test.assertTrue(request.timing.pushEnd === 0, `pushEnd should be 0 but is ${request.timing.pushEnd}`); - } else { - test.assertTrue( - request.timing.pushStart < request.timing.pushEnd, - `pushStart should be before pushEnd (${request.timing.pushStart} >= ${request.timing.pushEnd})`); - // The below assertion is just due to the way we generate times in the moch URLRequestJob and is not generally an invariant. - test.assertTrue(request.timing.pushEnd < request.endTime, 'pushEnd should be before endTime'); - test.assertTrue(request.startTime < request.timing.pushEnd, 'pushEnd should be after startTime'); - } - if (!--pendingRequestCount) { - test.releaseControl(); - } - } - - this.addSniffer(SDK.NetworkDispatcher.prototype, 'finishNetworkRequest', finishRequest, true); - - test.evaluateInConsole_('addImage(\'' + url + '\')', function(resultText) {}); - test.evaluateInConsole_('addImage(\'' + url + '?pushUseNullEndTime\')', function(resultText) {}); - this.takeControl(); - }; - - TestSuite.prototype.testConsoleOnNavigateBack = function() { - - function filteredMessages() { - return SDK.ConsoleModel.allMessagesUnordered().filter(a => a.source !== Protocol.Log.LogEntrySource.Violation); - } - - if (filteredMessages().length === 1) { - firstConsoleMessageReceived.call(this, null); - } else { - self.SDK.targetManager.addModelListener( - SDK.ConsoleModel, SDK.ConsoleModel.Events.MessageAdded, firstConsoleMessageReceived, this); - } - - function firstConsoleMessageReceived(event) { - if (event && event.data.source === Protocol.Log.LogEntrySource.Violation) { - return; - } - self.SDK.targetManager.removeModelListener( - SDK.ConsoleModel, SDK.ConsoleModel.Events.MessageAdded, firstConsoleMessageReceived, this); - this.evaluateInConsole_('clickLink();', didClickLink.bind(this)); - } - - function didClickLink() { - // Check that there are no new messages(command is not a message). - this.assertEquals(3, filteredMessages().length); - this.evaluateInConsole_('history.back();', didNavigateBack.bind(this)); - } - - function didNavigateBack() { - // Make sure navigation completed and possible console messages were pushed. - this.evaluateInConsole_('void 0;', didCompleteNavigation.bind(this)); - } - - function didCompleteNavigation() { - this.assertEquals(7, filteredMessages().length); - this.releaseControl(); - } - - this.takeControl(); - }; - - TestSuite.prototype.testSharedWorker = function() { - function didEvaluateInConsole(resultText) { - this.assertEquals('2011', resultText); - this.releaseControl(); - } - this.evaluateInConsole_('globalVar', didEvaluateInConsole.bind(this)); - this.takeControl(); - }; - - TestSuite.prototype.testPauseInSharedWorkerInitialization1 = function() { - // Make sure the worker is loaded. - this.takeControl(); - this._waitForTargets(1, callback.bind(this)); - - function callback() { - ProtocolClient.test.deprecatedRunAfterPendingDispatches(this.releaseControl.bind(this)); - } - }; - - TestSuite.prototype.testPauseInSharedWorkerInitialization2 = function() { - this.takeControl(); - this._waitForTargets(1, callback.bind(this)); - - function callback() { - const debuggerModel = self.SDK.targetManager.models(SDK.DebuggerModel)[0]; - if (debuggerModel.isPaused()) { - self.SDK.targetManager.addModelListener( - SDK.ConsoleModel, SDK.ConsoleModel.Events.MessageAdded, onConsoleMessage, this); - debuggerModel.resume(); - return; - } - this._waitForScriptPause(callback.bind(this)); - } - - function onConsoleMessage(event) { - const message = event.data.messageText; - if (message !== 'connected') { - this.fail('Unexpected message: ' + message); - } - this.releaseControl(); - } - }; - - TestSuite.prototype.testSharedWorkerNetworkPanel = function() { - this.takeControl(); - this.showPanel('network').then(() => { - if (!document.querySelector('#network-container')) { - this.fail('unable to find #network-container'); - } - this.releaseControl(); - }); - }; - - TestSuite.prototype.enableTouchEmulation = function() { - const deviceModeModel = new Emulation.DeviceModeModel(function() {}); - deviceModeModel._target = self.SDK.targetManager.primaryPageTarget(); - deviceModeModel._applyTouch(true, true); - }; - - TestSuite.prototype.waitForDebuggerPaused = function() { - const debuggerModel = self.SDK.targetManager.primaryPageTarget().model(SDK.DebuggerModel); - if (debuggerModel.debuggerPausedDetails) { - return; - } - - this.takeControl(); - this._waitForScriptPause(this.releaseControl.bind(this)); - }; - - TestSuite.prototype.switchToPanel = function(panelName) { - this.showPanel(panelName).then(this.releaseControl.bind(this)); - this.takeControl(); - }; - - // Regression test for crbug.com/370035. - TestSuite.prototype.testDeviceMetricsOverrides = function() { - function dumpPageMetrics() { - return JSON.stringify( - {width: window.innerWidth, height: window.innerHeight, deviceScaleFactor: window.devicePixelRatio}); - } - - const test = this; - - async function testOverrides(params, metrics, callback) { - await self.SDK.targetManager.primaryPageTarget().emulationAgent().invoke_setDeviceMetricsOverride(params); - test.evaluateInConsole_('(' + dumpPageMetrics.toString() + ')()', checkMetrics); - - function checkMetrics(consoleResult) { - test.assertEquals( - `'${JSON.stringify(metrics)}'`, consoleResult, 'Wrong metrics for params: ' + JSON.stringify(params)); - callback(); - } - } - - function step1() { - testOverrides( - {width: 1200, height: 1000, deviceScaleFactor: 1, mobile: false, fitWindow: true}, - {width: 1200, height: 1000, deviceScaleFactor: 1}, step2); - } - - function step2() { - testOverrides( - {width: 1200, height: 1000, deviceScaleFactor: 1, mobile: false, fitWindow: false}, - {width: 1200, height: 1000, deviceScaleFactor: 1}, step3); - } - - function step3() { - testOverrides( - {width: 1200, height: 1000, deviceScaleFactor: 3, mobile: false, fitWindow: true}, - {width: 1200, height: 1000, deviceScaleFactor: 3}, step4); - } - - function step4() { - testOverrides( - {width: 1200, height: 1000, deviceScaleFactor: 3, mobile: false, fitWindow: false}, - {width: 1200, height: 1000, deviceScaleFactor: 3}, finish); - } - - function finish() { - test.releaseControl(); - } - - test.takeControl(); - step1(); - }; - - TestSuite.prototype.testDispatchKeyEventShowsAutoFill = function() { - const test = this; - let receivedReady = false; - - function signalToShowAutofill() { - self.SDK.targetManager.primaryPageTarget().inputAgent().invoke_dispatchKeyEvent( - {type: 'rawKeyDown', key: 'Down', windowsVirtualKeyCode: 40, nativeVirtualKeyCode: 40}); - self.SDK.targetManager.primaryPageTarget().inputAgent().invoke_dispatchKeyEvent( - {type: 'keyUp', key: 'Down', windowsVirtualKeyCode: 40, nativeVirtualKeyCode: 40}); - } - - function selectTopAutoFill() { - self.SDK.targetManager.primaryPageTarget().inputAgent().invoke_dispatchKeyEvent( - {type: 'rawKeyDown', key: 'Enter', windowsVirtualKeyCode: 13, nativeVirtualKeyCode: 13}); - self.SDK.targetManager.primaryPageTarget().inputAgent().invoke_dispatchKeyEvent( - {type: 'keyUp', key: 'Enter', windowsVirtualKeyCode: 13, nativeVirtualKeyCode: 13}); - - test.evaluateInConsole_('document.getElementById("name").value', onResultOfInput); - } - - function onResultOfInput(value) { - // Console adds '' around the response. - test.assertEquals('\'Abbf\'', value); - test.releaseControl(); - } - - function onConsoleMessage(event) { - const message = event.data.messageText; - if (message === 'ready' && !receivedReady) { - receivedReady = true; - signalToShowAutofill(); - } - // This log comes from the browser unittest code. - if (message === 'didShowSuggestions') { - selectTopAutoFill(); - } - } - - this.takeControl({slownessFactor: 10}); - - // It is possible for the ready console messagage to be already received but not handled - // or received later. This ensures we can catch both cases. - self.SDK.targetManager.addModelListener( - SDK.ConsoleModel, SDK.ConsoleModel.Events.MessageAdded, onConsoleMessage, this); - - const messages = SDK.ConsoleModel.allMessagesUnordered(); - if (messages.length) { - const text = messages[0].messageText; - this.assertEquals('ready', text); - signalToShowAutofill(); - } - }; - - TestSuite.prototype.testKeyEventUnhandled = function() { - function onKeyEventUnhandledKeyDown(event) { - this.assertEquals('keydown', event.data.type); - this.assertEquals('F8', event.data.key); - this.assertEquals(119, event.data.keyCode); - this.assertEquals(0, event.data.modifiers); - this.assertEquals('', event.data.code); - Host.InspectorFrontendHost.events.removeEventListener( - Host.InspectorFrontendHostAPI.Events.KeyEventUnhandled, onKeyEventUnhandledKeyDown, this); - Host.InspectorFrontendHost.events.addEventListener( - Host.InspectorFrontendHostAPI.Events.KeyEventUnhandled, onKeyEventUnhandledKeyUp, this); - self.SDK.targetManager.primaryPageTarget().inputAgent().invoke_dispatchKeyEvent( - {type: 'keyUp', key: 'F8', code: 'F8', windowsVirtualKeyCode: 119, nativeVirtualKeyCode: 119}); - } - function onKeyEventUnhandledKeyUp(event) { - this.assertEquals('keyup', event.data.type); - this.assertEquals('F8', event.data.key); - this.assertEquals(119, event.data.keyCode); - this.assertEquals(0, event.data.modifiers); - this.assertEquals('F8', event.data.code); - this.releaseControl(); - } - this.takeControl(); - Host.InspectorFrontendHost.events.addEventListener( - Host.InspectorFrontendHostAPI.Events.KeyEventUnhandled, onKeyEventUnhandledKeyDown, this); - self.SDK.targetManager.primaryPageTarget().inputAgent().invoke_dispatchKeyEvent( - {type: 'rawKeyDown', key: 'F8', windowsVirtualKeyCode: 119, nativeVirtualKeyCode: 119}); - }; - - // Tests that the keys that are forwarded from the browser update - // when their shortcuts change - TestSuite.prototype.testForwardedKeysChanged = function() { - this.takeControl(); - - this.addSniffer(self.UI.shortcutRegistry, 'registerBindings', () => { - self.SDK.targetManager.primaryPageTarget().inputAgent().invoke_dispatchKeyEvent( - {type: 'rawKeyDown', key: 'F1', windowsVirtualKeyCode: 112, nativeVirtualKeyCode: 112}); - }); - this.addSniffer(self.UI.shortcutRegistry, 'handleKey', key => { - this.assertEquals(112, key); - this.releaseControl(); - }); - - self.Common.settings.moduleSetting('activeKeybindSet').set('vsCode'); - }; - - TestSuite.prototype.testDispatchKeyEventDoesNotCrash = function() { - self.SDK.targetManager.primaryPageTarget().inputAgent().invoke_dispatchKeyEvent( - {type: 'rawKeyDown', windowsVirtualKeyCode: 0x23, key: 'End'}); - self.SDK.targetManager.primaryPageTarget().inputAgent().invoke_dispatchKeyEvent( - {type: 'keyUp', windowsVirtualKeyCode: 0x23, key: 'End'}); - }; - - // Check that showing the certificate viewer does not crash, crbug.com/954874 - TestSuite.prototype.testShowCertificate = function() { - Host.InspectorFrontendHost.showCertificateViewer([ - 'MIIFIDCCBAigAwIBAgIQE0TsEu6R8FUHQv+9fE7j8TANBgkqhkiG9w0BAQsF' + - 'ADBUMQswCQYDVQQGEwJVUzEeMBwGA1UEChMVR29vZ2xlIFRydXN0IFNlcnZp' + - 'Y2VzMSUwIwYDVQQDExxHb29nbGUgSW50ZXJuZXQgQXV0aG9yaXR5IEczMB4X' + - 'DTE5MDMyNjEzNDEwMVoXDTE5MDYxODEzMjQwMFowZzELMAkGA1UEBhMCVVMx' + - 'EzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDU1vdW50YWluIFZpZXcx' + - 'EzARBgNVBAoMCkdvb2dsZSBMTEMxFjAUBgNVBAMMDSouYXBwc3BvdC5jb20w' + - 'ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCwca7hj0kyoJVxcvyA' + - 'a8zNKMIXcoPM3aU1KVe7mxZITtwC6/D/D/q4Oe8fBQLeZ3c6qR5Sr3M+611k' + - 'Ab15AcGUgh1Xi0jZqERvd/5+P0aVCFJYeoLrPBzwSMZBStkoiO2CwtV8x06e' + - 'X7qUz7Hvr3oeG+Ma9OUMmIebl//zHtC82mE0mCRBQAW0MWEgT5nOWey74tJR' + - 'GRqUEI8ftV9grAshD5gY8kxxUoMfqrreaXVqcRF58ZPiwUJ0+SbtC5q9cJ+K' + - 'MuYM4TCetEuk/WQsa+1EnSa40dhGRtZjxbwEwQAJ1vLOcIA7AVR/Ck22Uj8X' + - 'UOECercjUrKdDyaAPcLp2TThAgMBAAGjggHZMIIB1TATBgNVHSUEDDAKBggr' + - 'BgEFBQcDATCBrwYDVR0RBIGnMIGkgg0qLmFwcHNwb3QuY29tggsqLmEucnVu' + - 'LmFwcIIVKi50aGlua3dpdGhnb29nbGUuY29tghAqLndpdGhnb29nbGUuY29t' + - 'ghEqLndpdGh5b3V0dWJlLmNvbYILYXBwc3BvdC5jb22CB3J1bi5hcHCCE3Ro' + - 'aW5rd2l0aGdvb2dsZS5jb22CDndpdGhnb29nbGUuY29tgg93aXRoeW91dHVi' + - 'ZS5jb20waAYIKwYBBQUHAQEEXDBaMC0GCCsGAQUFBzAChiFodHRwOi8vcGtp' + - 'Lmdvb2cvZ3NyMi9HVFNHSUFHMy5jcnQwKQYIKwYBBQUHMAGGHWh0dHA6Ly9v' + - 'Y3NwLnBraS5nb29nL0dUU0dJQUczMB0GA1UdDgQWBBTGkpE5o0H9+Wjc05rF' + - 'hNQiYDjBFjAMBgNVHRMBAf8EAjAAMB8GA1UdIwQYMBaAFHfCuFCaZ3Z2sS3C' + - 'htCDoH6mfrpLMCEGA1UdIAQaMBgwDAYKKwYBBAHWeQIFAzAIBgZngQwBAgIw' + - 'MQYDVR0fBCowKDAmoCSgIoYgaHR0cDovL2NybC5wa2kuZ29vZy9HVFNHSUFH' + - 'My5jcmwwDQYJKoZIhvcNAQELBQADggEBALqoYGqWtJW/6obEzY+ehsgfyXb+' + - 'qNIuV09wt95cRF93HlLbBlSZ/Iz8HXX44ZT1/tGAkwKnW0gDKSSab3I8U+e9' + - 'LHbC9VXrgAFENzu89MNKNmK5prwv+MPA2HUQPu4Pad3qXmd4+nKc/EUjtg1d' + - '/xKGK1Vn6JX3i5ly/rduowez3LxpSAJuIwseum331aQaKC2z2ri++96B8MPU' + - 'KFXzvV2gVGOe3ZYqmwPaG8y38Tba+OzEh59ygl8ydJJhoI6+R3itPSy0aXUU' + - 'lMvvAbfCobXD5kBRQ28ysgbDSDOPs3fraXpAKL92QUjsABs58XBz5vka4swu' + - 'gg/u+ZxaKOqfIm8=', - 'MIIEXDCCA0SgAwIBAgINAeOpMBz8cgY4P5pTHTANBgkqhkiG9w0BAQsFADBM' + - 'MSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMjETMBEGA1UEChMK' + - 'R2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjAeFw0xNzA2MTUwMDAw' + - 'NDJaFw0yMTEyMTUwMDAwNDJaMFQxCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVH' + - 'b29nbGUgVHJ1c3QgU2VydmljZXMxJTAjBgNVBAMTHEdvb2dsZSBJbnRlcm5l' + - 'dCBBdXRob3JpdHkgRzMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB' + - 'AQDKUkvqHv/OJGuo2nIYaNVWXQ5IWi01CXZaz6TIHLGp/lOJ+600/4hbn7vn' + - '6AAB3DVzdQOts7G5pH0rJnnOFUAK71G4nzKMfHCGUksW/mona+Y2emJQ2N+a' + - 'icwJKetPKRSIgAuPOB6Aahh8Hb2XO3h9RUk2T0HNouB2VzxoMXlkyW7XUR5m' + - 'w6JkLHnA52XDVoRTWkNty5oCINLvGmnRsJ1zouAqYGVQMc/7sy+/EYhALrVJ' + - 'EA8KbtyX+r8snwU5C1hUrwaW6MWOARa8qBpNQcWTkaIeoYvy/sGIJEmjR0vF' + - 'EwHdp1cSaWIr6/4g72n7OqXwfinu7ZYW97EfoOSQJeAzAgMBAAGjggEzMIIB' + - 'LzAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUF' + - 'BwMCMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFHfCuFCaZ3Z2sS3C' + - 'htCDoH6mfrpLMB8GA1UdIwQYMBaAFJviB1dnHB7AagbeWbSaLd/cGYYuMDUG' + - 'CCsGAQUFBwEBBCkwJzAlBggrBgEFBQcwAYYZaHR0cDovL29jc3AucGtpLmdv' + - 'b2cvZ3NyMjAyBgNVHR8EKzApMCegJaAjhiFodHRwOi8vY3JsLnBraS5nb29n' + - 'L2dzcjIvZ3NyMi5jcmwwPwYDVR0gBDgwNjA0BgZngQwBAgIwKjAoBggrBgEF' + - 'BQcCARYcaHR0cHM6Ly9wa2kuZ29vZy9yZXBvc2l0b3J5LzANBgkqhkiG9w0B' + - 'AQsFAAOCAQEAHLeJluRT7bvs26gyAZ8so81trUISd7O45skDUmAge1cnxhG1' + - 'P2cNmSxbWsoiCt2eux9LSD+PAj2LIYRFHW31/6xoic1k4tbWXkDCjir37xTT' + - 'NqRAMPUyFRWSdvt+nlPqwnb8Oa2I/maSJukcxDjNSfpDh/Bd1lZNgdd/8cLd' + - 'sE3+wypufJ9uXO1iQpnh9zbuFIwsIONGl1p3A8CgxkqI/UAih3JaGOqcpcda' + - 'CIzkBaR9uYQ1X4k2Vg5APRLouzVy7a8IVk6wuy6pm+T7HT4LY8ibS5FEZlfA' + - 'FLSW8NwsVz9SBK2Vqn1N0PIMn5xA6NZVc7o835DLAFshEWfC7TIe3g==', - 'MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEg' + - 'MB4GA1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkds' + - 'b2JhbFNpZ24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDYxMjE1MDgwMDAw' + - 'WhcNMjExMjE1MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3Qg' + - 'Q0EgLSBSMjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFs' + - 'U2lnbjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8o' + - 'mUVCxKs+IVSbC9N/hHD6ErPLv4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe' + - '+3t+c4isUoh7SqbKSaZeqKeMWhG8eoLrvozps6yWJQeXSpkqBy+0Hne/ig+1' + - 'AnwblrjFuTosvNYSuetZfeLQBoZfXklqtTleiDTsvHgMCJiEbKjNS7SgfQx5' + - 'TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzdC9XZzPnqJworc5HGnRusyMvo' + - '4KD0L5CLTfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pazq+r1feqCapgvdzZX99y' + - 'qWATXgAByUr6P6TqBwMhAo6CygPCm48CAwEAAaOBnDCBmTAOBgNVHQ8BAf8E' + - 'BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUm+IHV2ccHsBqBt5Z' + - 'tJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5nbG9iYWxz' + - 'aWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG3lm0' + - 'mi3f3BmGLjANBgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4Gs' + - 'J0/WwbgcQ3izDJr86iw8bmEbTUsp9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4' + - 'h4hO291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu01yiPqFbQfXf5WRD' + - 'LenVOavSot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG7' + - '9G+dwfCMNYxdAfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmg' + - 'QWpzU/qlULRuJQ/7TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq' + - '/H5COEBkEveegeGTLg==' - ]); - }; - - // Simple check to make sure network throttling is wired up - // See crbug.com/747724 - TestSuite.prototype.testOfflineNetworkConditions = async function() { - const test = this; - self.SDK.multitargetNetworkManager.setNetworkConditions(SDK.NetworkManager.OfflineConditions); - - function finishRequest(request) { - test.assertEquals( - 'net::ERR_INTERNET_DISCONNECTED', request.localizedFailDescription, 'Request should have failed'); - test.releaseControl(); - } - - this.addSniffer(SDK.NetworkDispatcher.prototype, 'finishNetworkRequest', finishRequest); - - test.takeControl(); - test.evaluateInConsole_('await fetch("/");', function(resultText) {}); - }; - - TestSuite.prototype.testEmulateNetworkConditions = function() { - const test = this; - - function testPreset(preset, messages, next) { - function onConsoleMessage(event) { - const index = messages.indexOf(event.data.messageText); - if (index === -1) { - test.fail('Unexpected message: ' + event.data.messageText); - return; - } - - messages.splice(index, 1); - if (!messages.length) { - self.SDK.targetManager.removeModelListener( - SDK.ConsoleModel, SDK.ConsoleModel.Events.MessageAdded, onConsoleMessage, this); - next(); - } - } - - self.SDK.targetManager.addModelListener( - SDK.ConsoleModel, SDK.ConsoleModel.Events.MessageAdded, onConsoleMessage, this); - self.SDK.multitargetNetworkManager.setNetworkConditions(preset); - } - - test.takeControl(); - step1(); - - function step1() { - testPreset( - MobileThrottling.networkPresets[2], - [ - 'offline event: online = false', 'connection change event: type = none; downlinkMax = 0; effectiveType = 4g' - ], - step2); - } - - function step2() { - testPreset( - MobileThrottling.networkPresets[1], - [ - 'online event: online = true', - 'connection change event: type = cellular; downlinkMax = 0.3814697265625; effectiveType = 2g' - ], - step3); - } - - function step3() { - testPreset( - MobileThrottling.networkPresets[0], - ['connection change event: type = cellular; downlinkMax = 1.373291015625; effectiveType = 3g'], - test.releaseControl.bind(test)); - } - }; - - TestSuite.prototype.testScreenshotRecording = function() { - const test = this; - - function performActionsInPage(callback) { - let count = 0; - const div = document.createElement('div'); - div.setAttribute('style', 'left: 0px; top: 0px; width: 100px; height: 100px; position: absolute;'); - document.body.appendChild(div); - requestAnimationFrame(frame); - function frame() { - const color = [0, 0, 0]; - color[count % 3] = 255; - div.style.backgroundColor = 'rgb(' + color.join(',') + ')'; - if (++count > 10) { - requestAnimationFrame(callback); - } else { - requestAnimationFrame(frame); - } - } - } - - const captureFilmStripSetting = self.Common.settings.createSetting('timelineCaptureFilmStrip', false); - captureFilmStripSetting.set(true); - test.evaluateInConsole_(performActionsInPage.toString(), function() {}); - test.invokeAsyncWithTimeline_('performActionsInPage', onTimelineDone); - - function onTimelineDone() { - captureFilmStripSetting.set(false); - const filmStripModel = UI.panels.timeline._performanceModel.filmStripModel(); - const frames = filmStripModel.frames(); - test.assertTrue(frames.length > 4 && typeof frames.length === 'number'); - loadFrameImages(frames); - } - - function loadFrameImages(frames) { - const readyImages = []; - for (const frame of frames) { - frame.imageDataPromise().then(onGotImageData); - } - - function onGotImageData(data) { - const image = new Image(); - test.assertTrue(Boolean(data), 'No image data for frame'); - image.addEventListener('load', onLoad); - image.src = 'data:image/jpg;base64,' + data; - } - - function onLoad(event) { - readyImages.push(event.target); - if (readyImages.length === frames.length) { - validateImagesAndCompleteTest(readyImages); - } - } - } - - function validateImagesAndCompleteTest(images) { - let redCount = 0; - let greenCount = 0; - let blueCount = 0; - - const canvas = document.createElement('canvas'); - const ctx = canvas.getContext('2d'); - for (const image of images) { - test.assertTrue(image.naturalWidth > 10); - test.assertTrue(image.naturalHeight > 10); - canvas.width = image.naturalWidth; - canvas.height = image.naturalHeight; - ctx.drawImage(image, 0, 0); - const data = ctx.getImageData(0, 0, 1, 1); - const color = Array.prototype.join.call(data.data, ','); - if (data.data[0] > 200) { - redCount++; - } else if (data.data[1] > 200) { - greenCount++; - } else if (data.data[2] > 200) { - blueCount++; - } else { - test.fail('Unexpected color: ' + color); - } - } - test.assertTrue(redCount && greenCount && blueCount, 'Color check failed'); - test.releaseControl(); - } - - test.takeControl(); - }; - - TestSuite.prototype.testSettings = function() { - const test = this; - - createSettings(); - test.takeControl(); - setTimeout(reset, 0); - - function createSettings() { - const localSetting = self.Common.settings.createLocalSetting('local', undefined); - localSetting.set({s: 'local', n: 1}); - const globalSetting = self.Common.settings.createSetting('global', undefined); - globalSetting.set({s: 'global', n: 2}); - } - - function reset() { - Root.Runtime.experiments.clearForTest(); - Host.InspectorFrontendHost.getPreferences(gotPreferences); - } - - function gotPreferences(prefs) { - Main.Main.instanceForTest.createSettings(prefs); - - const localSetting = self.Common.settings.createLocalSetting('local', undefined); - test.assertEquals('object', typeof localSetting.get()); - test.assertEquals('local', localSetting.get().s); - test.assertEquals(1, localSetting.get().n); - const globalSetting = self.Common.settings.createSetting('global', undefined); - test.assertEquals('object', typeof globalSetting.get()); - test.assertEquals('global', globalSetting.get().s); - test.assertEquals(2, globalSetting.get().n); - test.releaseControl(); - } - }; - - TestSuite.prototype.testWindowInitializedOnNavigateBack = function() { - const test = this; - test.takeControl(); - const messages = SDK.ConsoleModel.allMessagesUnordered(); - if (messages.length === 1) { - checkMessages(); - } else { - self.SDK.targetManager.addModelListener( - SDK.ConsoleModel, SDK.ConsoleModel.Events.MessageAdded, checkMessages.bind(this), this); - } - - function checkMessages() { - const messages = SDK.ConsoleModel.allMessagesUnordered(); - test.assertEquals(1, messages.length); - test.assertTrue(messages[0].messageText.indexOf('Uncaught') === -1); - test.releaseControl(); - } - }; - - TestSuite.prototype.testConsoleContextNames = function() { - const test = this; - test.takeControl(); - this.showPanel('console').then(() => this._waitForExecutionContexts(2, onExecutionContexts.bind(this))); - - function onExecutionContexts() { - const consoleView = Console.ConsoleView.instance(); - const selector = consoleView.consoleContextSelector; - const values = []; - for (const item of selector.items) { - values.push(selector.titleFor(item)); - } - test.assertEquals('top', values[0]); - test.assertEquals('Simple content script', values[1]); - test.releaseControl(); - } - }; - - TestSuite.prototype.testRawHeadersWithHSTS = function(url) { - const test = this; - test.takeControl({slownessFactor: 10}); - self.SDK.targetManager.addModelListener( - SDK.NetworkManager, SDK.NetworkManager.Events.ResponseReceived, onResponseReceived); - - this.evaluateInConsole_(` - let img = document.createElement('img'); - img.src = "${url}"; - document.body.appendChild(img); - `, () => {}); - - let count = 0; - function onResponseReceived(event) { - const networkRequest = event.data.request; - if (!networkRequest.url().startsWith('http')) { - return; - } - switch (++count) { - case 1: // Original redirect - test.assertEquals(301, networkRequest.statusCode); - test.assertEquals('Moved Permanently', networkRequest.statusText); - test.assertTrue(url.endsWith(networkRequest.responseHeaderValue('Location'))); - break; - - case 2: // HSTS internal redirect - test.assertTrue(networkRequest.url().startsWith('http://')); - test.assertEquals(307, networkRequest.statusCode); - test.assertEquals('Internal Redirect', networkRequest.statusText); - test.assertEquals('HSTS', networkRequest.responseHeaderValue('Non-Authoritative-Reason')); - test.assertTrue(networkRequest.responseHeaderValue('Location').startsWith('https://')); - break; - - case 3: // Final response - test.assertTrue(networkRequest.url().startsWith('https://')); - test.assertTrue(networkRequest.requestHeaderValue('Referer').startsWith('http://127.0.0.1')); - test.assertEquals(200, networkRequest.statusCode); - test.assertEquals('OK', networkRequest.statusText); - test.assertEquals('132', networkRequest.responseHeaderValue('Content-Length')); - test.releaseControl(); - } - } - }; - - TestSuite.prototype.testDOMWarnings = function() { - const messages = SDK.ConsoleModel.allMessagesUnordered(); - this.assertEquals(1, messages.length); - const expectedPrefix = '[DOM] Found 2 elements with non-unique id #dup:'; - this.assertTrue(messages[0].messageText.startsWith(expectedPrefix)); - }; - - TestSuite.prototype.waitForTestResultsInConsole = function() { - const messages = SDK.ConsoleModel.allMessagesUnordered(); - for (let i = 0; i < messages.length; ++i) { - const text = messages[i].messageText; - if (text === 'PASS') { - return; - } - if (/^FAIL/.test(text)) { - this.fail(text); - } // This will throw. - } - // Neither PASS nor FAIL, so wait for more messages. - function onConsoleMessage(event) { - const text = event.data.messageText; - if (text === 'PASS') { - this.releaseControl(); - } else if (/^FAIL/.test(text)) { - this.fail(text); - } - } - - self.SDK.targetManager.addModelListener( - SDK.ConsoleModel, SDK.ConsoleModel.Events.MessageAdded, onConsoleMessage, this); - this.takeControl({slownessFactor: 10}); - }; - - TestSuite.prototype.waitForTestResultsAsMessage = function() { - const onMessage = event => { - if (!event.data.testOutput) { - return; - } - top.removeEventListener('message', onMessage); - const text = event.data.testOutput; - if (text === 'PASS') { - this.releaseControl(); - } else { - this.fail(text); - } - }; - top.addEventListener('message', onMessage); - this.takeControl(); - }; - - TestSuite.prototype._overrideMethod = function(receiver, methodName, override) { - const original = receiver[methodName]; - if (typeof original !== 'function') { - this.fail(`TestSuite._overrideMethod: ${methodName} is not a function`); - return; - } - receiver[methodName] = function() { - let value; - try { - value = original.apply(receiver, arguments); - } finally { - receiver[methodName] = original; - } - override.apply(original, arguments); - return value; - }; - }; - - TestSuite.prototype.startTimeline = function(callback) { - const test = this; - this.showPanel('timeline').then(function() { - const timeline = UI.panels.timeline; - test._overrideMethod(timeline, 'recordingStarted', callback); - timeline._toggleRecording(); - }); - }; - - TestSuite.prototype.stopTimeline = function(callback) { - const timeline = UI.panels.timeline; - this._overrideMethod(timeline, 'loadingComplete', callback); - timeline._toggleRecording(); - }; - - TestSuite.prototype.invokePageFunctionAsync = function(functionName, opt_args, callback_is_always_last) { - const callback = arguments[arguments.length - 1]; - const doneMessage = `DONE: ${functionName}.${++this._asyncInvocationId}`; - const argsString = arguments.length < 3 ? - '' : - Array.prototype.slice.call(arguments, 1, -1).map(arg => JSON.stringify(arg)).join(',') + ','; - this.evaluateInConsole_( - `${functionName}(${argsString} function() { console.log('${doneMessage}'); });`, function() {}); - self.SDK.targetManager.addModelListener(SDK.ConsoleModel, SDK.ConsoleModel.Events.MessageAdded, onConsoleMessage); - - function onConsoleMessage(event) { - const text = event.data.messageText; - if (text === doneMessage) { - self.SDK.targetManager.removeModelListener( - SDK.ConsoleModel, SDK.ConsoleModel.Events.MessageAdded, onConsoleMessage); - callback(); - } - } - }; - - TestSuite.prototype.invokeAsyncWithTimeline_ = function(functionName, callback) { - const test = this; - - this.startTimeline(onRecordingStarted); - - function onRecordingStarted() { - test.invokePageFunctionAsync(functionName, pageActionsDone); - } - - function pageActionsDone() { - test.stopTimeline(callback); - } - }; - - TestSuite.prototype.enableExperiment = function(name) { - Root.Runtime.experiments.enableForTest(name); - }; - - TestSuite.prototype.checkInputEventsPresent = function() { - const expectedEvents = new Set(arguments); - const model = UI.panels.timeline._performanceModel.timelineModel(); - const asyncEvents = model.virtualThreads().find(thread => thread.isMainFrame).asyncEventsByGroup; - const input = asyncEvents.get(TimelineModel.TimelineModel.AsyncEventGroup.input) || []; - const prefix = 'InputLatency::'; - for (const e of input) { - if (!e.name.startsWith(prefix)) { - continue; - } - if (e.steps.length < 2) { - continue; - } - if (e.name.startsWith(prefix + 'Mouse') && - typeof TimelineModel.TimelineData.forEvent(e.steps[0]).timeWaitingForMainThread !== 'number') { - throw `Missing timeWaitingForMainThread on ${e.name}`; - } - expectedEvents.delete(e.name.substr(prefix.length)); - } - if (expectedEvents.size) { - throw 'Some expected events are not found: ' + Array.from(expectedEvents.keys()).join(','); - } - }; - - TestSuite.prototype.testInspectedElementIs = async function(nodeName) { - this.takeControl(); - await self.runtime.loadLegacyModule('panels/elements/elements-legacy.js'); - if (!Elements.ElementsPanel.firstInspectElementNodeNameForTest) { - await new Promise(f => this.addSniffer(Elements.ElementsPanel, 'firstInspectElementCompletedForTest', f)); - } - this.assertEquals(nodeName, Elements.ElementsPanel.firstInspectElementNodeNameForTest); - this.releaseControl(); - }; - - TestSuite.prototype.testDisposeEmptyBrowserContext = async function(url) { - this.takeControl(); - const targetAgent = self.SDK.targetManager.rootTarget().targetAgent(); - const {browserContextId} = await targetAgent.invoke_createBrowserContext(); - const response1 = await targetAgent.invoke_getBrowserContexts(); - this.assertEquals(response1.browserContextIds.length, 1); - await targetAgent.invoke_disposeBrowserContext({browserContextId}); - const response2 = await targetAgent.invoke_getBrowserContexts(); - this.assertEquals(response2.browserContextIds.length, 0); - this.releaseControl(); - }; - - TestSuite.prototype.testNewWindowFromBrowserContext = async function(url) { - this.takeControl(); - // Create a BrowserContext. - const targetAgent = self.SDK.targetManager.rootTarget().targetAgent(); - const {browserContextId} = await targetAgent.invoke_createBrowserContext(); - - // Cause a Browser to be created with the temp profile. - const {targetId} = await targetAgent.invoke_createTarget( - {url: 'data:text/html,', browserContextId, newWindow: true}); - await targetAgent.invoke_attachToTarget({targetId, flatten: true}); - - // Destroy the temp profile. - await targetAgent.invoke_disposeBrowserContext({browserContextId}); - - this.releaseControl(); - }; - - TestSuite.prototype.testCreateBrowserContext = async function(url) { - this.takeControl(); - const browserContextIds = []; - const targetAgent = self.SDK.targetManager.rootTarget().targetAgent(); - - const target1 = await createIsolatedTarget(url, browserContextIds); - const target2 = await createIsolatedTarget(url, browserContextIds); - - const response = await targetAgent.invoke_getBrowserContexts(); - this.assertEquals(response.browserContextIds.length, 2); - this.assertTrue(response.browserContextIds.includes(browserContextIds[0])); - this.assertTrue(response.browserContextIds.includes(browserContextIds[1])); - - await evalCode(target1, 'localStorage.setItem("page1", "page1")'); - await evalCode(target2, 'localStorage.setItem("page2", "page2")'); - - this.assertEquals(await evalCode(target1, 'localStorage.getItem("page1")'), 'page1'); - this.assertEquals(await evalCode(target1, 'localStorage.getItem("page2")'), null); - this.assertEquals(await evalCode(target2, 'localStorage.getItem("page1")'), null); - this.assertEquals(await evalCode(target2, 'localStorage.getItem("page2")'), 'page2'); - - const removedTargets = []; - self.SDK.targetManager.observeTargets( - {targetAdded: () => {}, targetRemoved: target => removedTargets.push(target)}); - await Promise.all([disposeBrowserContext(browserContextIds[0]), disposeBrowserContext(browserContextIds[1])]); - this.assertEquals(removedTargets.length, 2); - this.assertEquals(removedTargets.indexOf(target1) !== -1, true); - this.assertEquals(removedTargets.indexOf(target2) !== -1, true); - - this.releaseControl(); - }; - - /** - * @param {string} url - * @return {!Promise} - */ - async function createIsolatedTarget(url, opt_browserContextIds) { - const targetAgent = self.SDK.targetManager.rootTarget().targetAgent(); - const {browserContextId} = await targetAgent.invoke_createBrowserContext(); - if (opt_browserContextIds) { - opt_browserContextIds.push(browserContextId); - } - - const {targetId} = await targetAgent.invoke_createTarget({url: 'about:blank', browserContextId}); - await targetAgent.invoke_attachToTarget({targetId, flatten: true}); - - const target = self.SDK.targetManager.targets().find(target => target.id() === targetId); - const pageAgent = target.pageAgent(); - await pageAgent.invoke_enable(); - await pageAgent.invoke_navigate({url}); - return target; - } - - async function disposeBrowserContext(browserContextId) { - const targetAgent = self.SDK.targetManager.rootTarget().targetAgent(); - await targetAgent.invoke_disposeBrowserContext({browserContextId}); - } - - async function evalCode(target, code) { - return (await target.runtimeAgent().invoke_evaluate({expression: code})).result.value; - } - - TestSuite.prototype.testInputDispatchEventsToOOPIF = async function() { - this.takeControl(); - - await new Promise(callback => this._waitForTargets(2, callback)); - - async function takeLogs(target) { - return await evalCode(target, ` - (function() { - var result = window.logs.join(' '); - window.logs = []; - return result; - })()`); - } - - let parentFrameOutput; - let childFrameOutput; - - const inputAgent = self.SDK.targetManager.primaryPageTarget().inputAgent(); - const runtimeAgent = self.SDK.targetManager.primaryPageTarget().runtimeAgent(); - await inputAgent.invoke_dispatchMouseEvent({type: 'mousePressed', button: 'left', clickCount: 1, x: 10, y: 10}); - await inputAgent.invoke_dispatchMouseEvent({type: 'mouseMoved', button: 'left', clickCount: 1, x: 10, y: 20}); - await inputAgent.invoke_dispatchMouseEvent({type: 'mouseReleased', button: 'left', clickCount: 1, x: 10, y: 20}); - await inputAgent.invoke_dispatchMouseEvent({type: 'mousePressed', button: 'left', clickCount: 1, x: 230, y: 140}); - await inputAgent.invoke_dispatchMouseEvent({type: 'mouseMoved', button: 'left', clickCount: 1, x: 230, y: 150}); - await inputAgent.invoke_dispatchMouseEvent({type: 'mouseReleased', button: 'left', clickCount: 1, x: 230, y: 150}); - parentFrameOutput = 'Event type: mousedown button: 0 x: 10 y: 10 Event type: mouseup button: 0 x: 10 y: 20'; - this.assertEquals(parentFrameOutput, await takeLogs(self.SDK.targetManager.targets()[0])); - childFrameOutput = 'Event type: mousedown button: 0 x: 30 y: 40 Event type: mouseup button: 0 x: 30 y: 50'; - this.assertEquals(childFrameOutput, await takeLogs(self.SDK.targetManager.targets()[1])); - - await inputAgent.invoke_dispatchKeyEvent({type: 'keyDown', key: 'a'}); - await runtimeAgent.invoke_evaluate({expression: "document.querySelector('iframe').focus()"}); - await inputAgent.invoke_dispatchKeyEvent({type: 'keyDown', key: 'a'}); - parentFrameOutput = 'Event type: keydown'; - this.assertEquals(parentFrameOutput, await takeLogs(self.SDK.targetManager.targets()[0])); - childFrameOutput = 'Event type: keydown'; - this.assertEquals(childFrameOutput, await takeLogs(self.SDK.targetManager.targets()[1])); - - await inputAgent.invoke_dispatchTouchEvent({type: 'touchStart', touchPoints: [{x: 10, y: 10}]}); - await inputAgent.invoke_dispatchTouchEvent({type: 'touchEnd', touchPoints: []}); - await inputAgent.invoke_dispatchTouchEvent({type: 'touchStart', touchPoints: [{x: 230, y: 140}]}); - await inputAgent.invoke_dispatchTouchEvent({type: 'touchEnd', touchPoints: []}); - parentFrameOutput = 'Event type: touchstart touch x: 10 touch y: 10'; - this.assertEquals(parentFrameOutput, await takeLogs(self.SDK.targetManager.targets()[0])); - childFrameOutput = 'Event type: touchstart touch x: 30 touch y: 40'; - this.assertEquals(childFrameOutput, await takeLogs(self.SDK.targetManager.targets()[1])); - - this.releaseControl(); - }; - - TestSuite.prototype.testLoadResourceForFrontend = async function(baseURL, fileURL) { - const test = this; - const loggedHeaders = new Set(['cache-control', 'pragma']); - function testCase(url, headers, expectedStatus, expectedHeaders, expectedContent) { - return new Promise(fulfill => { - Host.ResourceLoader.load(url, headers, callback); - - function callback(success, headers, content, errorDescription) { - test.assertEquals(expectedStatus, errorDescription.statusCode); - - const headersArray = []; - for (const name in headers) { - const nameLower = name.toLowerCase(); - if (loggedHeaders.has(nameLower)) { - headersArray.push(nameLower); - } - } - headersArray.sort(); - test.assertEquals(expectedHeaders.join(', '), headersArray.join(', ')); - test.assertEquals(expectedContent, content); - fulfill(); - } - }); - } - - this.takeControl({slownessFactor: 10}); - await testCase(baseURL + 'non-existent.html', undefined, 404, [], ''); - await testCase(baseURL + 'hello.html', undefined, 200, [], '\n

hello

\n'); - await testCase(baseURL + 'echoheader?x-devtools-test', {'x-devtools-test': 'Foo'}, 200, ['cache-control'], 'Foo'); - await testCase(baseURL + 'set-header?pragma:%20no-cache', undefined, 200, ['pragma'], 'pragma: no-cache'); - - await self.SDK.targetManager.primaryPageTarget().runtimeAgent().invoke_evaluate({ - expression: `fetch("/set-cookie?devtools-test-cookie=Bar", - {credentials: 'include'})`, - awaitPromise: true - }); - await testCase(baseURL + 'echoheader?Cookie', undefined, 200, ['cache-control'], 'devtools-test-cookie=Bar'); - - await self.SDK.targetManager.primaryPageTarget().runtimeAgent().invoke_evaluate({ - expression: `fetch("/set-cookie?devtools-test-cookie=same-site-cookie;SameSite=Lax", - {credentials: 'include'})`, - awaitPromise: true - }); - await testCase( - baseURL + 'echoheader?Cookie', undefined, 200, ['cache-control'], 'devtools-test-cookie=same-site-cookie'); - await testCase('data:text/html,hello', undefined, 200, [], 'hello'); - await testCase(fileURL, undefined, 200, [], '\n\n\nDummy page.\n\n\n'); - await testCase(fileURL + 'thisfileshouldnotbefound', undefined, 404, [], ''); - - this.releaseControl(); - }; - - TestSuite.prototype.testExtensionWebSocketUserAgentOverride = async function(websocketPort) { - this.takeControl(); - - const testUserAgent = 'test user agent'; - self.SDK.multitargetNetworkManager.setUserAgentOverride(testUserAgent); - - function onRequestUpdated(event) { - const request = event.data; - if (request.resourceType() !== Common.resourceTypes.WebSocket) { - return; - } - if (!request.requestHeadersText()) { - return; - } - - let actualUserAgent = 'no user-agent header'; - for (const {name, value} of request.requestHeaders()) { - if (name.toLowerCase() === 'user-agent') { - actualUserAgent = value; - } - } - this.assertEquals(testUserAgent, actualUserAgent); - this.releaseControl(); - } - self.SDK.targetManager.addModelListener( - SDK.NetworkManager, SDK.NetworkManager.Events.RequestUpdated, onRequestUpdated.bind(this)); - - this.evaluateInConsole_(`new WebSocket('ws://127.0.0.1:${websocketPort}')`, () => {}); - }; - - TestSuite.prototype.testExtensionWebSocketOfflineNetworkConditions = async function(websocketPort) { - self.SDK.multitargetNetworkManager.setNetworkConditions(SDK.NetworkManager.OfflineConditions); - - // TODO(crbug.com/1263900): Currently we don't send loadingFailed for web sockets. - // Update this once we do. - this.addSniffer(SDK.NetworkDispatcher.prototype, 'webSocketClosed', () => { - this.releaseControl(); - }); - - this.takeControl(); - this.evaluateInConsole_(`new WebSocket('ws://127.0.0.1:${websocketPort}/echo-with-no-extension')`, () => {}); - }; - - /** - * Serializes array of uiSourceCodes to string. - * @param {!Array.} uiSourceCodes - * @return {string} - */ - TestSuite.prototype.uiSourceCodesToString_ = function(uiSourceCodes) { - const names = []; - for (let i = 0; i < uiSourceCodes.length; i++) { - names.push('"' + uiSourceCodes[i].url() + '"'); - } - return names.join(','); - }; - - TestSuite.prototype.testSourceMapsFromExtension = function(extensionId) { - this.takeControl(); - const debuggerModel = self.SDK.targetManager.primaryPageTarget().model(SDK.DebuggerModel); - debuggerModel.sourceMapManager().addEventListener( - SDK.SourceMapManager.Events.SourceMapAttached, this.releaseControl.bind(this)); - - this.evaluateInConsole_( - `console.log(1) //# sourceMappingURL=chrome-extension://${extensionId}/source.map`, () => {}); - }; - - TestSuite.prototype.testSourceMapsFromDevtools = function() { - this.takeControl(); - const debuggerModel = self.SDK.targetManager.primaryPageTarget().model(SDK.DebuggerModel); - debuggerModel.sourceMapManager().addEventListener( - SDK.SourceMapManager.Events.SourceMapWillAttach, this.releaseControl.bind(this)); - - this.evaluateInConsole_( - 'console.log(1) //# sourceMappingURL=devtools://devtools/bundled/devtools_compatibility.js', () => {}); - }; - - TestSuite.prototype.testDoesNotCrashOnSourceMapsFromUnknownScheme = function() { - this.evaluateInConsole_('console.log(1) //# sourceMappingURL=invalid-scheme://source.map', () => {}); - }; - - /** - * Returns all loaded non anonymous uiSourceCodes. - * @return {!Array.} - */ - TestSuite.prototype.nonAnonymousUISourceCodes_ = function() { - /** - * @param {!Workspace.UISourceCode} uiSourceCode - */ - function filterOutService(uiSourceCode) { - return !uiSourceCode.project().isServiceProject(); - } - - const uiSourceCodes = self.Workspace.workspace.uiSourceCodes(); - return uiSourceCodes.filter(filterOutService); - }; - - /* - * Evaluates the code in the console as if user typed it manually and invokes - * the callback when the result message is received and added to the console. - * @param {string} code - * @param {function(string)} callback - */ - TestSuite.prototype.evaluateInConsole_ = function(code, callback) { - function innerEvaluate() { - self.UI.context.removeFlavorChangeListener(SDK.ExecutionContext, showConsoleAndEvaluate, this); - const consoleView = Console.ConsoleView.instance(); - consoleView.prompt.appendCommand(code); - - this.addSniffer(Console.ConsoleView.prototype, 'consoleMessageAddedForTest', function(viewMessage) { - callback(viewMessage.toMessageElement().deepTextContent()); - }.bind(this)); - } - - function showConsoleAndEvaluate() { - self.Common.console.showPromise().then(innerEvaluate.bind(this)); - } - - if (!self.UI.context.flavor(SDK.ExecutionContext)) { - self.UI.context.addFlavorChangeListener(SDK.ExecutionContext, showConsoleAndEvaluate, this); - return; - } - showConsoleAndEvaluate.call(this); - }; - - /** - * Checks that all expected scripts are present in the scripts list - * in the Scripts panel. - * @param {!Array.} expected Regular expressions describing - * expected script names. - * @return {boolean} Whether all the scripts are in "scripts-files" select - * box - */ - TestSuite.prototype._scriptsAreParsed = function(expected) { - const uiSourceCodes = this.nonAnonymousUISourceCodes_(); - // Check that at least all the expected scripts are present. - const missing = expected.slice(0); - for (let i = 0; i < uiSourceCodes.length; ++i) { - for (let j = 0; j < missing.length; ++j) { - if (uiSourceCodes[i].name().search(missing[j]) !== -1) { - missing.splice(j, 1); - break; - } - } - } - return missing.length === 0; - }; - - /** - * Waits for script pause, checks expectations, and invokes the callback. - * @param {function():void} callback - */ - TestSuite.prototype._waitForScriptPause = function(callback) { - this.addSniffer(SDK.DebuggerModel.prototype, 'pausedScript', callback); - }; - - /** - * Waits until all the scripts are parsed and invokes the callback. - */ - TestSuite.prototype._waitUntilScriptsAreParsed = function(expectedScripts, callback) { - const test = this; - - function waitForAllScripts() { - if (test._scriptsAreParsed(expectedScripts)) { - callback(); - } else { - test.addSniffer(UI.panels.sources.sourcesView(), 'addUISourceCode', waitForAllScripts); - } - } - - waitForAllScripts(); - }; - - TestSuite.prototype._waitForTargets = function(n, callback) { - checkTargets.call(this); - - function checkTargets() { - if (self.SDK.targetManager.targets().length >= n) { - callback.call(null); - } else { - this.addSniffer(SDK.TargetManager.prototype, 'createTarget', checkTargets.bind(this)); - } - } - }; - - TestSuite.prototype._waitForExecutionContexts = function(n, callback) { - const runtimeModel = self.SDK.targetManager.primaryPageTarget().model(SDK.RuntimeModel); - checkForExecutionContexts.call(this); - - function checkForExecutionContexts() { - if (runtimeModel.executionContexts().length >= n) { - callback.call(null); - } else { - this.addSniffer(SDK.RuntimeModel.prototype, 'executionContextCreated', checkForExecutionContexts.bind(this)); - } - } - }; - - window.uiTests = new TestSuite(window.domAutomationController); -})(window); diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/common/common-legacy.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/common/common-legacy.js deleted file mode 100644 index b7ad906bd..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/common/common-legacy.js +++ /dev/null @@ -1 +0,0 @@ -import*as e from"./common.js";self.Common=self.Common||{},Common=Common||{},Common.App=e.App.App,Common.AppProvider=e.AppProvider.AppProvider,Common.console=e.Console.Console.instance(),Common.Console=e.Console.Console,Common.EventTarget={removeEventListeners:e.EventTarget.removeEventListeners},Common.JavaScriptMetadata=e.JavaScriptMetaData.JavaScriptMetaData,Common.Linkifier=e.Linkifier.Linkifier,Common.Object=e.ObjectWrapper.ObjectWrapper,Common.ParsedURL=e.ParsedURL.ParsedURL,Common.Progress=e.Progress.Progress,Common.CompositeProgress=e.Progress.CompositeProgress,Common.QueryParamHandler=e.QueryParamHandler.QueryParamHandler,Common.resourceTypes=e.ResourceType.resourceTypes,Common.Revealer=e.Revealer.Revealer,Common.Revealer.reveal=e.Revealer.reveal,Common.Revealer.setRevealForTest=e.Revealer.setRevealForTest,Common.Segment=e.SegmentedRange.Segment,Common.SegmentedRange=e.SegmentedRange.SegmentedRange,Common.Settings=e.Settings.Settings,Common.Settings.detectColorFormat=e.Settings.detectColorFormat,Common.Setting=e.Settings.Setting,Common.settingForTest=e.Settings.settingForTest,Common.VersionController=e.Settings.VersionController,Common.moduleSetting=e.Settings.moduleSetting,Common.StringOutputStream=e.StringOutputStream.StringOutputStream,Common.Throttler=e.Throttler.Throttler,Common.Trie=e.Trie.Trie,Common.settings; diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/common/common.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/common/common.js deleted file mode 100644 index 8a90aa04b..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/common/common.js +++ /dev/null @@ -1 +0,0 @@ -import*as t from"../root/root.js";import*as e from"../platform/platform.js";export{UIString}from"../platform/platform.js";import*as r from"../i18n/i18n.js";var s=Object.freeze({__proto__:null});const n=[];var i=Object.freeze({__proto__:null,registerAppProvider:function(t){n.push(t)},getRegisteredAppProviders:function(){return n.filter((e=>t.Runtime.Runtime.isDescriptorEnabled({experiment:void 0,condition:e.condition}))).sort(((t,e)=>(t.order||0)-(e.order||0)))}});const a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=new Uint8Array(123);for(let t=0;t>>0;61===t.charCodeAt(t.length-2)?e-=2:61===t.charCodeAt(t.length-1)&&(e-=1);const r=new Uint8Array(e);for(let e=0,s=0;e>4,r[s++]=(15&i)<<4|a>>2,r[s++]=(3&a)<<6|63&l}return r.buffer}});var h=Object.freeze({__proto__:null,CharacterIdMap:class{#t;#e;#r;constructor(){this.#t=new Map,this.#e=new Map,this.#r=33}toChar(t){let e=this.#t.get(t);if(!e){if(this.#r>=65535)throw new Error("CharacterIdMap ran out of capacity!");e=String.fromCharCode(this.#r++),this.#t.set(t,e),this.#e.set(e,t)}return e}fromChar(t){const e=this.#e.get(t);return void 0===e?null:e}}});class c{values=[0,0,0];constructor(t){t&&(this.values=t)}}class u{values=[[0,0,0],[0,0,0],[0,0,0]];constructor(t){t&&(this.values=t)}multiply(t){const e=new c;for(let r=0;r<3;++r)e.values[r]=this.values[r][0]*t.values[0]+this.values[r][1]*t.values[1]+this.values[r][2]*t.values[2];return e}}class g{g;a;b;c;d;e;f;constructor(t,e,r=0,s=0,n=0,i=0,a=0){this.g=t,this.a=e,this.b=r,this.c=s,this.d=n,this.e=i,this.f=a}eval(t){const e=t<0?-1:1,r=t*e;return r.022?t:t+Math.pow(.022-t,1.414)}function V(t,e){if(t=_(t),e=_(e),Math.abs(t-e)<5e-4)return 0;let r=0;return e>t?(r=1.14*(Math.pow(e,.56)-Math.pow(t,.57)),r=r<.1?0:r-.027):(r=1.14*(Math.pow(e,.65)-Math.pow(t,.62)),r=r>-.1?0:r+.027),100*r}function M(t,e,r){function s(){return r?Math.pow(Math.abs(Math.pow(t,.65)-(-e-.027)/1.14),1/.62):Math.pow(Math.abs(Math.pow(t,.56)-(e+.027)/1.14),1/.57)}t=_(t),e/=100;let n=s();return(n<0||n>1)&&(r=!r,n=s()),n}const W=[[12,-1,-1,-1,-1,100,90,80,-1,-1],[14,-1,-1,-1,100,90,80,60,60,-1],[16,-1,-1,100,90,80,60,55,50,50],[18,-1,-1,90,80,60,55,50,40,40],[24,-1,100,80,60,55,50,40,38,35],[30,-1,90,70,55,50,40,38,35,40],[36,-1,80,60,50,40,38,35,30,25],[48,100,70,55,40,38,35,30,25,20],[60,90,60,50,38,35,30,25,20,20],[72,80,55,40,35,30,25,20,20,20],[96,70,50,35,30,25,20,20,20,20],[120,60,40,30,25,20,20,20,20,20]];function X(t,e){const r=72*parseFloat(t.replace("px",""))/96;return(isNaN(Number(e))?["bold","bolder"].includes(e):Number(e)>=600)?r>=14:r>=18}W.reverse();const F={aa:3,aaa:4.5},D={aa:4.5,aaa:7};var U=Object.freeze({__proto__:null,blendColors:P,rgbToHsl:k,rgbaToHsla:L,rgbToHwb:B,rgbaToHwba:O,luminance:C,contrastRatio:function(t,e){const r=C(P(t,e)),s=C(e);return(Math.max(r,s)+.05)/(Math.min(r,s)+.05)},luminanceAPCA:N,contrastRatioAPCA:G,contrastRatioByLuminanceAPCA:V,desiredLuminanceAPCA:M,getAPCAThreshold:function(t,e){const r=parseFloat(t.replace("px","")),s=parseFloat(e);for(const[t,...e]of W)if(r>=t)for(const[t,r]of[900,800,700,600,500,400,300,200,100].entries())if(s>=r){const r=e[e.length-1-t];return-1===r?null:r}return null},isLargeFont:X,getContrastThreshold:function(t,e){return X(t,e)?F:D}});function j(t){return(t%360+360)%360}function $(t){const e=t.replace(/(deg|g?rad|turn)$/,"");if(isNaN(e)||t.match(/\s+(deg|g?rad|turn)/))return null;const r=parseFloat(e);return t.includes("turn")?360*r:t.includes("grad")?9*r/10:t.includes("rad")?180*r/Math.PI:r}function H(t){switch(t){case"srgb":return"srgb";case"srgb-linear":return"srgb-linear";case"display-p3":return"display-p3";case"a98-rgb":return"a98-rgb";case"prophoto-rgb":return"prophoto-rgb";case"rec2020":return"rec2020";case"xyz":return"xyz";case"xyz-d50":return"xyz-d50";case"xyz-d65":return"xyz-d65"}return null}function q(t,e){const r=Math.sign(t),s=Math.abs(t),[n,i]=e;return r*(s*(i-n)/100+n)}function Y(t,{min:e,max:r}){return null===t||(void 0!==e&&(t=Math.max(t,e)),void 0!==r&&(t=Math.min(t,r))),t}function Z(t,e){if(!t.endsWith("%"))return null;const r=parseFloat(t.substr(0,t.length-1));return isNaN(r)?null:q(r,e)}function K(t){const e=parseFloat(t);return isNaN(e)?null:e}function J(t){return void 0===t?null:Y(Z(t,[0,1])??K(t),{min:0,max:1})}function Q(t,e=[0,1]){if(isNaN(t.replace("%","")))return null;const r=parseFloat(t);return-1!==t.indexOf("%")?t.indexOf("%")!==t.length-1?null:q(r,e):r}function tt(t){const e=Q(t);return null===e?null:-1!==t.indexOf("%")?e:e/255}function et(t){const e=t.replace(/(deg|g?rad|turn)$/,"");if(isNaN(e)||t.match(/\s+(deg|g?rad|turn)/))return null;const r=parseFloat(e);return-1!==t.indexOf("turn")?r%1:-1!==t.indexOf("grad")?r/400%1:-1!==t.indexOf("rad")?r/(2*Math.PI)%1:r/360%1}function rt(t){if(t.indexOf("%")!==t.length-1||isNaN(t.replace("%","")))return null;return parseFloat(t)/100}function st(t,e){const r=t[0];let s=t[1];const n=t[2];function i(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}let a;s<0&&(s=0),a=n<=.5?n*(1+s):n+s-n*s;const o=2*n-a,l=r+1/3,h=r,c=r-1/3;e[0]=i(o,a,l),e[1]=i(o,a,h),e[2]=i(o,a,c),e[3]=t[3]}function nt(t,e){const r=[0,0,0,0];!function(t,e){const r=t[0];let s=t[1];const n=t[2],i=(2-s)*n;0===n||0===s?s=0:s*=n/(i<1?i:2-i),e[0]=r,e[1]=s,e[2]=i/2,e[3]=t[3]}(t,r),st(r,e)}function it(t,e,r){function s(){return r?(t+.05)*e-.05:(t+.05)/e-.05}let n=s();return(n<0||n>1)&&(r=!r,n=s()),n}function at(t,e,r,s,n){let i=t[r],a=1,o=n(t)-s,l=Math.sign(o);for(let e=100;e;e--){if(Math.abs(o)<2e-4)return t[r]=i,i;const e=Math.sign(o);if(e!==l)a/=2,l=e;else if(i<0||i>1)return null;i+=a*(2===r?-o:o),t[r]=i,o=n(t)-s}return null}function ot(t,e,r=.01){if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(const r in t)if(!ot(t[r],e[r]))return!1;return!0}return!Array.isArray(t)&&!Array.isArray(e)&&(null===t||null===e?t===e:Math.abs(t-e)new ft(t.#a(!1),"nickname"),hex:t=>new ft(t.#a(!1),"hex"),shorthex:t=>new ft(t.#a(!1),"shorthex"),hexa:t=>new ft(t.#a(!0),"hexa"),shorthexa:t=>new ft(t.#a(!0),"shorthexa"),rgb:t=>new ft(t.#a(!1),"rgb"),rgba:t=>new ft(t.#a(!0),"rgba"),hsl:t=>new pt(...k(t.#a(!1)),t.alpha),hsla:t=>new pt(...k(t.#a(!1)),t.alpha),hwb:t=>new mt(...B(t.#a(!1)),t.alpha),hwba:t=>new mt(...B(t.#a(!1)),t.alpha),lch:t=>new ct(...A.labToLch(t.l,t.a,t.b),t.alpha),oklch:t=>new gt(...A.xyzd50ToOklch(...t.#o()),t.alpha),lab:t=>t,oklab:t=>new ut(...A.xyzd65ToOklab(...A.xyzd50ToD65(...t.#o())),t.alpha),srgb:t=>new dt("srgb",...A.xyzd50ToSrgb(...t.#o()),t.alpha),"srgb-linear":t=>new dt("srgb-linear",...A.xyzd50TosRGBLinear(...t.#o()),t.alpha),"display-p3":t=>new dt("display-p3",...A.xyzd50ToDisplayP3(...t.#o()),t.alpha),"a98-rgb":t=>new dt("a98-rgb",...A.xyzd50ToAdobeRGB(...t.#o()),t.alpha),"prophoto-rgb":t=>new dt("prophoto-rgb",...A.xyzd50ToProPhoto(...t.#o()),t.alpha),rec2020:t=>new dt("rec2020",...A.xyzd50ToRec2020(...t.#o()),t.alpha),xyz:t=>new dt("xyz",...A.xyzd50ToD65(...t.#o()),t.alpha),"xyz-d50":t=>new dt("xyz-d50",...t.#o(),t.alpha),"xyz-d65":t=>new dt("xyz-d65",...A.xyzd50ToD65(...t.#o()),t.alpha)};#o(){return A.labToXyzd50(this.l,this.a,this.b)}#a(t=!0){const e=A.xyzd50ToSrgb(...this.#o());return t?[...e,this.alpha??void 0]:e}constructor(t,e,r,s,n){this.#n=[t,e,r],this.l=Y(t,{min:0,max:100}),(ot(this.l,0,1)||ot(this.l,100,1))&&(e=r=0),this.a=e,this.b=r,this.alpha=Y(s,{min:0,max:1}),this.#s=n}as(t){return ht.#i[t](this)}asLegacyColor(){return this.as("rgba")}equal(t){const e=t.as("lab");return ot(e.l,this.l,1)&&ot(e.a,this.a)&&ot(e.b,this.b)&&ot(e.alpha,this.alpha)}format(){return"lab"}setAlpha(t){return new ht(this.l,this.a,this.b,t,void 0)}asString(t){return t?this.as(t).asString():this.#l(this.l,this.a,this.b)}#l(t,r,s){const n=null===this.alpha||ot(this.alpha,1)?"":` / ${e.StringUtilities.stringifyWithPrecision(this.alpha)}`;return`lab(${e.StringUtilities.stringifyWithPrecision(t,0)} ${e.StringUtilities.stringifyWithPrecision(r)} ${e.StringUtilities.stringifyWithPrecision(s)}${n})`}getAuthoredText(){return this.#s??null}getRawParameters(){return[...this.#n]}getAsRawString(t){return t?this.as(t).getAsRawString():this.#l(...this.#n)}isGamutClipped(){return!1}static fromSpec(t,e){const r=Z(t[0],[0,100])??K(t[0]);if(null===r)return null;const s=Z(t[1],[0,125])??K(t[1]);if(null===s)return null;const n=Z(t[2],[0,125])??K(t[2]);if(null===n)return null;const i=J(t[3]);return new ht(r,s,n,i,e)}}class ct{#n;l;c;h;alpha;#s;static#i={nickname:t=>new ft(t.#a(!1),"nickname"),hex:t=>new ft(t.#a(!1),"hex"),shorthex:t=>new ft(t.#a(!1),"shorthex"),hexa:t=>new ft(t.#a(!0),"hexa"),shorthexa:t=>new ft(t.#a(!0),"shorthexa"),rgb:t=>new ft(t.#a(!1),"rgb"),rgba:t=>new ft(t.#a(!0),"rgba"),hsl:t=>new pt(...k(t.#a(!1)),t.alpha),hsla:t=>new pt(...k(t.#a(!1)),t.alpha),hwb:t=>new mt(...B(t.#a(!1)),t.alpha),hwba:t=>new mt(...B(t.#a(!1)),t.alpha),lch:t=>t,oklch:t=>new gt(...A.xyzd50ToOklch(...t.#o()),t.alpha),lab:t=>new ht(...A.lchToLab(t.l,t.c,t.h),t.alpha),oklab:t=>new ut(...A.xyzd65ToOklab(...A.xyzd50ToD65(...t.#o())),t.alpha),srgb:t=>new dt("srgb",...A.xyzd50ToSrgb(...t.#o()),t.alpha),"srgb-linear":t=>new dt("srgb-linear",...A.xyzd50TosRGBLinear(...t.#o()),t.alpha),"display-p3":t=>new dt("display-p3",...A.xyzd50ToDisplayP3(...t.#o()),t.alpha),"a98-rgb":t=>new dt("a98-rgb",...A.xyzd50ToAdobeRGB(...t.#o()),t.alpha),"prophoto-rgb":t=>new dt("prophoto-rgb",...A.xyzd50ToProPhoto(...t.#o()),t.alpha),rec2020:t=>new dt("rec2020",...A.xyzd50ToRec2020(...t.#o()),t.alpha),xyz:t=>new dt("xyz",...A.xyzd50ToD65(...t.#o()),t.alpha),"xyz-d50":t=>new dt("xyz-d50",...t.#o(),t.alpha),"xyz-d65":t=>new dt("xyz-d65",...A.xyzd50ToD65(...t.#o()),t.alpha)};#o(){return A.labToXyzd50(...A.lchToLab(this.l,this.c,this.h))}#a(t=!0){const e=A.xyzd50ToSrgb(...this.#o());return t?[...e,this.alpha??void 0]:e}constructor(t,e,r,s,n){this.#n=[t,e,r],this.l=Y(t,{min:0,max:100}),e=ot(this.l,0,1)||ot(this.l,100,1)?0:e,this.c=Y(e,{min:0}),r=ot(e,0)?0:r,this.h=j(r),this.alpha=Y(s,{min:0,max:1}),this.#s=n}asLegacyColor(){return this.as("rgba")}as(t){return ct.#i[t](this)}equal(t){const e=t.as("lch");return ot(e.l,this.l,1)&&ot(e.c,this.c)&&ot(e.h,this.h)&&ot(e.alpha,this.alpha)}format(){return"lch"}setAlpha(t){return new ct(this.l,this.c,this.h,t)}asString(t){return t?this.as(t).asString():this.#l(this.l,this.c,this.h)}#l(t,r,s){const n=null===this.alpha||ot(this.alpha,1)?"":` / ${e.StringUtilities.stringifyWithPrecision(this.alpha)}`;return`lch(${e.StringUtilities.stringifyWithPrecision(t,0)} ${e.StringUtilities.stringifyWithPrecision(r)} ${e.StringUtilities.stringifyWithPrecision(s)}${n})`}getAuthoredText(){return this.#s??null}getRawParameters(){return[...this.#n]}getAsRawString(t){return t?this.as(t).getAsRawString():this.#l(...this.#n)}isGamutClipped(){return!1}isHuePowerless(){return ot(this.c,0)}static fromSpec(t,e){const r=Z(t[0],[0,100])??K(t[0]);if(null===r)return null;const s=Z(t[1],[0,150])??K(t[1]);if(null===s)return null;const n=$(t[2]);if(null===n)return null;const i=J(t[3]);return new ct(r,s,n,i,e)}}class ut{#n;l;a;b;alpha;#s;static#i={nickname:t=>new ft(t.#a(!1),"nickname"),hex:t=>new ft(t.#a(!1),"hex"),shorthex:t=>new ft(t.#a(!1),"shorthex"),hexa:t=>new ft(t.#a(!0),"hexa"),shorthexa:t=>new ft(t.#a(!0),"shorthexa"),rgb:t=>new ft(t.#a(!1),"rgb"),rgba:t=>new ft(t.#a(!0),"rgba"),hsl:t=>new pt(...k(t.#a(!1)),t.alpha),hsla:t=>new pt(...k(t.#a(!1)),t.alpha),hwb:t=>new mt(...B(t.#a(!1)),t.alpha),hwba:t=>new mt(...B(t.#a(!1)),t.alpha),lch:t=>new ct(...A.labToLch(...A.xyzd50ToLab(...t.#o())),t.alpha),oklch:t=>new gt(...A.xyzd50ToOklch(...t.#o()),t.alpha),lab:t=>new ht(...A.xyzd50ToLab(...t.#o()),t.alpha),oklab:t=>t,srgb:t=>new dt("srgb",...A.xyzd50ToSrgb(...t.#o()),t.alpha),"srgb-linear":t=>new dt("srgb-linear",...A.xyzd50TosRGBLinear(...t.#o()),t.alpha),"display-p3":t=>new dt("display-p3",...A.xyzd50ToDisplayP3(...t.#o()),t.alpha),"a98-rgb":t=>new dt("a98-rgb",...A.xyzd50ToAdobeRGB(...t.#o()),t.alpha),"prophoto-rgb":t=>new dt("prophoto-rgb",...A.xyzd50ToProPhoto(...t.#o()),t.alpha),rec2020:t=>new dt("rec2020",...A.xyzd50ToRec2020(...t.#o()),t.alpha),xyz:t=>new dt("xyz",...A.xyzd50ToD65(...t.#o()),t.alpha),"xyz-d50":t=>new dt("xyz-d50",...t.#o(),t.alpha),"xyz-d65":t=>new dt("xyz-d65",...A.xyzd50ToD65(...t.#o()),t.alpha)};#o(){return A.xyzd65ToD50(...A.oklabToXyzd65(this.l,this.a,this.b))}#a(t=!0){const e=A.xyzd50ToSrgb(...this.#o());return t?[...e,this.alpha??void 0]:e}constructor(t,e,r,s,n){this.#n=[t,e,r],this.l=Y(t,{min:0,max:1}),(ot(this.l,0)||ot(this.l,1))&&(e=r=0),this.a=e,this.b=r,this.alpha=Y(s,{min:0,max:1}),this.#s=n}asLegacyColor(){return this.as("rgba")}as(t){return ut.#i[t](this)}equal(t){const e=t.as("oklab");return ot(e.l,this.l)&&ot(e.a,this.a)&&ot(e.b,this.b)&&ot(e.alpha,this.alpha)}format(){return"oklab"}setAlpha(t){return new ut(this.l,this.a,this.b,t)}asString(t){return t?this.as(t).asString():this.#l(this.l,this.a,this.b)}#l(t,r,s){const n=null===this.alpha||ot(this.alpha,1)?"":` / ${e.StringUtilities.stringifyWithPrecision(this.alpha)}`;return`oklab(${e.StringUtilities.stringifyWithPrecision(t)} ${e.StringUtilities.stringifyWithPrecision(r)} ${e.StringUtilities.stringifyWithPrecision(s)}${n})`}getAuthoredText(){return this.#s??null}getRawParameters(){return[...this.#n]}getAsRawString(t){return t?this.as(t).getAsRawString():this.#l(...this.#n)}isGamutClipped(){return!1}static fromSpec(t,e){const r=Z(t[0],[0,1])??K(t[0]);if(null===r)return null;const s=Z(t[1],[0,.4])??K(t[1]);if(null===s)return null;const n=Z(t[2],[0,.4])??K(t[2]);if(null===n)return null;const i=J(t[3]);return new ut(r,s,n,i,e)}}class gt{#n;l;c;h;alpha;#s;static#i={nickname:t=>new ft(t.#a(!1),"nickname"),hex:t=>new ft(t.#a(!1),"hex"),shorthex:t=>new ft(t.#a(!1),"shorthex"),hexa:t=>new ft(t.#a(!0),"hexa"),shorthexa:t=>new ft(t.#a(!0),"shorthexa"),rgb:t=>new ft(t.#a(!1),"rgb"),rgba:t=>new ft(t.#a(!0),"rgba"),hsl:t=>new pt(...k(t.#a(!1)),t.alpha),hsla:t=>new pt(...k(t.#a(!1)),t.alpha),hwb:t=>new mt(...B(t.#a(!1)),t.alpha),hwba:t=>new mt(...B(t.#a(!1)),t.alpha),lch:t=>new ct(...A.labToLch(...A.xyzd50ToLab(...t.#o())),t.alpha),oklch:t=>t,lab:t=>new ht(...A.xyzd50ToLab(...t.#o()),t.alpha),oklab:t=>new ut(...A.xyzd65ToOklab(...A.xyzd50ToD65(...t.#o())),t.alpha),srgb:t=>new dt("srgb",...A.xyzd50ToSrgb(...t.#o()),t.alpha),"srgb-linear":t=>new dt("srgb-linear",...A.xyzd50TosRGBLinear(...t.#o()),t.alpha),"display-p3":t=>new dt("display-p3",...A.xyzd50ToDisplayP3(...t.#o()),t.alpha),"a98-rgb":t=>new dt("a98-rgb",...A.xyzd50ToAdobeRGB(...t.#o()),t.alpha),"prophoto-rgb":t=>new dt("prophoto-rgb",...A.xyzd50ToProPhoto(...t.#o()),t.alpha),rec2020:t=>new dt("rec2020",...A.xyzd50ToRec2020(...t.#o()),t.alpha),xyz:t=>new dt("xyz",...A.xyzd50ToD65(...t.#o()),t.alpha),"xyz-d50":t=>new dt("xyz-d50",...t.#o(),t.alpha),"xyz-d65":t=>new dt("xyz-d65",...A.xyzd50ToD65(...t.#o()),t.alpha)};#o(){return A.oklchToXyzd50(this.l,this.c,this.h)}#a(t=!0){const e=A.xyzd50ToSrgb(...this.#o());return t?[...e,this.alpha??void 0]:e}constructor(t,e,r,s,n){this.#n=[t,e,r],this.l=Y(t,{min:0,max:1}),e=ot(this.l,0)||ot(this.l,1)?0:e,this.c=Y(e,{min:0}),r=ot(e,0)?0:r,this.h=j(r),this.alpha=Y(s,{min:0,max:1}),this.#s=n}asLegacyColor(){return this.as("rgba")}as(t){return gt.#i[t](this)}equal(t){const e=t.as("oklch");return ot(e.l,this.l)&&ot(e.c,this.c)&&ot(e.h,this.h)&&ot(e.alpha,this.alpha)}format(){return"oklch"}setAlpha(t){return new gt(this.l,this.c,this.h,t)}asString(t){return t?this.as(t).asString():this.#l(this.l,this.c,this.h)}#l(t,r,s){const n=null===this.alpha||ot(this.alpha,1)?"":` / ${e.StringUtilities.stringifyWithPrecision(this.alpha)}`;return`oklch(${e.StringUtilities.stringifyWithPrecision(t)} ${e.StringUtilities.stringifyWithPrecision(r)} ${e.StringUtilities.stringifyWithPrecision(s)}${n})`}getAuthoredText(){return this.#s??null}getRawParameters(){return[...this.#n]}getAsRawString(t){return t?this.as(t).getAsRawString():this.#l(...this.#n)}isGamutClipped(){return!1}static fromSpec(t,e){const r=Z(t[0],[0,1])??K(t[0]);if(null===r)return null;const s=Z(t[1],[0,.4])??K(t[1]);if(null===s)return null;const n=$(t[2]);if(null===n)return null;const i=J(t[3]);return new gt(r,s,n,i,e)}}class dt{#n;p0;p1;p2;alpha;colorSpace;#s;static#i={nickname:t=>new ft(t.#a(!1),"nickname"),hex:t=>new ft(t.#a(!1),"hex"),shorthex:t=>new ft(t.#a(!1),"shorthex"),hexa:t=>new ft(t.#a(!0),"hexa"),shorthexa:t=>new ft(t.#a(!0),"shorthexa"),rgb:t=>new ft(t.#a(!1),"rgb"),rgba:t=>new ft(t.#a(!0),"rgba"),hsl:t=>new pt(...k(t.#a(!1)),t.alpha),hsla:t=>new pt(...k(t.#a(!1)),t.alpha),hwb:t=>new mt(...B(t.#a(!1)),t.alpha),hwba:t=>new mt(...B(t.#a(!1)),t.alpha),lch:t=>new ct(...A.labToLch(...A.xyzd50ToLab(...t.#o())),t.alpha),oklch:t=>new gt(...A.xyzd50ToOklch(...t.#o()),t.alpha),lab:t=>new ht(...A.xyzd50ToLab(...t.#o()),t.alpha),oklab:t=>new ut(...A.xyzd65ToOklab(...A.xyzd50ToD65(...t.#o())),t.alpha),srgb:t=>new dt("srgb",...A.xyzd50ToSrgb(...t.#o()),t.alpha),"srgb-linear":t=>new dt("srgb-linear",...A.xyzd50TosRGBLinear(...t.#o()),t.alpha),"display-p3":t=>new dt("display-p3",...A.xyzd50ToDisplayP3(...t.#o()),t.alpha),"a98-rgb":t=>new dt("a98-rgb",...A.xyzd50ToAdobeRGB(...t.#o()),t.alpha),"prophoto-rgb":t=>new dt("prophoto-rgb",...A.xyzd50ToProPhoto(...t.#o()),t.alpha),rec2020:t=>new dt("rec2020",...A.xyzd50ToRec2020(...t.#o()),t.alpha),xyz:t=>new dt("xyz",...A.xyzd50ToD65(...t.#o()),t.alpha),"xyz-d50":t=>new dt("xyz-d50",...t.#o(),t.alpha),"xyz-d65":t=>new dt("xyz-d65",...A.xyzd50ToD65(...t.#o()),t.alpha)};#o(){const[t,e,r]=this.#n;switch(this.colorSpace){case"srgb":return A.srgbToXyzd50(t,e,r);case"srgb-linear":return A.srgbLinearToXyzd50(t,e,r);case"display-p3":return A.displayP3ToXyzd50(t,e,r);case"a98-rgb":return A.adobeRGBToXyzd50(t,e,r);case"prophoto-rgb":return A.proPhotoToXyzd50(t,e,r);case"rec2020":return A.rec2020ToXyzd50(t,e,r);case"xyz-d50":return[t,e,r];case"xyz":case"xyz-d65":return A.xyzd65ToD50(t,e,r)}throw new Error("Invalid color space")}#a(t=!0){const[e,r,s]=this.#n,n="srgb"===this.colorSpace?[e,r,s]:[...A.xyzd50ToSrgb(...this.#o())];return t?[...n,this.alpha??void 0]:n}constructor(t,e,r,s,n,i){this.#n=[e,r,s],this.colorSpace=t,this.#s=i,"xyz-d50"!==this.colorSpace&&"xyz-d65"!==this.colorSpace&&"xyz"!==this.colorSpace&&(e=Y(e,{min:0,max:1}),r=Y(r,{min:0,max:1}),s=Y(s,{min:0,max:1})),this.p0=e,this.p1=r,this.p2=s,this.alpha=Y(n,{min:0,max:1})}asLegacyColor(){return this.as("rgba")}as(t){return this.colorSpace===t?this:dt.#i[t](this)}equal(t){const e=t.as(this.colorSpace);return ot(this.p0,e.p0)&&ot(this.p1,e.p1)&&ot(this.p2,e.p2)&&ot(this.alpha,e.alpha)}format(){return this.colorSpace}setAlpha(t){return new dt(this.colorSpace,this.p0,this.p1,this.p2,t)}asString(t){return t?this.as(t).asString():this.#l(this.p0,this.p1,this.p2)}#l(t,r,s){const n=null===this.alpha||ot(this.alpha,1)?"":` / ${e.StringUtilities.stringifyWithPrecision(this.alpha)}`;return`color(${this.colorSpace} ${e.StringUtilities.stringifyWithPrecision(t)} ${e.StringUtilities.stringifyWithPrecision(r)} ${e.StringUtilities.stringifyWithPrecision(s)}${n})`}getAuthoredText(){return this.#s??null}getRawParameters(){return[...this.#n]}getAsRawString(t){return t?this.as(t).getAsRawString():this.#l(...this.#n)}isGamutClipped(){return"xyz-d50"!==this.colorSpace&&"xyz-d65"!==this.colorSpace&&"xyz"!==this.colorSpace&&!ot(this.#n,[this.p0,this.p1,this.p2])}static fromSpec(t,e){const[r,s]=e.split("/",2),n=r.trim().split(/\s+/),[i,...a]=n,o=H(i);if(!o)return null;if(0===a.length&&void 0===s)return new dt(o,0,0,0,null,t);if(0===a.length&&void 0!==s&&s.trim().split(/\s+/).length>1)return null;if(a.length>3)return null;const l=a.map((t=>"none"===t?"0":t)).map((t=>Q(t,[0,1])));if(l.includes(null))return null;const h=s?Q(s,[0,1])??1:1,c=[l[0]??0,l[1]??0,l[2]??0,h];return new dt(o,...c,t)}}class pt{h;s;l;alpha;#n;#s;static#i={nickname:t=>new ft(t.#a(!1),"nickname"),hex:t=>new ft(t.#a(!1),"hex"),shorthex:t=>new ft(t.#a(!1),"shorthex"),hexa:t=>new ft(t.#a(!0),"hexa"),shorthexa:t=>new ft(t.#a(!0),"shorthexa"),rgb:t=>new ft(t.#a(!1),"rgb"),rgba:t=>new ft(t.#a(!0),"rgba"),hsl:t=>t,hsla:t=>t,hwb:t=>new mt(...B(t.#a(!1)),t.alpha),hwba:t=>new mt(...B(t.#a(!1)),t.alpha),lch:t=>new ct(...A.labToLch(...A.xyzd50ToLab(...t.#o())),t.alpha),oklch:t=>new gt(...A.xyzd50ToOklch(...t.#o()),t.alpha),lab:t=>new ht(...A.xyzd50ToLab(...t.#o()),t.alpha),oklab:t=>new ut(...A.xyzd65ToOklab(...A.xyzd50ToD65(...t.#o())),t.alpha),srgb:t=>new dt("srgb",...A.xyzd50ToSrgb(...t.#o()),t.alpha),"srgb-linear":t=>new dt("srgb-linear",...A.xyzd50TosRGBLinear(...t.#o()),t.alpha),"display-p3":t=>new dt("display-p3",...A.xyzd50ToDisplayP3(...t.#o()),t.alpha),"a98-rgb":t=>new dt("a98-rgb",...A.xyzd50ToAdobeRGB(...t.#o()),t.alpha),"prophoto-rgb":t=>new dt("prophoto-rgb",...A.xyzd50ToProPhoto(...t.#o()),t.alpha),rec2020:t=>new dt("rec2020",...A.xyzd50ToRec2020(...t.#o()),t.alpha),xyz:t=>new dt("xyz",...A.xyzd50ToD65(...t.#o()),t.alpha),"xyz-d50":t=>new dt("xyz-d50",...t.#o(),t.alpha),"xyz-d65":t=>new dt("xyz-d65",...A.xyzd50ToD65(...t.#o()),t.alpha)};#a(t=!0){const e=[0,0,0,0];return st([this.h,this.s,this.l,0],e),t?[e[0],e[1],e[2],this.alpha??void 0]:[e[0],e[1],e[2]]}#o(){const t=this.#a(!1);return A.srgbToXyzd50(t[0],t[1],t[2])}constructor(t,e,r,s,n){this.#n=[t,e,r],this.l=Y(r,{min:0,max:1}),e=ot(this.l,0)||ot(this.l,1)?0:e,this.s=Y(e,{min:0,max:1}),t=ot(this.s,0)?0:t,this.h=j(360*t)/360,this.alpha=Y(s??null,{min:0,max:1}),this.#s=n}equal(t){const e=t.as("hsl");return ot(this.h,e.h)&&ot(this.s,e.s)&&ot(this.l,e.l)&&ot(this.alpha,e.alpha)}asString(t){return t?this.as(t).asString():this.#l(this.h,this.s,this.l)}#l(t,r,s){const n=e.StringUtilities.sprintf("hsl(%sdeg %s% %s%",e.StringUtilities.stringifyWithPrecision(360*t),e.StringUtilities.stringifyWithPrecision(100*r),e.StringUtilities.stringifyWithPrecision(100*s));return null!==this.alpha&&1!==this.alpha?n+e.StringUtilities.sprintf(" / %s%)",e.StringUtilities.stringifyWithPrecision(100*this.alpha)):n+")"}setAlpha(t){return new pt(this.h,this.s,this.l,t)}format(){return null===this.alpha||1===this.alpha?"hsl":"hsla"}as(t){return t===this.format()?this:pt.#i[t](this)}asLegacyColor(){return this.as("rgba")}getAuthoredText(){return this.#s??null}getRawParameters(){return[...this.#n]}getAsRawString(t){return t?this.as(t).getAsRawString():this.#l(...this.#n)}isGamutClipped(){return!lt(this.#n[1],1)||!lt(0,this.#n[1])}static fromSpec(t,e){const r=et(t[0]);if(null===r)return null;const s=rt(t[1]);if(null===s)return null;const n=rt(t[2]);if(null===n)return null;const i=J(t[3]);return new pt(r,s,n,i,e)}hsva(){const t=this.s*(this.l<.5?this.l:1-this.l);return[this.h,0!==t?2*t/(this.l+t):0,this.l+t,this.alpha??1]}canonicalHSLA(){return[Math.round(360*this.h),Math.round(100*this.s),Math.round(100*this.l),this.alpha??1]}}class mt{h;w;b;alpha;#n;#s;static#i={nickname:t=>new ft(t.#a(!1),"nickname"),hex:t=>new ft(t.#a(!1),"hex"),shorthex:t=>new ft(t.#a(!1),"shorthex"),hexa:t=>new ft(t.#a(!0),"hexa"),shorthexa:t=>new ft(t.#a(!0),"shorthexa"),rgb:t=>new ft(t.#a(!1),"rgb"),rgba:t=>new ft(t.#a(!0),"rgba"),hsl:t=>new pt(...k(t.#a(!1)),t.alpha),hsla:t=>new pt(...k(t.#a(!1)),t.alpha),hwb:t=>t,hwba:t=>t,lch:t=>new ct(...A.labToLch(...A.xyzd50ToLab(...t.#o())),t.alpha),oklch:t=>new gt(...A.xyzd50ToOklch(...t.#o()),t.alpha),lab:t=>new ht(...A.xyzd50ToLab(...t.#o()),t.alpha),oklab:t=>new ut(...A.xyzd65ToOklab(...A.xyzd50ToD65(...t.#o())),t.alpha),srgb:t=>new dt("srgb",...A.xyzd50ToSrgb(...t.#o()),t.alpha),"srgb-linear":t=>new dt("srgb-linear",...A.xyzd50TosRGBLinear(...t.#o()),t.alpha),"display-p3":t=>new dt("display-p3",...A.xyzd50ToDisplayP3(...t.#o()),t.alpha),"a98-rgb":t=>new dt("a98-rgb",...A.xyzd50ToAdobeRGB(...t.#o()),t.alpha),"prophoto-rgb":t=>new dt("prophoto-rgb",...A.xyzd50ToProPhoto(...t.#o()),t.alpha),rec2020:t=>new dt("rec2020",...A.xyzd50ToRec2020(...t.#o()),t.alpha),xyz:t=>new dt("xyz",...A.xyzd50ToD65(...t.#o()),t.alpha),"xyz-d50":t=>new dt("xyz-d50",...t.#o(),t.alpha),"xyz-d65":t=>new dt("xyz-d65",...A.xyzd50ToD65(...t.#o()),t.alpha)};#a(t=!0){const e=[0,0,0,0];return function(t,e){const r=t[0],s=t[1],n=t[2];if(s+n>=1)e[0]=e[1]=e[2]=s/(s+n),e[3]=t[3];else{st([r,1,.5,t[3]],e);for(let t=0;t<3;++t)e[t]+=s-(s+n)*e[t]}}([this.h,this.w,this.b,0],e),t?[e[0],e[1],e[2],this.alpha??void 0]:[e[0],e[1],e[2]]}#o(){const t=this.#a(!1);return A.srgbToXyzd50(t[0],t[1],t[2])}constructor(t,e,r,s,n){if(this.#n=[t,e,r],this.w=Y(e,{min:0,max:1}),this.b=Y(r,{min:0,max:1}),t=lt(1,this.w+this.b)?0:t,this.h=j(360*t)/360,this.alpha=Y(s,{min:0,max:1}),lt(1,this.w+this.b)){const t=this.w/this.b;this.b=1/(1+t),this.w=1-this.b}this.#s=n}equal(t){const e=t.as("hwb");return ot(this.h,e.h)&&ot(this.w,e.w)&&ot(this.b,e.b)&&ot(this.alpha,e.alpha)}asString(t){return t?this.as(t).asString():this.#l(this.h,this.w,this.b)}#l(t,r,s){const n=e.StringUtilities.sprintf("hwb(%sdeg %s% %s%",e.StringUtilities.stringifyWithPrecision(360*t),e.StringUtilities.stringifyWithPrecision(100*r),e.StringUtilities.stringifyWithPrecision(100*s));return null!==this.alpha&&1!==this.alpha?n+e.StringUtilities.sprintf(" / %s%)",e.StringUtilities.stringifyWithPrecision(100*this.alpha)):n+")"}setAlpha(t){return new mt(this.h,this.w,this.b,t,this.#s)}format(){return null===this.alpha||ot(this.alpha,1)?"hwb":"hwba"}as(t){return t===this.format()?this:mt.#i[t](this)}asLegacyColor(){return this.as("rgba")}getAuthoredText(){return this.#s??null}canonicalHWBA(){return[Math.round(360*this.h),Math.round(100*this.w),Math.round(100*this.b),this.alpha??1]}getRawParameters(){return[...this.#n]}getAsRawString(t){return t?this.as(t).getAsRawString():this.#l(...this.#n)}isGamutClipped(){return!(lt(this.#n[1],1)&<(0,this.#n[1])&<(this.#n[2],1)&<(0,this.#n[2]))}static fromSpec(t,e){const r=et(t[0]);if(null===r)return null;const s=rt(t[1]);if(null===s)return null;const n=rt(t[2]);if(null===n)return null;const i=J(t[3]);return new mt(r,s,n,i,e)}}function yt(t){return Math.round(255*t)}class ft{#n;#h;#s;#c;static#i={nickname:t=>new ft(t.#h,"nickname"),hex:t=>new ft(t.#h,"hex"),shorthex:t=>new ft(t.#h,"shorthex"),hexa:t=>new ft(t.#h,"hexa"),shorthexa:t=>new ft(t.#h,"shorthexa"),rgb:t=>new ft(t.#h,"rgb"),rgba:t=>new ft(t.#h,"rgba"),hsl:t=>new pt(...k([t.#h[0],t.#h[1],t.#h[2]]),t.alpha),hsla:t=>new pt(...k([t.#h[0],t.#h[1],t.#h[2]]),t.alpha),hwb:t=>new mt(...B([t.#h[0],t.#h[1],t.#h[2]]),t.alpha),hwba:t=>new mt(...B([t.#h[0],t.#h[1],t.#h[2]]),t.alpha),lch:t=>new ct(...A.labToLch(...A.xyzd50ToLab(...t.#o())),t.alpha),oklch:t=>new gt(...A.xyzd50ToOklch(...t.#o()),t.alpha),lab:t=>new ht(...A.xyzd50ToLab(...t.#o()),t.alpha),oklab:t=>new ut(...A.xyzd65ToOklab(...A.xyzd50ToD65(...t.#o())),t.alpha),srgb:t=>new dt("srgb",...A.xyzd50ToSrgb(...t.#o()),t.alpha),"srgb-linear":t=>new dt("srgb-linear",...A.xyzd50TosRGBLinear(...t.#o()),t.alpha),"display-p3":t=>new dt("display-p3",...A.xyzd50ToDisplayP3(...t.#o()),t.alpha),"a98-rgb":t=>new dt("a98-rgb",...A.xyzd50ToAdobeRGB(...t.#o()),t.alpha),"prophoto-rgb":t=>new dt("prophoto-rgb",...A.xyzd50ToProPhoto(...t.#o()),t.alpha),rec2020:t=>new dt("rec2020",...A.xyzd50ToRec2020(...t.#o()),t.alpha),xyz:t=>new dt("xyz",...A.xyzd50ToD65(...t.#o()),t.alpha),"xyz-d50":t=>new dt("xyz-d50",...t.#o(),t.alpha),"xyz-d65":t=>new dt("xyz-d65",...A.xyzd50ToD65(...t.#o()),t.alpha)};#o(){const[t,e,r]=this.#h;return A.srgbToXyzd50(t,e,r)}get alpha(){switch(this.format()){case"hexa":case"shorthexa":case"rgba":return this.#h[3];default:return null}}asLegacyColor(){return this}constructor(t,e,r){this.#s=r||null,this.#c=e,this.#n=[t[0],t[1],t[2]],this.#h=[Y(t[0],{min:0,max:1}),Y(t[1],{min:0,max:1}),Y(t[2],{min:0,max:1}),Y(t[3]??1,{min:0,max:1})]}static fromHex(t,e){let r;3===(t=t.toLowerCase()).length?(r="shorthex",t=t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)):4===t.length?(r="shorthexa",t=t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)+t.charAt(3)+t.charAt(3)):r=6===t.length?"hex":"hexa";const s=parseInt(t.substring(0,2),16),n=parseInt(t.substring(2,4),16),i=parseInt(t.substring(4,6),16);let a=1;return 8===t.length&&(a=parseInt(t.substring(6,8),16)/255),new ft([s/255,n/255,i/255,a],r,e)}static fromName(t,e){const r=t.toLowerCase(),s=bt.get(r);if(void 0!==s){const t=ft.fromRGBA(s,e);return t.#c="nickname",t}return null}static fromRGBAFunction(t,r,s,n,i){const a=[tt(t),tt(r),tt(s),n?(o=n,Q(o)):1];var o;return e.ArrayUtilities.arrayDoesNotContainNullOrUndefined(a)?new ft(a,n?"rgba":"rgb",i):null}static fromRGBA(t,e){return new ft([t[0]/255,t[1]/255,t[2]/255,t[3]],"rgba",e)}static fromHSVA(t){const e=[0,0,0,0];return nt(t,e),new ft(e,"rgba")}as(t){return t===this.format()?this:ft.#i[t](this)}format(){return this.#c}hasAlpha(){return 1!==this.#h[3]}detectHEXFormat(){let t=!0;for(let e=0;e<4;++e){if(Math.round(255*this.#h[e])%17){t=!1;break}}const e=this.hasAlpha();return t?e?"shorthexa":"shorthex":e?"hexa":"hex"}asString(t){return t?this.as(t).asString():this.#l(t,this.#h[0],this.#h[1],this.#h[2])}#l(t,r,s,n){function i(t){const e=Math.round(255*t).toString(16);return 1===e.length?"0"+e:e}function a(t){return(Math.round(255*t)/17).toString(16)}switch(t||(t=this.#c),t){case"rgb":case"rgba":{const t=e.StringUtilities.sprintf("rgb(%d %d %d",yt(r),yt(s),yt(n));return this.hasAlpha()?t+e.StringUtilities.sprintf(" / %d%)",Math.round(100*this.#h[3])):t+")"}case"hexa":return e.StringUtilities.sprintf("#%s%s%s%s",i(r),i(s),i(n),i(this.#h[3])).toLowerCase();case"hex":return this.hasAlpha()?null:e.StringUtilities.sprintf("#%s%s%s",i(r),i(s),i(n)).toLowerCase();case"shorthexa":{const t=this.detectHEXFormat();return"shorthexa"!==t&&"shorthex"!==t?null:e.StringUtilities.sprintf("#%s%s%s%s",a(r),a(s),a(n),a(this.#h[3])).toLowerCase()}case"shorthex":return this.hasAlpha()||"shorthex"!==this.detectHEXFormat()?null:e.StringUtilities.sprintf("#%s%s%s",a(r),a(s),a(n)).toLowerCase();case"nickname":return this.nickname()}return null}getAuthoredText(){return this.#s??null}getRawParameters(){return[...this.#n]}getAsRawString(t){return t?this.as(t).getAsRawString():this.#l(t,...this.#n)}isGamutClipped(){return!ot(this.#n.map(yt),[this.#h[0],this.#h[1],this.#h[2]].map(yt),1)}rgba(){return[...this.#h]}canonicalRGBA(){const t=new Array(4);for(let e=0;e<3;++e)t[e]=Math.round(255*this.#h[e]);return t[3]=this.#h[3],t}nickname(){return St.get(String(this.canonicalRGBA()))||null}toProtocolRGBA(){const t=this.canonicalRGBA(),e={r:t[0],g:t[1],b:t[2],a:void 0};return 1!==t[3]&&(e.a=t[3]),e}invert(){const t=[0,0,0,0];return t[0]=1-this.#h[0],t[1]=1-this.#h[1],t[2]=1-this.#h[2],t[3]=this.#h[3],new ft(t,"rgba")}setAlpha(t){const e=[...this.#h];return e[3]=t,new ft(e,"rgba")}blendWith(t){const e=P(t.#h,this.#h);return new ft(e,"rgba")}blendWithAlpha(t){const e=[...this.#h];return e[3]*=t,new ft(e,"rgba")}setFormat(t){this.#c=t}equal(t){const e=t.as(this.#c);return ot(yt(this.#h[0]),yt(e.#h[0]),1)&&ot(yt(this.#h[1]),yt(e.#h[1]),1)&&ot(yt(this.#h[2]),yt(e.#h[2]),1)&&ot(this.#h[3],e.#h[3])}}const wt=[["aliceblue",[240,248,255]],["antiquewhite",[250,235,215]],["aqua",[0,255,255]],["aquamarine",[127,255,212]],["azure",[240,255,255]],["beige",[245,245,220]],["bisque",[255,228,196]],["black",[0,0,0]],["blanchedalmond",[255,235,205]],["blue",[0,0,255]],["blueviolet",[138,43,226]],["brown",[165,42,42]],["burlywood",[222,184,135]],["cadetblue",[95,158,160]],["chartreuse",[127,255,0]],["chocolate",[210,105,30]],["coral",[255,127,80]],["cornflowerblue",[100,149,237]],["cornsilk",[255,248,220]],["crimson",[237,20,61]],["cyan",[0,255,255]],["darkblue",[0,0,139]],["darkcyan",[0,139,139]],["darkgoldenrod",[184,134,11]],["darkgray",[169,169,169]],["darkgrey",[169,169,169]],["darkgreen",[0,100,0]],["darkkhaki",[189,183,107]],["darkmagenta",[139,0,139]],["darkolivegreen",[85,107,47]],["darkorange",[255,140,0]],["darkorchid",[153,50,204]],["darkred",[139,0,0]],["darksalmon",[233,150,122]],["darkseagreen",[143,188,143]],["darkslateblue",[72,61,139]],["darkslategray",[47,79,79]],["darkslategrey",[47,79,79]],["darkturquoise",[0,206,209]],["darkviolet",[148,0,211]],["deeppink",[255,20,147]],["deepskyblue",[0,191,255]],["dimgray",[105,105,105]],["dimgrey",[105,105,105]],["dodgerblue",[30,144,255]],["firebrick",[178,34,34]],["floralwhite",[255,250,240]],["forestgreen",[34,139,34]],["fuchsia",[255,0,255]],["gainsboro",[220,220,220]],["ghostwhite",[248,248,255]],["gold",[255,215,0]],["goldenrod",[218,165,32]],["gray",[128,128,128]],["grey",[128,128,128]],["green",[0,128,0]],["greenyellow",[173,255,47]],["honeydew",[240,255,240]],["hotpink",[255,105,180]],["indianred",[205,92,92]],["indigo",[75,0,130]],["ivory",[255,255,240]],["khaki",[240,230,140]],["lavender",[230,230,250]],["lavenderblush",[255,240,245]],["lawngreen",[124,252,0]],["lemonchiffon",[255,250,205]],["lightblue",[173,216,230]],["lightcoral",[240,128,128]],["lightcyan",[224,255,255]],["lightgoldenrodyellow",[250,250,210]],["lightgreen",[144,238,144]],["lightgray",[211,211,211]],["lightgrey",[211,211,211]],["lightpink",[255,182,193]],["lightsalmon",[255,160,122]],["lightseagreen",[32,178,170]],["lightskyblue",[135,206,250]],["lightslategray",[119,136,153]],["lightslategrey",[119,136,153]],["lightsteelblue",[176,196,222]],["lightyellow",[255,255,224]],["lime",[0,255,0]],["limegreen",[50,205,50]],["linen",[250,240,230]],["magenta",[255,0,255]],["maroon",[128,0,0]],["mediumaquamarine",[102,205,170]],["mediumblue",[0,0,205]],["mediumorchid",[186,85,211]],["mediumpurple",[147,112,219]],["mediumseagreen",[60,179,113]],["mediumslateblue",[123,104,238]],["mediumspringgreen",[0,250,154]],["mediumturquoise",[72,209,204]],["mediumvioletred",[199,21,133]],["midnightblue",[25,25,112]],["mintcream",[245,255,250]],["mistyrose",[255,228,225]],["moccasin",[255,228,181]],["navajowhite",[255,222,173]],["navy",[0,0,128]],["oldlace",[253,245,230]],["olive",[128,128,0]],["olivedrab",[107,142,35]],["orange",[255,165,0]],["orangered",[255,69,0]],["orchid",[218,112,214]],["palegoldenrod",[238,232,170]],["palegreen",[152,251,152]],["paleturquoise",[175,238,238]],["palevioletred",[219,112,147]],["papayawhip",[255,239,213]],["peachpuff",[255,218,185]],["peru",[205,133,63]],["pink",[255,192,203]],["plum",[221,160,221]],["powderblue",[176,224,230]],["purple",[128,0,128]],["rebeccapurple",[102,51,153]],["red",[255,0,0]],["rosybrown",[188,143,143]],["royalblue",[65,105,225]],["saddlebrown",[139,69,19]],["salmon",[250,128,114]],["sandybrown",[244,164,96]],["seagreen",[46,139,87]],["seashell",[255,245,238]],["sienna",[160,82,45]],["silver",[192,192,192]],["skyblue",[135,206,235]],["slateblue",[106,90,205]],["slategray",[112,128,144]],["slategrey",[112,128,144]],["snow",[255,250,250]],["springgreen",[0,255,127]],["steelblue",[70,130,180]],["tan",[210,180,140]],["teal",[0,128,128]],["thistle",[216,191,216]],["tomato",[255,99,71]],["turquoise",[64,224,208]],["violet",[238,130,238]],["wheat",[245,222,179]],["white",[255,255,255]],["whitesmoke",[245,245,245]],["yellow",[255,255,0]],["yellowgreen",[154,205,50]],["transparent",[0,0,0,0]]],bt=new Map(wt),St=new Map(wt.map((([t,[e,r,s,n=1]])=>[String([e,r,s,n]),t]))),xt=[127,32,210],Tt={Content:ft.fromRGBA([111,168,220,.66]),ContentLight:ft.fromRGBA([111,168,220,.5]),ContentOutline:ft.fromRGBA([9,83,148]),Padding:ft.fromRGBA([147,196,125,.55]),PaddingLight:ft.fromRGBA([147,196,125,.4]),Border:ft.fromRGBA([255,229,153,.66]),BorderLight:ft.fromRGBA([255,229,153,.5]),Margin:ft.fromRGBA([246,178,107,.66]),MarginLight:ft.fromRGBA([246,178,107,.5]),EventTarget:ft.fromRGBA([255,196,196,.66]),Shape:ft.fromRGBA([96,82,177,.8]),ShapeMargin:ft.fromRGBA([96,82,127,.6]),CssGrid:ft.fromRGBA([75,0,130,1]),LayoutLine:ft.fromRGBA([...xt,1]),GridBorder:ft.fromRGBA([...xt,1]),GapBackground:ft.fromRGBA([...xt,.3]),GapHatch:ft.fromRGBA([...xt,.8]),GridAreaBorder:ft.fromRGBA([26,115,232,1])},Rt={ParentOutline:ft.fromRGBA([224,90,183,1]),ChildOutline:ft.fromRGBA([0,120,212,1])},vt={Resizer:ft.fromRGBA([222,225,230,1]),ResizerHandle:ft.fromRGBA([166,166,166,1]),Mask:ft.fromRGBA([248,249,249,1])};var zt=Object.freeze({__proto__:null,getFormat:function(t){switch(t){case"nickname":return"nickname";case"hex":return"hex";case"shorthex":return"shorthex";case"hexa":return"hexa";case"shorthexa":return"shorthexa";case"rgb":return"rgb";case"rgba":return"rgba";case"hsl":return"hsl";case"hsla":return"hsla";case"hwb":return"hwb";case"hwba":return"hwba";case"lch":return"lch";case"oklch":return"oklch";case"lab":return"lab";case"oklab":return"oklab"}return H(t)},parse:function(t){let e=t.toLowerCase().replace(/\s+/g,"").match(/^(?:#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})|(\w+))$/i);if(e)return e[1]?ft.fromHex(e[1],t):e[2]?ft.fromName(e[2],t):null;if(e=t.toLowerCase().match(/^\s*(?:(rgba?)|(hsla?)|(hwba?)|(lch)|(oklch)|(lab)|(oklab)|(color))\((.*)\)\s*$/),e){const r=Boolean(e[1]),s=Boolean(e[2]),n=Boolean(e[3]),i=Boolean(e[4]),a=Boolean(e[5]),o=Boolean(e[6]),l=Boolean(e[7]),h=Boolean(e[8]),c=e[9];if(h)return dt.fromSpec(t,c);const u=function(t,{allowCommas:e,convertNoneToZero:r}){const s=t.trim();let n=[];e&&(n=s.split(/\s*,\s*/));if(!e||1===n.length)if(n=s.split(/\s+/),"/"===n[3]){if(n.splice(3,1),4!==n.length)return null}else if(n.length>2&&-1!==n[2].indexOf("/")||n.length>3&&-1!==n[3].indexOf("/")){const t=n.slice(2,4).join("");n=n.slice(0,2).concat(t.split(/\//)).concat(n.slice(4))}else if(n.length>=4)return null;if(3!==n.length&&4!==n.length||n.indexOf("")>-1)return null;if(r)return n.map((t=>"none"===t?"0":t));return n}(c,{allowCommas:r||s,convertNoneToZero:!(r||s||n)});if(!u)return null;const g=[u[0],u[1],u[2],u[3]];if(r)return ft.fromRGBAFunction(u[0],u[1],u[2],u[3],t);if(s)return pt.fromSpec(g,t);if(n)return mt.fromSpec(g,t);if(i)return ct.fromSpec(g,t);if(a)return gt.fromSpec(g,t);if(o)return ht.fromSpec(g,t);if(l)return ut.fromSpec(g,t)}return null},hsl2rgb:st,hsva2rgba:nt,rgb2hsv:function(t){const e=k(t),r=e[0];let s=e[1];const n=e[2];return s*=n<.5?n:1-n,[r,0!==s?2*s/(n+s):0,n+s]},desiredLuminance:it,approachColorValue:at,findFgColorForContrast:function(t,e,r){const s=t.as("hsl").hsva(),n=e.rgba(),i=t=>C(P(ft.fromHSVA(t).rgba(),n)),a=C(e.rgba()),o=it(a,r,i(s)>a);return at(s,0,2,o,i)?ft.fromHSVA(s):(s[2]=1,at(s,0,1,o,i)?ft.fromHSVA(s):null)},findFgColorForContrastAPCA:function(t,e,r){const s=t.as("hsl").hsva(),n=(e.rgba(),t=>N(ft.fromHSVA(t).rgba())),i=N(e.rgba()),a=M(i,r,n(s)>=i);if(at(s,0,2,a,n)){const t=ft.fromHSVA(s);if(Math.abs(G(e.rgba(),t.rgba()))>=r)return t}if(s[2]=1,at(s,0,1,a,n)){const t=ft.fromHSVA(s);if(Math.abs(G(e.rgba(),t.rgba()))>=r)return t}return null},Lab:ht,LCH:ct,Oklab:ut,Oklch:gt,ColorFunction:dt,HSL:pt,HWB:mt,Legacy:ft,Regex:/((?:rgba?|hsla?|hwba?|lab|lch|oklab|oklch|color)\([^)]+\)|#[0-9a-fA-F]{8}|#[0-9a-fA-F]{6}|#[0-9a-fA-F]{3,4}|\b[a-zA-Z]+\b(?!-))/g,ColorMixRegex:/color-mix\(.*,\s*(?.+)\s*,\s*(?.+)\s*\)/g,Nicknames:bt,PageHighlight:Tt,SourceOrderHighlight:Rt,IsolationModeHighlight:vt,Generator:class{#u;#g;#d;#p;#m;constructor(t,e,r,s){this.#u=t||{min:0,max:360,count:void 0},this.#g=e||67,this.#d=r||80,this.#p=s||1,this.#m=new Map}setColorForID(t,e){this.#m.set(t,e)}colorForID(t){let e=this.#m.get(t);return e||(e=this.generateColorForID(t),this.#m.set(t,e)),e}generateColorForID(t){const r=e.StringUtilities.hashCode(t),s=this.indexToValueInSpace(r,this.#u),n=this.indexToValueInSpace(r>>8,this.#g),i=this.indexToValueInSpace(r>>16,this.#d),a=this.indexToValueInSpace(r>>24,this.#p),o=`hsl(${s}deg ${n}% ${i}%`;return 1!==a?`${o} / ${Math.floor(100*a)}%)`:`${o})`}indexToValueInSpace(t,e){if("number"==typeof e)return e;const r=e.count||e.max-e.min;return t%=r,e.min+Math.floor(t/(r-1)*(e.max-e.min))}}});class At{listeners;addEventListener(t,e,r){this.listeners||(this.listeners=new Map);let s=this.listeners.get(t);return s||(s=new Set,this.listeners.set(t,s)),s.add({thisObject:r,listener:e}),{eventTarget:this,eventType:t,thisObject:r,listener:e}}once(t){return new Promise((e=>{const r=this.addEventListener(t,(s=>{this.removeEventListener(t,r.listener),e(s.data)}))}))}removeEventListener(t,e,r){const s=this.listeners?.get(t);if(s){for(const t of s)t.listener===e&&t.thisObject===r&&(t.disposed=!0,s.delete(t));s.size||this.listeners?.delete(t)}}hasEventListeners(t){return Boolean(this.listeners&&this.listeners.has(t))}dispatchEventToListeners(t,...[e]){const r=this.listeners?.get(t);if(!r)return;const s={data:e,source:this};for(const t of[...r])t.disposed||t.listener.call(t.thisObject,s)}}var It=Object.freeze({__proto__:null,ObjectWrapper:At,eventMixin:function(t){return class extends t{#y=new At;addEventListener(t,e,r){return this.#y.addEventListener(t,e,r)}once(t){return this.#y.once(t)}removeEventListener(t,e,r){this.#y.removeEventListener(t,e,r)}hasEventListeners(t){return this.#y.hasEventListeners(t)}dispatchEventToListeners(t,...e){this.#y.dispatchEventToListeners(t,...e)}}}});const Pt={elementsPanel:"Elements panel",stylesSidebar:"styles sidebar",changesDrawer:"Changes drawer",issuesView:"Issues view",networkPanel:"Network panel",applicationPanel:"Application panel",sourcesPanel:"Sources panel"},Et=r.i18n.registerUIStrings("core/common/Revealer.ts",Pt),kt=r.i18n.getLazilyComputedLocalizedString.bind(void 0,Et);let Lt=async function(t,e){if(!t)return Promise.reject(new Error("Can't reveal "+t));const r=await Promise.all(Ot(t).map((t=>t.loadRevealer())));return r.length?function(r){const s=[];for(let n=0;n{clearTimeout(r),r=window.setTimeout((()=>t()),e)}}});var Dt=Object.freeze({__proto__:null,removeEventListeners:function(t){for(const e of t)e.eventTarget.removeEventListener(e.eventType,e.listener,e.thisObject);t.splice(0)},fireEvent:function(t,e={},r=window){const s=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:e});r.dispatchEvent(s)}}),Ut=Object.freeze({__proto__:null});const jt=Symbol("uninitialized"),$t=Symbol("error");var Ht=Object.freeze({__proto__:null,lazy:function(t){let e=jt,r=null;return()=>{if(e===$t)throw r;if(e!==jt)return e;try{return e=t(),e}catch(t){throw r=t,e=$t,r}}}});const qt=[];function Yt(t){return qt.filter((function(e){if(!e.contextTypes)return!0;for(const r of e.contextTypes())if(t instanceof r)return!0;return!1}))}var Zt=Object.freeze({__proto__:null,Linkifier:class{static async linkify(t,e){if(!t)throw new Error("Can't linkify "+t);const r=Yt(t)[0];if(!r)throw new Error("No linkifiers registered for object "+t);return(await r.loadLinkifier()).linkify(t,e)}},registerLinkifier:function(t){qt.push(t)},getApplicableRegisteredlinkifiers:Yt});var Kt=Object.freeze({__proto__:null,Mutex:class{#w=!1;#b=[];acquire(){const t={resolved:!1};return this.#w?new Promise((e=>{this.#b.push((()=>e(this.#S.bind(this,t))))})):(this.#w=!0,Promise.resolve(this.#S.bind(this,t)))}#S(t){if(t.resolved)throw new Error("Cannot release more than once.");t.resolved=!0;const e=this.#b.shift();e?e():this.#w=!1}async run(t){const e=await this.acquire();try{return await t()}finally{e()}}}});function Jt(t){if(-1===t.indexOf("..")&&-1===t.indexOf("."))return t;const e=("/"===t[0]?t.substring(1):t).split("/"),r=[];for(const t of e)"."!==t&&(".."===t?r.pop():r.push(t));let s=r.join("/");return"/"===t[0]&&s&&(s="/"+s),"/"===s[s.length-1]||"/"!==t[t.length-1]&&"."!==e[e.length-1]&&".."!==e[e.length-1]||(s+="/"),s}class Qt{isValid;url;scheme;user;host;port;path;queryParams;fragment;folderPathComponents;lastPathComponent;blobInnerScheme;#x;#T;constructor(t){this.isValid=!1,this.url=t,this.scheme="",this.user="",this.host="",this.port="",this.path="",this.queryParams="",this.fragment="",this.folderPathComponents="",this.lastPathComponent="";const e=this.url.startsWith("blob:"),r=(e?t.substring(5):t).match(Qt.urlRegex());if(r)this.isValid=!0,e?(this.blobInnerScheme=r[2].toLowerCase(),this.scheme="blob"):this.scheme=r[2].toLowerCase(),this.user=r[3]??"",this.host=r[4]??"",this.port=r[5]??"",this.path=r[6]??"/",this.queryParams=r[7]??"",this.fragment=r[8]??"";else{if(this.url.startsWith("data:"))return void(this.scheme="data");if(this.url.startsWith("blob:"))return void(this.scheme="blob");if("about:blank"===this.url)return void(this.scheme="about");this.path=this.url}const s=this.path.lastIndexOf("/");-1!==s?(this.folderPathComponents=this.path.substring(0,s),this.lastPathComponent=this.path.substring(s+1)):this.lastPathComponent=this.path}static fromString(t){const e=new Qt(t.toString());return e.isValid?e:null}static preEncodeSpecialCharactersInPath(t){for(const e of["%",";","#","?"," "])t=t.replaceAll(e,encodeURIComponent(e));return t}static rawPathToEncodedPathString(t){const e=Qt.preEncodeSpecialCharactersInPath(t);return t.startsWith("/")?new URL(e,"file:///").pathname:new URL("/"+e,"file:///").pathname.substr(1)}static encodedFromParentPathAndName(t,e){return Qt.concatenate(t,"/",Qt.preEncodeSpecialCharactersInPath(e))}static urlFromParentUrlAndName(t,e){return Qt.concatenate(t,"/",Qt.preEncodeSpecialCharactersInPath(e))}static encodedPathToRawPathString(t){return decodeURIComponent(t)}static rawPathToUrlString(t){let e=Qt.preEncodeSpecialCharactersInPath(t.replace(/\\/g,"/"));return e=e.replace(/\\/g,"/"),e.startsWith("file://")||(e=e.startsWith("/")?"file://"+e:"file:///"+e),new URL(e).toString()}static relativePathToUrlString(t,e){const r=Qt.preEncodeSpecialCharactersInPath(t.replace(/\\/g,"/"));return new URL(r,e).toString()}static urlToRawPathString(t,e){console.assert(t.startsWith("file://"),"This must be a file URL.");const r=decodeURIComponent(t);return e?r.substr("file:///".length).replace(/\//g,"\\"):r.substr("file://".length)}static sliceUrlToEncodedPathString(t,e){return t.substring(e)}static substr(t,e,r){return t.substr(e,r)}static substring(t,e,r){return t.substring(e,r)}static prepend(t,e){return t+e}static concatenate(t,...e){return t.concat(...e)}static trim(t){return t.trim()}static slice(t,e,r){return t.slice(e,r)}static join(t,e){return t.join(e)}static split(t,e,r){return t.split(e,r)}static toLowerCase(t){return t.toLowerCase()}static isValidUrlString(t){return new Qt(t).isValid}static urlWithoutHash(t){const e=t.indexOf("#");return-1!==e?t.substr(0,e):t}static urlRegex(){if(Qt.urlRegexInstance)return Qt.urlRegexInstance;return Qt.urlRegexInstance=new RegExp("^("+/([A-Za-z][A-Za-z0-9+.-]*):\/\//.source+/(?:([A-Za-z0-9\-._~%!$&'()*+,;=:]*)@)?/.source+/((?:\[::\d?\])|(?:[^\s\/:]*))/.source+/(?::([\d]+))?/.source+")"+/(\/[^#?]*)?/.source+/(?:\?([^#]*))?/.source+/(?:#(.*))?/.source+"$"),Qt.urlRegexInstance}static extractPath(t){const e=this.fromString(t);return e?e.path:""}static extractOrigin(t){const r=this.fromString(t);return r?r.securityOrigin():e.DevToolsPath.EmptyUrlString}static extractExtension(t){const e=(t=Qt.urlWithoutHash(t)).indexOf("?");-1!==e&&(t=t.substr(0,e));const r=t.lastIndexOf("/");-1!==r&&(t=t.substr(r+1));const s=t.lastIndexOf(".");if(-1!==s){const e=(t=t.substr(s+1)).indexOf("%");return-1!==e?t.substr(0,e):t}return""}static extractName(t){let e=t.lastIndexOf("/");const r=-1!==e?t.substr(e+1):t;return e=r.indexOf("?"),e<0?r:r.substr(0,e)}static completeURL(t,e){const r=e.trim();if(r.startsWith("data:")||r.startsWith("blob:")||r.startsWith("javascript:")||r.startsWith("mailto:"))return e;const s=this.fromString(r);if(s&&s.scheme){return s.securityOrigin()+Jt(s.path)+(s.queryParams&&`?${s.queryParams}`)+(s.fragment&&`#${s.fragment}`)}const n=this.fromString(t);if(!n)return null;if(n.isDataURL())return e;if(e.length>1&&"/"===e.charAt(0)&&"/"===e.charAt(1))return n.scheme+":"+e;const i=n.securityOrigin(),a=n.path,o=n.queryParams?"?"+n.queryParams:"";if(!e.length)return i+a+o;if("#"===e.charAt(0))return i+a+o+e;if("?"===e.charAt(0))return i+a+e;const l=e.match(/^[^#?]*/);if(!l||!e.length)throw new Error("Invalid href");let h=l[0];const c=e.substring(h.length);return"/"!==h.charAt(0)&&(h=n.folderPathComponents+"/"+h),i+Jt(h)+c}static splitLineAndColumn(t){const e=t.match(Qt.urlRegex());let r="",s=t;e&&(r=e[1],s=t.substring(e[1].length));const n=/(?::(\d+))?(?::(\d+))?$/.exec(s);let i,a;if(console.assert(Boolean(n)),!n)return{url:t,lineNumber:0,columnNumber:0};"string"==typeof n[1]&&(i=parseInt(n[1],10),i=isNaN(i)?void 0:i-1),"string"==typeof n[2]&&(a=parseInt(n[2],10),a=isNaN(a)?void 0:a-1);let o=r+s.substring(0,s.length-n[0].length);if(void 0===n[1]&&void 0===n[2]){const t=/wasm-function\[\d+\]:0x([a-z0-9]+)$/g.exec(s);t&&"string"==typeof t[1]&&(o=Qt.removeWasmFunctionInfoFromURL(o),a=parseInt(t[1],16),a=isNaN(a)?void 0:a)}return{url:o,lineNumber:i,columnNumber:a}}static removeWasmFunctionInfoFromURL(t){const e=t.search(/:wasm-function\[\d+\]/);return-1===e?t:Qt.substring(t,0,e)}static beginsWithWindowsDriveLetter(t){return/^[A-Za-z]:/.test(t)}static beginsWithScheme(t){return/^[A-Za-z][A-Za-z0-9+.-]*:/.test(t)}static isRelativeURL(t){return!this.beginsWithScheme(t)||this.beginsWithWindowsDriveLetter(t)}get displayName(){return this.#x?this.#x:this.isDataURL()?this.dataURLDisplayName():this.isBlobURL()||this.isAboutBlank()?this.url:(this.#x=this.lastPathComponent,this.#x||(this.#x=(this.host||"")+"/"),"/"===this.#x&&(this.#x=this.url),this.#x)}dataURLDisplayName(){return this.#T?this.#T:this.isDataURL()?(this.#T=e.StringUtilities.trimEndWithMaxLength(this.url,20),this.#T):""}isAboutBlank(){return"about:blank"===this.url}isDataURL(){return"data"===this.scheme}isHttpOrHttps(){return"http"===this.scheme||"https"===this.scheme}isBlobURL(){return this.url.startsWith("blob:")}lastPathComponentWithFragment(){return this.lastPathComponent+(this.fragment?"#"+this.fragment:"")}domain(){return this.isDataURL()?"data:":this.host+(this.port?":"+this.port:"")}securityOrigin(){if(this.isDataURL())return"data:";return(this.isBlobURL()?this.blobInnerScheme:this.scheme)+"://"+this.domain()}urlWithoutScheme(){return this.scheme&&this.url.startsWith(this.scheme+"://")?this.url.substring(this.scheme.length+3):this.url}static urlRegexInstance=null}var te=Object.freeze({__proto__:null,normalizePath:Jt,ParsedURL:Qt});class ee{#R;#v;#z;#A;constructor(t,e){this.#R=t,this.#v=e||1,this.#z=0,this.#A=0}isCanceled(){return this.#R.parent.isCanceled()}setTitle(t){this.#R.parent.setTitle(t)}done(){this.setWorked(this.#A),this.#R.childDone()}setTotalWork(t){this.#A=t,this.#R.update()}setWorked(t,e){this.#z=t,void 0!==e&&this.setTitle(e),this.#R.update()}incrementWorked(t){this.setWorked(this.#z+(t||1))}getWeight(){return this.#v}getWorked(){return this.#z}getTotalWork(){return this.#A}}var re=Object.freeze({__proto__:null,Progress:class{setTotalWork(t){}setTitle(t){}setWorked(t,e){}incrementWorked(t){}done(){}isCanceled(){return!1}},CompositeProgress:class{parent;#I;#P;constructor(t){this.parent=t,this.#I=[],this.#P=0,this.parent.setTotalWork(1),this.parent.setWorked(0)}childDone(){++this.#P===this.#I.length&&this.parent.done()}createSubProgress(t){const e=new ee(this,t);return this.#I.push(e),e}update(){let t=0,e=0;for(let r=0;r{};return this.getOrCreatePromise(t).catch(r).then((t=>{t&&e(t)})),null}return r}clear(){this.stopListening();for(const[t,{reject:e}]of this.#L.entries())e(new Error(`Object with ${t} never resolved.`));this.#L.clear()}getOrCreatePromise(t){const e=this.#L.get(t);if(e)return e.promise;let r=()=>{},s=()=>{};const n=new Promise(((t,e)=>{r=t,s=e}));return this.#L.set(t,{promise:n,resolve:r,reject:s}),this.startListening(),n}onResolve(t,e){const r=this.#L.get(t);this.#L.delete(t),0===this.#L.size&&this.stopListening(),r?.resolve(e)}}});const ie={xhrAndFetch:"`XHR` and `Fetch`",scripts:"Scripts",js:"JS",stylesheets:"Stylesheets",css:"CSS",images:"Images",img:"Img",media:"Media",fonts:"Fonts",font:"Font",documents:"Documents",doc:"Doc",websockets:"WebSockets",ws:"WS",webassembly:"WebAssembly",wasm:"Wasm",manifest:"Manifest",other:"Other",document:"Document",stylesheet:"Stylesheet",image:"Image",script:"Script",texttrack:"TextTrack",fetch:"Fetch",eventsource:"EventSource",websocket:"WebSocket",webtransport:"WebTransport",signedexchange:"SignedExchange",ping:"Ping",cspviolationreport:"CSPViolationReport",preflight:"Preflight",webbundle:"WebBundle"},ae=r.i18n.registerUIStrings("core/common/ResourceType.ts",ie),oe=r.i18n.getLazilyComputedLocalizedString.bind(void 0,ae);class le{#B;#O;#C;#N;constructor(t,e,r,s){this.#B=t,this.#O=e,this.#C=r,this.#N=s}static fromMimeType(t){return t?t.startsWith("text/html")?ue.Document:t.startsWith("text/css")?ue.Stylesheet:t.startsWith("image/")?ue.Image:t.startsWith("text/")?ue.Script:t.includes("font")?ue.Font:t.includes("script")?ue.Script:t.includes("octet")?ue.Other:t.includes("application")?ue.Script:ue.Other:ue.Other}static fromMimeTypeOverride(t){return"application/manifest+json"===t?ue.Manifest:"application/wasm"===t?ue.Wasm:"application/webbundle"===t?ue.WebBundle:null}static fromURL(t){return de.get(Qt.extractExtension(t))||null}static fromName(t){for(const e in ue){const r=ue[e];if(r.name()===t)return r}return null}static mimeFromURL(t){const e=Qt.extractName(t);if(ge.has(e))return ge.get(e);let r=Qt.extractExtension(t).toLowerCase();return"html"===r&&e.endsWith(".component.html")&&(r="component.html"),pe.get(r)}static mimeFromExtension(t){return pe.get(t)}static mediaTypeForMetrics(t,e,r){return"text/javascript"!==t?t:e?"text/javascript+sourcemapped":r?"text/javascript+minified":"text/javascript+plain"}name(){return this.#B}title(){return this.#O()}category(){return this.#C}isTextType(){return this.#N}isScript(){return"script"===this.#B||"sm-script"===this.#B}hasScripts(){return this.isScript()||this.isDocument()}isStyleSheet(){return"stylesheet"===this.#B||"sm-stylesheet"===this.#B}hasStyleSheets(){return this.isStyleSheet()||this.isDocument()}isDocument(){return"document"===this.#B}isDocumentOrScriptOrStyleSheet(){return this.isDocument()||this.isScript()||this.isStyleSheet()}isFont(){return"font"===this.#B}isImage(){return"image"===this.#B}isFromSourceMap(){return this.#B.startsWith("sm-")}isWebbundle(){return"webbundle"===this.#B}toString(){return this.#B}canonicalMimeType(){return this.isDocument()?"text/html":this.isScript()?"text/javascript":this.isStyleSheet()?"text/css":""}}class he{title;shortTitle;constructor(t,e){this.title=t,this.shortTitle=e}}const ce={XHR:new he(oe(ie.xhrAndFetch),r.i18n.lockedLazyString("Fetch/XHR")),Script:new he(oe(ie.scripts),oe(ie.js)),Stylesheet:new he(oe(ie.stylesheets),oe(ie.css)),Image:new he(oe(ie.images),oe(ie.img)),Media:new he(oe(ie.media),oe(ie.media)),Font:new he(oe(ie.fonts),oe(ie.font)),Document:new he(oe(ie.documents),oe(ie.doc)),WebSocket:new he(oe(ie.websockets),oe(ie.ws)),Wasm:new he(oe(ie.webassembly),oe(ie.wasm)),Manifest:new he(oe(ie.manifest),oe(ie.manifest)),Other:new he(oe(ie.other),oe(ie.other))},ue={Document:new le("document",oe(ie.document),ce.Document,!0),Stylesheet:new le("stylesheet",oe(ie.stylesheet),ce.Stylesheet,!0),Image:new le("image",oe(ie.image),ce.Image,!1),Media:new le("media",oe(ie.media),ce.Media,!1),Font:new le("font",oe(ie.font),ce.Font,!1),Script:new le("script",oe(ie.script),ce.Script,!0),TextTrack:new le("texttrack",oe(ie.texttrack),ce.Other,!0),XHR:new le("xhr",r.i18n.lockedLazyString("XHR"),ce.XHR,!0),Fetch:new le("fetch",oe(ie.fetch),ce.XHR,!0),Prefetch:new le("prefetch",r.i18n.lockedLazyString("Prefetch"),ce.Document,!0),EventSource:new le("eventsource",oe(ie.eventsource),ce.XHR,!0),WebSocket:new le("websocket",oe(ie.websocket),ce.WebSocket,!1),WebTransport:new le("webtransport",oe(ie.webtransport),ce.WebSocket,!1),Wasm:new le("wasm",oe(ie.wasm),ce.Wasm,!1),Manifest:new le("manifest",oe(ie.manifest),ce.Manifest,!0),SignedExchange:new le("signed-exchange",oe(ie.signedexchange),ce.Other,!1),Ping:new le("ping",oe(ie.ping),ce.Other,!1),CSPViolationReport:new le("csp-violation-report",oe(ie.cspviolationreport),ce.Other,!1),Other:new le("other",oe(ie.other),ce.Other,!1),Preflight:new le("preflight",oe(ie.preflight),ce.Other,!0),SourceMapScript:new le("sm-script",oe(ie.script),ce.Script,!0),SourceMapStyleSheet:new le("sm-stylesheet",oe(ie.stylesheet),ce.Stylesheet,!0),WebBundle:new le("webbundle",oe(ie.webbundle),ce.Other,!1)},ge=new Map([["Cakefile","text/x-coffeescript"]]),de=new Map([["js",ue.Script],["mjs",ue.Script],["css",ue.Stylesheet],["xsl",ue.Stylesheet],["avif",ue.Image],["bmp",ue.Image],["gif",ue.Image],["ico",ue.Image],["jpeg",ue.Image],["jpg",ue.Image],["jxl",ue.Image],["png",ue.Image],["svg",ue.Image],["tif",ue.Image],["tiff",ue.Image],["vue",ue.Document],["webmanifest",ue.Manifest],["webp",ue.Media],["otf",ue.Font],["ttc",ue.Font],["ttf",ue.Font],["woff",ue.Font],["woff2",ue.Font],["wasm",ue.Wasm]]),pe=new Map([["js","text/javascript"],["mjs","text/javascript"],["css","text/css"],["html","text/html"],["htm","text/html"],["xml","application/xml"],["xsl","application/xml"],["wasm","application/wasm"],["webmanifest","application/manifest+json"],["asp","application/x-aspx"],["aspx","application/x-aspx"],["jsp","application/x-jsp"],["c","text/x-c++src"],["cc","text/x-c++src"],["cpp","text/x-c++src"],["h","text/x-c++src"],["m","text/x-c++src"],["mm","text/x-c++src"],["coffee","text/x-coffeescript"],["dart","application/vnd.dart"],["ts","text/typescript"],["tsx","text/typescript-jsx"],["json","application/json"],["gyp","application/json"],["gypi","application/json"],["map","application/json"],["cs","text/x-csharp"],["go","text/x-go"],["java","text/x-java"],["kt","text/x-kotlin"],["scala","text/x-scala"],["less","text/x-less"],["php","application/x-httpd-php"],["phtml","application/x-httpd-php"],["py","text/x-python"],["sh","text/x-sh"],["gss","text/x-gss"],["sass","text/x-sass"],["scss","text/x-scss"],["vtt","text/vtt"],["ls","text/x-livescript"],["md","text/markdown"],["cljs","text/x-clojure"],["cljc","text/x-clojure"],["cljx","text/x-clojure"],["styl","text/x-styl"],["jsx","text/jsx"],["avif","image/avif"],["bmp","image/bmp"],["gif","image/gif"],["ico","image/ico"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["jxl","image/jxl"],["png","image/png"],["svg","image/svg+xml"],["tif","image/tif"],["tiff","image/tiff"],["webp","image/webp"],["otf","font/otf"],["ttc","font/collection"],["ttf","font/ttf"],["woff","font/woff"],["woff2","font/woff2"],["component.html","text/x.angular"],["svelte","text/x.svelte"],["vue","text/x.vue"]]);var me=Object.freeze({__proto__:null,ResourceType:le,ResourceCategory:he,resourceCategories:ce,resourceTypes:ue,resourceTypeByExtension:de,mimeTypeByExtension:pe});const ye=new Map;const fe=[];var we=Object.freeze({__proto__:null,registerLateInitializationRunnable:function(t){const{id:e,loadRunnable:r}=t;if(ye.has(e))throw new Error(`Duplicate late Initializable runnable id '${e}'`);ye.set(e,r)},maybeRemoveLateInitializationRunnable:function(t){return ye.delete(t)},lateInitializationRunnables:function(){return[...ye.values()]},registerEarlyInitializationRunnable:function(t){fe.push(t)},earlyInitializationRunnables:function(){return fe}});class be{begin;end;data;constructor(t,e,r){if(t>e)throw new Error("Invalid segment");this.begin=t,this.end=e,this.data=r}intersects(t){return this.begint.begin-e.begin)),s=r,n=null;if(r>0){const e=this.#G[r-1];n=this.tryMerge(e,t),n?(--r,t=n):this.#G[r-1].end>=t.begin&&(t.endthis.append(t)))}segments(){return this.#G}tryMerge(t,e){const r=this.#_&&this.#_(t,e);return r?(r.begin=t.begin,r.end=Math.max(t.end,e.end),r):null}}});const xe={elements:"Elements",appearance:"Appearance",sources:"Sources",network:"Network",performance:"Performance",console:"Console",persistence:"Persistence",debugger:"Debugger",global:"Global",rendering:"Rendering",grid:"Grid",mobile:"Mobile",memory:"Memory",extension:"Extension",adorner:"Adorner",sync:"Sync"},Te=r.i18n.registerUIStrings("core/common/SettingRegistration.ts",xe),Re=r.i18n.getLocalizedString.bind(void 0,Te);let ve=[];const ze=new Set;function Ae(t){const e=t.settingName;if(ze.has(e))throw new Error(`Duplicate setting name '${e}'`);ze.add(e),ve.push(t)}function Ie(){return ve.filter((e=>t.Runtime.Runtime.isDescriptorEnabled({experiment:e.experiment,condition:e.condition})))}function Pe(t,e=!1){if(0===ve.length||e){ve=t,ze.clear();for(const e of t){const t=e.settingName;if(ze.has(t))throw new Error(`Duplicate setting name '${t}'`);ze.add(t)}}}function Ee(){ve=[],ze.clear()}function ke(t){const e=ve.findIndex((e=>e.settingName===t));return!(e<0||!ze.delete(t))&&(ve.splice(e,1),!0)}var Le,Be;function Oe(t){switch(t){case Le.ELEMENTS:return Re(xe.elements);case Le.APPEARANCE:return Re(xe.appearance);case Le.SOURCES:return Re(xe.sources);case Le.NETWORK:return Re(xe.network);case Le.PERFORMANCE:return Re(xe.performance);case Le.CONSOLE:return Re(xe.console);case Le.PERSISTENCE:return Re(xe.persistence);case Le.DEBUGGER:return Re(xe.debugger);case Le.GLOBAL:return Re(xe.global);case Le.RENDERING:return Re(xe.rendering);case Le.GRID:return Re(xe.grid);case Le.MOBILE:return Re(xe.mobile);case Le.EMULATION:return Re(xe.console);case Le.MEMORY:return Re(xe.memory);case Le.EXTENSIONS:return Re(xe.extension);case Le.ADORNER:return Re(xe.adorner);case Le.NONE:return r.i18n.lockedString("");case Le.SYNC:return Re(xe.sync)}}!function(t){t.NONE="",t.ELEMENTS="ELEMENTS",t.APPEARANCE="APPEARANCE",t.SOURCES="SOURCES",t.NETWORK="NETWORK",t.PERFORMANCE="PERFORMANCE",t.CONSOLE="CONSOLE",t.PERSISTENCE="PERSISTENCE",t.DEBUGGER="DEBUGGER",t.GLOBAL="GLOBAL",t.RENDERING="RENDERING",t.GRID="GRID",t.MOBILE="MOBILE",t.EMULATION="EMULATION",t.MEMORY="MEMORY",t.EXTENSIONS="EXTENSIONS",t.ADORNER="ADORNER",t.SYNC="SYNC"}(Le||(Le={})),function(t){t.ARRAY="array",t.REGEX="regex",t.ENUM="enum",t.BOOLEAN="boolean"}(Be||(Be={}));var Ce=Object.freeze({__proto__:null,registerSettingExtension:Ae,getRegisteredSettings:Ie,registerSettingsForTest:Pe,resetSettings:Ee,maybeRemoveSettingExtension:ke,get SettingCategory(){return Le},getLocalizedSettingsCategory:Oe,get SettingType(){return Be}});let Ne;class Ge{syncedStorage;globalStorage;localStorage;#V;settingNameSet;orderValuesBySettingCategory;#M;#W;moduleSettings;constructor(e,r,s){this.syncedStorage=e,this.globalStorage=r,this.localStorage=s,this.#V=new Ve({}),this.settingNameSet=new Set,this.orderValuesBySettingCategory=new Map,this.#M=new At,this.#W=new Map,this.moduleSettings=new Map;for(const e of Ie()){const{settingName:r,defaultValue:s,storageType:n}=e,i=e.settingType===Be.REGEX&&"string"==typeof s?this.createRegExpSetting(r,s,void 0,n):this.createSetting(r,s,n);"mac"===t.Runtime.Runtime.platform()&&e.titleMac?i.setTitleFunction(e.titleMac):i.setTitleFunction(e.title),e.userActionCondition&&i.setRequiresUserAction(Boolean(t.Runtime.Runtime.queryParam(e.userActionCondition))),i.setRegistration(e),this.registerModuleSetting(i)}}static hasInstance(){return void 0!==Ne}static instance(t={forceNew:null,syncedStorage:null,globalStorage:null,localStorage:null}){const{forceNew:e,syncedStorage:r,globalStorage:s,localStorage:n}=t;if(!Ne||e){if(!r||!s||!n)throw new Error(`Unable to create settings: global and local storage must be provided: ${(new Error).stack}`);Ne=new Ge(r,s,n)}return Ne}static removeInstance(){Ne=void 0}registerModuleSetting(t){const e=t.name,r=t.category(),s=t.order();if(this.settingNameSet.has(e))throw new Error(`Duplicate Setting name '${e}'`);if(r&&s){const t=this.orderValuesBySettingCategory.get(r)||new Set;if(t.has(s))throw new Error(`Duplicate order value '${s}' for settings category '${r}'`);t.add(s),this.orderValuesBySettingCategory.set(r,t)}this.settingNameSet.add(e),this.moduleSettings.set(t.name,t)}moduleSetting(t){const e=this.moduleSettings.get(t);if(!e)throw new Error("No setting registered: "+t);return e}settingForTest(t){const e=this.#W.get(t);if(!e)throw new Error("No setting registered: "+t);return e}createSetting(t,e,r){const s=this.storageFromType(r);let n=this.#W.get(t);return n||(n=new Xe(t,e,this.#M,s),this.#W.set(t,n)),n}createLocalSetting(t,e){return this.createSetting(t,e,Ue.Local)}createRegExpSetting(t,e,r,s){return this.#W.get(t)||this.#W.set(t,new Fe(t,e,this.#M,this.storageFromType(s),r)),this.#W.get(t)}clearAll(){this.globalStorage.removeAll(),this.syncedStorage.removeAll(),this.localStorage.removeAll(),(new De).resetToCurrent()}storageFromType(t){switch(t){case Ue.Local:return this.localStorage;case Ue.Session:return this.#V;case Ue.Global:return this.globalStorage;case Ue.Synced:return this.syncedStorage}return this.globalStorage}getRegistry(){return this.#W}}const _e={register:()=>{},set:()=>{},get:()=>Promise.resolve(""),remove:()=>{},clear:()=>{}};class Ve{object;backingStore;storagePrefix;constructor(t,e=_e,r=""){this.object=t,this.backingStore=e,this.storagePrefix=r}register(t){t=this.storagePrefix+t,this.backingStore.register(t)}set(t,e){t=this.storagePrefix+t,this.object[t]=e,this.backingStore.set(t,e)}has(t){return(t=this.storagePrefix+t)in this.object}get(t){return t=this.storagePrefix+t,this.object[t]}async forceGet(t){const e=this.storagePrefix+t,r=await this.backingStore.get(e);return r&&r!==this.object[e]?this.set(t,r):r||this.remove(t),r}remove(t){t=this.storagePrefix+t,delete this.object[t],this.backingStore.remove(t)}removeAll(){this.object={},this.backingStore.clear()}dumpSizes(){_t.instance().log("Ten largest settings: ");const t={__proto__:null};for(const e in this.object)t[e]=this.object[e].length;const e=Object.keys(t);e.sort((function(e,r){return t[r]-t[e]}));for(let r=0;r<10&&rt.name===e.experiment)):void 0}}class Xe{name;defaultValue;eventSupport;storage;#X;#O;#F=null;#D;#U;#j=JSON;#$;#H;#q=null;constructor(t,e,r,s){this.name=t,this.defaultValue=e,this.eventSupport=r,this.storage=s,s.register(t)}setSerializer(t){this.#j=t}addChangeListener(t,e){return this.eventSupport.addEventListener(this.name,t,e)}removeChangeListener(t,e){this.eventSupport.removeEventListener(this.name,t,e)}title(){return this.#O?this.#O:this.#X?this.#X():""}setTitleFunction(t){t&&(this.#X=t)}setTitle(t){this.#O=t}setRequiresUserAction(t){this.#D=t}disabled(){return this.#H||!1}setDisabled(t){this.#H=t,this.eventSupport.dispatchEventToListeners(this.name)}get(){if(this.#D&&!this.#$)return this.defaultValue;if(void 0!==this.#U)return this.#U;if(this.#U=this.defaultValue,this.storage.has(this.name))try{this.#U=this.#j.parse(this.storage.get(this.name))}catch(t){this.storage.remove(this.name)}return this.#U}async forceGet(){const t=this.name,e=this.storage.get(t),r=await this.storage.forceGet(t);if(this.#U=this.defaultValue,r)try{this.#U=this.#j.parse(r)}catch(t){this.storage.remove(this.name)}return e!==r&&this.eventSupport.dispatchEventToListeners(this.name,this.#U),this.#U}set(t){this.#$=!0,this.#U=t;try{const e=this.#j.stringify(t);try{this.storage.set(this.name,e)}catch(t){this.printSettingsSavingError(t.message,this.name,e)}}catch(t){_t.instance().error("Cannot stringify setting with name: "+this.name+", error: "+t.message)}this.eventSupport.dispatchEventToListeners(this.name,t)}setRegistration(e){this.#F=e;const{deprecationNotice:r}=e;if(r?.disabled){const e=r.experiment?t.Runtime.experiments.allConfigurableExperiments().find((t=>t.name===r.experiment)):void 0;e&&!e.isEnabled()||(this.set(this.defaultValue),this.setDisabled(!0))}}type(){return this.#F?this.#F.settingType:null}options(){return this.#F&&this.#F.options?this.#F.options.map((t=>{const{value:e,title:r,text:s,raw:n}=t;return{value:e,title:r(),text:"function"==typeof s?s():s,raw:n}})):[]}reloadRequired(){return this.#F&&this.#F.reloadRequired||null}category(){return this.#F&&this.#F.category||null}tags(){return this.#F&&this.#F.tags?this.#F.tags.map((t=>t())).join("\0"):null}order(){return this.#F&&this.#F.order||null}get deprecation(){return this.#F&&this.#F.deprecationNotice?(this.#q||(this.#q=new We(this.#F)),this.#q):null}printSettingsSavingError(t,e,r){const s="Error saving setting with name: "+this.name+", value length: "+r.length+". Error: "+t;console.error(s),_t.instance().error(s),this.storage.dumpSizes()}}class Fe extends Xe{#Y;#Z;constructor(t,e,r,s,n){super(t,e?[{pattern:e}]:[],r,s),this.#Y=n}get(){const t=[],e=this.getAsArray();for(let r=0;r`-url:${t}`)).join(" ");if(e){const t=Ge.instance().createSetting("console.textFilter",""),r=t.get()?` ${t.get()}`:"";t.set(`${e}${r}`)}Me(t)}updateVersionFrom26To27(){function t(t,e,r){const s=Ge.instance().createSetting(t,{}),n=s.get();e in n&&(n[r]=n[e],delete n[e],s.set(n))}t("panel-tabOrder","audits2","audits"),t("panel-closeableTabs","audits2","audits"),function(t,e,r){const s=Ge.instance().createSetting(t,"");s.get()===e&&s.set(r)}("panel-selectedTab","audits2","audits")}updateVersionFrom27To28(){const t=Ge.instance().createSetting("uiTheme","systemPreferred");"default"===t.get()&&t.set("systemPreferred")}updateVersionFrom28To29(){function t(t,e,r){const s=Ge.instance().createSetting(t,{}),n=s.get();e in n&&(n[r]=n[e],delete n[e],s.set(n))}t("panel-tabOrder","audits","lighthouse"),t("panel-closeableTabs","audits","lighthouse"),function(t,e,r){const s=Ge.instance().createSetting(t,"");s.get()===e&&s.set(r)}("panel-selectedTab","audits","lighthouse")}updateVersionFrom29To30(){const t=Ge.instance().createSetting("closeableTabs",{}),e=Ge.instance().createSetting("panel-closeableTabs",{}),r=Ge.instance().createSetting("drawer-view-closeableTabs",{}),s=e.get(),n=e.get(),i=Object.assign(n,s);t.set(i),Me(e),Me(r)}updateVersionFrom30To31(){Me(Ge.instance().createSetting("recorder_recordings",[]))}updateVersionFrom31To32(){const t=Ge.instance().createLocalSetting("breakpoints",[]),e=t.get();for(const t of e)t.resourceTypeName="script";t.set(e)}updateVersionFrom32To33(){const t=Ge.instance().createLocalSetting("previouslyViewedFiles",[]);let e=t.get();e=e.filter((t=>"url"in t));for(const t of e)t.resourceTypeName="script";t.set(e)}updateVersionFrom33To34(){const t=Ge.instance().createLocalSetting("breakpoints",[]),e=t.get();for(const t of e){const e=t.condition.startsWith("/** DEVTOOLS_LOGPOINT */ console.log(")&&t.condition.endsWith(")");t.isLogpoint=e}t.set(e)}updateVersionFrom34To35(){const t=Ge.instance().createLocalSetting("breakpoints",[]),e=t.get();for(const t of e){const{condition:e,isLogpoint:r}=t;r&&(t.condition=e.slice("/** DEVTOOLS_LOGPOINT */ console.log(".length,e.length-")".length))}t.set(e)}migrateSettingsFromLocalStorage(){const t=new Set(["advancedSearchConfig","breakpoints","consoleHistory","domBreakpoints","eventListenerBreakpoints","fileSystemMapping","lastSelectedSourcesSidebarPaneTab","previouslyViewedFiles","savedURLs","watchExpressions","workspaceExcludedFolders","xhrBreakpoints"]);if(window.localStorage)for(const e in window.localStorage){if(t.has(e))continue;const r=window.localStorage[e];window.localStorage.removeItem(e),Ge.instance().globalStorage.set(e,r)}}clearBreakpointsWhenTooMany(t,e){t.get().length>e&&t.set([])}}var Ue;function je(t){return Ge.instance().moduleSetting(t)}!function(t){t.Synced="Synced",t.Global="Global",t.Local="Local",t.Session="Session"}(Ue||(Ue={}));var $e=Object.freeze({__proto__:null,Settings:Ge,NOOP_STORAGE:_e,SettingsStorage:Ve,Deprecation:We,Setting:Xe,RegExpSetting:Fe,VersionController:De,get SettingStorageType(){return Ue},moduleSetting:je,settingForTest:function(t){return Ge.instance().settingForTest(t)},detectColorFormat:function(t){let e;const r=Ge.instance().moduleSetting("colorFormat").get();return e="rgb"===r?"rgb":"hsl"===r?"hsl":"hwb"===r?"hwb":"hex"===r?t.asLegacyColor().detectHEXFormat():t.format(),e},getLocalizedSettingsCategory:Oe,getRegisteredSettings:Ie,maybeRemoveSettingExtension:ke,registerSettingExtension:Ae,get SettingCategory(){return Le},get SettingType(){return Be},registerSettingsForTest:Pe,resetSettings:Ee});var He=Object.freeze({__proto__:null,SimpleHistoryManager:class{#tt;#et;#rt;#st;constructor(t){this.#tt=[],this.#et=-1,this.#rt=0,this.#st=t}readOnlyLock(){++this.#rt}releaseReadOnlyLock(){--this.#rt}getPreviousValidIndex(){if(this.empty())return-1;let t=this.#et-1;for(;t>=0&&!this.#tt[t].valid();)--t;return t<0?-1:t}getNextValidIndex(){let t=this.#et+1;for(;t=this.#tt.length?-1:t}readOnly(){return Boolean(this.#rt)}filterOut(t){if(this.readOnly())return;const e=[];let r=0;for(let s=0;sthis.#st&&this.#tt.shift(),this.#et=this.#tt.length-1)}canRollback(){return this.getPreviousValidIndex()>=0}canRollover(){return this.getNextValidIndex()>=0}rollback(){const t=this.getPreviousValidIndex();return-1!==t&&(this.readOnlyLock(),this.#et=t,this.#tt[t].reveal(),this.releaseReadOnlyLock(),!0)}rollover(){const t=this.getNextValidIndex();return-1!==t&&(this.readOnlyLock(),this.#et=t,this.#tt[t].reveal(),this.releaseReadOnlyLock(),!0)}}});var qe=Object.freeze({__proto__:null,StringOutputStream:class{#nt;constructor(){this.#nt=""}async write(t){this.#nt+=t}async close(){}data(){return this.#nt}}});class Ye{#it;#at;#ot;#lt;#ht;#ct;#ut;constructor(t){this.#at=0,this.#ut=t,this.clear()}static newStringTrie(){return new Ye({empty:()=>"",append:(t,e)=>t+e,slice:(t,e,r)=>t.slice(e,r)})}static newArrayTrie(){return new Ye({empty:()=>[],append:(t,e)=>t.concat([e]),slice:(t,e,r)=>t.slice(e,r)})}add(t){let e=this.#at;++this.#ht[this.#at];for(let r=0;r{this.#wt=t}))}processCompleted(){this.#yt=this.getTime(),this.#dt=!1,this.#mt&&this.innerSchedule(!1),this.processCompletedForTests()}processCompletedForTests(){}get process(){return this.#mt}onTimeout(){this.#bt=void 0,this.#pt=!1,this.#dt=!0,Promise.resolve().then(this.#mt).catch(console.error.bind(console)).then(this.processCompleted.bind(this)).then(this.#wt),this.#ft=new Promise((t=>{this.#wt=t})),this.#mt=null}schedule(t,e){this.#mt=t;const r=Boolean(this.#bt)||this.#dt,s=this.getTime()-this.#yt>this.#gt,n=(e=Boolean(e)||!r&&s)&&!this.#pt;return this.#pt=this.#pt||e,this.innerSchedule(n),this.#ft}innerSchedule(t){if(this.#dt)return;if(this.#bt&&!t)return;this.#bt&&this.clearTimeout(this.#bt);const e=this.#pt?0:this.#gt;this.#bt=this.setTimeout(this.onTimeout.bind(this),e)}clearTimeout(t){clearTimeout(t)}setTimeout(t,e){return window.setTimeout(t,e)}getTime(){return window.performance.now()}}});var Qe=Object.freeze({__proto__:null,WasmDisassembly:class{lines;#St;#xt;constructor(t,e,r){if(t.length!==e.length)throw new Error("Lines and offsets don't match");this.lines=t,this.#St=e,this.#xt=r}get lineNumbers(){return this.#St.length}bytecodeOffsetToLineNumber(t){return e.ArrayUtilities.upperBound(this.#St,t,e.ArrayUtilities.DEFAULT_COMPARATOR)-1}lineNumberToBytecodeOffset(t){return this.#St[t]}*nonBreakableLineNumbers(){let t=0,e=0;for(;t=this.#xt[e].start){t=this.bytecodeOffsetToLineNumber(this.#xt[e++].end)+1;continue}}yield t++}}}});class tr{#Tt;#Rt;constructor(t){this.#Tt=new Promise((e=>{const r=new Worker(t,{type:"module"});r.onmessage=t=>{console.assert("workerReady"===t.data),r.onmessage=null,e(r)}}))}static fromURL(t){return new tr(t)}postMessage(t){this.#Tt.then((e=>{this.#Rt||e.postMessage(t)}))}dispose(){this.#Rt=!0,this.#Tt.then((t=>t.terminate()))}terminate(){this.dispose()}set onmessage(t){this.#Tt.then((e=>{e.onmessage=t}))}set onerror(t){this.#Tt.then((e=>{e.onerror=t}))}}var er=Object.freeze({__proto__:null,WorkerWrapper:tr});let rr;export{s as App,i as AppProvider,l as Base64,h as CharacterIdMap,zt as Color,I as ColorConverter,U as ColorUtils,Xt as Console,Ft as Debouncer,Dt as EventTarget,Ut as JavaScriptMetaData,Ht as Lazy,Zt as Linkifier,Kt as Mutex,It as ObjectWrapper,te as ParsedURL,re as Progress,se as QueryParamHandler,ne as ResolverBase,me as ResourceType,Nt as Revealer,we as Runnable,Se as SegmentedRange,Ce as SettingRegistration,$e as Settings,He as SimpleHistoryManager,qe as StringOutputStream,Ke as TextDictionary,Je as Throttler,Ze as Trie,Qe as WasmDisassembly,er as Worker,rr as settings}; diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/dom_extension/dom_extension.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/dom_extension/dom_extension.js deleted file mode 100644 index 22e8afd61..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/dom_extension/dom_extension.js +++ /dev/null @@ -1 +0,0 @@ -import*as t from"../platform/platform.js";Node.prototype.traverseNextTextNode=function(t){let e=this.traverseNextNode(t);if(!e)return null;const o={STYLE:1,SCRIPT:1,"#document-fragment":1};for(;e&&(e.nodeType!==Node.TEXT_NODE||o[e.parentNode?e.parentNode.nodeName:""]);)e=e.traverseNextNode(t);return e},Element.prototype.positionAt=function(t,e,o){let n={x:0,y:0};o&&(n=o.boxInWindow(this.ownerDocument.defaultView)),"number"==typeof t?this.style.setProperty("left",n.x+t+"px"):this.style.removeProperty("left"),"number"==typeof e?this.style.setProperty("top",n.y+e+"px"):this.style.removeProperty("top"),"number"==typeof t||"number"==typeof e?this.style.setProperty("position","absolute"):this.style.removeProperty("position")},Node.prototype.enclosingNodeOrSelfWithClass=function(t,e){return this.enclosingNodeOrSelfWithClassList([t],e)},Node.prototype.enclosingNodeOrSelfWithClassList=function(t,e){for(let o=this;o&&o!==e&&o!==this.ownerDocument;o=o.parentNodeOrShadowHost())if(o.nodeType===Node.ELEMENT_NODE){let e=!0;for(let n=0;nt.hasSelection())))return!0}const t=this.getComponentSelection();return"Range"===t.type&&(t.containsNode(this,!0)||t.anchorNode.isSelfOrDescendant(this)||t.focusNode.isSelfOrDescendant(this))},Node.prototype.window=function(){return this.ownerDocument.defaultView},Element.prototype.removeChildren=function(){this.firstChild&&(this.textContent="")},self.createElement=function(t,e){return document.createElement(t,{is:e})},self.createTextNode=function(t){return document.createTextNode(t)},self.createDocumentFragment=function(){return document.createDocumentFragment()},Element.prototype.createChild=function(t,e,o){const n=document.createElement(t,{is:o});return e&&(n.className=e),this.appendChild(n),n},DocumentFragment.prototype.createChild=Element.prototype.createChild,self.AnchorBox=class{constructor(t,e,o,n){this.x=t||0,this.y=e||0,this.width=o||0,this.height=n||0}contains(t,e){return t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height}relativeTo(t){return new AnchorBox(this.x-t.x,this.y-t.y,this.width,this.height)}relativeToElement(t){return this.relativeTo(t.boxInWindow(t.ownerDocument.defaultView))}equals(t){return Boolean(t)&&this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height}},Element.prototype.boxInWindow=function(t){t=t||this.ownerDocument.defaultView;const e=new AnchorBox;let o=this,n=this.ownerDocument.defaultView;for(;n&&o&&(e.x+=o.getBoundingClientRect().left,e.y+=o.getBoundingClientRect().top,n!==t);)o=n.frameElement,n=n.parent;return e.width=Math.min(this.offsetWidth,t.innerWidth-e.x),e.height=Math.min(this.offsetHeight,t.innerHeight-e.y),e},Event.prototype.consume=function(t){this.stopImmediatePropagation(),t&&this.preventDefault(),this.handled=!0},Node.prototype.deepTextContent=function(){return this.childTextNodes().map((function(t){return t.textContent})).join("")},Node.prototype.childTextNodes=function(){let t=this.traverseNextTextNode(this);const e=[],o={STYLE:1,SCRIPT:1,"#document-fragment":1};for(;t;)o[t.parentNode?t.parentNode.nodeName:""]||e.push(t),t=t.traverseNextTextNode(this);return e},Node.prototype.isAncestor=function(t){if(!t)return!1;let e=t.parentNodeOrShadowHost();for(;e;){if(this===e)return!0;e=e.parentNodeOrShadowHost()}return!1},Node.prototype.isDescendant=function(t){return Boolean(t)&&t.isAncestor(this)},Node.prototype.isSelfOrAncestor=function(t){return Boolean(t)&&(t===this||this.isAncestor(t))},Node.prototype.isSelfOrDescendant=function(t){return Boolean(t)&&(t===this||this.isDescendant(t))},Node.prototype.traverseNextNode=function(t,e=!1){if(!e&&this.shadowRoot)return this.shadowRoot;const o=this instanceof HTMLSlotElement?this.assignedNodes():[];if(o.length)return o[0];if(this.firstChild)return this.firstChild;let n=this;for(;n;){if(t&&n===t)return null;const e=r(n);if(e)return e;n=n.assignedSlot||n.parentNodeOrShadowHost()}function r(t){if(!t.assignedSlot)return t.nextSibling;const e=t.assignedSlot.assignedNodes(),o=Array.prototype.indexOf.call(e,t);return o+11e4?(this.textContent="string"==typeof o?o:t.StringUtilities.trimMiddle(e,1e4),!0):(this.textContent=e,!1)},Element.prototype.hasFocus=function(){const t=this.getComponentRoot();return Boolean(t)&&this.isSelfOrAncestor(t.activeElement)},Node.prototype.getComponentRoot=function(){let t=this;for(;t&&t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&t.nodeType!==Node.DOCUMENT_NODE;)t=t.parentNode;return t},self.onInvokeElement=function(e,o){e.addEventListener("keydown",(e=>{t.KeyboardUtilities.isEnterOrSpaceKey(e)&&o(e)})),e.addEventListener("click",(t=>o(t)))},function(){const t=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,o){return 1===arguments.length&&(o=!this.contains(e)),t.call(this,e,Boolean(o))}}();const e=Element.prototype.appendChild,o=Element.prototype.insertBefore,n=Element.prototype.removeChild,r=Element.prototype.removeChildren;Element.prototype.appendChild=function(t){if(t.__widget&&t.parentElement!==this)throw new Error("Attempt to add widget via regular DOM operation.");return e.call(this,t)},Element.prototype.insertBefore=function(t,e){if(t.__widget&&t.parentElement!==this)throw new Error("Attempt to add widget via regular DOM operation.");return o.call(this,t,e)},Element.prototype.removeChild=function(t){if(t.__widgetCounter||t.__widget)throw new Error("Attempt to remove element containing widget via regular DOM operation");return n.call(this,t)},Element.prototype.removeChildren=function(){if(this.__widgetCounter)throw new Error("Attempt to remove element containing widget via regular DOM operation");r.call(this)};var i=Object.freeze({__proto__:null,originalAppendChild:e,originalInsertBefore:o,originalRemoveChild:n,originalRemoveChildren:r});export{i as DOMExtension}; diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/host/host-legacy.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/host/host-legacy.js deleted file mode 100644 index 059131c03..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/host/host-legacy.js +++ /dev/null @@ -1 +0,0 @@ -import*as o from"./host.js";self.Host=self.Host||{},Host=Host||{},Host.InspectorFrontendHost=o.InspectorFrontendHost.InspectorFrontendHostInstance,Host.isUnderTest=o.InspectorFrontendHost.isUnderTest,Host.InspectorFrontendHostAPI={},Host.InspectorFrontendHostAPI.Events=o.InspectorFrontendHostAPI.Events,Host.platform=o.Platform.platform,Host.isWin=o.Platform.isWin,Host.isMac=o.Platform.isMac,Host.isCustomDevtoolsFrontend=o.Platform.isCustomDevtoolsFrontend,Host.fontFamily=o.Platform.fontFamily,Host.ResourceLoader=o.ResourceLoader.ResourceLoader,Host.ResourceLoader.load=o.ResourceLoader.load,Host.ResourceLoader.loadAsStream=o.ResourceLoader.loadAsStream,Host.ResourceLoader.setLoadForTest=o.ResourceLoader.setLoadForTest,Host.UserMetrics=o.UserMetrics.UserMetrics,Host.UserMetrics._PanelCodes=o.UserMetrics.PanelCodes,Host.UserMetrics.Action=o.UserMetrics.Action,Host.userMetrics=o.userMetrics; diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/host/host.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/host/host.js deleted file mode 100644 index 37f131c3a..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/host/host.js +++ /dev/null @@ -1 +0,0 @@ -import*as e from"../common/common.js";import*as o from"../i18n/i18n.js";import*as r from"../platform/platform.js";import*as t from"../root/root.js";var n;!function(e){e.AppendedToURL="appendedToURL",e.CanceledSaveURL="canceledSaveURL",e.ContextMenuCleared="contextMenuCleared",e.ContextMenuItemSelected="contextMenuItemSelected",e.DeviceCountUpdated="deviceCountUpdated",e.DevicesDiscoveryConfigChanged="devicesDiscoveryConfigChanged",e.DevicesPortForwardingStatusChanged="devicesPortForwardingStatusChanged",e.DevicesUpdated="devicesUpdated",e.DispatchMessage="dispatchMessage",e.DispatchMessageChunk="dispatchMessageChunk",e.EnterInspectElementMode="enterInspectElementMode",e.EyeDropperPickedColor="eyeDropperPickedColor",e.FileSystemsLoaded="fileSystemsLoaded",e.FileSystemRemoved="fileSystemRemoved",e.FileSystemAdded="fileSystemAdded",e.FileSystemFilesChangedAddedRemoved="FileSystemFilesChangedAddedRemoved",e.IndexingTotalWorkCalculated="indexingTotalWorkCalculated",e.IndexingWorked="indexingWorked",e.IndexingDone="indexingDone",e.KeyEventUnhandled="keyEventUnhandled",e.ReattachRootTarget="reattachMainTarget",e.ReloadInspectedPage="reloadInspectedPage",e.RevealSourceLine="revealSourceLine",e.SavedURL="savedURL",e.SearchCompleted="searchCompleted",e.SetInspectedTabId="setInspectedTabId",e.SetUseSoftMenu="setUseSoftMenu",e.ShowPanel="showPanel"}(n||(n={}));const i=[[n.AppendedToURL,"appendedToURL",["url"]],[n.CanceledSaveURL,"canceledSaveURL",["url"]],[n.ContextMenuCleared,"contextMenuCleared",[]],[n.ContextMenuItemSelected,"contextMenuItemSelected",["id"]],[n.DeviceCountUpdated,"deviceCountUpdated",["count"]],[n.DevicesDiscoveryConfigChanged,"devicesDiscoveryConfigChanged",["config"]],[n.DevicesPortForwardingStatusChanged,"devicesPortForwardingStatusChanged",["status"]],[n.DevicesUpdated,"devicesUpdated",["devices"]],[n.DispatchMessage,"dispatchMessage",["messageObject"]],[n.DispatchMessageChunk,"dispatchMessageChunk",["messageChunk","messageSize"]],[n.EnterInspectElementMode,"enterInspectElementMode",[]],[n.EyeDropperPickedColor,"eyeDropperPickedColor",["color"]],[n.FileSystemsLoaded,"fileSystemsLoaded",["fileSystems"]],[n.FileSystemRemoved,"fileSystemRemoved",["fileSystemPath"]],[n.FileSystemAdded,"fileSystemAdded",["errorMessage","fileSystem"]],[n.FileSystemFilesChangedAddedRemoved,"fileSystemFilesChangedAddedRemoved",["changed","added","removed"]],[n.IndexingTotalWorkCalculated,"indexingTotalWorkCalculated",["requestId","fileSystemPath","totalWork"]],[n.IndexingWorked,"indexingWorked",["requestId","fileSystemPath","worked"]],[n.IndexingDone,"indexingDone",["requestId","fileSystemPath"]],[n.KeyEventUnhandled,"keyEventUnhandled",["event"]],[n.ReattachRootTarget,"reattachMainTarget",[]],[n.ReloadInspectedPage,"reloadInspectedPage",["hard"]],[n.RevealSourceLine,"revealSourceLine",["url","lineNumber","columnNumber"]],[n.SavedURL,"savedURL",["url","fileSystemPath"]],[n.SearchCompleted,"searchCompleted",["requestId","fileSystemPath","files"]],[n.SetInspectedTabId,"setInspectedTabId",["tabId"]],[n.SetUseSoftMenu,"setUseSoftMenu",["useSoftMenu"]],[n.ShowPanel,"showPanel",["panelName"]]];var s;!function(e){e.ActionTaken="DevTools.ActionTaken",e.BreakpointWithConditionAdded="DevTools.BreakpointWithConditionAdded",e.BreakpointEditDialogRevealedFrom="DevTools.BreakpointEditDialogRevealedFrom",e.PanelClosed="DevTools.PanelClosed",e.PanelShown="DevTools.PanelShown",e.SidebarPaneShown="DevTools.SidebarPaneShown",e.KeyboardShortcutFired="DevTools.KeyboardShortcutFired",e.IssueCreated="DevTools.IssueCreated",e.IssuesPanelIssueExpanded="DevTools.IssuesPanelIssueExpanded",e.IssuesPanelOpenedFrom="DevTools.IssuesPanelOpenedFrom",e.IssuesPanelResourceOpened="DevTools.IssuesPanelResourceOpened",e.KeybindSetSettingChanged="DevTools.KeybindSetSettingChanged",e.ElementsSidebarTabShown="DevTools.Elements.SidebarTabShown",e.ExperimentEnabledAtLaunch="DevTools.ExperimentEnabledAtLaunch",e.ExperimentEnabled="DevTools.ExperimentEnabled",e.ExperimentDisabled="DevTools.ExperimentDisabled",e.DeveloperResourceLoaded="DevTools.DeveloperResourceLoaded",e.DeveloperResourceScheme="DevTools.DeveloperResourceScheme",e.LinearMemoryInspectorRevealedFrom="DevTools.LinearMemoryInspector.RevealedFrom",e.LinearMemoryInspectorTarget="DevTools.LinearMemoryInspector.Target",e.Language="DevTools.Language",e.SyncSetting="DevTools.SyncSetting",e.RecordingAssertion="DevTools.RecordingAssertion",e.RecordingCodeToggled="DevTools.RecordingCodeToggled",e.RecordingCopiedToClipboard="DevTools.RecordingCopiedToClipboard",e.RecordingEdited="DevTools.RecordingEdited",e.RecordingExported="DevTools.RecordingExported",e.RecordingReplayFinished="DevTools.RecordingReplayFinished",e.RecordingReplaySpeed="DevTools.RecordingReplaySpeed",e.RecordingReplayStarted="DevTools.RecordingReplayStarted",e.RecordingToggled="DevTools.RecordingToggled",e.SourcesSidebarTabShown="DevTools.Sources.SidebarTabShown",e.SourcesPanelFileDebugged="DevTools.SourcesPanelFileDebugged",e.SourcesPanelFileOpened="DevTools.SourcesPanelFileOpened",e.NetworkPanelResponsePreviewOpened="DevTools.NetworkPanelResponsePreviewOpened",e.StyleTextCopied="DevTools.StyleTextCopied",e.ManifestSectionSelected="DevTools.ManifestSectionSelected",e.CSSHintShown="DevTools.CSSHintShown",e.LighthouseModeRun="DevTools.LighthouseModeRun",e.ColorConvertedFrom="DevTools.ColorConvertedFrom",e.ColorPickerOpenedFrom="DevTools.ColorPickerOpenedFrom",e.CSSPropertyDocumentation="DevTools.CSSPropertyDocumentation",e.InlineScriptParsed="DevTools.InlineScriptParsed",e.VMInlineScriptTypeShown="DevTools.VMInlineScriptShown",e.BreakpointsRestoredFromStorageCount="DevTools.BreakpointsRestoredFromStorageCount",e.SwatchActivated="DevTools.SwatchActivated",e.BadgeActivated="DevTools.BadgeActivated"}(s||(s={}));var a=Object.freeze({__proto__:null,get Events(){return n},EventDescriptors:i,get EnumeratedHistogram(){return s}});const d={systemError:"System error",connectionError:"Connection error",certificateError:"Certificate error",httpError:"HTTP error",cacheError:"Cache error",signedExchangeError:"Signed Exchange error",ftpError:"FTP error",certificateManagerError:"Certificate manager error",dnsResolverError:"DNS resolver error",unknownError:"Unknown error",httpErrorStatusCodeSS:"HTTP error: status code {PH1}, {PH2}",invalidUrl:"Invalid URL",decodingDataUrlFailed:"Decoding Data URL failed"},l=o.i18n.registerUIStrings("core/host/ResourceLoader.ts",d),c=o.i18n.getLocalizedString.bind(void 0,l);let u=0;const m={},g=function(e,o){m[e].write(o)};let p=function(o,r,t,n){const i=new e.StringOutputStream.StringOutputStream;h(o,r,i,(function(e,o,r){t(e,o,i.data(),r)}),n)};function S(e,o,r){if(void 0===e||void 0===r)return null;if(0!==e){if(function(e){return e<=-300&&e>-400}(e))return c(d.httpErrorStatusCodeSS,{PH1:String(o),PH2:r});const t=function(e){return c(e>-100?d.systemError:e>-200?d.connectionError:e>-300?d.certificateError:e>-400?d.httpError:e>-500?d.cacheError:e>-600?d.signedExchangeError:e>-700?d.ftpError:e>-800?d.certificateManagerError:e>-900?d.dnsResolverError:d.unknownError)}(e);return`${t}: ${r}`}return null}const h=function(o,r,t,n,i){const s=function(e){return m[++u]=e,u}(t);if(new e.ParsedURL.ParsedURL(o).isDataURL())return void(e=>new Promise(((o,r)=>{const t=new XMLHttpRequest;t.withCredentials=!1,t.open("GET",e,!0),t.onreadystatechange=function(){if(t.readyState===XMLHttpRequest.DONE){if(200!==t.status)return t.onreadystatechange=null,void r(new Error(String(t.status)));t.onreadystatechange=null,o(t.responseText)}},t.send(null)})))(o).then((function(e){g(s,e),l({statusCode:200})})).catch((function(e){l({statusCode:404,messageOverride:c(d.decodingDataUrlFailed)})}));if(!i&&function(e){try{const o=new URL(e);return"file:"===o.protocol&&""!==o.host}catch(e){return!1}}(o))return void(n&&n(!1,{},{statusCode:400,netError:-20,netErrorName:"net::BLOCKED_BY_CLIENT",message:"Loading from a remote file path is prohibited for security reasons."}));const a=[];if(r)for(const e in r)a.push(e+": "+r[e]);function l(e){if(n){const{success:o,description:r}=function(e){const{statusCode:o,netError:r,netErrorName:t,urlValid:n,messageOverride:i}=e;let s="";const a=o>=200&&o<300;if("string"==typeof i)s=i;else if(!a)if(void 0===r)s=c(!1===n?d.invalidUrl:d.unknownError);else{const e=S(r,o,t);e&&(s=e)}return console.assert(a===(0===s.length)),{success:a,description:{statusCode:o,netError:r,netErrorName:t,urlValid:n,message:s}}}(e);n(o,e.headers||{},r)}var o;m[o=s].close(),delete m[o]}f.loadNetworkResource(o,a.join("\r\n"),s,l)};var C=Object.freeze({__proto__:null,ResourceLoader:{},streamWrite:g,get load(){return p},setLoadForTest:function(e){p=e},netErrorToMessage:S,loadAsStream:h});const v={devtoolsS:"DevTools - {PH1}"},y=o.i18n.registerUIStrings("core/host/InspectorFrontendHost.ts",v),k=o.i18n.getLocalizedString.bind(void 0,y);class x{#e;events;#o=null;recordedCountHistograms=[];recordedEnumeratedHistograms=[];recordedPerformanceHistograms=[];constructor(){function e(e){!("mac"===this.platform()?e.metaKey:e.ctrlKey)||"+"!==e.key&&"-"!==e.key||e.stopPropagation()}this.#e=new Map,"undefined"!=typeof document&&document.addEventListener("keydown",(o=>{e.call(this,o)}),!0)}platform(){const e=navigator.userAgent;return e.includes("Windows NT")?"windows":e.includes("Mac OS X")?"mac":"linux"}loadCompleted(){}bringToFront(){}closeWindow(){}setIsDocked(e,o){window.setTimeout(o,0)}showSurvey(e,o){window.setTimeout((()=>o({surveyShown:!1})),0)}canShowSurvey(e,o){window.setTimeout((()=>o({canShowSurvey:!1})),0)}setInspectedPageBounds(e){}inspectElementCompleted(){}setInjectedScriptForOrigin(e,o){}inspectedURLChanged(e){document.title=k(v.devtoolsS,{PH1:e.replace(/^https?:\/\//,"")})}copyText(e){null!=e&&navigator.clipboard.writeText(e)}openInNewTab(e){window.open(e,"_blank")}showItemInFolder(o){e.Console.Console.instance().error("Show item in folder is not enabled in hosted mode. Please inspect using chrome://inspect")}save(e,o,r){let t=this.#e.get(e);t||(t=[],this.#e.set(e,t)),t.push(o),this.events.dispatchEventToListeners(n.SavedURL,{url:e,fileSystemPath:e})}append(e,o){const r=this.#e.get(e);r&&(r.push(o),this.events.dispatchEventToListeners(n.AppendedToURL,e))}close(e){const o=this.#e.get(e)||[];this.#e.delete(e);let t="";if(e)try{const o=r.StringUtilities.trimURL(e);t=r.StringUtilities.removeURLFragment(o)}catch(o){t=e}const n=document.createElement("a");n.download=t;const i=new Blob([o.join("")],{type:"text/plain"}),s=URL.createObjectURL(i);n.href=s,n.click(),URL.revokeObjectURL(s)}sendMessageToBackend(e){}recordCountHistogram(e,o,r,t,n){this.recordedCountHistograms.length>=100&&this.recordedCountHistograms.shift(),this.recordedCountHistograms.push({histogramName:e,sample:o,min:r,exclusiveMax:t,bucketSize:n})}recordEnumeratedHistogram(e,o,r){this.recordedEnumeratedHistograms.length>=100&&this.recordedEnumeratedHistograms.shift(),this.recordedEnumeratedHistograms.push({actionName:e,actionCode:o})}recordPerformanceHistogram(e,o){this.recordedPerformanceHistograms.length>=100&&this.recordedPerformanceHistograms.shift(),this.recordedPerformanceHistograms.push({histogramName:e,duration:o})}recordUserMetricsAction(e){}requestFileSystems(){this.events.dispatchEventToListeners(n.FileSystemsLoaded,[])}addFileSystem(e){window.webkitRequestFileSystem(window.TEMPORARY,1048576,(e=>{this.#o=e;const o={fileSystemName:"sandboxedRequestedFileSystem",fileSystemPath:"/overrides",rootURL:"filesystem:devtools://devtools/isolated/",type:"overrides"};this.events.dispatchEventToListeners(n.FileSystemAdded,{fileSystem:o})}))}removeFileSystem(e){const o=e=>{e.forEach((e=>{e.isDirectory?e.removeRecursively((()=>{})):e.isFile&&e.remove((()=>{}))}))};this.#o&&this.#o.root.createReader().readEntries(o),this.#o=null,this.events.dispatchEventToListeners(n.FileSystemRemoved,"/overrides")}isolatedFileSystem(e,o){return this.#o}loadNetworkResource(e,o,r,t){fetch(e).then((async e=>{const o=await e.arrayBuffer();let r=o;if(function(e){const o=new Uint8Array(e);return!(!o||o.length<3)&&31===o[0]&&139===o[1]&&8===o[2]}(o)){const e=new DecompressionStream("gzip"),t=e.writable.getWriter();t.write(o),t.close(),r=e.readable}return await new Response(r).text()})).then((function(e){g(r,e),t({statusCode:200,headers:void 0,messageOverride:void 0,netError:void 0,netErrorName:void 0,urlValid:void 0})})).catch((function(){t({statusCode:404,headers:void 0,messageOverride:void 0,netError:void 0,netErrorName:void 0,urlValid:void 0})}))}registerPreference(e,o){}getPreferences(e){const o={};for(const e in window.localStorage)o[e]=window.localStorage[e];e(o)}getPreference(e,o){o(window.localStorage[e])}setPreference(e,o){window.localStorage[e]=o}removePreference(e){delete window.localStorage[e]}clearPreferences(){window.localStorage.clear()}getSyncInformation(e){e({isSyncActive:!1,arePreferencesSynced:!1})}upgradeDraggedFileSystemPermissions(e){}indexPath(e,o,r){}stopIndexing(e){}searchInPath(e,o,r){}zoomFactor(){return 1}zoomIn(){}zoomOut(){}resetZoom(){}setWhitelistedShortcuts(e){}setEyeDropperActive(e){}showCertificateViewer(e){}reattach(e){e()}readyForTest(){}connectionReady(){}setOpenNewWindowForPopups(e){}setDevicesDiscoveryConfig(e){}setDevicesUpdatesEnabled(e){}performActionOnRemotePage(e,o){}openRemotePage(e,o){}openNodeFrontend(){}showContextMenuAtPoint(e,o,r,t){throw"Soft context menu should be used"}isHostedMode(){return!0}setAddExtensionCallback(e){}async initialTargetId(){return null}}let f=globalThis.InspectorFrontendHost;class I{constructor(){for(const e of i)this[e[1]]=this.dispatch.bind(this,e[0],e[2],e[3])}dispatch(e,o,r,...t){if(o.length<2){try{f.events.dispatchEventToListeners(e,t[0])}catch(e){console.error(e+" "+e.stack)}return}const n={};for(let e=0;e=2||f.recordEnumeratedHistogram(s.BreakpointWithConditionAdded,e,2)}breakpointEditDialogRevealedFrom(e){e>=7||f.recordEnumeratedHistogram(s.BreakpointEditDialogRevealedFrom,e,7)}panelShown(e){const o=D[e]||0;f.recordEnumeratedHistogram(s.PanelShown,o,D.MaxValue),f.recordUserMetricsAction("DevTools_PanelShown_"+e),this.#r=!0}panelClosed(e){const o=D[e]||0;f.recordEnumeratedHistogram(s.PanelClosed,o,D.MaxValue),this.#r=!0}elementsSidebarTabShown(e){const o=L[e]||0;f.recordEnumeratedHistogram(s.ElementsSidebarTabShown,o,L.MaxValue)}sourcesSidebarTabShown(e){const o=A[e]||0;f.recordEnumeratedHistogram(s.SourcesSidebarTabShown,o,A.MaxValue)}settingsPanelShown(e){this.panelShown("settings-"+e)}sourcesPanelFileDebugged(e){const o=e&&V[e]||V.Unknown;f.recordEnumeratedHistogram(s.SourcesPanelFileDebugged,o,V.MaxValue)}sourcesPanelFileOpened(e){const o=e&&V[e]||V.Unknown;f.recordEnumeratedHistogram(s.SourcesPanelFileOpened,o,V.MaxValue)}networkPanelResponsePreviewOpened(e){const o=e&&V[e]||V.Unknown;f.recordEnumeratedHistogram(s.NetworkPanelResponsePreviewOpened,o,V.MaxValue)}actionTaken(e){f.recordEnumeratedHistogram(s.ActionTaken,e,F.MaxValue)}panelLoaded(e,o){this.#t||e!==this.#n||(this.#t=!0,requestAnimationFrame((()=>{window.setTimeout((()=>{performance.mark(o),this.#r||f.recordPerformanceHistogram(o,performance.now())}),0)})))}setLaunchPanel(e){this.#n=e}keybindSetSettingChanged(e){const o=O[e]||0;f.recordEnumeratedHistogram(s.KeybindSetSettingChanged,o,O.MaxValue)}keyboardShortcutFired(e){const o=H[e]||H.OtherShortcut;f.recordEnumeratedHistogram(s.KeyboardShortcutFired,o,H.MaxValue)}issuesPanelOpenedFrom(e){f.recordEnumeratedHistogram(s.IssuesPanelOpenedFrom,e,N.MaxValue)}issuesPanelIssueExpanded(e){if(void 0===e)return;const o=_[e];void 0!==o&&f.recordEnumeratedHistogram(s.IssuesPanelIssueExpanded,o,_.MaxValue)}issuesPanelResourceOpened(e,o){const r=U[e+o];void 0!==r&&f.recordEnumeratedHistogram(s.IssuesPanelResourceOpened,r,U.MaxValue)}issueCreated(e){const o=B[e];void 0!==o&&f.recordEnumeratedHistogram(s.IssueCreated,o,B.MaxValue)}experimentEnabledAtLaunch(e){const o=W[e];void 0!==o&&f.recordEnumeratedHistogram(s.ExperimentEnabledAtLaunch,o,W.MaxValue)}experimentChanged(e,o){const r=W[e];if(void 0===r)return;const t=o?s.ExperimentEnabled:s.ExperimentDisabled;f.recordEnumeratedHistogram(t,r,W.MaxValue)}developerResourceLoaded(e){e>=j.MaxValue||f.recordEnumeratedHistogram(s.DeveloperResourceLoaded,e,j.MaxValue)}developerResourceScheme(e){e>=G.MaxValue||f.recordEnumeratedHistogram(s.DeveloperResourceScheme,e,G.MaxValue)}inlineScriptParsed(e){e>=2||f.recordEnumeratedHistogram(s.InlineScriptParsed,e,2)}vmInlineScriptContentShown(e){e>=2||f.recordEnumeratedHistogram(s.VMInlineScriptTypeShown,e,2)}linearMemoryInspectorRevealedFrom(e){e>=z.MaxValue||f.recordEnumeratedHistogram(s.LinearMemoryInspectorRevealedFrom,e,z.MaxValue)}linearMemoryInspectorTarget(e){e>=q.MaxValue||f.recordEnumeratedHistogram(s.LinearMemoryInspectorTarget,e,q.MaxValue)}language(e){const o=J[e];void 0!==o&&f.recordEnumeratedHistogram(s.Language,o,J.MaxValue)}syncSetting(e){f.getSyncInformation((o=>{let r=K.ChromeSyncDisabled;o.isSyncActive&&!o.arePreferencesSynced?r=K.ChromeSyncSettingsDisabled:o.isSyncActive&&o.arePreferencesSynced&&(r=e?K.DevToolsSyncSettingEnabled:K.DevToolsSyncSettingDisabled),f.recordEnumeratedHistogram(s.SyncSetting,r,K.MaxValue)}))}recordingAssertion(e){f.recordEnumeratedHistogram(s.RecordingAssertion,e,X.MaxValue)}recordingToggled(e){f.recordEnumeratedHistogram(s.RecordingToggled,e,Q.MaxValue)}recordingReplayFinished(e){f.recordEnumeratedHistogram(s.RecordingReplayFinished,e,Z.MaxValue)}recordingReplaySpeed(e){f.recordEnumeratedHistogram(s.RecordingReplaySpeed,e,$.MaxValue)}recordingReplayStarted(e){f.recordEnumeratedHistogram(s.RecordingReplayStarted,e,Y.MaxValue)}recordingEdited(e){f.recordEnumeratedHistogram(s.RecordingEdited,e,ee.MaxValue)}recordingExported(e){f.recordEnumeratedHistogram(s.RecordingExported,e,oe.MaxValue)}recordingCodeToggled(e){f.recordEnumeratedHistogram(s.RecordingCodeToggled,e,re.MaxValue)}recordingCopiedToClipboard(e){f.recordEnumeratedHistogram(s.RecordingCopiedToClipboard,e,te.MaxValue)}styleTextCopied(e){f.recordEnumeratedHistogram(s.StyleTextCopied,e,ie.MaxValue)}manifestSectionSelected(e){const o=se[e]||se.OtherSection;f.recordEnumeratedHistogram(s.ManifestSectionSelected,o,se.MaxValue)}cssHintShown(e){f.recordEnumeratedHistogram(s.CSSHintShown,e,ae.MaxValue)}lighthouseModeRun(e){f.recordEnumeratedHistogram(s.LighthouseModeRun,e,de.MaxValue)}colorConvertedFrom(e){f.recordEnumeratedHistogram(s.ColorConvertedFrom,e,2)}colorPickerOpenedFrom(e){f.recordEnumeratedHistogram(s.ColorPickerOpenedFrom,e,2)}cssPropertyDocumentation(e){f.recordEnumeratedHistogram(s.CSSPropertyDocumentation,e,3)}swatchActivated(e){f.recordEnumeratedHistogram(s.SwatchActivated,e,10)}badgeActivated(e){f.recordEnumeratedHistogram(s.BadgeActivated,e,9)}breakpointsRestoredFromStorage(e){const o=this.#i(e);f.recordEnumeratedHistogram(s.BreakpointsRestoredFromStorageCount,o,10)}#i(e){return e<100?0:e<300?1:e<1e3?2:e<3e3?3:e<1e4?4:e<3e4?5:e<1e5?6:e<3e5?7:e<1e6?8:9}workspacesPopulated(e){f.recordPerformanceHistogram("DevTools.Workspaces.PopulateWallClocktime",e)}workspacesNumberOfFiles(e,o){f.recordCountHistogram("DevTools.Workspaces.NumberOfFilesLoaded",e,0,1e5,100),f.recordCountHistogram("DevTools.Workspaces.NumberOfDirectoriesTraversed",o,0,1e4,100)}}!function(e){e[e.WindowDocked=1]="WindowDocked",e[e.WindowUndocked=2]="WindowUndocked",e[e.ScriptsBreakpointSet=3]="ScriptsBreakpointSet",e[e.TimelineStarted=4]="TimelineStarted",e[e.ProfilesCPUProfileTaken=5]="ProfilesCPUProfileTaken",e[e.ProfilesHeapProfileTaken=6]="ProfilesHeapProfileTaken",e[e.ConsoleEvaluated=8]="ConsoleEvaluated",e[e.FileSavedInWorkspace=9]="FileSavedInWorkspace",e[e.DeviceModeEnabled=10]="DeviceModeEnabled",e[e.AnimationsPlaybackRateChanged=11]="AnimationsPlaybackRateChanged",e[e.RevisionApplied=12]="RevisionApplied",e[e.FileSystemDirectoryContentReceived=13]="FileSystemDirectoryContentReceived",e[e.StyleRuleEdited=14]="StyleRuleEdited",e[e.CommandEvaluatedInConsolePanel=15]="CommandEvaluatedInConsolePanel",e[e.DOMPropertiesExpanded=16]="DOMPropertiesExpanded",e[e.ResizedViewInResponsiveMode=17]="ResizedViewInResponsiveMode",e[e.TimelinePageReloadStarted=18]="TimelinePageReloadStarted",e[e.ConnectToNodeJSFromFrontend=19]="ConnectToNodeJSFromFrontend",e[e.ConnectToNodeJSDirectly=20]="ConnectToNodeJSDirectly",e[e.CpuThrottlingEnabled=21]="CpuThrottlingEnabled",e[e.CpuProfileNodeFocused=22]="CpuProfileNodeFocused",e[e.CpuProfileNodeExcluded=23]="CpuProfileNodeExcluded",e[e.SelectFileFromFilePicker=24]="SelectFileFromFilePicker",e[e.SelectCommandFromCommandMenu=25]="SelectCommandFromCommandMenu",e[e.ChangeInspectedNodeInElementsPanel=26]="ChangeInspectedNodeInElementsPanel",e[e.StyleRuleCopied=27]="StyleRuleCopied",e[e.CoverageStarted=28]="CoverageStarted",e[e.LighthouseStarted=29]="LighthouseStarted",e[e.LighthouseFinished=30]="LighthouseFinished",e[e.ShowedThirdPartyBadges=31]="ShowedThirdPartyBadges",e[e.LighthouseViewTrace=32]="LighthouseViewTrace",e[e.FilmStripStartedRecording=33]="FilmStripStartedRecording",e[e.CoverageReportFiltered=34]="CoverageReportFiltered",e[e.CoverageStartedPerBlock=35]="CoverageStartedPerBlock",e[e["SettingsOpenedFromGear-deprecated"]=36]="SettingsOpenedFromGear-deprecated",e[e["SettingsOpenedFromMenu-deprecated"]=37]="SettingsOpenedFromMenu-deprecated",e[e["SettingsOpenedFromCommandMenu-deprecated"]=38]="SettingsOpenedFromCommandMenu-deprecated",e[e.TabMovedToDrawer=39]="TabMovedToDrawer",e[e.TabMovedToMainPanel=40]="TabMovedToMainPanel",e[e.CaptureCssOverviewClicked=41]="CaptureCssOverviewClicked",e[e.VirtualAuthenticatorEnvironmentEnabled=42]="VirtualAuthenticatorEnvironmentEnabled",e[e.SourceOrderViewActivated=43]="SourceOrderViewActivated",e[e.UserShortcutAdded=44]="UserShortcutAdded",e[e.ShortcutRemoved=45]="ShortcutRemoved",e[e.ShortcutModified=46]="ShortcutModified",e[e.CustomPropertyLinkClicked=47]="CustomPropertyLinkClicked",e[e.CustomPropertyEdited=48]="CustomPropertyEdited",e[e.ServiceWorkerNetworkRequestClicked=49]="ServiceWorkerNetworkRequestClicked",e[e.ServiceWorkerNetworkRequestClosedQuickly=50]="ServiceWorkerNetworkRequestClosedQuickly",e[e.NetworkPanelServiceWorkerRespondWith=51]="NetworkPanelServiceWorkerRespondWith",e[e.NetworkPanelCopyValue=52]="NetworkPanelCopyValue",e[e.ConsoleSidebarOpened=53]="ConsoleSidebarOpened",e[e.PerfPanelTraceImported=54]="PerfPanelTraceImported",e[e.PerfPanelTraceExported=55]="PerfPanelTraceExported",e[e.StackFrameRestarted=56]="StackFrameRestarted",e[e.CaptureTestProtocolClicked=57]="CaptureTestProtocolClicked",e[e.BreakpointRemovedFromRemoveButton=58]="BreakpointRemovedFromRemoveButton",e[e.BreakpointGroupExpandedStateChanged=59]="BreakpointGroupExpandedStateChanged",e[e.HeaderOverrideFileCreated=60]="HeaderOverrideFileCreated",e[e.HeaderOverrideEnableEditingClicked=61]="HeaderOverrideEnableEditingClicked",e[e.HeaderOverrideHeaderAdded=62]="HeaderOverrideHeaderAdded",e[e.HeaderOverrideHeaderEdited=63]="HeaderOverrideHeaderEdited",e[e.HeaderOverrideHeaderRemoved=64]="HeaderOverrideHeaderRemoved",e[e.HeaderOverrideHeadersFileEdited=65]="HeaderOverrideHeadersFileEdited",e[e.PersistenceNetworkOverridesEnabled=66]="PersistenceNetworkOverridesEnabled",e[e.PersistenceNetworkOverridesDisabled=67]="PersistenceNetworkOverridesDisabled",e[e.BreakpointRemovedFromContextMenu=68]="BreakpointRemovedFromContextMenu",e[e.BreakpointsInFileRemovedFromRemoveButton=69]="BreakpointsInFileRemovedFromRemoveButton",e[e.BreakpointsInFileRemovedFromContextMenu=70]="BreakpointsInFileRemovedFromContextMenu",e[e.BreakpointsInFileCheckboxToggled=71]="BreakpointsInFileCheckboxToggled",e[e.BreakpointsInFileEnabledDisabledFromContextMenu=72]="BreakpointsInFileEnabledDisabledFromContextMenu",e[e.BreakpointConditionEditedFromSidebar=73]="BreakpointConditionEditedFromSidebar",e[e.AddFileSystemToWorkspace=74]="AddFileSystemToWorkspace",e[e.RemoveFileSystemFromWorkspace=75]="RemoveFileSystemFromWorkspace",e[e.AddFileSystemForOverrides=76]="AddFileSystemForOverrides",e[e.RemoveFileSystemForOverrides=77]="RemoveFileSystemForOverrides",e[e.FileSystemSourceSelected=78]="FileSystemSourceSelected",e[e.OverridesSourceSelected=79]="OverridesSourceSelected",e[e.StyleSheetInitiatorLinkClicked=80]="StyleSheetInitiatorLinkClicked",e[e.MaxValue=81]="MaxValue"}(F||(F={})),function(e){e[e.elements=1]="elements",e[e.resources=2]="resources",e[e.network=3]="network",e[e.sources=4]="sources",e[e.timeline=5]="timeline",e[e.heap_profiler=6]="heap_profiler",e[e.console=8]="console",e[e.layers=9]="layers",e[e["console-view"]=10]="console-view",e[e.animations=11]="animations",e[e["network.config"]=12]="network.config",e[e.rendering=13]="rendering",e[e.sensors=14]="sensors",e[e["sources.search"]=15]="sources.search",e[e.security=16]="security",e[e.js_profiler=17]="js_profiler",e[e.lighthouse=18]="lighthouse",e[e.coverage=19]="coverage",e[e["protocol-monitor"]=20]="protocol-monitor",e[e["remote-devices"]=21]="remote-devices",e[e["web-audio"]=22]="web-audio",e[e["changes.changes"]=23]="changes.changes",e[e["performance.monitor"]=24]="performance.monitor",e[e["release-note"]=25]="release-note",e[e.live_heap_profile=26]="live_heap_profile",e[e["sources.quick"]=27]="sources.quick",e[e["network.blocked-urls"]=28]="network.blocked-urls",e[e["settings-preferences"]=29]="settings-preferences",e[e["settings-workspace"]=30]="settings-workspace",e[e["settings-experiments"]=31]="settings-experiments",e[e["settings-blackbox"]=32]="settings-blackbox",e[e["settings-devices"]=33]="settings-devices",e[e["settings-throttling-conditions"]=34]="settings-throttling-conditions",e[e["settings-emulation-locations"]=35]="settings-emulation-locations",e[e["settings-shortcuts"]=36]="settings-shortcuts",e[e["issues-pane"]=37]="issues-pane",e[e["settings-keybinds"]=38]="settings-keybinds",e[e.cssoverview=39]="cssoverview",e[e.chrome_recorder=40]="chrome_recorder",e[e.trust_tokens=41]="trust_tokens",e[e.reporting_api=42]="reporting_api",e[e.interest_groups=43]="interest_groups",e[e.back_forward_cache=44]="back_forward_cache",e[e.service_worker_cache=45]="service_worker_cache",e[e.background_service_backgroundFetch=46]="background_service_backgroundFetch",e[e.background_service_backgroundSync=47]="background_service_backgroundSync",e[e.background_service_pushMessaging=48]="background_service_pushMessaging",e[e.background_service_notifications=49]="background_service_notifications",e[e.background_service_paymentHandler=50]="background_service_paymentHandler",e[e.background_service_periodicBackgroundSync=51]="background_service_periodicBackgroundSync",e[e.service_workers=52]="service_workers",e[e.app_manifest=53]="app_manifest",e[e.storage=54]="storage",e[e.cookies=55]="cookies",e[e.frame_details=56]="frame_details",e[e.frame_resource=57]="frame_resource",e[e.frame_window=58]="frame_window",e[e.frame_worker=59]="frame_worker",e[e.dom_storage=60]="dom_storage",e[e.indexed_db=61]="indexed_db",e[e.web_sql=62]="web_sql",e[e.performance_insights=63]="performance_insights",e[e.preloading=64]="preloading",e[e.bounce_tracking_mitigations=65]="bounce_tracking_mitigations",e[e.MaxValue=66]="MaxValue"}(D||(D={})),function(e){e[e.OtherSidebarPane=0]="OtherSidebarPane",e[e.Styles=1]="Styles",e[e.Computed=2]="Computed",e[e["elements.layout"]=3]="elements.layout",e[e["elements.eventListeners"]=4]="elements.eventListeners",e[e["elements.domBreakpoints"]=5]="elements.domBreakpoints",e[e["elements.domProperties"]=6]="elements.domProperties",e[e["accessibility.view"]=7]="accessibility.view",e[e.MaxValue=8]="MaxValue"}(L||(L={})),function(e){e[e.OtherSidebarPane=0]="OtherSidebarPane",e[e["navigator-network"]=1]="navigator-network",e[e["navigator-files"]=2]="navigator-files",e[e["navigator-overrides"]=3]="navigator-overrides",e[e["navigator-contentScripts"]=4]="navigator-contentScripts",e[e["navigator-snippets"]=5]="navigator-snippets",e[e.MaxValue=6]="MaxValue"}(A||(A={})),function(e){e[e.Unknown=0]="Unknown",e[e["text/css"]=2]="text/css",e[e["text/html"]=3]="text/html",e[e["application/xml"]=4]="application/xml",e[e["application/wasm"]=5]="application/wasm",e[e["application/manifest+json"]=6]="application/manifest+json",e[e["application/x-aspx"]=7]="application/x-aspx",e[e["application/jsp"]=8]="application/jsp",e[e["text/x-c++src"]=9]="text/x-c++src",e[e["text/x-coffeescript"]=10]="text/x-coffeescript",e[e["application/vnd.dart"]=11]="application/vnd.dart",e[e["text/typescript"]=12]="text/typescript",e[e["text/typescript-jsx"]=13]="text/typescript-jsx",e[e["application/json"]=14]="application/json",e[e["text/x-csharp"]=15]="text/x-csharp",e[e["text/x-java"]=16]="text/x-java",e[e["text/x-less"]=17]="text/x-less",e[e["application/x-httpd-php"]=18]="application/x-httpd-php",e[e["text/x-python"]=19]="text/x-python",e[e["text/x-sh"]=20]="text/x-sh",e[e["text/x-gss"]=21]="text/x-gss",e[e["text/x-sass"]=22]="text/x-sass",e[e["text/x-scss"]=23]="text/x-scss",e[e["text/markdown"]=24]="text/markdown",e[e["text/x-clojure"]=25]="text/x-clojure",e[e["text/jsx"]=26]="text/jsx",e[e["text/x-go"]=27]="text/x-go",e[e["text/x-kotlin"]=28]="text/x-kotlin",e[e["text/x-scala"]=29]="text/x-scala",e[e["text/x.svelte"]=30]="text/x.svelte",e[e["text/javascript+plain"]=31]="text/javascript+plain",e[e["text/javascript+minified"]=32]="text/javascript+minified",e[e["text/javascript+sourcemapped"]=33]="text/javascript+sourcemapped",e[e["text/x.angular"]=34]="text/x.angular",e[e["text/x.vue"]=35]="text/x.vue",e[e.MaxValue=36]="MaxValue"}(V||(V={})),function(e){e[e.devToolsDefault=0]="devToolsDefault",e[e.vsCode=1]="vsCode",e[e.MaxValue=2]="MaxValue"}(O||(O={})),function(e){e[e.OtherShortcut=0]="OtherShortcut",e[e["commandMenu.show"]=1]="commandMenu.show",e[e["console.clear"]=2]="console.clear",e[e["console.show"]=3]="console.show",e[e["debugger.step"]=4]="debugger.step",e[e["debugger.step-into"]=5]="debugger.step-into",e[e["debugger.step-out"]=6]="debugger.step-out",e[e["debugger.step-over"]=7]="debugger.step-over",e[e["debugger.toggle-breakpoint"]=8]="debugger.toggle-breakpoint",e[e["debugger.toggle-breakpoint-enabled"]=9]="debugger.toggle-breakpoint-enabled",e[e["debugger.toggle-pause"]=10]="debugger.toggle-pause",e[e["elements.edit-as-html"]=11]="elements.edit-as-html",e[e["elements.hide-element"]=12]="elements.hide-element",e[e["elements.redo"]=13]="elements.redo",e[e["elements.toggle-element-search"]=14]="elements.toggle-element-search",e[e["elements.undo"]=15]="elements.undo",e[e["main.search-in-panel.find"]=16]="main.search-in-panel.find",e[e["main.toggle-drawer"]=17]="main.toggle-drawer",e[e["network.hide-request-details"]=18]="network.hide-request-details",e[e["network.search"]=19]="network.search",e[e["network.toggle-recording"]=20]="network.toggle-recording",e[e["quickOpen.show"]=21]="quickOpen.show",e[e["settings.show"]=22]="settings.show",e[e["sources.search"]=23]="sources.search",e[e["background-service.toggle-recording"]=24]="background-service.toggle-recording",e[e["components.collect-garbage"]=25]="components.collect-garbage",e[e["console.clear.history"]=26]="console.clear.history",e[e["console.create-pin"]=27]="console.create-pin",e[e["coverage.start-with-reload"]=28]="coverage.start-with-reload",e[e["coverage.toggle-recording"]=29]="coverage.toggle-recording",e[e["debugger.breakpoint-input-window"]=30]="debugger.breakpoint-input-window",e[e["debugger.evaluate-selection"]=31]="debugger.evaluate-selection",e[e["debugger.next-call-frame"]=32]="debugger.next-call-frame",e[e["debugger.previous-call-frame"]=33]="debugger.previous-call-frame",e[e["debugger.run-snippet"]=34]="debugger.run-snippet",e[e["debugger.toggle-breakpoints-active"]=35]="debugger.toggle-breakpoints-active",e[e["elements.capture-area-screenshot"]=36]="elements.capture-area-screenshot",e[e["emulation.capture-full-height-screenshot"]=37]="emulation.capture-full-height-screenshot",e[e["emulation.capture-node-screenshot"]=38]="emulation.capture-node-screenshot",e[e["emulation.capture-screenshot"]=39]="emulation.capture-screenshot",e[e["emulation.show-sensors"]=40]="emulation.show-sensors",e[e["emulation.toggle-device-mode"]=41]="emulation.toggle-device-mode",e[e["help.release-notes"]=42]="help.release-notes",e[e["help.report-issue"]=43]="help.report-issue",e[e["input.start-replaying"]=44]="input.start-replaying",e[e["input.toggle-pause"]=45]="input.toggle-pause",e[e["input.toggle-recording"]=46]="input.toggle-recording",e[e["inspector_main.focus-debuggee"]=47]="inspector_main.focus-debuggee",e[e["inspector_main.hard-reload"]=48]="inspector_main.hard-reload",e[e["inspector_main.reload"]=49]="inspector_main.reload",e[e["live-heap-profile.start-with-reload"]=50]="live-heap-profile.start-with-reload",e[e["live-heap-profile.toggle-recording"]=51]="live-heap-profile.toggle-recording",e[e["main.debug-reload"]=52]="main.debug-reload",e[e["main.next-tab"]=53]="main.next-tab",e[e["main.previous-tab"]=54]="main.previous-tab",e[e["main.search-in-panel.cancel"]=55]="main.search-in-panel.cancel",e[e["main.search-in-panel.find-next"]=56]="main.search-in-panel.find-next",e[e["main.search-in-panel.find-previous"]=57]="main.search-in-panel.find-previous",e[e["main.toggle-dock"]=58]="main.toggle-dock",e[e["main.zoom-in"]=59]="main.zoom-in",e[e["main.zoom-out"]=60]="main.zoom-out",e[e["main.zoom-reset"]=61]="main.zoom-reset",e[e["network-conditions.network-low-end-mobile"]=62]="network-conditions.network-low-end-mobile",e[e["network-conditions.network-mid-tier-mobile"]=63]="network-conditions.network-mid-tier-mobile",e[e["network-conditions.network-offline"]=64]="network-conditions.network-offline",e[e["network-conditions.network-online"]=65]="network-conditions.network-online",e[e["profiler.heap-toggle-recording"]=66]="profiler.heap-toggle-recording",e[e["profiler.js-toggle-recording"]=67]="profiler.js-toggle-recording",e[e["resources.clear"]=68]="resources.clear",e[e["settings.documentation"]=69]="settings.documentation",e[e["settings.shortcuts"]=70]="settings.shortcuts",e[e["sources.add-folder-to-workspace"]=71]="sources.add-folder-to-workspace",e[e["sources.add-to-watch"]=72]="sources.add-to-watch",e[e["sources.close-all"]=73]="sources.close-all",e[e["sources.close-editor-tab"]=74]="sources.close-editor-tab",e[e["sources.create-snippet"]=75]="sources.create-snippet",e[e["sources.go-to-line"]=76]="sources.go-to-line",e[e["sources.go-to-member"]=77]="sources.go-to-member",e[e["sources.jump-to-next-location"]=78]="sources.jump-to-next-location",e[e["sources.jump-to-previous-location"]=79]="sources.jump-to-previous-location",e[e["sources.rename"]=80]="sources.rename",e[e["sources.save"]=81]="sources.save",e[e["sources.save-all"]=82]="sources.save-all",e[e["sources.switch-file"]=83]="sources.switch-file",e[e["timeline.jump-to-next-frame"]=84]="timeline.jump-to-next-frame",e[e["timeline.jump-to-previous-frame"]=85]="timeline.jump-to-previous-frame",e[e["timeline.load-from-file"]=86]="timeline.load-from-file",e[e["timeline.next-recording"]=87]="timeline.next-recording",e[e["timeline.previous-recording"]=88]="timeline.previous-recording",e[e["timeline.record-reload"]=89]="timeline.record-reload",e[e["timeline.save-to-file"]=90]="timeline.save-to-file",e[e["timeline.show-history"]=91]="timeline.show-history",e[e["timeline.toggle-recording"]=92]="timeline.toggle-recording",e[e["sources.increment-css"]=93]="sources.increment-css",e[e["sources.increment-css-by-ten"]=94]="sources.increment-css-by-ten",e[e["sources.decrement-css"]=95]="sources.decrement-css",e[e["sources.decrement-css-by-ten"]=96]="sources.decrement-css-by-ten",e[e["layers.reset-view"]=97]="layers.reset-view",e[e["layers.pan-mode"]=98]="layers.pan-mode",e[e["layers.rotate-mode"]=99]="layers.rotate-mode",e[e["layers.zoom-in"]=100]="layers.zoom-in",e[e["layers.zoom-out"]=101]="layers.zoom-out",e[e["layers.up"]=102]="layers.up",e[e["layers.down"]=103]="layers.down",e[e["layers.left"]=104]="layers.left",e[e["layers.right"]=105]="layers.right",e[e["help.report-translation-issue"]=106]="help.report-translation-issue",e[e["rendering.toggle-prefers-color-scheme"]=107]="rendering.toggle-prefers-color-scheme",e[e["chrome_recorder.start-recording"]=108]="chrome_recorder.start-recording",e[e["chrome_recorder.replay-recording"]=109]="chrome_recorder.replay-recording",e[e["chrome_recorder.toggle-code-view"]=110]="chrome_recorder.toggle-code-view",e[e["chrome_recorder.copy-recording-or-step"]=111]="chrome_recorder.copy-recording-or-step",e[e.MaxValue=112]="MaxValue"}(H||(H={})),function(e){e[e.ConsoleInfoBar=0]="ConsoleInfoBar",e[e.LearnMoreLinkCOEP=1]="LearnMoreLinkCOEP",e[e.StatusBarIssuesCounter=2]="StatusBarIssuesCounter",e[e.HamburgerMenu=3]="HamburgerMenu",e[e.Adorner=4]="Adorner",e[e.CommandMenu=5]="CommandMenu",e[e.MaxValue=6]="MaxValue"}(N||(N={})),function(e){e[e.applyCustomStylesheet=0]="applyCustomStylesheet",e[e.captureNodeCreationStacks=1]="captureNodeCreationStacks",e[e.sourcesPrettyPrint=2]="sourcesPrettyPrint",e[e.liveHeapProfile=11]="liveHeapProfile",e[e.protocolMonitor=13]="protocolMonitor",e[e.developerResourcesView=15]="developerResourcesView",e[e.samplingHeapProfilerTimeline=17]="samplingHeapProfilerTimeline",e[e.showOptionToExposeInternalsInHeapSnapshot=18]="showOptionToExposeInternalsInHeapSnapshot",e[e.sourceOrderViewer=20]="sourceOrderViewer",e[e.webauthnPane=22]="webauthnPane",e[e.timelineEventInitiators=24]="timelineEventInitiators",e[e.timelineInvalidationTracking=26]="timelineInvalidationTracking",e[e.timelineShowAllEvents=27]="timelineShowAllEvents",e[e.timelineV8RuntimeCallStats=28]="timelineV8RuntimeCallStats",e[e.wasmDWARFDebugging=31]="wasmDWARFDebugging",e[e.dualScreenSupport=32]="dualScreenSupport",e[e.keyboardShortcutEditor=35]="keyboardShortcutEditor",e[e.APCA=39]="APCA",e[e.cspViolationsView=40]="cspViolationsView",e[e.fontEditor=41]="fontEditor",e[e.fullAccessibilityTree=42]="fullAccessibilityTree",e[e.ignoreListJSFramesOnTimeline=43]="ignoreListJSFramesOnTimeline",e[e.contrastIssues=44]="contrastIssues",e[e.experimentalCookieFeatures=45]="experimentalCookieFeatures",e[e.cssTypeComponentLength=52]="cssTypeComponentLength",e[e.preciseChanges=53]="preciseChanges",e[e.bfcacheDisplayTree=54]="bfcacheDisplayTree",e[e.stylesPaneCSSChanges=55]="stylesPaneCSSChanges",e[e.headerOverrides=56]="headerOverrides",e[e.evaluateExpressionsWithSourceMaps=58]="evaluateExpressionsWithSourceMaps",e[e.eyedropperColorPicker=60]="eyedropperColorPicker",e[e.instrumentationBreakpoints=61]="instrumentationBreakpoints",e[e.authoredDeployedGrouping=63]="authoredDeployedGrouping",e[e.importantDOMProperties=64]="importantDOMProperties",e[e.justMyCode=65]="justMyCode",e[e.timelineAsConsoleProfileResultPanel=67]="timelineAsConsoleProfileResultPanel",e[e.preloadingStatusPanel=68]="preloadingStatusPanel",e[e.disableColorFormatSetting=69]="disableColorFormatSetting",e[e.outermostTargetSelector=71]="outermostTargetSelector",e[e.jsProfilerTemporarilyEnable=72]="jsProfilerTemporarilyEnable",e[e.highlightErrorsElementsPanel=73]="highlightErrorsElementsPanel",e[e.setAllBreakpointsEagerly=74]="setAllBreakpointsEagerly",e[e.MaxValue=75]="MaxValue"}(W||(W={})),function(e){e[e.CrossOriginEmbedderPolicy=0]="CrossOriginEmbedderPolicy",e[e.MixedContent=1]="MixedContent",e[e.Cookie=2]="Cookie",e[e.HeavyAd=3]="HeavyAd",e[e.ContentSecurityPolicy=4]="ContentSecurityPolicy",e[e.Other=5]="Other",e[e.Generic=6]="Generic",e[e.MaxValue=7]="MaxValue"}(_||(_={})),function(e){e[e.CrossOriginEmbedderPolicyRequest=0]="CrossOriginEmbedderPolicyRequest",e[e.CrossOriginEmbedderPolicyElement=1]="CrossOriginEmbedderPolicyElement",e[e.MixedContentRequest=2]="MixedContentRequest",e[e.SameSiteCookieCookie=3]="SameSiteCookieCookie",e[e.SameSiteCookieRequest=4]="SameSiteCookieRequest",e[e.HeavyAdElement=5]="HeavyAdElement",e[e.ContentSecurityPolicyDirective=6]="ContentSecurityPolicyDirective",e[e.ContentSecurityPolicyElement=7]="ContentSecurityPolicyElement",e[e.CrossOriginEmbedderPolicyLearnMore=8]="CrossOriginEmbedderPolicyLearnMore",e[e.MixedContentLearnMore=9]="MixedContentLearnMore",e[e.SameSiteCookieLearnMore=10]="SameSiteCookieLearnMore",e[e.HeavyAdLearnMore=11]="HeavyAdLearnMore",e[e.ContentSecurityPolicyLearnMore=12]="ContentSecurityPolicyLearnMore",e[e.MaxValue=13]="MaxValue"}(U||(U={})),function(e){e[e.MixedContentIssue=0]="MixedContentIssue",e[e["ContentSecurityPolicyIssue::kInlineViolation"]=1]="ContentSecurityPolicyIssue::kInlineViolation",e[e["ContentSecurityPolicyIssue::kEvalViolation"]=2]="ContentSecurityPolicyIssue::kEvalViolation",e[e["ContentSecurityPolicyIssue::kURLViolation"]=3]="ContentSecurityPolicyIssue::kURLViolation",e[e["ContentSecurityPolicyIssue::kTrustedTypesSinkViolation"]=4]="ContentSecurityPolicyIssue::kTrustedTypesSinkViolation",e[e["ContentSecurityPolicyIssue::kTrustedTypesPolicyViolation"]=5]="ContentSecurityPolicyIssue::kTrustedTypesPolicyViolation",e[e["HeavyAdIssue::NetworkTotalLimit"]=6]="HeavyAdIssue::NetworkTotalLimit",e[e["HeavyAdIssue::CpuTotalLimit"]=7]="HeavyAdIssue::CpuTotalLimit",e[e["HeavyAdIssue::CpuPeakLimit"]=8]="HeavyAdIssue::CpuPeakLimit",e[e["CrossOriginEmbedderPolicyIssue::CoepFrameResourceNeedsCoepHeader"]=9]="CrossOriginEmbedderPolicyIssue::CoepFrameResourceNeedsCoepHeader",e[e["CrossOriginEmbedderPolicyIssue::CoopSandboxedIFrameCannotNavigateToCoopPage"]=10]="CrossOriginEmbedderPolicyIssue::CoopSandboxedIFrameCannotNavigateToCoopPage",e[e["CrossOriginEmbedderPolicyIssue::CorpNotSameOrigin"]=11]="CrossOriginEmbedderPolicyIssue::CorpNotSameOrigin",e[e["CrossOriginEmbedderPolicyIssue::CorpNotSameOriginAfterDefaultedToSameOriginByCoep"]=12]="CrossOriginEmbedderPolicyIssue::CorpNotSameOriginAfterDefaultedToSameOriginByCoep",e[e["CrossOriginEmbedderPolicyIssue::CorpNotSameSite"]=13]="CrossOriginEmbedderPolicyIssue::CorpNotSameSite",e[e["CookieIssue::ExcludeSameSiteNoneInsecure::ReadCookie"]=14]="CookieIssue::ExcludeSameSiteNoneInsecure::ReadCookie",e[e["CookieIssue::ExcludeSameSiteNoneInsecure::SetCookie"]=15]="CookieIssue::ExcludeSameSiteNoneInsecure::SetCookie",e[e["CookieIssue::WarnSameSiteNoneInsecure::ReadCookie"]=16]="CookieIssue::WarnSameSiteNoneInsecure::ReadCookie",e[e["CookieIssue::WarnSameSiteNoneInsecure::SetCookie"]=17]="CookieIssue::WarnSameSiteNoneInsecure::SetCookie",e[e["CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Secure"]=18]="CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Secure",e[e["CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Insecure"]=19]="CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Insecure",e[e["CookieIssue::WarnCrossDowngrade::ReadCookie::Secure"]=20]="CookieIssue::WarnCrossDowngrade::ReadCookie::Secure",e[e["CookieIssue::WarnCrossDowngrade::ReadCookie::Insecure"]=21]="CookieIssue::WarnCrossDowngrade::ReadCookie::Insecure",e[e["CookieIssue::WarnCrossDowngrade::SetCookie::Secure"]=22]="CookieIssue::WarnCrossDowngrade::SetCookie::Secure",e[e["CookieIssue::WarnCrossDowngrade::SetCookie::Insecure"]=23]="CookieIssue::WarnCrossDowngrade::SetCookie::Insecure",e[e["CookieIssue::ExcludeNavigationContextDowngrade::Secure"]=24]="CookieIssue::ExcludeNavigationContextDowngrade::Secure",e[e["CookieIssue::ExcludeNavigationContextDowngrade::Insecure"]=25]="CookieIssue::ExcludeNavigationContextDowngrade::Insecure",e[e["CookieIssue::ExcludeContextDowngrade::ReadCookie::Secure"]=26]="CookieIssue::ExcludeContextDowngrade::ReadCookie::Secure",e[e["CookieIssue::ExcludeContextDowngrade::ReadCookie::Insecure"]=27]="CookieIssue::ExcludeContextDowngrade::ReadCookie::Insecure",e[e["CookieIssue::ExcludeContextDowngrade::SetCookie::Secure"]=28]="CookieIssue::ExcludeContextDowngrade::SetCookie::Secure",e[e["CookieIssue::ExcludeContextDowngrade::SetCookie::Insecure"]=29]="CookieIssue::ExcludeContextDowngrade::SetCookie::Insecure",e[e["CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::ReadCookie"]=30]="CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::ReadCookie",e[e["CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::SetCookie"]=31]="CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::SetCookie",e[e["CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::ReadCookie"]=32]="CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::ReadCookie",e[e["CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::SetCookie"]=33]="CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::SetCookie",e[e["CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::ReadCookie"]=34]="CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::ReadCookie",e[e["CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::SetCookie"]=35]="CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::SetCookie",e[e["SharedArrayBufferIssue::TransferIssue"]=36]="SharedArrayBufferIssue::TransferIssue",e[e["SharedArrayBufferIssue::CreationIssue"]=37]="SharedArrayBufferIssue::CreationIssue",e[e.LowTextContrastIssue=41]="LowTextContrastIssue",e[e["CorsIssue::InsecurePrivateNetwork"]=42]="CorsIssue::InsecurePrivateNetwork",e[e["CorsIssue::InvalidHeaders"]=44]="CorsIssue::InvalidHeaders",e[e["CorsIssue::WildcardOriginWithCredentials"]=45]="CorsIssue::WildcardOriginWithCredentials",e[e["CorsIssue::PreflightResponseInvalid"]=46]="CorsIssue::PreflightResponseInvalid",e[e["CorsIssue::OriginMismatch"]=47]="CorsIssue::OriginMismatch",e[e["CorsIssue::AllowCredentialsRequired"]=48]="CorsIssue::AllowCredentialsRequired",e[e["CorsIssue::MethodDisallowedByPreflightResponse"]=49]="CorsIssue::MethodDisallowedByPreflightResponse",e[e["CorsIssue::HeaderDisallowedByPreflightResponse"]=50]="CorsIssue::HeaderDisallowedByPreflightResponse",e[e["CorsIssue::RedirectContainsCredentials"]=51]="CorsIssue::RedirectContainsCredentials",e[e["CorsIssue::DisallowedByMode"]=52]="CorsIssue::DisallowedByMode",e[e["CorsIssue::CorsDisabledScheme"]=53]="CorsIssue::CorsDisabledScheme",e[e["CorsIssue::PreflightMissingAllowExternal"]=54]="CorsIssue::PreflightMissingAllowExternal",e[e["CorsIssue::PreflightInvalidAllowExternal"]=55]="CorsIssue::PreflightInvalidAllowExternal",e[e["CorsIssue::NoCorsRedirectModeNotFollow"]=57]="CorsIssue::NoCorsRedirectModeNotFollow",e[e["QuirksModeIssue::QuirksMode"]=58]="QuirksModeIssue::QuirksMode",e[e["QuirksModeIssue::LimitedQuirksMode"]=59]="QuirksModeIssue::LimitedQuirksMode",e[e.DeprecationIssue=60]="DeprecationIssue",e[e["ClientHintIssue::MetaTagAllowListInvalidOrigin"]=61]="ClientHintIssue::MetaTagAllowListInvalidOrigin",e[e["ClientHintIssue::MetaTagModifiedHTML"]=62]="ClientHintIssue::MetaTagModifiedHTML",e[e["CorsIssue::PreflightAllowPrivateNetworkError"]=63]="CorsIssue::PreflightAllowPrivateNetworkError",e[e["GenericIssue::CrossOriginPortalPostMessageError"]=64]="GenericIssue::CrossOriginPortalPostMessageError",e[e["GenericIssue::FormLabelForNameError"]=65]="GenericIssue::FormLabelForNameError",e[e["GenericIssue::FormDuplicateIdForInputError"]=66]="GenericIssue::FormDuplicateIdForInputError",e[e["GenericIssue::FormInputWithNoLabelError"]=67]="GenericIssue::FormInputWithNoLabelError",e[e["GenericIssue::FormAutocompleteAttributeEmptyError"]=68]="GenericIssue::FormAutocompleteAttributeEmptyError",e[e["GenericIssue::FormEmptyIdAndNameAttributesForInputError"]=69]="GenericIssue::FormEmptyIdAndNameAttributesForInputError",e[e["GenericIssue::FormAriaLabelledByToNonExistingId"]=70]="GenericIssue::FormAriaLabelledByToNonExistingId",e[e["GenericIssue::FormInputAssignedAutocompleteValueToIdOrNameAttributeError"]=71]="GenericIssue::FormInputAssignedAutocompleteValueToIdOrNameAttributeError",e[e["GenericIssue::FormLabelHasNeitherForNorNestedInput"]=72]="GenericIssue::FormLabelHasNeitherForNorNestedInput",e[e["GenericIssue::FormLabelForMatchesNonExistingIdError"]=73]="GenericIssue::FormLabelForMatchesNonExistingIdError",e[e["GenericIssue::FormHasPasswordFieldWithoutUsernameFieldError"]=74]="GenericIssue::FormHasPasswordFieldWithoutUsernameFieldError",e[e["GenericIssue::FormInputHasWrongButWellIntendedAutocompleteValueError"]=75]="GenericIssue::FormInputHasWrongButWellIntendedAutocompleteValueError",e[e["StylesheetLoadingIssue::LateImportRule"]=76]="StylesheetLoadingIssue::LateImportRule",e[e["StylesheetLoadingIssue::RequestFailed"]=77]="StylesheetLoadingIssue::RequestFailed",e[e.MaxValue=78]="MaxValue"}(B||(B={})),function(e){e[e.LoadThroughPageViaTarget=0]="LoadThroughPageViaTarget",e[e.LoadThroughPageViaFrame=1]="LoadThroughPageViaFrame",e[e.LoadThroughPageFailure=2]="LoadThroughPageFailure",e[e.LoadThroughPageFallback=3]="LoadThroughPageFallback",e[e.FallbackAfterFailure=4]="FallbackAfterFailure",e[e.FallbackPerOverride=5]="FallbackPerOverride",e[e.FallbackPerProtocol=6]="FallbackPerProtocol",e[e.FallbackFailure=7]="FallbackFailure",e[e.MaxValue=8]="MaxValue"}(j||(j={})),function(e){e[e.SchemeOther=0]="SchemeOther",e[e.SchemeUnknown=1]="SchemeUnknown",e[e.SchemeHttp=2]="SchemeHttp",e[e.SchemeHttps=3]="SchemeHttps",e[e.SchemeHttpLocalhost=4]="SchemeHttpLocalhost",e[e.SchemeHttpsLocalhost=5]="SchemeHttpsLocalhost",e[e.SchemeData=6]="SchemeData",e[e.SchemeFile=7]="SchemeFile",e[e.SchemeBlob=8]="SchemeBlob",e[e.MaxValue=9]="MaxValue"}(G||(G={})),function(e){e[e.ContextMenu=0]="ContextMenu",e[e.MemoryIcon=1]="MemoryIcon",e[e.MaxValue=2]="MaxValue"}(z||(z={})),function(e){e[e.DWARFInspectableAddress=0]="DWARFInspectableAddress",e[e.ArrayBuffer=1]="ArrayBuffer",e[e.DataView=2]="DataView",e[e.TypedArray=3]="TypedArray",e[e.WebAssemblyMemory=4]="WebAssemblyMemory",e[e.MaxValue=5]="MaxValue"}(q||(q={})),function(e){e[e.af=1]="af",e[e.am=2]="am",e[e.ar=3]="ar",e[e.as=4]="as",e[e.az=5]="az",e[e.be=6]="be",e[e.bg=7]="bg",e[e.bn=8]="bn",e[e.bs=9]="bs",e[e.ca=10]="ca",e[e.cs=11]="cs",e[e.cy=12]="cy",e[e.da=13]="da",e[e.de=14]="de",e[e.el=15]="el",e[e["en-GB"]=16]="en-GB",e[e["en-US"]=17]="en-US",e[e["es-419"]=18]="es-419",e[e.es=19]="es",e[e.et=20]="et",e[e.eu=21]="eu",e[e.fa=22]="fa",e[e.fi=23]="fi",e[e.fil=24]="fil",e[e["fr-CA"]=25]="fr-CA",e[e.fr=26]="fr",e[e.gl=27]="gl",e[e.gu=28]="gu",e[e.he=29]="he",e[e.hi=30]="hi",e[e.hr=31]="hr",e[e.hu=32]="hu",e[e.hy=33]="hy",e[e.id=34]="id",e[e.is=35]="is",e[e.it=36]="it",e[e.ja=37]="ja",e[e.ka=38]="ka",e[e.kk=39]="kk",e[e.km=40]="km",e[e.kn=41]="kn",e[e.ko=42]="ko",e[e.ky=43]="ky",e[e.lo=44]="lo",e[e.lt=45]="lt",e[e.lv=46]="lv",e[e.mk=47]="mk",e[e.ml=48]="ml",e[e.mn=49]="mn",e[e.mr=50]="mr",e[e.ms=51]="ms",e[e.my=52]="my",e[e.ne=53]="ne",e[e.nl=54]="nl",e[e.no=55]="no",e[e.or=56]="or",e[e.pa=57]="pa",e[e.pl=58]="pl",e[e["pt-PT"]=59]="pt-PT",e[e.pt=60]="pt",e[e.ro=61]="ro",e[e.ru=62]="ru",e[e.si=63]="si",e[e.sk=64]="sk",e[e.sl=65]="sl",e[e.sq=66]="sq",e[e["sr-Latn"]=67]="sr-Latn",e[e.sr=68]="sr",e[e.sv=69]="sv",e[e.sw=70]="sw",e[e.ta=71]="ta",e[e.te=72]="te",e[e.th=73]="th",e[e.tr=74]="tr",e[e.uk=75]="uk",e[e.ur=76]="ur",e[e.uz=77]="uz",e[e.vi=78]="vi",e[e.zh=79]="zh",e[e["zh-HK"]=80]="zh-HK",e[e["zh-TW"]=81]="zh-TW",e[e.zu=82]="zu",e[e.MaxValue=83]="MaxValue"}(J||(J={})),function(e){e[e.ChromeSyncDisabled=1]="ChromeSyncDisabled",e[e.ChromeSyncSettingsDisabled=2]="ChromeSyncSettingsDisabled",e[e.DevToolsSyncSettingDisabled=3]="DevToolsSyncSettingDisabled",e[e.DevToolsSyncSettingEnabled=4]="DevToolsSyncSettingEnabled",e[e.MaxValue=5]="MaxValue"}(K||(K={})),function(e){e[e.RecordingStarted=1]="RecordingStarted",e[e.RecordingFinished=2]="RecordingFinished",e[e.MaxValue=3]="MaxValue"}(Q||(Q={})),function(e){e[e.AssertionAdded=1]="AssertionAdded",e[e.PropertyAssertionEdited=2]="PropertyAssertionEdited",e[e.AttributeAssertionEdited=3]="AttributeAssertionEdited",e[e.MaxValue=4]="MaxValue"}(X||(X={})),function(e){e[e.Success=1]="Success",e[e.TimeoutErrorSelectors=2]="TimeoutErrorSelectors",e[e.TimeoutErrorTarget=3]="TimeoutErrorTarget",e[e.OtherError=4]="OtherError",e[e.MaxValue=5]="MaxValue"}(Z||(Z={})),function(e){e[e.Normal=1]="Normal",e[e.Slow=2]="Slow",e[e.VerySlow=3]="VerySlow",e[e.ExtremelySlow=4]="ExtremelySlow",e[e.MaxValue=5]="MaxValue"}($||($={})),function(e){e[e.ReplayOnly=1]="ReplayOnly",e[e.ReplayWithPerformanceTracing=2]="ReplayWithPerformanceTracing",e[e.ReplayViaExtension=3]="ReplayViaExtension",e[e.MaxValue=4]="MaxValue"}(Y||(Y={})),function(e){e[e.SelectorPickerUsed=1]="SelectorPickerUsed",e[e.StepAdded=2]="StepAdded",e[e.StepRemoved=3]="StepRemoved",e[e.SelectorAdded=4]="SelectorAdded",e[e.SelectorRemoved=5]="SelectorRemoved",e[e.SelectorPartAdded=6]="SelectorPartAdded",e[e.SelectorPartEdited=7]="SelectorPartEdited",e[e.SelectorPartRemoved=8]="SelectorPartRemoved",e[e.TypeChanged=9]="TypeChanged",e[e.OtherEditing=10]="OtherEditing",e[e.MaxValue=11]="MaxValue"}(ee||(ee={})),function(e){e[e.ToPuppeteer=1]="ToPuppeteer",e[e.ToJSON=2]="ToJSON",e[e.ToPuppeteerReplay=3]="ToPuppeteerReplay",e[e.ToExtension=4]="ToExtension",e[e.ToLighthouse=5]="ToLighthouse",e[e.MaxValue=6]="MaxValue"}(oe||(oe={})),function(e){e[e.CodeShown=1]="CodeShown",e[e.CodeHidden=2]="CodeHidden",e[e.MaxValue=3]="MaxValue"}(re||(re={})),function(e){e[e.CopiedRecordingWithPuppeteer=1]="CopiedRecordingWithPuppeteer",e[e.CopiedRecordingWithJSON=2]="CopiedRecordingWithJSON",e[e.CopiedRecordingWithReplay=3]="CopiedRecordingWithReplay",e[e.CopiedRecordingWithExtension=4]="CopiedRecordingWithExtension",e[e.CopiedStepWithPuppeteer=5]="CopiedStepWithPuppeteer",e[e.CopiedStepWithJSON=6]="CopiedStepWithJSON",e[e.CopiedStepWithReplay=7]="CopiedStepWithReplay",e[e.CopiedStepWithExtension=8]="CopiedStepWithExtension",e[e.MaxValue=9]="MaxValue"}(te||(te={})),function(e){e[e.false=0]="false",e[e.true=1]="true",e[e.MaxValue=2]="MaxValue"}(ne||(ne={})),function(e){e[e.DeclarationViaChangedLine=1]="DeclarationViaChangedLine",e[e.AllChangesViaStylesPane=2]="AllChangesViaStylesPane",e[e.DeclarationViaContextMenu=3]="DeclarationViaContextMenu",e[e.PropertyViaContextMenu=4]="PropertyViaContextMenu",e[e.ValueViaContextMenu=5]="ValueViaContextMenu",e[e.DeclarationAsJSViaContextMenu=6]="DeclarationAsJSViaContextMenu",e[e.RuleViaContextMenu=7]="RuleViaContextMenu",e[e.AllDeclarationsViaContextMenu=8]="AllDeclarationsViaContextMenu",e[e.AllDeclarationsAsJSViaContextMenu=9]="AllDeclarationsAsJSViaContextMenu",e[e.SelectorViaContextMenu=10]="SelectorViaContextMenu",e[e.MaxValue=11]="MaxValue"}(ie||(ie={})),function(e){e[e.OtherSection=0]="OtherSection",e[e.Identity=1]="Identity",e[e.Presentation=2]="Presentation",e[e["Protocol Handlers"]=3]="Protocol Handlers",e[e.Icons=4]="Icons",e[e["Window Controls Overlay"]=5]="Window Controls Overlay",e[e.MaxValue=6]="MaxValue"}(se||(se={})),function(e){e[e.Other=0]="Other",e[e.AlignContent=1]="AlignContent",e[e.FlexItem=2]="FlexItem",e[e.FlexContainer=3]="FlexContainer",e[e.GridContainer=4]="GridContainer",e[e.GridItem=5]="GridItem",e[e.FlexGrid=6]="FlexGrid",e[e.MulticolFlexGrid=7]="MulticolFlexGrid",e[e.Padding=8]="Padding",e[e.Position=9]="Position",e[e.ZIndex=10]="ZIndex",e[e.Sizing=11]="Sizing",e[e.FlexOrGridItem=12]="FlexOrGridItem",e[e.FontVariationSettings=13]="FontVariationSettings",e[e.MaxValue=14]="MaxValue"}(ae||(ae={})),function(e){e[e.Navigation=0]="Navigation",e[e.Timespan=1]="Timespan",e[e.Snapshot=2]="Snapshot",e[e.LegacyNavigation=3]="LegacyNavigation",e[e.MaxValue=4]="MaxValue"}(de||(de={}));var ue=Object.freeze({__proto__:null,UserMetrics:ce,get Action(){return F},get PanelCodes(){return D},get ElementsSidebarTabCodes(){return L},get SourcesSidebarTabCodes(){return A},get MediaTypes(){return V},get KeybindSetSettings(){return O},get KeyboardShortcutAction(){return H},get IssueOpener(){return N},get DevtoolsExperiments(){return W},get IssueExpanded(){return _},get IssueResourceOpened(){return U},get IssueCreated(){return B},get DeveloperResourceLoaded(){return j},get DeveloperResourceScheme(){return G},get LinearMemoryInspectorRevealedFrom(){return z},get LinearMemoryInspectorTarget(){return q},get Language(){return J},get SyncSetting(){return K},get RecordingToggled(){return Q},get RecordingAssertion(){return X},get RecordingReplayFinished(){return Z},get RecordingReplaySpeed(){return $},get RecordingReplayStarted(){return Y},get RecordingEdited(){return ee},get RecordingExported(){return oe},get RecordingCodeToggled(){return re},get RecordingCopiedToClipboard(){return te},get ConsoleShowsCorsErrors(){return ne},get StyleTextCopied(){return ie},get ManifestSectionCodes(){return se},get CSSHintType(){return ae},get LighthouseModeRun(){return de}});const me=new ce;export{w as InspectorFrontendHost,a as InspectorFrontendHostAPI,le as Platform,C as ResourceLoader,ue as UserMetrics,me as userMetrics}; diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/i18n/i18n.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/i18n/i18n.js deleted file mode 100644 index 2718d5339..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/i18n/i18n.js +++ /dev/null @@ -1 +0,0 @@ -import*as e from"../../third_party/i18n/i18n.js";import*as t from"../platform/platform.js";import*as o from"../root/root.js";let n=null;class r{locale;lookupClosestDevToolsLocale;constructor(e){this.lookupClosestDevToolsLocale=e.lookupClosestDevToolsLocale,"browserLanguage"===e.settingLanguage?this.locale=e.navigatorLanguage||"en-US":this.locale=e.settingLanguage,this.locale=this.lookupClosestDevToolsLocale(this.locale)}static instance(e={create:!1}){if(!n&&!e.create)throw new Error("No LanguageSelector instance exists yet.");return e.create&&(n=new r(e.data)),n}static removeInstance(){n=null}forceFallbackLocale(){this.locale="en-US"}languageIsSupportedByDevTools(e){return s(e,this.lookupClosestDevToolsLocale(e))}}function s(e,t){const o=new Intl.Locale(e),n=new Intl.Locale(t);return o.language===n.language}var i=Object.freeze({__proto__:null,DevToolsLocale:r,localeLanguagesMatch:s});const l=new e.I18n.I18n(["af","am","ar","as","az","be","bg","bn","bs","ca","cs","cy","da","de","el","en-GB","es-419","es","et","eu","fa","fi","fil","fr-CA","fr","gl","gu","he","hi","hr","hu","hy","id","is","it","ja","ka","kk","km","kn","ko","ky","lo","lt","lv","mk","ml","mn","mr","ms","my","ne","nl","no","or","pa","pl","pt-PT","pt","ro","ru","si","sk","sl","sq","sr-Latn","sr","sv","sw","ta","te","th","tr","uk","ur","uz","vi","zh-HK","zh-TW","zu","en-US","zh"],"en-US"),a=new Set(["en-US","zh"]);function c(e,t,o={}){return e.getLocalizedStringSetFor(r.instance().locale).getLocalizedString(t,o)}function u(e,t){return l.registerFileStrings(e,t)}var g=Object.freeze({__proto__:null,lookupClosestSupportedDevToolsLocale:function(e){return l.lookupClosestSupportedLocale(e)},getAllSupportedDevToolsLocales:function(){return[...l.supportedLocales]},fetchAndRegisterLocaleData:async function(e,t=self.location.toString()){const n=fetch(function(e,t){const n=o.Runtime.getRemoteBase(t);if(n&&n.version&&!a.has(e))return"@HOST@/remote/serve_file/@VERSION@/core/i18n/locales/@LOCALE@.json".replace("@HOST@","devtools://devtools").replace("@VERSION@",n.version).replace("@LOCALE@",e);const r="./locales/@LOCALE@.json".replace("@LOCALE@",e);return new URL(r,import.meta.url).toString()}(e,t)).then((e=>e.json())),r=new Promise(((e,t)=>window.setTimeout((()=>t(new Error("timed out fetching locale"))),5e3))),s=await Promise.race([r,n]);l.registerLocaleData(e,s)},getLazilyComputedLocalizedString:function(e,t,o={}){return()=>c(e,t,o)},getLocalizedString:c,registerUIStrings:u,getFormatLocalizedString:function(e,t,o){const n=e.getLocalizedStringSetFor(r.instance().locale).getMessageFormatterFor(t),s=document.createElement("span");for(const e of n.getAst())if(1===e.type){const t=o[e.value];t&&s.append(t)}else"value"in e&&s.append(String(e.value));return s},serializeUIString:function(e,t={}){const o={string:e,values:t};return JSON.stringify(o)},deserializeUIString:function(e){return e?JSON.parse(e):{string:"",values:{}}},lockedString:function(e){return e},lockedLazyString:function(e){return()=>e},getLocalizedLanguageRegion:function(e,t){const o=new Intl.Locale(e),n=o.language||"en",r=o.baseName||"en-US",s=n===new Intl.Locale(t.locale).language?"en":r,i=new Intl.DisplayNames([t.locale],{type:"language"}).of(n),l=new Intl.DisplayNames([s],{type:"language"}).of(n);let a="",c="";if(o.region){a=` (${new Intl.DisplayNames([t.locale],{type:"region",style:"short"}).of(o.region)})`,c=` (${new Intl.DisplayNames([s],{type:"region",style:"short"}).of(o.region)})`}return`${i}${a} - ${l}${c}`}});const f={fmms:"{PH1} μs",fms:"{PH1} ms",fs:"{PH1} s",fmin:"{PH1} min",fhrs:"{PH1} hrs",fdays:"{PH1} days"},p=u("core/i18n/time-utilities.ts",f),m=c.bind(void 0,p),L=function(e,t){if(!isFinite(e))return"-";if(0===e)return"0";if(t&&e<.1)return m(f.fmms,{PH1:(1e3*e).toFixed(0)});if(t&&e<1e3)return m(f.fms,{PH1:e.toFixed(2)});if(e<1e3)return m(f.fms,{PH1:e.toFixed(0)});const o=e/1e3;if(o<60)return m(f.fs,{PH1:o.toFixed(2)});const n=o/60;if(n<60)return m(f.fmin,{PH1:n.toFixed(1)});const r=n/60;if(r<24)return m(f.fhrs,{PH1:r.toFixed(1)});return m(f.fdays,{PH1:(r/24).toFixed(1)})};var d=Object.freeze({__proto__:null,preciseMillisToString:function(e,t){return t=t||0,m(f.fms,{PH1:e.toFixed(t)})},millisToString:L,secondsToString:function(e,t){return isFinite(e)?L(1e3*e,t):"-"}});export{i as DevToolsLocale,d as TimeUtilities,g as i18n}; diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/i18n/locales/en-US.json b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/i18n/locales/en-US.json deleted file mode 100644 index 9f9b24aa6..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/i18n/locales/en-US.json +++ /dev/null @@ -1 +0,0 @@ -{"core/common/ResourceType.ts | cspviolationreport":{"message":"CSPViolationReport"},"core/common/ResourceType.ts | css":{"message":"CSS"},"core/common/ResourceType.ts | doc":{"message":"Doc"},"core/common/ResourceType.ts | document":{"message":"Document"},"core/common/ResourceType.ts | documents":{"message":"Documents"},"core/common/ResourceType.ts | eventsource":{"message":"EventSource"},"core/common/ResourceType.ts | fetch":{"message":"Fetch"},"core/common/ResourceType.ts | font":{"message":"Font"},"core/common/ResourceType.ts | fonts":{"message":"Fonts"},"core/common/ResourceType.ts | image":{"message":"Image"},"core/common/ResourceType.ts | images":{"message":"Images"},"core/common/ResourceType.ts | img":{"message":"Img"},"core/common/ResourceType.ts | js":{"message":"JS"},"core/common/ResourceType.ts | manifest":{"message":"Manifest"},"core/common/ResourceType.ts | media":{"message":"Media"},"core/common/ResourceType.ts | other":{"message":"Other"},"core/common/ResourceType.ts | ping":{"message":"Ping"},"core/common/ResourceType.ts | preflight":{"message":"Preflight"},"core/common/ResourceType.ts | script":{"message":"Script"},"core/common/ResourceType.ts | scripts":{"message":"Scripts"},"core/common/ResourceType.ts | signedexchange":{"message":"SignedExchange"},"core/common/ResourceType.ts | stylesheet":{"message":"Stylesheet"},"core/common/ResourceType.ts | stylesheets":{"message":"Stylesheets"},"core/common/ResourceType.ts | texttrack":{"message":"TextTrack"},"core/common/ResourceType.ts | wasm":{"message":"Wasm"},"core/common/ResourceType.ts | webassembly":{"message":"WebAssembly"},"core/common/ResourceType.ts | webbundle":{"message":"WebBundle"},"core/common/ResourceType.ts | websocket":{"message":"WebSocket"},"core/common/ResourceType.ts | websockets":{"message":"WebSockets"},"core/common/ResourceType.ts | webtransport":{"message":"WebTransport"},"core/common/ResourceType.ts | ws":{"message":"WS"},"core/common/ResourceType.ts | xhrAndFetch":{"message":"XHR and Fetch"},"core/common/Revealer.ts | applicationPanel":{"message":"Application panel"},"core/common/Revealer.ts | changesDrawer":{"message":"Changes drawer"},"core/common/Revealer.ts | elementsPanel":{"message":"Elements panel"},"core/common/Revealer.ts | issuesView":{"message":"Issues view"},"core/common/Revealer.ts | networkPanel":{"message":"Network panel"},"core/common/Revealer.ts | sourcesPanel":{"message":"Sources panel"},"core/common/Revealer.ts | stylesSidebar":{"message":"styles sidebar"},"core/common/SettingRegistration.ts | adorner":{"message":"Adorner"},"core/common/SettingRegistration.ts | appearance":{"message":"Appearance"},"core/common/SettingRegistration.ts | console":{"message":"Console"},"core/common/SettingRegistration.ts | debugger":{"message":"Debugger"},"core/common/SettingRegistration.ts | elements":{"message":"Elements"},"core/common/SettingRegistration.ts | extension":{"message":"Extension"},"core/common/SettingRegistration.ts | global":{"message":"Global"},"core/common/SettingRegistration.ts | grid":{"message":"Grid"},"core/common/SettingRegistration.ts | memory":{"message":"Memory"},"core/common/SettingRegistration.ts | mobile":{"message":"Mobile"},"core/common/SettingRegistration.ts | network":{"message":"Network"},"core/common/SettingRegistration.ts | performance":{"message":"Performance"},"core/common/SettingRegistration.ts | persistence":{"message":"Persistence"},"core/common/SettingRegistration.ts | rendering":{"message":"Rendering"},"core/common/SettingRegistration.ts | sources":{"message":"Sources"},"core/common/SettingRegistration.ts | sync":{"message":"Sync"},"core/host/InspectorFrontendHost.ts | devtoolsS":{"message":"DevTools - {PH1}"},"core/host/ResourceLoader.ts | cacheError":{"message":"Cache error"},"core/host/ResourceLoader.ts | certificateError":{"message":"Certificate error"},"core/host/ResourceLoader.ts | certificateManagerError":{"message":"Certificate manager error"},"core/host/ResourceLoader.ts | connectionError":{"message":"Connection error"},"core/host/ResourceLoader.ts | decodingDataUrlFailed":{"message":"Decoding Data URL failed"},"core/host/ResourceLoader.ts | dnsResolverError":{"message":"DNS resolver error"},"core/host/ResourceLoader.ts | ftpError":{"message":"FTP error"},"core/host/ResourceLoader.ts | httpError":{"message":"HTTP error"},"core/host/ResourceLoader.ts | httpErrorStatusCodeSS":{"message":"HTTP error: status code {PH1}, {PH2}"},"core/host/ResourceLoader.ts | invalidUrl":{"message":"Invalid URL"},"core/host/ResourceLoader.ts | signedExchangeError":{"message":"Signed Exchange error"},"core/host/ResourceLoader.ts | systemError":{"message":"System error"},"core/host/ResourceLoader.ts | unknownError":{"message":"Unknown error"},"core/i18n/time-utilities.ts | fdays":{"message":"{PH1} days"},"core/i18n/time-utilities.ts | fhrs":{"message":"{PH1} hrs"},"core/i18n/time-utilities.ts | fmin":{"message":"{PH1} min"},"core/i18n/time-utilities.ts | fmms":{"message":"{PH1} μs"},"core/i18n/time-utilities.ts | fms":{"message":"{PH1} ms"},"core/i18n/time-utilities.ts | fs":{"message":"{PH1} s"},"core/sdk/CompilerSourceMappingContentProvider.ts | couldNotLoadContentForSS":{"message":"Could not load content for {PH1} ({PH2})"},"core/sdk/ConsoleModel.ts | bfcacheNavigation":{"message":"Navigation to {PH1} was restored from back/forward cache (see https://web.dev/bfcache/)"},"core/sdk/ConsoleModel.ts | failedToSaveToTempVariable":{"message":"Failed to save to temp variable."},"core/sdk/ConsoleModel.ts | navigatedToS":{"message":"Navigated to {PH1}"},"core/sdk/ConsoleModel.ts | profileSFinished":{"message":"Profile ''{PH1}'' finished."},"core/sdk/ConsoleModel.ts | profileSStarted":{"message":"Profile ''{PH1}'' started."},"core/sdk/CPUProfilerModel.ts | profileD":{"message":"Profile {PH1}"},"core/sdk/CSSStyleSheetHeader.ts | couldNotFindTheOriginalStyle":{"message":"Could not find the original style sheet."},"core/sdk/CSSStyleSheetHeader.ts | thereWasAnErrorRetrievingThe":{"message":"There was an error retrieving the source styles."},"core/sdk/DebuggerModel.ts | block":{"message":"Block"},"core/sdk/DebuggerModel.ts | catchBlock":{"message":"Catch block"},"core/sdk/DebuggerModel.ts | closure":{"message":"Closure"},"core/sdk/DebuggerModel.ts | expression":{"message":"Expression"},"core/sdk/DebuggerModel.ts | global":{"message":"Global"},"core/sdk/DebuggerModel.ts | local":{"message":"Local"},"core/sdk/DebuggerModel.ts | module":{"message":"Module"},"core/sdk/DebuggerModel.ts | script":{"message":"Script"},"core/sdk/DebuggerModel.ts | withBlock":{"message":"With block"},"core/sdk/DOMDebuggerModel.ts | animation":{"message":"Animation"},"core/sdk/DOMDebuggerModel.ts | animationFrameFired":{"message":"Animation Frame Fired"},"core/sdk/DOMDebuggerModel.ts | cancelAnimationFrame":{"message":"Cancel Animation Frame"},"core/sdk/DOMDebuggerModel.ts | canvas":{"message":"Canvas"},"core/sdk/DOMDebuggerModel.ts | clipboard":{"message":"Clipboard"},"core/sdk/DOMDebuggerModel.ts | closeAudiocontext":{"message":"Close AudioContext"},"core/sdk/DOMDebuggerModel.ts | control":{"message":"Control"},"core/sdk/DOMDebuggerModel.ts | createAudiocontext":{"message":"Create AudioContext"},"core/sdk/DOMDebuggerModel.ts | createCanvasContext":{"message":"Create canvas context"},"core/sdk/DOMDebuggerModel.ts | device":{"message":"Device"},"core/sdk/DOMDebuggerModel.ts | domMutation":{"message":"DOM Mutation"},"core/sdk/DOMDebuggerModel.ts | dragDrop":{"message":"Drag / drop"},"core/sdk/DOMDebuggerModel.ts | geolocation":{"message":"Geolocation"},"core/sdk/DOMDebuggerModel.ts | keyboard":{"message":"Keyboard"},"core/sdk/DOMDebuggerModel.ts | load":{"message":"Load"},"core/sdk/DOMDebuggerModel.ts | media":{"message":"Media"},"core/sdk/DOMDebuggerModel.ts | mouse":{"message":"Mouse"},"core/sdk/DOMDebuggerModel.ts | notification":{"message":"Notification"},"core/sdk/DOMDebuggerModel.ts | parse":{"message":"Parse"},"core/sdk/DOMDebuggerModel.ts | pictureinpicture":{"message":"Picture-in-Picture"},"core/sdk/DOMDebuggerModel.ts | pointer":{"message":"Pointer"},"core/sdk/DOMDebuggerModel.ts | policyViolations":{"message":"Policy Violations"},"core/sdk/DOMDebuggerModel.ts | requestAnimationFrame":{"message":"Request Animation Frame"},"core/sdk/DOMDebuggerModel.ts | resumeAudiocontext":{"message":"Resume AudioContext"},"core/sdk/DOMDebuggerModel.ts | script":{"message":"Script"},"core/sdk/DOMDebuggerModel.ts | scriptBlockedByContentSecurity":{"message":"Script Blocked by Content Security Policy"},"core/sdk/DOMDebuggerModel.ts | scriptBlockedDueToContent":{"message":"Script blocked due to Content Security Policy directive: {PH1}"},"core/sdk/DOMDebuggerModel.ts | scriptFirstStatement":{"message":"Script First Statement"},"core/sdk/DOMDebuggerModel.ts | setInnerhtml":{"message":"Set innerHTML"},"core/sdk/DOMDebuggerModel.ts | setTimeoutOrIntervalFired":{"message":"{PH1} fired"},"core/sdk/DOMDebuggerModel.ts | sinkViolations":{"message":"Sink Violations"},"core/sdk/DOMDebuggerModel.ts | suspendAudiocontext":{"message":"Suspend AudioContext"},"core/sdk/DOMDebuggerModel.ts | timer":{"message":"Timer"},"core/sdk/DOMDebuggerModel.ts | touch":{"message":"Touch"},"core/sdk/DOMDebuggerModel.ts | trustedTypeViolations":{"message":"Trusted Type Violations"},"core/sdk/DOMDebuggerModel.ts | webaudio":{"message":"WebAudio"},"core/sdk/DOMDebuggerModel.ts | webglErrorFired":{"message":"WebGL Error Fired"},"core/sdk/DOMDebuggerModel.ts | webglErrorFiredS":{"message":"WebGL Error Fired ({PH1})"},"core/sdk/DOMDebuggerModel.ts | webglWarningFired":{"message":"WebGL Warning Fired"},"core/sdk/DOMDebuggerModel.ts | window":{"message":"Window"},"core/sdk/DOMDebuggerModel.ts | worker":{"message":"Worker"},"core/sdk/DOMDebuggerModel.ts | xhr":{"message":"XHR"},"core/sdk/EventBreakpointsModel.ts | auctionWorklet":{"message":"Ad Auction Worklet"},"core/sdk/EventBreakpointsModel.ts | beforeBidderWorkletBiddingStart":{"message":"Bidder Bidding Phase Start"},"core/sdk/EventBreakpointsModel.ts | beforeBidderWorkletReportingStart":{"message":"Bidder Reporting Phase Start"},"core/sdk/EventBreakpointsModel.ts | beforeSellerWorkletReportingStart":{"message":"Seller Reporting Phase Start"},"core/sdk/EventBreakpointsModel.ts | beforeSellerWorkletScoringStart":{"message":"Seller Scoring Phase Start"},"core/sdk/NetworkManager.ts | crossoriginReadBlockingCorb":{"message":"Cross-Origin Read Blocking (CORB) blocked cross-origin response {PH1} with MIME type {PH2}. See https://www.chromestatus.com/feature/5629709824032768 for more details."},"core/sdk/NetworkManager.ts | fastG":{"message":"Fast 3G"},"core/sdk/NetworkManager.ts | noContentForPreflight":{"message":"No content available for preflight request"},"core/sdk/NetworkManager.ts | noContentForRedirect":{"message":"No content available because this request was redirected"},"core/sdk/NetworkManager.ts | noContentForWebSocket":{"message":"Content for WebSockets is currently not supported"},"core/sdk/NetworkManager.ts | noThrottling":{"message":"No throttling"},"core/sdk/NetworkManager.ts | offline":{"message":"Offline"},"core/sdk/NetworkManager.ts | requestWasBlockedByDevtoolsS":{"message":"Request was blocked by DevTools: \"{PH1}\""},"core/sdk/NetworkManager.ts | sFailedLoadingSS":{"message":"{PH1} failed loading: {PH2} \"{PH3}\"."},"core/sdk/NetworkManager.ts | sFinishedLoadingSS":{"message":"{PH1} finished loading: {PH2} \"{PH3}\"."},"core/sdk/NetworkManager.ts | slowG":{"message":"Slow 3G"},"core/sdk/NetworkRequest.ts | anUnknownErrorWasEncounteredWhenTrying":{"message":"An unknown error was encountered when trying to store this cookie."},"core/sdk/NetworkRequest.ts | binary":{"message":"(binary)"},"core/sdk/NetworkRequest.ts | blockedReasonInvalidDomain":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because its Domain attribute was invalid with regards to the current host url."},"core/sdk/NetworkRequest.ts | blockedReasonInvalidPrefix":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it used the \"__Secure-\" or \"__Host-\" prefix in its name and broke the additional rules applied to cookies with these prefixes as defined in https://tools.ietf.org/html/draft-west-cookie-prefixes-05."},"core/sdk/NetworkRequest.ts | blockedReasonOverwriteSecure":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it was not sent over a secure connection and would have overwritten a cookie with the Secure attribute."},"core/sdk/NetworkRequest.ts | blockedReasonSameSiteNoneInsecure":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it had the \"SameSite=None\" attribute but did not have the \"Secure\" attribute, which is required in order to use \"SameSite=None\"."},"core/sdk/NetworkRequest.ts | blockedReasonSameSiteStrictLax":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it had the \"{PH1}\" attribute but came from a cross-site response which was not the response to a top-level navigation."},"core/sdk/NetworkRequest.ts | blockedReasonSameSiteUnspecifiedTreatedAsLax":{"message":"This Set-Cookie header didn't specify a \"SameSite\" attribute and was defaulted to \"SameSite=Lax,\" and was blocked because it came from a cross-site response which was not the response to a top-level navigation. The Set-Cookie had to have been set with \"SameSite=None\" to enable cross-site usage."},"core/sdk/NetworkRequest.ts | blockedReasonSecureOnly":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it had the \"Secure\" attribute but was not received over a secure connection."},"core/sdk/NetworkRequest.ts | domainMismatch":{"message":"This cookie was blocked because neither did the request URL's domain exactly match the cookie's domain, nor was the request URL's domain a subdomain of the cookie's Domain attribute value."},"core/sdk/NetworkRequest.ts | nameValuePairExceedsMaxSize":{"message":"This cookie was blocked because it was too large. The combined size of the name and value must be less than or equal to 4096 characters."},"core/sdk/NetworkRequest.ts | notOnPath":{"message":"This cookie was blocked because its path was not an exact match for or a superdirectory of the request url's path."},"core/sdk/NetworkRequest.ts | samePartyFromCrossPartyContext":{"message":"This cookie was blocked because it had the \"SameParty\" attribute but the request was cross-party. The request was considered cross-party because the domain of the resource's URL and the domains of the resource's enclosing frames/documents are neither owners nor members in the same First-Party Set."},"core/sdk/NetworkRequest.ts | sameSiteLax":{"message":"This cookie was blocked because it had the \"SameSite=Lax\" attribute and the request was made from a different site and was not initiated by a top-level navigation."},"core/sdk/NetworkRequest.ts | sameSiteNoneInsecure":{"message":"This cookie was blocked because it had the \"SameSite=None\" attribute but was not marked \"Secure\". Cookies without SameSite restrictions must be marked \"Secure\" and sent over a secure connection."},"core/sdk/NetworkRequest.ts | sameSiteStrict":{"message":"This cookie was blocked because it had the \"SameSite=Strict\" attribute and the request was made from a different site. This includes top-level navigation requests initiated by other sites."},"core/sdk/NetworkRequest.ts | sameSiteUnspecifiedTreatedAsLax":{"message":"This cookie didn't specify a \"SameSite\" attribute when it was stored and was defaulted to \"SameSite=Lax,\" and was blocked because the request was made from a different site and was not initiated by a top-level navigation. The cookie had to have been set with \"SameSite=None\" to enable cross-site usage."},"core/sdk/NetworkRequest.ts | schemefulSameSiteLax":{"message":"This cookie was blocked because it had the \"SameSite=Lax\" attribute but the request was cross-site and was not initiated by a top-level navigation. This request is considered cross-site because the URL has a different scheme than the current site."},"core/sdk/NetworkRequest.ts | schemefulSameSiteStrict":{"message":"This cookie was blocked because it had the \"SameSite=Strict\" attribute but the request was cross-site. This includes top-level navigation requests initiated by other sites. This request is considered cross-site because the URL has a different scheme than the current site."},"core/sdk/NetworkRequest.ts | schemefulSameSiteUnspecifiedTreatedAsLax":{"message":"This cookie didn't specify a \"SameSite\" attribute when it was stored, was defaulted to \"SameSite=Lax\", and was blocked because the request was cross-site and was not initiated by a top-level navigation. This request is considered cross-site because the URL has a different scheme than the current site."},"core/sdk/NetworkRequest.ts | secureOnly":{"message":"This cookie was blocked because it had the \"Secure\" attribute and the connection was not secure."},"core/sdk/NetworkRequest.ts | setcookieHeaderIsIgnoredIn":{"message":"Set-Cookie header is ignored in response from url: {PH1}. The combined size of the name and value must be less than or equal to 4096 characters."},"core/sdk/NetworkRequest.ts | theSchemeOfThisConnectionIsNot":{"message":"The scheme of this connection is not allowed to store cookies."},"core/sdk/NetworkRequest.ts | thisSetcookieDidntSpecifyASamesite":{"message":"This Set-Cookie header didn't specify a \"SameSite\" attribute, was defaulted to \"SameSite=Lax\", and was blocked because it came from a cross-site response which was not the response to a top-level navigation. This response is considered cross-site because the URL has a different scheme than the current site."},"core/sdk/NetworkRequest.ts | thisSetcookieHadInvalidSyntax":{"message":"This Set-Cookie header had invalid syntax."},"core/sdk/NetworkRequest.ts | thisSetcookieWasBlockedBecauseItHadTheSameparty":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it had the \"SameParty\" attribute but the request was cross-party. The request was considered cross-party because the domain of the resource's URL and the domains of the resource's enclosing frames/documents are neither owners nor members in the same First-Party Set."},"core/sdk/NetworkRequest.ts | thisSetcookieWasBlockedBecauseItHadTheSamepartyAttribute":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it had the \"SameParty\" attribute but also had other conflicting attributes. Chrome requires cookies that use the \"SameParty\" attribute to also have the \"Secure\" attribute, and to not be restricted to \"SameSite=Strict\"."},"core/sdk/NetworkRequest.ts | thisSetcookieWasBlockedBecauseItHadTheSamesiteStrictLax":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it had the \"{PH1}\" attribute but came from a cross-site response which was not the response to a top-level navigation. This response is considered cross-site because the URL has a different scheme than the current site."},"core/sdk/NetworkRequest.ts | thisSetcookieWasBlockedBecauseTheNameValuePairExceedsMaxSize":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because the cookie was too large. The combined size of the name and value must be less than or equal to 4096 characters."},"core/sdk/NetworkRequest.ts | thisSetcookieWasBlockedDueToUser":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked due to user preferences."},"core/sdk/NetworkRequest.ts | unknownError":{"message":"An unknown error was encountered when trying to send this cookie."},"core/sdk/NetworkRequest.ts | userPreferences":{"message":"This cookie was blocked due to user preferences."},"core/sdk/OverlayModel.ts | pausedInDebugger":{"message":"Paused in debugger"},"core/sdk/PageResourceLoader.ts | loadCanceledDueToReloadOf":{"message":"Load canceled due to reload of inspected page"},"core/sdk/Script.ts | scriptRemovedOrDeleted":{"message":"Script removed or deleted."},"core/sdk/Script.ts | unableToFetchScriptSource":{"message":"Unable to fetch script source."},"core/sdk/sdk-meta.ts | achromatopsia":{"message":"Achromatopsia (no color)"},"core/sdk/sdk-meta.ts | blurredVision":{"message":"Blurred vision"},"core/sdk/sdk-meta.ts | captureAsyncStackTraces":{"message":"Capture async stack traces"},"core/sdk/sdk-meta.ts | deuteranopia":{"message":"Deuteranopia (no green)"},"core/sdk/sdk-meta.ts | disableAsyncStackTraces":{"message":"Disable async stack traces"},"core/sdk/sdk-meta.ts | disableAvifFormat":{"message":"Disable AVIF format"},"core/sdk/sdk-meta.ts | disableCache":{"message":"Disable cache (while DevTools is open)"},"core/sdk/sdk-meta.ts | disableJavascript":{"message":"Disable JavaScript"},"core/sdk/sdk-meta.ts | disableLocalFonts":{"message":"Disable local fonts"},"core/sdk/sdk-meta.ts | disableNetworkRequestBlocking":{"message":"Disable network request blocking"},"core/sdk/sdk-meta.ts | disableWebpFormat":{"message":"Disable WebP format"},"core/sdk/sdk-meta.ts | doNotCaptureAsyncStackTraces":{"message":"Do not capture async stack traces"},"core/sdk/sdk-meta.ts | doNotEmulateAFocusedPage":{"message":"Do not emulate a focused page"},"core/sdk/sdk-meta.ts | doNotEmulateAnyVisionDeficiency":{"message":"Do not emulate any vision deficiency"},"core/sdk/sdk-meta.ts | doNotEmulateCss":{"message":"Do not emulate CSS {PH1}"},"core/sdk/sdk-meta.ts | doNotEmulateCssMediaType":{"message":"Do not emulate CSS media type"},"core/sdk/sdk-meta.ts | doNotExtendGridLines":{"message":"Do not extend grid lines"},"core/sdk/sdk-meta.ts | doNotHighlightAdFrames":{"message":"Do not highlight ad frames"},"core/sdk/sdk-meta.ts | doNotPauseOnExceptions":{"message":"Do not pause on exceptions"},"core/sdk/sdk-meta.ts | doNotPreserveLogUponNavigation":{"message":"Do not preserve log upon navigation"},"core/sdk/sdk-meta.ts | doNotShowGridNamedAreas":{"message":"Do not show grid named areas"},"core/sdk/sdk-meta.ts | doNotShowGridTrackSizes":{"message":"Do not show grid track sizes"},"core/sdk/sdk-meta.ts | doNotShowRulersOnHover":{"message":"Do not show rulers on hover"},"core/sdk/sdk-meta.ts | emulateAchromatopsia":{"message":"Emulate achromatopsia (no color)"},"core/sdk/sdk-meta.ts | emulateAFocusedPage":{"message":"Emulate a focused page"},"core/sdk/sdk-meta.ts | emulateAutoDarkMode":{"message":"Emulate auto dark mode"},"core/sdk/sdk-meta.ts | emulateBlurredVision":{"message":"Emulate blurred vision"},"core/sdk/sdk-meta.ts | emulateCss":{"message":"Emulate CSS {PH1}"},"core/sdk/sdk-meta.ts | emulateCssMediaFeature":{"message":"Emulate CSS media feature {PH1}"},"core/sdk/sdk-meta.ts | emulateCssMediaType":{"message":"Emulate CSS media type"},"core/sdk/sdk-meta.ts | emulateCssPrintMediaType":{"message":"Emulate CSS print media type"},"core/sdk/sdk-meta.ts | emulateCssScreenMediaType":{"message":"Emulate CSS screen media type"},"core/sdk/sdk-meta.ts | emulateDeuteranopia":{"message":"Emulate deuteranopia (no green)"},"core/sdk/sdk-meta.ts | emulateProtanopia":{"message":"Emulate protanopia (no red)"},"core/sdk/sdk-meta.ts | emulateReducedContrast":{"message":"Emulate reduced contrast"},"core/sdk/sdk-meta.ts | emulateTritanopia":{"message":"Emulate tritanopia (no blue)"},"core/sdk/sdk-meta.ts | emulateVisionDeficiencies":{"message":"Emulate vision deficiencies"},"core/sdk/sdk-meta.ts | enableAvifFormat":{"message":"Enable AVIF format"},"core/sdk/sdk-meta.ts | enableCache":{"message":"Enable cache"},"core/sdk/sdk-meta.ts | enableCustomFormatters":{"message":"Enable custom formatters"},"core/sdk/sdk-meta.ts | enableJavascript":{"message":"Enable JavaScript"},"core/sdk/sdk-meta.ts | enableLocalFonts":{"message":"Enable local fonts"},"core/sdk/sdk-meta.ts | enableNetworkRequestBlocking":{"message":"Enable network request blocking"},"core/sdk/sdk-meta.ts | enableRemoteFileLoading":{"message":"Allow DevTools to load resources, such as source maps, from remote file paths. Disabled by default for security reasons."},"core/sdk/sdk-meta.ts | enableWebpFormat":{"message":"Enable WebP format"},"core/sdk/sdk-meta.ts | extendGridLines":{"message":"Extend grid lines"},"core/sdk/sdk-meta.ts | hideCoreWebVitalsOverlay":{"message":"Hide Core Web Vitals overlay"},"core/sdk/sdk-meta.ts | hideFramesPerSecondFpsMeter":{"message":"Hide frames per second (FPS) meter"},"core/sdk/sdk-meta.ts | hideLayerBorders":{"message":"Hide layer borders"},"core/sdk/sdk-meta.ts | hideLayoutShiftRegions":{"message":"Hide layout shift regions"},"core/sdk/sdk-meta.ts | hideLineLabels":{"message":"Hide line labels"},"core/sdk/sdk-meta.ts | hidePaintFlashingRectangles":{"message":"Hide paint flashing rectangles"},"core/sdk/sdk-meta.ts | hideScrollPerformanceBottlenecks":{"message":"Hide scroll performance bottlenecks"},"core/sdk/sdk-meta.ts | highlightAdFrames":{"message":"Highlight ad frames"},"core/sdk/sdk-meta.ts | noEmulation":{"message":"No emulation"},"core/sdk/sdk-meta.ts | pauseOnExceptions":{"message":"Pause on exceptions"},"core/sdk/sdk-meta.ts | preserveLogUponNavigation":{"message":"Preserve log upon navigation"},"core/sdk/sdk-meta.ts | print":{"message":"print"},"core/sdk/sdk-meta.ts | protanopia":{"message":"Protanopia (no red)"},"core/sdk/sdk-meta.ts | query":{"message":"query"},"core/sdk/sdk-meta.ts | reducedContrast":{"message":"Reduced contrast"},"core/sdk/sdk-meta.ts | screen":{"message":"screen"},"core/sdk/sdk-meta.ts | showAreaNames":{"message":"Show area names"},"core/sdk/sdk-meta.ts | showCoreWebVitalsOverlay":{"message":"Show Core Web Vitals overlay"},"core/sdk/sdk-meta.ts | showFramesPerSecondFpsMeter":{"message":"Show frames per second (FPS) meter"},"core/sdk/sdk-meta.ts | showGridNamedAreas":{"message":"Show grid named areas"},"core/sdk/sdk-meta.ts | showGridTrackSizes":{"message":"Show grid track sizes"},"core/sdk/sdk-meta.ts | showLayerBorders":{"message":"Show layer borders"},"core/sdk/sdk-meta.ts | showLayoutShiftRegions":{"message":"Show layout shift regions"},"core/sdk/sdk-meta.ts | showLineLabels":{"message":"Show line labels"},"core/sdk/sdk-meta.ts | showLineNames":{"message":"Show line names"},"core/sdk/sdk-meta.ts | showLineNumbers":{"message":"Show line numbers"},"core/sdk/sdk-meta.ts | showPaintFlashingRectangles":{"message":"Show paint flashing rectangles"},"core/sdk/sdk-meta.ts | showRulersOnHover":{"message":"Show rulers on hover"},"core/sdk/sdk-meta.ts | showScrollPerformanceBottlenecks":{"message":"Show scroll performance bottlenecks"},"core/sdk/sdk-meta.ts | showTrackSizes":{"message":"Show track sizes"},"core/sdk/sdk-meta.ts | tritanopia":{"message":"Tritanopia (no blue)"},"core/sdk/ServerTiming.ts | deprecatedSyntaxFoundPleaseUse":{"message":"Deprecated syntax found. Please use: ;dur=;desc="},"core/sdk/ServerTiming.ts | duplicateParameterSIgnored":{"message":"Duplicate parameter \"{PH1}\" ignored."},"core/sdk/ServerTiming.ts | extraneousTrailingCharacters":{"message":"Extraneous trailing characters."},"core/sdk/ServerTiming.ts | noValueFoundForParameterS":{"message":"No value found for parameter \"{PH1}\"."},"core/sdk/ServerTiming.ts | unableToParseSValueS":{"message":"Unable to parse \"{PH1}\" value \"{PH2}\"."},"core/sdk/ServerTiming.ts | unrecognizedParameterS":{"message":"Unrecognized parameter \"{PH1}\"."},"core/sdk/ServiceWorkerCacheModel.ts | serviceworkercacheagentError":{"message":"ServiceWorkerCacheAgent error deleting cache entry {PH1} in cache: {PH2}"},"core/sdk/ServiceWorkerManager.ts | activated":{"message":"activated"},"core/sdk/ServiceWorkerManager.ts | activating":{"message":"activating"},"core/sdk/ServiceWorkerManager.ts | installed":{"message":"installed"},"core/sdk/ServiceWorkerManager.ts | installing":{"message":"installing"},"core/sdk/ServiceWorkerManager.ts | new":{"message":"new"},"core/sdk/ServiceWorkerManager.ts | redundant":{"message":"redundant"},"core/sdk/ServiceWorkerManager.ts | running":{"message":"running"},"core/sdk/ServiceWorkerManager.ts | sSS":{"message":"{PH1} #{PH2} ({PH3})"},"core/sdk/ServiceWorkerManager.ts | starting":{"message":"starting"},"core/sdk/ServiceWorkerManager.ts | stopped":{"message":"stopped"},"core/sdk/ServiceWorkerManager.ts | stopping":{"message":"stopping"},"entrypoints/inspector_main/inspector_main-meta.ts | autoOpenDevTools":{"message":"Auto-open DevTools for popups"},"entrypoints/inspector_main/inspector_main-meta.ts | blockAds":{"message":"Block ads on this site"},"entrypoints/inspector_main/inspector_main-meta.ts | colorVisionDeficiency":{"message":"color vision deficiency"},"entrypoints/inspector_main/inspector_main-meta.ts | cssMediaFeature":{"message":"CSS media feature"},"entrypoints/inspector_main/inspector_main-meta.ts | cssMediaType":{"message":"CSS media type"},"entrypoints/inspector_main/inspector_main-meta.ts | disablePaused":{"message":"Disable paused state overlay"},"entrypoints/inspector_main/inspector_main-meta.ts | doNotAutoOpen":{"message":"Do not auto-open DevTools for popups"},"entrypoints/inspector_main/inspector_main-meta.ts | forceAdBlocking":{"message":"Force ad blocking on this site"},"entrypoints/inspector_main/inspector_main-meta.ts | fps":{"message":"fps"},"entrypoints/inspector_main/inspector_main-meta.ts | hardReloadPage":{"message":"Hard reload page"},"entrypoints/inspector_main/inspector_main-meta.ts | layout":{"message":"layout"},"entrypoints/inspector_main/inspector_main-meta.ts | paint":{"message":"paint"},"entrypoints/inspector_main/inspector_main-meta.ts | reloadPage":{"message":"Reload page"},"entrypoints/inspector_main/inspector_main-meta.ts | rendering":{"message":"Rendering"},"entrypoints/inspector_main/inspector_main-meta.ts | showAds":{"message":"Show ads on this site, if allowed"},"entrypoints/inspector_main/inspector_main-meta.ts | showRendering":{"message":"Show Rendering"},"entrypoints/inspector_main/inspector_main-meta.ts | toggleCssPrefersColorSchemeMedia":{"message":"Toggle CSS media feature prefers-color-scheme"},"entrypoints/inspector_main/inspector_main-meta.ts | visionDeficiency":{"message":"vision deficiency"},"entrypoints/inspector_main/InspectorMain.ts | javascriptIsDisabled":{"message":"JavaScript is disabled"},"entrypoints/inspector_main/InspectorMain.ts | main":{"message":"Main"},"entrypoints/inspector_main/InspectorMain.ts | openDedicatedTools":{"message":"Open dedicated DevTools for Node.js"},"entrypoints/inspector_main/InspectorMain.ts | tab":{"message":"Tab"},"entrypoints/inspector_main/OutermostTargetSelector.ts | targetNotSelected":{"message":"Page: Not selected"},"entrypoints/inspector_main/OutermostTargetSelector.ts | targetS":{"message":"Page: {PH1}"},"entrypoints/inspector_main/RenderingOptions.ts | coreWebVitals":{"message":"Core Web Vitals"},"entrypoints/inspector_main/RenderingOptions.ts | disableAvifImageFormat":{"message":"Disable AVIF image format"},"entrypoints/inspector_main/RenderingOptions.ts | disableLocalFonts":{"message":"Disable local fonts"},"entrypoints/inspector_main/RenderingOptions.ts | disablesLocalSourcesInFontface":{"message":"Disables local() sources in @font-face rules. Requires a page reload to apply."},"entrypoints/inspector_main/RenderingOptions.ts | disableWebpImageFormat":{"message":"Disable WebP image format"},"entrypoints/inspector_main/RenderingOptions.ts | emulateAFocusedPage":{"message":"Emulate a focused page"},"entrypoints/inspector_main/RenderingOptions.ts | emulateAutoDarkMode":{"message":"Enable automatic dark mode"},"entrypoints/inspector_main/RenderingOptions.ts | emulatesAFocusedPage":{"message":"Emulates a focused page."},"entrypoints/inspector_main/RenderingOptions.ts | emulatesAutoDarkMode":{"message":"Enables automatic dark mode and sets prefers-color-scheme to dark."},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssColorgamutMediaFeature":{"message":"Forces CSS color-gamut media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssForcedColors":{"message":"Forces CSS forced-colors media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssPreferscolorschemeMedia":{"message":"Forces CSS prefers-color-scheme media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssPreferscontrastMedia":{"message":"Forces CSS prefers-contrast media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssPrefersreduceddataMedia":{"message":"Forces CSS prefers-reduced-data media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssPrefersreducedmotion":{"message":"Forces CSS prefers-reduced-motion media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesMediaTypeForTestingPrint":{"message":"Forces media type for testing print and screen styles"},"entrypoints/inspector_main/RenderingOptions.ts | forcesVisionDeficiencyEmulation":{"message":"Forces vision deficiency emulation"},"entrypoints/inspector_main/RenderingOptions.ts | frameRenderingStats":{"message":"Frame Rendering Stats"},"entrypoints/inspector_main/RenderingOptions.ts | highlightAdFrames":{"message":"Highlight ad frames"},"entrypoints/inspector_main/RenderingOptions.ts | highlightsAreasOfThePageBlueThat":{"message":"Highlights areas of the page (blue) that were shifted. May not be suitable for people prone to photosensitive epilepsy."},"entrypoints/inspector_main/RenderingOptions.ts | highlightsAreasOfThePageGreen":{"message":"Highlights areas of the page (green) that need to be repainted. May not be suitable for people prone to photosensitive epilepsy."},"entrypoints/inspector_main/RenderingOptions.ts | highlightsElementsTealThatCan":{"message":"Highlights elements (teal) that can slow down scrolling, including touch & wheel event handlers and other main-thread scrolling situations."},"entrypoints/inspector_main/RenderingOptions.ts | highlightsFramesRedDetectedToBe":{"message":"Highlights frames (red) detected to be ads."},"entrypoints/inspector_main/RenderingOptions.ts | layerBorders":{"message":"Layer borders"},"entrypoints/inspector_main/RenderingOptions.ts | layoutShiftRegions":{"message":"Layout Shift Regions"},"entrypoints/inspector_main/RenderingOptions.ts | paintFlashing":{"message":"Paint flashing"},"entrypoints/inspector_main/RenderingOptions.ts | plotsFrameThroughputDropped":{"message":"Plots frame throughput, dropped frames distribution, and GPU memory."},"entrypoints/inspector_main/RenderingOptions.ts | requiresAPageReloadToApplyAnd":{"message":"Requires a page reload to apply and disables caching for image requests."},"entrypoints/inspector_main/RenderingOptions.ts | scrollingPerformanceIssues":{"message":"Scrolling performance issues"},"entrypoints/inspector_main/RenderingOptions.ts | showsAnOverlayWithCoreWebVitals":{"message":"Shows an overlay with Core Web Vitals."},"entrypoints/inspector_main/RenderingOptions.ts | showsLayerBordersOrangeoliveAnd":{"message":"Shows layer borders (orange/olive) and tiles (cyan)."},"entrypoints/js_app/js_app.ts | main":{"message":"Main"},"entrypoints/main/main-meta.ts | asAuthored":{"message":"As authored"},"entrypoints/main/main-meta.ts | auto":{"message":"auto"},"entrypoints/main/main-meta.ts | bottom":{"message":"Bottom"},"entrypoints/main/main-meta.ts | browserLanguage":{"message":"Browser UI language"},"entrypoints/main/main-meta.ts | cancelSearch":{"message":"Cancel search"},"entrypoints/main/main-meta.ts | colorFormat":{"message":"Color format:"},"entrypoints/main/main-meta.ts | colorFormatSettingDisabled":{"message":"This setting is deprecated because it is incompatible with modern color spaces. To re-enable it, disable the corresponding experiment."},"entrypoints/main/main-meta.ts | darkCapital":{"message":"Dark"},"entrypoints/main/main-meta.ts | darkLower":{"message":"dark"},"entrypoints/main/main-meta.ts | devtoolsDefault":{"message":"DevTools (Default)"},"entrypoints/main/main-meta.ts | dockToBottom":{"message":"Dock to bottom"},"entrypoints/main/main-meta.ts | dockToLeft":{"message":"Dock to left"},"entrypoints/main/main-meta.ts | dockToRight":{"message":"Dock to right"},"entrypoints/main/main-meta.ts | enableCtrlShortcutToSwitchPanels":{"message":"Enable Ctrl + 1-9 shortcut to switch panels"},"entrypoints/main/main-meta.ts | enableShortcutToSwitchPanels":{"message":"Enable ⌘ + 1-9 shortcut to switch panels"},"entrypoints/main/main-meta.ts | enableSync":{"message":"Enable settings sync"},"entrypoints/main/main-meta.ts | findNextResult":{"message":"Find next result"},"entrypoints/main/main-meta.ts | findPreviousResult":{"message":"Find previous result"},"entrypoints/main/main-meta.ts | focusDebuggee":{"message":"Focus debuggee"},"entrypoints/main/main-meta.ts | horizontal":{"message":"horizontal"},"entrypoints/main/main-meta.ts | language":{"message":"Language:"},"entrypoints/main/main-meta.ts | left":{"message":"Left"},"entrypoints/main/main-meta.ts | lightCapital":{"message":"Light"},"entrypoints/main/main-meta.ts | lightLower":{"message":"light"},"entrypoints/main/main-meta.ts | nextPanel":{"message":"Next panel"},"entrypoints/main/main-meta.ts | panelLayout":{"message":"Panel layout:"},"entrypoints/main/main-meta.ts | previousPanel":{"message":"Previous panel"},"entrypoints/main/main-meta.ts | reloadDevtools":{"message":"Reload DevTools"},"entrypoints/main/main-meta.ts | resetZoomLevel":{"message":"Reset zoom level"},"entrypoints/main/main-meta.ts | restoreLastDockPosition":{"message":"Restore last dock position"},"entrypoints/main/main-meta.ts | right":{"message":"Right"},"entrypoints/main/main-meta.ts | searchAsYouTypeCommand":{"message":"Enable search as you type"},"entrypoints/main/main-meta.ts | searchAsYouTypeSetting":{"message":"Search as you type"},"entrypoints/main/main-meta.ts | searchInPanel":{"message":"Search in panel"},"entrypoints/main/main-meta.ts | searchOnEnterCommand":{"message":"Disable search as you type (press Enter to search)"},"entrypoints/main/main-meta.ts | setColorFormatAsAuthored":{"message":"Set color format as authored"},"entrypoints/main/main-meta.ts | setColorFormatToHex":{"message":"Set color format to HEX"},"entrypoints/main/main-meta.ts | setColorFormatToHsl":{"message":"Set color format to HSL"},"entrypoints/main/main-meta.ts | setColorFormatToRgb":{"message":"Set color format to RGB"},"entrypoints/main/main-meta.ts | switchToDarkTheme":{"message":"Switch to dark theme"},"entrypoints/main/main-meta.ts | switchToLightTheme":{"message":"Switch to light theme"},"entrypoints/main/main-meta.ts | switchToSystemPreferredColor":{"message":"Switch to system preferred color theme"},"entrypoints/main/main-meta.ts | systemPreference":{"message":"System preference"},"entrypoints/main/main-meta.ts | theme":{"message":"Theme:"},"entrypoints/main/main-meta.ts | toggleDrawer":{"message":"Toggle drawer"},"entrypoints/main/main-meta.ts | undocked":{"message":"Undocked"},"entrypoints/main/main-meta.ts | undockIntoSeparateWindow":{"message":"Undock into separate window"},"entrypoints/main/main-meta.ts | useAutomaticPanelLayout":{"message":"Use automatic panel layout"},"entrypoints/main/main-meta.ts | useHorizontalPanelLayout":{"message":"Use horizontal panel layout"},"entrypoints/main/main-meta.ts | useVerticalPanelLayout":{"message":"Use vertical panel layout"},"entrypoints/main/main-meta.ts | vertical":{"message":"vertical"},"entrypoints/main/main-meta.ts | zoomIn":{"message":"Zoom in"},"entrypoints/main/main-meta.ts | zoomOut":{"message":"Zoom out"},"entrypoints/main/MainImpl.ts | customizeAndControlDevtools":{"message":"Customize and control DevTools"},"entrypoints/main/MainImpl.ts | dockSide":{"message":"Dock side"},"entrypoints/main/MainImpl.ts | dockSideNaviation":{"message":"Use left and right arrow keys to navigate the options"},"entrypoints/main/MainImpl.ts | dockToBottom":{"message":"Dock to bottom"},"entrypoints/main/MainImpl.ts | dockToLeft":{"message":"Dock to left"},"entrypoints/main/MainImpl.ts | dockToRight":{"message":"Dock to right"},"entrypoints/main/MainImpl.ts | focusDebuggee":{"message":"Focus debuggee"},"entrypoints/main/MainImpl.ts | help":{"message":"Help"},"entrypoints/main/MainImpl.ts | hideConsoleDrawer":{"message":"Hide console drawer"},"entrypoints/main/MainImpl.ts | moreTools":{"message":"More tools"},"entrypoints/main/MainImpl.ts | placementOfDevtoolsRelativeToThe":{"message":"Placement of DevTools relative to the page. ({PH1} to restore last position)"},"entrypoints/main/MainImpl.ts | showConsoleDrawer":{"message":"Show console drawer"},"entrypoints/main/MainImpl.ts | undockIntoSeparateWindow":{"message":"Undock into separate window"},"entrypoints/node_app/node_app.ts | connection":{"message":"Connection"},"entrypoints/node_app/node_app.ts | networkTitle":{"message":"Node"},"entrypoints/node_app/node_app.ts | node":{"message":"node"},"entrypoints/node_app/node_app.ts | showConnection":{"message":"Show Connection"},"entrypoints/node_app/node_app.ts | showNode":{"message":"Show Node"},"entrypoints/node_app/NodeConnectionsPanel.ts | addConnection":{"message":"Add connection"},"entrypoints/node_app/NodeConnectionsPanel.ts | networkAddressEgLocalhost":{"message":"Network address (e.g. localhost:9229)"},"entrypoints/node_app/NodeConnectionsPanel.ts | noConnectionsSpecified":{"message":"No connections specified"},"entrypoints/node_app/NodeConnectionsPanel.ts | nodejsDebuggingGuide":{"message":"Node.js debugging guide"},"entrypoints/node_app/NodeConnectionsPanel.ts | specifyNetworkEndpointAnd":{"message":"Specify network endpoint and DevTools will connect to it automatically. Read {PH1} to learn more."},"entrypoints/node_app/NodeMain.ts | main":{"message":"Main"},"entrypoints/node_app/NodeMain.ts | nodejsS":{"message":"Node.js: {PH1}"},"entrypoints/worker_app/WorkerMain.ts | main":{"message":"Main"},"generated/Deprecation.ts | AuthorizationCoveredByWildcard":{"message":"Authorization will not be covered by the wildcard symbol (*) in CORS Access-Control-Allow-Headers handling."},"generated/Deprecation.ts | CanRequestURLHTTPContainingNewline":{"message":"Resource requests whose URLs contained both removed whitespace \\(n|r|t) characters and less-than characters (<) are blocked. Please remove newlines and encode less-than characters from places like element attribute values in order to load these resources."},"generated/Deprecation.ts | ChromeLoadTimesConnectionInfo":{"message":"chrome.loadTimes() is deprecated, instead use standardized API: Navigation Timing 2."},"generated/Deprecation.ts | ChromeLoadTimesFirstPaintAfterLoadTime":{"message":"chrome.loadTimes() is deprecated, instead use standardized API: Paint Timing."},"generated/Deprecation.ts | ChromeLoadTimesWasAlternateProtocolAvailable":{"message":"chrome.loadTimes() is deprecated, instead use standardized API: nextHopProtocol in Navigation Timing 2."},"generated/Deprecation.ts | CookieWithTruncatingChar":{"message":"Cookies containing a \\(0|r|n) character will be rejected instead of truncated."},"generated/Deprecation.ts | CrossOriginAccessBasedOnDocumentDomain":{"message":"Relaxing the same-origin policy by setting document.domain is deprecated, and will be disabled by default. This deprecation warning is for a cross-origin access that was enabled by setting document.domain."},"generated/Deprecation.ts | CrossOriginWindowAlert":{"message":"Triggering window.alert from cross origin iframes has been deprecated and will be removed in the future."},"generated/Deprecation.ts | CrossOriginWindowConfirm":{"message":"Triggering window.confirm from cross origin iframes has been deprecated and will be removed in the future."},"generated/Deprecation.ts | CSSSelectorInternalMediaControlsOverlayCastButton":{"message":"The disableRemotePlayback attribute should be used in order to disable the default Cast integration instead of using -internal-media-controls-overlay-cast-button selector."},"generated/Deprecation.ts | DataUrlInSvgUse":{"message":"Support for data: URLs in SVGUseElement is deprecated and it will be removed in the future."},"generated/Deprecation.ts | DocumentDomainSettingWithoutOriginAgentClusterHeader":{"message":"Relaxing the same-origin policy by setting document.domain is deprecated, and will be disabled by default. To continue using this feature, please opt-out of origin-keyed agent clusters by sending an Origin-Agent-Cluster: ?0 header along with the HTTP response for the document and frames. See https://developer.chrome.com/blog/immutable-document-domain/ for more details."},"generated/Deprecation.ts | DOMMutationEvents":{"message":"DOM Mutation Events, including DOMSubtreeModified, DOMNodeInserted, DOMNodeRemoved, DOMNodeRemovedFromDocument, DOMNodeInsertedIntoDocument, and DOMCharacterDataModified are deprecated (https://w3c.github.io/uievents/#legacy-event-types) and will be removed. Please use MutationObserver instead."},"generated/Deprecation.ts | ExpectCTHeader":{"message":"The Expect-CT header is deprecated and will be removed. Chrome requires Certificate Transparency for all publicly trusted certificates issued after April 30, 2018."},"generated/Deprecation.ts | GeolocationInsecureOrigin":{"message":"getCurrentPosition() and watchPosition() no longer work on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details."},"generated/Deprecation.ts | GeolocationInsecureOriginDeprecatedNotRemoved":{"message":"getCurrentPosition() and watchPosition() are deprecated on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details."},"generated/Deprecation.ts | GetUserMediaInsecureOrigin":{"message":"getUserMedia() no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details."},"generated/Deprecation.ts | HostCandidateAttributeGetter":{"message":"RTCPeerConnectionIceErrorEvent.hostCandidate is deprecated. Please use RTCPeerConnectionIceErrorEvent.address or RTCPeerConnectionIceErrorEvent.port instead."},"generated/Deprecation.ts | IdentityInCanMakePaymentEvent":{"message":"The merchant origin and arbitrary data from the canmakepayment service worker event are deprecated and will be removed: topOrigin, paymentRequestOrigin, methodData, modifiers."},"generated/Deprecation.ts | InsecurePrivateNetworkSubresourceRequest":{"message":"The website requested a subresource from a network that it could only access because of its users' privileged network position. These requests expose non-public devices and servers to the internet, increasing the risk of a cross-site request forgery (CSRF) attack, and/or information leakage. To mitigate these risks, Chrome deprecates requests to non-public subresources when initiated from non-secure contexts, and will start blocking them."},"generated/Deprecation.ts | InterestGroupDailyUpdateUrl":{"message":"The dailyUpdateUrl field of InterestGroups passed to joinAdInterestGroup() has been renamed to updateUrl, to more accurately reflect its behavior."},"generated/Deprecation.ts | LocalCSSFileExtensionRejected":{"message":"CSS cannot be loaded from file: URLs unless they end in a .css file extension."},"generated/Deprecation.ts | MediaSourceAbortRemove":{"message":"Using SourceBuffer.abort() to abort remove()'s asynchronous range removal is deprecated due to specification change. Support will be removed in the future. You should listen to the updateend event instead. abort() is intended to only abort an asynchronous media append or reset parser state."},"generated/Deprecation.ts | MediaSourceDurationTruncatingBuffered":{"message":"Setting MediaSource.duration below the highest presentation timestamp of any buffered coded frames is deprecated due to specification change. Support for implicit removal of truncated buffered media will be removed in the future. You should instead perform explicit remove(newDuration, oldDuration) on all sourceBuffers, where newDuration < oldDuration."},"generated/Deprecation.ts | NonStandardDeclarativeShadowDOM":{"message":"The older, non-standardized shadowroot attribute is deprecated, and will *no longer function* in M119. Please use the new, standardized shadowrootmode attribute instead."},"generated/Deprecation.ts | NoSysexWebMIDIWithoutPermission":{"message":"Web MIDI will ask a permission to use even if the sysex is not specified in the MIDIOptions."},"generated/Deprecation.ts | NotificationInsecureOrigin":{"message":"The Notification API may no longer be used from insecure origins. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details."},"generated/Deprecation.ts | NotificationPermissionRequestedIframe":{"message":"Permission for the Notification API may no longer be requested from a cross-origin iframe. You should consider requesting permission from a top-level frame or opening a new window instead."},"generated/Deprecation.ts | ObsoleteCreateImageBitmapImageOrientationNone":{"message":"Option imageOrientation: 'none' in createImageBitmap is deprecated. Please use createImageBitmap with option {imageOrientation: 'from-image'} instead."},"generated/Deprecation.ts | ObsoleteWebRtcCipherSuite":{"message":"Your partner is negotiating an obsolete (D)TLS version. Please check with your partner to have this fixed."},"generated/Deprecation.ts | OverflowVisibleOnReplacedElement":{"message":"Specifying overflow: visible on img, video and canvas tags may cause them to produce visual content outside of the element bounds. See https://github.com/WICG/shared-element-transitions/blob/main/debugging_overflow_on_images.md."},"generated/Deprecation.ts | PaymentInstruments":{"message":"paymentManager.instruments is deprecated. Please use just-in-time install for payment handlers instead."},"generated/Deprecation.ts | PaymentRequestCSPViolation":{"message":"Your PaymentRequest call bypassed Content-Security-Policy (CSP) connect-src directive. This bypass is deprecated. Please add the payment method identifier from the PaymentRequest API (in supportedMethods field) to your CSP connect-src directive."},"generated/Deprecation.ts | PersistentQuotaType":{"message":"StorageType.persistent is deprecated. Please use standardized navigator.storage instead."},"generated/Deprecation.ts | PictureSourceSrc":{"message":" with a parent is invalid and therefore ignored. Please use instead."},"generated/Deprecation.ts | PrefixedCancelAnimationFrame":{"message":"webkitCancelAnimationFrame is vendor-specific. Please use the standard cancelAnimationFrame instead."},"generated/Deprecation.ts | PrefixedRequestAnimationFrame":{"message":"webkitRequestAnimationFrame is vendor-specific. Please use the standard requestAnimationFrame instead."},"generated/Deprecation.ts | PrefixedVideoDisplayingFullscreen":{"message":"HTMLVideoElement.webkitDisplayingFullscreen is deprecated. Please use Document.fullscreenElement instead."},"generated/Deprecation.ts | PrefixedVideoEnterFullscreen":{"message":"HTMLVideoElement.webkitEnterFullscreen() is deprecated. Please use Element.requestFullscreen() instead."},"generated/Deprecation.ts | PrefixedVideoEnterFullScreen":{"message":"HTMLVideoElement.webkitEnterFullScreen() is deprecated. Please use Element.requestFullscreen() instead."},"generated/Deprecation.ts | PrefixedVideoExitFullscreen":{"message":"HTMLVideoElement.webkitExitFullscreen() is deprecated. Please use Document.exitFullscreen() instead."},"generated/Deprecation.ts | PrefixedVideoExitFullScreen":{"message":"HTMLVideoElement.webkitExitFullScreen() is deprecated. Please use Document.exitFullscreen() instead."},"generated/Deprecation.ts | PrefixedVideoSupportsFullscreen":{"message":"HTMLVideoElement.webkitSupportsFullscreen is deprecated. Please use Document.fullscreenEnabled instead."},"generated/Deprecation.ts | PrivacySandboxExtensionsAPI":{"message":"We're deprecating the API chrome.privacy.websites.privacySandboxEnabled, though it will remain active for backward compatibility until release M113. Instead, please use chrome.privacy.websites.topicsEnabled, chrome.privacy.websites.fledgeEnabled and chrome.privacy.websites.adMeasurementEnabled. See https://developer.chrome.com/docs/extensions/reference/privacy/#property-websites-privacySandboxEnabled."},"generated/Deprecation.ts | RangeExpand":{"message":"Range.expand() is deprecated. Please use Selection.modify() instead."},"generated/Deprecation.ts | RequestedSubresourceWithEmbeddedCredentials":{"message":"Subresource requests whose URLs contain embedded credentials (e.g. https://user:pass@host/) are blocked."},"generated/Deprecation.ts | RTCConstraintEnableDtlsSrtpFalse":{"message":"The constraint DtlsSrtpKeyAgreement is removed. You have specified a false value for this constraint, which is interpreted as an attempt to use the removed SDES key negotiation method. This functionality is removed; use a service that supports DTLS key negotiation instead."},"generated/Deprecation.ts | RTCConstraintEnableDtlsSrtpTrue":{"message":"The constraint DtlsSrtpKeyAgreement is removed. You have specified a true value for this constraint, which had no effect, but you can remove this constraint for tidiness."},"generated/Deprecation.ts | RTCPeerConnectionGetStatsLegacyNonCompliant":{"message":"The callback-based getStats() is deprecated and will be removed. Use the spec-compliant getStats() instead."},"generated/Deprecation.ts | RtcpMuxPolicyNegotiate":{"message":"The rtcpMuxPolicy option is deprecated and will be removed."},"generated/Deprecation.ts | SharedArrayBufferConstructedWithoutIsolation":{"message":"SharedArrayBuffer will require cross-origin isolation. See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details."},"generated/Deprecation.ts | TextToSpeech_DisallowedByAutoplay":{"message":"speechSynthesis.speak() without user activation is deprecated and will be removed."},"generated/Deprecation.ts | V8SharedArrayBufferConstructedInExtensionWithoutIsolation":{"message":"Extensions should opt into cross-origin isolation to continue using SharedArrayBuffer. See https://developer.chrome.com/docs/extensions/mv3/cross-origin-isolation/."},"generated/Deprecation.ts | WebSQL":{"message":"Web SQL is deprecated. Please use SQLite WebAssembly or Indexed Database"},"generated/Deprecation.ts | WindowPlacementPermissionDescriptorUsed":{"message":"The permission descriptor window-placement is deprecated. Use window-management instead. For more help, check https://bit.ly/window-placement-rename."},"generated/Deprecation.ts | WindowPlacementPermissionPolicyParsed":{"message":"The permission policy window-placement is deprecated. Use window-management instead. For more help, check https://bit.ly/window-placement-rename."},"generated/Deprecation.ts | XHRJSONEncodingDetection":{"message":"UTF-16 is not supported by response json in XMLHttpRequest"},"generated/Deprecation.ts | XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload":{"message":"Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/."},"generated/Deprecation.ts | XRSupportsSession":{"message":"supportsSession() is deprecated. Please use isSessionSupported() and check the resolved boolean value instead."},"models/bindings/ContentProviderBasedProject.ts | unknownErrorLoadingFile":{"message":"Unknown error loading file"},"models/bindings/DebuggerLanguagePlugins.ts | debugSymbolsIncomplete":{"message":"The debug information for function {PH1} is incomplete"},"models/bindings/DebuggerLanguagePlugins.ts | errorInDebuggerLanguagePlugin":{"message":"Error in debugger language plugin: {PH1}"},"models/bindings/DebuggerLanguagePlugins.ts | failedToLoadDebugSymbolsFor":{"message":"[{PH1}] Failed to load debug symbols for {PH2} ({PH3})"},"models/bindings/DebuggerLanguagePlugins.ts | failedToLoadDebugSymbolsForFunction":{"message":"No debug information for function \"{PH1}\""},"models/bindings/DebuggerLanguagePlugins.ts | loadedDebugSymbolsForButDidnt":{"message":"[{PH1}] Loaded debug symbols for {PH2}, but didn't find any source files"},"models/bindings/DebuggerLanguagePlugins.ts | loadedDebugSymbolsForFound":{"message":"[{PH1}] Loaded debug symbols for {PH2}, found {PH3} source file(s)"},"models/bindings/DebuggerLanguagePlugins.ts | loadingDebugSymbolsFor":{"message":"[{PH1}] Loading debug symbols for {PH2}..."},"models/bindings/DebuggerLanguagePlugins.ts | loadingDebugSymbolsForVia":{"message":"[{PH1}] Loading debug symbols for {PH2} (via {PH3})..."},"models/bindings/IgnoreListManager.ts | addAllContentScriptsToIgnoreList":{"message":"Add all extension scripts to ignore list"},"models/bindings/IgnoreListManager.ts | addAllThirdPartyScriptsToIgnoreList":{"message":"Add all third-party scripts to ignore list"},"models/bindings/IgnoreListManager.ts | addDirectoryToIgnoreList":{"message":"Add directory to ignore list"},"models/bindings/IgnoreListManager.ts | addScriptToIgnoreList":{"message":"Add script to ignore list"},"models/bindings/IgnoreListManager.ts | removeFromIgnoreList":{"message":"Remove from ignore list"},"models/bindings/ResourceScriptMapping.ts | liveEditCompileFailed":{"message":"LiveEdit compile failed: {PH1}"},"models/bindings/ResourceScriptMapping.ts | liveEditFailed":{"message":"LiveEdit failed: {PH1}"},"models/emulation/DeviceModeModel.ts | devicePixelRatioMustBeANumberOr":{"message":"Device pixel ratio must be a number or blank."},"models/emulation/DeviceModeModel.ts | devicePixelRatioMustBeGreater":{"message":"Device pixel ratio must be greater than or equal to {PH1}."},"models/emulation/DeviceModeModel.ts | devicePixelRatioMustBeLessThanOr":{"message":"Device pixel ratio must be less than or equal to {PH1}."},"models/emulation/DeviceModeModel.ts | heightMustBeANumber":{"message":"Height must be a number."},"models/emulation/DeviceModeModel.ts | heightMustBeGreaterThanOrEqualTo":{"message":"Height must be greater than or equal to {PH1}."},"models/emulation/DeviceModeModel.ts | heightMustBeLessThanOrEqualToS":{"message":"Height must be less than or equal to {PH1}."},"models/emulation/DeviceModeModel.ts | widthMustBeANumber":{"message":"Width must be a number."},"models/emulation/DeviceModeModel.ts | widthMustBeGreaterThanOrEqualToS":{"message":"Width must be greater than or equal to {PH1}."},"models/emulation/DeviceModeModel.ts | widthMustBeLessThanOrEqualToS":{"message":"Width must be less than or equal to {PH1}."},"models/emulation/EmulatedDevices.ts | laptopWithHiDPIScreen":{"message":"Laptop with HiDPI screen"},"models/emulation/EmulatedDevices.ts | laptopWithMDPIScreen":{"message":"Laptop with MDPI screen"},"models/emulation/EmulatedDevices.ts | laptopWithTouch":{"message":"Laptop with touch"},"models/har/Writer.ts | collectingContent":{"message":"Collecting content…"},"models/har/Writer.ts | writingFile":{"message":"Writing file…"},"models/issues_manager/BounceTrackingIssue.ts | bounceTrackingMitigations":{"message":"Bounce Tracking Mitigations"},"models/issues_manager/ClientHintIssue.ts | clientHintsInfrastructure":{"message":"Client Hints Infrastructure"},"models/issues_manager/ContentSecurityPolicyIssue.ts | contentSecurityPolicyEval":{"message":"Content Security Policy - Eval"},"models/issues_manager/ContentSecurityPolicyIssue.ts | contentSecurityPolicyInlineCode":{"message":"Content Security Policy - Inline Code"},"models/issues_manager/ContentSecurityPolicyIssue.ts | contentSecurityPolicySource":{"message":"Content Security Policy - Source Allowlists"},"models/issues_manager/ContentSecurityPolicyIssue.ts | trustedTypesFixViolations":{"message":"Trusted Types - Fix violations"},"models/issues_manager/ContentSecurityPolicyIssue.ts | trustedTypesPolicyViolation":{"message":"Trusted Types - Policy violation"},"models/issues_manager/CookieIssue.ts | anInsecure":{"message":"an insecure"},"models/issues_manager/CookieIssue.ts | aSecure":{"message":"a secure"},"models/issues_manager/CookieIssue.ts | firstPartySetsExplained":{"message":"First-Party Sets and the SameParty attribute"},"models/issues_manager/CookieIssue.ts | howSchemefulSamesiteWorks":{"message":"How Schemeful Same-Site Works"},"models/issues_manager/CookieIssue.ts | samesiteCookiesExplained":{"message":"SameSite cookies explained"},"models/issues_manager/CorsIssue.ts | CORS":{"message":"Cross-Origin Resource Sharing (CORS)"},"models/issues_manager/CorsIssue.ts | corsPrivateNetworkAccess":{"message":"Private Network Access"},"models/issues_manager/CrossOriginEmbedderPolicyIssue.ts | coopAndCoep":{"message":"COOP and COEP"},"models/issues_manager/CrossOriginEmbedderPolicyIssue.ts | samesiteAndSameorigin":{"message":"Same-Site and Same-Origin"},"models/issues_manager/DeprecationIssue.ts | feature":{"message":"Check the feature status page for more details."},"models/issues_manager/DeprecationIssue.ts | milestone":{"message":"This change will go into effect with milestone {milestone}."},"models/issues_manager/DeprecationIssue.ts | title":{"message":"Deprecated Feature Used"},"models/issues_manager/FederatedAuthRequestIssue.ts | fedCm":{"message":"Federated Credential Management API"},"models/issues_manager/FederatedAuthUserInfoRequestIssue.ts | fedCmUserInfo":{"message":"Federated Credential Management User Info API"},"models/issues_manager/GenericIssue.ts | autocompleteAttributePageTitle":{"message":"HTML attribute: autocomplete"},"models/issues_manager/GenericIssue.ts | crossOriginPortalPostMessage":{"message":"Portals - Same-origin communication channels"},"models/issues_manager/GenericIssue.ts | howDoesAutofillWorkPageTitle":{"message":"How does autofill work?"},"models/issues_manager/GenericIssue.ts | inputFormElementPageTitle":{"message":"The form input element"},"models/issues_manager/GenericIssue.ts | labelFormlementsPageTitle":{"message":"The label elements"},"models/issues_manager/HeavyAdIssue.ts | handlingHeavyAdInterventions":{"message":"Handling Heavy Ad Interventions"},"models/issues_manager/Issue.ts | breakingChangeIssue":{"message":"A breaking change issue: the page may stop working in an upcoming version of Chrome"},"models/issues_manager/Issue.ts | breakingChanges":{"message":"Breaking Changes"},"models/issues_manager/Issue.ts | improvementIssue":{"message":"An improvement issue: there is an opportunity to improve the page"},"models/issues_manager/Issue.ts | improvements":{"message":"Improvements"},"models/issues_manager/Issue.ts | pageErrorIssue":{"message":"A page error issue: the page is not working correctly"},"models/issues_manager/Issue.ts | pageErrors":{"message":"Page Errors"},"models/issues_manager/LowTextContrastIssue.ts | colorAndContrastAccessibility":{"message":"Color and contrast accessibility"},"models/issues_manager/MixedContentIssue.ts | preventingMixedContent":{"message":"Preventing mixed content"},"models/issues_manager/QuirksModeIssue.ts | documentCompatibilityMode":{"message":"Document compatibility mode"},"models/issues_manager/SharedArrayBufferIssue.ts | enablingSharedArrayBuffer":{"message":"Enabling SharedArrayBuffer"},"models/logs/logs-meta.ts | clear":{"message":"clear"},"models/logs/logs-meta.ts | doNotPreserveLogOnPageReload":{"message":"Do not preserve log on page reload / navigation"},"models/logs/logs-meta.ts | preserve":{"message":"preserve"},"models/logs/logs-meta.ts | preserveLog":{"message":"Preserve log"},"models/logs/logs-meta.ts | preserveLogOnPageReload":{"message":"Preserve log on page reload / navigation"},"models/logs/logs-meta.ts | recordNetworkLog":{"message":"Record network log"},"models/logs/logs-meta.ts | reset":{"message":"reset"},"models/logs/NetworkLog.ts | anonymous":{"message":""},"models/persistence/EditFileSystemView.ts | add":{"message":"Add"},"models/persistence/EditFileSystemView.ts | enterAPath":{"message":"Enter a path"},"models/persistence/EditFileSystemView.ts | enterAUniquePath":{"message":"Enter a unique path"},"models/persistence/EditFileSystemView.ts | excludedFolders":{"message":"Excluded folders"},"models/persistence/EditFileSystemView.ts | folderPath":{"message":"Folder path"},"models/persistence/EditFileSystemView.ts | none":{"message":"None"},"models/persistence/EditFileSystemView.ts | sViaDevtools":{"message":"{PH1} (via .devtools)"},"models/persistence/IsolatedFileSystem.ts | blobCouldNotBeLoaded":{"message":"Blob could not be loaded."},"models/persistence/IsolatedFileSystem.ts | cantReadFileSS":{"message":"Can't read file: {PH1}: {PH2}"},"models/persistence/IsolatedFileSystem.ts | fileSystemErrorS":{"message":"File system error: {PH1}"},"models/persistence/IsolatedFileSystem.ts | linkedToS":{"message":"Linked to {PH1}"},"models/persistence/IsolatedFileSystem.ts | unknownErrorReadingFileS":{"message":"Unknown error reading file: {PH1}"},"models/persistence/IsolatedFileSystemManager.ts | unableToAddFilesystemS":{"message":"Unable to add filesystem: {PH1}"},"models/persistence/persistence-meta.ts | disableOverrideNetworkRequests":{"message":"Disable override network requests"},"models/persistence/persistence-meta.ts | enableLocalOverrides":{"message":"Enable Local Overrides"},"models/persistence/persistence-meta.ts | enableOverrideNetworkRequests":{"message":"Enable override network requests"},"models/persistence/persistence-meta.ts | interception":{"message":"interception"},"models/persistence/persistence-meta.ts | network":{"message":"network"},"models/persistence/persistence-meta.ts | override":{"message":"override"},"models/persistence/persistence-meta.ts | request":{"message":"request"},"models/persistence/persistence-meta.ts | rewrite":{"message":"rewrite"},"models/persistence/persistence-meta.ts | showWorkspace":{"message":"Show Workspace"},"models/persistence/persistence-meta.ts | workspace":{"message":"Workspace"},"models/persistence/PersistenceActions.ts | openInContainingFolder":{"message":"Open in containing folder"},"models/persistence/PersistenceActions.ts | saveAs":{"message":"Save as..."},"models/persistence/PersistenceActions.ts | saveForOverrides":{"message":"Save for overrides"},"models/persistence/PersistenceActions.ts | saveImage":{"message":"Save image"},"models/persistence/PersistenceUtils.ts | linkedToS":{"message":"Linked to {PH1}"},"models/persistence/PersistenceUtils.ts | linkedToSourceMapS":{"message":"Linked to source map: {PH1}"},"models/persistence/PlatformFileSystem.ts | unableToReadFilesWithThis":{"message":"PlatformFileSystem cannot read files."},"models/persistence/WorkspaceSettingsTab.ts | addFolder":{"message":"Add folder…"},"models/persistence/WorkspaceSettingsTab.ts | folderExcludePattern":{"message":"Folder exclude pattern"},"models/persistence/WorkspaceSettingsTab.ts | mappingsAreInferredAutomatically":{"message":"Mappings are inferred automatically."},"models/persistence/WorkspaceSettingsTab.ts | remove":{"message":"Remove"},"models/persistence/WorkspaceSettingsTab.ts | workspace":{"message":"Workspace"},"models/timeline_model/TimelineJSProfile.ts | threadS":{"message":"Thread {PH1}"},"models/timeline_model/TimelineModel.ts | bidderWorklet":{"message":"Bidder Worklet"},"models/timeline_model/TimelineModel.ts | bidderWorkletS":{"message":"Bidder Worklet — {PH1}"},"models/timeline_model/TimelineModel.ts | dedicatedWorker":{"message":"Dedicated Worker"},"models/timeline_model/TimelineModel.ts | sellerWorklet":{"message":"Seller Worklet"},"models/timeline_model/TimelineModel.ts | sellerWorkletS":{"message":"Seller Worklet — {PH1}"},"models/timeline_model/TimelineModel.ts | threadS":{"message":"Thread {PH1}"},"models/timeline_model/TimelineModel.ts | unknownWorklet":{"message":"Auction Worklet"},"models/timeline_model/TimelineModel.ts | unknownWorkletS":{"message":"Auction Worklet — {PH1}"},"models/timeline_model/TimelineModel.ts | workerS":{"message":"Worker — {PH1}"},"models/timeline_model/TimelineModel.ts | workerSS":{"message":"Worker: {PH1} — {PH2}"},"models/timeline_model/TimelineModel.ts | workletService":{"message":"Auction Worklet Service"},"models/timeline_model/TimelineModel.ts | workletServiceS":{"message":"Auction Worklet Service — {PH1}"},"models/workspace/UISourceCode.ts | index":{"message":"(index)"},"models/workspace/UISourceCode.ts | thisFileWasChangedExternally":{"message":"This file was changed externally. Would you like to reload it?"},"panels/accessibility/accessibility-meta.ts | accessibility":{"message":"Accessibility"},"panels/accessibility/accessibility-meta.ts | shoAccessibility":{"message":"Show Accessibility"},"panels/accessibility/AccessibilityNodeView.ts | accessibilityNodeNotExposed":{"message":"Accessibility node not exposed"},"panels/accessibility/AccessibilityNodeView.ts | ancestorChildrenAreAll":{"message":"Ancestor's children are all presentational: "},"panels/accessibility/AccessibilityNodeView.ts | computedProperties":{"message":"Computed Properties"},"panels/accessibility/AccessibilityNodeView.ts | elementHasEmptyAltText":{"message":"Element has empty alt text."},"panels/accessibility/AccessibilityNodeView.ts | elementHasPlaceholder":{"message":"Element has {PH1}."},"panels/accessibility/AccessibilityNodeView.ts | elementIsHiddenBy":{"message":"Element is hidden by active modal dialog: "},"panels/accessibility/AccessibilityNodeView.ts | elementIsInAnInertSubTree":{"message":"Element is in an inert subtree from "},"panels/accessibility/AccessibilityNodeView.ts | elementIsInert":{"message":"Element is inert."},"panels/accessibility/AccessibilityNodeView.ts | elementIsNotRendered":{"message":"Element is not rendered."},"panels/accessibility/AccessibilityNodeView.ts | elementIsNotVisible":{"message":"Element is not visible."},"panels/accessibility/AccessibilityNodeView.ts | elementIsPlaceholder":{"message":"Element is {PH1}."},"panels/accessibility/AccessibilityNodeView.ts | elementIsPresentational":{"message":"Element is presentational."},"panels/accessibility/AccessibilityNodeView.ts | elementNotInteresting":{"message":"Element not interesting for accessibility."},"panels/accessibility/AccessibilityNodeView.ts | elementsInheritsPresentational":{"message":"Element inherits presentational role from "},"panels/accessibility/AccessibilityNodeView.ts | invalidSource":{"message":"Invalid source."},"panels/accessibility/AccessibilityNodeView.ts | labelFor":{"message":"Label for "},"panels/accessibility/AccessibilityNodeView.ts | noAccessibilityNode":{"message":"No accessibility node"},"panels/accessibility/AccessibilityNodeView.ts | noNodeWithThisId":{"message":"No node with this ID."},"panels/accessibility/AccessibilityNodeView.ts | noTextContent":{"message":"No text content."},"panels/accessibility/AccessibilityNodeView.ts | notSpecified":{"message":"Not specified"},"panels/accessibility/AccessibilityNodeView.ts | partOfLabelElement":{"message":"Part of label element: "},"panels/accessibility/AccessibilityNodeView.ts | placeholderIsPlaceholderOnAncestor":{"message":"{PH1} is {PH2} on ancestor: "},"panels/accessibility/AccessibilityStrings.ts | activeDescendant":{"message":"Active descendant"},"panels/accessibility/AccessibilityStrings.ts | aHumanreadableVersionOfTheValue":{"message":"A human-readable version of the value of a range widget (where necessary)."},"panels/accessibility/AccessibilityStrings.ts | atomicLiveRegions":{"message":"Atomic (live regions)"},"panels/accessibility/AccessibilityStrings.ts | busyLiveRegions":{"message":"Busy (live regions)"},"panels/accessibility/AccessibilityStrings.ts | canSetValue":{"message":"Can set value"},"panels/accessibility/AccessibilityStrings.ts | checked":{"message":"Checked"},"panels/accessibility/AccessibilityStrings.ts | contents":{"message":"Contents"},"panels/accessibility/AccessibilityStrings.ts | controls":{"message":"Controls"},"panels/accessibility/AccessibilityStrings.ts | describedBy":{"message":"Described by"},"panels/accessibility/AccessibilityStrings.ts | description":{"message":"Description"},"panels/accessibility/AccessibilityStrings.ts | disabled":{"message":"Disabled"},"panels/accessibility/AccessibilityStrings.ts | editable":{"message":"Editable"},"panels/accessibility/AccessibilityStrings.ts | elementOrElementsWhichFormThe":{"message":"Element or elements which form the description of this element."},"panels/accessibility/AccessibilityStrings.ts | elementOrElementsWhichMayFormThe":{"message":"Element or elements which may form the name of this element."},"panels/accessibility/AccessibilityStrings.ts | elementOrElementsWhichShouldBe":{"message":"Element or elements which should be considered descendants of this element, despite not being descendants in the DOM."},"panels/accessibility/AccessibilityStrings.ts | elementOrElementsWhoseContentOr":{"message":"Element or elements whose content or presence is/are controlled by this widget."},"panels/accessibility/AccessibilityStrings.ts | elementToWhichTheUserMayChooseTo":{"message":"Element to which the user may choose to navigate after this one, instead of the next element in the DOM order."},"panels/accessibility/AccessibilityStrings.ts | expanded":{"message":"Expanded"},"panels/accessibility/AccessibilityStrings.ts | focusable":{"message":"Focusable"},"panels/accessibility/AccessibilityStrings.ts | focused":{"message":"Focused"},"panels/accessibility/AccessibilityStrings.ts | forARangeWidgetTheMaximumAllowed":{"message":"For a range widget, the maximum allowed value."},"panels/accessibility/AccessibilityStrings.ts | forARangeWidgetTheMinimumAllowed":{"message":"For a range widget, the minimum allowed value."},"panels/accessibility/AccessibilityStrings.ts | fromAttribute":{"message":"From attribute"},"panels/accessibility/AccessibilityStrings.ts | fromCaption":{"message":"From caption"},"panels/accessibility/AccessibilityStrings.ts | fromDescription":{"message":"From description"},"panels/accessibility/AccessibilityStrings.ts | fromLabel":{"message":"From label"},"panels/accessibility/AccessibilityStrings.ts | fromLabelFor":{"message":"From label (for= attribute)"},"panels/accessibility/AccessibilityStrings.ts | fromLabelWrapped":{"message":"From label (wrapped)"},"panels/accessibility/AccessibilityStrings.ts | fromLegend":{"message":"From legend"},"panels/accessibility/AccessibilityStrings.ts | fromNativeHtml":{"message":"From native HTML"},"panels/accessibility/AccessibilityStrings.ts | fromPlaceholderAttribute":{"message":"From placeholder attribute"},"panels/accessibility/AccessibilityStrings.ts | fromRubyAnnotation":{"message":"From ruby annotation"},"panels/accessibility/AccessibilityStrings.ts | fromStyle":{"message":"From style"},"panels/accessibility/AccessibilityStrings.ts | fromTitle":{"message":"From title"},"panels/accessibility/AccessibilityStrings.ts | hasAutocomplete":{"message":"Has autocomplete"},"panels/accessibility/AccessibilityStrings.ts | hasPopup":{"message":"Has popup"},"panels/accessibility/AccessibilityStrings.ts | help":{"message":"Help"},"panels/accessibility/AccessibilityStrings.ts | ifAndHowThisElementCanBeEdited":{"message":"If and how this element can be edited."},"panels/accessibility/AccessibilityStrings.ts | ifThisElementMayReceiveLive":{"message":"If this element may receive live updates, whether the entire live region should be presented to the user on changes, or only changed nodes."},"panels/accessibility/AccessibilityStrings.ts | ifThisElementMayReceiveLiveUpdates":{"message":"If this element may receive live updates, what type of updates should trigger a notification."},"panels/accessibility/AccessibilityStrings.ts | ifThisElementMayReceiveLiveUpdatesThe":{"message":"If this element may receive live updates, the root element of the containing live region."},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementCanReceiveFocus":{"message":"If true, this element can receive focus."},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementCurrentlyCannot":{"message":"If true, this element currently cannot be interacted with."},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementCurrentlyHas":{"message":"If true, this element currently has focus."},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementMayBeInteracted":{"message":"If true, this element may be interacted with, but its value cannot be changed."},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementsUserentered":{"message":"If true, this element's user-entered value does not conform to validation requirement."},"panels/accessibility/AccessibilityStrings.ts | implicit":{"message":"Implicit"},"panels/accessibility/AccessibilityStrings.ts | implicitValue":{"message":"Implicit value."},"panels/accessibility/AccessibilityStrings.ts | indicatesThePurposeOfThisElement":{"message":"Indicates the purpose of this element, such as a user interface idiom for a widget, or structural role within a document."},"panels/accessibility/AccessibilityStrings.ts | invalidUserEntry":{"message":"Invalid user entry"},"panels/accessibility/AccessibilityStrings.ts | labeledBy":{"message":"Labeled by"},"panels/accessibility/AccessibilityStrings.ts | level":{"message":"Level"},"panels/accessibility/AccessibilityStrings.ts | liveRegion":{"message":"Live region"},"panels/accessibility/AccessibilityStrings.ts | liveRegionRoot":{"message":"Live region root"},"panels/accessibility/AccessibilityStrings.ts | maximumValue":{"message":"Maximum value"},"panels/accessibility/AccessibilityStrings.ts | minimumValue":{"message":"Minimum value"},"panels/accessibility/AccessibilityStrings.ts | multiline":{"message":"Multi-line"},"panels/accessibility/AccessibilityStrings.ts | multiselectable":{"message":"Multi-selectable"},"panels/accessibility/AccessibilityStrings.ts | orientation":{"message":"Orientation"},"panels/accessibility/AccessibilityStrings.ts | pressed":{"message":"Pressed"},"panels/accessibility/AccessibilityStrings.ts | readonlyString":{"message":"Read-only"},"panels/accessibility/AccessibilityStrings.ts | relatedElement":{"message":"Related element"},"panels/accessibility/AccessibilityStrings.ts | relevantLiveRegions":{"message":"Relevant (live regions)"},"panels/accessibility/AccessibilityStrings.ts | requiredString":{"message":"Required"},"panels/accessibility/AccessibilityStrings.ts | role":{"message":"Role"},"panels/accessibility/AccessibilityStrings.ts | selectedString":{"message":"Selected"},"panels/accessibility/AccessibilityStrings.ts | theAccessibleDescriptionForThis":{"message":"The accessible description for this element."},"panels/accessibility/AccessibilityStrings.ts | theComputedHelpTextForThis":{"message":"The computed help text for this element."},"panels/accessibility/AccessibilityStrings.ts | theComputedNameOfThisElement":{"message":"The computed name of this element."},"panels/accessibility/AccessibilityStrings.ts | theDescendantOfThisElementWhich":{"message":"The descendant of this element which is active; i.e. the element to which focus should be delegated."},"panels/accessibility/AccessibilityStrings.ts | theHierarchicalLevelOfThis":{"message":"The hierarchical level of this element."},"panels/accessibility/AccessibilityStrings.ts | theValueOfThisElementThisMayBe":{"message":"The value of this element; this may be user-provided or developer-provided, depending on the element."},"panels/accessibility/AccessibilityStrings.ts | value":{"message":"Value"},"panels/accessibility/AccessibilityStrings.ts | valueDescription":{"message":"Value description"},"panels/accessibility/AccessibilityStrings.ts | valueFromAttribute":{"message":"Value from attribute."},"panels/accessibility/AccessibilityStrings.ts | valueFromDescriptionElement":{"message":"Value from description element."},"panels/accessibility/AccessibilityStrings.ts | valueFromElementContents":{"message":"Value from element contents."},"panels/accessibility/AccessibilityStrings.ts | valueFromFigcaptionElement":{"message":"Value from figcaption element."},"panels/accessibility/AccessibilityStrings.ts | valueFromLabelElement":{"message":"Value from label element."},"panels/accessibility/AccessibilityStrings.ts | valueFromLabelElementWithFor":{"message":"Value from label element with for= attribute."},"panels/accessibility/AccessibilityStrings.ts | valueFromLabelElementWrapped":{"message":"Value from a wrapping label element."},"panels/accessibility/AccessibilityStrings.ts | valueFromLegendElement":{"message":"Value from legend element."},"panels/accessibility/AccessibilityStrings.ts | valueFromNativeHtmlRuby":{"message":"Value from plain HTML ruby annotation."},"panels/accessibility/AccessibilityStrings.ts | valueFromNativeHtmlUnknownSource":{"message":"Value from native HTML (unknown source)."},"panels/accessibility/AccessibilityStrings.ts | valueFromPlaceholderAttribute":{"message":"Value from placeholder attribute."},"panels/accessibility/AccessibilityStrings.ts | valueFromRelatedElement":{"message":"Value from related element."},"panels/accessibility/AccessibilityStrings.ts | valueFromStyle":{"message":"Value from style."},"panels/accessibility/AccessibilityStrings.ts | valueFromTableCaption":{"message":"Value from table caption."},"panels/accessibility/AccessibilityStrings.ts | valueFromTitleAttribute":{"message":"Value from title attribute."},"panels/accessibility/AccessibilityStrings.ts | whetherAndWhatPriorityOfLive":{"message":"Whether and what priority of live updates may be expected for this element."},"panels/accessibility/AccessibilityStrings.ts | whetherAndWhatTypeOfAutocomplete":{"message":"Whether and what type of autocomplete suggestions are currently provided by this element."},"panels/accessibility/AccessibilityStrings.ts | whetherAUserMaySelectMoreThanOne":{"message":"Whether a user may select more than one option from this widget."},"panels/accessibility/AccessibilityStrings.ts | whetherTheOptionRepresentedBy":{"message":"Whether the option represented by this element is currently selected."},"panels/accessibility/AccessibilityStrings.ts | whetherTheValueOfThisElementCan":{"message":"Whether the value of this element can be set."},"panels/accessibility/AccessibilityStrings.ts | whetherThisCheckboxRadioButtonOr":{"message":"Whether this checkbox, radio button or tree item is checked, unchecked, or mixed (e.g. has both checked and un-checked children)."},"panels/accessibility/AccessibilityStrings.ts | whetherThisElementHasCausedSome":{"message":"Whether this element has caused some kind of pop-up (such as a menu) to appear."},"panels/accessibility/AccessibilityStrings.ts | whetherThisElementIsARequired":{"message":"Whether this element is a required field in a form."},"panels/accessibility/AccessibilityStrings.ts | whetherThisElementOrAnother":{"message":"Whether this element, or another grouping element it controls, is expanded."},"panels/accessibility/AccessibilityStrings.ts | whetherThisElementOrItsSubtree":{"message":"Whether this element or its subtree are currently being updated (and thus may be in an inconsistent state)."},"panels/accessibility/AccessibilityStrings.ts | whetherThisLinearElements":{"message":"Whether this linear element's orientation is horizontal or vertical."},"panels/accessibility/AccessibilityStrings.ts | whetherThisTextBoxMayHaveMore":{"message":"Whether this text box may have more than one line."},"panels/accessibility/AccessibilityStrings.ts | whetherThisToggleButtonIs":{"message":"Whether this toggle button is currently in a pressed state."},"panels/accessibility/ARIAAttributesView.ts | ariaAttributes":{"message":"ARIA Attributes"},"panels/accessibility/ARIAAttributesView.ts | noAriaAttributes":{"message":"No ARIA attributes"},"panels/accessibility/AXBreadcrumbsPane.ts | accessibilityTree":{"message":"Accessibility Tree"},"panels/accessibility/AXBreadcrumbsPane.ts | fullTreeExperimentDescription":{"message":"The accessibility tree moved to the top right corner of the DOM tree."},"panels/accessibility/AXBreadcrumbsPane.ts | fullTreeExperimentName":{"message":"Enable full-page accessibility tree"},"panels/accessibility/AXBreadcrumbsPane.ts | ignored":{"message":"Ignored"},"panels/accessibility/AXBreadcrumbsPane.ts | reloadRequired":{"message":"Reload required before the change takes effect."},"panels/accessibility/AXBreadcrumbsPane.ts | scrollIntoView":{"message":"Scroll into view"},"panels/accessibility/SourceOrderView.ts | noSourceOrderInformation":{"message":"No source order information available"},"panels/accessibility/SourceOrderView.ts | showSourceOrder":{"message":"Show source order"},"panels/accessibility/SourceOrderView.ts | sourceOrderViewer":{"message":"Source Order Viewer"},"panels/accessibility/SourceOrderView.ts | thereMayBeADelayInDisplaying":{"message":"There may be a delay in displaying source order for elements with many children"},"panels/animation/animation-meta.ts | animations":{"message":"Animations"},"panels/animation/animation-meta.ts | showAnimations":{"message":"Show Animations"},"panels/animation/AnimationTimeline.ts | animationPreviews":{"message":"Animation previews"},"panels/animation/AnimationTimeline.ts | animationPreviewS":{"message":"Animation Preview {PH1}"},"panels/animation/AnimationTimeline.ts | clearAll":{"message":"Clear all"},"panels/animation/AnimationTimeline.ts | pause":{"message":"Pause"},"panels/animation/AnimationTimeline.ts | pauseAll":{"message":"Pause all"},"panels/animation/AnimationTimeline.ts | pauseTimeline":{"message":"Pause timeline"},"panels/animation/AnimationTimeline.ts | playbackRatePlaceholder":{"message":"{PH1}%"},"panels/animation/AnimationTimeline.ts | playbackRates":{"message":"Playback rates"},"panels/animation/AnimationTimeline.ts | playTimeline":{"message":"Play timeline"},"panels/animation/AnimationTimeline.ts | replayTimeline":{"message":"Replay timeline"},"panels/animation/AnimationTimeline.ts | resumeAll":{"message":"Resume all"},"panels/animation/AnimationTimeline.ts | selectAnEffectAboveToInspectAnd":{"message":"Select an effect above to inspect and modify."},"panels/animation/AnimationTimeline.ts | setSpeedToS":{"message":"Set speed to {PH1}"},"panels/animation/AnimationTimeline.ts | waitingForAnimations":{"message":"Waiting for animations..."},"panels/animation/AnimationUI.ts | animationEndpointSlider":{"message":"Animation Endpoint slider"},"panels/animation/AnimationUI.ts | animationKeyframeSlider":{"message":"Animation Keyframe slider"},"panels/animation/AnimationUI.ts | sSlider":{"message":"{PH1} slider"},"panels/application/application-meta.ts | application":{"message":"Application"},"panels/application/application-meta.ts | clearSiteData":{"message":"Clear site data"},"panels/application/application-meta.ts | clearSiteDataIncludingThirdparty":{"message":"Clear site data (including third-party cookies)"},"panels/application/application-meta.ts | pwa":{"message":"pwa"},"panels/application/application-meta.ts | showApplication":{"message":"Show Application"},"panels/application/application-meta.ts | startRecordingEvents":{"message":"Start recording events"},"panels/application/application-meta.ts | stopRecordingEvents":{"message":"Stop recording events"},"panels/application/ApplicationPanelSidebar.ts | application":{"message":"Application"},"panels/application/ApplicationPanelSidebar.ts | applicationSidebarPanel":{"message":"Application panel sidebar"},"panels/application/ApplicationPanelSidebar.ts | appManifest":{"message":"App Manifest"},"panels/application/ApplicationPanelSidebar.ts | backgroundServices":{"message":"Background Services"},"panels/application/ApplicationPanelSidebar.ts | beforeInvokeAlert":{"message":"{PH1}: Invoke to scroll to this section in manifest"},"panels/application/ApplicationPanelSidebar.ts | clear":{"message":"Clear"},"panels/application/ApplicationPanelSidebar.ts | cookies":{"message":"Cookies"},"panels/application/ApplicationPanelSidebar.ts | cookiesUsedByFramesFromS":{"message":"Cookies used by frames from {PH1}"},"panels/application/ApplicationPanelSidebar.ts | documentNotAvailable":{"message":"Document not available"},"panels/application/ApplicationPanelSidebar.ts | frames":{"message":"Frames"},"panels/application/ApplicationPanelSidebar.ts | indexeddb":{"message":"IndexedDB"},"panels/application/ApplicationPanelSidebar.ts | keyPathS":{"message":"Key path: {PH1}"},"panels/application/ApplicationPanelSidebar.ts | localFiles":{"message":"Local Files"},"panels/application/ApplicationPanelSidebar.ts | localStorage":{"message":"Local Storage"},"panels/application/ApplicationPanelSidebar.ts | manifest":{"message":"Manifest"},"panels/application/ApplicationPanelSidebar.ts | noManifestDetected":{"message":"No manifest detected"},"panels/application/ApplicationPanelSidebar.ts | onInvokeAlert":{"message":"Scrolled to {PH1}"},"panels/application/ApplicationPanelSidebar.ts | onInvokeManifestAlert":{"message":"Manifest: Invoke to scroll to the top of manifest"},"panels/application/ApplicationPanelSidebar.ts | openedWindows":{"message":"Opened Windows"},"panels/application/ApplicationPanelSidebar.ts | preloading":{"message":"Preloading"},"panels/application/ApplicationPanelSidebar.ts | refreshIndexeddb":{"message":"Refresh IndexedDB"},"panels/application/ApplicationPanelSidebar.ts | sessionStorage":{"message":"Session Storage"},"panels/application/ApplicationPanelSidebar.ts | storage":{"message":"Storage"},"panels/application/ApplicationPanelSidebar.ts | theContentOfThisDocumentHasBeen":{"message":"The content of this document has been generated dynamically via 'document.write()'."},"panels/application/ApplicationPanelSidebar.ts | versionS":{"message":"Version: {PH1}"},"panels/application/ApplicationPanelSidebar.ts | versionSEmpty":{"message":"Version: {PH1} (empty)"},"panels/application/ApplicationPanelSidebar.ts | webSql":{"message":"Web SQL"},"panels/application/ApplicationPanelSidebar.ts | webWorkers":{"message":"Web Workers"},"panels/application/ApplicationPanelSidebar.ts | windowWithoutTitle":{"message":"Window without title"},"panels/application/ApplicationPanelSidebar.ts | worker":{"message":"worker"},"panels/application/AppManifestView.ts | actualHeightSpxOfSSDoesNotMatch":{"message":"Actual height ({PH1}px) of {PH2} {PH3} does not match specified height ({PH4}px)"},"panels/application/AppManifestView.ts | actualSizeSspxOfSSDoesNotMatch":{"message":"Actual size ({PH1}×{PH2})px of {PH3} {PH4} does not match specified size ({PH5}×{PH6}px)"},"panels/application/AppManifestView.ts | actualWidthSpxOfSSDoesNotMatch":{"message":"Actual width ({PH1}px) of {PH2} {PH3} does not match specified width ({PH4}px)"},"panels/application/AppManifestView.ts | appIdExplainer":{"message":"This is used by the browser to know whether the manifest should be updating an existing application, or whether it refers to a new web app that can be installed."},"panels/application/AppManifestView.ts | appIdNote":{"message":"{PH1} {PH2} is not specified in the manifest, {PH3} is used instead. To specify an App Id that matches the current identity, set the {PH4} field to {PH5} {PH6}."},"panels/application/AppManifestView.ts | aUrlInTheManifestContainsA":{"message":"A URL in the manifest contains a username, password, or port"},"panels/application/AppManifestView.ts | avoidPurposeAnyAndMaskable":{"message":"Declaring an icon with 'purpose: \"any maskable\"' is discouraged. It is likely to look incorrect on some platforms due to too much or too little padding."},"panels/application/AppManifestView.ts | backgroundColor":{"message":"Background color"},"panels/application/AppManifestView.ts | computedAppId":{"message":"Computed App Id"},"panels/application/AppManifestView.ts | copiedToClipboard":{"message":"Copied suggested ID {PH1} to clipboard"},"panels/application/AppManifestView.ts | copyToClipboard":{"message":"Copy to clipboard"},"panels/application/AppManifestView.ts | couldNotCheckServiceWorker":{"message":"Could not check service worker without a 'start_url' field in the manifest"},"panels/application/AppManifestView.ts | couldNotDownloadARequiredIcon":{"message":"Could not download a required icon from the manifest"},"panels/application/AppManifestView.ts | customizePwaTitleBar":{"message":"Customize the window controls overlay of your PWA's title bar."},"panels/application/AppManifestView.ts | darkBackgroundColor":{"message":"Dark background color"},"panels/application/AppManifestView.ts | darkThemeColor":{"message":"Dark theme color"},"panels/application/AppManifestView.ts | description":{"message":"Description"},"panels/application/AppManifestView.ts | descriptionMayBeTruncated":{"message":"Description may be truncated."},"panels/application/AppManifestView.ts | display":{"message":"Display"},"panels/application/AppManifestView.ts | displayOverride":{"message":"display-override"},"panels/application/AppManifestView.ts | documentationOnMaskableIcons":{"message":"documentation on maskable icons"},"panels/application/AppManifestView.ts | downloadedIconWasEmptyOr":{"message":"Downloaded icon was empty or corrupted"},"panels/application/AppManifestView.ts | errorsAndWarnings":{"message":"Errors and warnings"},"panels/application/AppManifestView.ts | icon":{"message":"Icon"},"panels/application/AppManifestView.ts | icons":{"message":"Icons"},"panels/application/AppManifestView.ts | identity":{"message":"Identity"},"panels/application/AppManifestView.ts | imageFromS":{"message":"Image from {PH1}"},"panels/application/AppManifestView.ts | installability":{"message":"Installability"},"panels/application/AppManifestView.ts | learnMore":{"message":"Learn more"},"panels/application/AppManifestView.ts | manifestContainsDisplayoverride":{"message":"Manifest contains 'display_override' field, and the first supported display mode must be one of 'standalone', 'fullscreen', or 'minimal-ui'"},"panels/application/AppManifestView.ts | manifestCouldNotBeFetchedIsEmpty":{"message":"Manifest could not be fetched, is empty, or could not be parsed"},"panels/application/AppManifestView.ts | manifestDisplayPropertyMustBeOne":{"message":"Manifest 'display' property must be one of 'standalone', 'fullscreen', or 'minimal-ui'"},"panels/application/AppManifestView.ts | manifestDoesNotContainANameOr":{"message":"Manifest does not contain a 'name' or 'short_name' field"},"panels/application/AppManifestView.ts | manifestDoesNotContainASuitable":{"message":"Manifest does not contain a suitable icon - PNG, SVG or WebP format of at least {PH1}px is required, the 'sizes' attribute must be set, and the 'purpose' attribute, if set, must include 'any'."},"panels/application/AppManifestView.ts | manifestSpecifies":{"message":"Manifest specifies 'prefer_related_applications: true'"},"panels/application/AppManifestView.ts | manifestStartUrlIsNotValid":{"message":"Manifest 'start_URL' is not valid"},"panels/application/AppManifestView.ts | name":{"message":"Name"},"panels/application/AppManifestView.ts | needHelpReadOurS":{"message":"Need help? Read {PH1}."},"panels/application/AppManifestView.ts | newNoteUrl":{"message":"New note URL"},"panels/application/AppManifestView.ts | noPlayStoreIdProvided":{"message":"No Play store ID provided"},"panels/application/AppManifestView.ts | noSuppliedIconIsAtLeastSpxSquare":{"message":"No supplied icon is at least {PH1} pixels square in PNG, SVG or WebP format, with the purpose attribute unset or set to 'any'."},"panels/application/AppManifestView.ts | note":{"message":"Note:"},"panels/application/AppManifestView.ts | orientation":{"message":"Orientation"},"panels/application/AppManifestView.ts | pageDoesNotWorkOffline":{"message":"Page does not work offline"},"panels/application/AppManifestView.ts | pageDoesNotWorkOfflineThePage":{"message":"Page does not work offline. Starting in Chrome 93, the installability criteria are changing, and this site will not be installable. See {PH1} for more information."},"panels/application/AppManifestView.ts | pageHasNoManifestLinkUrl":{"message":"Page has no manifest URL"},"panels/application/AppManifestView.ts | pageIsLoadedInAnIncognitoWindow":{"message":"Page is loaded in an incognito window"},"panels/application/AppManifestView.ts | pageIsNotLoadedInTheMainFrame":{"message":"Page is not loaded in the main frame"},"panels/application/AppManifestView.ts | pageIsNotServedFromASecureOrigin":{"message":"Page is not served from a secure origin"},"panels/application/AppManifestView.ts | preferrelatedapplicationsIsOnly":{"message":"'prefer_related_applications' is only supported on Chrome Beta and Stable channels on Android."},"panels/application/AppManifestView.ts | presentation":{"message":"Presentation"},"panels/application/AppManifestView.ts | protocolHandlers":{"message":"Protocol Handlers"},"panels/application/AppManifestView.ts | screenshot":{"message":"Screenshot"},"panels/application/AppManifestView.ts | screenshotPixelSize":{"message":"Screenshot {url} should specify a pixel size [width]x[height] instead of \"any\" as first size."},"panels/application/AppManifestView.ts | screenshotS":{"message":"Screenshot #{PH1}"},"panels/application/AppManifestView.ts | shortcutS":{"message":"Shortcut #{PH1}"},"panels/application/AppManifestView.ts | shortcutSShouldIncludeAXPixel":{"message":"Shortcut #{PH1} should include a 96x96 pixel icon"},"panels/application/AppManifestView.ts | shortName":{"message":"Short name"},"panels/application/AppManifestView.ts | showOnlyTheMinimumSafeAreaFor":{"message":"Show only the minimum safe area for maskable icons"},"panels/application/AppManifestView.ts | sSDoesNotSpecifyItsSizeInThe":{"message":"{PH1} {PH2} does not specify its size in the manifest"},"panels/application/AppManifestView.ts | sSFailedToLoad":{"message":"{PH1} {PH2} failed to load"},"panels/application/AppManifestView.ts | sSHeightDoesNotComplyWithRatioRequirement":{"message":"{PH1} {PH2} height can't be more than 2.3 times as long as the width"},"panels/application/AppManifestView.ts | sSrcIsNotSet":{"message":"{PH1} 'src' is not set"},"panels/application/AppManifestView.ts | sSShouldHaveSquareIcon":{"message":"Most operating systems require square icons. Please include at least one square icon in the array."},"panels/application/AppManifestView.ts | sSShouldSpecifyItsSizeAs":{"message":"{PH1} {PH2} should specify its size as [width]x[height]"},"panels/application/AppManifestView.ts | sSSizeShouldBeAtLeast320":{"message":"{PH1} {PH2} size should be at least 320×320"},"panels/application/AppManifestView.ts | sSSizeShouldBeAtMost3840":{"message":"{PH1} {PH2} size should be at most 3840×3840"},"panels/application/AppManifestView.ts | sSWidthDoesNotComplyWithRatioRequirement":{"message":"{PH1} {PH2} width can't be more than 2.3 times as long as the height"},"panels/application/AppManifestView.ts | startUrl":{"message":"Start URL"},"panels/application/AppManifestView.ts | sUrlSFailedToParse":{"message":"{PH1} URL ''{PH2}'' failed to parse"},"panels/application/AppManifestView.ts | theAppIsAlreadyInstalled":{"message":"The app is already installed"},"panels/application/AppManifestView.ts | themeColor":{"message":"Theme color"},"panels/application/AppManifestView.ts | thePlayStoreAppUrlAndPlayStoreId":{"message":"The Play Store app URL and Play Store ID do not match"},"panels/application/AppManifestView.ts | theSpecifiedApplicationPlatform":{"message":"The specified application platform is not supported on Android"},"panels/application/AppManifestView.ts | wcoFound":{"message":"Chrome has successfully found the {PH1} value for the {PH2} field in the {PH3}."},"panels/application/AppManifestView.ts | wcoNeedHelpReadMore":{"message":"Need help? Read {PH1}."},"panels/application/AppManifestView.ts | wcoNotFound":{"message":"Define {PH1} in the manifest to use the Window Controls Overlay API and customize your app's title bar."},"panels/application/AppManifestView.ts | windowControlsOverlay":{"message":"Window Controls Overlay"},"panels/application/BackForwardCacheTreeElement.ts | backForwardCache":{"message":"Back/forward cache"},"panels/application/BackgroundServiceView.ts | backgroundFetch":{"message":"Background Fetch"},"panels/application/BackgroundServiceView.ts | backgroundServices":{"message":"Background Services"},"panels/application/BackgroundServiceView.ts | backgroundSync":{"message":"Background Sync"},"panels/application/BackgroundServiceView.ts | clear":{"message":"Clear"},"panels/application/BackgroundServiceView.ts | clickTheRecordButtonSOrHitSTo":{"message":"Click the record button {PH1} or hit {PH2} to start recording."},"panels/application/BackgroundServiceView.ts | devtoolsWillRecordAllSActivity":{"message":"DevTools will record all {PH1} activity for up to 3 days, even when closed."},"panels/application/BackgroundServiceView.ts | empty":{"message":"empty"},"panels/application/BackgroundServiceView.ts | event":{"message":"Event"},"panels/application/BackgroundServiceView.ts | instanceId":{"message":"Instance ID"},"panels/application/BackgroundServiceView.ts | learnMore":{"message":"Learn more"},"panels/application/BackgroundServiceView.ts | noMetadataForThisEvent":{"message":"No metadata for this event"},"panels/application/BackgroundServiceView.ts | notifications":{"message":"Notifications"},"panels/application/BackgroundServiceView.ts | origin":{"message":"Origin"},"panels/application/BackgroundServiceView.ts | paymentHandler":{"message":"Payment Handler"},"panels/application/BackgroundServiceView.ts | periodicBackgroundSync":{"message":"Periodic Background Sync"},"panels/application/BackgroundServiceView.ts | pushMessaging":{"message":"Push Messaging"},"panels/application/BackgroundServiceView.ts | recordingSActivity":{"message":"Recording {PH1} activity..."},"panels/application/BackgroundServiceView.ts | saveEvents":{"message":"Save events"},"panels/application/BackgroundServiceView.ts | selectAnEntryToViewMetadata":{"message":"Select an entry to view metadata"},"panels/application/BackgroundServiceView.ts | showEventsForOtherStorageKeys":{"message":"Show events from other storage partitions"},"panels/application/BackgroundServiceView.ts | showEventsFromOtherDomains":{"message":"Show events from other domains"},"panels/application/BackgroundServiceView.ts | startRecordingEvents":{"message":"Start recording events"},"panels/application/BackgroundServiceView.ts | stopRecordingEvents":{"message":"Stop recording events"},"panels/application/BackgroundServiceView.ts | storageKey":{"message":"Storage Key"},"panels/application/BackgroundServiceView.ts | swScope":{"message":"Service Worker Scope"},"panels/application/BackgroundServiceView.ts | timestamp":{"message":"Timestamp"},"panels/application/BounceTrackingMitigationsTreeElement.ts | bounceTrackingMitigations":{"message":"Bounce Tracking Mitigations"},"panels/application/components/BackForwardCacheStrings.ts | appBanner":{"message":"Pages that requested an AppBanner are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabled":{"message":"Back/forward cache is disabled by flags. Visit chrome://flags/#back-forward-cache to enable it locally on this device."},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabledByCommandLine":{"message":"Back/forward cache is disabled by the command line."},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabledByLowMemory":{"message":"Back/forward cache is disabled due to insufficient memory."},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabledForDelegate":{"message":"Back/forward cache is not supported by delegate."},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabledForPrerender":{"message":"Back/forward cache is disabled for prerenderer."},"panels/application/components/BackForwardCacheStrings.ts | broadcastChannel":{"message":"The page cannot be cached because it has a BroadcastChannel instance with registered listeners."},"panels/application/components/BackForwardCacheStrings.ts | cacheControlNoStore":{"message":"Pages with cache-control:no-store header cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | cacheFlushed":{"message":"The cache was intentionally cleared."},"panels/application/components/BackForwardCacheStrings.ts | cacheLimit":{"message":"The page was evicted from the cache to allow another page to be cached."},"panels/application/components/BackForwardCacheStrings.ts | containsPlugins":{"message":"Pages containing plugins are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentFileChooser":{"message":"Pages that use FileChooser API are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentFileSystemAccess":{"message":"Pages that use File System Access API are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentMediaDevicesDispatcherHost":{"message":"Pages that use Media Device Dispatcher are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentMediaPlay":{"message":"A media player was playing upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | contentMediaSession":{"message":"Pages that use MediaSession API and set a playback state are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentMediaSessionService":{"message":"Pages that use MediaSession API and set action handlers are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentScreenReader":{"message":"Back/forward cache is disabled due to screen reader."},"panels/application/components/BackForwardCacheStrings.ts | contentSecurityHandler":{"message":"Pages that use SecurityHandler are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentSerial":{"message":"Pages that use Serial API are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentWebAuthenticationAPI":{"message":"Pages that use WebAuthetication API are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentWebBluetooth":{"message":"Pages that use WebBluetooth API are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentWebUSB":{"message":"Pages that use WebUSB API are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | cookieDisabled":{"message":"Back/forward cache is disabled because cookies are disabled on a page that uses Cache-Control: no-store."},"panels/application/components/BackForwardCacheStrings.ts | dedicatedWorkerOrWorklet":{"message":"Pages that use a dedicated worker or worklet are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | documentLoaded":{"message":"The document did not finish loading before navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderAppBannerManager":{"message":"App Banner was present upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderChromePasswordManagerClientBindCredentialManager":{"message":"Chrome Password Manager was present upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderDomDistillerSelfDeletingRequestDelegate":{"message":"DOM distillation was in progress upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderDomDistillerViewerSource":{"message":"DOM Distiller Viewer was present upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderExtensionMessaging":{"message":"Back/forward cache is disabled due to extensions using messaging API."},"panels/application/components/BackForwardCacheStrings.ts | embedderExtensionMessagingForOpenPort":{"message":"Extensions with long-lived connection should close the connection before entering back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | embedderExtensions":{"message":"Back/forward cache is disabled due to extensions."},"panels/application/components/BackForwardCacheStrings.ts | embedderExtensionSentMessageToCachedFrame":{"message":"Extensions with long-lived connection attempted to send messages to frames in back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | embedderModalDialog":{"message":"Modal dialog such as form resubmission or http password dialog was shown for the page upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderOfflinePage":{"message":"The offline page was shown upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderOomInterventionTabHelper":{"message":"Out-Of-Memory Intervention bar was present upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderPermissionRequestManager":{"message":"There were permission requests upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderPopupBlockerTabHelper":{"message":"Popup blocker was present upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderSafeBrowsingThreatDetails":{"message":"Safe Browsing details were shown upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderSafeBrowsingTriggeredPopupBlocker":{"message":"Safe Browsing considered this page to be abusive and blocked popup."},"panels/application/components/BackForwardCacheStrings.ts | enteredBackForwardCacheBeforeServiceWorkerHostAdded":{"message":"A service worker was activated while the page was in back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | errorDocument":{"message":"Back/forward cache is disabled due to a document error."},"panels/application/components/BackForwardCacheStrings.ts | fencedFramesEmbedder":{"message":"Pages using FencedFrames cannot be stored in bfcache."},"panels/application/components/BackForwardCacheStrings.ts | foregroundCacheLimit":{"message":"The page was evicted from the cache to allow another page to be cached."},"panels/application/components/BackForwardCacheStrings.ts | grantedMediaStreamAccess":{"message":"Pages that have granted media stream access are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | haveInnerContents":{"message":"Pages that use portals are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | HTTPMethodNotGET":{"message":"Only pages loaded via a GET request are eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | HTTPStatusNotOK":{"message":"Only pages with a status code of 2XX can be cached."},"panels/application/components/BackForwardCacheStrings.ts | idleManager":{"message":"Pages that use IdleManager are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | indexedDBConnection":{"message":"Pages that have an open IndexedDB connection are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | indexedDBEvent":{"message":"Back/forward cache is disabled due to an IndexedDB event."},"panels/application/components/BackForwardCacheStrings.ts | ineligibleAPI":{"message":"Ineligible APIs were used."},"panels/application/components/BackForwardCacheStrings.ts | injectedJavascript":{"message":"Pages that JavaScript is injected into by extensions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | injectedStyleSheet":{"message":"Pages that a StyleSheet is injected into by extensions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | internalError":{"message":"Internal error."},"panels/application/components/BackForwardCacheStrings.ts | JavaScriptExecution":{"message":"Chrome detected an attempt to execute JavaScript while in the cache."},"panels/application/components/BackForwardCacheStrings.ts | jsNetworkRequestReceivedCacheControlNoStoreResource":{"message":"Back/forward cache is disabled because some JavaScript network request received resource with Cache-Control: no-store header."},"panels/application/components/BackForwardCacheStrings.ts | keepaliveRequest":{"message":"Back/forward cache is disabled due to a keepalive request."},"panels/application/components/BackForwardCacheStrings.ts | keyboardLock":{"message":"Pages that use Keyboard lock are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | loading":{"message":"The page did not finish loading before navigating away."},"panels/application/components/BackForwardCacheStrings.ts | mainResourceHasCacheControlNoCache":{"message":"Pages whose main resource has cache-control:no-cache cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | mainResourceHasCacheControlNoStore":{"message":"Pages whose main resource has cache-control:no-store cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | navigationCancelledWhileRestoring":{"message":"Navigation was cancelled before the page could be restored from back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | networkExceedsBufferLimit":{"message":"The page was evicted from the cache because an active network connection received too much data. Chrome limits the amount of data that a page may receive while cached."},"panels/application/components/BackForwardCacheStrings.ts | networkRequestDatapipeDrainedAsBytesConsumer":{"message":"Pages that have inflight fetch() or XHR are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | networkRequestRedirected":{"message":"The page was evicted from back/forward cache because an active network request involved a redirect."},"panels/application/components/BackForwardCacheStrings.ts | networkRequestTimeout":{"message":"The page was evicted from the cache because a network connection was open too long. Chrome limits the amount of time that a page may receive data while cached."},"panels/application/components/BackForwardCacheStrings.ts | noResponseHead":{"message":"Pages that do not have a valid response head cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | notMainFrame":{"message":"Navigation happened in a frame other than the main frame."},"panels/application/components/BackForwardCacheStrings.ts | outstandingIndexedDBTransaction":{"message":"Page with ongoing indexed DB transactions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | outstandingNetworkRequestDirectSocket":{"message":"Pages with an in-flight network request are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | outstandingNetworkRequestFetch":{"message":"Pages with an in-flight fetch network request are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | outstandingNetworkRequestOthers":{"message":"Pages with an in-flight network request are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | outstandingNetworkRequestXHR":{"message":"Pages with an in-flight XHR network request are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | paymentManager":{"message":"Pages that use PaymentManager are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | pictureInPicture":{"message":"Pages that use Picture-in-Picture are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | portal":{"message":"Pages that use portals are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | printing":{"message":"Pages that show Printing UI are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | relatedActiveContentsExist":{"message":"The page was opened using 'window.open()' and another tab has a reference to it, or the page opened a window."},"panels/application/components/BackForwardCacheStrings.ts | rendererProcessCrashed":{"message":"The renderer process for the page in back/forward cache crashed."},"panels/application/components/BackForwardCacheStrings.ts | rendererProcessKilled":{"message":"The renderer process for the page in back/forward cache was killed."},"panels/application/components/BackForwardCacheStrings.ts | requestedAudioCapturePermission":{"message":"Pages that have requested audio capture permissions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedBackForwardCacheBlockedSensors":{"message":"Pages that have requested sensor permissions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedBackgroundWorkPermission":{"message":"Pages that have requested background sync or fetch permissions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedMIDIPermission":{"message":"Pages that have requested MIDI permissions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedNotificationsPermission":{"message":"Pages that have requested notifications permissions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedStorageAccessGrant":{"message":"Pages that have requested storage access are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedVideoCapturePermission":{"message":"Pages that have requested video capture permissions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | schemeNotHTTPOrHTTPS":{"message":"Only pages whose URL scheme is HTTP / HTTPS can be cached."},"panels/application/components/BackForwardCacheStrings.ts | serviceWorkerClaim":{"message":"The page was claimed by a service worker while it is in back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | serviceWorkerPostMessage":{"message":"A service worker attempted to send the page in back/forward cache a MessageEvent."},"panels/application/components/BackForwardCacheStrings.ts | serviceWorkerUnregistration":{"message":"ServiceWorker was unregistered while a page was in back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | serviceWorkerVersionActivation":{"message":"The page was evicted from back/forward cache due to a service worker activation."},"panels/application/components/BackForwardCacheStrings.ts | sessionRestored":{"message":"Chrome restarted and cleared the back/forward cache entries."},"panels/application/components/BackForwardCacheStrings.ts | sharedWorker":{"message":"Pages that use SharedWorker are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | speechRecognizer":{"message":"Pages that use SpeechRecognizer are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | speechSynthesis":{"message":"Pages that use SpeechSynthesis are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | subframeIsNavigating":{"message":"An iframe on the page started a navigation that did not complete."},"panels/application/components/BackForwardCacheStrings.ts | subresourceHasCacheControlNoCache":{"message":"Pages whose subresource has cache-control:no-cache cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | subresourceHasCacheControlNoStore":{"message":"Pages whose subresource has cache-control:no-store cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | timeout":{"message":"The page exceeded the maximum time in back/forward cache and was expired."},"panels/application/components/BackForwardCacheStrings.ts | timeoutPuttingInCache":{"message":"The page timed out entering back/forward cache (likely due to long-running pagehide handlers)."},"panels/application/components/BackForwardCacheStrings.ts | unloadHandlerExistsInMainFrame":{"message":"The page has an unload handler in the main frame."},"panels/application/components/BackForwardCacheStrings.ts | unloadHandlerExistsInSubFrame":{"message":"The page has an unload handler in a sub frame."},"panels/application/components/BackForwardCacheStrings.ts | userAgentOverrideDiffers":{"message":"Browser has changed the user agent override header."},"panels/application/components/BackForwardCacheStrings.ts | wasGrantedMediaAccess":{"message":"Pages that have granted access to record video or audio are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webDatabase":{"message":"Pages that use WebDatabase are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webHID":{"message":"Pages that use WebHID are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webLocks":{"message":"Pages that use WebLocks are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webNfc":{"message":"Pages that use WebNfc are not currently eligible for back/forwad cache."},"panels/application/components/BackForwardCacheStrings.ts | webOTPService":{"message":"Pages that use WebOTPService are not currently eligible for bfcache."},"panels/application/components/BackForwardCacheStrings.ts | webRTC":{"message":"Pages with WebRTC cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webRTCSticky":{"message":"Undefined"},"panels/application/components/BackForwardCacheStrings.ts | webShare":{"message":"Pages that use WebShare are not currently eligible for back/forwad cache."},"panels/application/components/BackForwardCacheStrings.ts | webSocket":{"message":"Pages with WebSocket cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webSocketSticky":{"message":"Undefined"},"panels/application/components/BackForwardCacheStrings.ts | webTransport":{"message":"Pages with WebTransport cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webTransportSticky":{"message":"Undefined"},"panels/application/components/BackForwardCacheStrings.ts | webXR":{"message":"Pages that use WebXR are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheView.ts | backForwardCacheTitle":{"message":"Back/forward cache"},"panels/application/components/BackForwardCacheView.ts | blankURLTitle":{"message":"Blank URL [{PH1}]"},"panels/application/components/BackForwardCacheView.ts | blockingExtensionId":{"message":"Extension id: "},"panels/application/components/BackForwardCacheView.ts | circumstantial":{"message":"Not Actionable"},"panels/application/components/BackForwardCacheView.ts | circumstantialExplanation":{"message":"These reasons are not actionable i.e. caching was prevented by something outside of the direct control of the page."},"panels/application/components/BackForwardCacheView.ts | framesPerIssue":{"message":"{n, plural, =1 {# frame} other {# frames}}"},"panels/application/components/BackForwardCacheView.ts | framesTitle":{"message":"Frames"},"panels/application/components/BackForwardCacheView.ts | issuesInMultipleFrames":{"message":"{n, plural, =1 {# issue found in {m} frames.} other {# issues found in {m} frames.}}"},"panels/application/components/BackForwardCacheView.ts | issuesInSingleFrame":{"message":"{n, plural, =1 {# issue found in 1 frame.} other {# issues found in 1 frame.}}"},"panels/application/components/BackForwardCacheView.ts | learnMore":{"message":"Learn more: back/forward cache eligibility"},"panels/application/components/BackForwardCacheView.ts | mainFrame":{"message":"Main Frame"},"panels/application/components/BackForwardCacheView.ts | neverUseUnload":{"message":"Learn more: Never use unload handler"},"panels/application/components/BackForwardCacheView.ts | normalNavigation":{"message":"Not served from back/forward cache: to trigger back/forward cache, use Chrome's back/forward buttons, or use the test button below to automatically navigate away and back."},"panels/application/components/BackForwardCacheView.ts | pageSupportNeeded":{"message":"Actionable"},"panels/application/components/BackForwardCacheView.ts | pageSupportNeededExplanation":{"message":"These reasons are actionable i.e. they can be cleaned up to make the page eligible for back/forward cache."},"panels/application/components/BackForwardCacheView.ts | restoredFromBFCache":{"message":"Successfully served from back/forward cache."},"panels/application/components/BackForwardCacheView.ts | runningTest":{"message":"Running test"},"panels/application/components/BackForwardCacheView.ts | runTest":{"message":"Test back/forward cache"},"panels/application/components/BackForwardCacheView.ts | supportPending":{"message":"Pending Support"},"panels/application/components/BackForwardCacheView.ts | supportPendingExplanation":{"message":"Chrome support for these reasons is pending i.e. they will not prevent the page from being eligible for back/forward cache in a future version of Chrome."},"panels/application/components/BackForwardCacheView.ts | unavailable":{"message":"unavailable"},"panels/application/components/BackForwardCacheView.ts | unknown":{"message":"Unknown Status"},"panels/application/components/BackForwardCacheView.ts | url":{"message":"URL:"},"panels/application/components/BounceTrackingMitigationsView.ts | bounceTrackingMitigationsTitle":{"message":"Bounce Tracking Mitigations"},"panels/application/components/BounceTrackingMitigationsView.ts | checkingPotentialTrackers":{"message":"Checking for potential bounce tracking sites."},"panels/application/components/BounceTrackingMitigationsView.ts | forceRun":{"message":"Force run"},"panels/application/components/BounceTrackingMitigationsView.ts | learnMore":{"message":"Learn more: Bounce Tracking Mitigations"},"panels/application/components/BounceTrackingMitigationsView.ts | noPotentialBounceTrackersIdentified":{"message":"State was not cleared for any potential bounce tracking sites. Either none were identified, bounce tracking mitigations are not enabled, or third-party cookies are not blocked."},"panels/application/components/BounceTrackingMitigationsView.ts | runningMitigations":{"message":"Running"},"panels/application/components/BounceTrackingMitigationsView.ts | stateDeletedFor":{"message":"State was deleted for the following sites:"},"panels/application/components/EndpointsGrid.ts | noEndpointsToDisplay":{"message":"No endpoints to display"},"panels/application/components/FrameDetailsView.ts | additionalInformation":{"message":"Additional Information"},"panels/application/components/FrameDetailsView.ts | adStatus":{"message":"Ad Status"},"panels/application/components/FrameDetailsView.ts | aFrameAncestorIsAnInsecure":{"message":"A frame ancestor is an insecure context"},"panels/application/components/FrameDetailsView.ts | apiAvailability":{"message":"API availability"},"panels/application/components/FrameDetailsView.ts | availabilityOfCertainApisDepends":{"message":"Availability of certain APIs depends on the document being cross-origin isolated."},"panels/application/components/FrameDetailsView.ts | available":{"message":"available"},"panels/application/components/FrameDetailsView.ts | availableNotTransferable":{"message":"available, not transferable"},"panels/application/components/FrameDetailsView.ts | availableTransferable":{"message":"available, transferable"},"panels/application/components/FrameDetailsView.ts | child":{"message":"child"},"panels/application/components/FrameDetailsView.ts | childDescription":{"message":"This frame has been identified as a child frame of an ad"},"panels/application/components/FrameDetailsView.ts | clickToRevealInElementsPanel":{"message":"Click to reveal in Elements panel"},"panels/application/components/FrameDetailsView.ts | clickToRevealInNetworkPanel":{"message":"Click to reveal in Network panel"},"panels/application/components/FrameDetailsView.ts | clickToRevealInNetworkPanelMight":{"message":"Click to reveal in Network panel (might require page reload)"},"panels/application/components/FrameDetailsView.ts | clickToRevealInSourcesPanel":{"message":"Click to reveal in Sources panel"},"panels/application/components/FrameDetailsView.ts | createdByAdScriptExplanation":{"message":"There was an ad script in the (async) stack when this frame was created. Examining the creation stack trace of this frame might provide more insight."},"panels/application/components/FrameDetailsView.ts | creationStackTrace":{"message":"Frame Creation Stack Trace"},"panels/application/components/FrameDetailsView.ts | creationStackTraceExplanation":{"message":"This frame was created programmatically. The stack trace shows where this happened."},"panels/application/components/FrameDetailsView.ts | creatorAdScript":{"message":"Creator Ad Script"},"panels/application/components/FrameDetailsView.ts | crossoriginIsolated":{"message":"Cross-Origin Isolated"},"panels/application/components/FrameDetailsView.ts | document":{"message":"Document"},"panels/application/components/FrameDetailsView.ts | frameId":{"message":"Frame ID"},"panels/application/components/FrameDetailsView.ts | learnMore":{"message":"Learn more"},"panels/application/components/FrameDetailsView.ts | localhostIsAlwaysASecureContext":{"message":"Localhost is always a secure context"},"panels/application/components/FrameDetailsView.ts | matchedBlockingRuleExplanation":{"message":"This frame is considered an ad frame because its current (or previous) main document is an ad resource."},"panels/application/components/FrameDetailsView.ts | measureMemory":{"message":"Measure Memory"},"panels/application/components/FrameDetailsView.ts | no":{"message":"No"},"panels/application/components/FrameDetailsView.ts | origin":{"message":"Origin"},"panels/application/components/FrameDetailsView.ts | ownerElement":{"message":"Owner Element"},"panels/application/components/FrameDetailsView.ts | parentIsAdExplanation":{"message":"This frame is considered an ad frame because its parent frame is an ad frame."},"panels/application/components/FrameDetailsView.ts | prerendering":{"message":"Prerendering"},"panels/application/components/FrameDetailsView.ts | prerenderingStatus":{"message":"Prerendering Status"},"panels/application/components/FrameDetailsView.ts | refresh":{"message":"Refresh"},"panels/application/components/FrameDetailsView.ts | reportingTo":{"message":"reporting to"},"panels/application/components/FrameDetailsView.ts | requiresCrossoriginIsolated":{"message":"requires cross-origin isolated context"},"panels/application/components/FrameDetailsView.ts | root":{"message":"root"},"panels/application/components/FrameDetailsView.ts | rootDescription":{"message":"This frame has been identified as the root frame of an ad"},"panels/application/components/FrameDetailsView.ts | secureContext":{"message":"Secure Context"},"panels/application/components/FrameDetailsView.ts | securityIsolation":{"message":"Security & Isolation"},"panels/application/components/FrameDetailsView.ts | sharedarraybufferConstructorIs":{"message":"SharedArrayBuffer constructor is available and SABs can be transferred via postMessage"},"panels/application/components/FrameDetailsView.ts | sharedarraybufferConstructorIsAvailable":{"message":"SharedArrayBuffer constructor is available but SABs cannot be transferred via postMessage"},"panels/application/components/FrameDetailsView.ts | theFramesSchemeIsInsecure":{"message":"The frame's scheme is insecure"},"panels/application/components/FrameDetailsView.ts | thePerformanceAPI":{"message":"The performance.measureUserAgentSpecificMemory() API is available"},"panels/application/components/FrameDetailsView.ts | thePerformancemeasureuseragentspecificmemory":{"message":"The performance.measureUserAgentSpecificMemory() API is not available"},"panels/application/components/FrameDetailsView.ts | thisAdditionalDebugging":{"message":"This additional (debugging) information is shown because the 'Protocol Monitor' experiment is enabled."},"panels/application/components/FrameDetailsView.ts | transferRequiresCrossoriginIsolatedPermission":{"message":"SharedArrayBuffer transfer requires enabling the permission policy:"},"panels/application/components/FrameDetailsView.ts | unavailable":{"message":"unavailable"},"panels/application/components/FrameDetailsView.ts | unreachableUrl":{"message":"Unreachable URL"},"panels/application/components/FrameDetailsView.ts | url":{"message":"URL"},"panels/application/components/FrameDetailsView.ts | willRequireCrossoriginIsolated":{"message":"⚠️ will require cross-origin isolated context in the future"},"panels/application/components/FrameDetailsView.ts | yes":{"message":"Yes"},"panels/application/components/InterestGroupAccessGrid.ts | allInterestGroupStorageEvents":{"message":"All interest group storage events."},"panels/application/components/InterestGroupAccessGrid.ts | eventTime":{"message":"Event Time"},"panels/application/components/InterestGroupAccessGrid.ts | eventType":{"message":"Access Type"},"panels/application/components/InterestGroupAccessGrid.ts | groupName":{"message":"Name"},"panels/application/components/InterestGroupAccessGrid.ts | groupOwner":{"message":"Owner"},"panels/application/components/InterestGroupAccessGrid.ts | noEvents":{"message":"No interest group events recorded."},"panels/application/components/OriginTrialTreeView.ts | expiryTime":{"message":"Expiry Time"},"panels/application/components/OriginTrialTreeView.ts | isThirdParty":{"message":"Third Party"},"panels/application/components/OriginTrialTreeView.ts | matchSubDomains":{"message":"Subdomain Matching"},"panels/application/components/OriginTrialTreeView.ts | origin":{"message":"Origin"},"panels/application/components/OriginTrialTreeView.ts | rawTokenText":{"message":"Raw Token"},"panels/application/components/OriginTrialTreeView.ts | status":{"message":"Token Status"},"panels/application/components/OriginTrialTreeView.ts | token":{"message":"Token"},"panels/application/components/OriginTrialTreeView.ts | tokens":{"message":"{PH1} tokens"},"panels/application/components/OriginTrialTreeView.ts | trialName":{"message":"Trial Name"},"panels/application/components/OriginTrialTreeView.ts | usageRestriction":{"message":"Usage Restriction"},"panels/application/components/PermissionsPolicySection.ts | allowedFeatures":{"message":"Allowed Features"},"panels/application/components/PermissionsPolicySection.ts | clickToShowHeader":{"message":"Click to reveal the request whose \"Permissions-Policy\" HTTP header disables this feature."},"panels/application/components/PermissionsPolicySection.ts | clickToShowIframe":{"message":"Click to reveal the top-most iframe which does not allow this feature in the elements panel."},"panels/application/components/PermissionsPolicySection.ts | disabledByFencedFrame":{"message":"disabled inside a fencedframe"},"panels/application/components/PermissionsPolicySection.ts | disabledByHeader":{"message":"disabled by \"Permissions-Policy\" header"},"panels/application/components/PermissionsPolicySection.ts | disabledByIframe":{"message":"missing in iframe \"allow\" attribute"},"panels/application/components/PermissionsPolicySection.ts | disabledFeatures":{"message":"Disabled Features"},"panels/application/components/PermissionsPolicySection.ts | hideDetails":{"message":"Hide details"},"panels/application/components/PermissionsPolicySection.ts | showDetails":{"message":"Show details"},"panels/application/components/Prerender2.ts | Activated":{"message":"Activated."},"panels/application/components/Prerender2.ts | ActivatedBeforeStarted":{"message":"Activated before started"},"panels/application/components/Prerender2.ts | ActivationNavigationParameterMismatch":{"message":"The page was prerendered, but the navigation ended up being performed differently than the original prerender, so the prerendered page could not be activated."},"panels/application/components/Prerender2.ts | AudioOutputDeviceRequested":{"message":"Prerendering has not supported the AudioContext API yet."},"panels/application/components/Prerender2.ts | BlockedByClient":{"message":"Resource load is blocked by the client."},"panels/application/components/Prerender2.ts | CancelAllHostsForTesting":{"message":"CancelAllHostsForTesting."},"panels/application/components/Prerender2.ts | ClientCertRequested":{"message":"The page is requesting client cert, which is not suitable for a hidden page like prerendering."},"panels/application/components/Prerender2.ts | CrossSiteNavigation":{"message":"The prerendered page navigated to a cross-site URL after loading. Currently prerendering cross-site pages is disallowed."},"panels/application/components/Prerender2.ts | CrossSiteRedirect":{"message":"Attempted to prerender a URL which redirected to a cross-site URL. Currently prerendering cross-site pages is disallowed."},"panels/application/components/Prerender2.ts | DataSaverEnabled":{"message":"Data saver enabled"},"panels/application/components/Prerender2.ts | Destroyed":{"message":"A prerendered page was abandoned for unknown reasons."},"panels/application/components/Prerender2.ts | DidFailLoad":{"message":"DidFailLoadWithError happened during prerendering."},"panels/application/components/Prerender2.ts | DisallowedApiMethod":{"message":"Disallowed API method"},"panels/application/components/Prerender2.ts | Download":{"message":"Download is disallowed in Prerender."},"panels/application/components/Prerender2.ts | EmbedderTriggeredAndCrossOriginRedirected":{"message":"Prerendering triggered by Chrome internal (e.g., Omnibox prerendering) is is canceled because the navigation is redirected to another cross-origin page."},"panels/application/components/Prerender2.ts | EmbedderTriggeredAndSameOriginRedirected":{"message":"Prerendering triggered by Chrome internal (e.g., Omnibox prerendering) is canceled because the navigation is redirected to another same-origin page."},"panels/application/components/Prerender2.ts | FailToGetMemoryUsage":{"message":"Fail to get memory usage"},"panels/application/components/Prerender2.ts | HasEffectiveUrl":{"message":"Has effective URL"},"panels/application/components/Prerender2.ts | InactivePageRestriction":{"message":"Inactive page restriction"},"panels/application/components/Prerender2.ts | InProgressNavigation":{"message":"InProgressNavigation."},"panels/application/components/Prerender2.ts | InvalidSchemeNavigation":{"message":"Only HTTP(S) navigation allowed for Prerender."},"panels/application/components/Prerender2.ts | InvalidSchemeRedirect":{"message":"Attempted to prerender a URL that redirected to a non-HTTP(S) URL. Only HTTP(S) pages can be prerendered."},"panels/application/components/Prerender2.ts | LoginAuthRequested":{"message":"Prerender does not support auth requests from UI."},"panels/application/components/Prerender2.ts | LowEndDevice":{"message":"Prerendering is not supported for low-memory devices."},"panels/application/components/Prerender2.ts | MainFrameNavigation":{"message":"Navigations after the initial prerendering navigation are disallowed"},"panels/application/components/Prerender2.ts | MaxNumOfRunningPrerendersExceeded":{"message":"Max number of prerendering exceeded."},"panels/application/components/Prerender2.ts | MemoryLimitExceeded":{"message":"Memory limit exceeded"},"panels/application/components/Prerender2.ts | MixedContent":{"message":"Prerendering is canceled by a mixed content frame."},"panels/application/components/Prerender2.ts | MojoBinderPolicy":{"message":"A disallowed API was used by the prerendered page"},"panels/application/components/Prerender2.ts | NavigationBadHttpStatus":{"message":"The initial prerendering navigation was not successful due to the server returning a non-200/204/205 status code."},"panels/application/components/Prerender2.ts | NavigationNotCommitted":{"message":"The prerendering page is not committed in the end."},"panels/application/components/Prerender2.ts | NavigationRequestBlockedByCsp":{"message":"Navigation request is blocked by CSP."},"panels/application/components/Prerender2.ts | NavigationRequestNetworkError":{"message":"Encountered a network error during prerendering."},"panels/application/components/Prerender2.ts | PrerenderingOngoing":{"message":"Prerendering ongoing"},"panels/application/components/Prerender2.ts | RendererProcessCrashed":{"message":"The prerendered page crashed."},"panels/application/components/Prerender2.ts | RendererProcessKilled":{"message":"The renderer process for the prerendering page was killed."},"panels/application/components/Prerender2.ts | SameSiteCrossOriginNavigation":{"message":"The prerendered page navigated to a same-site cross-origin URL after loading. Currently prerendering cross-origin pages is disallowed."},"panels/application/components/Prerender2.ts | SameSiteCrossOriginNavigationNotOptIn":{"message":"The prerendered page navigated to a same-site cross-origin URL after loading. This is disallowed unless the destination site sends a Supports-Loading-Mode: credentialed-prerender header."},"panels/application/components/Prerender2.ts | SameSiteCrossOriginRedirect":{"message":"Attempted to prerender a URL which redirected to a same-site cross-origin URL. Currently prerendering cross-origin pages is disallowed."},"panels/application/components/Prerender2.ts | SameSiteCrossOriginRedirectNotOptIn":{"message":"Attempted to prerender a URL which redirected to a same-site cross-origin URL. This is disallowed unless the destination site sends a Supports-Loading-Mode: credentialed-prerender header."},"panels/application/components/Prerender2.ts | SslCertificateError":{"message":"SSL certificate error."},"panels/application/components/Prerender2.ts | StartFailed":{"message":"Start failed"},"panels/application/components/Prerender2.ts | Stop":{"message":"The tab is stopped."},"panels/application/components/Prerender2.ts | TriggerBackgrounded":{"message":"The tab is in the background"},"panels/application/components/Prerender2.ts | TriggerDestroyed":{"message":"Prerender is not activated and destroyed with the trigger."},"panels/application/components/Prerender2.ts | UaChangeRequiresReload":{"message":"Reload is needed after UserAgentOverride."},"panels/application/components/ProtocolHandlersView.ts | dropdownLabel":{"message":"Select protocol handler"},"panels/application/components/ProtocolHandlersView.ts | manifest":{"message":"manifest"},"panels/application/components/ProtocolHandlersView.ts | needHelpReadOur":{"message":"Need help? Read {PH1}."},"panels/application/components/ProtocolHandlersView.ts | protocolDetected":{"message":"Found valid protocol handler registration in the {PH1}. With the app installed, test the registered protocols."},"panels/application/components/ProtocolHandlersView.ts | protocolHandlerRegistrations":{"message":"URL protocol handler registration for PWAs"},"panels/application/components/ProtocolHandlersView.ts | protocolNotDetected":{"message":"Define protocol handlers in the {PH1} to register your app as a handler for custom protocols when your app is installed."},"panels/application/components/ProtocolHandlersView.ts | testProtocol":{"message":"Test protocol"},"panels/application/components/ProtocolHandlersView.ts | textboxLabel":{"message":"Query parameter or endpoint for protocol handler"},"panels/application/components/ProtocolHandlersView.ts | textboxPlaceholder":{"message":"Enter URL"},"panels/application/components/ReportsGrid.ts | destination":{"message":"Destination"},"panels/application/components/ReportsGrid.ts | generatedAt":{"message":"Generated at"},"panels/application/components/ReportsGrid.ts | noReportsToDisplay":{"message":"No reports to display"},"panels/application/components/ReportsGrid.ts | status":{"message":"Status"},"panels/application/components/SharedStorageAccessGrid.ts | allSharedStorageEvents":{"message":"All shared storage events for this page."},"panels/application/components/SharedStorageAccessGrid.ts | eventParams":{"message":"Optional Event Params"},"panels/application/components/SharedStorageAccessGrid.ts | eventTime":{"message":"Event Time"},"panels/application/components/SharedStorageAccessGrid.ts | eventType":{"message":"Access Type"},"panels/application/components/SharedStorageAccessGrid.ts | mainFrameId":{"message":"Main Frame ID"},"panels/application/components/SharedStorageAccessGrid.ts | noEvents":{"message":"No shared storage events recorded."},"panels/application/components/SharedStorageAccessGrid.ts | ownerOrigin":{"message":"Owner Origin"},"panels/application/components/SharedStorageAccessGrid.ts | sharedStorage":{"message":"Shared Storage"},"panels/application/components/SharedStorageMetadataView.ts | budgetExplanation":{"message":"Remaining data leakage allowed within a 24-hour period for this origin in bits of entropy"},"panels/application/components/SharedStorageMetadataView.ts | creation":{"message":"Creation Time"},"panels/application/components/SharedStorageMetadataView.ts | entropyBudget":{"message":"Entropy Budget for Fenced Frames"},"panels/application/components/SharedStorageMetadataView.ts | notYetCreated":{"message":"Not yet created"},"panels/application/components/SharedStorageMetadataView.ts | numEntries":{"message":"Number of Entries"},"panels/application/components/SharedStorageMetadataView.ts | resetBudget":{"message":"Reset Budget"},"panels/application/components/SharedStorageMetadataView.ts | sharedStorage":{"message":"Shared Storage"},"panels/application/components/StackTrace.ts | cannotRenderStackTrace":{"message":"Cannot render stack trace"},"panels/application/components/StackTrace.ts | showLess":{"message":"Show less"},"panels/application/components/StackTrace.ts | showSMoreFrames":{"message":"{n, plural, =1 {Show # more frame} other {Show # more frames}}"},"panels/application/components/StorageMetadataView.ts | bucketName":{"message":"Bucket name"},"panels/application/components/StorageMetadataView.ts | durability":{"message":"Durability"},"panels/application/components/StorageMetadataView.ts | expiration":{"message":"Expiration"},"panels/application/components/StorageMetadataView.ts | isOpaque":{"message":"Is opaque"},"panels/application/components/StorageMetadataView.ts | isThirdParty":{"message":"Is third-party"},"panels/application/components/StorageMetadataView.ts | loading":{"message":"Loading…"},"panels/application/components/StorageMetadataView.ts | no":{"message":"No"},"panels/application/components/StorageMetadataView.ts | none":{"message":"None"},"panels/application/components/StorageMetadataView.ts | opaque":{"message":"(opaque)"},"panels/application/components/StorageMetadataView.ts | origin":{"message":"Origin"},"panels/application/components/StorageMetadataView.ts | persistent":{"message":"Is persistent"},"panels/application/components/StorageMetadataView.ts | quota":{"message":"Quota"},"panels/application/components/StorageMetadataView.ts | topLevelSite":{"message":"Top-level site"},"panels/application/components/StorageMetadataView.ts | yes":{"message":"Yes"},"panels/application/components/StorageMetadataView.ts | yesBecauseAncestorChainHasCrossSite":{"message":"Yes, because the ancestry chain contains a third-party origin"},"panels/application/components/StorageMetadataView.ts | yesBecauseKeyIsOpaque":{"message":"Yes, because the storage key is opaque"},"panels/application/components/StorageMetadataView.ts | yesBecauseOriginNotInTopLevelSite":{"message":"Yes, because the origin is outside of the top-level site"},"panels/application/components/StorageMetadataView.ts | yesBecauseTopLevelIsOpaque":{"message":"Yes, because the top-level site is opaque"},"panels/application/components/TrustTokensView.ts | allStoredTrustTokensAvailableIn":{"message":"All stored Private State Tokens available in this browser instance."},"panels/application/components/TrustTokensView.ts | deleteTrustTokens":{"message":"Delete all stored Private State Tokens issued by {PH1}."},"panels/application/components/TrustTokensView.ts | issuer":{"message":"Issuer"},"panels/application/components/TrustTokensView.ts | noTrustTokensStored":{"message":"No Private State Tokens are currently stored."},"panels/application/components/TrustTokensView.ts | storedTokenCount":{"message":"Stored token count"},"panels/application/components/TrustTokensView.ts | trustTokens":{"message":"Private State Tokens"},"panels/application/CookieItemsView.ts | clearAllCookies":{"message":"Clear all cookies"},"panels/application/CookieItemsView.ts | clearFilteredCookies":{"message":"Clear filtered cookies"},"panels/application/CookieItemsView.ts | cookies":{"message":"Cookies"},"panels/application/CookieItemsView.ts | numberOfCookiesShownInTableS":{"message":"Number of cookies shown in table: {PH1}"},"panels/application/CookieItemsView.ts | onlyShowCookiesWhichHaveAn":{"message":"Only show cookies that have an associated issue"},"panels/application/CookieItemsView.ts | onlyShowCookiesWithAnIssue":{"message":"Only show cookies with an issue"},"panels/application/CookieItemsView.ts | selectACookieToPreviewItsValue":{"message":"Select a cookie to preview its value"},"panels/application/CookieItemsView.ts | showUrlDecoded":{"message":"Show URL-decoded"},"panels/application/DatabaseModel.ts | anUnexpectedErrorSOccurred":{"message":"An unexpected error {PH1} occurred."},"panels/application/DatabaseModel.ts | databaseNoLongerHasExpected":{"message":"Database no longer has expected version."},"panels/application/DatabaseQueryView.ts | databaseQuery":{"message":"Database Query"},"panels/application/DatabaseQueryView.ts | queryS":{"message":"Query: {PH1}"},"panels/application/DatabaseTableView.ts | anErrorOccurredTryingToreadTheS":{"message":"An error occurred trying to read the \"{PH1}\" table."},"panels/application/DatabaseTableView.ts | database":{"message":"Database"},"panels/application/DatabaseTableView.ts | refresh":{"message":"Refresh"},"panels/application/DatabaseTableView.ts | theStableIsEmpty":{"message":"The \"{PH1}\" table is empty."},"panels/application/DatabaseTableView.ts | visibleColumns":{"message":"Visible columns"},"panels/application/DOMStorageItemsView.ts | domStorage":{"message":"DOM Storage"},"panels/application/DOMStorageItemsView.ts | domStorageItemDeleted":{"message":"The storage item was deleted."},"panels/application/DOMStorageItemsView.ts | domStorageItems":{"message":"DOM Storage Items"},"panels/application/DOMStorageItemsView.ts | domStorageItemsCleared":{"message":"DOM Storage Items cleared"},"panels/application/DOMStorageItemsView.ts | domStorageNumberEntries":{"message":"Number of entries shown in table: {PH1}"},"panels/application/DOMStorageItemsView.ts | key":{"message":"Key"},"panels/application/DOMStorageItemsView.ts | selectAValueToPreview":{"message":"Select a value to preview"},"panels/application/DOMStorageItemsView.ts | value":{"message":"Value"},"panels/application/IndexedDBViews.ts | clearObjectStore":{"message":"Clear object store"},"panels/application/IndexedDBViews.ts | collapse":{"message":"Collapse"},"panels/application/IndexedDBViews.ts | dataMayBeStale":{"message":"Data may be stale"},"panels/application/IndexedDBViews.ts | deleteDatabase":{"message":"Delete database"},"panels/application/IndexedDBViews.ts | deleteSelected":{"message":"Delete selected"},"panels/application/IndexedDBViews.ts | expandRecursively":{"message":"Expand Recursively"},"panels/application/IndexedDBViews.ts | idb":{"message":"IDB"},"panels/application/IndexedDBViews.ts | indexedDb":{"message":"Indexed DB"},"panels/application/IndexedDBViews.ts | keyGeneratorValueS":{"message":"Key generator value: {PH1}"},"panels/application/IndexedDBViews.ts | keyPath":{"message":"Key path: "},"panels/application/IndexedDBViews.ts | keyString":{"message":"Key"},"panels/application/IndexedDBViews.ts | objectStores":{"message":"Object stores"},"panels/application/IndexedDBViews.ts | pleaseConfirmDeleteOfSDatabase":{"message":"Please confirm delete of \"{PH1}\" database."},"panels/application/IndexedDBViews.ts | primaryKey":{"message":"Primary key"},"panels/application/IndexedDBViews.ts | refresh":{"message":"Refresh"},"panels/application/IndexedDBViews.ts | refreshDatabase":{"message":"Refresh database"},"panels/application/IndexedDBViews.ts | showNextPage":{"message":"Show next page"},"panels/application/IndexedDBViews.ts | showPreviousPage":{"message":"Show previous page"},"panels/application/IndexedDBViews.ts | someEntriesMayHaveBeenModified":{"message":"Some entries may have been modified"},"panels/application/IndexedDBViews.ts | startFromKey":{"message":"Start from key"},"panels/application/IndexedDBViews.ts | totalEntriesS":{"message":"Total entries: {PH1}"},"panels/application/IndexedDBViews.ts | valueString":{"message":"Value"},"panels/application/IndexedDBViews.ts | version":{"message":"Version"},"panels/application/InterestGroupStorageView.ts | clickToDisplayBody":{"message":"Click on any interest group event to display the group's current state"},"panels/application/InterestGroupStorageView.ts | noDataAvailable":{"message":"No details available for the selected interest group. The browser may have left the group."},"panels/application/InterestGroupTreeElement.ts | interestGroups":{"message":"Interest Groups"},"panels/application/OpenedWindowDetailsView.ts | accessToOpener":{"message":"Access to opener"},"panels/application/OpenedWindowDetailsView.ts | clickToRevealInElementsPanel":{"message":"Click to reveal in Elements panel"},"panels/application/OpenedWindowDetailsView.ts | closed":{"message":"closed"},"panels/application/OpenedWindowDetailsView.ts | crossoriginEmbedderPolicy":{"message":"Cross-Origin Embedder Policy"},"panels/application/OpenedWindowDetailsView.ts | document":{"message":"Document"},"panels/application/OpenedWindowDetailsView.ts | no":{"message":"No"},"panels/application/OpenedWindowDetailsView.ts | openerFrame":{"message":"Opener Frame"},"panels/application/OpenedWindowDetailsView.ts | reportingTo":{"message":"reporting to"},"panels/application/OpenedWindowDetailsView.ts | security":{"message":"Security"},"panels/application/OpenedWindowDetailsView.ts | securityIsolation":{"message":"Security & Isolation"},"panels/application/OpenedWindowDetailsView.ts | showsWhetherTheOpenedWindowIs":{"message":"Shows whether the opened window is able to access its opener and vice versa"},"panels/application/OpenedWindowDetailsView.ts | type":{"message":"Type"},"panels/application/OpenedWindowDetailsView.ts | unknown":{"message":"Unknown"},"panels/application/OpenedWindowDetailsView.ts | url":{"message":"URL"},"panels/application/OpenedWindowDetailsView.ts | webWorker":{"message":"Web Worker"},"panels/application/OpenedWindowDetailsView.ts | windowWithoutTitle":{"message":"Window without title"},"panels/application/OpenedWindowDetailsView.ts | worker":{"message":"worker"},"panels/application/OpenedWindowDetailsView.ts | yes":{"message":"Yes"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusFailure":{"message":"Preloading failed."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusNotTriggered":{"message":"Preloading attempt is not yet triggered."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusPending":{"message":"Preloading attempt is eligible but pending."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusReady":{"message":"Preloading finished and the result is ready for the next navigation."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusRunning":{"message":"Preloading is running."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusSuccess":{"message":"Preloading finished and used for a navigation."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsAction":{"message":"Action"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsDetailedInformation":{"message":"Detailed information"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsFailureReason":{"message":"Failure reason"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsRuleSet":{"message":"Rule set"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsStatus":{"message":"Status"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusActivatedDuringMainFrameNavigation":{"message":"Prerendered page activated during initiating page's main frame navigation."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusActivationFramePolicyNotCompatible":{"message":"The prerender was not used because the sandboxing flags or permissions policy of the initiating page was not compatible with those of the prerendering page."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusActivationNavigationParameterMismatch":{"message":"The prerender was not used because during activation time, different navigation parameters (e.g., HTTP headers) were calculated than during the original prerendering navigation request."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusAudioOutputDeviceRequested":{"message":"The prerendered page requested audio output, which is currently not supported."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusBatterySaverEnabled":{"message":"The prerender was not performed because the user requested that the browser use less battery."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusBlockedByClient":{"message":"Some resource load was blocked."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusClientCertRequested":{"message":"The prerendering navigation required a HTTP client certificate."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusCrossSiteNavigationInInitialNavigation":{"message":"The prerendering navigation failed because it targeted a cross-site URL."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusCrossSiteNavigationInMainFrameNavigation":{"message":"The prerendered page navigated to a cross-site URL."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusCrossSiteRedirectInInitialNavigation":{"message":"The prerendering navigation failed because the prerendered URL redirected to a cross-site URL."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusCrossSiteRedirectInMainFrameNavigation":{"message":"The prerendered page navigated to a URL which redirected to a cross-site URL."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusDataSaverEnabled":{"message":"The prerender was not performed because the user requested that the browser use less data."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusDownload":{"message":"The prerendered page attempted to initiate a download, which is currently not supported."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusFailToGetMemoryUsage":{"message":"The prerender was not performed because the browser encountered an internal error attempting to determine current memory usage."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusHasEffectiveUrl":{"message":"The initiating page cannot perform prerendering, because it has an effective URL that is different from its normal URL. (For example, the New Tab Page, or hosted apps.)"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusInvalidSchemeNavigation":{"message":"The URL was not eligible to be prerendered because its scheme was not http: or https:."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusInvalidSchemeRedirect":{"message":"The prerendering navigation failed because it redirected to a URL whose scheme was not http: or https:."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusLoginAuthRequested":{"message":"The prerendering navigation required HTTP authentication, which is currently not supported."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusLowEndDevice":{"message":"The prerender was not performed because this device does not have enough total system memory to support prerendering."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusMainFrameNavigation":{"message":"The prerendered page navigated itself to another URL, which is currently not supported."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusMaxNumOfRunningPrerendersExceeded":{"message":"The prerender was not performed because the initiating page already has too many prerenders ongoing. Remove other speculation rules to enable further prerendering."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusMemoryLimitExceeded":{"message":"The prerender was not performed because the browser exceeded the prerendering memory limit."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusMemoryPressureAfterTriggered":{"message":"The prerendered page was unloaded because the browser came under critical memory pressure."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusMemoryPressureOnTrigger":{"message":"The prerender was not performed because the browser was under critical memory pressure."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusMixedContent":{"message":"The prerendered page contained mixed content."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusMojoBinderPolicy":{"message":"The prerendered page used a forbidden JavaScript API that is currently not supported."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusNavigationBadHttpStatus":{"message":"The prerendering navigation failed because of a non-2xx HTTP response status code."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusNavigationRequestBlockedByCsp":{"message":"The prerendering navigation was blocked by a Content Security Policy."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusNavigationRequestNetworkError":{"message":"The prerendering navigation encountered a network error."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusPreloadingDisabled":{"message":"The prerender was not performed because the user disabled preloading in their browser settings."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusPrerenderingDisabledByDevTools":{"message":"The prerender was not performed because DevTools has been used to disable prerendering."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusPrimaryMainFrameRendererProcessCrashed":{"message":"The initiating page crashed."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusPrimaryMainFrameRendererProcessKilled":{"message":"The initiating page was killed."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusRendererProcessCrashed":{"message":"The prerendered page crashed."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusRendererProcessKilled":{"message":"The prerendered page was killed."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusResourceLoadBlockedByClient":{"message":"Some resource load was blocked."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusSameSiteCrossOriginNavigationNotOptInInInitialNavigation":{"message":"The prerendered page navigated itself to a cross-origin same-site URL, but the destination response did not include the appropriate Supports-Loading-Mode header."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusSameSiteCrossOriginNavigationNotOptInInMainFrameNavigation":{"message":"The prerendered page navigated to a cross-origin same-site URL, but the destination response did not include the appropriate Supports-Loading-Mode header."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusSameSiteCrossOriginRedirectNotOptInInInitialNavigation":{"message":"The prerendering navigation failed because the prerendered URL redirected to a cross-origin same-site URL, but the destination response did not include the appropriate Supports-Loading-Mode header."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusSameSiteCrossOriginRedirectNotOptInInMainFrameNavigation":{"message":"The prerendered page navigated to a URL which redirected to a cross-origin same-site URL, but the destination response did not include the appropriate Supports-Loading-Mode header."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusSslCertificateError":{"message":"The prerendering navigation failed because of an invalid SSL certificate."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusTimeoutBackgrounded":{"message":"The initiating page was backgrounded for a long time, so the prerendered page was discarded."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusTriggerBackgrounded":{"message":"The initiating page was backgrounded, so the prerendered page was discarded."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusUaChangeRequiresReload":{"message":"Changing User Agent occured in prerendering navigation."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | selectAnElementForMoreDetails":{"message":"Select an element for more details"},"panels/application/preloading/components/PreloadingGrid.ts | action":{"message":"Action"},"panels/application/preloading/components/PreloadingGrid.ts | status":{"message":"Status"},"panels/application/preloading/components/PreloadingString.ts | PrefetchEvicted":{"message":"The prefetch was discarded for a newer prefetch because |kPrefetchNewLimits| is enabled"},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedIneligibleRedirect":{"message":"The prefetch was redirected, but the redirect URL is not eligible for prefetch."},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedInvalidRedirect":{"message":"The prefetch was redirected, but there was a problem with the redirect."},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedMIMENotSupported":{"message":"The prefetch failed because the response's Content-Type header was not supported."},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedNetError":{"message":"The prefetch failed because of a network error."},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedNon2XX":{"message":"The prefetch failed because of a non-2xx HTTP response status code."},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedPerPageLimitExceeded":{"message":"The prefetch was not performed because the initiating page already has too many prefetches ongoing."},"panels/application/preloading/components/PreloadingString.ts | PrefetchIneligibleRetryAfter":{"message":"A previous prefetch to the origin got a HTTP 503 response with an Retry-After header that has not elapsed yet."},"panels/application/preloading/components/PreloadingString.ts | PrefetchIsPrivacyDecoy":{"message":"The URL was not eligible to be prefetched because there was a registered service worker or cross-site cookies for that origin, but the prefetch was put on the network anyways and not used, to disguise that the user had some kind of previous relationship with the origin."},"panels/application/preloading/components/PreloadingString.ts | PrefetchIsStale":{"message":"Too much time elapsed between the prefetch and usage, so the prefetch was discarded."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleBatterySaverEnabled":{"message":"The prefetch was not performed because the Battery Saver setting was enabled."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleBrowserContextOffTheRecord":{"message":"The prefetch was not performed because the browser is in Incognito or Guest mode."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleDataSaverEnabled":{"message":"The prefetch was not performed because the operating system is in Data Saver mode."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleExistingProxy":{"message":"The URL is not eligible to be prefetched, because in the default network context it is configured to use a proxy server."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleHostIsNonUnique":{"message":"The URL was not eligible to be prefetched because its host was not unique (e.g., a non publicly routable IP address or a hostname which is not registry-controlled), but the prefetch was required to be proxied."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleNonDefaultStoragePartition":{"message":"The URL was not eligible to be prefetched because it uses a non-default storage partition."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligiblePreloadingDisabled":{"message":"The prefetch was not performed because preloading was disabled."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy":{"message":"The URL was not eligible to be prefetched because the default network context cannot be configured to use the prefetch proxy for a same-site cross-origin prefetch request."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleSchemeIsNotHttps":{"message":"The URL was not eligible to be prefetched because its scheme was not https:."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleUserHasCookies":{"message":"The URL was not eligible to be prefetched because it was cross-site, but the user had cookies for that origin."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleUserHasServiceWorker":{"message":"The URL was not eligible to be prefetched because there was a registered service worker for that origin, which is currently not supported."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotUsedCookiesChanged":{"message":"The prefetch was not used because it was a cross-site prefetch, and cookies were added for that URL while the prefetch was ongoing, so the prefetched response is now out-of-date."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotUsedProbeFailed":{"message":"The prefetch was blocked by your Internet Service Provider or network administrator."},"panels/application/preloading/components/PreloadingString.ts | PrefetchProxyNotAvailable":{"message":"A network error was encountered when trying to set up a connection to the prefetching proxy."},"panels/application/preloading/components/RuleSetDetailsReportView.ts | buttonClickToRevealInElementsPanel":{"message":"Click to reveal in Elements panel"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | buttonClickToRevealInNetworkPanel":{"message":"Click to reveal in Network panel"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | detailsDetailedInformation":{"message":"Detailed information"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | detailsError":{"message":"Error"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | detailsLocation":{"message":"Location"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | detailsSource":{"message":"Source"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | detailsValidity":{"message":"Validity"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | validityInvalid":{"message":"Invalid; source is not a JSON object"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | validitySomeRulesInvalid":{"message":"Some rules are invalid and ignored"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | validityValid":{"message":"Valid"},"panels/application/preloading/components/RuleSetGrid.ts | location":{"message":"Location"},"panels/application/preloading/components/RuleSetGrid.ts | validity":{"message":"Validity"},"panels/application/preloading/components/UsedPreloadingView.ts | prefetchUsed":{"message":"{PH1} prefetched resources are used for this page"},"panels/application/preloading/components/UsedPreloadingView.ts | preloadingUsedForThisPage":{"message":"Preloading used for this page"},"panels/application/preloading/components/UsedPreloadingView.ts | prerenderUsed":{"message":"This page was prerendered"},"panels/application/preloading/PreloadingView.ts | extensionSettings":{"message":"Extensions settings"},"panels/application/preloading/PreloadingView.ts | filterAllRuleSets":{"message":"All rule sets"},"panels/application/preloading/PreloadingView.ts | filterFilterByRuleSet":{"message":"Filter by rule set"},"panels/application/preloading/PreloadingView.ts | filterRuleSet":{"message":"Rule set: {PH1}"},"panels/application/preloading/PreloadingView.ts | preloadingPageSettings":{"message":"Preload pages settings"},"panels/application/preloading/PreloadingView.ts | statusFailure":{"message":"Failure"},"panels/application/preloading/PreloadingView.ts | statusNotTriggered":{"message":"Not triggered"},"panels/application/preloading/PreloadingView.ts | statusPending":{"message":"Pending"},"panels/application/preloading/PreloadingView.ts | statusReady":{"message":"Ready"},"panels/application/preloading/PreloadingView.ts | statusRunning":{"message":"Running"},"panels/application/preloading/PreloadingView.ts | statusSuccess":{"message":"Success"},"panels/application/preloading/PreloadingView.ts | validityInvalid":{"message":"Invalid"},"panels/application/preloading/PreloadingView.ts | validitySomeRulesInvalid":{"message":"Some rules invalid"},"panels/application/preloading/PreloadingView.ts | validityValid":{"message":"Valid"},"panels/application/preloading/PreloadingView.ts | warningDetailPreloadingDisabledByBatterysaver":{"message":"Preloading is disabled because of the operating system's Battery Saver mode."},"panels/application/preloading/PreloadingView.ts | warningDetailPreloadingDisabledByDatasaver":{"message":"Preloading is disabled because of the operating system's Data Saver mode."},"panels/application/preloading/PreloadingView.ts | warningDetailPreloadingDisabledByFeatureFlag":{"message":"Preloading is forced-enabled because DevTools is open. When DevTools is closed, prerendering will be disabled because this browser session is part of a holdback group used for performance comparisons."},"panels/application/preloading/PreloadingView.ts | warningDetailPreloadingStateDisabled":{"message":"Preloading is disabled because of user settings or an extension. Go to {PH1} to learn more, or go to {PH2} to disable the extension."},"panels/application/preloading/PreloadingView.ts | warningDetailPrerenderingDisabledByFeatureFlag":{"message":"Prerendering is forced-enabled because DevTools is open. When DevTools is closed, prerendering will be disabled because this browser session is part of a holdback group used for performance comparisons."},"panels/application/preloading/PreloadingView.ts | warningTitlePreloadingDisabledByFeatureFlag":{"message":"Preloading was disabled, but is force-enabled now"},"panels/application/preloading/PreloadingView.ts | warningTitlePreloadingStateDisabled":{"message":"Preloading is disabled"},"panels/application/preloading/PreloadingView.ts | warningTitlePrerenderingDisabledByFeatureFlag":{"message":"Prerendering was disabled, but is force-enabled now"},"panels/application/PreloadingTreeElement.ts | prefetchingAndPrerendering":{"message":"Prefetching & Prerendering"},"panels/application/PreloadingTreeElement.ts | thisPage":{"message":"This Page"},"panels/application/ReportingApiReportsView.ts | clickToDisplayBody":{"message":"Click on any report to display its body"},"panels/application/ReportingApiTreeElement.ts | reportingApi":{"message":"Reporting API"},"panels/application/ServiceWorkerCacheTreeElement.ts | cacheStorage":{"message":"Cache Storage"},"panels/application/ServiceWorkerCacheTreeElement.ts | delete":{"message":"Delete"},"panels/application/ServiceWorkerCacheTreeElement.ts | refreshCaches":{"message":"Refresh Caches"},"panels/application/ServiceWorkerCacheViews.ts | cache":{"message":"Cache"},"panels/application/ServiceWorkerCacheViews.ts | deleteSelected":{"message":"Delete Selected"},"panels/application/ServiceWorkerCacheViews.ts | filterByPath":{"message":"Filter by Path"},"panels/application/ServiceWorkerCacheViews.ts | headers":{"message":"Headers"},"panels/application/ServiceWorkerCacheViews.ts | matchingEntriesS":{"message":"Matching entries: {PH1}"},"panels/application/ServiceWorkerCacheViews.ts | name":{"message":"Name"},"panels/application/ServiceWorkerCacheViews.ts | preview":{"message":"Preview"},"panels/application/ServiceWorkerCacheViews.ts | refresh":{"message":"Refresh"},"panels/application/ServiceWorkerCacheViews.ts | selectACacheEntryAboveToPreview":{"message":"Select a cache entry above to preview"},"panels/application/ServiceWorkerCacheViews.ts | serviceWorkerCache":{"message":"Service Worker Cache"},"panels/application/ServiceWorkerCacheViews.ts | timeCached":{"message":"Time Cached"},"panels/application/ServiceWorkerCacheViews.ts | totalEntriesS":{"message":"Total entries: {PH1}"},"panels/application/ServiceWorkerCacheViews.ts | varyHeaderWarning":{"message":"⚠️ Set ignoreVary to true when matching this entry"},"panels/application/ServiceWorkersView.ts | bypassForNetwork":{"message":"Bypass for network"},"panels/application/ServiceWorkersView.ts | bypassTheServiceWorkerAndLoad":{"message":"Bypass the service worker and load resources from the network"},"panels/application/ServiceWorkersView.ts | clients":{"message":"Clients"},"panels/application/ServiceWorkersView.ts | focus":{"message":"focus"},"panels/application/ServiceWorkersView.ts | inspect":{"message":"inspect"},"panels/application/ServiceWorkersView.ts | networkRequests":{"message":"Network requests"},"panels/application/ServiceWorkersView.ts | onPageReloadForceTheService":{"message":"On page reload, force the service worker to update, and activate it"},"panels/application/ServiceWorkersView.ts | periodicSync":{"message":"Periodic Sync"},"panels/application/ServiceWorkersView.ts | periodicSyncTag":{"message":"Periodic Sync tag"},"panels/application/ServiceWorkersView.ts | pushData":{"message":"Push data"},"panels/application/ServiceWorkersView.ts | pushString":{"message":"Push"},"panels/application/ServiceWorkersView.ts | receivedS":{"message":"Received {PH1}"},"panels/application/ServiceWorkersView.ts | sActivatedAndIsS":{"message":"#{PH1} activated and is {PH2}"},"panels/application/ServiceWorkersView.ts | sDeleted":{"message":"{PH1} - deleted"},"panels/application/ServiceWorkersView.ts | seeAllRegistrations":{"message":"See all registrations"},"panels/application/ServiceWorkersView.ts | serviceWorkerForS":{"message":"Service worker for {PH1}"},"panels/application/ServiceWorkersView.ts | serviceWorkersFromOtherOrigins":{"message":"Service workers from other origins"},"panels/application/ServiceWorkersView.ts | sIsRedundant":{"message":"#{PH1} is redundant"},"panels/application/ServiceWorkersView.ts | source":{"message":"Source"},"panels/application/ServiceWorkersView.ts | sRegistrationErrors":{"message":"{PH1} registration errors"},"panels/application/ServiceWorkersView.ts | startString":{"message":"start"},"panels/application/ServiceWorkersView.ts | status":{"message":"Status"},"panels/application/ServiceWorkersView.ts | stopString":{"message":"stop"},"panels/application/ServiceWorkersView.ts | sTryingToInstall":{"message":"#{PH1} trying to install"},"panels/application/ServiceWorkersView.ts | sWaitingToActivate":{"message":"#{PH1} waiting to activate"},"panels/application/ServiceWorkersView.ts | syncString":{"message":"Sync"},"panels/application/ServiceWorkersView.ts | syncTag":{"message":"Sync tag"},"panels/application/ServiceWorkersView.ts | testPushMessageFromDevtools":{"message":"Test push message from DevTools."},"panels/application/ServiceWorkersView.ts | unregister":{"message":"Unregister"},"panels/application/ServiceWorkersView.ts | unregisterServiceWorker":{"message":"Unregister service worker"},"panels/application/ServiceWorkersView.ts | update":{"message":"Update"},"panels/application/ServiceWorkersView.ts | updateCycle":{"message":"Update Cycle"},"panels/application/ServiceWorkersView.ts | updateOnReload":{"message":"Update on reload"},"panels/application/ServiceWorkersView.ts | workerS":{"message":"Worker: {PH1}"},"panels/application/ServiceWorkerUpdateCycleView.ts | endTimeS":{"message":"End time: {PH1}"},"panels/application/ServiceWorkerUpdateCycleView.ts | startTimeS":{"message":"Start time: {PH1}"},"panels/application/ServiceWorkerUpdateCycleView.ts | timeline":{"message":"Timeline"},"panels/application/ServiceWorkerUpdateCycleView.ts | updateActivity":{"message":"Update Activity"},"panels/application/ServiceWorkerUpdateCycleView.ts | version":{"message":"Version"},"panels/application/SharedStorageEventsView.ts | clickToDisplayBody":{"message":"Click on any shared storage event to display the event parameters."},"panels/application/SharedStorageItemsView.ts | key":{"message":"Key"},"panels/application/SharedStorageItemsView.ts | selectAValueToPreview":{"message":"Select a value to preview"},"panels/application/SharedStorageItemsView.ts | sharedStorage":{"message":"Shared Storage"},"panels/application/SharedStorageItemsView.ts | sharedStorageFilteredItemsCleared":{"message":"Shared Storage filtered items cleared"},"panels/application/SharedStorageItemsView.ts | sharedStorageItemDeleted":{"message":"The storage item was deleted."},"panels/application/SharedStorageItemsView.ts | sharedStorageItemEditCanceled":{"message":"The storage item edit was canceled."},"panels/application/SharedStorageItemsView.ts | sharedStorageItemEdited":{"message":"The storage item was edited."},"panels/application/SharedStorageItemsView.ts | sharedStorageItems":{"message":"Shared Storage Items"},"panels/application/SharedStorageItemsView.ts | sharedStorageItemsCleared":{"message":"Shared Storage items cleared"},"panels/application/SharedStorageItemsView.ts | sharedStorageNumberEntries":{"message":"Number of entries shown in table: {PH1}"},"panels/application/SharedStorageItemsView.ts | value":{"message":"Value"},"panels/application/SharedStorageListTreeElement.ts | sharedStorage":{"message":"Shared Storage"},"panels/application/StorageItemsView.ts | clearAll":{"message":"Clear All"},"panels/application/StorageItemsView.ts | deleteSelected":{"message":"Delete Selected"},"panels/application/StorageItemsView.ts | filter":{"message":"Filter"},"panels/application/StorageItemsView.ts | refresh":{"message":"Refresh"},"panels/application/StorageItemsView.ts | refreshedStatus":{"message":"Table refreshed"},"panels/application/StorageView.ts | application":{"message":"Application"},"panels/application/StorageView.ts | cache":{"message":"Cache"},"panels/application/StorageView.ts | cacheStorage":{"message":"Cache storage"},"panels/application/StorageView.ts | clearing":{"message":"Clearing..."},"panels/application/StorageView.ts | clearSiteData":{"message":"Clear site data"},"panels/application/StorageView.ts | cookies":{"message":"Cookies"},"panels/application/StorageView.ts | fileSystem":{"message":"File System"},"panels/application/StorageView.ts | includingThirdPartyCookies":{"message":"including third-party cookies"},"panels/application/StorageView.ts | indexDB":{"message":"IndexedDB"},"panels/application/StorageView.ts | internalError":{"message":"Internal error"},"panels/application/StorageView.ts | learnMore":{"message":"Learn more"},"panels/application/StorageView.ts | localAndSessionStorage":{"message":"Local and session storage"},"panels/application/StorageView.ts | mb":{"message":"MB"},"panels/application/StorageView.ts | numberMustBeNonNegative":{"message":"Number must be non-negative"},"panels/application/StorageView.ts | numberMustBeSmaller":{"message":"Number must be smaller than {PH1}"},"panels/application/StorageView.ts | other":{"message":"Other"},"panels/application/StorageView.ts | pleaseEnterANumber":{"message":"Please enter a number"},"panels/application/StorageView.ts | serviceWorkers":{"message":"Service Workers"},"panels/application/StorageView.ts | sFailedToLoad":{"message":"{PH1} (failed to load)"},"panels/application/StorageView.ts | simulateCustomStorage":{"message":"Simulate custom storage quota"},"panels/application/StorageView.ts | SiteDataCleared":{"message":"Site data cleared"},"panels/application/StorageView.ts | storageQuotaIsLimitedIn":{"message":"Storage quota is limited in Incognito mode"},"panels/application/StorageView.ts | storageQuotaUsed":{"message":"{PH1} used out of {PH2} storage quota"},"panels/application/StorageView.ts | storageQuotaUsedWithBytes":{"message":"{PH1} bytes used out of {PH2} bytes storage quota"},"panels/application/StorageView.ts | storageTitle":{"message":"Storage"},"panels/application/StorageView.ts | storageUsage":{"message":"Storage usage"},"panels/application/StorageView.ts | storageWithCustomMarker":{"message":"{PH1} (custom)"},"panels/application/StorageView.ts | unregisterServiceWorker":{"message":"Unregister service workers"},"panels/application/StorageView.ts | usage":{"message":"Usage"},"panels/application/StorageView.ts | webSql":{"message":"Web SQL"},"panels/application/TrustTokensTreeElement.ts | trustTokens":{"message":"Private State Tokens"},"panels/browser_debugger/browser_debugger-meta.ts | contentScripts":{"message":"Content scripts"},"panels/browser_debugger/browser_debugger-meta.ts | cspViolationBreakpoints":{"message":"CSP Violation Breakpoints"},"panels/browser_debugger/browser_debugger-meta.ts | domBreakpoints":{"message":"DOM Breakpoints"},"panels/browser_debugger/browser_debugger-meta.ts | eventListenerBreakpoints":{"message":"Event Listener Breakpoints"},"panels/browser_debugger/browser_debugger-meta.ts | globalListeners":{"message":"Global Listeners"},"panels/browser_debugger/browser_debugger-meta.ts | overrides":{"message":"Overrides"},"panels/browser_debugger/browser_debugger-meta.ts | page":{"message":"Page"},"panels/browser_debugger/browser_debugger-meta.ts | showContentScripts":{"message":"Show Content scripts"},"panels/browser_debugger/browser_debugger-meta.ts | showCspViolationBreakpoints":{"message":"Show CSP Violation Breakpoints"},"panels/browser_debugger/browser_debugger-meta.ts | showDomBreakpoints":{"message":"Show DOM Breakpoints"},"panels/browser_debugger/browser_debugger-meta.ts | showEventListenerBreakpoints":{"message":"Show Event Listener Breakpoints"},"panels/browser_debugger/browser_debugger-meta.ts | showGlobalListeners":{"message":"Show Global Listeners"},"panels/browser_debugger/browser_debugger-meta.ts | showOverrides":{"message":"Show Overrides"},"panels/browser_debugger/browser_debugger-meta.ts | showPage":{"message":"Show Page"},"panels/browser_debugger/browser_debugger-meta.ts | showXhrfetchBreakpoints":{"message":"Show XHR/fetch Breakpoints"},"panels/browser_debugger/browser_debugger-meta.ts | xhrfetchBreakpoints":{"message":"XHR/fetch Breakpoints"},"panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts | breakpointHit":{"message":"breakpoint hit"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | attributeModified":{"message":"Attribute modified"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | breakOn":{"message":"Break on"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | breakpointHit":{"message":"breakpoint hit"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | breakpointRemoved":{"message":"Breakpoint removed"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | breakpointSet":{"message":"Breakpoint set"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | checked":{"message":"checked"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | domBreakpointsList":{"message":"DOM Breakpoints list"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | noBreakpoints":{"message":"No breakpoints"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | nodeRemoved":{"message":"Node removed"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | removeAllDomBreakpoints":{"message":"Remove all DOM breakpoints"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | removeBreakpoint":{"message":"Remove breakpoint"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | revealDomNodeInElementsPanel":{"message":"Reveal DOM node in Elements panel"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | sBreakpointHit":{"message":"{PH1} breakpoint hit"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | sS":{"message":"{PH1}: {PH2}"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | sSS":{"message":"{PH1}: {PH2}, {PH3}"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | subtreeModified":{"message":"Subtree modified"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | unchecked":{"message":"unchecked"},"panels/browser_debugger/ObjectEventListenersSidebarPane.ts | refreshGlobalListeners":{"message":"Refresh global listeners"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | addBreakpoint":{"message":"Add breakpoint"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | addXhrfetchBreakpoint":{"message":"Add XHR/fetch breakpoint"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | anyXhrOrFetch":{"message":"Any XHR or fetch"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | breakpointHit":{"message":"breakpoint hit"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | breakWhenUrlContains":{"message":"Break when URL contains:"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | noBreakpoints":{"message":"No breakpoints"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | removeAllBreakpoints":{"message":"Remove all breakpoints"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | removeBreakpoint":{"message":"Remove breakpoint"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | urlBreakpoint":{"message":"URL Breakpoint"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | urlContainsS":{"message":"URL contains \"{PH1}\""},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | xhrfetchBreakpoints":{"message":"XHR/fetch Breakpoints"},"panels/changes/changes-meta.ts | changes":{"message":"Changes"},"panels/changes/changes-meta.ts | showChanges":{"message":"Show Changes"},"panels/changes/ChangesSidebar.ts | sFromSourceMap":{"message":"{PH1} (from source map)"},"panels/changes/ChangesView.ts | binaryData":{"message":"Binary data"},"panels/changes/ChangesView.ts | copy":{"message":"Copy"},"panels/changes/ChangesView.ts | copyAllChangesFromCurrentFile":{"message":"Copy all changes from current file"},"panels/changes/ChangesView.ts | noChanges":{"message":"No changes"},"panels/changes/ChangesView.ts | revertAllChangesToCurrentFile":{"message":"Revert all changes to current file"},"panels/changes/ChangesView.ts | sDeletions":{"message":"{n, plural, =1 {# deletion (-)} other {# deletions (-)}}"},"panels/changes/ChangesView.ts | sInsertions":{"message":"{n, plural, =1 {# insertion (+)} other {# insertions (+)}}"},"panels/console_counters/WarningErrorCounter.ts | openConsoleToViewS":{"message":"Open Console to view {PH1}"},"panels/console_counters/WarningErrorCounter.ts | openIssuesToView":{"message":"{n, plural, =1 {Open Issues to view # issue:} other {Open Issues to view # issues:}}"},"panels/console_counters/WarningErrorCounter.ts | sErrors":{"message":"{n, plural, =1 {# error} other {# errors}}"},"panels/console_counters/WarningErrorCounter.ts | sWarnings":{"message":"{n, plural, =1 {# warning} other {# warnings}}"},"panels/console/console-meta.ts | autocompleteFromHistory":{"message":"Autocomplete from history"},"panels/console/console-meta.ts | autocompleteOnEnter":{"message":"Accept autocomplete suggestion on Enter"},"panels/console/console-meta.ts | clearConsole":{"message":"Clear console"},"panels/console/console-meta.ts | clearConsoleHistory":{"message":"Clear console history"},"panels/console/console-meta.ts | collapseConsoleTraceMessagesByDefault":{"message":"Do not automatically expand console.trace() messages"},"panels/console/console-meta.ts | console":{"message":"Console"},"panels/console/console-meta.ts | createLiveExpression":{"message":"Create live expression"},"panels/console/console-meta.ts | doNotAutocompleteFromHistory":{"message":"Do not autocomplete from history"},"panels/console/console-meta.ts | doNotAutocompleteOnEnter":{"message":"Do not accept autocomplete suggestion on Enter"},"panels/console/console-meta.ts | doNotEagerlyEvaluateConsole":{"message":"Do not eagerly evaluate console prompt text"},"panels/console/console-meta.ts | doNotGroupSimilarMessagesIn":{"message":"Do not group similar messages in console"},"panels/console/console-meta.ts | doNotShowCorsErrorsIn":{"message":"Do not show CORS errors in console"},"panels/console/console-meta.ts | doNotTreatEvaluationAsUser":{"message":"Do not treat evaluation as user activation"},"panels/console/console-meta.ts | eagerEvaluation":{"message":"Eager evaluation"},"panels/console/console-meta.ts | eagerlyEvaluateConsolePromptText":{"message":"Eagerly evaluate console prompt text"},"panels/console/console-meta.ts | evaluateTriggersUserActivation":{"message":"Treat code evaluation as user action"},"panels/console/console-meta.ts | expandConsoleTraceMessagesByDefault":{"message":"Automatically expand console.trace() messages"},"panels/console/console-meta.ts | groupSimilarMessagesInConsole":{"message":"Group similar messages in console"},"panels/console/console-meta.ts | hideNetworkMessages":{"message":"Hide network messages"},"panels/console/console-meta.ts | hideTimestamps":{"message":"Hide timestamps"},"panels/console/console-meta.ts | logXmlhttprequests":{"message":"Log XMLHttpRequests"},"panels/console/console-meta.ts | onlyShowMessagesFromTheCurrent":{"message":"Only show messages from the current context (top, iframe, worker, extension)"},"panels/console/console-meta.ts | selectedContextOnly":{"message":"Selected context only"},"panels/console/console-meta.ts | showConsole":{"message":"Show Console"},"panels/console/console-meta.ts | showCorsErrorsInConsole":{"message":"Show CORS errors in console"},"panels/console/console-meta.ts | showMessagesFromAllContexts":{"message":"Show messages from all contexts"},"panels/console/console-meta.ts | showNetworkMessages":{"message":"Show network messages"},"panels/console/console-meta.ts | showTimestamps":{"message":"Show timestamps"},"panels/console/console-meta.ts | treatEvaluationAsUserActivation":{"message":"Treat evaluation as user activation"},"panels/console/ConsoleContextSelector.ts | extension":{"message":"Extension"},"panels/console/ConsoleContextSelector.ts | javascriptContextNotSelected":{"message":"JavaScript context: Not selected"},"panels/console/ConsoleContextSelector.ts | javascriptContextS":{"message":"JavaScript context: {PH1}"},"panels/console/ConsolePinPane.ts | evaluateAllowingSideEffects":{"message":"Evaluate, allowing side effects"},"panels/console/ConsolePinPane.ts | expression":{"message":"Expression"},"panels/console/ConsolePinPane.ts | liveExpressionEditor":{"message":"Live expression editor"},"panels/console/ConsolePinPane.ts | notAvailable":{"message":"not available"},"panels/console/ConsolePinPane.ts | removeAllExpressions":{"message":"Remove all expressions"},"panels/console/ConsolePinPane.ts | removeBlankExpression":{"message":"Remove blank expression"},"panels/console/ConsolePinPane.ts | removeExpression":{"message":"Remove expression"},"panels/console/ConsolePinPane.ts | removeExpressionS":{"message":"Remove expression: {PH1}"},"panels/console/ConsolePrompt.ts | consolePrompt":{"message":"Console prompt"},"panels/console/ConsoleSidebar.ts | dErrors":{"message":"{n, plural, =0 {No errors} =1 {# error} other {# errors}}"},"panels/console/ConsoleSidebar.ts | dInfo":{"message":"{n, plural, =0 {No info} =1 {# info} other {# info}}"},"panels/console/ConsoleSidebar.ts | dMessages":{"message":"{n, plural, =0 {No messages} =1 {# message} other {# messages}}"},"panels/console/ConsoleSidebar.ts | dUserMessages":{"message":"{n, plural, =0 {No user messages} =1 {# user message} other {# user messages}}"},"panels/console/ConsoleSidebar.ts | dVerbose":{"message":"{n, plural, =0 {No verbose} =1 {# verbose} other {# verbose}}"},"panels/console/ConsoleSidebar.ts | dWarnings":{"message":"{n, plural, =0 {No warnings} =1 {# warning} other {# warnings}}"},"panels/console/ConsoleSidebar.ts | other":{"message":""},"panels/console/ConsoleView.ts | allLevels":{"message":"All levels"},"panels/console/ConsoleView.ts | autocompleteFromHistory":{"message":"Autocomplete from history"},"panels/console/ConsoleView.ts | consoleCleared":{"message":"Console cleared"},"panels/console/ConsoleView.ts | consolePasteBlocked":{"message":"Pasting code is blocked on this page. Pasting code into devtools can allow attackers to take over your account."},"panels/console/ConsoleView.ts | consoleSettings":{"message":"Console settings"},"panels/console/ConsoleView.ts | consoleSidebarHidden":{"message":"Console sidebar hidden"},"panels/console/ConsoleView.ts | consoleSidebarShown":{"message":"Console sidebar shown"},"panels/console/ConsoleView.ts | copyVisibleStyledSelection":{"message":"Copy visible styled selection"},"panels/console/ConsoleView.ts | customLevels":{"message":"Custom levels"},"panels/console/ConsoleView.ts | default":{"message":"Default"},"panels/console/ConsoleView.ts | defaultLevels":{"message":"Default levels"},"panels/console/ConsoleView.ts | doNotClearLogOnPageReload":{"message":"Do not clear log on page reload / navigation"},"panels/console/ConsoleView.ts | eagerlyEvaluateTextInThePrompt":{"message":"Eagerly evaluate text in the prompt"},"panels/console/ConsoleView.ts | egEventdCdnUrlacom":{"message":"e.g. /eventd/ -cdn url:a.com"},"panels/console/ConsoleView.ts | errors":{"message":"Errors"},"panels/console/ConsoleView.ts | filter":{"message":"Filter"},"panels/console/ConsoleView.ts | filteredMessagesInConsole":{"message":"{PH1} messages in console"},"panels/console/ConsoleView.ts | findStringInLogs":{"message":"Find string in logs"},"panels/console/ConsoleView.ts | groupSimilarMessagesInConsole":{"message":"Group similar messages in console"},"panels/console/ConsoleView.ts | hideAll":{"message":"Hide all"},"panels/console/ConsoleView.ts | hideConsoleSidebar":{"message":"Hide console sidebar"},"panels/console/ConsoleView.ts | hideMessagesFromS":{"message":"Hide messages from {PH1}"},"panels/console/ConsoleView.ts | hideNetwork":{"message":"Hide network"},"panels/console/ConsoleView.ts | info":{"message":"Info"},"panels/console/ConsoleView.ts | issuesWithColon":{"message":"{n, plural, =0 {No Issues} =1 {# Issue:} other {# Issues:}}"},"panels/console/ConsoleView.ts | issueToolbarClickToGoToTheIssuesTab":{"message":"Click to go to the issues tab"},"panels/console/ConsoleView.ts | issueToolbarClickToView":{"message":"Click to view {issueEnumeration}"},"panels/console/ConsoleView.ts | issueToolbarTooltipGeneral":{"message":"Some problems no longer generate console messages, but are surfaced in the issues tab."},"panels/console/ConsoleView.ts | logLevels":{"message":"Log levels"},"panels/console/ConsoleView.ts | logLevelS":{"message":"Log level: {PH1}"},"panels/console/ConsoleView.ts | logXMLHttpRequests":{"message":"Log XMLHttpRequests"},"panels/console/ConsoleView.ts | onlyShowMessagesFromTheCurrentContext":{"message":"Only show messages from the current context (top, iframe, worker, extension)"},"panels/console/ConsoleView.ts | overriddenByFilterSidebar":{"message":"Overridden by filter sidebar"},"panels/console/ConsoleView.ts | preserveLog":{"message":"Preserve log"},"panels/console/ConsoleView.ts | replayXhr":{"message":"Replay XHR"},"panels/console/ConsoleView.ts | saveAs":{"message":"Save as..."},"panels/console/ConsoleView.ts | searching":{"message":"Searching…"},"panels/console/ConsoleView.ts | selectedContextOnly":{"message":"Selected context only"},"panels/console/ConsoleView.ts | sHidden":{"message":"{n, plural, =1 {# hidden} other {# hidden}}"},"panels/console/ConsoleView.ts | showConsoleSidebar":{"message":"Show console sidebar"},"panels/console/ConsoleView.ts | showCorsErrorsInConsole":{"message":"Show CORS errors in console"},"panels/console/ConsoleView.ts | sOnly":{"message":"{PH1} only"},"panels/console/ConsoleView.ts | treatEvaluationAsUserActivation":{"message":"Treat evaluation as user activation"},"panels/console/ConsoleView.ts | verbose":{"message":"Verbose"},"panels/console/ConsoleView.ts | warnings":{"message":"Warnings"},"panels/console/ConsoleView.ts | writingFile":{"message":"Writing file…"},"panels/console/ConsoleViewMessage.ts | assertionFailed":{"message":"Assertion failed: "},"panels/console/ConsoleViewMessage.ts | attribute":{"message":""},"panels/console/ConsoleViewMessage.ts | clearAllMessagesWithS":{"message":"Clear all messages with {PH1}"},"panels/console/ConsoleViewMessage.ts | cndBreakpoint":{"message":"Conditional Breakpoint"},"panels/console/ConsoleViewMessage.ts | console":{"message":"Console"},"panels/console/ConsoleViewMessage.ts | consoleclearWasPreventedDueTo":{"message":"console.clear() was prevented due to 'Preserve log'"},"panels/console/ConsoleViewMessage.ts | consoleWasCleared":{"message":"Console was cleared"},"panels/console/ConsoleViewMessage.ts | deprecationS":{"message":"[Deprecation] {PH1}"},"panels/console/ConsoleViewMessage.ts | error":{"message":"Error"},"panels/console/ConsoleViewMessage.ts | errorS":{"message":"{n, plural, =1 {Error, Repeated # time} other {Error, Repeated # times}}"},"panels/console/ConsoleViewMessage.ts | exception":{"message":""},"panels/console/ConsoleViewMessage.ts | functionWasResolvedFromBound":{"message":"Function was resolved from bound function."},"panels/console/ConsoleViewMessage.ts | index":{"message":"(index)"},"panels/console/ConsoleViewMessage.ts | interventionS":{"message":"[Intervention] {PH1}"},"panels/console/ConsoleViewMessage.ts | logpoint":{"message":"Logpoint"},"panels/console/ConsoleViewMessage.ts | Mxx":{"message":" M"},"panels/console/ConsoleViewMessage.ts | repeatS":{"message":"{n, plural, =1 {Repeated # time} other {Repeated # times}}"},"panels/console/ConsoleViewMessage.ts | someEvent":{"message":" event"},"panels/console/ConsoleViewMessage.ts | stackMessageCollapsed":{"message":"Stack table collapsed"},"panels/console/ConsoleViewMessage.ts | stackMessageExpanded":{"message":"Stack table expanded"},"panels/console/ConsoleViewMessage.ts | thisValueWasEvaluatedUponFirst":{"message":"This value was evaluated upon first expanding. It may have changed since then."},"panels/console/ConsoleViewMessage.ts | thisValueWillNotBeCollectedUntil":{"message":"This value will not be collected until console is cleared."},"panels/console/ConsoleViewMessage.ts | tookNms":{"message":"took ms"},"panels/console/ConsoleViewMessage.ts | url":{"message":""},"panels/console/ConsoleViewMessage.ts | value":{"message":"Value"},"panels/console/ConsoleViewMessage.ts | violationS":{"message":"[Violation] {PH1}"},"panels/console/ConsoleViewMessage.ts | warning":{"message":"Warning"},"panels/console/ConsoleViewMessage.ts | warningS":{"message":"{n, plural, =1 {Warning, Repeated # time} other {Warning, Repeated # times}}"},"panels/coverage/coverage-meta.ts | coverage":{"message":"Coverage"},"panels/coverage/coverage-meta.ts | instrumentCoverage":{"message":"Instrument coverage"},"panels/coverage/coverage-meta.ts | reloadPage":{"message":"Reload page"},"panels/coverage/coverage-meta.ts | showCoverage":{"message":"Show Coverage"},"panels/coverage/coverage-meta.ts | startInstrumentingCoverageAnd":{"message":"Start instrumenting coverage and reload page"},"panels/coverage/coverage-meta.ts | stopInstrumentingCoverageAndShow":{"message":"Stop instrumenting coverage and show results"},"panels/coverage/CoverageListView.ts | codeCoverage":{"message":"Code Coverage"},"panels/coverage/CoverageListView.ts | css":{"message":"CSS"},"panels/coverage/CoverageListView.ts | jsCoverageWithPerBlock":{"message":"JS coverage with per block granularity: Once a block of JavaScript was executed, that block is marked as covered."},"panels/coverage/CoverageListView.ts | jsCoverageWithPerFunction":{"message":"JS coverage with per function granularity: Once a function was executed, the whole function is marked as covered."},"panels/coverage/CoverageListView.ts | jsPerBlock":{"message":"JS (per block)"},"panels/coverage/CoverageListView.ts | jsPerFunction":{"message":"JS (per function)"},"panels/coverage/CoverageListView.ts | sBytes":{"message":"{n, plural, =1 {# byte} other {# bytes}}"},"panels/coverage/CoverageListView.ts | sBytesS":{"message":"{n, plural, =1 {# byte, {percentage}} other {# bytes, {percentage}}}"},"panels/coverage/CoverageListView.ts | sBytesSBelongToBlocksOf":{"message":"{PH1} bytes ({PH2}) belong to blocks of JavaScript that have not (yet) been executed."},"panels/coverage/CoverageListView.ts | sBytesSBelongToBlocksOfJavascript":{"message":"{PH1} bytes ({PH2}) belong to blocks of JavaScript that have executed at least once."},"panels/coverage/CoverageListView.ts | sBytesSBelongToFunctionsThatHave":{"message":"{PH1} bytes ({PH2}) belong to functions that have not (yet) been executed."},"panels/coverage/CoverageListView.ts | sBytesSBelongToFunctionsThatHaveExecuted":{"message":"{PH1} bytes ({PH2}) belong to functions that have executed at least once."},"panels/coverage/CoverageListView.ts | sOfFileUnusedSOfFileUsed":{"message":"{PH1} % of file unused, {PH2} % of file used"},"panels/coverage/CoverageListView.ts | totalBytes":{"message":"Total Bytes"},"panels/coverage/CoverageListView.ts | type":{"message":"Type"},"panels/coverage/CoverageListView.ts | unusedBytes":{"message":"Unused Bytes"},"panels/coverage/CoverageListView.ts | url":{"message":"URL"},"panels/coverage/CoverageListView.ts | usageVisualization":{"message":"Usage Visualization"},"panels/coverage/CoverageView.ts | activationNoCapture":{"message":"Could not capture coverage info because the page was prerendered in the background."},"panels/coverage/CoverageView.ts | all":{"message":"All"},"panels/coverage/CoverageView.ts | bfcacheNoCapture":{"message":"Could not capture coverage info because the page was served from the back/forward cache."},"panels/coverage/CoverageView.ts | chooseCoverageGranularityPer":{"message":"Choose coverage granularity: Per function has low overhead, per block has significant overhead."},"panels/coverage/CoverageView.ts | clearAll":{"message":"Clear all"},"panels/coverage/CoverageView.ts | clickTheRecordButtonSToStart":{"message":"Click the record button {PH1} to start capturing coverage."},"panels/coverage/CoverageView.ts | clickTheReloadButtonSToReloadAnd":{"message":"Click the reload button {PH1} to reload and start capturing coverage."},"panels/coverage/CoverageView.ts | contentScripts":{"message":"Content scripts"},"panels/coverage/CoverageView.ts | css":{"message":"CSS"},"panels/coverage/CoverageView.ts | export":{"message":"Export..."},"panels/coverage/CoverageView.ts | filterCoverageByType":{"message":"Filter coverage by type"},"panels/coverage/CoverageView.ts | filteredSTotalS":{"message":"Filtered: {PH1} Total: {PH2}"},"panels/coverage/CoverageView.ts | includeExtensionContentScripts":{"message":"Include extension content scripts"},"panels/coverage/CoverageView.ts | javascript":{"message":"JavaScript"},"panels/coverage/CoverageView.ts | perBlock":{"message":"Per block"},"panels/coverage/CoverageView.ts | perFunction":{"message":"Per function"},"panels/coverage/CoverageView.ts | reloadPrompt":{"message":"Click the reload button {PH1} to reload and get coverage."},"panels/coverage/CoverageView.ts | sOfSSUsedSoFarSUnused":{"message":"{PH1} of {PH2} ({PH3}%) used so far, {PH4} unused."},"panels/coverage/CoverageView.ts | urlFilter":{"message":"URL filter"},"panels/css_overview/components/CSSOverviewStartView.ts | captureOverview":{"message":"Capture overview"},"panels/css_overview/components/CSSOverviewStartView.ts | capturePageCSSOverview":{"message":"Capture an overview of your page’s CSS"},"panels/css_overview/components/CSSOverviewStartView.ts | identifyCSSImprovements":{"message":"Identify potential CSS improvements"},"panels/css_overview/components/CSSOverviewStartView.ts | identifyCSSImprovementsWithExampleIssues":{"message":"Identify potential CSS improvements (e.g. low contrast issues, unused declarations, color or font mismatches)"},"panels/css_overview/components/CSSOverviewStartView.ts | locateAffectedElements":{"message":"Locate the affected elements in the Elements panel"},"panels/css_overview/components/CSSOverviewStartView.ts | quickStartWithCSSOverview":{"message":"Quick start: get started with the new CSS Overview panel"},"panels/css_overview/css_overview-meta.ts | cssOverview":{"message":"CSS Overview"},"panels/css_overview/css_overview-meta.ts | showCssOverview":{"message":"Show CSS Overview"},"panels/css_overview/CSSOverviewCompletedView.ts | aa":{"message":"AA"},"panels/css_overview/CSSOverviewCompletedView.ts | aaa":{"message":"AAA"},"panels/css_overview/CSSOverviewCompletedView.ts | apca":{"message":"APCA"},"panels/css_overview/CSSOverviewCompletedView.ts | attributeSelectors":{"message":"Attribute selectors"},"panels/css_overview/CSSOverviewCompletedView.ts | backgroundColorsS":{"message":"Background colors: {PH1}"},"panels/css_overview/CSSOverviewCompletedView.ts | borderColorsS":{"message":"Border colors: {PH1}"},"panels/css_overview/CSSOverviewCompletedView.ts | classSelectors":{"message":"Class selectors"},"panels/css_overview/CSSOverviewCompletedView.ts | colors":{"message":"Colors"},"panels/css_overview/CSSOverviewCompletedView.ts | contrastIssues":{"message":"Contrast issues"},"panels/css_overview/CSSOverviewCompletedView.ts | contrastIssuesS":{"message":"Contrast issues: {PH1}"},"panels/css_overview/CSSOverviewCompletedView.ts | contrastRatio":{"message":"Contrast ratio"},"panels/css_overview/CSSOverviewCompletedView.ts | cssOverviewElements":{"message":"CSS Overview Elements"},"panels/css_overview/CSSOverviewCompletedView.ts | declaration":{"message":"Declaration"},"panels/css_overview/CSSOverviewCompletedView.ts | element":{"message":"Element"},"panels/css_overview/CSSOverviewCompletedView.ts | elements":{"message":"Elements"},"panels/css_overview/CSSOverviewCompletedView.ts | externalStylesheets":{"message":"External stylesheets"},"panels/css_overview/CSSOverviewCompletedView.ts | fillColorsS":{"message":"Fill colors: {PH1}"},"panels/css_overview/CSSOverviewCompletedView.ts | fontInfo":{"message":"Font info"},"panels/css_overview/CSSOverviewCompletedView.ts | idSelectors":{"message":"ID selectors"},"panels/css_overview/CSSOverviewCompletedView.ts | inlineStyleElements":{"message":"Inline style elements"},"panels/css_overview/CSSOverviewCompletedView.ts | mediaQueries":{"message":"Media queries"},"panels/css_overview/CSSOverviewCompletedView.ts | nOccurrences":{"message":"{n, plural, =1 {# occurrence} other {# occurrences}}"},"panels/css_overview/CSSOverviewCompletedView.ts | nonsimpleSelectors":{"message":"Non-simple selectors"},"panels/css_overview/CSSOverviewCompletedView.ts | overviewSummary":{"message":"Overview summary"},"panels/css_overview/CSSOverviewCompletedView.ts | showElement":{"message":"Show element"},"panels/css_overview/CSSOverviewCompletedView.ts | source":{"message":"Source"},"panels/css_overview/CSSOverviewCompletedView.ts | styleRules":{"message":"Style rules"},"panels/css_overview/CSSOverviewCompletedView.ts | textColorSOverSBackgroundResults":{"message":"Text color {PH1} over {PH2} background results in low contrast for {PH3} elements"},"panels/css_overview/CSSOverviewCompletedView.ts | textColorsS":{"message":"Text colors: {PH1}"},"panels/css_overview/CSSOverviewCompletedView.ts | thereAreNoFonts":{"message":"There are no fonts."},"panels/css_overview/CSSOverviewCompletedView.ts | thereAreNoMediaQueries":{"message":"There are no media queries."},"panels/css_overview/CSSOverviewCompletedView.ts | thereAreNoUnusedDeclarations":{"message":"There are no unused declarations."},"panels/css_overview/CSSOverviewCompletedView.ts | typeSelectors":{"message":"Type selectors"},"panels/css_overview/CSSOverviewCompletedView.ts | universalSelectors":{"message":"Universal selectors"},"panels/css_overview/CSSOverviewCompletedView.ts | unusedDeclarations":{"message":"Unused declarations"},"panels/css_overview/CSSOverviewProcessingView.ts | cancel":{"message":"Cancel"},"panels/css_overview/CSSOverviewSidebarPanel.ts | clearOverview":{"message":"Clear overview"},"panels/css_overview/CSSOverviewSidebarPanel.ts | cssOverviewPanelSidebar":{"message":"CSS Overview panel sidebar"},"panels/css_overview/CSSOverviewUnusedDeclarations.ts | bottomAppliedToAStatically":{"message":"Bottom applied to a statically positioned element"},"panels/css_overview/CSSOverviewUnusedDeclarations.ts | heightAppliedToAnInlineElement":{"message":"Height applied to an inline element"},"panels/css_overview/CSSOverviewUnusedDeclarations.ts | leftAppliedToAStatically":{"message":"Left applied to a statically positioned element"},"panels/css_overview/CSSOverviewUnusedDeclarations.ts | rightAppliedToAStatically":{"message":"Right applied to a statically positioned element"},"panels/css_overview/CSSOverviewUnusedDeclarations.ts | topAppliedToAStatically":{"message":"Top applied to a statically positioned element"},"panels/css_overview/CSSOverviewUnusedDeclarations.ts | verticalAlignmentAppliedTo":{"message":"Vertical alignment applied to element which is neither inline nor table-cell"},"panels/css_overview/CSSOverviewUnusedDeclarations.ts | widthAppliedToAnInlineElement":{"message":"Width applied to an inline element"},"panels/developer_resources/developer_resources-meta.ts | developerResources":{"message":"Developer Resources"},"panels/developer_resources/developer_resources-meta.ts | showDeveloperResources":{"message":"Show Developer Resources"},"panels/developer_resources/DeveloperResourcesListView.ts | copyInitiatorUrl":{"message":"Copy initiator URL"},"panels/developer_resources/DeveloperResourcesListView.ts | copyUrl":{"message":"Copy URL"},"panels/developer_resources/DeveloperResourcesListView.ts | developerResources":{"message":"Developer Resources"},"panels/developer_resources/DeveloperResourcesListView.ts | error":{"message":"Error"},"panels/developer_resources/DeveloperResourcesListView.ts | failure":{"message":"failure"},"panels/developer_resources/DeveloperResourcesListView.ts | initiator":{"message":"Initiator"},"panels/developer_resources/DeveloperResourcesListView.ts | pending":{"message":"pending"},"panels/developer_resources/DeveloperResourcesListView.ts | sBytes":{"message":"{n, plural, =1 {# byte} other {# bytes}}"},"panels/developer_resources/DeveloperResourcesListView.ts | status":{"message":"Status"},"panels/developer_resources/DeveloperResourcesListView.ts | success":{"message":"success"},"panels/developer_resources/DeveloperResourcesListView.ts | totalBytes":{"message":"Total Bytes"},"panels/developer_resources/DeveloperResourcesListView.ts | url":{"message":"URL"},"panels/developer_resources/DeveloperResourcesView.ts | enableLoadingThroughTarget":{"message":"Load through website"},"panels/developer_resources/DeveloperResourcesView.ts | enterTextToSearchTheUrlAndError":{"message":"Enter text to search the URL and Error columns"},"panels/developer_resources/DeveloperResourcesView.ts | loadHttpsDeveloperResources":{"message":"Load HTTP(S) developer resources through the website you inspect, not through DevTools"},"panels/developer_resources/DeveloperResourcesView.ts | resources":{"message":"{n, plural, =1 {# resource} other {# resources}}"},"panels/developer_resources/DeveloperResourcesView.ts | resourcesCurrentlyLoading":{"message":"{PH1} resources, {PH2} currently loading"},"panels/elements/ClassesPaneWidget.ts | addNewClass":{"message":"Add new class"},"panels/elements/ClassesPaneWidget.ts | classesSAdded":{"message":"Classes {PH1} added"},"panels/elements/ClassesPaneWidget.ts | classSAdded":{"message":"Class {PH1} added"},"panels/elements/ClassesPaneWidget.ts | elementClasses":{"message":"Element Classes"},"panels/elements/ColorSwatchPopoverIcon.ts | openCubicBezierEditor":{"message":"Open cubic bezier editor"},"panels/elements/ColorSwatchPopoverIcon.ts | openShadowEditor":{"message":"Open shadow editor"},"panels/elements/components/AccessibilityTreeNode.ts | ignored":{"message":"Ignored"},"panels/elements/components/AdornerSettingsPane.ts | closeButton":{"message":"Close"},"panels/elements/components/AdornerSettingsPane.ts | settingsTitle":{"message":"Show badges"},"panels/elements/components/CSSHintDetailsView.ts | learnMore":{"message":"Learn More"},"panels/elements/components/CSSPropertyDocsView.ts | dontShow":{"message":"Don't show"},"panels/elements/components/CSSPropertyDocsView.ts | learnMore":{"message":"Learn more"},"panels/elements/components/ElementsBreadcrumbs.ts | breadcrumbs":{"message":"DOM tree breadcrumbs"},"panels/elements/components/ElementsBreadcrumbs.ts | scrollLeft":{"message":"Scroll left"},"panels/elements/components/ElementsBreadcrumbs.ts | scrollRight":{"message":"Scroll right"},"panels/elements/components/ElementsBreadcrumbsUtils.ts | text":{"message":"(text)"},"panels/elements/components/LayoutPane.ts | chooseElementOverlayColor":{"message":"Choose the overlay color for this element"},"panels/elements/components/LayoutPane.ts | colorPickerOpened":{"message":"Color picker opened."},"panels/elements/components/LayoutPane.ts | flexbox":{"message":"Flexbox"},"panels/elements/components/LayoutPane.ts | flexboxOverlays":{"message":"Flexbox overlays"},"panels/elements/components/LayoutPane.ts | grid":{"message":"Grid"},"panels/elements/components/LayoutPane.ts | gridOverlays":{"message":"Grid overlays"},"panels/elements/components/LayoutPane.ts | noFlexboxLayoutsFoundOnThisPage":{"message":"No flexbox layouts found on this page"},"panels/elements/components/LayoutPane.ts | noGridLayoutsFoundOnThisPage":{"message":"No grid layouts found on this page"},"panels/elements/components/LayoutPane.ts | overlayDisplaySettings":{"message":"Overlay display settings"},"panels/elements/components/LayoutPane.ts | showElementInTheElementsPanel":{"message":"Show element in the Elements panel"},"panels/elements/components/StylePropertyEditor.ts | deselectButton":{"message":"Remove {propertyName}: {propertyValue}"},"panels/elements/components/StylePropertyEditor.ts | selectButton":{"message":"Add {propertyName}: {propertyValue}"},"panels/elements/ComputedStyleWidget.ts | filter":{"message":"Filter"},"panels/elements/ComputedStyleWidget.ts | filterComputedStyles":{"message":"Filter Computed Styles"},"panels/elements/ComputedStyleWidget.ts | group":{"message":"Group"},"panels/elements/ComputedStyleWidget.ts | navigateToSelectorSource":{"message":"Navigate to selector source"},"panels/elements/ComputedStyleWidget.ts | navigateToStyle":{"message":"Navigate to style"},"panels/elements/ComputedStyleWidget.ts | noMatchingProperty":{"message":"No matching property"},"panels/elements/ComputedStyleWidget.ts | showAll":{"message":"Show all"},"panels/elements/CSSRuleValidator.ts | fontVariationSettingsWarning":{"message":"Value for setting “{PH1}” {PH2} is outside the supported range [{PH3}, {PH4}] for font-family “{PH5}”."},"panels/elements/CSSRuleValidator.ts | ruleViolatedByParentElementRuleFix":{"message":"Try setting the {EXISTING_PARENT_ELEMENT_RULE} property on the parent to {TARGET_PARENT_ELEMENT_RULE}."},"panels/elements/CSSRuleValidator.ts | ruleViolatedByParentElementRuleReason":{"message":"The {REASON_PROPERTY_DECLARATION_CODE} property on the parent element prevents {AFFECTED_PROPERTY_DECLARATION_CODE} from having an effect."},"panels/elements/CSSRuleValidator.ts | ruleViolatedBySameElementRuleChangeSuggestion":{"message":"Try setting the {EXISTING_PROPERTY_DECLARATION} property to {TARGET_PROPERTY_DECLARATION}."},"panels/elements/CSSRuleValidator.ts | ruleViolatedBySameElementRuleFix":{"message":"Try setting {PROPERTY_NAME} to something other than {PROPERTY_VALUE}."},"panels/elements/CSSRuleValidator.ts | ruleViolatedBySameElementRuleReason":{"message":"The {REASON_PROPERTY_DECLARATION_CODE} property prevents {AFFECTED_PROPERTY_DECLARATION_CODE} from having an effect."},"panels/elements/DOMLinkifier.ts | node":{"message":""},"panels/elements/elements-meta.ts | captureAreaScreenshot":{"message":"Capture area screenshot"},"panels/elements/elements-meta.ts | copyStyles":{"message":"Copy styles"},"panels/elements/elements-meta.ts | disableDomWordWrap":{"message":"Disable DOM word wrap"},"panels/elements/elements-meta.ts | duplicateElement":{"message":"Duplicate element"},"panels/elements/elements-meta.ts | editAsHtml":{"message":"Edit as HTML"},"panels/elements/elements-meta.ts | elements":{"message":"Elements"},"panels/elements/elements-meta.ts | enableDomWordWrap":{"message":"Enable DOM word wrap"},"panels/elements/elements-meta.ts | eventListeners":{"message":"Event Listeners"},"panels/elements/elements-meta.ts | hideElement":{"message":"Hide element"},"panels/elements/elements-meta.ts | hideHtmlComments":{"message":"Hide HTML comments"},"panels/elements/elements-meta.ts | layout":{"message":"Layout"},"panels/elements/elements-meta.ts | properties":{"message":"Properties"},"panels/elements/elements-meta.ts | redo":{"message":"Redo"},"panels/elements/elements-meta.ts | revealDomNodeOnHover":{"message":"Reveal DOM node on hover"},"panels/elements/elements-meta.ts | selectAnElementInThePageTo":{"message":"Select an element in the page to inspect it"},"panels/elements/elements-meta.ts | showComputedStyles":{"message":"Show Computed Styles"},"panels/elements/elements-meta.ts | showCSSDocumentationTooltip":{"message":"Show CSS documentation tooltip"},"panels/elements/elements-meta.ts | showDetailedInspectTooltip":{"message":"Show detailed inspect tooltip"},"panels/elements/elements-meta.ts | showElements":{"message":"Show Elements"},"panels/elements/elements-meta.ts | showEventListeners":{"message":"Show Event Listeners"},"panels/elements/elements-meta.ts | showHtmlComments":{"message":"Show HTML comments"},"panels/elements/elements-meta.ts | showLayout":{"message":"Show Layout"},"panels/elements/elements-meta.ts | showProperties":{"message":"Show Properties"},"panels/elements/elements-meta.ts | showStackTrace":{"message":"Show Stack Trace"},"panels/elements/elements-meta.ts | showStyles":{"message":"Show Styles"},"panels/elements/elements-meta.ts | showUserAgentShadowDOM":{"message":"Show user agent shadow DOM"},"panels/elements/elements-meta.ts | stackTrace":{"message":"Stack Trace"},"panels/elements/elements-meta.ts | toggleEyeDropper":{"message":"Toggle eye dropper"},"panels/elements/elements-meta.ts | undo":{"message":"Undo"},"panels/elements/elements-meta.ts | wordWrap":{"message":"Word wrap"},"panels/elements/ElementsPanel.ts | computed":{"message":"Computed"},"panels/elements/ElementsPanel.ts | computedStylesHidden":{"message":"Computed Styles sidebar hidden"},"panels/elements/ElementsPanel.ts | computedStylesShown":{"message":"Computed Styles sidebar shown"},"panels/elements/ElementsPanel.ts | domTreeExplorer":{"message":"DOM tree explorer"},"panels/elements/ElementsPanel.ts | elementStateS":{"message":"Element state: {PH1}"},"panels/elements/ElementsPanel.ts | findByStringSelectorOrXpath":{"message":"Find by string, selector, or XPath"},"panels/elements/ElementsPanel.ts | hideComputedStylesSidebar":{"message":"Hide Computed Styles sidebar"},"panels/elements/ElementsPanel.ts | nodeCannotBeFoundInTheCurrent":{"message":"Node cannot be found in the current page."},"panels/elements/ElementsPanel.ts | revealInElementsPanel":{"message":"Reveal in Elements panel"},"panels/elements/ElementsPanel.ts | showComputedStylesSidebar":{"message":"Show Computed Styles sidebar"},"panels/elements/ElementsPanel.ts | sidePanelContent":{"message":"Side panel content"},"panels/elements/ElementsPanel.ts | sidePanelToolbar":{"message":"Side panel toolbar"},"panels/elements/ElementsPanel.ts | styles":{"message":"Styles"},"panels/elements/ElementsPanel.ts | switchToAccessibilityTreeView":{"message":"Switch to Accessibility Tree view"},"panels/elements/ElementsPanel.ts | switchToDomTreeView":{"message":"Switch to DOM Tree view"},"panels/elements/ElementsPanel.ts | theDeferredDomNodeCouldNotBe":{"message":"The deferred DOM Node could not be resolved to a valid node."},"panels/elements/ElementsPanel.ts | theRemoteObjectCouldNotBe":{"message":"The remote object could not be resolved to a valid node."},"panels/elements/ElementStatePaneWidget.ts | forceElementState":{"message":"Force element state"},"panels/elements/ElementStatePaneWidget.ts | toggleElementState":{"message":"Toggle Element State"},"panels/elements/ElementsTreeElement.ts | addAttribute":{"message":"Add attribute"},"panels/elements/ElementsTreeElement.ts | captureNodeScreenshot":{"message":"Capture node screenshot"},"panels/elements/ElementsTreeElement.ts | children":{"message":"Children:"},"panels/elements/ElementsTreeElement.ts | collapseChildren":{"message":"Collapse children"},"panels/elements/ElementsTreeElement.ts | copy":{"message":"Copy"},"panels/elements/ElementsTreeElement.ts | copyElement":{"message":"Copy element"},"panels/elements/ElementsTreeElement.ts | copyFullXpath":{"message":"Copy full XPath"},"panels/elements/ElementsTreeElement.ts | copyJsPath":{"message":"Copy JS path"},"panels/elements/ElementsTreeElement.ts | copyOuterhtml":{"message":"Copy outerHTML"},"panels/elements/ElementsTreeElement.ts | copySelector":{"message":"Copy selector"},"panels/elements/ElementsTreeElement.ts | copyStyles":{"message":"Copy styles"},"panels/elements/ElementsTreeElement.ts | copyXpath":{"message":"Copy XPath"},"panels/elements/ElementsTreeElement.ts | cut":{"message":"Cut"},"panels/elements/ElementsTreeElement.ts | deleteElement":{"message":"Delete element"},"panels/elements/ElementsTreeElement.ts | disableFlexMode":{"message":"Disable flex mode"},"panels/elements/ElementsTreeElement.ts | disableGridMode":{"message":"Disable grid mode"},"panels/elements/ElementsTreeElement.ts | disableScrollSnap":{"message":"Disable scroll-snap overlay"},"panels/elements/ElementsTreeElement.ts | duplicateElement":{"message":"Duplicate element"},"panels/elements/ElementsTreeElement.ts | editAsHtml":{"message":"Edit as HTML"},"panels/elements/ElementsTreeElement.ts | editAttribute":{"message":"Edit attribute"},"panels/elements/ElementsTreeElement.ts | editText":{"message":"Edit text"},"panels/elements/ElementsTreeElement.ts | enableFlexMode":{"message":"Enable flex mode"},"panels/elements/ElementsTreeElement.ts | enableGridMode":{"message":"Enable grid mode"},"panels/elements/ElementsTreeElement.ts | enableScrollSnap":{"message":"Enable scroll-snap overlay"},"panels/elements/ElementsTreeElement.ts | expandRecursively":{"message":"Expand recursively"},"panels/elements/ElementsTreeElement.ts | focus":{"message":"Focus"},"panels/elements/ElementsTreeElement.ts | forceState":{"message":"Force state"},"panels/elements/ElementsTreeElement.ts | hideElement":{"message":"Hide element"},"panels/elements/ElementsTreeElement.ts | paste":{"message":"Paste"},"panels/elements/ElementsTreeElement.ts | scrollIntoView":{"message":"Scroll into view"},"panels/elements/ElementsTreeElement.ts | showFrameDetails":{"message":"Show iframe details"},"panels/elements/ElementsTreeElement.ts | thisFrameWasIdentifiedAsAnAd":{"message":"This frame was identified as an ad frame"},"panels/elements/ElementsTreeElement.ts | useSInTheConsoleToReferToThis":{"message":"Use {PH1} in the console to refer to this element."},"panels/elements/ElementsTreeElement.ts | valueIsTooLargeToEdit":{"message":""},"panels/elements/ElementsTreeOutline.ts | adornerSettings":{"message":"Badge settings…"},"panels/elements/ElementsTreeOutline.ts | pageDom":{"message":"Page DOM"},"panels/elements/ElementsTreeOutline.ts | reveal":{"message":"reveal"},"panels/elements/ElementsTreeOutline.ts | showAllNodesDMore":{"message":"Show All Nodes ({PH1} More)"},"panels/elements/ElementsTreeOutline.ts | storeAsGlobalVariable":{"message":"Store as global variable"},"panels/elements/EventListenersWidget.ts | all":{"message":"All"},"panels/elements/EventListenersWidget.ts | ancestors":{"message":"Ancestors"},"panels/elements/EventListenersWidget.ts | blocking":{"message":"Blocking"},"panels/elements/EventListenersWidget.ts | eventListenersCategory":{"message":"Event listeners category"},"panels/elements/EventListenersWidget.ts | frameworkListeners":{"message":"Framework listeners"},"panels/elements/EventListenersWidget.ts | passive":{"message":"Passive"},"panels/elements/EventListenersWidget.ts | refresh":{"message":"Refresh"},"panels/elements/EventListenersWidget.ts | resolveEventListenersBoundWith":{"message":"Resolve event listeners bound with framework"},"panels/elements/EventListenersWidget.ts | showListenersOnTheAncestors":{"message":"Show listeners on the ancestors"},"panels/elements/LayersWidget.ts | cssLayersTitle":{"message":"CSS layers"},"panels/elements/LayersWidget.ts | toggleCSSLayers":{"message":"Toggle CSS Layers view"},"panels/elements/MarkerDecorator.ts | domBreakpoint":{"message":"DOM Breakpoint"},"panels/elements/MarkerDecorator.ts | elementIsHidden":{"message":"Element is hidden"},"panels/elements/NodeStackTraceWidget.ts | noStackTraceAvailable":{"message":"No stack trace available"},"panels/elements/PlatformFontsWidget.ts | dGlyphs":{"message":"{n, plural, =1 {(# glyph)} other {(# glyphs)}}"},"panels/elements/PlatformFontsWidget.ts | localFile":{"message":"Local file"},"panels/elements/PlatformFontsWidget.ts | networkResource":{"message":"Network resource"},"panels/elements/PlatformFontsWidget.ts | renderedFonts":{"message":"Rendered Fonts"},"panels/elements/PropertiesWidget.ts | filter":{"message":"Filter"},"panels/elements/PropertiesWidget.ts | filterProperties":{"message":"Filter Properties"},"panels/elements/PropertiesWidget.ts | noMatchingProperty":{"message":"No matching property"},"panels/elements/PropertiesWidget.ts | showAll":{"message":"Show all"},"panels/elements/PropertiesWidget.ts | showAllTooltip":{"message":"When unchecked, only properties whose values are neither null nor undefined will be shown"},"panels/elements/StylePropertiesSection.ts | constructedStylesheet":{"message":"constructed stylesheet"},"panels/elements/StylePropertiesSection.ts | copyAllCSSChanges":{"message":"Copy all CSS changes"},"panels/elements/StylePropertiesSection.ts | copyAllDeclarations":{"message":"Copy all declarations"},"panels/elements/StylePropertiesSection.ts | copyRule":{"message":"Copy rule"},"panels/elements/StylePropertiesSection.ts | copySelector":{"message":"Copy selector"},"panels/elements/StylePropertiesSection.ts | cssSelector":{"message":"CSS selector"},"panels/elements/StylePropertiesSection.ts | injectedStylesheet":{"message":"injected stylesheet"},"panels/elements/StylePropertiesSection.ts | insertStyleRuleBelow":{"message":"Insert Style Rule Below"},"panels/elements/StylePropertiesSection.ts | sattributesStyle":{"message":"{PH1}[Attributes Style]"},"panels/elements/StylePropertiesSection.ts | showAllPropertiesSMore":{"message":"Show All Properties ({PH1} more)"},"panels/elements/StylePropertiesSection.ts | styleAttribute":{"message":"style attribute"},"panels/elements/StylePropertiesSection.ts | userAgentStylesheet":{"message":"user agent stylesheet"},"panels/elements/StylePropertiesSection.ts | viaInspector":{"message":"via inspector"},"panels/elements/StylePropertyTreeElement.ts | copyAllCSSChanges":{"message":"Copy all CSS changes"},"panels/elements/StylePropertyTreeElement.ts | copyAllCssDeclarationsAsJs":{"message":"Copy all declarations as JS"},"panels/elements/StylePropertyTreeElement.ts | copyAllDeclarations":{"message":"Copy all declarations"},"panels/elements/StylePropertyTreeElement.ts | copyCssDeclarationAsJs":{"message":"Copy declaration as JS"},"panels/elements/StylePropertyTreeElement.ts | copyDeclaration":{"message":"Copy declaration"},"panels/elements/StylePropertyTreeElement.ts | copyProperty":{"message":"Copy property"},"panels/elements/StylePropertyTreeElement.ts | copyRule":{"message":"Copy rule"},"panels/elements/StylePropertyTreeElement.ts | copyValue":{"message":"Copy value"},"panels/elements/StylePropertyTreeElement.ts | flexboxEditorButton":{"message":"Open flexbox editor"},"panels/elements/StylePropertyTreeElement.ts | gridEditorButton":{"message":"Open grid editor"},"panels/elements/StylePropertyTreeElement.ts | openColorPickerS":{"message":"Open color picker. {PH1}"},"panels/elements/StylePropertyTreeElement.ts | revealInSourcesPanel":{"message":"Reveal in Sources panel"},"panels/elements/StylePropertyTreeElement.ts | shiftClickToChangeColorFormat":{"message":"Shift + Click to change color format."},"panels/elements/StylePropertyTreeElement.ts | togglePropertyAndContinueEditing":{"message":"Toggle property and continue editing"},"panels/elements/StylePropertyTreeElement.ts | viewComputedValue":{"message":"View computed value"},"panels/elements/StylesSidebarPane.ts | automaticDarkMode":{"message":"Automatic dark mode"},"panels/elements/StylesSidebarPane.ts | clickToRevealLayer":{"message":"Click to reveal layer in layer tree"},"panels/elements/StylesSidebarPane.ts | copiedToClipboard":{"message":"Copied to clipboard"},"panels/elements/StylesSidebarPane.ts | copyAllCSSChanges":{"message":"Copy CSS changes"},"panels/elements/StylesSidebarPane.ts | cssPropertyName":{"message":"CSS property name: {PH1}"},"panels/elements/StylesSidebarPane.ts | cssPropertyValue":{"message":"CSS property value: {PH1}"},"panels/elements/StylesSidebarPane.ts | filter":{"message":"Filter"},"panels/elements/StylesSidebarPane.ts | filterStyles":{"message":"Filter Styles"},"panels/elements/StylesSidebarPane.ts | incrementdecrementWithMousewheelHundred":{"message":"Increment/decrement with mousewheel or up/down keys. {PH1}: ±100, Shift: ±10, Alt: ±0.1"},"panels/elements/StylesSidebarPane.ts | incrementdecrementWithMousewheelOne":{"message":"Increment/decrement with mousewheel or up/down keys. {PH1}: R ±1, Shift: G ±1, Alt: B ±1"},"panels/elements/StylesSidebarPane.ts | inheritedFroms":{"message":"Inherited from "},"panels/elements/StylesSidebarPane.ts | inheritedFromSPseudoOf":{"message":"Inherited from ::{PH1} pseudo of "},"panels/elements/StylesSidebarPane.ts | invalidPropertyValue":{"message":"Invalid property value"},"panels/elements/StylesSidebarPane.ts | invalidString":{"message":"{PH1}, property name: {PH2}, property value: {PH3}"},"panels/elements/StylesSidebarPane.ts | layer":{"message":"Layer"},"panels/elements/StylesSidebarPane.ts | newStyleRule":{"message":"New Style Rule"},"panels/elements/StylesSidebarPane.ts | noMatchingSelectorOrStyle":{"message":"No matching selector or style"},"panels/elements/StylesSidebarPane.ts | pseudoSElement":{"message":"Pseudo ::{PH1} element"},"panels/elements/StylesSidebarPane.ts | specificity":{"message":"Specificity: {PH1}"},"panels/elements/StylesSidebarPane.ts | toggleRenderingEmulations":{"message":"Toggle common rendering emulations"},"panels/elements/StylesSidebarPane.ts | unknownPropertyName":{"message":"Unknown property name"},"panels/elements/StylesSidebarPane.ts | visibleSelectors":{"message":"{n, plural, =1 {# visible selector listed below} other {# visible selectors listed below}}"},"panels/elements/TopLayerContainer.ts | reveal":{"message":"reveal"},"panels/emulation/DeviceModeToolbar.ts | addDevicePixelRatio":{"message":"Add device pixel ratio"},"panels/emulation/DeviceModeToolbar.ts | addDeviceType":{"message":"Add device type"},"panels/emulation/DeviceModeToolbar.ts | autoadjustZoom":{"message":"Auto-adjust zoom"},"panels/emulation/DeviceModeToolbar.ts | closeDevtools":{"message":"Close DevTools"},"panels/emulation/DeviceModeToolbar.ts | defaultF":{"message":"Default: {PH1}"},"panels/emulation/DeviceModeToolbar.ts | devicePixelRatio":{"message":"Device pixel ratio"},"panels/emulation/DeviceModeToolbar.ts | deviceType":{"message":"Device type"},"panels/emulation/DeviceModeToolbar.ts | dimensions":{"message":"Dimensions"},"panels/emulation/DeviceModeToolbar.ts | edit":{"message":"Edit…"},"panels/emulation/DeviceModeToolbar.ts | experimentalWebPlatformFeature":{"message":"\"Experimental Web Platform Feature\" flag is enabled. Click to disable it."},"panels/emulation/DeviceModeToolbar.ts | experimentalWebPlatformFeatureFlag":{"message":"\"Experimental Web Platform Feature\" flag is disabled. Click to enable it."},"panels/emulation/DeviceModeToolbar.ts | fitToWindowF":{"message":"Fit to window ({PH1}%)"},"panels/emulation/DeviceModeToolbar.ts | heightLeaveEmptyForFull":{"message":"Height (leave empty for full)"},"panels/emulation/DeviceModeToolbar.ts | hideDeviceFrame":{"message":"Hide device frame"},"panels/emulation/DeviceModeToolbar.ts | hideMediaQueries":{"message":"Hide media queries"},"panels/emulation/DeviceModeToolbar.ts | hideRulers":{"message":"Hide rulers"},"panels/emulation/DeviceModeToolbar.ts | landscape":{"message":"Landscape"},"panels/emulation/DeviceModeToolbar.ts | moreOptions":{"message":"More options"},"panels/emulation/DeviceModeToolbar.ts | none":{"message":"None"},"panels/emulation/DeviceModeToolbar.ts | portrait":{"message":"Portrait"},"panels/emulation/DeviceModeToolbar.ts | removeDevicePixelRatio":{"message":"Remove device pixel ratio"},"panels/emulation/DeviceModeToolbar.ts | removeDeviceType":{"message":"Remove device type"},"panels/emulation/DeviceModeToolbar.ts | resetToDefaults":{"message":"Reset to defaults"},"panels/emulation/DeviceModeToolbar.ts | responsive":{"message":"Responsive"},"panels/emulation/DeviceModeToolbar.ts | rotate":{"message":"Rotate"},"panels/emulation/DeviceModeToolbar.ts | screenOrientationOptions":{"message":"Screen orientation options"},"panels/emulation/DeviceModeToolbar.ts | showDeviceFrame":{"message":"Show device frame"},"panels/emulation/DeviceModeToolbar.ts | showMediaQueries":{"message":"Show media queries"},"panels/emulation/DeviceModeToolbar.ts | showRulers":{"message":"Show rulers"},"panels/emulation/DeviceModeToolbar.ts | toggleDualscreenMode":{"message":"Toggle dual-screen mode"},"panels/emulation/DeviceModeToolbar.ts | width":{"message":"Width"},"panels/emulation/DeviceModeToolbar.ts | zoom":{"message":"Zoom"},"panels/emulation/DeviceModeView.ts | doubleclickForFullHeight":{"message":"Double-click for full height"},"panels/emulation/DeviceModeView.ts | laptop":{"message":"Laptop"},"panels/emulation/DeviceModeView.ts | laptopL":{"message":"Laptop L"},"panels/emulation/DeviceModeView.ts | mobileL":{"message":"Mobile L"},"panels/emulation/DeviceModeView.ts | mobileM":{"message":"Mobile M"},"panels/emulation/DeviceModeView.ts | mobileS":{"message":"Mobile S"},"panels/emulation/DeviceModeView.ts | tablet":{"message":"Tablet"},"panels/emulation/emulation-meta.ts | captureFullSizeScreenshot":{"message":"Capture full size screenshot"},"panels/emulation/emulation-meta.ts | captureNodeScreenshot":{"message":"Capture node screenshot"},"panels/emulation/emulation-meta.ts | captureScreenshot":{"message":"Capture screenshot"},"panels/emulation/emulation-meta.ts | device":{"message":"device"},"panels/emulation/emulation-meta.ts | hideDeviceFrame":{"message":"Hide device frame"},"panels/emulation/emulation-meta.ts | hideMediaQueries":{"message":"Hide media queries"},"panels/emulation/emulation-meta.ts | hideRulers":{"message":"Hide rulers in the Device Mode toolbar"},"panels/emulation/emulation-meta.ts | showDeviceFrame":{"message":"Show device frame"},"panels/emulation/emulation-meta.ts | showMediaQueries":{"message":"Show media queries"},"panels/emulation/emulation-meta.ts | showRulers":{"message":"Show rulers in the Device Mode toolbar"},"panels/emulation/emulation-meta.ts | toggleDeviceToolbar":{"message":"Toggle device toolbar"},"panels/emulation/MediaQueryInspector.ts | revealInSourceCode":{"message":"Reveal in source code"},"panels/event_listeners/EventListenersView.ts | deleteEventListener":{"message":"Delete event listener"},"panels/event_listeners/EventListenersView.ts | noEventListeners":{"message":"No event listeners"},"panels/event_listeners/EventListenersView.ts | passive":{"message":"Passive"},"panels/event_listeners/EventListenersView.ts | remove":{"message":"Remove"},"panels/event_listeners/EventListenersView.ts | revealInElementsPanel":{"message":"Reveal in Elements panel"},"panels/event_listeners/EventListenersView.ts | togglePassive":{"message":"Toggle Passive"},"panels/event_listeners/EventListenersView.ts | toggleWhetherEventListenerIs":{"message":"Toggle whether event listener is passive or blocking"},"panels/issues/AffectedBlockedByResponseView.ts | blockedResource":{"message":"Blocked Resource"},"panels/issues/AffectedBlockedByResponseView.ts | nRequests":{"message":"{n, plural, =1 {# request} other {# requests}}"},"panels/issues/AffectedBlockedByResponseView.ts | parentFrame":{"message":"Parent Frame"},"panels/issues/AffectedBlockedByResponseView.ts | requestC":{"message":"Request"},"panels/issues/AffectedCookiesView.ts | domain":{"message":"Domain"},"panels/issues/AffectedCookiesView.ts | filterSetCookieTitle":{"message":"Show network requests that include this Set-Cookie header in the network panel"},"panels/issues/AffectedCookiesView.ts | name":{"message":"Name"},"panels/issues/AffectedCookiesView.ts | nCookies":{"message":"{n, plural, =1 {# cookie} other {# cookies}}"},"panels/issues/AffectedCookiesView.ts | nRawCookieLines":{"message":"{n, plural, =1 {1 Raw Set-Cookie header} other {# Raw Set-Cookie headers}}"},"panels/issues/AffectedCookiesView.ts | path":{"message":"Path"},"panels/issues/AffectedDirectivesView.ts | blocked":{"message":"blocked"},"panels/issues/AffectedDirectivesView.ts | clickToRevealTheViolatingDomNode":{"message":"Click to reveal the violating DOM node in the Elements panel"},"panels/issues/AffectedDirectivesView.ts | directiveC":{"message":"Directive"},"panels/issues/AffectedDirectivesView.ts | element":{"message":"Element"},"panels/issues/AffectedDirectivesView.ts | nDirectives":{"message":"{n, plural, =1 {# directive} other {# directives}}"},"panels/issues/AffectedDirectivesView.ts | reportonly":{"message":"report-only"},"panels/issues/AffectedDirectivesView.ts | resourceC":{"message":"Resource"},"panels/issues/AffectedDirectivesView.ts | sourceLocation":{"message":"Source Location"},"panels/issues/AffectedDirectivesView.ts | status":{"message":"Status"},"panels/issues/AffectedDocumentsInQuirksModeView.ts | documentInTheDOMTree":{"message":"Document in the DOM tree"},"panels/issues/AffectedDocumentsInQuirksModeView.ts | mode":{"message":"Mode"},"panels/issues/AffectedDocumentsInQuirksModeView.ts | nDocuments":{"message":"{n, plural, =1 { document} other { documents}}"},"panels/issues/AffectedDocumentsInQuirksModeView.ts | url":{"message":"URL"},"panels/issues/AffectedElementsView.ts | nElements":{"message":"{n, plural, =1 {# element} other {# elements}}"},"panels/issues/AffectedElementsWithLowContrastView.ts | contrastRatio":{"message":"Contrast ratio"},"panels/issues/AffectedElementsWithLowContrastView.ts | element":{"message":"Element"},"panels/issues/AffectedElementsWithLowContrastView.ts | minimumAA":{"message":"Minimum AA ratio"},"panels/issues/AffectedElementsWithLowContrastView.ts | minimumAAA":{"message":"Minimum AAA ratio"},"panels/issues/AffectedElementsWithLowContrastView.ts | textSize":{"message":"Text size"},"panels/issues/AffectedElementsWithLowContrastView.ts | textWeight":{"message":"Text weight"},"panels/issues/AffectedHeavyAdView.ts | cpuPeakLimit":{"message":"CPU peak limit"},"panels/issues/AffectedHeavyAdView.ts | cpuTotalLimit":{"message":"CPU total limit"},"panels/issues/AffectedHeavyAdView.ts | frameUrl":{"message":"Frame URL"},"panels/issues/AffectedHeavyAdView.ts | limitExceeded":{"message":"Limit exceeded"},"panels/issues/AffectedHeavyAdView.ts | networkLimit":{"message":"Network limit"},"panels/issues/AffectedHeavyAdView.ts | nResources":{"message":"{n, plural, =1 {# resource} other {# resources}}"},"panels/issues/AffectedHeavyAdView.ts | removed":{"message":"Removed"},"panels/issues/AffectedHeavyAdView.ts | resolutionStatus":{"message":"Resolution Status"},"panels/issues/AffectedHeavyAdView.ts | warned":{"message":"Warned"},"panels/issues/AffectedResourcesView.ts | clickToRevealTheFramesDomNodeIn":{"message":"Click to reveal the frame's DOM node in the Elements panel"},"panels/issues/AffectedResourcesView.ts | unavailable":{"message":"unavailable"},"panels/issues/AffectedResourcesView.ts | unknown":{"message":"unknown"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | aSharedarraybufferWas":{"message":"A SharedArrayBuffer was instantiated in a context that is not cross-origin isolated"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | blocked":{"message":"blocked"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | instantiation":{"message":"Instantiation"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | nViolations":{"message":"{n, plural, =1 {# violation} other {# violations}}"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | sharedarraybufferWasTransferedTo":{"message":"SharedArrayBuffer was transfered to a context that is not cross-origin isolated"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | sourceLocation":{"message":"Source Location"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | status":{"message":"Status"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | transfer":{"message":"Transfer"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | trigger":{"message":"Trigger"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | warning":{"message":"warning"},"panels/issues/AffectedSourcesView.ts | nSources":{"message":"{n, plural, =1 {# source} other {# sources}}"},"panels/issues/AffectedTrackingSitesView.ts | nTrackingSites":{"message":"{n, plural, =1 {1 potentially tracking website} other {# potentially tracking websites}}"},"panels/issues/AttributionReportingIssueDetailsView.ts | element":{"message":"Element"},"panels/issues/AttributionReportingIssueDetailsView.ts | invalidHeaderValue":{"message":"Invalid Header Value"},"panels/issues/AttributionReportingIssueDetailsView.ts | nViolations":{"message":"{n, plural, =1 {# violation} other {# violations}}"},"panels/issues/AttributionReportingIssueDetailsView.ts | request":{"message":"Request"},"panels/issues/AttributionReportingIssueDetailsView.ts | untrustworthyOrigin":{"message":"Untrustworthy origin"},"panels/issues/ComboBoxOfCheckBoxes.ts | genericMenuLabel":{"message":"Menu"},"panels/issues/components/HideIssuesMenu.ts | tooltipTitle":{"message":"Hide issues"},"panels/issues/CorsIssueDetailsView.ts | allowCredentialsValueFromHeader":{"message":"Access-Control-Allow-Credentials Header Value"},"panels/issues/CorsIssueDetailsView.ts | allowedOrigin":{"message":"Allowed Origin (from header)"},"panels/issues/CorsIssueDetailsView.ts | blocked":{"message":"blocked"},"panels/issues/CorsIssueDetailsView.ts | disallowedRequestHeader":{"message":"Disallowed Request Header"},"panels/issues/CorsIssueDetailsView.ts | disallowedRequestMethod":{"message":"Disallowed Request Method"},"panels/issues/CorsIssueDetailsView.ts | failedRequest":{"message":"Failed Request"},"panels/issues/CorsIssueDetailsView.ts | header":{"message":"Header"},"panels/issues/CorsIssueDetailsView.ts | initiatorAddressSpace":{"message":"Initiator Address"},"panels/issues/CorsIssueDetailsView.ts | initiatorContext":{"message":"Initiator Context"},"panels/issues/CorsIssueDetailsView.ts | insecure":{"message":"insecure"},"panels/issues/CorsIssueDetailsView.ts | invalidValue":{"message":"Invalid Value (if available)"},"panels/issues/CorsIssueDetailsView.ts | nRequests":{"message":"{n, plural, =1 {# request} other {# requests}}"},"panels/issues/CorsIssueDetailsView.ts | preflightDisallowedRedirect":{"message":"Response to preflight was a redirect"},"panels/issues/CorsIssueDetailsView.ts | preflightInvalidStatus":{"message":"HTTP status of preflight request didn't indicate success"},"panels/issues/CorsIssueDetailsView.ts | preflightRequest":{"message":"Preflight Request"},"panels/issues/CorsIssueDetailsView.ts | preflightRequestIfProblematic":{"message":"Preflight Request (if problematic)"},"panels/issues/CorsIssueDetailsView.ts | problem":{"message":"Problem"},"panels/issues/CorsIssueDetailsView.ts | problemInvalidValue":{"message":"Invalid Value"},"panels/issues/CorsIssueDetailsView.ts | problemMissingHeader":{"message":"Missing Header"},"panels/issues/CorsIssueDetailsView.ts | problemMultipleValues":{"message":"Multiple Values"},"panels/issues/CorsIssueDetailsView.ts | request":{"message":"Request"},"panels/issues/CorsIssueDetailsView.ts | resourceAddressSpace":{"message":"Resource Address"},"panels/issues/CorsIssueDetailsView.ts | secure":{"message":"secure"},"panels/issues/CorsIssueDetailsView.ts | sourceLocation":{"message":"Source Location"},"panels/issues/CorsIssueDetailsView.ts | status":{"message":"Status"},"panels/issues/CorsIssueDetailsView.ts | unsupportedScheme":{"message":"Unsupported Scheme"},"panels/issues/CorsIssueDetailsView.ts | warning":{"message":"warning"},"panels/issues/CSPViolationsView.ts | filter":{"message":"Filter"},"panels/issues/GenericIssueDetailsView.ts | frameId":{"message":"Frame"},"panels/issues/GenericIssueDetailsView.ts | nResources":{"message":"{n, plural, =1 {# resource} other {# resources}}"},"panels/issues/GenericIssueDetailsView.ts | violatingNode":{"message":"Violating node"},"panels/issues/HiddenIssuesRow.ts | hiddenIssues":{"message":"Hidden issues"},"panels/issues/HiddenIssuesRow.ts | unhideAll":{"message":"Unhide all"},"panels/issues/IssueKindView.ts | hideAllCurrentBreakingChanges":{"message":"Hide all current Breaking Changes"},"panels/issues/IssueKindView.ts | hideAllCurrentImprovements":{"message":"Hide all current Improvements"},"panels/issues/IssueKindView.ts | hideAllCurrentPageErrors":{"message":"Hide all current Page Errors"},"panels/issues/issues-meta.ts | cspViolations":{"message":"CSP Violations"},"panels/issues/issues-meta.ts | issues":{"message":"Issues"},"panels/issues/issues-meta.ts | showCspViolations":{"message":"Show CSP Violations"},"panels/issues/issues-meta.ts | showIssues":{"message":"Show Issues"},"panels/issues/IssuesPane.ts | attributionReporting":{"message":"Attribution Reporting API"},"panels/issues/IssuesPane.ts | contentSecurityPolicy":{"message":"Content Security Policy"},"panels/issues/IssuesPane.ts | cors":{"message":"Cross Origin Resource Sharing"},"panels/issues/IssuesPane.ts | crossOriginEmbedderPolicy":{"message":"Cross Origin Embedder Policy"},"panels/issues/IssuesPane.ts | generic":{"message":"Generic"},"panels/issues/IssuesPane.ts | groupByCategory":{"message":"Group by category"},"panels/issues/IssuesPane.ts | groupByKind":{"message":"Group by kind"},"panels/issues/IssuesPane.ts | groupDisplayedIssuesUnder":{"message":"Group displayed issues under associated categories"},"panels/issues/IssuesPane.ts | groupDisplayedIssuesUnderKind":{"message":"Group displayed issues as Page errors, Breaking changes and Improvements"},"panels/issues/IssuesPane.ts | heavyAds":{"message":"Heavy Ads"},"panels/issues/IssuesPane.ts | includeCookieIssuesCausedBy":{"message":"Include cookie Issues caused by third-party sites"},"panels/issues/IssuesPane.ts | includeThirdpartyCookieIssues":{"message":"Include third-party cookie issues"},"panels/issues/IssuesPane.ts | lowTextContrast":{"message":"Low Text Contrast"},"panels/issues/IssuesPane.ts | mixedContent":{"message":"Mixed Content"},"panels/issues/IssuesPane.ts | noIssuesDetectedSoFar":{"message":"No issues detected so far"},"panels/issues/IssuesPane.ts | onlyThirdpartyCookieIssues":{"message":"Only third-party cookie issues detected so far"},"panels/issues/IssuesPane.ts | other":{"message":"Other"},"panels/issues/IssuesPane.ts | quirksMode":{"message":"Quirks Mode"},"panels/issues/IssuesPane.ts | samesiteCookie":{"message":"SameSite Cookie"},"panels/issues/IssueView.ts | affectedResources":{"message":"Affected Resources"},"panels/issues/IssueView.ts | automaticallyUpgraded":{"message":"automatically upgraded"},"panels/issues/IssueView.ts | blocked":{"message":"blocked"},"panels/issues/IssueView.ts | hideIssuesLikeThis":{"message":"Hide issues like this"},"panels/issues/IssueView.ts | learnMoreS":{"message":"Learn more: {PH1}"},"panels/issues/IssueView.ts | name":{"message":"Name"},"panels/issues/IssueView.ts | nRequests":{"message":"{n, plural, =1 {# request} other {# requests}}"},"panels/issues/IssueView.ts | nResources":{"message":"{n, plural, =1 {# resource} other {# resources}}"},"panels/issues/IssueView.ts | restrictionStatus":{"message":"Restriction Status"},"panels/issues/IssueView.ts | unhideIssuesLikeThis":{"message":"Unhide issues like this"},"panels/issues/IssueView.ts | warned":{"message":"Warned"},"panels/js_profiler/js_profiler-meta.ts | performance":{"message":"Performance"},"panels/js_profiler/js_profiler-meta.ts | profiler":{"message":"Profiler"},"panels/js_profiler/js_profiler-meta.ts | record":{"message":"Record"},"panels/js_profiler/js_profiler-meta.ts | showPerformance":{"message":"Show Performance"},"panels/js_profiler/js_profiler-meta.ts | showProfiler":{"message":"Show Profiler"},"panels/js_profiler/js_profiler-meta.ts | showRecentTimelineSessions":{"message":"Show recent timeline sessions"},"panels/js_profiler/js_profiler-meta.ts | startProfilingAndReloadPage":{"message":"Start profiling and reload page"},"panels/js_profiler/js_profiler-meta.ts | startStopRecording":{"message":"Start/stop recording"},"panels/js_profiler/js_profiler-meta.ts | stop":{"message":"Stop"},"panels/layer_viewer/layer_viewer-meta.ts | panOrRotateDown":{"message":"Pan or rotate down"},"panels/layer_viewer/layer_viewer-meta.ts | panOrRotateLeft":{"message":"Pan or rotate left"},"panels/layer_viewer/layer_viewer-meta.ts | panOrRotateRight":{"message":"Pan or rotate right"},"panels/layer_viewer/layer_viewer-meta.ts | panOrRotateUp":{"message":"Pan or rotate up"},"panels/layer_viewer/layer_viewer-meta.ts | resetView":{"message":"Reset view"},"panels/layer_viewer/layer_viewer-meta.ts | switchToPanMode":{"message":"Switch to pan mode"},"panels/layer_viewer/layer_viewer-meta.ts | switchToRotateMode":{"message":"Switch to rotate mode"},"panels/layer_viewer/layer_viewer-meta.ts | zoomIn":{"message":"Zoom in"},"panels/layer_viewer/layer_viewer-meta.ts | zoomOut":{"message":"Zoom out"},"panels/layer_viewer/LayerDetailsView.ts | compositingReasons":{"message":"Compositing Reasons"},"panels/layer_viewer/LayerDetailsView.ts | containingBlocRectangleDimensions":{"message":"Containing Block {PH1} × {PH2} (at {PH3}, {PH4})"},"panels/layer_viewer/LayerDetailsView.ts | mainThreadScrollingReason":{"message":"Main thread scrolling reason"},"panels/layer_viewer/LayerDetailsView.ts | memoryEstimate":{"message":"Memory estimate"},"panels/layer_viewer/LayerDetailsView.ts | nearestLayerShiftingContaining":{"message":"Nearest Layer Shifting Containing Block"},"panels/layer_viewer/LayerDetailsView.ts | nearestLayerShiftingStickyBox":{"message":"Nearest Layer Shifting Sticky Box"},"panels/layer_viewer/LayerDetailsView.ts | nonFastScrollable":{"message":"Non fast scrollable"},"panels/layer_viewer/LayerDetailsView.ts | paintCount":{"message":"Paint count"},"panels/layer_viewer/LayerDetailsView.ts | paintProfiler":{"message":"Paint Profiler"},"panels/layer_viewer/LayerDetailsView.ts | repaintsOnScroll":{"message":"Repaints on scroll"},"panels/layer_viewer/LayerDetailsView.ts | scrollRectangleDimensions":{"message":"{PH1} {PH2} × {PH3} (at {PH4}, {PH5})"},"panels/layer_viewer/LayerDetailsView.ts | selectALayerToSeeItsDetails":{"message":"Select a layer to see its details"},"panels/layer_viewer/LayerDetailsView.ts | size":{"message":"Size"},"panels/layer_viewer/LayerDetailsView.ts | slowScrollRegions":{"message":"Slow scroll regions"},"panels/layer_viewer/LayerDetailsView.ts | stickyAncenstorLayersS":{"message":"{PH1}: {PH2} ({PH3})"},"panels/layer_viewer/LayerDetailsView.ts | stickyBoxRectangleDimensions":{"message":"Sticky Box {PH1} × {PH2} (at {PH3}, {PH4})"},"panels/layer_viewer/LayerDetailsView.ts | stickyPositionConstraint":{"message":"Sticky position constraint"},"panels/layer_viewer/LayerDetailsView.ts | touchEventHandler":{"message":"Touch event handler"},"panels/layer_viewer/LayerDetailsView.ts | unnamed":{"message":""},"panels/layer_viewer/LayerDetailsView.ts | updateRectangleDimensions":{"message":"{PH1} × {PH2} (at {PH3}, {PH4})"},"panels/layer_viewer/LayerDetailsView.ts | wheelEventHandler":{"message":"Wheel event handler"},"panels/layer_viewer/Layers3DView.ts | cantDisplayLayers":{"message":"Can't display layers,"},"panels/layer_viewer/Layers3DView.ts | checkSForPossibleReasons":{"message":"Check {PH1} for possible reasons."},"panels/layer_viewer/Layers3DView.ts | dLayersView":{"message":"3D Layers View"},"panels/layer_viewer/Layers3DView.ts | layerInformationIsNotYet":{"message":"Layer information is not yet available."},"panels/layer_viewer/Layers3DView.ts | paints":{"message":"Paints"},"panels/layer_viewer/Layers3DView.ts | resetView":{"message":"Reset View"},"panels/layer_viewer/Layers3DView.ts | showPaintProfiler":{"message":"Show Paint Profiler"},"panels/layer_viewer/Layers3DView.ts | slowScrollRects":{"message":"Slow scroll rects"},"panels/layer_viewer/Layers3DView.ts | webglSupportIsDisabledInYour":{"message":"WebGL support is disabled in your browser."},"panels/layer_viewer/LayerTreeOutline.ts | layersTreePane":{"message":"Layers Tree Pane"},"panels/layer_viewer/LayerTreeOutline.ts | showPaintProfiler":{"message":"Show Paint Profiler"},"panels/layer_viewer/LayerTreeOutline.ts | updateChildDimension":{"message":" ({PH1} × {PH2})"},"panels/layer_viewer/LayerViewHost.ts | showInternalLayers":{"message":"Show internal layers"},"panels/layer_viewer/PaintProfilerView.ts | bitmap":{"message":"Bitmap"},"panels/layer_viewer/PaintProfilerView.ts | commandLog":{"message":"Command Log"},"panels/layer_viewer/PaintProfilerView.ts | misc":{"message":"Misc"},"panels/layer_viewer/PaintProfilerView.ts | profiling":{"message":"Profiling…"},"panels/layer_viewer/PaintProfilerView.ts | profilingResults":{"message":"Profiling results"},"panels/layer_viewer/PaintProfilerView.ts | shapes":{"message":"Shapes"},"panels/layer_viewer/PaintProfilerView.ts | text":{"message":"Text"},"panels/layer_viewer/TransformController.ts | panModeX":{"message":"Pan mode (X)"},"panels/layer_viewer/TransformController.ts | resetTransform":{"message":"Reset transform (0)"},"panels/layer_viewer/TransformController.ts | rotateModeV":{"message":"Rotate mode (V)"},"panels/layers/layers-meta.ts | layers":{"message":"Layers"},"panels/layers/layers-meta.ts | showLayers":{"message":"Show Layers"},"panels/layers/LayersPanel.ts | details":{"message":"Details"},"panels/layers/LayersPanel.ts | profiler":{"message":"Profiler"},"panels/lighthouse/lighthouse-meta.ts | showLighthouse":{"message":"Show Lighthouse"},"panels/lighthouse/LighthouseController.ts | accessibility":{"message":"Accessibility"},"panels/lighthouse/LighthouseController.ts | applyMobileEmulation":{"message":"Apply mobile emulation"},"panels/lighthouse/LighthouseController.ts | applyMobileEmulationDuring":{"message":"Apply mobile emulation during auditing"},"panels/lighthouse/LighthouseController.ts | atLeastOneCategoryMustBeSelected":{"message":"At least one category must be selected."},"panels/lighthouse/LighthouseController.ts | bestPractices":{"message":"Best practices"},"panels/lighthouse/LighthouseController.ts | canOnlyAuditHttphttpsPages":{"message":"Can only audit pages on HTTP or HTTPS. Navigate to a different page."},"panels/lighthouse/LighthouseController.ts | clearStorage":{"message":"Clear storage"},"panels/lighthouse/LighthouseController.ts | desktop":{"message":"Desktop"},"panels/lighthouse/LighthouseController.ts | devtoolsThrottling":{"message":"DevTools throttling (advanced)"},"panels/lighthouse/LighthouseController.ts | doesThisPageFollowBestPractices":{"message":"Does this page follow best practices for modern web development"},"panels/lighthouse/LighthouseController.ts | doesThisPageMeetTheStandardOfA":{"message":"Does this page meet the standard of a Progressive Web App"},"panels/lighthouse/LighthouseController.ts | howLongDoesThisAppTakeToShow":{"message":"How long does this app take to show content and become usable"},"panels/lighthouse/LighthouseController.ts | indexeddb":{"message":"IndexedDB"},"panels/lighthouse/LighthouseController.ts | isThisPageOptimizedForAdSpeedAnd":{"message":"Is this page optimized for ad speed and quality"},"panels/lighthouse/LighthouseController.ts | isThisPageOptimizedForSearch":{"message":"Is this page optimized for search engine results ranking"},"panels/lighthouse/LighthouseController.ts | isThisPageUsableByPeopleWith":{"message":"Is this page usable by people with disabilities or impairments"},"panels/lighthouse/LighthouseController.ts | javaScriptDisabled":{"message":"JavaScript is disabled. You need to enable JavaScript to audit this page. Open the Command Menu and run the Enable JavaScript command to enable JavaScript."},"panels/lighthouse/LighthouseController.ts | legacyNavigation":{"message":"Legacy navigation"},"panels/lighthouse/LighthouseController.ts | lighthouseMode":{"message":"Lighthouse mode"},"panels/lighthouse/LighthouseController.ts | localStorage":{"message":"Local Storage"},"panels/lighthouse/LighthouseController.ts | mobile":{"message":"Mobile"},"panels/lighthouse/LighthouseController.ts | multipleTabsAreBeingControlledBy":{"message":"Multiple tabs are being controlled by the same service worker. Close your other tabs on the same origin to audit this page."},"panels/lighthouse/LighthouseController.ts | navigation":{"message":"Navigation (Default)"},"panels/lighthouse/LighthouseController.ts | navigationTooltip":{"message":"Navigation mode analyzes a page load, exactly like the original Lighthouse reports."},"panels/lighthouse/LighthouseController.ts | performance":{"message":"Performance"},"panels/lighthouse/LighthouseController.ts | progressiveWebApp":{"message":"Progressive Web App"},"panels/lighthouse/LighthouseController.ts | publisherAds":{"message":"Publisher Ads"},"panels/lighthouse/LighthouseController.ts | resetStorageLocalstorage":{"message":"Reset storage (cache, service workers, etc) before auditing. (Good for performance & PWA testing)"},"panels/lighthouse/LighthouseController.ts | runLighthouseInMode":{"message":"Run Lighthouse in navigation, timespan, or snapshot mode"},"panels/lighthouse/LighthouseController.ts | seo":{"message":"SEO"},"panels/lighthouse/LighthouseController.ts | simulateASlowerPageLoadBasedOn":{"message":"Simulated throttling simulates a slower page load based on data from an initial unthrottled load. DevTools throttling actually slows down the page."},"panels/lighthouse/LighthouseController.ts | simulatedThrottling":{"message":"Simulated throttling (default)"},"panels/lighthouse/LighthouseController.ts | snapshot":{"message":"Snapshot"},"panels/lighthouse/LighthouseController.ts | snapshotTooltip":{"message":"Snapshot mode analyzes the page in a particular state, typically after user interactions."},"panels/lighthouse/LighthouseController.ts | thereMayBeStoredDataAffectingLoadingPlural":{"message":"There may be stored data affecting loading performance in these locations: {PH1}. Audit this page in an incognito window to prevent those resources from affecting your scores."},"panels/lighthouse/LighthouseController.ts | thereMayBeStoredDataAffectingSingular":{"message":"There may be stored data affecting loading performance in this location: {PH1}. Audit this page in an incognito window to prevent those resources from affecting your scores."},"panels/lighthouse/LighthouseController.ts | throttlingMethod":{"message":"Throttling method"},"panels/lighthouse/LighthouseController.ts | timespan":{"message":"Timespan"},"panels/lighthouse/LighthouseController.ts | timespanTooltip":{"message":"Timespan mode analyzes an arbitrary period of time, typically containing user interactions."},"panels/lighthouse/LighthouseController.ts | useLegacyNavigation":{"message":"Analyze the page using classic Lighthouse when in navigation mode."},"panels/lighthouse/LighthouseController.ts | webSql":{"message":"Web SQL"},"panels/lighthouse/LighthousePanel.ts | cancelling":{"message":"Cancelling"},"panels/lighthouse/LighthousePanel.ts | clearAll":{"message":"Clear all"},"panels/lighthouse/LighthousePanel.ts | dropLighthouseJsonHere":{"message":"Drop Lighthouse JSON here"},"panels/lighthouse/LighthousePanel.ts | lighthouseSettings":{"message":"Lighthouse settings"},"panels/lighthouse/LighthousePanel.ts | performAnAudit":{"message":"Perform an audit…"},"panels/lighthouse/LighthousePanel.ts | printing":{"message":"Printing"},"panels/lighthouse/LighthousePanel.ts | thePrintPopupWindowIsOpenPlease":{"message":"The print popup window is open. Please close it to continue."},"panels/lighthouse/LighthouseReportSelector.ts | newReport":{"message":"(new report)"},"panels/lighthouse/LighthouseReportSelector.ts | reports":{"message":"Reports"},"panels/lighthouse/LighthouseStartView.ts | analyzeNavigation":{"message":"Analyze page load"},"panels/lighthouse/LighthouseStartView.ts | analyzeSnapshot":{"message":"Analyze page state"},"panels/lighthouse/LighthouseStartView.ts | categories":{"message":"Categories"},"panels/lighthouse/LighthouseStartView.ts | device":{"message":"Device"},"panels/lighthouse/LighthouseStartView.ts | generateLighthouseReport":{"message":"Generate a Lighthouse report"},"panels/lighthouse/LighthouseStartView.ts | learnMore":{"message":"Learn more"},"panels/lighthouse/LighthouseStartView.ts | mode":{"message":"Mode"},"panels/lighthouse/LighthouseStartView.ts | plugins":{"message":"Plugins"},"panels/lighthouse/LighthouseStartView.ts | startTimespan":{"message":"Start timespan"},"panels/lighthouse/LighthouseStatusView.ts | ahSorryWeRanIntoAnError":{"message":"Ah, sorry! We ran into an error."},"panels/lighthouse/LighthouseStatusView.ts | almostThereLighthouseIsNow":{"message":"Almost there! Lighthouse is now generating your report."},"panels/lighthouse/LighthouseStatusView.ts | asPageLoadTimeIncreasesFromOne":{"message":"As page load time increases from one second to seven seconds, the probability of a mobile site visitor bouncing increases 113%. [Source: Think with Google]"},"panels/lighthouse/LighthouseStatusView.ts | asTheNumberOfElementsOnAPage":{"message":"As the number of elements on a page increases from 400 to 6,000, the probability of conversion drops 95%. [Source: Think with Google]"},"panels/lighthouse/LighthouseStatusView.ts | auditingS":{"message":"Auditing {PH1}"},"panels/lighthouse/LighthouseStatusView.ts | auditingYourWebPage":{"message":"Auditing your web page"},"panels/lighthouse/LighthouseStatusView.ts | byReducingTheResponseSizeOfJson":{"message":"By reducing the response size of JSON needed for displaying comments, Instagram saw increased impressions [Source: WPO Stats]"},"panels/lighthouse/LighthouseStatusView.ts | cancel":{"message":"Cancel"},"panels/lighthouse/LighthouseStatusView.ts | cancelling":{"message":"Cancelling…"},"panels/lighthouse/LighthouseStatusView.ts | fastFactMessageWithPlaceholder":{"message":"💡 {PH1}"},"panels/lighthouse/LighthouseStatusView.ts | ifASiteTakesSecondToBecome":{"message":"If a site takes >1 second to become interactive, users lose attention, and their perception of completing the page task is broken [Source: Google Developers Blog]"},"panels/lighthouse/LighthouseStatusView.ts | ifThisIssueIsReproduciblePlease":{"message":"If this issue is reproducible, please report it at the Lighthouse GitHub repo."},"panels/lighthouse/LighthouseStatusView.ts | lighthouseIsGatheringInformation":{"message":"Lighthouse is gathering information about the page to compute your score."},"panels/lighthouse/LighthouseStatusView.ts | lighthouseIsLoadingThePage":{"message":"Lighthouse is loading the page."},"panels/lighthouse/LighthouseStatusView.ts | lighthouseIsLoadingYourPage":{"message":"Lighthouse is loading your page"},"panels/lighthouse/LighthouseStatusView.ts | lighthouseIsLoadingYourPageWith":{"message":"Lighthouse is loading your page with throttling to measure performance on a mobile device on 3G."},"panels/lighthouse/LighthouseStatusView.ts | lighthouseIsLoadingYourPageWithMobile":{"message":"Lighthouse is loading your page with mobile emulation."},"panels/lighthouse/LighthouseStatusView.ts | lighthouseIsLoadingYourPageWithThrottling":{"message":"Lighthouse is loading your page with throttling to measure performance on a slow desktop on 3G."},"panels/lighthouse/LighthouseStatusView.ts | lighthouseIsWarmingUp":{"message":"Lighthouse is warming up…"},"panels/lighthouse/LighthouseStatusView.ts | lighthouseOnlySimulatesMobile":{"message":"Lighthouse only simulates mobile performance; to measure performance on a real device, try WebPageTest.org [Source: Lighthouse team]"},"panels/lighthouse/LighthouseStatusView.ts | loading":{"message":"Loading…"},"panels/lighthouse/LighthouseStatusView.ts | mbTakesAMinimumOfSecondsTo":{"message":"1MB takes a minimum of 5 seconds to download on a typical 3G connection [Source: WebPageTest and DevTools 3G definition]."},"panels/lighthouse/LighthouseStatusView.ts | OfGlobalMobileUsersInWereOnGOrG":{"message":"75% of global mobile users in 2016 were on 2G or 3G [Source: GSMA Mobile]"},"panels/lighthouse/LighthouseStatusView.ts | OfMobilePagesTakeNearlySeconds":{"message":"70% of mobile pages take nearly 7 seconds for the visual content above the fold to display on the screen. [Source: Think with Google]"},"panels/lighthouse/LighthouseStatusView.ts | rebuildingPinterestPagesFor":{"message":"Rebuilding Pinterest pages for performance increased conversion rates by 15% [Source: WPO Stats]"},"panels/lighthouse/LighthouseStatusView.ts | SecondsIsTheAverageTimeAMobile":{"message":"19 seconds is the average time a mobile web page takes to load on a 3G connection [Source: Google DoubleClick blog]"},"panels/lighthouse/LighthouseStatusView.ts | theAverageUserDeviceCostsLess":{"message":"The average user device costs less than 200 USD. [Source: International Data Corporation]"},"panels/lighthouse/LighthouseStatusView.ts | tryToNavigateToTheUrlInAFresh":{"message":"Try to navigate to the URL in a fresh Chrome profile without any other tabs or extensions open and try again."},"panels/lighthouse/LighthouseStatusView.ts | walmartSawAIncreaseInRevenueFor":{"message":"Walmart saw a 1% increase in revenue for every 100ms improvement in page load [Source: WPO Stats]"},"panels/lighthouse/LighthouseTimespanView.ts | cancel":{"message":"Cancel"},"panels/lighthouse/LighthouseTimespanView.ts | endTimespan":{"message":"End timespan"},"panels/lighthouse/LighthouseTimespanView.ts | timespanStarted":{"message":"Timespan started, interact with the page"},"panels/lighthouse/LighthouseTimespanView.ts | timespanStarting":{"message":"Timespan starting…"},"panels/media/EventDisplayTable.ts | eventDisplay":{"message":"Event display"},"panels/media/EventDisplayTable.ts | eventName":{"message":"Event name"},"panels/media/EventDisplayTable.ts | timestamp":{"message":"Timestamp"},"panels/media/EventDisplayTable.ts | value":{"message":"Value"},"panels/media/EventTimelineView.ts | bufferingStatus":{"message":"Buffering Status"},"panels/media/EventTimelineView.ts | playbackStatus":{"message":"Playback Status"},"panels/media/media-meta.ts | media":{"message":"Media"},"panels/media/media-meta.ts | showMedia":{"message":"Show Media"},"panels/media/media-meta.ts | video":{"message":"video"},"panels/media/PlayerDetailView.ts | events":{"message":"Events"},"panels/media/PlayerDetailView.ts | messages":{"message":"Messages"},"panels/media/PlayerDetailView.ts | playerEvents":{"message":"Player events"},"panels/media/PlayerDetailView.ts | playerMessages":{"message":"Player messages"},"panels/media/PlayerDetailView.ts | playerProperties":{"message":"Player properties"},"panels/media/PlayerDetailView.ts | playerTimeline":{"message":"Player timeline"},"panels/media/PlayerDetailView.ts | properties":{"message":"Properties"},"panels/media/PlayerDetailView.ts | timeline":{"message":"Timeline"},"panels/media/PlayerListView.ts | hideAllOthers":{"message":"Hide all others"},"panels/media/PlayerListView.ts | hidePlayer":{"message":"Hide player"},"panels/media/PlayerListView.ts | players":{"message":"Players"},"panels/media/PlayerListView.ts | savePlayerInfo":{"message":"Save player info"},"panels/media/PlayerMessagesView.ts | all":{"message":"All"},"panels/media/PlayerMessagesView.ts | custom":{"message":"Custom"},"panels/media/PlayerMessagesView.ts | debug":{"message":"Debug"},"panels/media/PlayerMessagesView.ts | default":{"message":"Default"},"panels/media/PlayerMessagesView.ts | error":{"message":"Error"},"panels/media/PlayerMessagesView.ts | errorCauseLabel":{"message":"Caused by:"},"panels/media/PlayerMessagesView.ts | errorCodeLabel":{"message":"Error Code:"},"panels/media/PlayerMessagesView.ts | errorDataLabel":{"message":"Data:"},"panels/media/PlayerMessagesView.ts | errorGroupLabel":{"message":"Error Group:"},"panels/media/PlayerMessagesView.ts | errorStackLabel":{"message":"Stacktrace:"},"panels/media/PlayerMessagesView.ts | filterLogMessages":{"message":"Filter log messages"},"panels/media/PlayerMessagesView.ts | info":{"message":"Info"},"panels/media/PlayerMessagesView.ts | logLevel":{"message":"Log level:"},"panels/media/PlayerMessagesView.ts | warning":{"message":"Warning"},"panels/media/PlayerPropertiesView.ts | audio":{"message":"Audio"},"panels/media/PlayerPropertiesView.ts | bitrate":{"message":"Bitrate"},"panels/media/PlayerPropertiesView.ts | decoder":{"message":"Decoder"},"panels/media/PlayerPropertiesView.ts | decoderName":{"message":"Decoder name"},"panels/media/PlayerPropertiesView.ts | decryptingDemuxer":{"message":"Decrypting demuxer"},"panels/media/PlayerPropertiesView.ts | duration":{"message":"Duration"},"panels/media/PlayerPropertiesView.ts | encoderName":{"message":"Encoder name"},"panels/media/PlayerPropertiesView.ts | fileSize":{"message":"File size"},"panels/media/PlayerPropertiesView.ts | frameRate":{"message":"Frame rate"},"panels/media/PlayerPropertiesView.ts | hardwareDecoder":{"message":"Hardware decoder"},"panels/media/PlayerPropertiesView.ts | hardwareEncoder":{"message":"Hardware encoder"},"panels/media/PlayerPropertiesView.ts | noDecoder":{"message":"No decoder"},"panels/media/PlayerPropertiesView.ts | noEncoder":{"message":"No encoder"},"panels/media/PlayerPropertiesView.ts | noTextTracks":{"message":"No text tracks"},"panels/media/PlayerPropertiesView.ts | playbackFrameTitle":{"message":"Playback frame title"},"panels/media/PlayerPropertiesView.ts | playbackFrameUrl":{"message":"Playback frame URL"},"panels/media/PlayerPropertiesView.ts | properties":{"message":"Properties"},"panels/media/PlayerPropertiesView.ts | rangeHeaderSupport":{"message":"Range header support"},"panels/media/PlayerPropertiesView.ts | rendererName":{"message":"Renderer name"},"panels/media/PlayerPropertiesView.ts | resolution":{"message":"Resolution"},"panels/media/PlayerPropertiesView.ts | singleoriginPlayback":{"message":"Single-origin playback"},"panels/media/PlayerPropertiesView.ts | startTime":{"message":"Start time"},"panels/media/PlayerPropertiesView.ts | streaming":{"message":"Streaming"},"panels/media/PlayerPropertiesView.ts | textTrack":{"message":"Text track"},"panels/media/PlayerPropertiesView.ts | track":{"message":"Track"},"panels/media/PlayerPropertiesView.ts | video":{"message":"Video"},"panels/media/PlayerPropertiesView.ts | videoFreezingScore":{"message":"Video freezing score"},"panels/media/PlayerPropertiesView.ts | videoPlaybackRoughness":{"message":"Video playback roughness"},"panels/mobile_throttling/mobile_throttling-meta.ts | device":{"message":"device"},"panels/mobile_throttling/mobile_throttling-meta.ts | enableFastGThrottling":{"message":"Enable fast 3G throttling"},"panels/mobile_throttling/mobile_throttling-meta.ts | enableSlowGThrottling":{"message":"Enable slow 3G throttling"},"panels/mobile_throttling/mobile_throttling-meta.ts | goOffline":{"message":"Go offline"},"panels/mobile_throttling/mobile_throttling-meta.ts | goOnline":{"message":"Go online"},"panels/mobile_throttling/mobile_throttling-meta.ts | showThrottling":{"message":"Show Throttling"},"panels/mobile_throttling/mobile_throttling-meta.ts | throttling":{"message":"Throttling"},"panels/mobile_throttling/mobile_throttling-meta.ts | throttlingTag":{"message":"throttling"},"panels/mobile_throttling/MobileThrottlingSelector.ts | advanced":{"message":"Advanced"},"panels/mobile_throttling/MobileThrottlingSelector.ts | disabled":{"message":"Disabled"},"panels/mobile_throttling/MobileThrottlingSelector.ts | presets":{"message":"Presets"},"panels/mobile_throttling/NetworkPanelIndicator.ts | acceptedEncodingOverrideSet":{"message":"The set of accepted Content-Encoding headers has been modified by DevTools. See the Network Conditions panel."},"panels/mobile_throttling/NetworkPanelIndicator.ts | networkThrottlingIsEnabled":{"message":"Network throttling is enabled"},"panels/mobile_throttling/NetworkPanelIndicator.ts | requestsMayBeBlocked":{"message":"Requests may be blocked"},"panels/mobile_throttling/NetworkPanelIndicator.ts | requestsMayBeRewrittenByLocal":{"message":"Requests may be rewritten by local overrides"},"panels/mobile_throttling/NetworkThrottlingSelector.ts | custom":{"message":"Custom"},"panels/mobile_throttling/NetworkThrottlingSelector.ts | disabled":{"message":"Disabled"},"panels/mobile_throttling/NetworkThrottlingSelector.ts | presets":{"message":"Presets"},"panels/mobile_throttling/ThrottlingManager.ts | add":{"message":"Add…"},"panels/mobile_throttling/ThrottlingManager.ts | addS":{"message":"Add {PH1}"},"panels/mobile_throttling/ThrottlingManager.ts | cpuThrottling":{"message":"CPU throttling"},"panels/mobile_throttling/ThrottlingManager.ts | cpuThrottlingIsEnabled":{"message":"CPU throttling is enabled"},"panels/mobile_throttling/ThrottlingManager.ts | dSlowdown":{"message":"{PH1}× slowdown"},"panels/mobile_throttling/ThrottlingManager.ts | excessConcurrency":{"message":"Exceeding the default value may degrade system performance."},"panels/mobile_throttling/ThrottlingManager.ts | forceDisconnectedFromNetwork":{"message":"Force disconnected from network"},"panels/mobile_throttling/ThrottlingManager.ts | hardwareConcurrency":{"message":"Hardware concurrency"},"panels/mobile_throttling/ThrottlingManager.ts | hardwareConcurrencyIsEnabled":{"message":"Hardware concurrency override is enabled"},"panels/mobile_throttling/ThrottlingManager.ts | hardwareConcurrencyValue":{"message":"Value of navigator.hardwareConcurrency"},"panels/mobile_throttling/ThrottlingManager.ts | noThrottling":{"message":"No throttling"},"panels/mobile_throttling/ThrottlingManager.ts | offline":{"message":"Offline"},"panels/mobile_throttling/ThrottlingManager.ts | resetConcurrency":{"message":"Reset to the default value"},"panels/mobile_throttling/ThrottlingManager.ts | sS":{"message":"{PH1}: {PH2}"},"panels/mobile_throttling/ThrottlingManager.ts | throttling":{"message":"Throttling"},"panels/mobile_throttling/ThrottlingPresets.ts | checkNetworkAndPerformancePanels":{"message":"Check Network and Performance panels"},"panels/mobile_throttling/ThrottlingPresets.ts | custom":{"message":"Custom"},"panels/mobile_throttling/ThrottlingPresets.ts | fastGXCpuSlowdown":{"message":"Fast 3G & 4x CPU slowdown"},"panels/mobile_throttling/ThrottlingPresets.ts | lowendMobile":{"message":"Low-end mobile"},"panels/mobile_throttling/ThrottlingPresets.ts | midtierMobile":{"message":"Mid-tier mobile"},"panels/mobile_throttling/ThrottlingPresets.ts | noInternetConnectivity":{"message":"No internet connectivity"},"panels/mobile_throttling/ThrottlingPresets.ts | noThrottling":{"message":"No throttling"},"panels/mobile_throttling/ThrottlingPresets.ts | slowGXCpuSlowdown":{"message":"Slow 3G & 6x CPU slowdown"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | addCustomProfile":{"message":"Add custom profile..."},"panels/mobile_throttling/ThrottlingSettingsTab.ts | dms":{"message":"{PH1} ms"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | download":{"message":"Download"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | dskbits":{"message":"{PH1} kbit/s"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | fsmbits":{"message":"{PH1} Mbit/s"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | latency":{"message":"Latency"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | latencyMustBeAnIntegerBetweenSms":{"message":"Latency must be an integer between {PH1} ms to {PH2} ms inclusive"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | networkThrottlingProfiles":{"message":"Network Throttling Profiles"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | optional":{"message":"optional"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | profileName":{"message":"Profile Name"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | profileNameCharactersLengthMust":{"message":"Profile Name characters length must be between 1 to {PH1} inclusive"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | sMustBeANumberBetweenSkbsToSkbs":{"message":"{PH1} must be a number between {PH2} kbit/s to {PH3} kbit/s inclusive"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | upload":{"message":"Upload"},"panels/network/BinaryResourceView.ts | binaryViewType":{"message":"Binary view type"},"panels/network/BinaryResourceView.ts | copiedAsBase":{"message":"Copied as Base64"},"panels/network/BinaryResourceView.ts | copiedAsHex":{"message":"Copied as Hex"},"panels/network/BinaryResourceView.ts | copiedAsUtf":{"message":"Copied as UTF-8"},"panels/network/BinaryResourceView.ts | copyAsBase":{"message":"Copy as Base64"},"panels/network/BinaryResourceView.ts | copyAsHex":{"message":"Copy as Hex"},"panels/network/BinaryResourceView.ts | copyAsUtf":{"message":"Copy as UTF-8"},"panels/network/BinaryResourceView.ts | copyToClipboard":{"message":"Copy to clipboard"},"panels/network/BinaryResourceView.ts | hexViewer":{"message":"Hex Viewer"},"panels/network/BlockedURLsPane.ts | addNetworkRequestBlockingPattern":{"message":"Add network request blocking pattern"},"panels/network/BlockedURLsPane.ts | addPattern":{"message":"Add pattern"},"panels/network/BlockedURLsPane.ts | dBlocked":{"message":"{PH1} blocked"},"panels/network/BlockedURLsPane.ts | enableNetworkRequestBlocking":{"message":"Enable network request blocking"},"panels/network/BlockedURLsPane.ts | itemDeleted":{"message":"Item successfully deleted"},"panels/network/BlockedURLsPane.ts | networkRequestsAreNotBlockedS":{"message":"Network requests are not blocked. {PH1}"},"panels/network/BlockedURLsPane.ts | patternAlreadyExists":{"message":"Pattern already exists."},"panels/network/BlockedURLsPane.ts | patternInputCannotBeEmpty":{"message":"Pattern input cannot be empty."},"panels/network/BlockedURLsPane.ts | removeAllPatterns":{"message":"Remove all patterns"},"panels/network/BlockedURLsPane.ts | textPatternToBlockMatching":{"message":"Text pattern to block matching requests; use * for wildcard"},"panels/network/components/HeaderSectionRow.ts | activeClientExperimentVariation":{"message":"Active client experiment variation IDs."},"panels/network/components/HeaderSectionRow.ts | activeClientExperimentVariationIds":{"message":"Active client experiment variation IDs that trigger server-side behavior."},"panels/network/components/HeaderSectionRow.ts | decoded":{"message":"Decoded:"},"panels/network/components/HeaderSectionRow.ts | editHeader":{"message":"Override header"},"panels/network/components/HeaderSectionRow.ts | headerNamesOnlyLetters":{"message":"Header names should contain only letters, digits, hyphens or underscores"},"panels/network/components/HeaderSectionRow.ts | learnMore":{"message":"Learn more"},"panels/network/components/HeaderSectionRow.ts | learnMoreInTheIssuesTab":{"message":"Learn more in the issues tab"},"panels/network/components/HeaderSectionRow.ts | reloadPrompt":{"message":"Refresh the page/request for these changes to take effect"},"panels/network/components/HeaderSectionRow.ts | removeOverride":{"message":"Remove this header override"},"panels/network/components/RequestHeaderSection.ts | learnMore":{"message":"Learn more"},"panels/network/components/RequestHeaderSection.ts | onlyProvisionalHeadersAre":{"message":"Only provisional headers are available because this request was not sent over the network and instead was served from a local cache, which doesn’t store the original request headers. Disable cache to see full request headers."},"panels/network/components/RequestHeaderSection.ts | provisionalHeadersAreShown":{"message":"Provisional headers are shown."},"panels/network/components/RequestHeaderSection.ts | provisionalHeadersAreShownDisableCache":{"message":"Provisional headers are shown. Disable cache to see full headers."},"panels/network/components/RequestHeadersView.ts | fromDiskCache":{"message":"(from disk cache)"},"panels/network/components/RequestHeadersView.ts | fromMemoryCache":{"message":"(from memory cache)"},"panels/network/components/RequestHeadersView.ts | fromPrefetchCache":{"message":"(from prefetch cache)"},"panels/network/components/RequestHeadersView.ts | fromServiceWorker":{"message":"(from service worker)"},"panels/network/components/RequestHeadersView.ts | fromSignedexchange":{"message":"(from signed-exchange)"},"panels/network/components/RequestHeadersView.ts | fromWebBundle":{"message":"(from Web Bundle)"},"panels/network/components/RequestHeadersView.ts | general":{"message":"General"},"panels/network/components/RequestHeadersView.ts | headerOverrides":{"message":"Header overrides"},"panels/network/components/RequestHeadersView.ts | raw":{"message":"Raw"},"panels/network/components/RequestHeadersView.ts | referrerPolicy":{"message":"Referrer Policy"},"panels/network/components/RequestHeadersView.ts | remoteAddress":{"message":"Remote Address"},"panels/network/components/RequestHeadersView.ts | requestHeaders":{"message":"Request Headers"},"panels/network/components/RequestHeadersView.ts | requestMethod":{"message":"Request Method"},"panels/network/components/RequestHeadersView.ts | requestUrl":{"message":"Request URL"},"panels/network/components/RequestHeadersView.ts | responseHeaders":{"message":"Response Headers"},"panels/network/components/RequestHeadersView.ts | revealHeaderOverrides":{"message":"Reveal header override definitions"},"panels/network/components/RequestHeadersView.ts | showMore":{"message":"Show more"},"panels/network/components/RequestHeadersView.ts | statusCode":{"message":"Status Code"},"panels/network/components/RequestTrustTokensView.ts | aClientprovidedArgumentWas":{"message":"A client-provided argument was malformed or otherwise invalid."},"panels/network/components/RequestTrustTokensView.ts | eitherNoInputsForThisOperation":{"message":"Either no inputs for this operation are available or the output exceeds the operations quota."},"panels/network/components/RequestTrustTokensView.ts | failure":{"message":"Failure"},"panels/network/components/RequestTrustTokensView.ts | issuer":{"message":"Issuer"},"panels/network/components/RequestTrustTokensView.ts | issuers":{"message":"Issuers"},"panels/network/components/RequestTrustTokensView.ts | numberOfIssuedTokens":{"message":"Number of issued tokens"},"panels/network/components/RequestTrustTokensView.ts | parameters":{"message":"Parameters"},"panels/network/components/RequestTrustTokensView.ts | refreshPolicy":{"message":"Refresh policy"},"panels/network/components/RequestTrustTokensView.ts | result":{"message":"Result"},"panels/network/components/RequestTrustTokensView.ts | status":{"message":"Status"},"panels/network/components/RequestTrustTokensView.ts | success":{"message":"Success"},"panels/network/components/RequestTrustTokensView.ts | theKeysForThisPSTIssuerAreUnavailable":{"message":"The keys for this PST issuer are unavailable. The issuer may need to be registered via the Chrome registration process."},"panels/network/components/RequestTrustTokensView.ts | theOperationFailedForAnUnknown":{"message":"The operation failed for an unknown reason."},"panels/network/components/RequestTrustTokensView.ts | theOperationsResultWasServedFrom":{"message":"The operations result was served from cache."},"panels/network/components/RequestTrustTokensView.ts | theOperationWasFulfilledLocally":{"message":"The operation was fulfilled locally, no request was sent."},"panels/network/components/RequestTrustTokensView.ts | theServersResponseWasMalformedOr":{"message":"The servers response was malformed or otherwise invalid."},"panels/network/components/RequestTrustTokensView.ts | topLevelOrigin":{"message":"Top level origin"},"panels/network/components/RequestTrustTokensView.ts | type":{"message":"Type"},"panels/network/components/ResponseHeaderSection.ts | addHeader":{"message":"Add header"},"panels/network/components/ResponseHeaderSection.ts | chooseThisOptionIfTheResourceAnd":{"message":"Choose this option if the resource and the document are served from the same site."},"panels/network/components/ResponseHeaderSection.ts | onlyChooseThisOptionIfAn":{"message":"Only choose this option if an arbitrary website including this resource does not impose a security risk."},"panels/network/components/ResponseHeaderSection.ts | thisDocumentWasBlockedFrom":{"message":"This document was blocked from loading in an iframe with a sandbox attribute because this document specified a cross-origin opener policy."},"panels/network/components/ResponseHeaderSection.ts | toEmbedThisFrameInYourDocument":{"message":"To embed this frame in your document, the response needs to enable the cross-origin embedder policy by specifying the following response header:"},"panels/network/components/ResponseHeaderSection.ts | toUseThisResourceFromADifferent":{"message":"To use this resource from a different origin, the server needs to specify a cross-origin resource policy in the response headers:"},"panels/network/components/ResponseHeaderSection.ts | toUseThisResourceFromADifferentOrigin":{"message":"To use this resource from a different origin, the server may relax the cross-origin resource policy response header:"},"panels/network/components/ResponseHeaderSection.ts | toUseThisResourceFromADifferentSite":{"message":"To use this resource from a different site, the server may relax the cross-origin resource policy response header:"},"panels/network/components/WebBundleInfoView.ts | bundledResource":{"message":"Bundled resource"},"panels/network/EventSourceMessagesView.ts | copyMessage":{"message":"Copy message"},"panels/network/EventSourceMessagesView.ts | data":{"message":"Data"},"panels/network/EventSourceMessagesView.ts | eventSource":{"message":"Event Source"},"panels/network/EventSourceMessagesView.ts | id":{"message":"Id"},"panels/network/EventSourceMessagesView.ts | time":{"message":"Time"},"panels/network/EventSourceMessagesView.ts | type":{"message":"Type"},"panels/network/network-meta.ts | clear":{"message":"Clear network log"},"panels/network/network-meta.ts | colorCode":{"message":"color code"},"panels/network/network-meta.ts | colorCodeByResourceType":{"message":"Color code by resource type"},"panels/network/network-meta.ts | colorcodeResourceTypes":{"message":"Color-code resource types"},"panels/network/network-meta.ts | diskCache":{"message":"disk cache"},"panels/network/network-meta.ts | dontGroupNetworkLogItemsByFrame":{"message":"Don't group network log items by frame"},"panels/network/network-meta.ts | frame":{"message":"frame"},"panels/network/network-meta.ts | group":{"message":"group"},"panels/network/network-meta.ts | groupNetworkLogByFrame":{"message":"Group network log by frame"},"panels/network/network-meta.ts | groupNetworkLogItemsByFrame":{"message":"Group network log items by frame"},"panels/network/network-meta.ts | hideRequestDetails":{"message":"Hide request details"},"panels/network/network-meta.ts | network":{"message":"Network"},"panels/network/network-meta.ts | netWork":{"message":"network"},"panels/network/network-meta.ts | networkConditions":{"message":"Network conditions"},"panels/network/network-meta.ts | networkRequestBlocking":{"message":"Network request blocking"},"panels/network/network-meta.ts | networkThrottling":{"message":"network throttling"},"panels/network/network-meta.ts | recordNetworkLog":{"message":"Record network log"},"panels/network/network-meta.ts | resourceType":{"message":"resource type"},"panels/network/network-meta.ts | search":{"message":"Search"},"panels/network/network-meta.ts | showNetwork":{"message":"Show Network"},"panels/network/network-meta.ts | showNetworkConditions":{"message":"Show Network conditions"},"panels/network/network-meta.ts | showNetworkRequestBlocking":{"message":"Show Network request blocking"},"panels/network/network-meta.ts | showSearch":{"message":"Show Search"},"panels/network/network-meta.ts | stopRecordingNetworkLog":{"message":"Stop recording network log"},"panels/network/network-meta.ts | useDefaultColors":{"message":"Use default colors"},"panels/network/NetworkConfigView.ts | acceptedEncoding":{"message":"Accepted Content-Encodings"},"panels/network/NetworkConfigView.ts | caching":{"message":"Caching"},"panels/network/NetworkConfigView.ts | clientHintsStatusText":{"message":"User agent updated."},"panels/network/NetworkConfigView.ts | custom":{"message":"Custom..."},"panels/network/NetworkConfigView.ts | customUserAgentFieldIsRequired":{"message":"Custom user agent field is required"},"panels/network/NetworkConfigView.ts | disableCache":{"message":"Disable cache"},"panels/network/NetworkConfigView.ts | enterACustomUserAgent":{"message":"Enter a custom user agent"},"panels/network/NetworkConfigView.ts | networkConditionsPanelShown":{"message":"Network conditions shown"},"panels/network/NetworkConfigView.ts | networkThrottling":{"message":"Network throttling"},"panels/network/NetworkConfigView.ts | selectAutomatically":{"message":"Use browser default"},"panels/network/NetworkConfigView.ts | userAgent":{"message":"User agent"},"panels/network/NetworkDataGridNode.ts | alternativeJobWonRace":{"message":"Chrome used a HTTP/3 connection induced by an 'Alt-Svc' header because it won a race against establishing a connection using a different HTTP version."},"panels/network/NetworkDataGridNode.ts | alternativeJobWonWithoutRace":{"message":"Chrome used a HTTP/3 connection induced by an 'Alt-Svc' header without racing against establishing a connection using a different HTTP version."},"panels/network/NetworkDataGridNode.ts | blockeds":{"message":"(blocked:{PH1})"},"panels/network/NetworkDataGridNode.ts | blockedTooltip":{"message":"This request was blocked due to misconfigured response headers, click to view the headers"},"panels/network/NetworkDataGridNode.ts | broken":{"message":"Chrome did not try to establish a HTTP/3 connection because it was marked as broken."},"panels/network/NetworkDataGridNode.ts | canceled":{"message":"(canceled)"},"panels/network/NetworkDataGridNode.ts | corsError":{"message":"CORS error"},"panels/network/NetworkDataGridNode.ts | crossoriginResourceSharingErrorS":{"message":"Cross-Origin Resource Sharing error: {PH1}"},"panels/network/NetworkDataGridNode.ts | csp":{"message":"csp"},"panels/network/NetworkDataGridNode.ts | data":{"message":"(data)"},"panels/network/NetworkDataGridNode.ts | devtools":{"message":"devtools"},"panels/network/NetworkDataGridNode.ts | diskCache":{"message":"(disk cache)"},"panels/network/NetworkDataGridNode.ts | dnsAlpnH3JobWonRace":{"message":"Chrome used a HTTP/3 connection due to the DNS record indicating HTTP/3 support, which won a race against establishing a connection using a different HTTP version."},"panels/network/NetworkDataGridNode.ts | dnsAlpnH3JobWonWithoutRace":{"message":"Chrome used a HTTP/3 connection due to the DNS record indicating HTTP/3 support. There was no race against establishing a connection using a different HTTP version."},"panels/network/NetworkDataGridNode.ts | failed":{"message":"(failed)"},"panels/network/NetworkDataGridNode.ts | finished":{"message":"Finished"},"panels/network/NetworkDataGridNode.ts | hasOverriddenHeaders":{"message":"Request has overridden headers"},"panels/network/NetworkDataGridNode.ts | level":{"message":"level 1"},"panels/network/NetworkDataGridNode.ts | mainJobWonRace":{"message":"Chrome used this protocol because it won a race against establishing a HTTP/3 connection."},"panels/network/NetworkDataGridNode.ts | mappingMissing":{"message":"Chrome did not use an alternative HTTP version because no alternative protocol information was available when the request was issued, but an 'Alt-Svc' header was present in the response."},"panels/network/NetworkDataGridNode.ts | memoryCache":{"message":"(memory cache)"},"panels/network/NetworkDataGridNode.ts | origin":{"message":"origin"},"panels/network/NetworkDataGridNode.ts | other":{"message":"other"},"panels/network/NetworkDataGridNode.ts | otherC":{"message":"Other"},"panels/network/NetworkDataGridNode.ts | parser":{"message":"Parser"},"panels/network/NetworkDataGridNode.ts | pending":{"message":"Pending"},"panels/network/NetworkDataGridNode.ts | pendingq":{"message":"(pending)"},"panels/network/NetworkDataGridNode.ts | prefetchCache":{"message":"(prefetch cache)"},"panels/network/NetworkDataGridNode.ts | preflight":{"message":"Preflight"},"panels/network/NetworkDataGridNode.ts | preload":{"message":"Preload"},"panels/network/NetworkDataGridNode.ts | push":{"message":"Push / "},"panels/network/NetworkDataGridNode.ts | redirect":{"message":"Redirect"},"panels/network/NetworkDataGridNode.ts | script":{"message":"Script"},"panels/network/NetworkDataGridNode.ts | selectPreflightRequest":{"message":"Select preflight request"},"panels/network/NetworkDataGridNode.ts | selectTheRequestThatTriggered":{"message":"Select the request that triggered this preflight"},"panels/network/NetworkDataGridNode.ts | servedFromDiskCacheResourceSizeS":{"message":"Served from disk cache, resource size: {PH1}"},"panels/network/NetworkDataGridNode.ts | servedFromMemoryCacheResource":{"message":"Served from memory cache, resource size: {PH1}"},"panels/network/NetworkDataGridNode.ts | servedFromPrefetchCacheResource":{"message":"Served from prefetch cache, resource size: {PH1}"},"panels/network/NetworkDataGridNode.ts | servedFromServiceworkerResource":{"message":"Served from ServiceWorker, resource size: {PH1}"},"panels/network/NetworkDataGridNode.ts | servedFromSignedHttpExchange":{"message":"Served from Signed HTTP Exchange, resource size: {PH1}"},"panels/network/NetworkDataGridNode.ts | servedFromWebBundle":{"message":"Served from Web Bundle, resource size: {PH1}"},"panels/network/NetworkDataGridNode.ts | serviceworker":{"message":"(ServiceWorker)"},"panels/network/NetworkDataGridNode.ts | signedexchange":{"message":"signed-exchange"},"panels/network/NetworkDataGridNode.ts | sPreflight":{"message":"{PH1} + Preflight"},"panels/network/NetworkDataGridNode.ts | timeSubtitleTooltipText":{"message":"Latency (response received time - start time)"},"panels/network/NetworkDataGridNode.ts | unknown":{"message":"(unknown)"},"panels/network/NetworkDataGridNode.ts | unknownExplanation":{"message":"The request status cannot be shown here because the page that issued it unloaded while the request was in flight. You can use chrome://net-export to capture a network log and see all request details."},"panels/network/NetworkDataGridNode.ts | webBundle":{"message":"(Web Bundle)"},"panels/network/NetworkDataGridNode.ts | webBundleError":{"message":"Web Bundle error"},"panels/network/NetworkDataGridNode.ts | webBundleInnerRequest":{"message":"Served from Web Bundle"},"panels/network/NetworkItemView.ts | cookies":{"message":"Cookies"},"panels/network/NetworkItemView.ts | eventstream":{"message":"EventStream"},"panels/network/NetworkItemView.ts | headers":{"message":"Headers"},"panels/network/NetworkItemView.ts | initiator":{"message":"Initiator"},"panels/network/NetworkItemView.ts | messages":{"message":"Messages"},"panels/network/NetworkItemView.ts | payload":{"message":"Payload"},"panels/network/NetworkItemView.ts | preview":{"message":"Preview"},"panels/network/NetworkItemView.ts | rawResponseData":{"message":"Raw response data"},"panels/network/NetworkItemView.ts | requestAndResponseCookies":{"message":"Request and response cookies"},"panels/network/NetworkItemView.ts | requestAndResponseTimeline":{"message":"Request and response timeline"},"panels/network/NetworkItemView.ts | requestInitiatorCallStack":{"message":"Request initiator call stack"},"panels/network/NetworkItemView.ts | response":{"message":"Response"},"panels/network/NetworkItemView.ts | responsePreview":{"message":"Response preview"},"panels/network/NetworkItemView.ts | signedexchangeError":{"message":"SignedExchange error"},"panels/network/NetworkItemView.ts | timing":{"message":"Timing"},"panels/network/NetworkItemView.ts | trustTokenOperationDetails":{"message":"Private State Token operation details"},"panels/network/NetworkItemView.ts | trustTokens":{"message":"Private State Tokens"},"panels/network/NetworkItemView.ts | websocketMessages":{"message":"WebSocket messages"},"panels/network/NetworkLogView.ts | areYouSureYouWantToClearBrowser":{"message":"Are you sure you want to clear browser cache?"},"panels/network/NetworkLogView.ts | areYouSureYouWantToClearBrowserCookies":{"message":"Are you sure you want to clear browser cookies?"},"panels/network/NetworkLogView.ts | blockedRequests":{"message":"Blocked Requests"},"panels/network/NetworkLogView.ts | blockRequestDomain":{"message":"Block request domain"},"panels/network/NetworkLogView.ts | blockRequestUrl":{"message":"Block request URL"},"panels/network/NetworkLogView.ts | clearBrowserCache":{"message":"Clear browser cache"},"panels/network/NetworkLogView.ts | clearBrowserCookies":{"message":"Clear browser cookies"},"panels/network/NetworkLogView.ts | copy":{"message":"Copy"},"panels/network/NetworkLogView.ts | copyAllAsCurl":{"message":"Copy all as cURL"},"panels/network/NetworkLogView.ts | copyAllAsCurlBash":{"message":"Copy all as cURL (bash)"},"panels/network/NetworkLogView.ts | copyAllAsCurlCmd":{"message":"Copy all as cURL (cmd)"},"panels/network/NetworkLogView.ts | copyAllAsFetch":{"message":"Copy all as fetch"},"panels/network/NetworkLogView.ts | copyAllAsHar":{"message":"Copy all as HAR"},"panels/network/NetworkLogView.ts | copyAllAsNodejsFetch":{"message":"Copy all as Node.js fetch"},"panels/network/NetworkLogView.ts | copyAllAsPowershell":{"message":"Copy all as PowerShell"},"panels/network/NetworkLogView.ts | copyAsCurl":{"message":"Copy as cURL"},"panels/network/NetworkLogView.ts | copyAsCurlBash":{"message":"Copy as cURL (bash)"},"panels/network/NetworkLogView.ts | copyAsCurlCmd":{"message":"Copy as cURL (cmd)"},"panels/network/NetworkLogView.ts | copyAsFetch":{"message":"Copy as fetch"},"panels/network/NetworkLogView.ts | copyAsNodejsFetch":{"message":"Copy as Node.js fetch"},"panels/network/NetworkLogView.ts | copyAsPowershell":{"message":"Copy as PowerShell"},"panels/network/NetworkLogView.ts | copyRequestHeaders":{"message":"Copy request headers"},"panels/network/NetworkLogView.ts | copyResponse":{"message":"Copy response"},"panels/network/NetworkLogView.ts | copyResponseHeaders":{"message":"Copy response headers"},"panels/network/NetworkLogView.ts | copyStacktrace":{"message":"Copy stack trace"},"panels/network/NetworkLogView.ts | domcontentloadedS":{"message":"DOMContentLoaded: {PH1}"},"panels/network/NetworkLogView.ts | dropHarFilesHere":{"message":"Drop HAR files here"},"panels/network/NetworkLogView.ts | finishS":{"message":"Finish: {PH1}"},"panels/network/NetworkLogView.ts | hasBlockedCookies":{"message":"Has blocked cookies"},"panels/network/NetworkLogView.ts | hideDataUrls":{"message":"Hide data URLs"},"panels/network/NetworkLogView.ts | hidesDataAndBlobUrls":{"message":"Hides data: and blob: URLs"},"panels/network/NetworkLogView.ts | invertFilter":{"message":"Invert"},"panels/network/NetworkLogView.ts | invertsFilter":{"message":"Inverts the search filter"},"panels/network/NetworkLogView.ts | learnMore":{"message":"Learn more"},"panels/network/NetworkLogView.ts | loadS":{"message":"Load: {PH1}"},"panels/network/NetworkLogView.ts | networkDataAvailable":{"message":"Network Data Available"},"panels/network/NetworkLogView.ts | onlyShowBlockedRequests":{"message":"Only show blocked requests"},"panels/network/NetworkLogView.ts | onlyShowRequestsWithBlocked":{"message":"Only show requests with blocked response cookies"},"panels/network/NetworkLogView.ts | onlyShowThirdPartyRequests":{"message":"Shows only requests with origin different from page origin"},"panels/network/NetworkLogView.ts | overrideHeaders":{"message":"Override headers"},"panels/network/NetworkLogView.ts | performARequestOrHitSToRecordThe":{"message":"Perform a request or hit {PH1} to record the reload."},"panels/network/NetworkLogView.ts | recordingNetworkActivity":{"message":"Recording network activity…"},"panels/network/NetworkLogView.ts | recordToDisplayNetworkActivity":{"message":"Record network log ({PH1}) to display network activity."},"panels/network/NetworkLogView.ts | replayXhr":{"message":"Replay XHR"},"panels/network/NetworkLogView.ts | resourceTypesToInclude":{"message":"Resource types to include"},"panels/network/NetworkLogView.ts | saveAllAsHarWithContent":{"message":"Save all as HAR with content"},"panels/network/NetworkLogView.ts | sBResourcesLoadedByThePage":{"message":"{PH1} B resources loaded by the page"},"panels/network/NetworkLogView.ts | sBSBResourcesLoadedByThePage":{"message":"{PH1} B / {PH2} B resources loaded by the page"},"panels/network/NetworkLogView.ts | sBSBTransferredOverNetwork":{"message":"{PH1} B / {PH2} B transferred over network"},"panels/network/NetworkLogView.ts | sBTransferredOverNetwork":{"message":"{PH1} B transferred over network"},"panels/network/NetworkLogView.ts | sRequests":{"message":"{PH1} requests"},"panels/network/NetworkLogView.ts | sResources":{"message":"{PH1} resources"},"panels/network/NetworkLogView.ts | sSRequests":{"message":"{PH1} / {PH2} requests"},"panels/network/NetworkLogView.ts | sSResources":{"message":"{PH1} / {PH2} resources"},"panels/network/NetworkLogView.ts | sSTransferred":{"message":"{PH1} / {PH2} transferred"},"panels/network/NetworkLogView.ts | sTransferred":{"message":"{PH1} transferred"},"panels/network/NetworkLogView.ts | thirdParty":{"message":"3rd-party requests"},"panels/network/NetworkLogView.ts | unblockS":{"message":"Unblock {PH1}"},"panels/network/NetworkLogViewColumns.ts | connectionId":{"message":"Connection ID"},"panels/network/NetworkLogViewColumns.ts | content":{"message":"Content"},"panels/network/NetworkLogViewColumns.ts | cookies":{"message":"Cookies"},"panels/network/NetworkLogViewColumns.ts | domain":{"message":"Domain"},"panels/network/NetworkLogViewColumns.ts | endTime":{"message":"End Time"},"panels/network/NetworkLogViewColumns.ts | initiator":{"message":"Initiator"},"panels/network/NetworkLogViewColumns.ts | initiatorAddressSpace":{"message":"Initiator Address Space"},"panels/network/NetworkLogViewColumns.ts | latency":{"message":"Latency"},"panels/network/NetworkLogViewColumns.ts | manageHeaderColumns":{"message":"Manage Header Columns…"},"panels/network/NetworkLogViewColumns.ts | method":{"message":"Method"},"panels/network/NetworkLogViewColumns.ts | name":{"message":"Name"},"panels/network/NetworkLogViewColumns.ts | networkLog":{"message":"Network Log"},"panels/network/NetworkLogViewColumns.ts | path":{"message":"Path"},"panels/network/NetworkLogViewColumns.ts | priority":{"message":"Priority"},"panels/network/NetworkLogViewColumns.ts | protocol":{"message":"Protocol"},"panels/network/NetworkLogViewColumns.ts | remoteAddress":{"message":"Remote Address"},"panels/network/NetworkLogViewColumns.ts | remoteAddressSpace":{"message":"Remote Address Space"},"panels/network/NetworkLogViewColumns.ts | responseHeaders":{"message":"Response Headers"},"panels/network/NetworkLogViewColumns.ts | responseTime":{"message":"Response Time"},"panels/network/NetworkLogViewColumns.ts | scheme":{"message":"Scheme"},"panels/network/NetworkLogViewColumns.ts | setCookies":{"message":"Set Cookies"},"panels/network/NetworkLogViewColumns.ts | size":{"message":"Size"},"panels/network/NetworkLogViewColumns.ts | startTime":{"message":"Start Time"},"panels/network/NetworkLogViewColumns.ts | status":{"message":"Status"},"panels/network/NetworkLogViewColumns.ts | text":{"message":"Text"},"panels/network/NetworkLogViewColumns.ts | time":{"message":"Time"},"panels/network/NetworkLogViewColumns.ts | totalDuration":{"message":"Total Duration"},"panels/network/NetworkLogViewColumns.ts | type":{"message":"Type"},"panels/network/NetworkLogViewColumns.ts | url":{"message":"Url"},"panels/network/NetworkLogViewColumns.ts | waterfall":{"message":"Waterfall"},"panels/network/NetworkManageCustomHeadersView.ts | addCustomHeader":{"message":"Add custom header…"},"panels/network/NetworkManageCustomHeadersView.ts | headerName":{"message":"Header Name"},"panels/network/NetworkManageCustomHeadersView.ts | manageHeaderColumns":{"message":"Manage Header Columns"},"panels/network/NetworkManageCustomHeadersView.ts | noCustomHeaders":{"message":"No custom headers"},"panels/network/NetworkPanel.ts | captureScreenshots":{"message":"Capture screenshots"},"panels/network/NetworkPanel.ts | captureScreenshotsWhenLoadingA":{"message":"Capture screenshots when loading a page"},"panels/network/NetworkPanel.ts | close":{"message":"Close"},"panels/network/NetworkPanel.ts | disableCache":{"message":"Disable cache"},"panels/network/NetworkPanel.ts | disableCacheWhileDevtoolsIsOpen":{"message":"Disable cache (while DevTools is open)"},"panels/network/NetworkPanel.ts | doNotClearLogOnPageReload":{"message":"Do not clear log on page reload / navigation"},"panels/network/NetworkPanel.ts | exportHar":{"message":"Export HAR..."},"panels/network/NetworkPanel.ts | fetchingFrames":{"message":"Fetching frames..."},"panels/network/NetworkPanel.ts | groupByFrame":{"message":"Group by frame"},"panels/network/NetworkPanel.ts | groupRequestsByTopLevelRequest":{"message":"Group requests by top level request frame"},"panels/network/NetworkPanel.ts | hitSToReloadAndCaptureFilmstrip":{"message":"Hit {PH1} to reload and capture filmstrip."},"panels/network/NetworkPanel.ts | importHarFile":{"message":"Import HAR file..."},"panels/network/NetworkPanel.ts | moreNetworkConditions":{"message":"More network conditions…"},"panels/network/NetworkPanel.ts | networkSettings":{"message":"Network settings"},"panels/network/NetworkPanel.ts | preserveLog":{"message":"Preserve log"},"panels/network/NetworkPanel.ts | recordingFrames":{"message":"Recording frames..."},"panels/network/NetworkPanel.ts | revealInNetworkPanel":{"message":"Reveal in Network panel"},"panels/network/NetworkPanel.ts | search":{"message":"Search"},"panels/network/NetworkPanel.ts | showMoreInformationInRequestRows":{"message":"Show more information in request rows"},"panels/network/NetworkPanel.ts | showOverview":{"message":"Show overview"},"panels/network/NetworkPanel.ts | showOverviewOfNetworkRequests":{"message":"Show overview of network requests"},"panels/network/NetworkPanel.ts | throttling":{"message":"Throttling"},"panels/network/NetworkPanel.ts | useLargeRequestRows":{"message":"Use large request rows"},"panels/network/NetworkSearchScope.ts | url":{"message":"URL"},"panels/network/NetworkTimeCalculator.ts | sDownload":{"message":"{PH1} download"},"panels/network/NetworkTimeCalculator.ts | sFromCache":{"message":"{PH1} (from cache)"},"panels/network/NetworkTimeCalculator.ts | sFromServiceworker":{"message":"{PH1} (from ServiceWorker)"},"panels/network/NetworkTimeCalculator.ts | sLatency":{"message":"{PH1} latency"},"panels/network/NetworkTimeCalculator.ts | sLatencySDownloadSTotal":{"message":"{PH1} latency, {PH2} download ({PH3} total)"},"panels/network/RequestCookiesView.ts | cookiesThatWereReceivedFromThe":{"message":"Cookies that were received from the server in the 'set-cookie' header of the response"},"panels/network/RequestCookiesView.ts | cookiesThatWereReceivedFromTheServer":{"message":"Cookies that were received from the server in the 'set-cookie' header of the response but were malformed"},"panels/network/RequestCookiesView.ts | cookiesThatWereSentToTheServerIn":{"message":"Cookies that were sent to the server in the 'cookie' header of the request"},"panels/network/RequestCookiesView.ts | learnMore":{"message":"Learn more"},"panels/network/RequestCookiesView.ts | malformedResponseCookies":{"message":"Malformed Response Cookies"},"panels/network/RequestCookiesView.ts | noRequestCookiesWereSent":{"message":"No request cookies were sent."},"panels/network/RequestCookiesView.ts | requestCookies":{"message":"Request Cookies"},"panels/network/RequestCookiesView.ts | responseCookies":{"message":"Response Cookies"},"panels/network/RequestCookiesView.ts | showFilteredOutRequestCookies":{"message":"show filtered out request cookies"},"panels/network/RequestCookiesView.ts | siteHasCookieInOtherPartition":{"message":"This site has cookies in another partition, that were not sent with this request. {PH1}"},"panels/network/RequestCookiesView.ts | thisRequestHasNoCookies":{"message":"This request has no cookies."},"panels/network/RequestHeadersView.ts | activeClientExperimentVariation":{"message":"Active client experiment variation IDs."},"panels/network/RequestHeadersView.ts | activeClientExperimentVariationIds":{"message":"Active client experiment variation IDs that trigger server-side behavior."},"panels/network/RequestHeadersView.ts | chooseThisOptionIfTheResourceAnd":{"message":"Choose this option if the resource and the document are served from the same site."},"panels/network/RequestHeadersView.ts | copyValue":{"message":"Copy value"},"panels/network/RequestHeadersView.ts | decoded":{"message":"Decoded:"},"panels/network/RequestHeadersView.ts | fromDiskCache":{"message":"(from disk cache)"},"panels/network/RequestHeadersView.ts | fromMemoryCache":{"message":"(from memory cache)"},"panels/network/RequestHeadersView.ts | fromPrefetchCache":{"message":"(from prefetch cache)"},"panels/network/RequestHeadersView.ts | fromServiceWorker":{"message":"(from service worker)"},"panels/network/RequestHeadersView.ts | fromSignedexchange":{"message":"(from signed-exchange)"},"panels/network/RequestHeadersView.ts | fromWebBundle":{"message":"(from Web Bundle)"},"panels/network/RequestHeadersView.ts | general":{"message":"General"},"panels/network/RequestHeadersView.ts | headerOverrides":{"message":"Header overrides"},"panels/network/RequestHeadersView.ts | learnMore":{"message":"Learn more"},"panels/network/RequestHeadersView.ts | learnMoreInTheIssuesTab":{"message":"Learn more in the issues tab"},"panels/network/RequestHeadersView.ts | onlyChooseThisOptionIfAn":{"message":"Only choose this option if an arbitrary website including this resource does not impose a security risk."},"panels/network/RequestHeadersView.ts | onlyProvisionalHeadersAre":{"message":"Only provisional headers are available because this request was not sent over the network and instead was served from a local cache, which doesn’t store the original request headers. Disable cache to see full request headers."},"panels/network/RequestHeadersView.ts | provisionalHeadersAreShown":{"message":"Provisional headers are shown"},"panels/network/RequestHeadersView.ts | provisionalHeadersAreShownS":{"message":"Provisional headers are shown. Disable cache to see full headers."},"panels/network/RequestHeadersView.ts | referrerPolicy":{"message":"Referrer Policy"},"panels/network/RequestHeadersView.ts | remoteAddress":{"message":"Remote Address"},"panels/network/RequestHeadersView.ts | requestHeaders":{"message":"Request Headers"},"panels/network/RequestHeadersView.ts | requestMethod":{"message":"Request Method"},"panels/network/RequestHeadersView.ts | requestUrl":{"message":"Request URL"},"panels/network/RequestHeadersView.ts | responseHeaders":{"message":"Response Headers"},"panels/network/RequestHeadersView.ts | showMore":{"message":"Show more"},"panels/network/RequestHeadersView.ts | statusCode":{"message":"Status Code"},"panels/network/RequestHeadersView.ts | thisDocumentWasBlockedFrom":{"message":"This document was blocked from loading in an iframe with a sandbox attribute because this document specified a cross-origin opener policy."},"panels/network/RequestHeadersView.ts | toEmbedThisFrameInYourDocument":{"message":"To embed this frame in your document, the response needs to enable the cross-origin embedder policy by specifying the following response header:"},"panels/network/RequestHeadersView.ts | toUseThisResourceFromADifferent":{"message":"To use this resource from a different origin, the server needs to specify a cross-origin resource policy in the response headers:"},"panels/network/RequestHeadersView.ts | toUseThisResourceFromADifferentOrigin":{"message":"To use this resource from a different origin, the server may relax the cross-origin resource policy response header:"},"panels/network/RequestHeadersView.ts | toUseThisResourceFromADifferentSite":{"message":"To use this resource from a different site, the server may relax the cross-origin resource policy response header:"},"panels/network/RequestHeadersView.ts | viewParsed":{"message":"View parsed"},"panels/network/RequestHeadersView.ts | viewSource":{"message":"View source"},"panels/network/RequestInitiatorView.ts | requestCallStack":{"message":"Request call stack"},"panels/network/RequestInitiatorView.ts | requestInitiatorChain":{"message":"Request initiator chain"},"panels/network/RequestInitiatorView.ts | thisRequestHasNoInitiatorData":{"message":"This request has no initiator data."},"panels/network/RequestPayloadView.ts | copyValue":{"message":"Copy value"},"panels/network/RequestPayloadView.ts | empty":{"message":"(empty)"},"panels/network/RequestPayloadView.ts | formData":{"message":"Form Data"},"panels/network/RequestPayloadView.ts | queryStringParameters":{"message":"Query String Parameters"},"panels/network/RequestPayloadView.ts | requestPayload":{"message":"Request Payload"},"panels/network/RequestPayloadView.ts | showMore":{"message":"Show more"},"panels/network/RequestPayloadView.ts | unableToDecodeValue":{"message":"(unable to decode value)"},"panels/network/RequestPayloadView.ts | viewDecoded":{"message":"View decoded"},"panels/network/RequestPayloadView.ts | viewDecodedL":{"message":"view decoded"},"panels/network/RequestPayloadView.ts | viewParsed":{"message":"View parsed"},"panels/network/RequestPayloadView.ts | viewParsedL":{"message":"view parsed"},"panels/network/RequestPayloadView.ts | viewSource":{"message":"View source"},"panels/network/RequestPayloadView.ts | viewSourceL":{"message":"view source"},"panels/network/RequestPayloadView.ts | viewUrlEncoded":{"message":"View URL-encoded"},"panels/network/RequestPayloadView.ts | viewUrlEncodedL":{"message":"view URL-encoded"},"panels/network/RequestPreviewView.ts | failedToLoadResponseData":{"message":"Failed to load response data"},"panels/network/RequestPreviewView.ts | previewNotAvailable":{"message":"Preview not available"},"panels/network/RequestResponseView.ts | failedToLoadResponseData":{"message":"Failed to load response data"},"panels/network/RequestResponseView.ts | thisRequestHasNoResponseData":{"message":"This request has no response data available."},"panels/network/RequestTimingView.ts | cacheStorageCacheNameS":{"message":"Cache storage cache name: {PH1}"},"panels/network/RequestTimingView.ts | cacheStorageCacheNameUnknown":{"message":"Cache storage cache name: Unknown"},"panels/network/RequestTimingView.ts | cautionRequestIsNotFinishedYet":{"message":"CAUTION: request is not finished yet!"},"panels/network/RequestTimingView.ts | connectionStart":{"message":"Connection Start"},"panels/network/RequestTimingView.ts | contentDownload":{"message":"Content Download"},"panels/network/RequestTimingView.ts | dnsLookup":{"message":"DNS Lookup"},"panels/network/RequestTimingView.ts | duration":{"message":"Duration"},"panels/network/RequestTimingView.ts | durationC":{"message":"DURATION"},"panels/network/RequestTimingView.ts | duringDevelopmentYouCanUseSToAdd":{"message":"During development, you can use {PH1} to add insights into the server-side timing of this request."},"panels/network/RequestTimingView.ts | explanation":{"message":"Explanation"},"panels/network/RequestTimingView.ts | fallbackCode":{"message":"Fallback code"},"panels/network/RequestTimingView.ts | fromHttpCache":{"message":"From HTTP cache"},"panels/network/RequestTimingView.ts | initialConnection":{"message":"Initial connection"},"panels/network/RequestTimingView.ts | label":{"message":"Label"},"panels/network/RequestTimingView.ts | networkFetch":{"message":"Network fetch"},"panels/network/RequestTimingView.ts | originalRequest":{"message":"Original Request"},"panels/network/RequestTimingView.ts | proxyNegotiation":{"message":"Proxy negotiation"},"panels/network/RequestTimingView.ts | queuedAtS":{"message":"Queued at {PH1}"},"panels/network/RequestTimingView.ts | queueing":{"message":"Queueing"},"panels/network/RequestTimingView.ts | readingPush":{"message":"Reading Push"},"panels/network/RequestTimingView.ts | receivingPush":{"message":"Receiving Push"},"panels/network/RequestTimingView.ts | requestresponse":{"message":"Request/Response"},"panels/network/RequestTimingView.ts | requestSent":{"message":"Request sent"},"panels/network/RequestTimingView.ts | requestToServiceworker":{"message":"Request to ServiceWorker"},"panels/network/RequestTimingView.ts | resourceScheduling":{"message":"Resource Scheduling"},"panels/network/RequestTimingView.ts | respondwith":{"message":"respondWith"},"panels/network/RequestTimingView.ts | responseReceived":{"message":"Response Received"},"panels/network/RequestTimingView.ts | retrievalTimeS":{"message":"Retrieval Time: {PH1}"},"panels/network/RequestTimingView.ts | serverPush":{"message":"Server Push"},"panels/network/RequestTimingView.ts | serverTiming":{"message":"Server Timing"},"panels/network/RequestTimingView.ts | serviceworkerCacheStorage":{"message":"ServiceWorker cache storage"},"panels/network/RequestTimingView.ts | sourceOfResponseS":{"message":"Source of response: {PH1}"},"panels/network/RequestTimingView.ts | ssl":{"message":"SSL"},"panels/network/RequestTimingView.ts | stalled":{"message":"Stalled"},"panels/network/RequestTimingView.ts | startedAtS":{"message":"Started at {PH1}"},"panels/network/RequestTimingView.ts | startup":{"message":"Startup"},"panels/network/RequestTimingView.ts | theServerTimingApi":{"message":"the Server Timing API"},"panels/network/RequestTimingView.ts | time":{"message":"TIME"},"panels/network/RequestTimingView.ts | total":{"message":"Total"},"panels/network/RequestTimingView.ts | unknown":{"message":"Unknown"},"panels/network/RequestTimingView.ts | waitingTtfb":{"message":"Waiting for server response"},"panels/network/RequestTimingView.ts | waterfall":{"message":"Waterfall"},"panels/network/ResourceWebSocketFrameView.ts | all":{"message":"All"},"panels/network/ResourceWebSocketFrameView.ts | binaryMessage":{"message":"Binary Message"},"panels/network/ResourceWebSocketFrameView.ts | clearAll":{"message":"Clear All"},"panels/network/ResourceWebSocketFrameView.ts | clearAllL":{"message":"Clear all"},"panels/network/ResourceWebSocketFrameView.ts | connectionCloseMessage":{"message":"Connection Close Message"},"panels/network/ResourceWebSocketFrameView.ts | continuationFrame":{"message":"Continuation Frame"},"panels/network/ResourceWebSocketFrameView.ts | copyMessage":{"message":"Copy message"},"panels/network/ResourceWebSocketFrameView.ts | copyMessageD":{"message":"Copy message..."},"panels/network/ResourceWebSocketFrameView.ts | data":{"message":"Data"},"panels/network/ResourceWebSocketFrameView.ts | enterRegex":{"message":"Enter regex, for example: (web)?socket"},"panels/network/ResourceWebSocketFrameView.ts | filter":{"message":"Filter"},"panels/network/ResourceWebSocketFrameView.ts | length":{"message":"Length"},"panels/network/ResourceWebSocketFrameView.ts | na":{"message":"N/A"},"panels/network/ResourceWebSocketFrameView.ts | pingMessage":{"message":"Ping Message"},"panels/network/ResourceWebSocketFrameView.ts | pongMessage":{"message":"Pong Message"},"panels/network/ResourceWebSocketFrameView.ts | receive":{"message":"Receive"},"panels/network/ResourceWebSocketFrameView.ts | selectMessageToBrowseItsContent":{"message":"Select message to browse its content."},"panels/network/ResourceWebSocketFrameView.ts | send":{"message":"Send"},"panels/network/ResourceWebSocketFrameView.ts | sOpcodeS":{"message":"{PH1} (Opcode {PH2})"},"panels/network/ResourceWebSocketFrameView.ts | sOpcodeSMask":{"message":"{PH1} (Opcode {PH2}, mask)"},"panels/network/ResourceWebSocketFrameView.ts | textMessage":{"message":"Text Message"},"panels/network/ResourceWebSocketFrameView.ts | time":{"message":"Time"},"panels/network/ResourceWebSocketFrameView.ts | webSocketFrame":{"message":"Web Socket Frame"},"panels/network/SignedExchangeInfoView.ts | certificate":{"message":"Certificate"},"panels/network/SignedExchangeInfoView.ts | certificateSha":{"message":"Certificate SHA256"},"panels/network/SignedExchangeInfoView.ts | certificateUrl":{"message":"Certificate URL"},"panels/network/SignedExchangeInfoView.ts | date":{"message":"Date"},"panels/network/SignedExchangeInfoView.ts | errors":{"message":"Errors"},"panels/network/SignedExchangeInfoView.ts | expires":{"message":"Expires"},"panels/network/SignedExchangeInfoView.ts | headerIntegrityHash":{"message":"Header integrity hash"},"panels/network/SignedExchangeInfoView.ts | integrity":{"message":"Integrity"},"panels/network/SignedExchangeInfoView.ts | issuer":{"message":"Issuer"},"panels/network/SignedExchangeInfoView.ts | label":{"message":"Label"},"panels/network/SignedExchangeInfoView.ts | learnmore":{"message":"Learn more"},"panels/network/SignedExchangeInfoView.ts | requestUrl":{"message":"Request URL"},"panels/network/SignedExchangeInfoView.ts | responseCode":{"message":"Response code"},"panels/network/SignedExchangeInfoView.ts | responseHeaders":{"message":"Response headers"},"panels/network/SignedExchangeInfoView.ts | signature":{"message":"Signature"},"panels/network/SignedExchangeInfoView.ts | signedHttpExchange":{"message":"Signed HTTP exchange"},"panels/network/SignedExchangeInfoView.ts | subject":{"message":"Subject"},"panels/network/SignedExchangeInfoView.ts | validFrom":{"message":"Valid from"},"panels/network/SignedExchangeInfoView.ts | validityUrl":{"message":"Validity URL"},"panels/network/SignedExchangeInfoView.ts | validUntil":{"message":"Valid until"},"panels/network/SignedExchangeInfoView.ts | viewCertificate":{"message":"View certificate"},"panels/performance_monitor/performance_monitor-meta.ts | activity":{"message":"activity"},"panels/performance_monitor/performance_monitor-meta.ts | metrics":{"message":"metrics"},"panels/performance_monitor/performance_monitor-meta.ts | monitor":{"message":"monitor"},"panels/performance_monitor/performance_monitor-meta.ts | performance":{"message":"performance"},"panels/performance_monitor/performance_monitor-meta.ts | performanceMonitor":{"message":"Performance monitor"},"panels/performance_monitor/performance_monitor-meta.ts | showPerformanceMonitor":{"message":"Show Performance monitor"},"panels/performance_monitor/performance_monitor-meta.ts | systemMonitor":{"message":"system monitor"},"panels/performance_monitor/PerformanceMonitor.ts | cpuUsage":{"message":"CPU usage"},"panels/performance_monitor/PerformanceMonitor.ts | documentFrames":{"message":"Document Frames"},"panels/performance_monitor/PerformanceMonitor.ts | documents":{"message":"Documents"},"panels/performance_monitor/PerformanceMonitor.ts | domNodes":{"message":"DOM Nodes"},"panels/performance_monitor/PerformanceMonitor.ts | graphsDisplayingARealtimeViewOf":{"message":"Graphs displaying a real-time view of performance metrics"},"panels/performance_monitor/PerformanceMonitor.ts | jsEventListeners":{"message":"JS event listeners"},"panels/performance_monitor/PerformanceMonitor.ts | jsHeapSize":{"message":"JS heap size"},"panels/performance_monitor/PerformanceMonitor.ts | layoutsSec":{"message":"Layouts / sec"},"panels/performance_monitor/PerformanceMonitor.ts | paused":{"message":"Paused"},"panels/performance_monitor/PerformanceMonitor.ts | styleRecalcsSec":{"message":"Style recalcs / sec"},"panels/profiler/CPUProfileView.ts | aggregatedSelfTime":{"message":"Aggregated self time"},"panels/profiler/CPUProfileView.ts | aggregatedTotalTime":{"message":"Aggregated total time"},"panels/profiler/CPUProfileView.ts | cpuProfiles":{"message":"CPU PROFILES"},"panels/profiler/CPUProfileView.ts | cpuProfilesShow":{"message":"CPU profiles show where the execution time is spent in your page's JavaScript functions."},"panels/profiler/CPUProfileView.ts | fms":{"message":"{PH1} ms"},"panels/profiler/CPUProfileView.ts | formatPercent":{"message":"{PH1} %"},"panels/profiler/CPUProfileView.ts | name":{"message":"Name"},"panels/profiler/CPUProfileView.ts | notOptimized":{"message":"Not optimized"},"panels/profiler/CPUProfileView.ts | recording":{"message":"Recording…"},"panels/profiler/CPUProfileView.ts | recordJavascriptCpuProfile":{"message":"Record JavaScript CPU Profile"},"panels/profiler/CPUProfileView.ts | selfTime":{"message":"Self Time"},"panels/profiler/CPUProfileView.ts | startCpuProfiling":{"message":"Start CPU profiling"},"panels/profiler/CPUProfileView.ts | stopCpuProfiling":{"message":"Stop CPU profiling"},"panels/profiler/CPUProfileView.ts | totalTime":{"message":"Total Time"},"panels/profiler/CPUProfileView.ts | url":{"message":"URL"},"panels/profiler/HeapProfilerPanel.ts | revealInSummaryView":{"message":"Reveal in Summary view"},"panels/profiler/HeapProfileView.ts | allocationSampling":{"message":"Allocation sampling"},"panels/profiler/HeapProfileView.ts | formatPercent":{"message":"{PH1} %"},"panels/profiler/HeapProfileView.ts | heapProfilerIsRecording":{"message":"Heap profiler is recording"},"panels/profiler/HeapProfileView.ts | itProvidesGoodApproximation":{"message":"It provides good approximation of allocations broken down by JavaScript execution stack."},"panels/profiler/HeapProfileView.ts | name":{"message":"Name"},"panels/profiler/HeapProfileView.ts | profileD":{"message":"Profile {PH1}"},"panels/profiler/HeapProfileView.ts | recording":{"message":"Recording…"},"panels/profiler/HeapProfileView.ts | recordMemoryAllocations":{"message":"Record memory allocations using sampling method."},"panels/profiler/HeapProfileView.ts | samplingProfiles":{"message":"SAMPLING PROFILES"},"panels/profiler/HeapProfileView.ts | sBytes":{"message":"{PH1} bytes"},"panels/profiler/HeapProfileView.ts | selectedSizeS":{"message":"Selected size: {PH1}"},"panels/profiler/HeapProfileView.ts | selfSize":{"message":"Self size"},"panels/profiler/HeapProfileView.ts | selfSizeBytes":{"message":"Self Size (bytes)"},"panels/profiler/HeapProfileView.ts | skb":{"message":"{PH1} kB"},"panels/profiler/HeapProfileView.ts | startHeapProfiling":{"message":"Start heap profiling"},"panels/profiler/HeapProfileView.ts | stopHeapProfiling":{"message":"Stop heap profiling"},"panels/profiler/HeapProfileView.ts | stopping":{"message":"Stopping…"},"panels/profiler/HeapProfileView.ts | thisProfileTypeHasMinimal":{"message":"This profile type has minimal performance overhead and can be used for long running operations."},"panels/profiler/HeapProfileView.ts | totalSize":{"message":"Total size"},"panels/profiler/HeapProfileView.ts | totalSizeBytes":{"message":"Total Size (bytes)"},"panels/profiler/HeapProfileView.ts | url":{"message":"URL"},"panels/profiler/HeapSnapshotDataGrids.ts | allocation":{"message":"Allocation"},"panels/profiler/HeapSnapshotDataGrids.ts | allocSize":{"message":"Alloc. Size"},"panels/profiler/HeapSnapshotDataGrids.ts | constructorString":{"message":"Constructor"},"panels/profiler/HeapSnapshotDataGrids.ts | count":{"message":"Count"},"panels/profiler/HeapSnapshotDataGrids.ts | Deleted":{"message":"# Deleted"},"panels/profiler/HeapSnapshotDataGrids.ts | Delta":{"message":"# Delta"},"panels/profiler/HeapSnapshotDataGrids.ts | distance":{"message":"Distance"},"panels/profiler/HeapSnapshotDataGrids.ts | distanceFromWindowObject":{"message":"Distance from window object"},"panels/profiler/HeapSnapshotDataGrids.ts | freedSize":{"message":"Freed Size"},"panels/profiler/HeapSnapshotDataGrids.ts | function":{"message":"Function"},"panels/profiler/HeapSnapshotDataGrids.ts | heapSnapshotConstructors":{"message":"Heap Snapshot Constructors"},"panels/profiler/HeapSnapshotDataGrids.ts | heapSnapshotDiff":{"message":"Heap Snapshot Diff"},"panels/profiler/HeapSnapshotDataGrids.ts | heapSnapshotRetainment":{"message":"Heap Snapshot Retainment"},"panels/profiler/HeapSnapshotDataGrids.ts | liveCount":{"message":"Live Count"},"panels/profiler/HeapSnapshotDataGrids.ts | liveSize":{"message":"Live Size"},"panels/profiler/HeapSnapshotDataGrids.ts | New":{"message":"# New"},"panels/profiler/HeapSnapshotDataGrids.ts | object":{"message":"Object"},"panels/profiler/HeapSnapshotDataGrids.ts | retainedSize":{"message":"Retained Size"},"panels/profiler/HeapSnapshotDataGrids.ts | shallowSize":{"message":"Shallow Size"},"panels/profiler/HeapSnapshotDataGrids.ts | size":{"message":"Size"},"panels/profiler/HeapSnapshotDataGrids.ts | sizeDelta":{"message":"Size Delta"},"panels/profiler/HeapSnapshotDataGrids.ts | sizeOfTheObjectItselfInBytes":{"message":"Size of the object itself in bytes"},"panels/profiler/HeapSnapshotDataGrids.ts | sizeOfTheObjectPlusTheGraphIt":{"message":"Size of the object plus the graph it retains in bytes"},"panels/profiler/HeapSnapshotGridNodes.ts | detachedFromDomTree":{"message":"Detached from DOM tree"},"panels/profiler/HeapSnapshotGridNodes.ts | genericStringsTwoPlaceholders":{"message":"{PH1}, {PH2}"},"panels/profiler/HeapSnapshotGridNodes.ts | inElement":{"message":"in"},"panels/profiler/HeapSnapshotGridNodes.ts | internalArray":{"message":"(internal array)[]"},"panels/profiler/HeapSnapshotGridNodes.ts | previewIsNotAvailable":{"message":"Preview is not available"},"panels/profiler/HeapSnapshotGridNodes.ts | revealInSummaryView":{"message":"Reveal in Summary view"},"panels/profiler/HeapSnapshotGridNodes.ts | revealObjectSWithIdSInSummary":{"message":"Reveal object ''{PH1}'' with id @{PH2} in Summary view"},"panels/profiler/HeapSnapshotGridNodes.ts | storeAsGlobalVariable":{"message":"Store as global variable"},"panels/profiler/HeapSnapshotGridNodes.ts | summary":{"message":"Summary"},"panels/profiler/HeapSnapshotGridNodes.ts | userObjectReachableFromWindow":{"message":"User object reachable from window"},"panels/profiler/HeapSnapshotProxy.ts | anErrorOccurredWhenACallToMethod":{"message":"An error occurred when a call to method ''{PH1}'' was requested"},"panels/profiler/HeapSnapshotView.ts | allObjects":{"message":"All objects"},"panels/profiler/HeapSnapshotView.ts | allocation":{"message":"Allocation"},"panels/profiler/HeapSnapshotView.ts | allocationInstrumentationOn":{"message":"Allocation instrumentation on timeline"},"panels/profiler/HeapSnapshotView.ts | allocationStack":{"message":"Allocation stack"},"panels/profiler/HeapSnapshotView.ts | allocationTimelines":{"message":"ALLOCATION TIMELINES"},"panels/profiler/HeapSnapshotView.ts | AllocationTimelinesShowInstrumented":{"message":"Allocation timelines show instrumented JavaScript memory allocations over time. Once profile is recorded you can select a time interval to see objects that were allocated within it and still alive by the end of recording. Use this profile type to isolate memory leaks."},"panels/profiler/HeapSnapshotView.ts | baseSnapshot":{"message":"Base snapshot"},"panels/profiler/HeapSnapshotView.ts | captureNumericValue":{"message":"Include numerical values in capture"},"panels/profiler/HeapSnapshotView.ts | classFilter":{"message":"Class filter"},"panels/profiler/HeapSnapshotView.ts | code":{"message":"Code"},"panels/profiler/HeapSnapshotView.ts | comparison":{"message":"Comparison"},"panels/profiler/HeapSnapshotView.ts | containment":{"message":"Containment"},"panels/profiler/HeapSnapshotView.ts | exposeInternals":{"message":"Expose internals (includes additional implementation-specific details)"},"panels/profiler/HeapSnapshotView.ts | filter":{"message":"Filter"},"panels/profiler/HeapSnapshotView.ts | find":{"message":"Find"},"panels/profiler/HeapSnapshotView.ts | heapMemoryUsage":{"message":"Heap memory usage"},"panels/profiler/HeapSnapshotView.ts | heapSnapshot":{"message":"Heap snapshot"},"panels/profiler/HeapSnapshotView.ts | heapSnapshotProfilesShowMemory":{"message":"Heap snapshot profiles show memory distribution among your page's JavaScript objects and related DOM nodes."},"panels/profiler/HeapSnapshotView.ts | heapSnapshots":{"message":"HEAP SNAPSHOTS"},"panels/profiler/HeapSnapshotView.ts | jsArrays":{"message":"JS arrays"},"panels/profiler/HeapSnapshotView.ts | liveObjects":{"message":"Live objects"},"panels/profiler/HeapSnapshotView.ts | loading":{"message":"Loading…"},"panels/profiler/HeapSnapshotView.ts | objectsAllocatedBeforeS":{"message":"Objects allocated before {PH1}"},"panels/profiler/HeapSnapshotView.ts | objectsAllocatedBetweenSAndS":{"message":"Objects allocated between {PH1} and {PH2}"},"panels/profiler/HeapSnapshotView.ts | percentagePlaceholder":{"message":"{PH1}%"},"panels/profiler/HeapSnapshotView.ts | perspective":{"message":"Perspective"},"panels/profiler/HeapSnapshotView.ts | recordAllocationStacksExtra":{"message":"Record stack traces of allocations (extra performance overhead)"},"panels/profiler/HeapSnapshotView.ts | recording":{"message":"Recording…"},"panels/profiler/HeapSnapshotView.ts | retainers":{"message":"Retainers"},"panels/profiler/HeapSnapshotView.ts | savingD":{"message":"Saving… {PH1}%"},"panels/profiler/HeapSnapshotView.ts | selectedSizeS":{"message":"Selected size: {PH1}"},"panels/profiler/HeapSnapshotView.ts | sKb":{"message":"{PH1} kB"},"panels/profiler/HeapSnapshotView.ts | snapshotD":{"message":"Snapshot {PH1}"},"panels/profiler/HeapSnapshotView.ts | snapshotting":{"message":"Snapshotting…"},"panels/profiler/HeapSnapshotView.ts | stackWasNotRecordedForThisObject":{"message":"Stack was not recorded for this object because it had been allocated before this profile recording started."},"panels/profiler/HeapSnapshotView.ts | startRecordingHeapProfile":{"message":"Start recording heap profile"},"panels/profiler/HeapSnapshotView.ts | statistics":{"message":"Statistics"},"panels/profiler/HeapSnapshotView.ts | stopRecordingHeapProfile":{"message":"Stop recording heap profile"},"panels/profiler/HeapSnapshotView.ts | strings":{"message":"Strings"},"panels/profiler/HeapSnapshotView.ts | summary":{"message":"Summary"},"panels/profiler/HeapSnapshotView.ts | systemObjects":{"message":"System objects"},"panels/profiler/HeapSnapshotView.ts | takeHeapSnapshot":{"message":"Take heap snapshot"},"panels/profiler/HeapSnapshotView.ts | typedArrays":{"message":"Typed arrays"},"panels/profiler/IsolateSelector.ts | changeRate":{"message":"{PH1}/s"},"panels/profiler/IsolateSelector.ts | decreasingBySPerSecond":{"message":"decreasing by {PH1} per second"},"panels/profiler/IsolateSelector.ts | empty":{"message":"(empty)"},"panels/profiler/IsolateSelector.ts | heapSizeChangeTrendOverTheLastS":{"message":"Heap size change trend over the last {PH1} minutes."},"panels/profiler/IsolateSelector.ts | heapSizeInUseByLiveJsObjects":{"message":"Heap size in use by live JS objects."},"panels/profiler/IsolateSelector.ts | increasingBySPerSecond":{"message":"increasing by {PH1} per second"},"panels/profiler/IsolateSelector.ts | javascriptVmInstances":{"message":"JavaScript VM instances"},"panels/profiler/IsolateSelector.ts | totalJsHeapSize":{"message":"Total JS heap size"},"panels/profiler/IsolateSelector.ts | totalPageJsHeapSizeAcrossAllVm":{"message":"Total page JS heap size across all VM instances."},"panels/profiler/IsolateSelector.ts | totalPageJsHeapSizeChangeTrend":{"message":"Total page JS heap size change trend over the last {PH1} minutes."},"panels/profiler/LiveHeapProfileView.ts | allocatedJsHeapSizeCurrentlyIn":{"message":"Allocated JS heap size currently in use"},"panels/profiler/LiveHeapProfileView.ts | anonymousScriptS":{"message":"(Anonymous Script {PH1})"},"panels/profiler/LiveHeapProfileView.ts | heapProfile":{"message":"Heap Profile"},"panels/profiler/LiveHeapProfileView.ts | jsHeap":{"message":"JS Heap"},"panels/profiler/LiveHeapProfileView.ts | kb":{"message":"kB"},"panels/profiler/LiveHeapProfileView.ts | numberOfVmsSharingTheSameScript":{"message":"Number of VMs sharing the same script source"},"panels/profiler/LiveHeapProfileView.ts | scriptUrl":{"message":"Script URL"},"panels/profiler/LiveHeapProfileView.ts | urlOfTheScriptSource":{"message":"URL of the script source"},"panels/profiler/LiveHeapProfileView.ts | vms":{"message":"VMs"},"panels/profiler/ModuleUIStrings.ts | buildingAllocationStatistics":{"message":"Building allocation statistics…"},"panels/profiler/ModuleUIStrings.ts | buildingDominatedNodes":{"message":"Building dominated nodes…"},"panels/profiler/ModuleUIStrings.ts | buildingDominatorTree":{"message":"Building dominator tree…"},"panels/profiler/ModuleUIStrings.ts | buildingEdgeIndexes":{"message":"Building edge indexes…"},"panels/profiler/ModuleUIStrings.ts | buildingLocations":{"message":"Building locations…"},"panels/profiler/ModuleUIStrings.ts | buildingPostorderIndex":{"message":"Building postorder index…"},"panels/profiler/ModuleUIStrings.ts | buildingRetainers":{"message":"Building retainers…"},"panels/profiler/ModuleUIStrings.ts | calculatingDistances":{"message":"Calculating distances…"},"panels/profiler/ModuleUIStrings.ts | calculatingNodeFlags":{"message":"Calculating node flags…"},"panels/profiler/ModuleUIStrings.ts | calculatingRetainedSizes":{"message":"Calculating retained sizes…"},"panels/profiler/ModuleUIStrings.ts | calculatingSamples":{"message":"Calculating samples…"},"panels/profiler/ModuleUIStrings.ts | calculatingStatistics":{"message":"Calculating statistics…"},"panels/profiler/ModuleUIStrings.ts | done":{"message":"Done"},"panels/profiler/ModuleUIStrings.ts | finishedProcessing":{"message":"Finished processing."},"panels/profiler/ModuleUIStrings.ts | loadingAllocationTracesD":{"message":"Loading allocation traces… {PH1}%"},"panels/profiler/ModuleUIStrings.ts | loadingEdgesD":{"message":"Loading edges… {PH1}%"},"panels/profiler/ModuleUIStrings.ts | loadingLocations":{"message":"Loading locations…"},"panels/profiler/ModuleUIStrings.ts | loadingNodesD":{"message":"Loading nodes… {PH1}%"},"panels/profiler/ModuleUIStrings.ts | loadingSamples":{"message":"Loading samples…"},"panels/profiler/ModuleUIStrings.ts | loadingSnapshotInfo":{"message":"Loading snapshot info…"},"panels/profiler/ModuleUIStrings.ts | loadingStrings":{"message":"Loading strings…"},"panels/profiler/ModuleUIStrings.ts | parsingStrings":{"message":"Parsing strings…"},"panels/profiler/ModuleUIStrings.ts | processingSnapshot":{"message":"Processing snapshot…"},"panels/profiler/ModuleUIStrings.ts | propagatingDomState":{"message":"Propagating DOM state…"},"panels/profiler/ProfileDataGrid.ts | genericTextTwoPlaceholders":{"message":"{PH1}, {PH2}"},"panels/profiler/ProfileDataGrid.ts | notOptimizedS":{"message":"Not optimized: {PH1}"},"panels/profiler/ProfileLauncherView.ts | load":{"message":"Load"},"panels/profiler/ProfileLauncherView.ts | selectJavascriptVmInstance":{"message":"Select JavaScript VM instance"},"panels/profiler/ProfileLauncherView.ts | selectProfilingType":{"message":"Select profiling type"},"panels/profiler/ProfileLauncherView.ts | start":{"message":"Start"},"panels/profiler/ProfileLauncherView.ts | stop":{"message":"Stop"},"panels/profiler/ProfileLauncherView.ts | takeSnapshot":{"message":"Take snapshot"},"panels/profiler/profiler-meta.ts | liveHeapProfile":{"message":"Live Heap Profile"},"panels/profiler/profiler-meta.ts | memory":{"message":"Memory"},"panels/profiler/profiler-meta.ts | showLiveHeapProfile":{"message":"Show Live Heap Profile"},"panels/profiler/profiler-meta.ts | showMemory":{"message":"Show Memory"},"panels/profiler/profiler-meta.ts | showNativeFunctions":{"message":"Show native functions in JS Profile"},"panels/profiler/profiler-meta.ts | startRecordingHeapAllocations":{"message":"Start recording heap allocations"},"panels/profiler/profiler-meta.ts | startRecordingHeapAllocationsAndReload":{"message":"Start recording heap allocations and reload the page"},"panels/profiler/profiler-meta.ts | startStopRecording":{"message":"Start/stop recording"},"panels/profiler/profiler-meta.ts | stopRecordingHeapAllocations":{"message":"Stop recording heap allocations"},"panels/profiler/ProfileSidebarTreeElement.ts | delete":{"message":"Delete"},"panels/profiler/ProfileSidebarTreeElement.ts | load":{"message":"Load…"},"panels/profiler/ProfileSidebarTreeElement.ts | save":{"message":"Save"},"panels/profiler/ProfileSidebarTreeElement.ts | saveWithEllipsis":{"message":"Save…"},"panels/profiler/ProfilesPanel.ts | cantLoadFileSupportedFile":{"message":"Can’t load file. Supported file extensions: ''{PH1}''."},"panels/profiler/ProfilesPanel.ts | cantLoadProfileWhileAnother":{"message":"Can’t load profile while another profile is being recorded."},"panels/profiler/ProfilesPanel.ts | clearAllProfiles":{"message":"Clear all profiles"},"panels/profiler/ProfilesPanel.ts | deprecationWarnMsg":{"message":"This panel will be deprecated in the upcoming version. Use the Performance panel to record JavaScript CPU profiles."},"panels/profiler/ProfilesPanel.ts | enableThisPanelTemporarily":{"message":"Enable this panel temporarily"},"panels/profiler/ProfilesPanel.ts | feedback":{"message":"Feedback"},"panels/profiler/ProfilesPanel.ts | goToPerformancePanel":{"message":"Go to Performance Panel"},"panels/profiler/ProfilesPanel.ts | learnMore":{"message":"Learn more"},"panels/profiler/ProfilesPanel.ts | load":{"message":"Load…"},"panels/profiler/ProfilesPanel.ts | profileLoadingFailedS":{"message":"Profile loading failed: {PH1}."},"panels/profiler/ProfilesPanel.ts | profiles":{"message":"Profiles"},"panels/profiler/ProfilesPanel.ts | runD":{"message":"Run {PH1}"},"panels/profiler/ProfileView.ts | chart":{"message":"Chart"},"panels/profiler/ProfileView.ts | excludeSelectedFunction":{"message":"Exclude selected function"},"panels/profiler/ProfileView.ts | failedToReadFile":{"message":"Failed to read file"},"panels/profiler/ProfileView.ts | fileSReadErrorS":{"message":"File ''{PH1}'' read error: {PH2}"},"panels/profiler/ProfileView.ts | findByCostMsNameOrFile":{"message":"Find by cost (>50ms), name or file"},"panels/profiler/ProfileView.ts | focusSelectedFunction":{"message":"Focus selected function"},"panels/profiler/ProfileView.ts | function":{"message":"Function"},"panels/profiler/ProfileView.ts | heavyBottomUp":{"message":"Heavy (Bottom Up)"},"panels/profiler/ProfileView.ts | loaded":{"message":"Loaded"},"panels/profiler/ProfileView.ts | loading":{"message":"Loading…"},"panels/profiler/ProfileView.ts | loadingD":{"message":"Loading… {PH1}%"},"panels/profiler/ProfileView.ts | parsing":{"message":"Parsing…"},"panels/profiler/ProfileView.ts | profile":{"message":"Profile"},"panels/profiler/ProfileView.ts | profileD":{"message":"Profile {PH1}"},"panels/profiler/ProfileView.ts | profiler":{"message":"Profiler"},"panels/profiler/ProfileView.ts | profileViewMode":{"message":"Profile view mode"},"panels/profiler/ProfileView.ts | restoreAllFunctions":{"message":"Restore all functions"},"panels/profiler/ProfileView.ts | treeTopDown":{"message":"Tree (Top Down)"},"panels/protocol_monitor/protocol_monitor-meta.ts | protocolMonitor":{"message":"Protocol monitor"},"panels/protocol_monitor/protocol_monitor-meta.ts | showProtocolMonitor":{"message":"Show Protocol monitor"},"panels/protocol_monitor/ProtocolMonitor.ts | CDPCommandEditorHidden":{"message":"CDP command editor hidden"},"panels/protocol_monitor/ProtocolMonitor.ts | CDPCommandEditorShown":{"message":"CDP command editor shown"},"panels/protocol_monitor/ProtocolMonitor.ts | clearAll":{"message":"Clear all"},"panels/protocol_monitor/ProtocolMonitor.ts | documentation":{"message":"Documentation"},"panels/protocol_monitor/ProtocolMonitor.ts | elapsedTime":{"message":"Elapsed time"},"panels/protocol_monitor/ProtocolMonitor.ts | filter":{"message":"Filter"},"panels/protocol_monitor/ProtocolMonitor.ts | hideCDPCommandEditor":{"message":"Hide CDP command editor"},"panels/protocol_monitor/ProtocolMonitor.ts | method":{"message":"Method"},"panels/protocol_monitor/ProtocolMonitor.ts | noMessageSelected":{"message":"No message selected"},"panels/protocol_monitor/ProtocolMonitor.ts | record":{"message":"Record"},"panels/protocol_monitor/ProtocolMonitor.ts | request":{"message":"Request"},"panels/protocol_monitor/ProtocolMonitor.ts | response":{"message":"Response"},"panels/protocol_monitor/ProtocolMonitor.ts | save":{"message":"Save"},"panels/protocol_monitor/ProtocolMonitor.ts | selectTarget":{"message":"Select a target"},"panels/protocol_monitor/ProtocolMonitor.ts | sendRawCDPCommand":{"message":"Send a raw CDP command"},"panels/protocol_monitor/ProtocolMonitor.ts | sendRawCDPCommandExplanation":{"message":"Format: 'Domain.commandName' for a command without parameters, or '{\"command\":\"Domain.commandName\", \"parameters\": {...}}' as a JSON object for a command with parameters. 'cmd'/'method' and 'args'/'params'/'arguments' are also supported as alternative keys for the JSON object."},"panels/protocol_monitor/ProtocolMonitor.ts | session":{"message":"Session"},"panels/protocol_monitor/ProtocolMonitor.ts | showCDPCommandEditor":{"message":"Show CDP command editor"},"panels/protocol_monitor/ProtocolMonitor.ts | sMs":{"message":"{PH1} ms"},"panels/protocol_monitor/ProtocolMonitor.ts | target":{"message":"Target"},"panels/protocol_monitor/ProtocolMonitor.ts | timestamp":{"message":"Timestamp"},"panels/protocol_monitor/ProtocolMonitor.ts | type":{"message":"Type"},"panels/recorder/components/CreateRecordingView.ts | cancelRecording":{"message":"Cancel recording"},"panels/recorder/components/CreateRecordingView.ts | createRecording":{"message":"Create a new recording"},"panels/recorder/components/CreateRecordingView.ts | includeNecessarySelectors":{"message":"You must choose CSS, Pierce, or XPath as one of your options. Only these selectors are guaranteed to be recorded since ARIA and text selectors may not be unique."},"panels/recorder/components/CreateRecordingView.ts | recordingName":{"message":"Recording name"},"panels/recorder/components/CreateRecordingView.ts | recordingNameIsRequired":{"message":"Recording name is required"},"panels/recorder/components/CreateRecordingView.ts | selectorAttribute":{"message":"Selector attribute"},"panels/recorder/components/CreateRecordingView.ts | selectorTypeARIA":{"message":"ARIA"},"panels/recorder/components/CreateRecordingView.ts | selectorTypeCSS":{"message":"CSS"},"panels/recorder/components/CreateRecordingView.ts | selectorTypePierce":{"message":"Pierce"},"panels/recorder/components/CreateRecordingView.ts | selectorTypes":{"message":"Selector types to record"},"panels/recorder/components/CreateRecordingView.ts | selectorTypeText":{"message":"Text"},"panels/recorder/components/CreateRecordingView.ts | selectorTypeXPath":{"message":"XPath"},"panels/recorder/components/CreateRecordingView.ts | startRecording":{"message":"Start recording"},"panels/recorder/components/ExtensionView.ts | closeView":{"message":"Close"},"panels/recorder/components/ExtensionView.ts | extension":{"message":"Content provided by a browser extension"},"panels/recorder/components/RecordingListView.ts | createRecording":{"message":"Create a new recording"},"panels/recorder/components/RecordingListView.ts | deleteRecording":{"message":"Delete recording"},"panels/recorder/components/RecordingListView.ts | openRecording":{"message":"Open recording"},"panels/recorder/components/RecordingListView.ts | playRecording":{"message":"Play recording"},"panels/recorder/components/RecordingListView.ts | savedRecordings":{"message":"Saved recordings"},"panels/recorder/components/RecordingView.ts | addAssertion":{"message":"Add assertion"},"panels/recorder/components/RecordingView.ts | cancelReplay":{"message":"Cancel replay"},"panels/recorder/components/RecordingView.ts | default":{"message":"Default"},"panels/recorder/components/RecordingView.ts | desktop":{"message":"Desktop"},"panels/recorder/components/RecordingView.ts | download":{"message":"Download: {value}"},"panels/recorder/components/RecordingView.ts | editReplaySettings":{"message":"Edit replay settings"},"panels/recorder/components/RecordingView.ts | editTitle":{"message":"Edit title"},"panels/recorder/components/RecordingView.ts | endRecording":{"message":"End recording"},"panels/recorder/components/RecordingView.ts | environment":{"message":"Environment"},"panels/recorder/components/RecordingView.ts | hideCode":{"message":"Hide code"},"panels/recorder/components/RecordingView.ts | latency":{"message":"Latency: {value} ms"},"panels/recorder/components/RecordingView.ts | mobile":{"message":"Mobile"},"panels/recorder/components/RecordingView.ts | network":{"message":"Network"},"panels/recorder/components/RecordingView.ts | performancePanel":{"message":"Performance panel"},"panels/recorder/components/RecordingView.ts | recording":{"message":"Recording…"},"panels/recorder/components/RecordingView.ts | recordingIsBeingStopped":{"message":"Stopping recording…"},"panels/recorder/components/RecordingView.ts | replaySettings":{"message":"Replay settings"},"panels/recorder/components/RecordingView.ts | requiredTitleError":{"message":"Title is required"},"panels/recorder/components/RecordingView.ts | screenshotForSection":{"message":"Screenshot for this section"},"panels/recorder/components/RecordingView.ts | showCode":{"message":"Show code"},"panels/recorder/components/RecordingView.ts | timeout":{"message":"Timeout: {value} ms"},"panels/recorder/components/RecordingView.ts | timeoutExplanation":{"message":"The timeout setting (in milliseconds) applies to every action when replaying the recording. For example, if a DOM element identified by a CSS selector does not appear on the page within the specified timeout, the replay fails with an error."},"panels/recorder/components/RecordingView.ts | timeoutLabel":{"message":"Timeout"},"panels/recorder/components/RecordingView.ts | upload":{"message":"Upload: {value}"},"panels/recorder/components/ReplayButton.ts | extensionGroup":{"message":"Extensions"},"panels/recorder/components/ReplayButton.ts | ReplayExtremelySlowButtonLabel":{"message":"Extremely slow replay"},"panels/recorder/components/ReplayButton.ts | ReplayExtremelySlowItemLabel":{"message":"Extremely slow"},"panels/recorder/components/ReplayButton.ts | ReplayNormalButtonLabel":{"message":"Replay"},"panels/recorder/components/ReplayButton.ts | ReplayNormalItemLabel":{"message":"Normal (Default)"},"panels/recorder/components/ReplayButton.ts | ReplaySlowButtonLabel":{"message":"Slow replay"},"panels/recorder/components/ReplayButton.ts | ReplaySlowItemLabel":{"message":"Slow"},"panels/recorder/components/ReplayButton.ts | ReplayVerySlowButtonLabel":{"message":"Very slow replay"},"panels/recorder/components/ReplayButton.ts | ReplayVerySlowItemLabel":{"message":"Very slow"},"panels/recorder/components/ReplayButton.ts | speedGroup":{"message":"Speed"},"panels/recorder/components/StartView.ts | createRecording":{"message":"Create a new recording"},"panels/recorder/components/StartView.ts | header":{"message":"Measure performance across an entire user journey"},"panels/recorder/components/StartView.ts | quickStart":{"message":"Quick start: learn the new Recorder panel in DevTools"},"panels/recorder/components/StartView.ts | step1":{"message":"Record a common user journey on your website or app"},"panels/recorder/components/StartView.ts | step2":{"message":"Replay the recording to check if the flow is working"},"panels/recorder/components/StartView.ts | step3":{"message":"Generate a detailed performance trace or export a Puppeteer script for testing"},"panels/recorder/components/StepEditor.ts | addAttribute":{"message":"Add {attributeName}"},"panels/recorder/components/StepEditor.ts | addFrameIndex":{"message":"Add frame index within the frame tree"},"panels/recorder/components/StepEditor.ts | addSelector":{"message":"Add a selector"},"panels/recorder/components/StepEditor.ts | addSelectorPart":{"message":"Add a selector part"},"panels/recorder/components/StepEditor.ts | deleteRow":{"message":"Delete row"},"panels/recorder/components/StepEditor.ts | notSaved":{"message":"Not saved: {error}"},"panels/recorder/components/StepEditor.ts | removeFrameIndex":{"message":"Remove frame index"},"panels/recorder/components/StepEditor.ts | removeSelector":{"message":"Remove a selector"},"panels/recorder/components/StepEditor.ts | removeSelectorPart":{"message":"Remove a selector part"},"panels/recorder/components/StepEditor.ts | selectorPicker":{"message":"Select an element in the page to update selectors"},"panels/recorder/components/StepEditor.ts | unknownActionType":{"message":"Unknown action type."},"panels/recorder/components/StepView.ts | addBreakpoint":{"message":"Add breakpoint"},"panels/recorder/components/StepView.ts | addStepAfter":{"message":"Add step after"},"panels/recorder/components/StepView.ts | addStepBefore":{"message":"Add step before"},"panels/recorder/components/StepView.ts | breakpoints":{"message":"Breakpoints"},"panels/recorder/components/StepView.ts | changeStepTitle":{"message":"Change"},"panels/recorder/components/StepView.ts | clickStepTitle":{"message":"Click"},"panels/recorder/components/StepView.ts | closeStepTitle":{"message":"Close"},"panels/recorder/components/StepView.ts | copyAs":{"message":"Copy as"},"panels/recorder/components/StepView.ts | customStepTitle":{"message":"Custom step"},"panels/recorder/components/StepView.ts | doubleClickStepTitle":{"message":"Double click"},"panels/recorder/components/StepView.ts | elementRoleButton":{"message":"Button"},"panels/recorder/components/StepView.ts | elementRoleFallback":{"message":"Element"},"panels/recorder/components/StepView.ts | elementRoleInput":{"message":"Input"},"panels/recorder/components/StepView.ts | emulateNetworkConditionsStepTitle":{"message":"Emulate network conditions"},"panels/recorder/components/StepView.ts | hoverStepTitle":{"message":"Hover"},"panels/recorder/components/StepView.ts | keyDownStepTitle":{"message":"Key down"},"panels/recorder/components/StepView.ts | keyUpStepTitle":{"message":"Key up"},"panels/recorder/components/StepView.ts | navigateStepTitle":{"message":"Navigate"},"panels/recorder/components/StepView.ts | openStepActions":{"message":"Open step actions"},"panels/recorder/components/StepView.ts | removeBreakpoint":{"message":"Remove breakpoint"},"panels/recorder/components/StepView.ts | removeStep":{"message":"Remove step"},"panels/recorder/components/StepView.ts | scrollStepTitle":{"message":"Scroll"},"panels/recorder/components/StepView.ts | setViewportClickTitle":{"message":"Set viewport"},"panels/recorder/components/StepView.ts | stepManagement":{"message":"Manage steps"},"panels/recorder/components/StepView.ts | waitForElementStepTitle":{"message":"Wait for element"},"panels/recorder/components/StepView.ts | waitForExpressionStepTitle":{"message":"Wait for expression"},"panels/recorder/models/RecorderSettings.ts | defaultRecordingName":{"message":"Recording {DATE} at {TIME}"},"panels/recorder/recorder-meta.ts | createRecording":{"message":"Create a new recording"},"panels/recorder/recorder-meta.ts | recorder":{"message":"Recorder"},"panels/recorder/recorder-meta.ts | replayRecording":{"message":"Replay recording"},"panels/recorder/recorder-meta.ts | showRecorder":{"message":"Show Recorder"},"panels/recorder/recorder-meta.ts | startStopRecording":{"message":"Start/Stop recording"},"panels/recorder/recorder-meta.ts | toggleCode":{"message":"Toggle code view"},"panels/recorder/RecorderController.ts | continueReplay":{"message":"Continue"},"panels/recorder/RecorderController.ts | copyShortcut":{"message":"Copy recording or selected step"},"panels/recorder/RecorderController.ts | createRecording":{"message":"Create a new recording"},"panels/recorder/RecorderController.ts | deleteRecording":{"message":"Delete recording"},"panels/recorder/RecorderController.ts | export":{"message":"Export"},"panels/recorder/RecorderController.ts | exportRecording":{"message":"Export"},"panels/recorder/RecorderController.ts | exportViaExtensions":{"message":"Export via extensions"},"panels/recorder/RecorderController.ts | getExtensions":{"message":"Get extensions…"},"panels/recorder/RecorderController.ts | importRecording":{"message":"Import recording"},"panels/recorder/RecorderController.ts | replayRecording":{"message":"Replay recording"},"panels/recorder/RecorderController.ts | sendFeedback":{"message":"Send feedback"},"panels/recorder/RecorderController.ts | startStopRecording":{"message":"Start/Stop recording"},"panels/recorder/RecorderController.ts | stepOverReplay":{"message":"Execute one step"},"panels/recorder/RecorderController.ts | toggleCode":{"message":"Toggle code view"},"panels/rn_welcome/rn_welcome-meta.ts | rnWelcome":{"message":"⚛️ Welcome"},"panels/rn_welcome/rn_welcome-meta.ts | showRnWelcome":{"message":"Show React Native Welcome panel"},"panels/rn_welcome/RNWelcome.ts | debuggerBrandName":{"message":"React Native JS Inspector"},"panels/rn_welcome/RNWelcome.ts | docsLabel":{"message":"Debugging docs"},"panels/rn_welcome/RNWelcome.ts | techPreviewLabel":{"message":"Technology Preview"},"panels/rn_welcome/RNWelcome.ts | welcomeMessage":{"message":"Welcome to debugging in React Native"},"panels/rn_welcome/RNWelcome.ts | whatsNewLabel":{"message":"What's new"},"panels/screencast/ScreencastApp.ts | toggleScreencast":{"message":"Toggle screencast"},"panels/screencast/ScreencastView.ts | addressBar":{"message":"Address bar"},"panels/screencast/ScreencastView.ts | back":{"message":"back"},"panels/screencast/ScreencastView.ts | forward":{"message":"forward"},"panels/screencast/ScreencastView.ts | profilingInProgress":{"message":"Profiling in progress"},"panels/screencast/ScreencastView.ts | reload":{"message":"reload"},"panels/screencast/ScreencastView.ts | screencastViewOfDebugTarget":{"message":"Screencast view of debug target"},"panels/screencast/ScreencastView.ts | theTabIsInactive":{"message":"The tab is inactive"},"panels/search/SearchResultsPane.ts | lineS":{"message":"Line {PH1}"},"panels/search/SearchResultsPane.ts | matchesCountS":{"message":"Matches Count {PH1}"},"panels/search/SearchResultsPane.ts | showDMore":{"message":"Show {PH1} more"},"panels/search/SearchView.ts | clear":{"message":"Clear"},"panels/search/SearchView.ts | foundDMatchingLinesInDFiles":{"message":"Found {PH1} matching lines in {PH2} files."},"panels/search/SearchView.ts | foundDMatchingLinesInFile":{"message":"Found {PH1} matching lines in 1 file."},"panels/search/SearchView.ts | foundMatchingLineInFile":{"message":"Found 1 matching line in 1 file."},"panels/search/SearchView.ts | indexing":{"message":"Indexing…"},"panels/search/SearchView.ts | indexingInterrupted":{"message":"Indexing interrupted."},"panels/search/SearchView.ts | matchCase":{"message":"Match Case"},"panels/search/SearchView.ts | noMatchesFound":{"message":"No matches found."},"panels/search/SearchView.ts | refresh":{"message":"Refresh"},"panels/search/SearchView.ts | search":{"message":"Search"},"panels/search/SearchView.ts | searchFinished":{"message":"Search finished."},"panels/search/SearchView.ts | searching":{"message":"Searching…"},"panels/search/SearchView.ts | searchInterrupted":{"message":"Search interrupted."},"panels/search/SearchView.ts | searchQuery":{"message":"Search Query"},"panels/search/SearchView.ts | useRegularExpression":{"message":"Use Regular Expression"},"panels/security/security-meta.ts | security":{"message":"Security"},"panels/security/security-meta.ts | showSecurity":{"message":"Show Security"},"panels/security/SecurityModel.ts | cipherWithMAC":{"message":"{PH1} with {PH2}"},"panels/security/SecurityModel.ts | keyExchangeWithGroup":{"message":"{PH1} with {PH2}"},"panels/security/SecurityModel.ts | theSecurityOfThisPageIsUnknown":{"message":"The security of this page is unknown."},"panels/security/SecurityModel.ts | thisPageIsNotSecure":{"message":"This page is not secure."},"panels/security/SecurityModel.ts | thisPageIsNotSecureBrokenHttps":{"message":"This page is not secure (broken HTTPS)."},"panels/security/SecurityModel.ts | thisPageIsSecureValidHttps":{"message":"This page is secure (valid HTTPS)."},"panels/security/SecurityPanel.ts | activeContentWithCertificate":{"message":"active content with certificate errors"},"panels/security/SecurityPanel.ts | activeMixedContent":{"message":"active mixed content"},"panels/security/SecurityPanel.ts | allResourcesOnThisPageAreServed":{"message":"All resources on this page are served securely."},"panels/security/SecurityPanel.ts | allServedSecurely":{"message":"all served securely"},"panels/security/SecurityPanel.ts | blockedMixedContent":{"message":"Blocked mixed content"},"panels/security/SecurityPanel.ts | certificate":{"message":"Certificate"},"panels/security/SecurityPanel.ts | certificateExpiresSoon":{"message":"Certificate expires soon"},"panels/security/SecurityPanel.ts | certificateTransparency":{"message":"Certificate Transparency"},"panels/security/SecurityPanel.ts | chromeHasDeterminedThatThisSiteS":{"message":"Chrome has determined that this site could be fake or fraudulent."},"panels/security/SecurityPanel.ts | cipher":{"message":"Cipher"},"panels/security/SecurityPanel.ts | connection":{"message":"Connection"},"panels/security/SecurityPanel.ts | contentWithCertificateErrors":{"message":"content with certificate errors"},"panels/security/SecurityPanel.ts | enabled":{"message":"enabled"},"panels/security/SecurityPanel.ts | encryptedClientHello":{"message":"Encrypted ClientHello"},"panels/security/SecurityPanel.ts | flaggedByGoogleSafeBrowsing":{"message":"Flagged by Google Safe Browsing"},"panels/security/SecurityPanel.ts | hashAlgorithm":{"message":"Hash algorithm"},"panels/security/SecurityPanel.ts | hideFullDetails":{"message":"Hide full details"},"panels/security/SecurityPanel.ts | ifYouBelieveThisIsShownIn":{"message":"If you believe this is shown in error please visit https://g.co/chrome/lookalike-warnings."},"panels/security/SecurityPanel.ts | ifYouBelieveThisIsShownInErrorSafety":{"message":"If you believe this is shown in error please visit https://g.co/chrome/lookalike-warnings."},"panels/security/SecurityPanel.ts | info":{"message":"Info"},"panels/security/SecurityPanel.ts | insecureSha":{"message":"insecure (SHA-1)"},"panels/security/SecurityPanel.ts | issuedAt":{"message":"Issued at"},"panels/security/SecurityPanel.ts | issuer":{"message":"Issuer"},"panels/security/SecurityPanel.ts | keyExchange":{"message":"Key exchange"},"panels/security/SecurityPanel.ts | logId":{"message":"Log ID"},"panels/security/SecurityPanel.ts | logName":{"message":"Log name"},"panels/security/SecurityPanel.ts | mainOrigin":{"message":"Main origin"},"panels/security/SecurityPanel.ts | mainOriginNonsecure":{"message":"Main origin (non-secure)"},"panels/security/SecurityPanel.ts | mainOriginSecure":{"message":"Main origin (secure)"},"panels/security/SecurityPanel.ts | missing":{"message":"missing"},"panels/security/SecurityPanel.ts | mixedContent":{"message":"mixed content"},"panels/security/SecurityPanel.ts | na":{"message":"(n/a)"},"panels/security/SecurityPanel.ts | nonsecureForm":{"message":"non-secure form"},"panels/security/SecurityPanel.ts | nonsecureOrigins":{"message":"Non-secure origins"},"panels/security/SecurityPanel.ts | noSecurityDetailsAreAvailableFor":{"message":"No security details are available for this origin."},"panels/security/SecurityPanel.ts | noSecurityInformation":{"message":"No security information"},"panels/security/SecurityPanel.ts | notSecure":{"message":"Not secure"},"panels/security/SecurityPanel.ts | notSecureBroken":{"message":"Not secure (broken)"},"panels/security/SecurityPanel.ts | obsoleteConnectionSettings":{"message":"obsolete connection settings"},"panels/security/SecurityPanel.ts | openFullCertificateDetails":{"message":"Open full certificate details"},"panels/security/SecurityPanel.ts | origin":{"message":"Origin"},"panels/security/SecurityPanel.ts | overview":{"message":"Overview"},"panels/security/SecurityPanel.ts | possibleSpoofingUrl":{"message":"Possible spoofing URL"},"panels/security/SecurityPanel.ts | protocol":{"message":"Protocol"},"panels/security/SecurityPanel.ts | publickeypinningBypassed":{"message":"Public-Key-Pinning bypassed"},"panels/security/SecurityPanel.ts | publickeypinningWasBypassedByA":{"message":"Public-Key-Pinning was bypassed by a local root certificate."},"panels/security/SecurityPanel.ts | reloadThePageToRecordRequestsFor":{"message":"Reload the page to record requests for HTTP resources."},"panels/security/SecurityPanel.ts | reloadToViewDetails":{"message":"Reload to view details"},"panels/security/SecurityPanel.ts | resources":{"message":"Resources"},"panels/security/SecurityPanel.ts | rsaKeyExchangeIsObsoleteEnableAn":{"message":"RSA key exchange is obsolete. Enable an ECDHE-based cipher suite."},"panels/security/SecurityPanel.ts | sct":{"message":"SCT"},"panels/security/SecurityPanel.ts | secure":{"message":"Secure"},"panels/security/SecurityPanel.ts | secureConnectionSettings":{"message":"secure connection settings"},"panels/security/SecurityPanel.ts | secureOrigins":{"message":"Secure origins"},"panels/security/SecurityPanel.ts | securityOverview":{"message":"Security overview"},"panels/security/SecurityPanel.ts | serverSignature":{"message":"Server signature"},"panels/security/SecurityPanel.ts | showFullDetails":{"message":"Show full details"},"panels/security/SecurityPanel.ts | showLess":{"message":"Show less"},"panels/security/SecurityPanel.ts | showMoreSTotal":{"message":"Show more ({PH1} total)"},"panels/security/SecurityPanel.ts | signatureAlgorithm":{"message":"Signature algorithm"},"panels/security/SecurityPanel.ts | signatureData":{"message":"Signature data"},"panels/security/SecurityPanel.ts | sIsObsoleteEnableAnAesgcmbased":{"message":"{PH1} is obsolete. Enable an AES-GCM-based cipher suite."},"panels/security/SecurityPanel.ts | sIsObsoleteEnableTlsOrLater":{"message":"{PH1} is obsolete. Enable TLS 1.2 or later."},"panels/security/SecurityPanel.ts | source":{"message":"Source"},"panels/security/SecurityPanel.ts | subject":{"message":"Subject"},"panels/security/SecurityPanel.ts | subjectAlternativeNameMissing":{"message":"Subject Alternative Name missing"},"panels/security/SecurityPanel.ts | theCertificateChainForThisSite":{"message":"The certificate chain for this site contains a certificate signed using SHA-1."},"panels/security/SecurityPanel.ts | theCertificateForThisSiteDoesNot":{"message":"The certificate for this site does not contain a Subject Alternative Name extension containing a domain name or IP address."},"panels/security/SecurityPanel.ts | theCertificateForThisSiteExpires":{"message":"The certificate for this site expires in less than 48 hours and needs to be renewed."},"panels/security/SecurityPanel.ts | theConnectionToThisSiteIs":{"message":"The connection to this site is encrypted and authenticated using {PH1}, {PH2}, and {PH3}."},"panels/security/SecurityPanel.ts | theConnectionToThisSiteIsUsingA":{"message":"The connection to this site is using a valid, trusted server certificate issued by {PH1}."},"panels/security/SecurityPanel.ts | theSecurityDetailsAboveAreFrom":{"message":"The security details above are from the first inspected response."},"panels/security/SecurityPanel.ts | theServerSignatureUsesShaWhichIs":{"message":"The server signature uses SHA-1, which is obsolete. Enable a SHA-2 signature algorithm instead. (Note this is different from the signature in the certificate.)"},"panels/security/SecurityPanel.ts | thisIsAnErrorPage":{"message":"This is an error page."},"panels/security/SecurityPanel.ts | thisOriginIsANonhttpsSecure":{"message":"This origin is a non-HTTPS secure origin."},"panels/security/SecurityPanel.ts | thisPageHasANonhttpsSecureOrigin":{"message":"This page has a non-HTTPS secure origin."},"panels/security/SecurityPanel.ts | thisPageIncludesAFormWithA":{"message":"This page includes a form with a non-secure \"action\" attribute."},"panels/security/SecurityPanel.ts | thisPageIncludesHttpResources":{"message":"This page includes HTTP resources."},"panels/security/SecurityPanel.ts | thisPageIncludesResourcesThat":{"message":"This page includes resources that were loaded with certificate errors."},"panels/security/SecurityPanel.ts | thisPageIsDangerousFlaggedBy":{"message":"This page is dangerous (flagged by Google Safe Browsing)."},"panels/security/SecurityPanel.ts | thisPageIsInsecureUnencrypted":{"message":"This page is insecure (unencrypted HTTP)."},"panels/security/SecurityPanel.ts | thisPageIsSuspicious":{"message":"This page is suspicious"},"panels/security/SecurityPanel.ts | thisPageIsSuspiciousFlaggedBy":{"message":"This page is suspicious (flagged by Chrome)."},"panels/security/SecurityPanel.ts | thisRequestCompliesWithChromes":{"message":"This request complies with Chrome's Certificate Transparency policy."},"panels/security/SecurityPanel.ts | thisRequestDoesNotComplyWith":{"message":"This request does not comply with Chrome's Certificate Transparency policy."},"panels/security/SecurityPanel.ts | thisResponseWasLoadedFromCache":{"message":"This response was loaded from cache. Some security details might be missing."},"panels/security/SecurityPanel.ts | thisSiteIsMissingAValidTrusted":{"message":"This site is missing a valid, trusted certificate ({PH1})."},"panels/security/SecurityPanel.ts | thisSitesHostnameLooksSimilarToP":{"message":"This site's hostname looks similar to {PH1}. Attackers sometimes mimic sites by making small, hard-to-see changes to the domain name."},"panels/security/SecurityPanel.ts | toCheckThisPagesStatusVisit":{"message":"To check this page's status, visit g.co/safebrowsingstatus."},"panels/security/SecurityPanel.ts | unknownCanceled":{"message":"Unknown / canceled"},"panels/security/SecurityPanel.ts | unknownField":{"message":"unknown"},"panels/security/SecurityPanel.ts | validAndTrusted":{"message":"valid and trusted"},"panels/security/SecurityPanel.ts | validationStatus":{"message":"Validation status"},"panels/security/SecurityPanel.ts | validFrom":{"message":"Valid from"},"panels/security/SecurityPanel.ts | validUntil":{"message":"Valid until"},"panels/security/SecurityPanel.ts | viewCertificate":{"message":"View certificate"},"panels/security/SecurityPanel.ts | viewDRequestsInNetworkPanel":{"message":"{n, plural, =1 {View # request in Network Panel} other {View # requests in Network Panel}}"},"panels/security/SecurityPanel.ts | viewRequestsInNetworkPanel":{"message":"View requests in Network Panel"},"panels/security/SecurityPanel.ts | youHaveRecentlyAllowedContent":{"message":"You have recently allowed content loaded with certificate errors (such as scripts or iframes) to run on this site."},"panels/security/SecurityPanel.ts | youHaveRecentlyAllowedNonsecure":{"message":"You have recently allowed non-secure content (such as scripts or iframes) to run on this site."},"panels/security/SecurityPanel.ts | yourConnectionToThisOriginIsNot":{"message":"Your connection to this origin is not secure."},"panels/security/SecurityPanel.ts | yourPageRequestedNonsecure":{"message":"Your page requested non-secure resources that were blocked."},"panels/sensors/LocationsSettingsTab.ts | addLocation":{"message":"Add location..."},"panels/sensors/LocationsSettingsTab.ts | customLocations":{"message":"Custom locations"},"panels/sensors/LocationsSettingsTab.ts | lat":{"message":"Lat"},"panels/sensors/LocationsSettingsTab.ts | latitude":{"message":"Latitude"},"panels/sensors/LocationsSettingsTab.ts | latitudeMustBeANumber":{"message":"Latitude must be a number"},"panels/sensors/LocationsSettingsTab.ts | latitudeMustBeGreaterThanOrEqual":{"message":"Latitude must be greater than or equal to {PH1}"},"panels/sensors/LocationsSettingsTab.ts | latitudeMustBeLessThanOrEqualToS":{"message":"Latitude must be less than or equal to {PH1}"},"panels/sensors/LocationsSettingsTab.ts | locale":{"message":"Locale"},"panels/sensors/LocationsSettingsTab.ts | localeMustContainAlphabetic":{"message":"Locale must contain alphabetic characters"},"panels/sensors/LocationsSettingsTab.ts | locationName":{"message":"Location name"},"panels/sensors/LocationsSettingsTab.ts | locationNameCannotBeEmpty":{"message":"Location name cannot be empty"},"panels/sensors/LocationsSettingsTab.ts | locationNameMustBeLessThanS":{"message":"Location name must be less than {PH1} characters"},"panels/sensors/LocationsSettingsTab.ts | long":{"message":"Long"},"panels/sensors/LocationsSettingsTab.ts | longitude":{"message":"Longitude"},"panels/sensors/LocationsSettingsTab.ts | longitudeMustBeANumber":{"message":"Longitude must be a number"},"panels/sensors/LocationsSettingsTab.ts | longitudeMustBeGreaterThanOr":{"message":"Longitude must be greater than or equal to {PH1}"},"panels/sensors/LocationsSettingsTab.ts | longitudeMustBeLessThanOrEqualTo":{"message":"Longitude must be less than or equal to {PH1}"},"panels/sensors/LocationsSettingsTab.ts | timezoneId":{"message":"Timezone ID"},"panels/sensors/LocationsSettingsTab.ts | timezoneIdMustContainAlphabetic":{"message":"Timezone ID must contain alphabetic characters"},"panels/sensors/sensors-meta.ts | accelerometer":{"message":"accelerometer"},"panels/sensors/sensors-meta.ts | devicebased":{"message":"Device-based"},"panels/sensors/sensors-meta.ts | deviceOrientation":{"message":"device orientation"},"panels/sensors/sensors-meta.ts | emulateIdleDetectorState":{"message":"Emulate Idle Detector state"},"panels/sensors/sensors-meta.ts | forceEnabled":{"message":"Force enabled"},"panels/sensors/sensors-meta.ts | geolocation":{"message":"geolocation"},"panels/sensors/sensors-meta.ts | locale":{"message":"locale"},"panels/sensors/sensors-meta.ts | locales":{"message":"locales"},"panels/sensors/sensors-meta.ts | locations":{"message":"Locations"},"panels/sensors/sensors-meta.ts | noIdleEmulation":{"message":"No idle emulation"},"panels/sensors/sensors-meta.ts | sensors":{"message":"Sensors"},"panels/sensors/sensors-meta.ts | showLocations":{"message":"Show Locations"},"panels/sensors/sensors-meta.ts | showSensors":{"message":"Show Sensors"},"panels/sensors/sensors-meta.ts | timezones":{"message":"timezones"},"panels/sensors/sensors-meta.ts | touch":{"message":"Touch"},"panels/sensors/sensors-meta.ts | userActiveScreenLocked":{"message":"User active, screen locked"},"panels/sensors/sensors-meta.ts | userActiveScreenUnlocked":{"message":"User active, screen unlocked"},"panels/sensors/sensors-meta.ts | userIdleScreenLocked":{"message":"User idle, screen locked"},"panels/sensors/sensors-meta.ts | userIdleScreenUnlocked":{"message":"User idle, screen unlocked"},"panels/sensors/SensorsView.ts | adjustWithMousewheelOrUpdownKeys":{"message":"Adjust with mousewheel or up/down keys. {PH1}: ±10, Shift: ±1, Alt: ±0.01"},"panels/sensors/SensorsView.ts | alpha":{"message":"α (alpha)"},"panels/sensors/SensorsView.ts | beta":{"message":"β (beta)"},"panels/sensors/SensorsView.ts | customOrientation":{"message":"Custom orientation"},"panels/sensors/SensorsView.ts | deviceOrientationSetToAlphaSBeta":{"message":"Device orientation set to alpha: {PH1}, beta: {PH2}, gamma: {PH3}"},"panels/sensors/SensorsView.ts | displayDown":{"message":"Display down"},"panels/sensors/SensorsView.ts | displayUp":{"message":"Display up"},"panels/sensors/SensorsView.ts | enableOrientationToRotate":{"message":"Enable orientation to rotate"},"panels/sensors/SensorsView.ts | error":{"message":"Error"},"panels/sensors/SensorsView.ts | forcesSelectedIdleStateEmulation":{"message":"Forces selected idle state emulation"},"panels/sensors/SensorsView.ts | forcesTouchInsteadOfClick":{"message":"Forces touch instead of click"},"panels/sensors/SensorsView.ts | gamma":{"message":"γ (gamma)"},"panels/sensors/SensorsView.ts | landscapeLeft":{"message":"Landscape left"},"panels/sensors/SensorsView.ts | landscapeRight":{"message":"Landscape right"},"panels/sensors/SensorsView.ts | latitude":{"message":"Latitude"},"panels/sensors/SensorsView.ts | locale":{"message":"Locale"},"panels/sensors/SensorsView.ts | location":{"message":"Location"},"panels/sensors/SensorsView.ts | locationUnavailable":{"message":"Location unavailable"},"panels/sensors/SensorsView.ts | longitude":{"message":"Longitude"},"panels/sensors/SensorsView.ts | manage":{"message":"Manage"},"panels/sensors/SensorsView.ts | manageTheListOfLocations":{"message":"Manage the list of locations"},"panels/sensors/SensorsView.ts | noOverride":{"message":"No override"},"panels/sensors/SensorsView.ts | off":{"message":"Off"},"panels/sensors/SensorsView.ts | orientation":{"message":"Orientation"},"panels/sensors/SensorsView.ts | other":{"message":"Other…"},"panels/sensors/SensorsView.ts | overrides":{"message":"Overrides"},"panels/sensors/SensorsView.ts | portrait":{"message":"Portrait"},"panels/sensors/SensorsView.ts | portraitUpsideDown":{"message":"Portrait upside down"},"panels/sensors/SensorsView.ts | presets":{"message":"Presets"},"panels/sensors/SensorsView.ts | reset":{"message":"Reset"},"panels/sensors/SensorsView.ts | resetDeviceOrientation":{"message":"Reset device orientation"},"panels/sensors/SensorsView.ts | shiftdragHorizontallyToRotate":{"message":"Shift+drag horizontally to rotate around the y-axis"},"panels/sensors/SensorsView.ts | timezoneId":{"message":"Timezone ID"},"panels/settings/components/SyncSection.ts | preferencesSyncDisabled":{"message":"To turn this setting on, you must first enable settings sync in Chrome."},"panels/settings/components/SyncSection.ts | settings":{"message":"Go to Settings"},"panels/settings/components/SyncSection.ts | signedIn":{"message":"Signed into Chrome as:"},"panels/settings/components/SyncSection.ts | syncDisabled":{"message":"To turn this setting on, you must enable Chrome sync."},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | addBrand":{"message":"Add Brand"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | addedBrand":{"message":"Added brand row"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | architecture":{"message":"Architecture (Sec-CH-UA-Arch)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | architecturePlaceholder":{"message":"Architecture (e.g. x86)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | brandFullVersionListDelete":{"message":"Delete brand from full version list"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | brandName":{"message":"Brand"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | brandNameAriaLabel":{"message":"Brand {PH1}"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | brandProperties":{"message":"User agent properties"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | brandUserAgentDelete":{"message":"Delete brand from user agent section"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | brandVersionAriaLabel":{"message":"Version {PH1}"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | brandVersionPlaceholder":{"message":"Version (e.g. 87.0.4280.88)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | deletedBrand":{"message":"Deleted brand row"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | deviceModel":{"message":"Device model (Sec-CH-UA-Model)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | deviceProperties":{"message":"Device properties"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | fullBrowserVersion":{"message":"Full browser version (Sec-CH-UA-Full-Browser-Version)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | fullBrowserVersionPlaceholder":{"message":"Full browser version (e.g. 87.0.4280.88)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | fullVersionList":{"message":"Full version list (Sec-CH-UA-Full-Version-List)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | learnMore":{"message":"Learn more"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | mobileCheckboxLabel":{"message":"Mobile"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | notRepresentable":{"message":"Not representable as structured headers string."},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | platformLabel":{"message":"Platform (Sec-CH-UA-Platform / Sec-CH-UA-Platform-Version)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | platformPlaceholder":{"message":"Platform (e.g. Android)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | platformProperties":{"message":"Platform properties"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | platformVersion":{"message":"Platform version"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | significantBrandVersionPlaceholder":{"message":"Significant version (e.g. 87)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | title":{"message":"User agent client hints"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | update":{"message":"Update"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | useragent":{"message":"User agent (Sec-CH-UA)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | userAgentClientHintsInfo":{"message":"User agent client hints are an alternative to the user agent string that identify the browser and the device in a more structured way with better privacy accounting."},"panels/settings/emulation/DevicesSettingsTab.ts | addCustomDevice":{"message":"Add custom device..."},"panels/settings/emulation/DevicesSettingsTab.ts | device":{"message":"Device"},"panels/settings/emulation/DevicesSettingsTab.ts | deviceAddedOrUpdated":{"message":"Device {PH1} successfully added/updated."},"panels/settings/emulation/DevicesSettingsTab.ts | deviceName":{"message":"Device Name"},"panels/settings/emulation/DevicesSettingsTab.ts | deviceNameCannotBeEmpty":{"message":"Device name cannot be empty."},"panels/settings/emulation/DevicesSettingsTab.ts | deviceNameMustBeLessThanS":{"message":"Device name must be less than {PH1} characters."},"panels/settings/emulation/DevicesSettingsTab.ts | devicePixelRatio":{"message":"Device pixel ratio"},"panels/settings/emulation/DevicesSettingsTab.ts | emulatedDevices":{"message":"Emulated Devices"},"panels/settings/emulation/DevicesSettingsTab.ts | height":{"message":"Height"},"panels/settings/emulation/DevicesSettingsTab.ts | userAgentString":{"message":"User agent string"},"panels/settings/emulation/DevicesSettingsTab.ts | userAgentType":{"message":"User agent type"},"panels/settings/emulation/DevicesSettingsTab.ts | width":{"message":"Width"},"panels/settings/emulation/emulation-meta.ts | devices":{"message":"Devices"},"panels/settings/emulation/emulation-meta.ts | showDevices":{"message":"Show Devices"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | addFilenamePattern":{"message":"Add filename pattern"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | addPattern":{"message":"Add pattern..."},"panels/settings/FrameworkIgnoreListSettingsTab.ts | automaticallyIgnoreListKnownThirdPartyScripts":{"message":"Known third-party scripts from source maps"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | customExclusionRules":{"message":"Custom exclusion rules:"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | debuggerWillSkipThroughThe":{"message":"Debugger will skip through the scripts and will not stop on exceptions thrown by them."},"panels/settings/FrameworkIgnoreListSettingsTab.ts | enableIgnoreListing":{"message":"Enable Ignore Listing"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | enableIgnoreListingTooltip":{"message":"Uncheck to disable all ignore listing"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | frameworkIgnoreList":{"message":"Framework Ignore List"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | generalExclusionRules":{"message":"General exclusion rules:"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | ignoreListContentScripts":{"message":"Content scripts injected by extensions"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | ignoreScriptsWhoseNamesMatchS":{"message":"Ignore scripts whose names match ''{PH1}''"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | learnMore":{"message":"Learn more"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | pattern":{"message":"Add Pattern"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | patternAlreadyExists":{"message":"Pattern already exists"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | patternCannotBeEmpty":{"message":"Pattern cannot be empty"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | patternMustBeAValidRegular":{"message":"Pattern must be a valid regular expression"},"panels/settings/KeybindsSettingsTab.ts | addAShortcut":{"message":"Add a shortcut"},"panels/settings/KeybindsSettingsTab.ts | confirmChanges":{"message":"Confirm changes"},"panels/settings/KeybindsSettingsTab.ts | discardChanges":{"message":"Discard changes"},"panels/settings/KeybindsSettingsTab.ts | editShortcut":{"message":"Edit shortcut"},"panels/settings/KeybindsSettingsTab.ts | FullListOfDevtoolsKeyboard":{"message":"Full list of DevTools keyboard shortcuts and gestures"},"panels/settings/KeybindsSettingsTab.ts | keyboardShortcutsList":{"message":"Keyboard shortcuts list"},"panels/settings/KeybindsSettingsTab.ts | matchShortcutsFromPreset":{"message":"Match shortcuts from preset"},"panels/settings/KeybindsSettingsTab.ts | noShortcutForAction":{"message":"No shortcut for action"},"panels/settings/KeybindsSettingsTab.ts | removeShortcut":{"message":"Remove shortcut"},"panels/settings/KeybindsSettingsTab.ts | ResetShortcutsForAction":{"message":"Reset shortcuts for action"},"panels/settings/KeybindsSettingsTab.ts | RestoreDefaultShortcuts":{"message":"Restore default shortcuts"},"panels/settings/KeybindsSettingsTab.ts | shortcutModified":{"message":"Shortcut modified"},"panels/settings/KeybindsSettingsTab.ts | shortcuts":{"message":"Shortcuts"},"panels/settings/KeybindsSettingsTab.ts | shortcutsCannotContainOnly":{"message":"Shortcuts cannot contain only modifier keys."},"panels/settings/KeybindsSettingsTab.ts | thisShortcutIsInUseByS":{"message":"This shortcut is in use by {PH1}: {PH2}."},"panels/settings/settings-meta.ts | documentation":{"message":"Documentation"},"panels/settings/settings-meta.ts | experiments":{"message":"Experiments"},"panels/settings/settings-meta.ts | ignoreList":{"message":"Ignore List"},"panels/settings/settings-meta.ts | preferences":{"message":"Preferences"},"panels/settings/settings-meta.ts | settings":{"message":"Settings"},"panels/settings/settings-meta.ts | shortcuts":{"message":"Shortcuts"},"panels/settings/settings-meta.ts | showExperiments":{"message":"Show Experiments"},"panels/settings/settings-meta.ts | showIgnoreList":{"message":"Show Ignore List"},"panels/settings/settings-meta.ts | showPreferences":{"message":"Show Preferences"},"panels/settings/settings-meta.ts | showShortcuts":{"message":"Show Shortcuts"},"panels/settings/SettingsScreen.ts | experiments":{"message":"Experiments"},"panels/settings/SettingsScreen.ts | filterExperimentsLabel":{"message":"Filter"},"panels/settings/SettingsScreen.ts | learnMore":{"message":"Learn more"},"panels/settings/SettingsScreen.ts | noResults":{"message":"No experiments match the filter"},"panels/settings/SettingsScreen.ts | oneOrMoreSettingsHaveChanged":{"message":"One or more settings have changed which requires a reload to take effect."},"panels/settings/SettingsScreen.ts | preferences":{"message":"Preferences"},"panels/settings/SettingsScreen.ts | restoreDefaultsAndReload":{"message":"Restore defaults and reload"},"panels/settings/SettingsScreen.ts | sendFeedback":{"message":"Send feedback"},"panels/settings/SettingsScreen.ts | settings":{"message":"Settings"},"panels/settings/SettingsScreen.ts | shortcuts":{"message":"Shortcuts"},"panels/settings/SettingsScreen.ts | theseExperimentsAreParticularly":{"message":"These experiments are particularly unstable. Enable at your own risk."},"panels/settings/SettingsScreen.ts | theseExperimentsCouldBeUnstable":{"message":"These experiments could be unstable or unreliable and may require you to restart DevTools."},"panels/settings/SettingsScreen.ts | warning":{"message":"WARNING:"},"panels/snippets/ScriptSnippetFileSystem.ts | linkedTo":{"message":"Linked to {PH1}"},"panels/snippets/ScriptSnippetFileSystem.ts | scriptSnippet":{"message":"Script snippet #{PH1}"},"panels/snippets/SnippetsQuickOpen.ts | noSnippetsFound":{"message":"No snippets found."},"panels/snippets/SnippetsQuickOpen.ts | run":{"message":"Run"},"panels/snippets/SnippetsQuickOpen.ts | snippet":{"message":"Snippet"},"panels/sources/AddSourceMapURLDialog.ts | add":{"message":"Add"},"panels/sources/AddSourceMapURLDialog.ts | debugInfoUrl":{"message":"DWARF symbols URL: "},"panels/sources/AddSourceMapURLDialog.ts | sourceMapUrl":{"message":"Source map URL: "},"panels/sources/BreakpointEditDialog.ts | breakpoint":{"message":"Breakpoint"},"panels/sources/BreakpointEditDialog.ts | breakpointType":{"message":"Breakpoint type"},"panels/sources/BreakpointEditDialog.ts | closeDialog":{"message":"Close edit dialog and save changes"},"panels/sources/BreakpointEditDialog.ts | conditionalBreakpoint":{"message":"Conditional breakpoint"},"panels/sources/BreakpointEditDialog.ts | expressionToCheckBeforePausingEg":{"message":"Expression to check before pausing, e.g. x > 5"},"panels/sources/BreakpointEditDialog.ts | learnMoreOnBreakpointTypes":{"message":"Learn more: Breakpoint Types"},"panels/sources/BreakpointEditDialog.ts | logAMessageToConsoleDoNotBreak":{"message":"Log a message to Console, do not break"},"panels/sources/BreakpointEditDialog.ts | logMessageEgXIsX":{"message":"Log message, e.g. 'x is', x"},"panels/sources/BreakpointEditDialog.ts | logpoint":{"message":"Logpoint"},"panels/sources/BreakpointEditDialog.ts | pauseOnlyWhenTheConditionIsTrue":{"message":"Pause only when the condition is true"},"panels/sources/CallStackSidebarPane.ts | callFrameWarnings":{"message":"Some call frames have warnings"},"panels/sources/CallStackSidebarPane.ts | callStack":{"message":"Call Stack"},"panels/sources/CallStackSidebarPane.ts | copyStackTrace":{"message":"Copy stack trace"},"panels/sources/CallStackSidebarPane.ts | debugFileNotFound":{"message":"Failed to load debug file \"{PH1}\"."},"panels/sources/CallStackSidebarPane.ts | notPaused":{"message":"Not paused"},"panels/sources/CallStackSidebarPane.ts | onIgnoreList":{"message":"on ignore list"},"panels/sources/CallStackSidebarPane.ts | restartFrame":{"message":"Restart frame"},"panels/sources/CallStackSidebarPane.ts | showIgnorelistedFrames":{"message":"Show ignore-listed frames"},"panels/sources/CallStackSidebarPane.ts | showMore":{"message":"Show more"},"panels/sources/components/BreakpointsView.ts | breakpointHit":{"message":"{PH1} breakpoint hit"},"panels/sources/components/BreakpointsView.ts | checked":{"message":"checked"},"panels/sources/components/BreakpointsView.ts | conditionCode":{"message":"Condition: {PH1}"},"panels/sources/components/BreakpointsView.ts | disableAllBreakpointsInFile":{"message":"Disable all breakpoints in file"},"panels/sources/components/BreakpointsView.ts | editCondition":{"message":"Edit condition"},"panels/sources/components/BreakpointsView.ts | editLogpoint":{"message":"Edit logpoint"},"panels/sources/components/BreakpointsView.ts | enableAllBreakpointsInFile":{"message":"Enable all breakpoints in file"},"panels/sources/components/BreakpointsView.ts | indeterminate":{"message":"mixed"},"panels/sources/components/BreakpointsView.ts | logpointCode":{"message":"Logpoint: {PH1}"},"panels/sources/components/BreakpointsView.ts | pauseOnCaughtExceptions":{"message":"Pause on caught exceptions"},"panels/sources/components/BreakpointsView.ts | pauseOnUncaughtExceptions":{"message":"Pause on uncaught exceptions"},"panels/sources/components/BreakpointsView.ts | removeAllBreakpoints":{"message":"Remove all breakpoints"},"panels/sources/components/BreakpointsView.ts | removeAllBreakpointsInFile":{"message":"Remove all breakpoints in file"},"panels/sources/components/BreakpointsView.ts | removeBreakpoint":{"message":"Remove breakpoint"},"panels/sources/components/BreakpointsView.ts | removeOtherBreakpoints":{"message":"Remove other breakpoints"},"panels/sources/components/BreakpointsView.ts | revealLocation":{"message":"Reveal location"},"panels/sources/components/BreakpointsView.ts | unchecked":{"message":"unchecked"},"panels/sources/components/HeadersView.ts | addHeader":{"message":"Add a header"},"panels/sources/components/HeadersView.ts | addOverrideRule":{"message":"Add override rule"},"panels/sources/components/HeadersView.ts | errorWhenParsing":{"message":"Error when parsing ''{PH1}''."},"panels/sources/components/HeadersView.ts | learnMore":{"message":"Learn more"},"panels/sources/components/HeadersView.ts | parsingErrorExplainer":{"message":"This is most likely due to a syntax error in ''{PH1}''. Try opening this file in an external editor to fix the error or delete the file and re-create the override."},"panels/sources/components/HeadersView.ts | removeBlock":{"message":"Remove this 'ApplyTo'-section"},"panels/sources/components/HeadersView.ts | removeHeader":{"message":"Remove this header"},"panels/sources/CoveragePlugin.ts | clickToShowCoveragePanel":{"message":"Click to show Coverage Panel"},"panels/sources/CoveragePlugin.ts | coverageNa":{"message":"Coverage: n/a"},"panels/sources/CoveragePlugin.ts | coverageS":{"message":"Coverage: {PH1}"},"panels/sources/CoveragePlugin.ts | showDetails":{"message":"Show Details"},"panels/sources/CSSPlugin.ts | openColorPicker":{"message":"Open color picker."},"panels/sources/CSSPlugin.ts | openCubicBezierEditor":{"message":"Open cubic bezier editor."},"panels/sources/DebuggerPausedMessage.ts | attributeModifications":{"message":"attribute modifications"},"panels/sources/DebuggerPausedMessage.ts | childSAdded":{"message":"Child {PH1} added"},"panels/sources/DebuggerPausedMessage.ts | debuggerPaused":{"message":"Debugger paused"},"panels/sources/DebuggerPausedMessage.ts | descendantSAdded":{"message":"Descendant {PH1} added"},"panels/sources/DebuggerPausedMessage.ts | descendantSRemoved":{"message":"Descendant {PH1} removed"},"panels/sources/DebuggerPausedMessage.ts | nodeRemoval":{"message":"node removal"},"panels/sources/DebuggerPausedMessage.ts | pausedBeforePotentialOutofmemory":{"message":"Paused before potential out-of-memory crash"},"panels/sources/DebuggerPausedMessage.ts | pausedOnAssertion":{"message":"Paused on assertion"},"panels/sources/DebuggerPausedMessage.ts | pausedOnBreakpoint":{"message":"Paused on breakpoint"},"panels/sources/DebuggerPausedMessage.ts | pausedOnCspViolation":{"message":"Paused on CSP violation"},"panels/sources/DebuggerPausedMessage.ts | pausedOnDebuggedFunction":{"message":"Paused on debugged function"},"panels/sources/DebuggerPausedMessage.ts | pausedOnEventListener":{"message":"Paused on event listener"},"panels/sources/DebuggerPausedMessage.ts | pausedOnException":{"message":"Paused on exception"},"panels/sources/DebuggerPausedMessage.ts | pausedOnPromiseRejection":{"message":"Paused on promise rejection"},"panels/sources/DebuggerPausedMessage.ts | pausedOnS":{"message":"Paused on {PH1}"},"panels/sources/DebuggerPausedMessage.ts | pausedOnXhrOrFetch":{"message":"Paused on XHR or fetch"},"panels/sources/DebuggerPausedMessage.ts | subtreeModifications":{"message":"subtree modifications"},"panels/sources/DebuggerPausedMessage.ts | trustedTypePolicyViolation":{"message":"Trusted Type Policy Violation"},"panels/sources/DebuggerPausedMessage.ts | trustedTypeSinkViolation":{"message":"Trusted Type Sink Violation"},"panels/sources/DebuggerPlugin.ts | addBreakpoint":{"message":"Add breakpoint"},"panels/sources/DebuggerPlugin.ts | addConditionalBreakpoint":{"message":"Add conditional breakpoint…"},"panels/sources/DebuggerPlugin.ts | addLogpoint":{"message":"Add logpoint…"},"panels/sources/DebuggerPlugin.ts | addSourceMap":{"message":"Add source map…"},"panels/sources/DebuggerPlugin.ts | addWasmDebugInfo":{"message":"Add DWARF debug info…"},"panels/sources/DebuggerPlugin.ts | associatedFilesAreAvailable":{"message":"Associated files are available via file tree or {PH1}."},"panels/sources/DebuggerPlugin.ts | associatedFilesShouldBeAdded":{"message":"Associated files should be added to the file tree. You can debug these resolved source files as regular JavaScript files."},"panels/sources/DebuggerPlugin.ts | configure":{"message":"Configure"},"panels/sources/DebuggerPlugin.ts | debugFileNotFound":{"message":"Failed to load debug file \"{PH1}\"."},"panels/sources/DebuggerPlugin.ts | debugInfoNotFound":{"message":"Failed to load any debug info for {PH1}."},"panels/sources/DebuggerPlugin.ts | disableBreakpoint":{"message":"{n, plural, =1 {Disable breakpoint} other {Disable all breakpoints in line}}"},"panels/sources/DebuggerPlugin.ts | editBreakpoint":{"message":"Edit breakpoint…"},"panels/sources/DebuggerPlugin.ts | enableBreakpoint":{"message":"{n, plural, =1 {Enable breakpoint} other {Enable all breakpoints in line}}"},"panels/sources/DebuggerPlugin.ts | neverPauseHere":{"message":"Never pause here"},"panels/sources/DebuggerPlugin.ts | removeBreakpoint":{"message":"{n, plural, =1 {Remove breakpoint} other {Remove all breakpoints in line}}"},"panels/sources/DebuggerPlugin.ts | removeFromIgnoreList":{"message":"Remove from ignore list"},"panels/sources/DebuggerPlugin.ts | sourceMapDetected":{"message":"Source map detected."},"panels/sources/DebuggerPlugin.ts | sourceMapFoundButIgnoredForFile":{"message":"Source map found, but ignored for file on ignore list."},"panels/sources/DebuggerPlugin.ts | theDebuggerWillSkipStepping":{"message":"The debugger will skip stepping through this script, and will not stop on exceptions."},"panels/sources/DebuggerPlugin.ts | thisScriptIsOnTheDebuggersIgnore":{"message":"This script is on the debugger's ignore list"},"panels/sources/FilteredUISourceCodeListProvider.ts | noFilesFound":{"message":"No files found"},"panels/sources/FilteredUISourceCodeListProvider.ts | sIgnoreListed":{"message":"{PH1} (ignore listed)"},"panels/sources/GoToLineQuickOpen.ts | currentLineSTypeALineNumber":{"message":"Current line: {PH1}. Type a line number between 1 and {PH2} to navigate to."},"panels/sources/GoToLineQuickOpen.ts | currentPositionXsTypeAnOffset":{"message":"Current position: 0x{PH1}. Type an offset between 0x{PH2} and 0x{PH3} to navigate to."},"panels/sources/GoToLineQuickOpen.ts | goToLineS":{"message":"Go to line {PH1}."},"panels/sources/GoToLineQuickOpen.ts | goToLineSAndColumnS":{"message":"Go to line {PH1} and column {PH2}."},"panels/sources/GoToLineQuickOpen.ts | goToOffsetXs":{"message":"Go to offset 0x{PH1}."},"panels/sources/GoToLineQuickOpen.ts | noFileSelected":{"message":"No file selected."},"panels/sources/GoToLineQuickOpen.ts | noResultsFound":{"message":"No results found"},"panels/sources/GoToLineQuickOpen.ts | typeANumberToGoToThatLine":{"message":"Type a number to go to that line."},"panels/sources/InplaceFormatterEditorAction.ts | format":{"message":"Format"},"panels/sources/InplaceFormatterEditorAction.ts | formatS":{"message":"Format {PH1}"},"panels/sources/NavigatorView.ts | areYouSureYouWantToDeleteAll":{"message":"Are you sure you want to delete all overrides contained in this folder?"},"panels/sources/NavigatorView.ts | areYouSureYouWantToDeleteThis":{"message":"Are you sure you want to delete this file?"},"panels/sources/NavigatorView.ts | areYouSureYouWantToExcludeThis":{"message":"Are you sure you want to exclude this folder?"},"panels/sources/NavigatorView.ts | areYouSureYouWantToRemoveThis":{"message":"Are you sure you want to remove this folder?"},"panels/sources/NavigatorView.ts | authored":{"message":"Authored"},"panels/sources/NavigatorView.ts | authoredTooltip":{"message":"Contains original sources"},"panels/sources/NavigatorView.ts | delete":{"message":"Delete"},"panels/sources/NavigatorView.ts | deleteAllOverrides":{"message":"Delete all overrides"},"panels/sources/NavigatorView.ts | deployed":{"message":"Deployed"},"panels/sources/NavigatorView.ts | deployedTooltip":{"message":"Contains final sources the browser sees"},"panels/sources/NavigatorView.ts | excludeFolder":{"message":"Exclude folder"},"panels/sources/NavigatorView.ts | makeACopy":{"message":"Make a copy…"},"panels/sources/NavigatorView.ts | newFile":{"message":"New file"},"panels/sources/NavigatorView.ts | noDomain":{"message":"(no domain)"},"panels/sources/NavigatorView.ts | openFolder":{"message":"Open folder"},"panels/sources/NavigatorView.ts | removeFolderFromWorkspace":{"message":"Remove folder from workspace"},"panels/sources/NavigatorView.ts | rename":{"message":"Rename…"},"panels/sources/NavigatorView.ts | searchInAllFiles":{"message":"Search in all files"},"panels/sources/NavigatorView.ts | searchInFolder":{"message":"Search in folder"},"panels/sources/NavigatorView.ts | sFromSourceMap":{"message":"{PH1} (from source map)"},"panels/sources/NavigatorView.ts | sIgnoreListed":{"message":"{PH1} (ignore listed)"},"panels/sources/OutlineQuickOpen.ts | noFileSelected":{"message":"No file selected."},"panels/sources/OutlineQuickOpen.ts | noResultsFound":{"message":"No results found"},"panels/sources/OutlineQuickOpen.ts | openAJavascriptOrCssFileToSee":{"message":"Open a JavaScript or CSS file to see symbols"},"panels/sources/ProfilePlugin.ts | kb":{"message":"kB"},"panels/sources/ProfilePlugin.ts | mb":{"message":"MB"},"panels/sources/ProfilePlugin.ts | ms":{"message":"ms"},"panels/sources/ResourceOriginPlugin.ts | fromS":{"message":"(From {PH1})"},"panels/sources/ResourceOriginPlugin.ts | sourceMappedFromS":{"message":"(Source mapped from {PH1})"},"panels/sources/ScopeChainSidebarPane.ts | closure":{"message":"Closure"},"panels/sources/ScopeChainSidebarPane.ts | closureS":{"message":"Closure ({PH1})"},"panels/sources/ScopeChainSidebarPane.ts | exception":{"message":"Exception"},"panels/sources/ScopeChainSidebarPane.ts | loading":{"message":"Loading..."},"panels/sources/ScopeChainSidebarPane.ts | notPaused":{"message":"Not paused"},"panels/sources/ScopeChainSidebarPane.ts | noVariables":{"message":"No variables"},"panels/sources/ScopeChainSidebarPane.ts | returnValue":{"message":"Return value"},"panels/sources/ScopeChainSidebarPane.ts | revealInMemoryInspectorPanel":{"message":"Reveal in Memory Inspector panel"},"panels/sources/SnippetsPlugin.ts | ctrlenter":{"message":"Ctrl+Enter"},"panels/sources/SnippetsPlugin.ts | enter":{"message":"⌘+Enter"},"panels/sources/sources-meta.ts | activateBreakpoints":{"message":"Activate breakpoints"},"panels/sources/sources-meta.ts | addFolderToWorkspace":{"message":"Add folder to workspace"},"panels/sources/sources-meta.ts | addSelectedTextToWatches":{"message":"Add selected text to watches"},"panels/sources/sources-meta.ts | all":{"message":"All"},"panels/sources/sources-meta.ts | allowScrollingPastEndOfFile":{"message":"Allow scrolling past end of file"},"panels/sources/sources-meta.ts | autocompletion":{"message":"Autocompletion"},"panels/sources/sources-meta.ts | automaticallyRevealFilesIn":{"message":"Automatically reveal files in sidebar"},"panels/sources/sources-meta.ts | bracketMatching":{"message":"Bracket matching"},"panels/sources/sources-meta.ts | breakpoints":{"message":"Breakpoints"},"panels/sources/sources-meta.ts | closeAll":{"message":"Close All"},"panels/sources/sources-meta.ts | closeTheActiveTab":{"message":"Close the active tab"},"panels/sources/sources-meta.ts | codeFolding":{"message":"Code folding"},"panels/sources/sources-meta.ts | createNewSnippet":{"message":"Create new snippet"},"panels/sources/sources-meta.ts | deactivateBreakpoints":{"message":"Deactivate breakpoints"},"panels/sources/sources-meta.ts | decrementCssUnitBy":{"message":"Decrement CSS unit by {PH1}"},"panels/sources/sources-meta.ts | detectIndentation":{"message":"Detect indentation"},"panels/sources/sources-meta.ts | disableAutocompletion":{"message":"Disable autocompletion"},"panels/sources/sources-meta.ts | disableAutoFocusOnDebuggerPaused":{"message":"Do not focus Sources panel when triggering a breakpoint"},"panels/sources/sources-meta.ts | disableBracketMatching":{"message":"Disable bracket matching"},"panels/sources/sources-meta.ts | disableCodeFolding":{"message":"Disable code folding"},"panels/sources/sources-meta.ts | disableCssSourceMaps":{"message":"Disable CSS source maps"},"panels/sources/sources-meta.ts | disableJavascriptSourceMaps":{"message":"Disable JavaScript source maps"},"panels/sources/sources-meta.ts | disableTabMovesFocus":{"message":"Disable tab moves focus"},"panels/sources/sources-meta.ts | disableWasmAutoStepping":{"message":"Disable wasm auto-stepping"},"panels/sources/sources-meta.ts | disallowScrollingPastEndOfFile":{"message":"Disallow scrolling past end of file"},"panels/sources/sources-meta.ts | displayVariableValuesInlineWhile":{"message":"Display variable values inline while debugging"},"panels/sources/sources-meta.ts | doNotAutomaticallyRevealFilesIn":{"message":"Do not automatically reveal files in sidebar"},"panels/sources/sources-meta.ts | doNotDetectIndentation":{"message":"Do not detect indentation"},"panels/sources/sources-meta.ts | doNotDisplayVariableValuesInline":{"message":"Do not display variable values inline while debugging"},"panels/sources/sources-meta.ts | doNotSearchInAnonymousAndContent":{"message":"Do not search in anonymous and content scripts"},"panels/sources/sources-meta.ts | doNotShowWhitespaceCharacters":{"message":"Do not show whitespace characters"},"panels/sources/sources-meta.ts | enableAutocompletion":{"message":"Enable autocompletion"},"panels/sources/sources-meta.ts | enableAutoFocusOnDebuggerPaused":{"message":"Focus Sources panel when triggering a breakpoint"},"panels/sources/sources-meta.ts | enableBracketMatching":{"message":"Enable bracket matching"},"panels/sources/sources-meta.ts | enableCodeFolding":{"message":"Enable code folding"},"panels/sources/sources-meta.ts | enableCssSourceMaps":{"message":"Enable CSS source maps"},"panels/sources/sources-meta.ts | enableJavascriptSourceMaps":{"message":"Enable JavaScript source maps"},"panels/sources/sources-meta.ts | enableTabMovesFocus":{"message":"Enable tab moves focus"},"panels/sources/sources-meta.ts | enableWasmAutoStepping":{"message":"Enable wasm auto-stepping"},"panels/sources/sources-meta.ts | evaluateSelectedTextInConsole":{"message":"Evaluate selected text in console"},"panels/sources/sources-meta.ts | file":{"message":"File"},"panels/sources/sources-meta.ts | filesystem":{"message":"Filesystem"},"panels/sources/sources-meta.ts | goTo":{"message":"Go to"},"panels/sources/sources-meta.ts | goToAFunctionDeclarationruleSet":{"message":"Go to a function declaration/rule set"},"panels/sources/sources-meta.ts | goToLine":{"message":"Go to line"},"panels/sources/sources-meta.ts | incrementCssUnitBy":{"message":"Increment CSS unit by {PH1}"},"panels/sources/sources-meta.ts | jumpToNextEditingLocation":{"message":"Jump to next editing location"},"panels/sources/sources-meta.ts | jumpToPreviousEditingLocation":{"message":"Jump to previous editing location"},"panels/sources/sources-meta.ts | line":{"message":"Line"},"panels/sources/sources-meta.ts | nextCallFrame":{"message":"Next call frame"},"panels/sources/sources-meta.ts | nextEditorTab":{"message":"Next editor"},"panels/sources/sources-meta.ts | none":{"message":"None"},"panels/sources/sources-meta.ts | open":{"message":"Open"},"panels/sources/sources-meta.ts | pauseScriptExecution":{"message":"Pause script execution"},"panels/sources/sources-meta.ts | previousCallFrame":{"message":"Previous call frame"},"panels/sources/sources-meta.ts | previousEditorTab":{"message":"Previous editor"},"panels/sources/sources-meta.ts | quickSource":{"message":"Quick source"},"panels/sources/sources-meta.ts | rename":{"message":"Rename"},"panels/sources/sources-meta.ts | resumeScriptExecution":{"message":"Resume script execution"},"panels/sources/sources-meta.ts | runSnippet":{"message":"Run snippet"},"panels/sources/sources-meta.ts | save":{"message":"Save"},"panels/sources/sources-meta.ts | saveAll":{"message":"Save all"},"panels/sources/sources-meta.ts | scope":{"message":"Scope"},"panels/sources/sources-meta.ts | search":{"message":"Search"},"panels/sources/sources-meta.ts | searchInAnonymousAndContent":{"message":"Search in anonymous and content scripts"},"panels/sources/sources-meta.ts | showAllWhitespaceCharacters":{"message":"Show all whitespace characters"},"panels/sources/sources-meta.ts | showBreakpoints":{"message":"Show Breakpoints"},"panels/sources/sources-meta.ts | showFilesystem":{"message":"Show Filesystem"},"panels/sources/sources-meta.ts | showQuickSource":{"message":"Show Quick source"},"panels/sources/sources-meta.ts | showScope":{"message":"Show Scope"},"panels/sources/sources-meta.ts | showSearch":{"message":"Show Search"},"panels/sources/sources-meta.ts | showSnippets":{"message":"Show Snippets"},"panels/sources/sources-meta.ts | showSources":{"message":"Show Sources"},"panels/sources/sources-meta.ts | showThreads":{"message":"Show Threads"},"panels/sources/sources-meta.ts | showTrailingWhitespaceCharacters":{"message":"Show trailing whitespace characters"},"panels/sources/sources-meta.ts | showWatch":{"message":"Show Watch"},"panels/sources/sources-meta.ts | showWhitespaceCharacters":{"message":"Show whitespace characters:"},"panels/sources/sources-meta.ts | snippets":{"message":"Snippets"},"panels/sources/sources-meta.ts | sources":{"message":"Sources"},"panels/sources/sources-meta.ts | step":{"message":"Step"},"panels/sources/sources-meta.ts | stepIntoNextFunctionCall":{"message":"Step into next function call"},"panels/sources/sources-meta.ts | stepOutOfCurrentFunction":{"message":"Step out of current function"},"panels/sources/sources-meta.ts | stepOverNextFunctionCall":{"message":"Step over next function call"},"panels/sources/sources-meta.ts | switchFile":{"message":"Switch file"},"panels/sources/sources-meta.ts | symbol":{"message":"Symbol"},"panels/sources/sources-meta.ts | threads":{"message":"Threads"},"panels/sources/sources-meta.ts | toggleBreakpoint":{"message":"Toggle breakpoint"},"panels/sources/sources-meta.ts | toggleBreakpointEnabled":{"message":"Toggle breakpoint enabled"},"panels/sources/sources-meta.ts | toggleBreakpointInputWindow":{"message":"Toggle breakpoint input window"},"panels/sources/sources-meta.ts | toggleDebuggerSidebar":{"message":"Toggle debugger sidebar"},"panels/sources/sources-meta.ts | toggleNavigatorSidebar":{"message":"Toggle navigator sidebar"},"panels/sources/sources-meta.ts | trailing":{"message":"Trailing"},"panels/sources/sources-meta.ts | wasmAutoStepping":{"message":"When debugging wasm with debug information, do not pause on wasm bytecode if possible"},"panels/sources/sources-meta.ts | watch":{"message":"Watch"},"panels/sources/SourcesNavigator.ts | clearConfiguration":{"message":"Clear configuration"},"panels/sources/SourcesNavigator.ts | contentScriptsServedByExtensions":{"message":"Content scripts served by extensions appear here"},"panels/sources/SourcesNavigator.ts | createAndSaveCodeSnippetsFor":{"message":"Create and save code snippets for later reuse"},"panels/sources/SourcesNavigator.ts | createNewSnippet":{"message":"Create new snippet"},"panels/sources/SourcesNavigator.ts | learnMore":{"message":"Learn more"},"panels/sources/SourcesNavigator.ts | learnMoreAboutWorkspaces":{"message":"Learn more about Workspaces"},"panels/sources/SourcesNavigator.ts | newSnippet":{"message":"New snippet"},"panels/sources/SourcesNavigator.ts | overridePageAssetsWithFilesFromA":{"message":"Override page assets with files from a local folder"},"panels/sources/SourcesNavigator.ts | remove":{"message":"Remove"},"panels/sources/SourcesNavigator.ts | rename":{"message":"Rename…"},"panels/sources/SourcesNavigator.ts | run":{"message":"Run"},"panels/sources/SourcesNavigator.ts | saveAs":{"message":"Save as..."},"panels/sources/SourcesNavigator.ts | selectFolderForOverrides":{"message":"Select folder for overrides"},"panels/sources/SourcesNavigator.ts | syncChangesInDevtoolsWithThe":{"message":"Sync changes in DevTools with the local filesystem"},"panels/sources/SourcesPanel.ts | continueToHere":{"message":"Continue to here"},"panels/sources/SourcesPanel.ts | copyS":{"message":"Copy {PH1}"},"panels/sources/SourcesPanel.ts | copyStringAsJSLiteral":{"message":"Copy string as JavaScript literal"},"panels/sources/SourcesPanel.ts | copyStringAsJSONLiteral":{"message":"Copy string as JSON literal"},"panels/sources/SourcesPanel.ts | copyStringContents":{"message":"Copy string contents"},"panels/sources/SourcesPanel.ts | debuggerHidden":{"message":"Debugger sidebar hidden"},"panels/sources/SourcesPanel.ts | debuggerShown":{"message":"Debugger sidebar shown"},"panels/sources/SourcesPanel.ts | dropWorkspaceFolderHere":{"message":"Drop workspace folder here"},"panels/sources/SourcesPanel.ts | groupByAuthored":{"message":"Group by Authored/Deployed"},"panels/sources/SourcesPanel.ts | groupByFolder":{"message":"Group by folder"},"panels/sources/SourcesPanel.ts | hideDebugger":{"message":"Hide debugger"},"panels/sources/SourcesPanel.ts | hideIgnoreListed":{"message":"Hide ignore-listed sources"},"panels/sources/SourcesPanel.ts | hideNavigator":{"message":"Hide navigator"},"panels/sources/SourcesPanel.ts | moreOptions":{"message":"More options"},"panels/sources/SourcesPanel.ts | navigatorHidden":{"message":"Navigator sidebar hidden"},"panels/sources/SourcesPanel.ts | navigatorShown":{"message":"Navigator sidebar shown"},"panels/sources/SourcesPanel.ts | openInSourcesPanel":{"message":"Open in Sources panel"},"panels/sources/SourcesPanel.ts | pauseOnCaughtExceptions":{"message":"Pause on caught exceptions"},"panels/sources/SourcesPanel.ts | resumeWithAllPausesBlockedForMs":{"message":"Resume with all pauses blocked for 500 ms"},"panels/sources/SourcesPanel.ts | revealInSidebar":{"message":"Reveal in sidebar"},"panels/sources/SourcesPanel.ts | showDebugger":{"message":"Show debugger"},"panels/sources/SourcesPanel.ts | showFunctionDefinition":{"message":"Show function definition"},"panels/sources/SourcesPanel.ts | showNavigator":{"message":"Show navigator"},"panels/sources/SourcesPanel.ts | storeSAsGlobalVariable":{"message":"Store {PH1} as global variable"},"panels/sources/SourcesPanel.ts | terminateCurrentJavascriptCall":{"message":"Terminate current JavaScript call"},"panels/sources/SourcesView.ts | dropInAFolderToAddToWorkspace":{"message":"Drop in a folder to add to workspace"},"panels/sources/SourcesView.ts | openFile":{"message":"Open file"},"panels/sources/SourcesView.ts | runCommand":{"message":"Run command"},"panels/sources/SourcesView.ts | sourceViewActions":{"message":"Source View Actions"},"panels/sources/TabbedEditorContainer.ts | areYouSureYouWantToCloseUnsaved":{"message":"Are you sure you want to close unsaved file: {PH1}?"},"panels/sources/TabbedEditorContainer.ts | changesToThisFileWereNotSavedTo":{"message":"Changes to this file were not saved to file system."},"panels/sources/TabbedEditorContainer.ts | unableToLoadThisContent":{"message":"Unable to load this content."},"panels/sources/ThreadsSidebarPane.ts | paused":{"message":"paused"},"panels/sources/WatchExpressionsSidebarPane.ts | addPropertyPathToWatch":{"message":"Add property path to watch"},"panels/sources/WatchExpressionsSidebarPane.ts | addWatchExpression":{"message":"Add watch expression"},"panels/sources/WatchExpressionsSidebarPane.ts | copyValue":{"message":"Copy value"},"panels/sources/WatchExpressionsSidebarPane.ts | deleteAllWatchExpressions":{"message":"Delete all watch expressions"},"panels/sources/WatchExpressionsSidebarPane.ts | deleteWatchExpression":{"message":"Delete watch expression"},"panels/sources/WatchExpressionsSidebarPane.ts | notAvailable":{"message":""},"panels/sources/WatchExpressionsSidebarPane.ts | noWatchExpressions":{"message":"No watch expressions"},"panels/sources/WatchExpressionsSidebarPane.ts | refreshWatchExpressions":{"message":"Refresh watch expressions"},"panels/timeline/AppenderUtils.ts | sSelfS":{"message":"{PH1} (self {PH2})"},"panels/timeline/CountersGraph.ts | documents":{"message":"Documents"},"panels/timeline/CountersGraph.ts | gpuMemory":{"message":"GPU Memory"},"panels/timeline/CountersGraph.ts | jsHeap":{"message":"JS Heap"},"panels/timeline/CountersGraph.ts | listeners":{"message":"Listeners"},"panels/timeline/CountersGraph.ts | nodes":{"message":"Nodes"},"panels/timeline/CountersGraph.ts | ss":{"message":"[{PH1} – {PH2}]"},"panels/timeline/EventsTimelineTreeView.ts | all":{"message":"All"},"panels/timeline/EventsTimelineTreeView.ts | Dms":{"message":"{PH1} ms"},"panels/timeline/EventsTimelineTreeView.ts | durationFilter":{"message":"Duration filter"},"panels/timeline/EventsTimelineTreeView.ts | filterEventLog":{"message":"Filter event log"},"panels/timeline/EventsTimelineTreeView.ts | startTime":{"message":"Start Time"},"panels/timeline/GPUTrackAppender.ts | gpu":{"message":"GPU"},"panels/timeline/InteractionsTrackAppender.ts | interactions":{"message":"Interactions"},"panels/timeline/LayoutShiftsTrackAppender.ts | layoutShifts":{"message":"Layout Shifts"},"panels/timeline/timeline-meta.ts | hideChromeFrameInLayersView":{"message":"Hide chrome frame in Layers view"},"panels/timeline/timeline-meta.ts | javascriptProfiler":{"message":"JavaScript Profiler"},"panels/timeline/timeline-meta.ts | loadProfile":{"message":"Load profile…"},"panels/timeline/timeline-meta.ts | nextFrame":{"message":"Next frame"},"panels/timeline/timeline-meta.ts | nextRecording":{"message":"Next recording"},"panels/timeline/timeline-meta.ts | performance":{"message":"Performance"},"panels/timeline/timeline-meta.ts | previousFrame":{"message":"Previous frame"},"panels/timeline/timeline-meta.ts | previousRecording":{"message":"Previous recording"},"panels/timeline/timeline-meta.ts | record":{"message":"Record"},"panels/timeline/timeline-meta.ts | saveProfile":{"message":"Save profile…"},"panels/timeline/timeline-meta.ts | showJavascriptProfiler":{"message":"Show JavaScript Profiler"},"panels/timeline/timeline-meta.ts | showPerformance":{"message":"Show Performance"},"panels/timeline/timeline-meta.ts | showRecentTimelineSessions":{"message":"Show recent timeline sessions"},"panels/timeline/timeline-meta.ts | startProfilingAndReloadPage":{"message":"Start profiling and reload page"},"panels/timeline/timeline-meta.ts | startStopRecording":{"message":"Start/stop recording"},"panels/timeline/timeline-meta.ts | stop":{"message":"Stop"},"panels/timeline/TimelineController.ts | cpuProfileForATargetIsNot":{"message":"CPU profile for a target is not available."},"panels/timeline/TimelineController.ts | tracingNotSupported":{"message":"Performance trace recording not supported for this type of target"},"panels/timeline/TimelineDetailsView.ts | bottomup":{"message":"Bottom-Up"},"panels/timeline/TimelineDetailsView.ts | callTree":{"message":"Call Tree"},"panels/timeline/TimelineDetailsView.ts | estimated":{"message":"estimated"},"panels/timeline/TimelineDetailsView.ts | eventLog":{"message":"Event Log"},"panels/timeline/TimelineDetailsView.ts | layers":{"message":"Layers"},"panels/timeline/TimelineDetailsView.ts | learnMore":{"message":"Learn more"},"panels/timeline/TimelineDetailsView.ts | paintProfiler":{"message":"Paint Profiler"},"panels/timeline/TimelineDetailsView.ts | rangeSS":{"message":"Range: {PH1} – {PH2}"},"panels/timeline/TimelineDetailsView.ts | summary":{"message":"Summary"},"panels/timeline/TimelineDetailsView.ts | totalBlockingTimeSmss":{"message":"Total blocking time: {PH1}ms{PH2}"},"panels/timeline/TimelineEventOverview.ts | cpu":{"message":"CPU"},"panels/timeline/TimelineEventOverview.ts | heap":{"message":"HEAP"},"panels/timeline/TimelineEventOverview.ts | net":{"message":"NET"},"panels/timeline/TimelineEventOverview.ts | sSDash":{"message":"{PH1} – {PH2}"},"panels/timeline/TimelineFlameChartDataProvider.ts | animation":{"message":"Animation"},"panels/timeline/TimelineFlameChartDataProvider.ts | droppedFrame":{"message":"Dropped Frame"},"panels/timeline/TimelineFlameChartDataProvider.ts | frame":{"message":"Frame"},"panels/timeline/TimelineFlameChartDataProvider.ts | frames":{"message":"Frames"},"panels/timeline/TimelineFlameChartDataProvider.ts | frameS":{"message":"Frame — {PH1}"},"panels/timeline/TimelineFlameChartDataProvider.ts | idleFrame":{"message":"Idle Frame"},"panels/timeline/TimelineFlameChartDataProvider.ts | longFrame":{"message":"Long frame"},"panels/timeline/TimelineFlameChartDataProvider.ts | main":{"message":"Main"},"panels/timeline/TimelineFlameChartDataProvider.ts | mainS":{"message":"Main — {PH1}"},"panels/timeline/TimelineFlameChartDataProvider.ts | onIgnoreList":{"message":"On ignore list"},"panels/timeline/TimelineFlameChartDataProvider.ts | partiallyPresentedFrame":{"message":"Partially Presented Frame"},"panels/timeline/TimelineFlameChartDataProvider.ts | raster":{"message":"Raster"},"panels/timeline/TimelineFlameChartDataProvider.ts | rasterizerThreadS":{"message":"Rasterizer Thread {PH1}"},"panels/timeline/TimelineFlameChartDataProvider.ts | sSelfS":{"message":"{PH1} (self {PH2})"},"panels/timeline/TimelineFlameChartDataProvider.ts | subframe":{"message":"Subframe"},"panels/timeline/TimelineFlameChartDataProvider.ts | thread":{"message":"Thread"},"panels/timeline/TimelineFlameChartNetworkDataProvider.ts | network":{"message":"Network"},"panels/timeline/TimelineFlameChartView.ts | sAtS":{"message":"{PH1} at {PH2}"},"panels/timeline/TimelineHistoryManager.ts | currentSessionSS":{"message":"Current Session: {PH1}. {PH2}"},"panels/timeline/TimelineHistoryManager.ts | moments":{"message":"moments"},"panels/timeline/TimelineHistoryManager.ts | noRecordings":{"message":"(no recordings)"},"panels/timeline/TimelineHistoryManager.ts | sAgo":{"message":"({PH1} ago)"},"panels/timeline/TimelineHistoryManager.ts | sD":{"message":"{PH1} #{PH2}"},"panels/timeline/TimelineHistoryManager.ts | selectTimelineSession":{"message":"Select Timeline Session"},"panels/timeline/TimelineHistoryManager.ts | sH":{"message":"{PH1} h"},"panels/timeline/TimelineHistoryManager.ts | sM":{"message":"{PH1} m"},"panels/timeline/TimelineLoader.ts | legacyTimelineFormatIsNot":{"message":"Legacy Timeline format is not supported."},"panels/timeline/TimelineLoader.ts | malformedCpuProfileFormat":{"message":"Malformed CPU profile format"},"panels/timeline/TimelineLoader.ts | malformedTimelineDataS":{"message":"Malformed timeline data: {PH1}"},"panels/timeline/TimelineLoader.ts | malformedTimelineDataUnknownJson":{"message":"Malformed timeline data: Unknown JSON format"},"panels/timeline/TimelineLoader.ts | malformedTimelineInputWrongJson":{"message":"Malformed timeline input, wrong JSON brackets balance"},"panels/timeline/TimelinePanel.ts | afterRecordingSelectAnAreaOf":{"message":"After recording, select an area of interest in the overview by dragging. Then, zoom and pan the timeline with the mousewheel or {PH1} keys. {PH2}"},"panels/timeline/TimelinePanel.ts | bufferUsage":{"message":"Buffer usage"},"panels/timeline/TimelinePanel.ts | capturesAdvancedPaint":{"message":"Captures advanced paint instrumentation, introduces significant performance overhead"},"panels/timeline/TimelinePanel.ts | captureScreenshots":{"message":"Capture screenshots"},"panels/timeline/TimelinePanel.ts | captureSettings":{"message":"Capture settings"},"panels/timeline/TimelinePanel.ts | clear":{"message":"Clear"},"panels/timeline/TimelinePanel.ts | clickTheRecordButtonSOrHitSTo":{"message":"Click the record button {PH1} or hit {PH2} to start a new recording."},"panels/timeline/TimelinePanel.ts | clickTheReloadButtonSOrHitSTo":{"message":"Click the reload button {PH1} or hit {PH2} to record the page load."},"panels/timeline/TimelinePanel.ts | close":{"message":"Close"},"panels/timeline/TimelinePanel.ts | couldNotStart":{"message":"Could not start recording, please try again later"},"panels/timeline/TimelinePanel.ts | cpu":{"message":"CPU:"},"panels/timeline/TimelinePanel.ts | CpuThrottlingIsEnabled":{"message":"- CPU throttling is enabled"},"panels/timeline/TimelinePanel.ts | description":{"message":"Description"},"panels/timeline/TimelinePanel.ts | disableJavascriptSamples":{"message":"Disable JavaScript samples"},"panels/timeline/TimelinePanel.ts | disablesJavascriptSampling":{"message":"Disables JavaScript sampling, reduces overhead when running against mobile devices"},"panels/timeline/TimelinePanel.ts | dropTimelineFileOrUrlHere":{"message":"Drop timeline file or URL here"},"panels/timeline/TimelinePanel.ts | enableAdvancedPaint":{"message":"Enable advanced paint instrumentation (slow)"},"panels/timeline/TimelinePanel.ts | failedToSaveTimelineSS":{"message":"Failed to save timeline: {PH1} ({PH2})"},"panels/timeline/TimelinePanel.ts | HardwareConcurrencyIsEnabled":{"message":"- Hardware concurrency override is enabled"},"panels/timeline/TimelinePanel.ts | initializingProfiler":{"message":"Initializing profiler…"},"panels/timeline/TimelinePanel.ts | JavascriptSamplingIsDisabled":{"message":"- JavaScript sampling is disabled"},"panels/timeline/TimelinePanel.ts | learnmore":{"message":"Learn more"},"panels/timeline/TimelinePanel.ts | loadingProfile":{"message":"Loading profile…"},"panels/timeline/TimelinePanel.ts | loadProfile":{"message":"Load profile…"},"panels/timeline/TimelinePanel.ts | memory":{"message":"Memory"},"panels/timeline/TimelinePanel.ts | network":{"message":"Network:"},"panels/timeline/TimelinePanel.ts | networkConditions":{"message":"Network conditions"},"panels/timeline/TimelinePanel.ts | NetworkThrottlingIsEnabled":{"message":"- Network throttling is enabled"},"panels/timeline/TimelinePanel.ts | processingProfile":{"message":"Processing profile…"},"panels/timeline/TimelinePanel.ts | profiling":{"message":"Profiling…"},"panels/timeline/TimelinePanel.ts | received":{"message":"Received"},"panels/timeline/TimelinePanel.ts | recordingFailed":{"message":"Recording failed"},"panels/timeline/TimelinePanel.ts | saveProfile":{"message":"Save profile…"},"panels/timeline/TimelinePanel.ts | screenshots":{"message":"Screenshots"},"panels/timeline/TimelinePanel.ts | showMemoryTimeline":{"message":"Show memory timeline"},"panels/timeline/TimelinePanel.ts | SignificantOverheadDueToPaint":{"message":"- Significant overhead due to paint instrumentation"},"panels/timeline/TimelinePanel.ts | ssec":{"message":"{PH1} sec"},"panels/timeline/TimelinePanel.ts | status":{"message":"Status"},"panels/timeline/TimelinePanel.ts | stop":{"message":"Stop"},"panels/timeline/TimelinePanel.ts | stoppingTimeline":{"message":"Stopping timeline…"},"panels/timeline/TimelinePanel.ts | time":{"message":"Time"},"panels/timeline/TimelinePanel.ts | wasd":{"message":"WASD"},"panels/timeline/TimelineTreeView.ts | activity":{"message":"Activity"},"panels/timeline/TimelineTreeView.ts | chromeExtensionsOverhead":{"message":"[Chrome extensions overhead]"},"panels/timeline/TimelineTreeView.ts | filter":{"message":"Filter"},"panels/timeline/TimelineTreeView.ts | filterBottomup":{"message":"Filter bottom-up"},"panels/timeline/TimelineTreeView.ts | filterCallTree":{"message":"Filter call tree"},"panels/timeline/TimelineTreeView.ts | fms":{"message":"{PH1} ms"},"panels/timeline/TimelineTreeView.ts | groupBy":{"message":"Group by"},"panels/timeline/TimelineTreeView.ts | groupByActivity":{"message":"Group by Activity"},"panels/timeline/TimelineTreeView.ts | groupByCategory":{"message":"Group by Category"},"panels/timeline/TimelineTreeView.ts | groupByDomain":{"message":"Group by Domain"},"panels/timeline/TimelineTreeView.ts | groupByFrame":{"message":"Group by Frame"},"panels/timeline/TimelineTreeView.ts | groupBySubdomain":{"message":"Group by Subdomain"},"panels/timeline/TimelineTreeView.ts | groupByUrl":{"message":"Group by URL"},"panels/timeline/TimelineTreeView.ts | heaviestStack":{"message":"Heaviest stack"},"panels/timeline/TimelineTreeView.ts | heaviestStackHidden":{"message":"Heaviest stack sidebar hidden"},"panels/timeline/TimelineTreeView.ts | heaviestStackShown":{"message":"Heaviest stack sidebar shown"},"panels/timeline/TimelineTreeView.ts | hideHeaviestStack":{"message":"Hide Heaviest stack"},"panels/timeline/TimelineTreeView.ts | javascript":{"message":"JavaScript"},"panels/timeline/TimelineTreeView.ts | noGrouping":{"message":"No Grouping"},"panels/timeline/TimelineTreeView.ts | notOptimizedS":{"message":"Not optimized: {PH1}"},"panels/timeline/TimelineTreeView.ts | page":{"message":"Page"},"panels/timeline/TimelineTreeView.ts | percentPlaceholder":{"message":"{PH1} %"},"panels/timeline/TimelineTreeView.ts | performance":{"message":"Performance"},"panels/timeline/TimelineTreeView.ts | selectItemForDetails":{"message":"Select item for details."},"panels/timeline/TimelineTreeView.ts | selfTime":{"message":"Self Time"},"panels/timeline/TimelineTreeView.ts | showHeaviestStack":{"message":"Show Heaviest stack"},"panels/timeline/TimelineTreeView.ts | timelineStack":{"message":"Timeline Stack"},"panels/timeline/TimelineTreeView.ts | totalTime":{"message":"Total Time"},"panels/timeline/TimelineTreeView.ts | unattributed":{"message":"[unattributed]"},"panels/timeline/TimelineTreeView.ts | vRuntime":{"message":"[V8 Runtime]"},"panels/timeline/TimelineUIUtils.ts | aggregatedTime":{"message":"Aggregated Time"},"panels/timeline/TimelineUIUtils.ts | allottedTime":{"message":"Allotted Time"},"panels/timeline/TimelineUIUtils.ts | animation":{"message":"Animation"},"panels/timeline/TimelineUIUtils.ts | animationFrameFired":{"message":"Animation Frame Fired"},"panels/timeline/TimelineUIUtils.ts | animationFrameRequested":{"message":"Animation Frame Requested"},"panels/timeline/TimelineUIUtils.ts | async":{"message":"Async"},"panels/timeline/TimelineUIUtils.ts | asyncTask":{"message":"Async Task"},"panels/timeline/TimelineUIUtils.ts | cachedWasmModule":{"message":"Cached Wasm Module"},"panels/timeline/TimelineUIUtils.ts | cacheModule":{"message":"Cache Module Code"},"panels/timeline/TimelineUIUtils.ts | cacheScript":{"message":"Cache Script Code"},"panels/timeline/TimelineUIUtils.ts | callbackFunction":{"message":"Callback Function"},"panels/timeline/TimelineUIUtils.ts | callbackId":{"message":"Callback ID"},"panels/timeline/TimelineUIUtils.ts | callStacks":{"message":"Call Stacks"},"panels/timeline/TimelineUIUtils.ts | cancelAnimationFrame":{"message":"Cancel Animation Frame"},"panels/timeline/TimelineUIUtils.ts | cancelIdleCallback":{"message":"Cancel Idle Callback"},"panels/timeline/TimelineUIUtils.ts | changedAttributeToSs":{"message":"(changed attribute to \"{PH1}\"{PH2})"},"panels/timeline/TimelineUIUtils.ts | changedClassToSs":{"message":"(changed class to \"{PH1}\"{PH2})"},"panels/timeline/TimelineUIUtils.ts | changedIdToSs":{"message":"(changed id to \"{PH1}\"{PH2})"},"panels/timeline/TimelineUIUtils.ts | changedPesudoToSs":{"message":"(changed pseudo to \"{PH1}\"{PH2})"},"panels/timeline/TimelineUIUtils.ts | changedSs":{"message":"(changed \"{PH1}\"{PH2})"},"panels/timeline/TimelineUIUtils.ts | collected":{"message":"Collected"},"panels/timeline/TimelineUIUtils.ts | commit":{"message":"Commit"},"panels/timeline/TimelineUIUtils.ts | compilationCacheSize":{"message":"Compilation cache size"},"panels/timeline/TimelineUIUtils.ts | compilationCacheStatus":{"message":"Compilation cache status"},"panels/timeline/TimelineUIUtils.ts | compile":{"message":"Compile"},"panels/timeline/TimelineUIUtils.ts | compileCode":{"message":"Compile Code"},"panels/timeline/TimelineUIUtils.ts | compiledWasmModule":{"message":"Compiled Wasm Module"},"panels/timeline/TimelineUIUtils.ts | compileModule":{"message":"Compile Module"},"panels/timeline/TimelineUIUtils.ts | compileScript":{"message":"Compile Script"},"panels/timeline/TimelineUIUtils.ts | compositeLayers":{"message":"Composite Layers"},"panels/timeline/TimelineUIUtils.ts | computeIntersections":{"message":"Compute Intersections"},"panels/timeline/TimelineUIUtils.ts | consoleTime":{"message":"Console Time"},"panels/timeline/TimelineUIUtils.ts | consumedCacheSize":{"message":"Consumed Cache Size"},"panels/timeline/TimelineUIUtils.ts | cpuTime":{"message":"CPU time"},"panels/timeline/TimelineUIUtils.ts | createWebsocket":{"message":"Create WebSocket"},"panels/timeline/TimelineUIUtils.ts | cumulativeLayoutShifts":{"message":"Cumulative Layout Shifts"},"panels/timeline/TimelineUIUtils.ts | cumulativeScore":{"message":"Cumulative Score"},"panels/timeline/TimelineUIUtils.ts | currentClusterId":{"message":"Current Cluster ID"},"panels/timeline/TimelineUIUtils.ts | currentClusterScore":{"message":"Current Cluster Score"},"panels/timeline/TimelineUIUtils.ts | decodedBody":{"message":"Decoded Body"},"panels/timeline/TimelineUIUtils.ts | decrypt":{"message":"Decrypt"},"panels/timeline/TimelineUIUtils.ts | decryptReply":{"message":"Decrypt Reply"},"panels/timeline/TimelineUIUtils.ts | deserializeCodeCache":{"message":"Deserialize Code Cache"},"panels/timeline/TimelineUIUtils.ts | destroyWebsocket":{"message":"Destroy WebSocket"},"panels/timeline/TimelineUIUtils.ts | details":{"message":"Details"},"panels/timeline/TimelineUIUtils.ts | digest":{"message":"Digest"},"panels/timeline/TimelineUIUtils.ts | digestReply":{"message":"Digest Reply"},"panels/timeline/TimelineUIUtils.ts | dimensions":{"message":"Dimensions"},"panels/timeline/TimelineUIUtils.ts | domcontentloadedEvent":{"message":"DOMContentLoaded Event"},"panels/timeline/TimelineUIUtils.ts | domGc":{"message":"DOM GC"},"panels/timeline/TimelineUIUtils.ts | drawFrame":{"message":"Draw Frame"},"panels/timeline/TimelineUIUtils.ts | duration":{"message":"Duration"},"panels/timeline/TimelineUIUtils.ts | eagerCompile":{"message":"Compiling all functions eagerly"},"panels/timeline/TimelineUIUtils.ts | elementsAffected":{"message":"Elements Affected"},"panels/timeline/TimelineUIUtils.ts | embedderCallback":{"message":"Embedder Callback"},"panels/timeline/TimelineUIUtils.ts | emptyPlaceholder":{"message":"{PH1}"},"panels/timeline/TimelineUIUtils.ts | emptyPlaceholderColon":{"message":": {PH1}"},"panels/timeline/TimelineUIUtils.ts | encodedData":{"message":"Encoded Data"},"panels/timeline/TimelineUIUtils.ts | encrypt":{"message":"Encrypt"},"panels/timeline/TimelineUIUtils.ts | encryptReply":{"message":"Encrypt Reply"},"panels/timeline/TimelineUIUtils.ts | evaluateModule":{"message":"Evaluate Module"},"panels/timeline/TimelineUIUtils.ts | evaluateScript":{"message":"Evaluate Script"},"panels/timeline/TimelineUIUtils.ts | event":{"message":"Event"},"panels/timeline/TimelineUIUtils.ts | eventTiming":{"message":"Event Timing"},"panels/timeline/TimelineUIUtils.ts | evolvedClsLink":{"message":"evolved"},"panels/timeline/TimelineUIUtils.ts | experience":{"message":"Experience"},"panels/timeline/TimelineUIUtils.ts | failedToLoadScriptFromCache":{"message":"failed to load script from cache"},"panels/timeline/TimelineUIUtils.ts | finishLoading":{"message":"Finish Loading"},"panels/timeline/TimelineUIUtils.ts | fireIdleCallback":{"message":"Fire Idle Callback"},"panels/timeline/TimelineUIUtils.ts | firstContentfulPaint":{"message":"First Contentful Paint"},"panels/timeline/TimelineUIUtils.ts | firstInvalidated":{"message":"First Invalidated"},"panels/timeline/TimelineUIUtils.ts | firstLayoutInvalidation":{"message":"First Layout Invalidation"},"panels/timeline/TimelineUIUtils.ts | firstPaint":{"message":"First Paint"},"panels/timeline/TimelineUIUtils.ts | forcedReflow":{"message":"Forced reflow"},"panels/timeline/TimelineUIUtils.ts | frame":{"message":"Frame"},"panels/timeline/TimelineUIUtils.ts | frameStart":{"message":"Frame Start"},"panels/timeline/TimelineUIUtils.ts | frameStartedLoading":{"message":"Frame Started Loading"},"panels/timeline/TimelineUIUtils.ts | frameStartMainThread":{"message":"Frame Start (main thread)"},"panels/timeline/TimelineUIUtils.ts | FromCache":{"message":" (from cache)"},"panels/timeline/TimelineUIUtils.ts | FromMemoryCache":{"message":" (from memory cache)"},"panels/timeline/TimelineUIUtils.ts | FromPush":{"message":" (from push)"},"panels/timeline/TimelineUIUtils.ts | FromServiceWorker":{"message":" (from service worker)"},"panels/timeline/TimelineUIUtils.ts | function":{"message":"Function"},"panels/timeline/TimelineUIUtils.ts | functionCall":{"message":"Function Call"},"panels/timeline/TimelineUIUtils.ts | gcEvent":{"message":"GC Event"},"panels/timeline/TimelineUIUtils.ts | gpu":{"message":"GPU"},"panels/timeline/TimelineUIUtils.ts | hadRecentInput":{"message":"Had recent input"},"panels/timeline/TimelineUIUtils.ts | handlerTookS":{"message":"Handler took {PH1}"},"panels/timeline/TimelineUIUtils.ts | hitTest":{"message":"Hit Test"},"panels/timeline/TimelineUIUtils.ts | idle":{"message":"Idle"},"panels/timeline/TimelineUIUtils.ts | idleCallbackExecutionExtended":{"message":"Idle callback execution extended beyond deadline by {PH1}"},"panels/timeline/TimelineUIUtils.ts | idleCallbackRequested":{"message":"Idle Callback Requested"},"panels/timeline/TimelineUIUtils.ts | imageDecode":{"message":"Image Decode"},"panels/timeline/TimelineUIUtils.ts | imageResize":{"message":"Image Resize"},"panels/timeline/TimelineUIUtils.ts | imageUrl":{"message":"Image URL"},"panels/timeline/TimelineUIUtils.ts | initiator":{"message":"Initiator"},"panels/timeline/TimelineUIUtils.ts | installTimer":{"message":"Install Timer"},"panels/timeline/TimelineUIUtils.ts | interactionID":{"message":"ID"},"panels/timeline/TimelineUIUtils.ts | invalidateLayout":{"message":"Invalidate Layout"},"panels/timeline/TimelineUIUtils.ts | invalidations":{"message":"Invalidations"},"panels/timeline/TimelineUIUtils.ts | invokedByTimeout":{"message":"Invoked by Timeout"},"panels/timeline/TimelineUIUtils.ts | jank":{"message":"jank"},"panels/timeline/TimelineUIUtils.ts | jsFrame":{"message":"JS Frame"},"panels/timeline/TimelineUIUtils.ts | jsIdleFrame":{"message":"JS Idle Frame"},"panels/timeline/TimelineUIUtils.ts | jsRoot":{"message":"JS Root"},"panels/timeline/TimelineUIUtils.ts | jsSystemFrame":{"message":"JS System Frame"},"panels/timeline/TimelineUIUtils.ts | largestContentfulPaint":{"message":"Largest Contentful Paint"},"panels/timeline/TimelineUIUtils.ts | layerize":{"message":"Layerize"},"panels/timeline/TimelineUIUtils.ts | layerRoot":{"message":"Layer Root"},"panels/timeline/TimelineUIUtils.ts | layerTree":{"message":"Layer tree"},"panels/timeline/TimelineUIUtils.ts | layout":{"message":"Layout"},"panels/timeline/TimelineUIUtils.ts | layoutForced":{"message":"Layout Forced"},"panels/timeline/TimelineUIUtils.ts | layoutInvalidations":{"message":"Layout Invalidations"},"panels/timeline/TimelineUIUtils.ts | layoutRoot":{"message":"Layout root"},"panels/timeline/TimelineUIUtils.ts | layoutShift":{"message":"Layout Shift"},"panels/timeline/TimelineUIUtils.ts | learnMore":{"message":"Learn more"},"panels/timeline/TimelineUIUtils.ts | loadFromCache":{"message":"load from cache"},"panels/timeline/TimelineUIUtils.ts | loading":{"message":"Loading"},"panels/timeline/TimelineUIUtils.ts | location":{"message":"Location"},"panels/timeline/TimelineUIUtils.ts | longInteractionINP":{"message":"Long interaction"},"panels/timeline/TimelineUIUtils.ts | longTask":{"message":"Long task"},"panels/timeline/TimelineUIUtils.ts | majorGc":{"message":"Major GC"},"panels/timeline/TimelineUIUtils.ts | message":{"message":"Message"},"panels/timeline/TimelineUIUtils.ts | mimeType":{"message":"Mime Type"},"panels/timeline/TimelineUIUtils.ts | mimeTypeCaps":{"message":"MIME Type"},"panels/timeline/TimelineUIUtils.ts | minorGc":{"message":"Minor GC"},"panels/timeline/TimelineUIUtils.ts | module":{"message":"Module"},"panels/timeline/TimelineUIUtils.ts | movedFrom":{"message":"Moved from"},"panels/timeline/TimelineUIUtils.ts | movedTo":{"message":"Moved to"},"panels/timeline/TimelineUIUtils.ts | networkRequest":{"message":"Network request"},"panels/timeline/TimelineUIUtils.ts | networkTransfer":{"message":"network transfer"},"panels/timeline/TimelineUIUtils.ts | no":{"message":"No"},"panels/timeline/TimelineUIUtils.ts | node":{"message":"Node:"},"panels/timeline/TimelineUIUtils.ts | nodes":{"message":"Nodes:"},"panels/timeline/TimelineUIUtils.ts | nodesThatNeedLayout":{"message":"Nodes That Need Layout"},"panels/timeline/TimelineUIUtils.ts | notOptimized":{"message":"Not optimized"},"panels/timeline/TimelineUIUtils.ts | onloadEvent":{"message":"Onload Event"},"panels/timeline/TimelineUIUtils.ts | optimizeCode":{"message":"Optimize Code"},"panels/timeline/TimelineUIUtils.ts | other":{"message":"Other"},"panels/timeline/TimelineUIUtils.ts | otherInvalidations":{"message":"Other Invalidations"},"panels/timeline/TimelineUIUtils.ts | ownerElement":{"message":"Owner Element"},"panels/timeline/TimelineUIUtils.ts | paint":{"message":"Paint"},"panels/timeline/TimelineUIUtils.ts | paintImage":{"message":"Paint Image"},"panels/timeline/TimelineUIUtils.ts | painting":{"message":"Painting"},"panels/timeline/TimelineUIUtils.ts | paintProfiler":{"message":"Paint Profiler"},"panels/timeline/TimelineUIUtils.ts | paintSetup":{"message":"Paint Setup"},"panels/timeline/TimelineUIUtils.ts | parse":{"message":"Parse"},"panels/timeline/TimelineUIUtils.ts | parseAndCompile":{"message":"Parse and Compile"},"panels/timeline/TimelineUIUtils.ts | parseHtml":{"message":"Parse HTML"},"panels/timeline/TimelineUIUtils.ts | parseStylesheet":{"message":"Parse Stylesheet"},"panels/timeline/TimelineUIUtils.ts | pendingFor":{"message":"Pending for"},"panels/timeline/TimelineUIUtils.ts | prePaint":{"message":"Pre-Paint"},"panels/timeline/TimelineUIUtils.ts | preview":{"message":"Preview"},"panels/timeline/TimelineUIUtils.ts | priority":{"message":"Priority"},"panels/timeline/TimelineUIUtils.ts | producedCacheSize":{"message":"Produced Cache Size"},"panels/timeline/TimelineUIUtils.ts | profilingOverhead":{"message":"Profiling Overhead"},"panels/timeline/TimelineUIUtils.ts | range":{"message":"Range"},"panels/timeline/TimelineUIUtils.ts | rasterizePaint":{"message":"Rasterize Paint"},"panels/timeline/TimelineUIUtils.ts | recalculateStyle":{"message":"Recalculate Style"},"panels/timeline/TimelineUIUtils.ts | recalculationForced":{"message":"Recalculation Forced"},"panels/timeline/TimelineUIUtils.ts | receiveData":{"message":"Receive Data"},"panels/timeline/TimelineUIUtils.ts | receiveResponse":{"message":"Receive Response"},"panels/timeline/TimelineUIUtils.ts | receiveWebsocketHandshake":{"message":"Receive WebSocket Handshake"},"panels/timeline/TimelineUIUtils.ts | recurringHandlerTookS":{"message":"Recurring handler took {PH1}"},"panels/timeline/TimelineUIUtils.ts | relatedNode":{"message":"Related Node"},"panels/timeline/TimelineUIUtils.ts | removeTimer":{"message":"Remove Timer"},"panels/timeline/TimelineUIUtils.ts | rendering":{"message":"Rendering"},"panels/timeline/TimelineUIUtils.ts | repeats":{"message":"Repeats"},"panels/timeline/TimelineUIUtils.ts | requestAnimationFrame":{"message":"Request Animation Frame"},"panels/timeline/TimelineUIUtils.ts | requestIdleCallback":{"message":"Request Idle Callback"},"panels/timeline/TimelineUIUtils.ts | requestMainThreadFrame":{"message":"Request Main Thread Frame"},"panels/timeline/TimelineUIUtils.ts | requestMethod":{"message":"Request Method"},"panels/timeline/TimelineUIUtils.ts | resource":{"message":"Resource"},"panels/timeline/TimelineUIUtils.ts | reveal":{"message":"Reveal"},"panels/timeline/TimelineUIUtils.ts | runMicrotasks":{"message":"Run Microtasks"},"panels/timeline/TimelineUIUtils.ts | sAndS":{"message":"{PH1} and {PH2}"},"panels/timeline/TimelineUIUtils.ts | sAndSOther":{"message":"{PH1}, {PH2}, and 1 other"},"panels/timeline/TimelineUIUtils.ts | sAtS":{"message":"{PH1} at {PH2}"},"panels/timeline/TimelineUIUtils.ts | sAtSParentheses":{"message":"{PH1} (at {PH2})"},"panels/timeline/TimelineUIUtils.ts | sBytes":{"message":"{n, plural, =1 {# Byte} other {# Bytes}}"},"panels/timeline/TimelineUIUtils.ts | scheduleStyleRecalculation":{"message":"Schedule Style Recalculation"},"panels/timeline/TimelineUIUtils.ts | sChildren":{"message":"{PH1} (children)"},"panels/timeline/TimelineUIUtils.ts | sCLSInformation":{"message":"{PH1} can result in poor user experiences. It has recently {PH2}."},"panels/timeline/TimelineUIUtils.ts | sCollected":{"message":"{PH1} collected"},"panels/timeline/TimelineUIUtils.ts | score":{"message":"Score"},"panels/timeline/TimelineUIUtils.ts | script":{"message":"Script"},"panels/timeline/TimelineUIUtils.ts | scripting":{"message":"Scripting"},"panels/timeline/TimelineUIUtils.ts | scriptLoadedFromCache":{"message":"script loaded from cache"},"panels/timeline/TimelineUIUtils.ts | scriptNotEligible":{"message":"script not eligible"},"panels/timeline/TimelineUIUtils.ts | scroll":{"message":"Scroll"},"panels/timeline/TimelineUIUtils.ts | selfTime":{"message":"Self Time"},"panels/timeline/TimelineUIUtils.ts | sendRequest":{"message":"Send Request"},"panels/timeline/TimelineUIUtils.ts | sendWebsocketHandshake":{"message":"Send WebSocket Handshake"},"panels/timeline/TimelineUIUtils.ts | sForS":{"message":"{PH1} for {PH2}"},"panels/timeline/TimelineUIUtils.ts | show":{"message":"Show"},"panels/timeline/TimelineUIUtils.ts | sign":{"message":"Sign"},"panels/timeline/TimelineUIUtils.ts | signReply":{"message":"Sign Reply"},"panels/timeline/TimelineUIUtils.ts | sIsALikelyPerformanceBottleneck":{"message":"{PH1} is a likely performance bottleneck."},"panels/timeline/TimelineUIUtils.ts | sIsLikelyPoorPageResponsiveness":{"message":"{PH1} is indicating poor page responsiveness."},"panels/timeline/TimelineUIUtils.ts | size":{"message":"Size"},"panels/timeline/TimelineUIUtils.ts | sLongFrameTimesAreAnIndicationOf":{"message":"{PH1}. Long frame times are an indication of {PH2}"},"panels/timeline/TimelineUIUtils.ts | sOfS":{"message":"{PH1} of {PH2}"},"panels/timeline/TimelineUIUtils.ts | sS":{"message":"{PH1}: {PH2}"},"panels/timeline/TimelineUIUtils.ts | sSAndSOthers":{"message":"{PH1}, {PH2}, and {PH3} others"},"panels/timeline/TimelineUIUtils.ts | sSCurlyBrackets":{"message":"({PH1}, {PH2})"},"panels/timeline/TimelineUIUtils.ts | sSDimensions":{"message":"{PH1} × {PH2}"},"panels/timeline/TimelineUIUtils.ts | sSDot":{"message":"{PH1}. {PH2}"},"panels/timeline/TimelineUIUtils.ts | sSelf":{"message":"{PH1} (self)"},"panels/timeline/TimelineUIUtils.ts | sSs":{"message":"{PH1} [{PH2}…{PH3}]"},"panels/timeline/TimelineUIUtils.ts | sSSquareBrackets":{"message":"{PH1} [{PH2}…]"},"panels/timeline/TimelineUIUtils.ts | SSSResourceLoading":{"message":" ({PH1} {PH2} + {PH3} resource loading)"},"panels/timeline/TimelineUIUtils.ts | stackTrace":{"message":"Stack Trace"},"panels/timeline/TimelineUIUtils.ts | stackTraceColon":{"message":"Stack trace:"},"panels/timeline/TimelineUIUtils.ts | state":{"message":"State"},"panels/timeline/TimelineUIUtils.ts | statusCode":{"message":"Status Code"},"panels/timeline/TimelineUIUtils.ts | sTookS":{"message":"{PH1} took {PH2}."},"panels/timeline/TimelineUIUtils.ts | streamed":{"message":"Streamed"},"panels/timeline/TimelineUIUtils.ts | streamingCompileTask":{"message":"Streaming Compile Task"},"panels/timeline/TimelineUIUtils.ts | streamingWasmResponse":{"message":"Streaming Wasm Response"},"panels/timeline/TimelineUIUtils.ts | styleInvalidations":{"message":"Style Invalidations"},"panels/timeline/TimelineUIUtils.ts | stylesheetUrl":{"message":"Stylesheet URL"},"panels/timeline/TimelineUIUtils.ts | system":{"message":"System"},"panels/timeline/TimelineUIUtils.ts | task":{"message":"Task"},"panels/timeline/TimelineUIUtils.ts | timeout":{"message":"Timeout"},"panels/timeline/TimelineUIUtils.ts | timerFired":{"message":"Timer Fired"},"panels/timeline/TimelineUIUtils.ts | timerId":{"message":"Timer ID"},"panels/timeline/TimelineUIUtils.ts | timerInstalled":{"message":"Timer Installed"},"panels/timeline/TimelineUIUtils.ts | timeSpentInRendering":{"message":"Time spent in rendering"},"panels/timeline/TimelineUIUtils.ts | timestamp":{"message":"Timestamp"},"panels/timeline/TimelineUIUtils.ts | totalTime":{"message":"Total Time"},"panels/timeline/TimelineUIUtils.ts | type":{"message":"Type"},"panels/timeline/TimelineUIUtils.ts | unknown":{"message":"unknown"},"panels/timeline/TimelineUIUtils.ts | unknownCause":{"message":"Unknown cause"},"panels/timeline/TimelineUIUtils.ts | UnknownNode":{"message":"[ unknown node ]"},"panels/timeline/TimelineUIUtils.ts | updateLayer":{"message":"Update Layer"},"panels/timeline/TimelineUIUtils.ts | updateLayerTree":{"message":"Update Layer Tree"},"panels/timeline/TimelineUIUtils.ts | url":{"message":"Url"},"panels/timeline/TimelineUIUtils.ts | userTiming":{"message":"User Timing"},"panels/timeline/TimelineUIUtils.ts | verify":{"message":"Verify"},"panels/timeline/TimelineUIUtils.ts | verifyReply":{"message":"Verify Reply"},"panels/timeline/TimelineUIUtils.ts | waitingForNetwork":{"message":"Waiting for Network"},"panels/timeline/TimelineUIUtils.ts | warning":{"message":"Warning"},"panels/timeline/TimelineUIUtils.ts | wasmModuleCacheHit":{"message":"Wasm Module Cache Hit"},"panels/timeline/TimelineUIUtils.ts | wasmModuleCacheInvalid":{"message":"Wasm Module Cache Invalid"},"panels/timeline/TimelineUIUtils.ts | websocketProtocol":{"message":"WebSocket Protocol"},"panels/timeline/TimelineUIUtils.ts | willSendRequest":{"message":"Will Send Request"},"panels/timeline/TimelineUIUtils.ts | xhrLoad":{"message":"XHR Load"},"panels/timeline/TimelineUIUtils.ts | xhrReadyStateChange":{"message":"XHR Ready State Change"},"panels/timeline/TimelineUIUtils.ts | yes":{"message":"Yes"},"panels/timeline/TimingsTrackAppender.ts | timings":{"message":"Timings"},"panels/timeline/UIDevtoolsUtils.ts | drawFrame":{"message":"Draw Frame"},"panels/timeline/UIDevtoolsUtils.ts | drawing":{"message":"Drawing"},"panels/timeline/UIDevtoolsUtils.ts | frameStart":{"message":"Frame Start"},"panels/timeline/UIDevtoolsUtils.ts | idle":{"message":"Idle"},"panels/timeline/UIDevtoolsUtils.ts | layout":{"message":"Layout"},"panels/timeline/UIDevtoolsUtils.ts | painting":{"message":"Painting"},"panels/timeline/UIDevtoolsUtils.ts | rasterizing":{"message":"Rasterizing"},"panels/timeline/UIDevtoolsUtils.ts | system":{"message":"System"},"panels/web_audio/AudioContextContentBuilder.ts | callbackBufferSize":{"message":"Callback Buffer Size"},"panels/web_audio/AudioContextContentBuilder.ts | callbackInterval":{"message":"Callback Interval"},"panels/web_audio/AudioContextContentBuilder.ts | currentTime":{"message":"Current Time"},"panels/web_audio/AudioContextContentBuilder.ts | maxOutputChannels":{"message":"Max Output Channels"},"panels/web_audio/AudioContextContentBuilder.ts | renderCapacity":{"message":"Render Capacity"},"panels/web_audio/AudioContextContentBuilder.ts | sampleRate":{"message":"Sample Rate"},"panels/web_audio/AudioContextContentBuilder.ts | state":{"message":"State"},"panels/web_audio/AudioContextSelector.ts | audioContextS":{"message":"Audio context: {PH1}"},"panels/web_audio/AudioContextSelector.ts | noRecordings":{"message":"(no recordings)"},"panels/web_audio/web_audio-meta.ts | audio":{"message":"audio"},"panels/web_audio/web_audio-meta.ts | showWebaudio":{"message":"Show WebAudio"},"panels/web_audio/web_audio-meta.ts | webaudio":{"message":"WebAudio"},"panels/web_audio/WebAudioView.ts | openAPageThatUsesWebAudioApiTo":{"message":"Open a page that uses Web Audio API to start monitoring."},"panels/webauthn/webauthn-meta.ts | showWebauthn":{"message":"Show WebAuthn"},"panels/webauthn/webauthn-meta.ts | webauthn":{"message":"WebAuthn"},"panels/webauthn/WebauthnPane.ts | actions":{"message":"Actions"},"panels/webauthn/WebauthnPane.ts | active":{"message":"Active"},"panels/webauthn/WebauthnPane.ts | add":{"message":"Add"},"panels/webauthn/WebauthnPane.ts | addAuthenticator":{"message":"Add authenticator"},"panels/webauthn/WebauthnPane.ts | authenticatorS":{"message":"Authenticator {PH1}"},"panels/webauthn/WebauthnPane.ts | credentials":{"message":"Credentials"},"panels/webauthn/WebauthnPane.ts | editName":{"message":"Edit name"},"panels/webauthn/WebauthnPane.ts | enableVirtualAuthenticator":{"message":"Enable virtual authenticator environment"},"panels/webauthn/WebauthnPane.ts | export":{"message":"Export"},"panels/webauthn/WebauthnPane.ts | id":{"message":"ID"},"panels/webauthn/WebauthnPane.ts | isResident":{"message":"Is Resident"},"panels/webauthn/WebauthnPane.ts | learnMore":{"message":"Learn more"},"panels/webauthn/WebauthnPane.ts | newAuthenticator":{"message":"New authenticator"},"panels/webauthn/WebauthnPane.ts | no":{"message":"No"},"panels/webauthn/WebauthnPane.ts | noCredentialsTryCallingSFromYour":{"message":"No credentials. Try calling {PH1} from your website."},"panels/webauthn/WebauthnPane.ts | privateKeypem":{"message":"Private key.pem"},"panels/webauthn/WebauthnPane.ts | protocol":{"message":"Protocol"},"panels/webauthn/WebauthnPane.ts | remove":{"message":"Remove"},"panels/webauthn/WebauthnPane.ts | rpId":{"message":"RP ID"},"panels/webauthn/WebauthnPane.ts | saveName":{"message":"Save name"},"panels/webauthn/WebauthnPane.ts | setSAsTheActiveAuthenticator":{"message":"Set {PH1} as the active authenticator"},"panels/webauthn/WebauthnPane.ts | signCount":{"message":"Signature Count"},"panels/webauthn/WebauthnPane.ts | supportsLargeBlob":{"message":"Supports large blob"},"panels/webauthn/WebauthnPane.ts | supportsResidentKeys":{"message":"Supports resident keys"},"panels/webauthn/WebauthnPane.ts | supportsUserVerification":{"message":"Supports user verification"},"panels/webauthn/WebauthnPane.ts | transport":{"message":"Transport"},"panels/webauthn/WebauthnPane.ts | userHandle":{"message":"User Handle"},"panels/webauthn/WebauthnPane.ts | useWebauthnForPhishingresistant":{"message":"Use WebAuthn for phishing-resistant authentication"},"panels/webauthn/WebauthnPane.ts | uuid":{"message":"UUID"},"panels/webauthn/WebauthnPane.ts | yes":{"message":"Yes"},"ui/components/data_grid/DataGrid.ts | enterToSort":{"message":"Column sort state: {PH1}. Press enter to apply sorting filter"},"ui/components/data_grid/DataGrid.ts | headerOptions":{"message":"Header Options"},"ui/components/data_grid/DataGrid.ts | resetColumns":{"message":"Reset Columns"},"ui/components/data_grid/DataGrid.ts | sortAsc":{"message":"ascending"},"ui/components/data_grid/DataGrid.ts | sortBy":{"message":"Sort By"},"ui/components/data_grid/DataGrid.ts | sortDesc":{"message":"descending"},"ui/components/data_grid/DataGrid.ts | sortNone":{"message":"none"},"ui/components/data_grid/DataGridController.ts | sortInAscendingOrder":{"message":"{PH1} sorted in ascending order"},"ui/components/data_grid/DataGridController.ts | sortInDescendingOrder":{"message":"{PH1} sorted in descending order"},"ui/components/data_grid/DataGridController.ts | sortingCanceled":{"message":"{PH1} sorting canceled"},"ui/components/dialogs/ShortcutDialog.ts | close":{"message":"Close"},"ui/components/dialogs/ShortcutDialog.ts | dialogTitle":{"message":"Keyboard shortcuts"},"ui/components/dialogs/ShortcutDialog.ts | showShortcutTitle":{"message":"Show shortcuts"},"ui/components/diff_view/DiffView.ts | additions":{"message":"Addition:"},"ui/components/diff_view/DiffView.ts | changesDiffViewer":{"message":"Changes diff viewer"},"ui/components/diff_view/DiffView.ts | deletions":{"message":"Deletion:"},"ui/components/diff_view/DiffView.ts | SkippingDMatchingLines":{"message":"( … Skipping {PH1} matching lines … )"},"ui/components/issue_counter/IssueCounter.ts | breakingChanges":{"message":"{issueCount, plural, =1 {# breaking change} other {# breaking changes}}"},"ui/components/issue_counter/IssueCounter.ts | pageErrors":{"message":"{issueCount, plural, =1 {# page error} other {# page errors}}"},"ui/components/issue_counter/IssueCounter.ts | possibleImprovements":{"message":"{issueCount, plural, =1 {# possible improvement} other {# possible improvements}}"},"ui/components/issue_counter/IssueLinkIcon.ts | clickToShowIssue":{"message":"Click to show issue in the issues tab"},"ui/components/issue_counter/IssueLinkIcon.ts | clickToShowIssueWithTitle":{"message":"Click to open the issue tab and show issue: {title}"},"ui/components/issue_counter/IssueLinkIcon.ts | issueUnavailable":{"message":"Issue unavailable at this time"},"ui/components/linear_memory_inspector/linear_memory_inspector-meta.ts | memoryInspector":{"message":"Memory Inspector"},"ui/components/linear_memory_inspector/linear_memory_inspector-meta.ts | showMemoryInspector":{"message":"Show Memory Inspector"},"ui/components/linear_memory_inspector/LinearMemoryHighlightChipList.ts | deleteHighlight":{"message":"Stop highlighting this memory"},"ui/components/linear_memory_inspector/LinearMemoryHighlightChipList.ts | jumpToAddress":{"message":"Jump to this memory"},"ui/components/linear_memory_inspector/LinearMemoryInspector.ts | addressHasToBeANumberBetweenSAnd":{"message":"Address has to be a number between {PH1} and {PH2}"},"ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts | couldNotOpenLinearMemory":{"message":"Could not open linear memory inspector: failed locating buffer."},"ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts | noOpenInspections":{"message":"No open inspections"},"ui/components/linear_memory_inspector/LinearMemoryNavigator.ts | enterAddress":{"message":"Enter address"},"ui/components/linear_memory_inspector/LinearMemoryNavigator.ts | goBackInAddressHistory":{"message":"Go back in address history"},"ui/components/linear_memory_inspector/LinearMemoryNavigator.ts | goForwardInAddressHistory":{"message":"Go forward in address history"},"ui/components/linear_memory_inspector/LinearMemoryNavigator.ts | nextPage":{"message":"Next page"},"ui/components/linear_memory_inspector/LinearMemoryNavigator.ts | previousPage":{"message":"Previous page"},"ui/components/linear_memory_inspector/LinearMemoryNavigator.ts | refresh":{"message":"Refresh"},"ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.ts | changeEndianness":{"message":"Change Endianness"},"ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.ts | toggleValueTypeSettings":{"message":"Toggle value type settings"},"ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts | addressOutOfRange":{"message":"Address out of memory range"},"ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts | changeValueTypeMode":{"message":"Change mode"},"ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts | jumpToPointer":{"message":"Jump to address"},"ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts | signedValue":{"message":"Signed value"},"ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts | unsignedValue":{"message":"Unsigned value"},"ui/components/linear_memory_inspector/ValueInterpreterDisplayUtils.ts | notApplicable":{"message":"N/A"},"ui/components/linear_memory_inspector/ValueInterpreterSettings.ts | otherGroup":{"message":"Other"},"ui/components/panel_feedback/FeedbackButton.ts | feedback":{"message":"Feedback"},"ui/components/panel_feedback/PanelFeedback.ts | previewFeature":{"message":"Preview feature"},"ui/components/panel_feedback/PanelFeedback.ts | previewText":{"message":"Our team is actively working on this feature and we would love to know what you think."},"ui/components/panel_feedback/PanelFeedback.ts | previewTextFeedbackLink":{"message":"Send us your feedback."},"ui/components/panel_feedback/PanelFeedback.ts | videoAndDocumentation":{"message":"Video and documentation"},"ui/components/panel_feedback/PreviewToggle.ts | learnMoreLink":{"message":"Learn More"},"ui/components/panel_feedback/PreviewToggle.ts | previewTextFeedbackLink":{"message":"Send us your feedback."},"ui/components/panel_feedback/PreviewToggle.ts | shortFeedbackLink":{"message":"Send feedback"},"ui/components/request_link_icon/RequestLinkIcon.ts | clickToShowRequestInTheNetwork":{"message":"Click to open the network panel and show request for URL: {url}"},"ui/components/request_link_icon/RequestLinkIcon.ts | requestUnavailableInTheNetwork":{"message":"Request unavailable in the network panel, try reloading the inspected page"},"ui/components/request_link_icon/RequestLinkIcon.ts | shortenedURL":{"message":"Shortened URL"},"ui/components/survey_link/SurveyLink.ts | anErrorOccurredWithTheSurvey":{"message":"An error occurred with the survey"},"ui/components/survey_link/SurveyLink.ts | openingSurvey":{"message":"Opening survey …"},"ui/components/survey_link/SurveyLink.ts | thankYouForYourFeedback":{"message":"Thank you for your feedback"},"ui/components/text_editor/config.ts | codeEditor":{"message":"Code editor"},"ui/components/text_editor/config.ts | sSuggestionSOfS":{"message":"{PH1}, suggestion {PH2} of {PH3}"},"ui/legacy/ActionRegistration.ts | background_services":{"message":"Background Services"},"ui/legacy/ActionRegistration.ts | console":{"message":"Console"},"ui/legacy/ActionRegistration.ts | debugger":{"message":"Debugger"},"ui/legacy/ActionRegistration.ts | drawer":{"message":"Drawer"},"ui/legacy/ActionRegistration.ts | elements":{"message":"Elements"},"ui/legacy/ActionRegistration.ts | global":{"message":"Global"},"ui/legacy/ActionRegistration.ts | help":{"message":"Help"},"ui/legacy/ActionRegistration.ts | javascript_profiler":{"message":"JavaScript Profiler"},"ui/legacy/ActionRegistration.ts | layers":{"message":"Layers"},"ui/legacy/ActionRegistration.ts | memory":{"message":"Memory"},"ui/legacy/ActionRegistration.ts | mobile":{"message":"Mobile"},"ui/legacy/ActionRegistration.ts | navigation":{"message":"Navigation"},"ui/legacy/ActionRegistration.ts | network":{"message":"Network"},"ui/legacy/ActionRegistration.ts | performance":{"message":"Performance"},"ui/legacy/ActionRegistration.ts | rendering":{"message":"Rendering"},"ui/legacy/ActionRegistration.ts | resources":{"message":"Resources"},"ui/legacy/ActionRegistration.ts | screenshot":{"message":"Screenshot"},"ui/legacy/ActionRegistration.ts | settings":{"message":"Settings"},"ui/legacy/ActionRegistration.ts | sources":{"message":"Sources"},"ui/legacy/components/color_picker/ContrastDetails.ts | aa":{"message":"AA"},"ui/legacy/components/color_picker/ContrastDetails.ts | aaa":{"message":"AAA"},"ui/legacy/components/color_picker/ContrastDetails.ts | apca":{"message":"APCA"},"ui/legacy/components/color_picker/ContrastDetails.ts | contrastRatio":{"message":"Contrast ratio"},"ui/legacy/components/color_picker/ContrastDetails.ts | noContrastInformationAvailable":{"message":"No contrast information available"},"ui/legacy/components/color_picker/ContrastDetails.ts | pickBackgroundColor":{"message":"Pick background color"},"ui/legacy/components/color_picker/ContrastDetails.ts | placeholderWithColon":{"message":": {PH1}"},"ui/legacy/components/color_picker/ContrastDetails.ts | showLess":{"message":"Show less"},"ui/legacy/components/color_picker/ContrastDetails.ts | showMore":{"message":"Show more"},"ui/legacy/components/color_picker/ContrastDetails.ts | toggleBackgroundColorPicker":{"message":"Toggle background color picker"},"ui/legacy/components/color_picker/ContrastDetails.ts | useSuggestedColorStoFixLow":{"message":"Use suggested color {PH1}to fix low contrast"},"ui/legacy/components/color_picker/FormatPickerContextMenu.ts | colorClippedTooltipText":{"message":"This color was clipped to match the format's gamut. The actual result was {PH1}"},"ui/legacy/components/color_picker/Spectrum.ts | addToPalette":{"message":"Add to palette"},"ui/legacy/components/color_picker/Spectrum.ts | changeAlpha":{"message":"Change alpha"},"ui/legacy/components/color_picker/Spectrum.ts | changeColorFormat":{"message":"Change color format"},"ui/legacy/components/color_picker/Spectrum.ts | changeHue":{"message":"Change hue"},"ui/legacy/components/color_picker/Spectrum.ts | clearPalette":{"message":"Clear palette"},"ui/legacy/components/color_picker/Spectrum.ts | colorPalettes":{"message":"Color Palettes"},"ui/legacy/components/color_picker/Spectrum.ts | colorS":{"message":"Color {PH1}"},"ui/legacy/components/color_picker/Spectrum.ts | copyColorToClipboard":{"message":"Copy color to clipboard"},"ui/legacy/components/color_picker/Spectrum.ts | hex":{"message":"HEX"},"ui/legacy/components/color_picker/Spectrum.ts | longclickOrLongpressSpaceToShow":{"message":"Long-click or long-press space to show alternate shades of {PH1}"},"ui/legacy/components/color_picker/Spectrum.ts | pressArrowKeysMessage":{"message":"Press arrow keys with or without modifiers to move swatch position. Arrow key with Shift key moves position largely, with Ctrl key it is less and with Alt key it is even less"},"ui/legacy/components/color_picker/Spectrum.ts | previewPalettes":{"message":"Preview palettes"},"ui/legacy/components/color_picker/Spectrum.ts | removeAllToTheRight":{"message":"Remove all to the right"},"ui/legacy/components/color_picker/Spectrum.ts | removeColor":{"message":"Remove color"},"ui/legacy/components/color_picker/Spectrum.ts | returnToColorPicker":{"message":"Return to color picker"},"ui/legacy/components/color_picker/Spectrum.ts | sInS":{"message":"{PH1} in {PH2}"},"ui/legacy/components/color_picker/Spectrum.ts | toggleColorPicker":{"message":"Eye dropper [{PH1}]"},"ui/legacy/components/cookie_table/CookiesTable.ts | cookies":{"message":"Cookies"},"ui/legacy/components/cookie_table/CookiesTable.ts | editableCookies":{"message":"Editable Cookies"},"ui/legacy/components/cookie_table/CookiesTable.ts | na":{"message":"N/A"},"ui/legacy/components/cookie_table/CookiesTable.ts | name":{"message":"Name"},"ui/legacy/components/cookie_table/CookiesTable.ts | opaquePartitionKey":{"message":"(opaque)"},"ui/legacy/components/cookie_table/CookiesTable.ts | session":{"message":"Session"},"ui/legacy/components/cookie_table/CookiesTable.ts | showIssueAssociatedWithThis":{"message":"Show issue associated with this cookie"},"ui/legacy/components/cookie_table/CookiesTable.ts | showRequestsWithThisCookie":{"message":"Show Requests With This Cookie"},"ui/legacy/components/cookie_table/CookiesTable.ts | size":{"message":"Size"},"ui/legacy/components/cookie_table/CookiesTable.ts | sourcePortTooltip":{"message":"Shows the source port (range 1-65535) the cookie was set on. If the port is unknown, this shows -1."},"ui/legacy/components/cookie_table/CookiesTable.ts | sourceSchemeTooltip":{"message":"Shows the source scheme (Secure, NonSecure) the cookie was set on. If the scheme is unknown, this shows Unset."},"ui/legacy/components/cookie_table/CookiesTable.ts | timeAfter":{"message":"after {date}"},"ui/legacy/components/cookie_table/CookiesTable.ts | timeAfterTooltip":{"message":"The expiration timestamp is {seconds}, which corresponds to a date after {date}"},"ui/legacy/components/cookie_table/CookiesTable.ts | value":{"message":"Value"},"ui/legacy/components/data_grid/DataGrid.ts | addNew":{"message":"Add new"},"ui/legacy/components/data_grid/DataGrid.ts | checked":{"message":"checked"},"ui/legacy/components/data_grid/DataGrid.ts | collapsed":{"message":"collapsed"},"ui/legacy/components/data_grid/DataGrid.ts | delete":{"message":"Delete"},"ui/legacy/components/data_grid/DataGrid.ts | editS":{"message":"Edit \"{PH1}\""},"ui/legacy/components/data_grid/DataGrid.ts | emptyRowCreated":{"message":"An empty table row has been created. You may double click or use context menu to edit."},"ui/legacy/components/data_grid/DataGrid.ts | expanded":{"message":"expanded"},"ui/legacy/components/data_grid/DataGrid.ts | headerOptions":{"message":"Header Options"},"ui/legacy/components/data_grid/DataGrid.ts | levelS":{"message":"level {PH1}"},"ui/legacy/components/data_grid/DataGrid.ts | refresh":{"message":"Refresh"},"ui/legacy/components/data_grid/DataGrid.ts | resetColumns":{"message":"Reset Columns"},"ui/legacy/components/data_grid/DataGrid.ts | rowsS":{"message":"Rows: {PH1}"},"ui/legacy/components/data_grid/DataGrid.ts | sortByString":{"message":"Sort By"},"ui/legacy/components/data_grid/DataGrid.ts | sRowS":{"message":"{PH1} Row {PH2}"},"ui/legacy/components/data_grid/DataGrid.ts | sSUseTheUpAndDownArrowKeysTo":{"message":"{PH1} {PH2}, use the up and down arrow keys to navigate and interact with the rows of the table; Use browse mode to read cell by cell."},"ui/legacy/components/data_grid/ShowMoreDataGridNode.ts | showAllD":{"message":"Show all {PH1}"},"ui/legacy/components/data_grid/ShowMoreDataGridNode.ts | showDAfter":{"message":"Show {PH1} after"},"ui/legacy/components/data_grid/ShowMoreDataGridNode.ts | showDBefore":{"message":"Show {PH1} before"},"ui/legacy/components/data_grid/ViewportDataGrid.ts | collapsed":{"message":"collapsed"},"ui/legacy/components/inline_editor/ColorSwatch.ts | shiftclickToChangeColorFormat":{"message":"Shift-click to change color format"},"ui/legacy/components/inline_editor/CSSShadowEditor.ts | blur":{"message":"Blur"},"ui/legacy/components/inline_editor/CSSShadowEditor.ts | spread":{"message":"Spread"},"ui/legacy/components/inline_editor/CSSShadowEditor.ts | type":{"message":"Type"},"ui/legacy/components/inline_editor/CSSShadowEditor.ts | xOffset":{"message":"X offset"},"ui/legacy/components/inline_editor/CSSShadowEditor.ts | yOffset":{"message":"Y offset"},"ui/legacy/components/inline_editor/FontEditor.ts | cssProperties":{"message":"CSS Properties"},"ui/legacy/components/inline_editor/FontEditor.ts | deleteS":{"message":"Delete {PH1}"},"ui/legacy/components/inline_editor/FontEditor.ts | fallbackS":{"message":"Fallback {PH1}"},"ui/legacy/components/inline_editor/FontEditor.ts | fontFamily":{"message":"Font Family"},"ui/legacy/components/inline_editor/FontEditor.ts | fontSelectorDeletedAtIndexS":{"message":"Font Selector deleted at index: {PH1}"},"ui/legacy/components/inline_editor/FontEditor.ts | fontSize":{"message":"Font Size"},"ui/legacy/components/inline_editor/FontEditor.ts | fontWeight":{"message":"Font Weight"},"ui/legacy/components/inline_editor/FontEditor.ts | lineHeight":{"message":"Line Height"},"ui/legacy/components/inline_editor/FontEditor.ts | PleaseEnterAValidValueForSText":{"message":"* Please enter a valid value for {PH1} text input"},"ui/legacy/components/inline_editor/FontEditor.ts | selectorInputMode":{"message":"Selector Input Mode"},"ui/legacy/components/inline_editor/FontEditor.ts | sKeyValueSelector":{"message":"{PH1} Key Value Selector"},"ui/legacy/components/inline_editor/FontEditor.ts | sliderInputMode":{"message":"Slider Input Mode"},"ui/legacy/components/inline_editor/FontEditor.ts | spacing":{"message":"Spacing"},"ui/legacy/components/inline_editor/FontEditor.ts | sSliderInput":{"message":"{PH1} Slider Input"},"ui/legacy/components/inline_editor/FontEditor.ts | sTextInput":{"message":"{PH1} Text Input"},"ui/legacy/components/inline_editor/FontEditor.ts | sToggleInputType":{"message":"{PH1} toggle input type"},"ui/legacy/components/inline_editor/FontEditor.ts | sUnitInput":{"message":"{PH1} Unit Input"},"ui/legacy/components/inline_editor/FontEditor.ts | thereIsNoValueToDeleteAtIndexS":{"message":"There is no value to delete at index: {PH1}"},"ui/legacy/components/inline_editor/FontEditor.ts | thisPropertyIsSetToContainUnits":{"message":"This property is set to contain units but does not have a defined corresponding unitsArray: {PH1}"},"ui/legacy/components/inline_editor/FontEditor.ts | units":{"message":"Units"},"ui/legacy/components/inline_editor/LinkSwatch.ts | sIsNotDefined":{"message":"{PH1} is not defined"},"ui/legacy/components/object_ui/CustomPreviewComponent.ts | showAsJavascriptObject":{"message":"Show as JavaScript object"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | collapseChildren":{"message":"Collapse children"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | copy":{"message":"Copy"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | copyPropertyPath":{"message":"Copy property path"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | copyValue":{"message":"Copy value"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | dots":{"message":"(...)"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | exceptionS":{"message":"[Exception: {PH1}]"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | expandRecursively":{"message":"Expand recursively"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | invokePropertyGetter":{"message":"Invoke property getter"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | longTextWasTruncatedS":{"message":"long text was truncated ({PH1})"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | noProperties":{"message":"No properties"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | revealInMemoryInpector":{"message":"Reveal in Memory Inspector panel"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | showAllD":{"message":"Show all {PH1}"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | showMoreS":{"message":"Show more ({PH1})"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | stringIsTooLargeToEdit":{"message":""},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | unknown":{"message":"unknown"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | valueNotAccessibleToTheDebugger":{"message":"Value is not accessible to the debugger"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | valueUnavailable":{"message":""},"ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts | empty":{"message":"empty"},"ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts | emptyD":{"message":"empty × {PH1}"},"ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts | thePropertyIsComputedWithAGetter":{"message":"The property is computed with a getter"},"ui/legacy/components/perf_ui/FilmStripView.ts | doubleclickToZoomImageClickTo":{"message":"Doubleclick to zoom image. Click to view preceding requests."},"ui/legacy/components/perf_ui/FilmStripView.ts | nextFrame":{"message":"Next frame"},"ui/legacy/components/perf_ui/FilmStripView.ts | previousFrame":{"message":"Previous frame"},"ui/legacy/components/perf_ui/FilmStripView.ts | screenshot":{"message":"Screenshot"},"ui/legacy/components/perf_ui/FilmStripView.ts | screenshotForSSelectToView":{"message":"Screenshot for {PH1} - select to view preceding requests."},"ui/legacy/components/perf_ui/FlameChart.ts | flameChart":{"message":"Flame Chart"},"ui/legacy/components/perf_ui/FlameChart.ts | sCollapsed":{"message":"{PH1} collapsed"},"ui/legacy/components/perf_ui/FlameChart.ts | sExpanded":{"message":"{PH1} expanded"},"ui/legacy/components/perf_ui/FlameChart.ts | sHovered":{"message":"{PH1} hovered"},"ui/legacy/components/perf_ui/FlameChart.ts | sSelected":{"message":"{PH1} selected"},"ui/legacy/components/perf_ui/NetworkPriorities.ts | high":{"message":"High"},"ui/legacy/components/perf_ui/NetworkPriorities.ts | highest":{"message":"Highest"},"ui/legacy/components/perf_ui/NetworkPriorities.ts | low":{"message":"Low"},"ui/legacy/components/perf_ui/NetworkPriorities.ts | lowest":{"message":"Lowest"},"ui/legacy/components/perf_ui/NetworkPriorities.ts | medium":{"message":"Medium"},"ui/legacy/components/perf_ui/OverviewGrid.ts | leftResizer":{"message":"Left Resizer"},"ui/legacy/components/perf_ui/OverviewGrid.ts | overviewGridWindow":{"message":"Overview grid window"},"ui/legacy/components/perf_ui/OverviewGrid.ts | rightResizer":{"message":"Right Resizer"},"ui/legacy/components/perf_ui/perf_ui-meta.ts | collectGarbage":{"message":"Collect garbage"},"ui/legacy/components/perf_ui/perf_ui-meta.ts | flamechartMouseWheelAction":{"message":"Flamechart mouse wheel action:"},"ui/legacy/components/perf_ui/perf_ui-meta.ts | hideLiveMemoryAllocation":{"message":"Hide live memory allocation annotations"},"ui/legacy/components/perf_ui/perf_ui-meta.ts | liveMemoryAllocationAnnotations":{"message":"Live memory allocation annotations"},"ui/legacy/components/perf_ui/perf_ui-meta.ts | scroll":{"message":"Scroll"},"ui/legacy/components/perf_ui/perf_ui-meta.ts | showLiveMemoryAllocation":{"message":"Show live memory allocation annotations"},"ui/legacy/components/perf_ui/perf_ui-meta.ts | zoom":{"message":"Zoom"},"ui/legacy/components/perf_ui/PieChart.ts | total":{"message":"Total"},"ui/legacy/components/quick_open/CommandMenu.ts | command":{"message":"Command"},"ui/legacy/components/quick_open/CommandMenu.ts | deprecated":{"message":"— deprecated"},"ui/legacy/components/quick_open/CommandMenu.ts | noCommandsFound":{"message":"No commands found"},"ui/legacy/components/quick_open/CommandMenu.ts | oneOrMoreSettingsHaveChanged":{"message":"One or more settings have changed which requires a reload to take effect."},"ui/legacy/components/quick_open/CommandMenu.ts | run":{"message":"Run"},"ui/legacy/components/quick_open/FilteredListWidget.ts | noResultsFound":{"message":"No results found"},"ui/legacy/components/quick_open/FilteredListWidget.ts | quickOpen":{"message":"Quick open"},"ui/legacy/components/quick_open/FilteredListWidget.ts | quickOpenPrompt":{"message":"Quick open prompt"},"ui/legacy/components/quick_open/quick_open-meta.ts | openFile":{"message":"Open file"},"ui/legacy/components/quick_open/quick_open-meta.ts | runCommand":{"message":"Run command"},"ui/legacy/components/quick_open/QuickOpen.ts | typeToSeeAvailableCommands":{"message":"Type ? to see available commands"},"ui/legacy/components/source_frame/FontView.ts | font":{"message":"Font"},"ui/legacy/components/source_frame/FontView.ts | previewOfFontFromS":{"message":"Preview of font from {PH1}"},"ui/legacy/components/source_frame/ImageView.ts | copyImageAsDataUri":{"message":"Copy image as data URI"},"ui/legacy/components/source_frame/ImageView.ts | copyImageUrl":{"message":"Copy image URL"},"ui/legacy/components/source_frame/ImageView.ts | dD":{"message":"{PH1} × {PH2}"},"ui/legacy/components/source_frame/ImageView.ts | download":{"message":"download"},"ui/legacy/components/source_frame/ImageView.ts | dropImageFileHere":{"message":"Drop image file here"},"ui/legacy/components/source_frame/ImageView.ts | image":{"message":"Image"},"ui/legacy/components/source_frame/ImageView.ts | imageFromS":{"message":"Image from {PH1}"},"ui/legacy/components/source_frame/ImageView.ts | openImageInNewTab":{"message":"Open image in new tab"},"ui/legacy/components/source_frame/ImageView.ts | saveImageAs":{"message":"Save image as..."},"ui/legacy/components/source_frame/JSONView.ts | find":{"message":"Find"},"ui/legacy/components/source_frame/PreviewFactory.ts | nothingToPreview":{"message":"Nothing to preview"},"ui/legacy/components/source_frame/ResourceSourceFrame.ts | find":{"message":"Find"},"ui/legacy/components/source_frame/source_frame-meta.ts | defaultIndentation":{"message":"Default indentation:"},"ui/legacy/components/source_frame/source_frame-meta.ts | eSpaces":{"message":"8 spaces"},"ui/legacy/components/source_frame/source_frame-meta.ts | fSpaces":{"message":"4 spaces"},"ui/legacy/components/source_frame/source_frame-meta.ts | setIndentationToESpaces":{"message":"Set indentation to 8 spaces"},"ui/legacy/components/source_frame/source_frame-meta.ts | setIndentationToFSpaces":{"message":"Set indentation to 4 spaces"},"ui/legacy/components/source_frame/source_frame-meta.ts | setIndentationToSpaces":{"message":"Set indentation to 2 spaces"},"ui/legacy/components/source_frame/source_frame-meta.ts | setIndentationToTabCharacter":{"message":"Set indentation to tab character"},"ui/legacy/components/source_frame/source_frame-meta.ts | Spaces":{"message":"2 spaces"},"ui/legacy/components/source_frame/source_frame-meta.ts | tabCharacter":{"message":"Tab character"},"ui/legacy/components/source_frame/SourceFrame.ts | bytecodePositionXs":{"message":"Bytecode position 0x{PH1}"},"ui/legacy/components/source_frame/SourceFrame.ts | dCharactersSelected":{"message":"{PH1} characters selected"},"ui/legacy/components/source_frame/SourceFrame.ts | dLinesDCharactersSelected":{"message":"{PH1} lines, {PH2} characters selected"},"ui/legacy/components/source_frame/SourceFrame.ts | dSelectionRegions":{"message":"{PH1} selection regions"},"ui/legacy/components/source_frame/SourceFrame.ts | lineSColumnS":{"message":"Line {PH1}, Column {PH2}"},"ui/legacy/components/source_frame/SourceFrame.ts | loading":{"message":"Loading…"},"ui/legacy/components/source_frame/SourceFrame.ts | prettyPrint":{"message":"Pretty print"},"ui/legacy/components/source_frame/SourceFrame.ts | source":{"message":"Source"},"ui/legacy/components/source_frame/XMLView.ts | find":{"message":"Find"},"ui/legacy/components/utils/ImagePreview.ts | currentSource":{"message":"Current source:"},"ui/legacy/components/utils/ImagePreview.ts | fileSize":{"message":"File size:"},"ui/legacy/components/utils/ImagePreview.ts | imageFromS":{"message":"Image from {PH1}"},"ui/legacy/components/utils/ImagePreview.ts | intrinsicAspectRatio":{"message":"Intrinsic aspect ratio:"},"ui/legacy/components/utils/ImagePreview.ts | intrinsicSize":{"message":"Intrinsic size:"},"ui/legacy/components/utils/ImagePreview.ts | renderedAspectRatio":{"message":"Rendered aspect ratio:"},"ui/legacy/components/utils/ImagePreview.ts | renderedSize":{"message":"Rendered size:"},"ui/legacy/components/utils/ImagePreview.ts | unknownSource":{"message":"unknown source"},"ui/legacy/components/utils/JSPresentationUtils.ts | addToIgnore":{"message":"Add script to ignore list"},"ui/legacy/components/utils/JSPresentationUtils.ts | removeFromIgnore":{"message":"Remove from ignore list"},"ui/legacy/components/utils/JSPresentationUtils.ts | showLess":{"message":"Show less"},"ui/legacy/components/utils/JSPresentationUtils.ts | showSMoreFrames":{"message":"{n, plural, =1 {Show # more frame} other {Show # more frames}}"},"ui/legacy/components/utils/JSPresentationUtils.ts | unknownSource":{"message":"unknown"},"ui/legacy/components/utils/Linkifier.ts | auto":{"message":"auto"},"ui/legacy/components/utils/Linkifier.ts | linkHandling":{"message":"Link handling:"},"ui/legacy/components/utils/Linkifier.ts | openUsingS":{"message":"Open using {PH1}"},"ui/legacy/components/utils/Linkifier.ts | reveal":{"message":"Reveal"},"ui/legacy/components/utils/Linkifier.ts | revealInS":{"message":"Reveal in {PH1}"},"ui/legacy/components/utils/Linkifier.ts | unknown":{"message":"(unknown)"},"ui/legacy/components/utils/TargetDetachedDialog.ts | websocketDisconnected":{"message":"WebSocket disconnected"},"ui/legacy/DockController.ts | close":{"message":"Close"},"ui/legacy/DockController.ts | devToolsDockedTo":{"message":"DevTools is docked to {PH1}"},"ui/legacy/DockController.ts | devtoolsUndocked":{"message":"DevTools is undocked"},"ui/legacy/DockController.ts | dockToBottom":{"message":"Dock to bottom"},"ui/legacy/DockController.ts | dockToLeft":{"message":"Dock to left"},"ui/legacy/DockController.ts | dockToRight":{"message":"Dock to right"},"ui/legacy/DockController.ts | undockIntoSeparateWindow":{"message":"Undock into separate window"},"ui/legacy/EmptyWidget.ts | learnMore":{"message":"Learn more"},"ui/legacy/FilterBar.ts | allStrings":{"message":"All"},"ui/legacy/FilterBar.ts | clearFilter":{"message":"Clear input"},"ui/legacy/FilterBar.ts | egSmalldUrlacomb":{"message":"e.g. /small[d]+/ url:a.com/b"},"ui/legacy/FilterBar.ts | filter":{"message":"Filter"},"ui/legacy/FilterBar.ts | sclickToSelectMultipleTypes":{"message":"{PH1}Click to select multiple types"},"ui/legacy/Infobar.ts | close":{"message":"Close"},"ui/legacy/Infobar.ts | dontShowAgain":{"message":"Don't show again"},"ui/legacy/Infobar.ts | learnMore":{"message":"Learn more"},"ui/legacy/InspectorView.ts | closeDrawer":{"message":"Close drawer"},"ui/legacy/InspectorView.ts | devToolsLanguageMissmatch":{"message":"DevTools is now available in {PH1}!"},"ui/legacy/InspectorView.ts | drawer":{"message":"Tool drawer"},"ui/legacy/InspectorView.ts | drawerHidden":{"message":"Drawer hidden"},"ui/legacy/InspectorView.ts | drawerShown":{"message":"Drawer shown"},"ui/legacy/InspectorView.ts | mainToolbar":{"message":"Main toolbar"},"ui/legacy/InspectorView.ts | moreTools":{"message":"More Tools"},"ui/legacy/InspectorView.ts | moveToBottom":{"message":"Move to bottom"},"ui/legacy/InspectorView.ts | moveToTop":{"message":"Move to top"},"ui/legacy/InspectorView.ts | panels":{"message":"Panels"},"ui/legacy/InspectorView.ts | reloadDevtools":{"message":"Reload DevTools"},"ui/legacy/InspectorView.ts | selectFolder":{"message":"Select folder"},"ui/legacy/InspectorView.ts | selectOverrideFolder":{"message":"Select a folder to store override files in."},"ui/legacy/InspectorView.ts | setToBrowserLanguage":{"message":"Always match Chrome's language"},"ui/legacy/InspectorView.ts | setToSpecificLanguage":{"message":"Switch DevTools to {PH1}"},"ui/legacy/ListWidget.ts | addString":{"message":"Add"},"ui/legacy/ListWidget.ts | cancelString":{"message":"Cancel"},"ui/legacy/ListWidget.ts | editString":{"message":"Edit"},"ui/legacy/ListWidget.ts | removeString":{"message":"Remove"},"ui/legacy/ListWidget.ts | saveString":{"message":"Save"},"ui/legacy/RemoteDebuggingTerminatedScreen.ts | debuggingConnectionWasClosed":{"message":"Debugging connection was closed. Reason: "},"ui/legacy/RemoteDebuggingTerminatedScreen.ts | reconnectDevtools":{"message":"Reconnect DevTools"},"ui/legacy/RemoteDebuggingTerminatedScreen.ts | reconnectWhenReadyByReopening":{"message":"Reconnect when ready by reopening DevTools."},"ui/legacy/SearchableView.ts | cancel":{"message":"Cancel"},"ui/legacy/SearchableView.ts | dMatches":{"message":"{PH1} matches"},"ui/legacy/SearchableView.ts | dOfD":{"message":"{PH1} of {PH2}"},"ui/legacy/SearchableView.ts | findString":{"message":"Find"},"ui/legacy/SearchableView.ts | matchCase":{"message":"Match Case"},"ui/legacy/SearchableView.ts | matchString":{"message":"1 match"},"ui/legacy/SearchableView.ts | replace":{"message":"Replace"},"ui/legacy/SearchableView.ts | replaceAll":{"message":"Replace all"},"ui/legacy/SearchableView.ts | searchNext":{"message":"Search next"},"ui/legacy/SearchableView.ts | searchPrevious":{"message":"Search previous"},"ui/legacy/SearchableView.ts | useRegularExpression":{"message":"Use Regular Expression"},"ui/legacy/SettingsUI.ts | oneOrMoreSettingsHaveChanged":{"message":"One or more settings have changed which requires a reload to take effect."},"ui/legacy/SettingsUI.ts | srequiresReload":{"message":"*Requires reload"},"ui/legacy/SoftContextMenu.ts | checked":{"message":"checked"},"ui/legacy/SoftContextMenu.ts | sS":{"message":"{PH1}, {PH2}"},"ui/legacy/SoftContextMenu.ts | sSS":{"message":"{PH1}, {PH2}, {PH3}"},"ui/legacy/SoftContextMenu.ts | unchecked":{"message":"unchecked"},"ui/legacy/SoftDropDown.ts | noItemSelected":{"message":"(no item selected)"},"ui/legacy/SuggestBox.ts | sSuggestionSOfS":{"message":"{PH1}, suggestion {PH2} of {PH3}"},"ui/legacy/SuggestBox.ts | sSuggestionSSelected":{"message":"{PH1}, suggestion selected"},"ui/legacy/TabbedPane.ts | close":{"message":"Close"},"ui/legacy/TabbedPane.ts | closeAll":{"message":"Close all"},"ui/legacy/TabbedPane.ts | closeOthers":{"message":"Close others"},"ui/legacy/TabbedPane.ts | closeS":{"message":"Close {PH1}"},"ui/legacy/TabbedPane.ts | closeTabsToTheRight":{"message":"Close tabs to the right"},"ui/legacy/TabbedPane.ts | moreTabs":{"message":"More tabs"},"ui/legacy/TabbedPane.ts | previewFeature":{"message":"Preview feature"},"ui/legacy/TargetCrashedScreen.ts | devtoolsWasDisconnectedFromThe":{"message":"DevTools was disconnected from the page."},"ui/legacy/TargetCrashedScreen.ts | oncePageIsReloadedDevtoolsWill":{"message":"Once page is reloaded, DevTools will automatically reconnect."},"ui/legacy/Toolbar.ts | clearInput":{"message":"Clear input"},"ui/legacy/Toolbar.ts | notPressed":{"message":"not pressed"},"ui/legacy/Toolbar.ts | pressed":{"message":"pressed"},"ui/legacy/UIUtils.ts | anonymous":{"message":"(anonymous)"},"ui/legacy/UIUtils.ts | anotherProfilerIsAlreadyActive":{"message":"Another profiler is already active"},"ui/legacy/UIUtils.ts | asyncCall":{"message":"Async Call"},"ui/legacy/UIUtils.ts | cancel":{"message":"Cancel"},"ui/legacy/UIUtils.ts | close":{"message":"Close"},"ui/legacy/UIUtils.ts | copyFileName":{"message":"Copy file name"},"ui/legacy/UIUtils.ts | copyLinkAddress":{"message":"Copy link address"},"ui/legacy/UIUtils.ts | ok":{"message":"OK"},"ui/legacy/UIUtils.ts | openInNewTab":{"message":"Open in new tab"},"ui/legacy/UIUtils.ts | promiseRejectedAsync":{"message":"Promise rejected (async)"},"ui/legacy/UIUtils.ts | promiseResolvedAsync":{"message":"Promise resolved (async)"},"ui/legacy/UIUtils.ts | sAsync":{"message":"{PH1} (async)"},"ui/legacy/ViewManager.ts | sPanel":{"message":"{PH1} panel"},"ui/legacy/ViewRegistration.ts | drawer":{"message":"Drawer"},"ui/legacy/ViewRegistration.ts | drawer_sidebar":{"message":"Drawer sidebar"},"ui/legacy/ViewRegistration.ts | elements":{"message":"Elements"},"ui/legacy/ViewRegistration.ts | network":{"message":"Network"},"ui/legacy/ViewRegistration.ts | panel":{"message":"Panel"},"ui/legacy/ViewRegistration.ts | settings":{"message":"Settings"},"ui/legacy/ViewRegistration.ts | sources":{"message":"Sources"}} \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/i18n/locales/zh.json b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/i18n/locales/zh.json deleted file mode 100644 index a4fbc651a..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/i18n/locales/zh.json +++ /dev/null @@ -1 +0,0 @@ -{"core/common/ResourceType.ts | cspviolationreport":{"message":"CSPViolationReport"},"core/common/ResourceType.ts | css":{"message":"CSS"},"core/common/ResourceType.ts | doc":{"message":"文档"},"core/common/ResourceType.ts | document":{"message":"文档"},"core/common/ResourceType.ts | documents":{"message":"文档"},"core/common/ResourceType.ts | eventsource":{"message":"EventSource"},"core/common/ResourceType.ts | fetch":{"message":"Fetch"},"core/common/ResourceType.ts | font":{"message":"字体"},"core/common/ResourceType.ts | fonts":{"message":"字体"},"core/common/ResourceType.ts | image":{"message":"图片"},"core/common/ResourceType.ts | images":{"message":"图片"},"core/common/ResourceType.ts | img":{"message":"图片"},"core/common/ResourceType.ts | js":{"message":"JS"},"core/common/ResourceType.ts | manifest":{"message":"清单"},"core/common/ResourceType.ts | media":{"message":"媒体"},"core/common/ResourceType.ts | other":{"message":"其他"},"core/common/ResourceType.ts | ping":{"message":"Ping"},"core/common/ResourceType.ts | preflight":{"message":"预检"},"core/common/ResourceType.ts | script":{"message":"脚本"},"core/common/ResourceType.ts | scripts":{"message":"脚本"},"core/common/ResourceType.ts | signedexchange":{"message":"SignedExchange"},"core/common/ResourceType.ts | stylesheet":{"message":"样式表"},"core/common/ResourceType.ts | stylesheets":{"message":"样式表"},"core/common/ResourceType.ts | texttrack":{"message":"TextTrack"},"core/common/ResourceType.ts | wasm":{"message":"Wasm"},"core/common/ResourceType.ts | webassembly":{"message":"WebAssembly"},"core/common/ResourceType.ts | webbundle":{"message":"WebBundle"},"core/common/ResourceType.ts | websocket":{"message":"WebSocket"},"core/common/ResourceType.ts | websockets":{"message":"WebSocket"},"core/common/ResourceType.ts | webtransport":{"message":"WebTransport"},"core/common/ResourceType.ts | ws":{"message":"WS"},"core/common/ResourceType.ts | xhrAndFetch":{"message":"XHR 和 Fetch"},"core/common/Revealer.ts | applicationPanel":{"message":"“应用”面板"},"core/common/Revealer.ts | changesDrawer":{"message":"变更抽屉式导航栏"},"core/common/Revealer.ts | elementsPanel":{"message":"元素面板"},"core/common/Revealer.ts | issuesView":{"message":"“问题”视图"},"core/common/Revealer.ts | networkPanel":{"message":"“网络”面板"},"core/common/Revealer.ts | sourcesPanel":{"message":"“来源”面板"},"core/common/Revealer.ts | stylesSidebar":{"message":"样式边栏"},"core/common/SettingRegistration.ts | adorner":{"message":"装饰器"},"core/common/SettingRegistration.ts | appearance":{"message":"外观"},"core/common/SettingRegistration.ts | console":{"message":"控制台"},"core/common/SettingRegistration.ts | debugger":{"message":"调试程序"},"core/common/SettingRegistration.ts | elements":{"message":"元素"},"core/common/SettingRegistration.ts | extension":{"message":"扩展名"},"core/common/SettingRegistration.ts | global":{"message":"全局"},"core/common/SettingRegistration.ts | grid":{"message":"网格"},"core/common/SettingRegistration.ts | memory":{"message":"内存"},"core/common/SettingRegistration.ts | mobile":{"message":"移动设备"},"core/common/SettingRegistration.ts | network":{"message":"网络"},"core/common/SettingRegistration.ts | performance":{"message":"性能"},"core/common/SettingRegistration.ts | persistence":{"message":"持久性"},"core/common/SettingRegistration.ts | rendering":{"message":"渲染"},"core/common/SettingRegistration.ts | sources":{"message":"源代码"},"core/common/SettingRegistration.ts | sync":{"message":"同步"},"core/host/InspectorFrontendHost.ts | devtoolsS":{"message":"DevTools - {PH1}"},"core/host/ResourceLoader.ts | cacheError":{"message":"缓存错误"},"core/host/ResourceLoader.ts | certificateError":{"message":"证书错误"},"core/host/ResourceLoader.ts | certificateManagerError":{"message":"证书管理工具错误"},"core/host/ResourceLoader.ts | connectionError":{"message":"连接错误"},"core/host/ResourceLoader.ts | decodingDataUrlFailed":{"message":"数据网址解码失败"},"core/host/ResourceLoader.ts | dnsResolverError":{"message":"DNS 解析器错误"},"core/host/ResourceLoader.ts | ftpError":{"message":"FTP 错误"},"core/host/ResourceLoader.ts | httpError":{"message":"HTTP 错误"},"core/host/ResourceLoader.ts | httpErrorStatusCodeSS":{"message":"HTTP 错误:状态代码 {PH1},{PH2}"},"core/host/ResourceLoader.ts | invalidUrl":{"message":"网址无效"},"core/host/ResourceLoader.ts | signedExchangeError":{"message":"Signed Exchange 错误"},"core/host/ResourceLoader.ts | systemError":{"message":"系统错误"},"core/host/ResourceLoader.ts | unknownError":{"message":"未知错误"},"core/i18n/time-utilities.ts | fdays":{"message":"{PH1} 天"},"core/i18n/time-utilities.ts | fhrs":{"message":"{PH1} 小时"},"core/i18n/time-utilities.ts | fmin":{"message":"{PH1} 分钟"},"core/i18n/time-utilities.ts | fmms":{"message":"{PH1} 微秒"},"core/i18n/time-utilities.ts | fms":{"message":"{PH1} 毫秒"},"core/i18n/time-utilities.ts | fs":{"message":"{PH1} 秒"},"core/sdk/CPUProfilerModel.ts | profileD":{"message":"性能分析报告 {PH1}"},"core/sdk/CSSStyleSheetHeader.ts | couldNotFindTheOriginalStyle":{"message":"无法找到原始样式表。"},"core/sdk/CSSStyleSheetHeader.ts | thereWasAnErrorRetrievingThe":{"message":"检索源代码样式时出错。"},"core/sdk/CompilerSourceMappingContentProvider.ts | couldNotLoadContentForSS":{"message":"无法加载 {PH1} 的内容({PH2})"},"core/sdk/ConsoleModel.ts | bfcacheNavigation":{"message":"前往 {PH1} 的导航已从往返缓存中恢复(参见 https://web.dev/bfcache/)"},"core/sdk/ConsoleModel.ts | failedToSaveToTempVariable":{"message":"未能保存到临时变量中。"},"core/sdk/ConsoleModel.ts | navigatedToS":{"message":"已转到 {PH1}"},"core/sdk/ConsoleModel.ts | profileSFinished":{"message":"性能分析报告“{PH1}”已完成。"},"core/sdk/ConsoleModel.ts | profileSStarted":{"message":"性能分析报告“{PH1}”已开始。"},"core/sdk/DOMDebuggerModel.ts | animation":{"message":"动画"},"core/sdk/DOMDebuggerModel.ts | animationFrameFired":{"message":"动画帧已触发"},"core/sdk/DOMDebuggerModel.ts | cancelAnimationFrame":{"message":"取消动画帧"},"core/sdk/DOMDebuggerModel.ts | canvas":{"message":"画布"},"core/sdk/DOMDebuggerModel.ts | clipboard":{"message":"剪贴板"},"core/sdk/DOMDebuggerModel.ts | closeAudiocontext":{"message":"关闭 AudioContext"},"core/sdk/DOMDebuggerModel.ts | control":{"message":"控制"},"core/sdk/DOMDebuggerModel.ts | createAudiocontext":{"message":"创建 AudioContext"},"core/sdk/DOMDebuggerModel.ts | createCanvasContext":{"message":"创建画布背景"},"core/sdk/DOMDebuggerModel.ts | device":{"message":"设备"},"core/sdk/DOMDebuggerModel.ts | domMutation":{"message":"DOM 变更"},"core/sdk/DOMDebuggerModel.ts | dragDrop":{"message":"拖/放"},"core/sdk/DOMDebuggerModel.ts | geolocation":{"message":"地理定位"},"core/sdk/DOMDebuggerModel.ts | keyboard":{"message":"键盘"},"core/sdk/DOMDebuggerModel.ts | load":{"message":"加载"},"core/sdk/DOMDebuggerModel.ts | media":{"message":"媒体"},"core/sdk/DOMDebuggerModel.ts | mouse":{"message":"鼠标"},"core/sdk/DOMDebuggerModel.ts | notification":{"message":"通知"},"core/sdk/DOMDebuggerModel.ts | parse":{"message":"解析"},"core/sdk/DOMDebuggerModel.ts | pictureinpicture":{"message":"画中画"},"core/sdk/DOMDebuggerModel.ts | pointer":{"message":"指针"},"core/sdk/DOMDebuggerModel.ts | policyViolations":{"message":"违反政策"},"core/sdk/DOMDebuggerModel.ts | requestAnimationFrame":{"message":"请求动画帧"},"core/sdk/DOMDebuggerModel.ts | resumeAudiocontext":{"message":"恢复 AudioContext"},"core/sdk/DOMDebuggerModel.ts | script":{"message":"脚本"},"core/sdk/DOMDebuggerModel.ts | scriptBlockedByContentSecurity":{"message":"脚本因内容安全政策而被屏蔽"},"core/sdk/DOMDebuggerModel.ts | scriptBlockedDueToContent":{"message":"脚本因以下内容安全政策指令而被屏蔽:{PH1}"},"core/sdk/DOMDebuggerModel.ts | scriptFirstStatement":{"message":"脚本的第一个语句"},"core/sdk/DOMDebuggerModel.ts | setInnerhtml":{"message":"设置 innerHTML"},"core/sdk/DOMDebuggerModel.ts | setTimeoutOrIntervalFired":{"message":"{PH1} 已触发"},"core/sdk/DOMDebuggerModel.ts | sinkViolations":{"message":"接收器违规行为"},"core/sdk/DOMDebuggerModel.ts | suspendAudiocontext":{"message":"暂停 AudioContext"},"core/sdk/DOMDebuggerModel.ts | timer":{"message":"定时器"},"core/sdk/DOMDebuggerModel.ts | touch":{"message":"轻触"},"core/sdk/DOMDebuggerModel.ts | trustedTypeViolations":{"message":"Trusted Type 违规问题"},"core/sdk/DOMDebuggerModel.ts | webaudio":{"message":"WebAudio"},"core/sdk/DOMDebuggerModel.ts | webglErrorFired":{"message":"WebGL 错误已触发"},"core/sdk/DOMDebuggerModel.ts | webglErrorFiredS":{"message":"WebGL 错误已触发 ({PH1})"},"core/sdk/DOMDebuggerModel.ts | webglWarningFired":{"message":"WebGL 警告已触发"},"core/sdk/DOMDebuggerModel.ts | window":{"message":"窗口"},"core/sdk/DOMDebuggerModel.ts | worker":{"message":"Worker"},"core/sdk/DOMDebuggerModel.ts | xhr":{"message":"XHR"},"core/sdk/DebuggerModel.ts | block":{"message":"代码块"},"core/sdk/DebuggerModel.ts | catchBlock":{"message":"Catch 代码块"},"core/sdk/DebuggerModel.ts | closure":{"message":"闭包"},"core/sdk/DebuggerModel.ts | expression":{"message":"表达式"},"core/sdk/DebuggerModel.ts | global":{"message":"全局"},"core/sdk/DebuggerModel.ts | local":{"message":"本地"},"core/sdk/DebuggerModel.ts | module":{"message":"模块"},"core/sdk/DebuggerModel.ts | script":{"message":"脚本"},"core/sdk/DebuggerModel.ts | withBlock":{"message":"With 代码块"},"core/sdk/EventBreakpointsModel.ts | auctionWorklet":{"message":"广告竞价 Worklet"},"core/sdk/EventBreakpointsModel.ts | beforeBidderWorkletBiddingStart":{"message":"出价方出价阶段开始"},"core/sdk/EventBreakpointsModel.ts | beforeBidderWorkletReportingStart":{"message":"出价方报告阶段开始"},"core/sdk/EventBreakpointsModel.ts | beforeSellerWorkletReportingStart":{"message":"卖方报告阶段开始"},"core/sdk/EventBreakpointsModel.ts | beforeSellerWorkletScoringStart":{"message":"卖方打分阶段开始"},"core/sdk/NetworkManager.ts | crossoriginReadBlockingCorb":{"message":"Cross-Origin Read Blocking (CORB) 已屏蔽 MIME 类型为 {PH2} 的跨域响应 {PH1}。如需了解详情,请参阅 https://www.chromestatus.com/feature/5629709824032768。"},"core/sdk/NetworkManager.ts | fastG":{"message":"高速 3G"},"core/sdk/NetworkManager.ts | noContentForPreflight":{"message":"对于预检请求,没有可显示的内容"},"core/sdk/NetworkManager.ts | noContentForRedirect":{"message":"没有可显示的内容,因为此请求被重定向了"},"core/sdk/NetworkManager.ts | noContentForWebSocket":{"message":"尚不支持显示 WebSockets 内容"},"core/sdk/NetworkManager.ts | noThrottling":{"message":"已停用节流模式"},"core/sdk/NetworkManager.ts | offline":{"message":"离线"},"core/sdk/NetworkManager.ts | requestWasBlockedByDevtoolsS":{"message":"请求被 DevTools 屏蔽:“{PH1}”"},"core/sdk/NetworkManager.ts | sFailedLoadingSS":{"message":"{PH1} 加载失败:{PH2}“{PH3}”。"},"core/sdk/NetworkManager.ts | sFinishedLoadingSS":{"message":"{PH1} 已完成加载:{PH2}“{PH3}”。"},"core/sdk/NetworkManager.ts | slowG":{"message":"低速 3G"},"core/sdk/NetworkRequest.ts | anUnknownErrorWasEncounteredWhenTrying":{"message":"尝试存储此 Cookie 时发生未知错误。"},"core/sdk/NetworkRequest.ts | binary":{"message":"(二进制)"},"core/sdk/NetworkRequest.ts | blockedReasonInvalidDomain":{"message":"尝试通过 Set-Cookie 标头设置 Cookie 的操作被禁止了,因为此标头的“Domain”属性对当前的主机网址而言无效。"},"core/sdk/NetworkRequest.ts | blockedReasonInvalidPrefix":{"message":"尝试通过 Set-Cookie 标头设置 Cookie 的操作被禁止了,因为此标头在名称中使用了“__Secure-”或“__Host-”前缀,该做法违反了包含这些前缀的 Cookie 所适用的附加规则,如 https://tools.ietf.org/html/draft-west-cookie-prefixes-05 中所定义。"},"core/sdk/NetworkRequest.ts | blockedReasonOverwriteSecure":{"message":"尝试通过 Set-Cookie 标头设置 Cookie 的操作被禁止了,因为此标头不是通过安全连接发送的,而且会覆盖具有“Secure”属性的 Cookie。"},"core/sdk/NetworkRequest.ts | blockedReasonSameSiteNoneInsecure":{"message":"尝试通过 Set-Cookie 标头设置 Cookie 的操作被禁止了,因为此标头具有“SameSite=None”属性但缺少使用“SameSite=None”所需的“Secure”属性。"},"core/sdk/NetworkRequest.ts | blockedReasonSameSiteStrictLax":{"message":"尝试通过 Set-Cookie 标头设置 Cookie 的操作被禁止了,因为此标头具有“{PH1}”属性但来自一个跨网站响应,而该响应并不是对顶级导航操作的响应。"},"core/sdk/NetworkRequest.ts | blockedReasonSameSiteUnspecifiedTreatedAsLax":{"message":"此 Set-Cookie 标头未指定“SameSite”属性,默认为“SameSite=Lax,”,并且已被屏蔽,因为它来自一个跨网站响应,而该响应并不是对顶级导航操作的响应。此 Set-Cookie 必须在设置时指定“SameSite=None”,才能跨网站使用。"},"core/sdk/NetworkRequest.ts | blockedReasonSecureOnly":{"message":"尝试通过 Set-Cookie 标头设置 Cookie 的操作被禁止了,因为此标头具有“Secure”属性但不是通过安全连接接收的。"},"core/sdk/NetworkRequest.ts | domainMismatch":{"message":"此 Cookie 已被屏蔽,因为请求网址的网域与此 Cookie 的网域不完全一致,也不是此 Cookie 的“Domain”属性值的子网域。"},"core/sdk/NetworkRequest.ts | nameValuePairExceedsMaxSize":{"message":"此 Cookie 已被屏蔽,因为它太大。名称和值的总大小不得超过 4096 个字符。"},"core/sdk/NetworkRequest.ts | notOnPath":{"message":"此 Cookie 已被屏蔽,因为它的路径与请求网址的路径不完全匹配或不是其超目录。"},"core/sdk/NetworkRequest.ts | samePartyFromCrossPartyContext":{"message":"此 Cookie 已被屏蔽,因为它具有“SameParty”属性,但相应请求是跨多方请求。由于资源网址的网域和资源所属框架/文档的网域不是同一 First-Party Set 的所有者或成员,因此系统判定这是跨多方请求。"},"core/sdk/NetworkRequest.ts | sameSiteLax":{"message":"此 Cookie 已被屏蔽,因为它具有“SameSite=Lax”属性,但相应请求是通过另一网站发出的,而且不是由顶级导航操作发出的。"},"core/sdk/NetworkRequest.ts | sameSiteNoneInsecure":{"message":"此 Cookie 已被屏蔽,因为它具有“SameSite=None”属性但未被标记为“Secure”。无“SameSite”限制的 Cookie 必须被标记为“Secure”并通过安全连接发送。"},"core/sdk/NetworkRequest.ts | sameSiteStrict":{"message":"此 Cookie 已被屏蔽,因为它具有“SameSite=Strict”属性但相应请求是通过另一网站发出的。这包括其他网站发出的顶级导航请求。"},"core/sdk/NetworkRequest.ts | sameSiteUnspecifiedTreatedAsLax":{"message":"此 Cookie 在存储时未指定“SameSite”属性,因而采用了默认值“SameSite=Lax”;该 Cookie 已被屏蔽,因为相应请求来自其他网站,而且不是由顶级导航操作发出。此 Cookie 必须在设置时指定“SameSite=None”,才能跨网站使用。"},"core/sdk/NetworkRequest.ts | schemefulSameSiteLax":{"message":"此 Cookie 已被屏蔽,因为它具有“SameSite=Lax”属性,但相应请求是跨网站请求且不是由顶级导航操作发出的。由于网址架构与当前网站的架构不同,因此系统判定这是跨网站请求。"},"core/sdk/NetworkRequest.ts | schemefulSameSiteStrict":{"message":"此 Cookie 已被屏蔽,因为它具有“SameSite=Strict”属性但相应请求是跨网站请求。这包括其他网站发出的顶级导航请求。由于网址架构与当前网站的架构不同,因此系统判定这是跨网站请求。"},"core/sdk/NetworkRequest.ts | schemefulSameSiteUnspecifiedTreatedAsLax":{"message":"此 Cookie 在存储时未指定“SameSite”属性,默认为“SameSite=Lax\"”,并且已被屏蔽,因为相应请求是跨网站请求,而且不是由顶级导航操作发出。由于网址架构与当前网站的架构不同,因此系统判定这是跨网站请求。"},"core/sdk/NetworkRequest.ts | secureOnly":{"message":"此 Cookie 已被屏蔽,因为它具有“Secure”属性但相应连接不安全。"},"core/sdk/NetworkRequest.ts | setcookieHeaderIsIgnoredIn":{"message":"Set-Cookie 标头在以下网址的响应中被忽略:{PH1}。名称和值的总大小不得超过 4096 个字符。"},"core/sdk/NetworkRequest.ts | theSchemeOfThisConnectionIsNot":{"message":"此连接的架构不能存储 Cookie。"},"core/sdk/NetworkRequest.ts | thisSetcookieDidntSpecifyASamesite":{"message":"此 Set-Cookie 标头未指定“SameSite”属性,默认为“SameSite=Lax\"”,并且已被屏蔽,因为它来自一个跨网站响应,而该响应并不是对顶级导航操作的响应。该响应之所以被视为跨网站,是因为网址架构与当前网站的架构不同。"},"core/sdk/NetworkRequest.ts | thisSetcookieHadInvalidSyntax":{"message":"此 Set-Cookie 标头的语法无效。"},"core/sdk/NetworkRequest.ts | thisSetcookieWasBlockedBecauseItHadTheSameparty":{"message":"尝试通过 Set-Cookie 标头设置 Cookie 的操作被禁止了,因为此标头具有“SameParty”属性,但相应请求是跨多方请求。该请求之所以被视为跨多方,是因为资源网址的网域和资源所属框架/文档的网域不是同一 First-Party Set 的所有者或成员。"},"core/sdk/NetworkRequest.ts | thisSetcookieWasBlockedBecauseItHadTheSamepartyAttribute":{"message":"尝试通过 Set-Cookie 标头设置 Cookie 的操作被禁止了,因为此标头既具有“SameParty”属性又具有与该属性冲突的其他属性。Chrome 要求那些使用“SameParty”属性的 Cookie 也使用“Secure”属性且不受“SameSite=Strict”限制。"},"core/sdk/NetworkRequest.ts | thisSetcookieWasBlockedBecauseItHadTheSamesiteStrictLax":{"message":"尝试通过 Set-Cookie 标头设置 Cookie 的操作被禁止了,因为此标头具有“{PH1}”属性但来自一个跨网站响应,而该响应并不是对顶级导航操作的响应。该响应之所以被视为跨网站,是因为网址架构与当前网站的架构不同。"},"core/sdk/NetworkRequest.ts | thisSetcookieWasBlockedBecauseTheNameValuePairExceedsMaxSize":{"message":"尝试通过 Set-Cookie 标头设置 Cookie 的操作被禁止了,因为此 Cookie 太大。名称和值的总大小不得超过 4096 个字符。"},"core/sdk/NetworkRequest.ts | thisSetcookieWasBlockedDueToUser":{"message":"尝试通过 Set-Cookie 标头设置 Cookie 的操作被禁止了,因为用户指定了偏好设置。"},"core/sdk/NetworkRequest.ts | unknownError":{"message":"尝试发送此 Cookie 时发生未知错误。"},"core/sdk/NetworkRequest.ts | userPreferences":{"message":"此 Cookie 因用户偏好设置而被屏蔽。"},"core/sdk/OverlayModel.ts | pausedInDebugger":{"message":"已在调试程序中暂停"},"core/sdk/PageResourceLoader.ts | loadCanceledDueToReloadOf":{"message":"由于系统重新加载已检查的网页,加载操作已取消"},"core/sdk/Script.ts | scriptRemovedOrDeleted":{"message":"脚本已移除或已删除。"},"core/sdk/Script.ts | unableToFetchScriptSource":{"message":"无法获取脚本源代码。"},"core/sdk/ServerTiming.ts | deprecatedSyntaxFoundPleaseUse":{"message":"发现已弃用的语法。请使用:;dur=;desc="},"core/sdk/ServerTiming.ts | duplicateParameterSIgnored":{"message":"已忽略重复参数“{PH1}”。"},"core/sdk/ServerTiming.ts | extraneousTrailingCharacters":{"message":"无关的尾随字符。"},"core/sdk/ServerTiming.ts | noValueFoundForParameterS":{"message":"找不到“{PH1}”参数的值。"},"core/sdk/ServerTiming.ts | unableToParseSValueS":{"message":"无法解析“{PH1}”值:“{PH2}”。"},"core/sdk/ServerTiming.ts | unrecognizedParameterS":{"message":"无法识别的参数“{PH1}”。"},"core/sdk/ServiceWorkerCacheModel.ts | serviceworkercacheagentError":{"message":"删除缓存中的缓存条目 {PH1} 时出现 ServiceWorkerCacheAgent 错误:{PH2}"},"core/sdk/ServiceWorkerManager.ts | activated":{"message":"已启用"},"core/sdk/ServiceWorkerManager.ts | activating":{"message":"正在启用"},"core/sdk/ServiceWorkerManager.ts | installed":{"message":"已安装"},"core/sdk/ServiceWorkerManager.ts | installing":{"message":"正在安装"},"core/sdk/ServiceWorkerManager.ts | new":{"message":"新版"},"core/sdk/ServiceWorkerManager.ts | redundant":{"message":"冗余"},"core/sdk/ServiceWorkerManager.ts | running":{"message":"正在运行"},"core/sdk/ServiceWorkerManager.ts | sSS":{"message":"{PH1} #{PH2}({PH3})"},"core/sdk/ServiceWorkerManager.ts | starting":{"message":"正在启动"},"core/sdk/ServiceWorkerManager.ts | stopped":{"message":"已停止"},"core/sdk/ServiceWorkerManager.ts | stopping":{"message":"正在停止"},"core/sdk/sdk-meta.ts | achromatopsia":{"message":"全色盲(无法感知任何颜色)"},"core/sdk/sdk-meta.ts | blurredVision":{"message":"视力模糊"},"core/sdk/sdk-meta.ts | captureAsyncStackTraces":{"message":"捕获异步堆栈轨迹"},"core/sdk/sdk-meta.ts | deuteranopia":{"message":"绿色盲(无法感知绿色)"},"core/sdk/sdk-meta.ts | disableAsyncStackTraces":{"message":"停用异步堆栈轨迹"},"core/sdk/sdk-meta.ts | disableAvifFormat":{"message":"停用 AVIF 格式"},"core/sdk/sdk-meta.ts | disableCache":{"message":"停用缓存(在开发者工具已打开时)"},"core/sdk/sdk-meta.ts | disableJavascript":{"message":"停用 JavaScript"},"core/sdk/sdk-meta.ts | disableLocalFonts":{"message":"停用本地字体"},"core/sdk/sdk-meta.ts | disableNetworkRequestBlocking":{"message":"停用网络请求屏蔽"},"core/sdk/sdk-meta.ts | disableWebpFormat":{"message":"停用 WebP 格式"},"core/sdk/sdk-meta.ts | doNotCaptureAsyncStackTraces":{"message":"不捕获异步堆栈轨迹"},"core/sdk/sdk-meta.ts | doNotEmulateAFocusedPage":{"message":"不模拟所聚焦的网页"},"core/sdk/sdk-meta.ts | doNotEmulateAnyVisionDeficiency":{"message":"不模拟任何视觉缺陷"},"core/sdk/sdk-meta.ts | doNotEmulateCss":{"message":"不模拟 CSS {PH1}"},"core/sdk/sdk-meta.ts | doNotEmulateCssMediaType":{"message":"不模拟 CSS 媒体类型"},"core/sdk/sdk-meta.ts | doNotExtendGridLines":{"message":"不延长网格线"},"core/sdk/sdk-meta.ts | doNotHighlightAdFrames":{"message":"不突出显示广告框架"},"core/sdk/sdk-meta.ts | doNotPauseOnExceptions":{"message":"不在遇到异常时暂停"},"core/sdk/sdk-meta.ts | doNotPreserveLogUponNavigation":{"message":"浏览时不保留日志"},"core/sdk/sdk-meta.ts | doNotShowGridNamedAreas":{"message":"不显示网格命名区域"},"core/sdk/sdk-meta.ts | doNotShowGridTrackSizes":{"message":"不显示网格轨迹大小"},"core/sdk/sdk-meta.ts | doNotShowRulersOnHover":{"message":"在鼠标指针悬停时不显示标尺"},"core/sdk/sdk-meta.ts | emulateAFocusedPage":{"message":"模拟所聚焦的网页"},"core/sdk/sdk-meta.ts | emulateAchromatopsia":{"message":"模拟全色盲(无法感知任何颜色)"},"core/sdk/sdk-meta.ts | emulateAutoDarkMode":{"message":"模拟自动深色模式"},"core/sdk/sdk-meta.ts | emulateBlurredVision":{"message":"模拟视力模糊"},"core/sdk/sdk-meta.ts | emulateCss":{"message":"模拟 CSS {PH1}"},"core/sdk/sdk-meta.ts | emulateCssMediaFeature":{"message":"模拟 CSS 媒体功能 {PH1}"},"core/sdk/sdk-meta.ts | emulateCssMediaType":{"message":"模拟 CSS 媒体类型"},"core/sdk/sdk-meta.ts | emulateCssPrintMediaType":{"message":"模拟 CSS 打印媒体类型"},"core/sdk/sdk-meta.ts | emulateCssScreenMediaType":{"message":"模拟 CSS 屏幕媒体类型"},"core/sdk/sdk-meta.ts | emulateDeuteranopia":{"message":"模拟绿色盲(无法感知绿色)"},"core/sdk/sdk-meta.ts | emulateProtanopia":{"message":"模拟红色盲(无法感知红色)"},"core/sdk/sdk-meta.ts | emulateReducedContrast":{"message":"模拟对比度下降"},"core/sdk/sdk-meta.ts | emulateTritanopia":{"message":"模拟蓝色盲(无法感知蓝色)"},"core/sdk/sdk-meta.ts | emulateVisionDeficiencies":{"message":"模拟视觉缺陷"},"core/sdk/sdk-meta.ts | enableAvifFormat":{"message":"启用 AVIF 格式"},"core/sdk/sdk-meta.ts | enableCache":{"message":"启用缓存"},"core/sdk/sdk-meta.ts | enableCustomFormatters":{"message":"启用自定义格式设置工具"},"core/sdk/sdk-meta.ts | enableJavascript":{"message":"启用 JavaScript"},"core/sdk/sdk-meta.ts | enableLocalFonts":{"message":"启用本地字体"},"core/sdk/sdk-meta.ts | enableNetworkRequestBlocking":{"message":"启用网络请求屏蔽功能"},"core/sdk/sdk-meta.ts | enableRemoteFileLoading":{"message":"允许 DevTools 从远程文件路径加载资源(比如源映射关系)。为安全起见,此功能默认处于停用状态。"},"core/sdk/sdk-meta.ts | enableWebpFormat":{"message":"启用 WebP 格式"},"core/sdk/sdk-meta.ts | extendGridLines":{"message":"延长网格线"},"core/sdk/sdk-meta.ts | hideCoreWebVitalsOverlay":{"message":"隐藏核心网页指标叠加层"},"core/sdk/sdk-meta.ts | hideFramesPerSecondFpsMeter":{"message":"隐藏每秒帧数 (FPS) 计量器"},"core/sdk/sdk-meta.ts | hideLayerBorders":{"message":"隐藏图层边框"},"core/sdk/sdk-meta.ts | hideLayoutShiftRegions":{"message":"隐藏布局偏移区域"},"core/sdk/sdk-meta.ts | hideLineLabels":{"message":"隐藏网格线标签"},"core/sdk/sdk-meta.ts | hidePaintFlashingRectangles":{"message":"隐藏突出显示的矩形绘制区域"},"core/sdk/sdk-meta.ts | hideScrollPerformanceBottlenecks":{"message":"隐藏滚动性能瓶颈"},"core/sdk/sdk-meta.ts | highlightAdFrames":{"message":"突出显示广告框架"},"core/sdk/sdk-meta.ts | noEmulation":{"message":"无模拟"},"core/sdk/sdk-meta.ts | pauseOnExceptions":{"message":"遇到异常时暂停"},"core/sdk/sdk-meta.ts | preserveLogUponNavigation":{"message":"在浏览时保留日志"},"core/sdk/sdk-meta.ts | print":{"message":"打印"},"core/sdk/sdk-meta.ts | protanopia":{"message":"红色盲(无法感知红色)"},"core/sdk/sdk-meta.ts | query":{"message":"查询"},"core/sdk/sdk-meta.ts | reducedContrast":{"message":"对比度下降"},"core/sdk/sdk-meta.ts | screen":{"message":"屏幕"},"core/sdk/sdk-meta.ts | showAreaNames":{"message":"显示区域名称"},"core/sdk/sdk-meta.ts | showCoreWebVitalsOverlay":{"message":"显示核心网页指标叠加层"},"core/sdk/sdk-meta.ts | showFramesPerSecondFpsMeter":{"message":"显示每秒帧数 (FPS) 计量器"},"core/sdk/sdk-meta.ts | showGridNamedAreas":{"message":"显示网格命名区域"},"core/sdk/sdk-meta.ts | showGridTrackSizes":{"message":"显示网格轨迹大小"},"core/sdk/sdk-meta.ts | showLayerBorders":{"message":"显示图层边框"},"core/sdk/sdk-meta.ts | showLayoutShiftRegions":{"message":"显示布局偏移区域"},"core/sdk/sdk-meta.ts | showLineLabels":{"message":"显示网格线标签"},"core/sdk/sdk-meta.ts | showLineNames":{"message":"显示网格线名称"},"core/sdk/sdk-meta.ts | showLineNumbers":{"message":"显示行号"},"core/sdk/sdk-meta.ts | showPaintFlashingRectangles":{"message":"显示突出显示的矩形绘制区域"},"core/sdk/sdk-meta.ts | showRulersOnHover":{"message":"在鼠标指针悬停时显示标尺"},"core/sdk/sdk-meta.ts | showScrollPerformanceBottlenecks":{"message":"显示滚动性能瓶颈"},"core/sdk/sdk-meta.ts | showTrackSizes":{"message":"显示轨迹大小"},"core/sdk/sdk-meta.ts | tritanopia":{"message":"蓝色盲(无法感知蓝色)"},"entrypoints/inspector_main/InspectorMain.ts | javascriptIsDisabled":{"message":"JavaScript 已停用"},"entrypoints/inspector_main/InspectorMain.ts | main":{"message":"主要"},"entrypoints/inspector_main/InspectorMain.ts | openDedicatedTools":{"message":"打开 Node.js 的专用开发者工具"},"entrypoints/inspector_main/InspectorMain.ts | tab":{"message":"标签页"},"entrypoints/inspector_main/RenderingOptions.ts | coreWebVitals":{"message":"核心网页指标"},"entrypoints/inspector_main/RenderingOptions.ts | disableAvifImageFormat":{"message":"停用 AVIF 图片格式"},"entrypoints/inspector_main/RenderingOptions.ts | disableLocalFonts":{"message":"停用本地字体"},"entrypoints/inspector_main/RenderingOptions.ts | disableWebpImageFormat":{"message":"停用 WebP 图片格式"},"entrypoints/inspector_main/RenderingOptions.ts | disablesLocalSourcesInFontface":{"message":"在 @font-face 规则中停用 local() 来源。需要重新加载网页才能应用。"},"entrypoints/inspector_main/RenderingOptions.ts | emulateAFocusedPage":{"message":"模拟所聚焦的网页"},"entrypoints/inspector_main/RenderingOptions.ts | emulateAutoDarkMode":{"message":"启用自动深色模式"},"entrypoints/inspector_main/RenderingOptions.ts | emulatesAFocusedPage":{"message":"模拟所聚焦的网页。"},"entrypoints/inspector_main/RenderingOptions.ts | emulatesAutoDarkMode":{"message":"启用自动深色模式并将 prefers-color-scheme 设为 dark。"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssColorgamutMediaFeature":{"message":"强制使用 CSS color-gamut 媒体功能"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssForcedColors":{"message":"强制执行 CSS forced-colors 媒体功能"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssPreferscolorschemeMedia":{"message":"强制使用 CSS prefers-color-scheme 媒体功能"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssPreferscontrastMedia":{"message":"强制使用 CSS prefers-contrast 媒体功能"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssPrefersreduceddataMedia":{"message":"强制使用 CSS prefers-reduced-data 媒体功能"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssPrefersreducedmotion":{"message":"强制使用 CSS prefers-reduced-motion 媒体功能"},"entrypoints/inspector_main/RenderingOptions.ts | forcesMediaTypeForTestingPrint":{"message":"强制采用测试打印和屏幕样式的媒体类型"},"entrypoints/inspector_main/RenderingOptions.ts | forcesVisionDeficiencyEmulation":{"message":"强制模拟视觉缺陷"},"entrypoints/inspector_main/RenderingOptions.ts | frameRenderingStats":{"message":"帧渲染统计信息"},"entrypoints/inspector_main/RenderingOptions.ts | highlightAdFrames":{"message":"突出显示广告框架"},"entrypoints/inspector_main/RenderingOptions.ts | highlightsAreasOfThePageBlueThat":{"message":"突出显示网页上偏移的区域(蓝色)。可能不适合患有光敏性癫痫的用户。"},"entrypoints/inspector_main/RenderingOptions.ts | highlightsAreasOfThePageGreen":{"message":"突出显示需要重新绘制的网页区域(绿色)。可能不适合患有光敏性癫痫的用户。"},"entrypoints/inspector_main/RenderingOptions.ts | highlightsElementsTealThatCan":{"message":"突出显示可能会减慢滚动速度的元素(蓝绿色),包括轻触和滚轮事件处理脚本以及其他主线程滚动情况。"},"entrypoints/inspector_main/RenderingOptions.ts | highlightsFramesRedDetectedToBe":{"message":"突出显示被检测为广告的框架(红色)。"},"entrypoints/inspector_main/RenderingOptions.ts | layerBorders":{"message":"图层边框"},"entrypoints/inspector_main/RenderingOptions.ts | layoutShiftRegions":{"message":"布局偏移区域"},"entrypoints/inspector_main/RenderingOptions.ts | paintFlashing":{"message":"突出显示绘制区域"},"entrypoints/inspector_main/RenderingOptions.ts | plotsFrameThroughputDropped":{"message":"绘制帧吞吐量、丢帧分布和 GPU 内存。"},"entrypoints/inspector_main/RenderingOptions.ts | requiresAPageReloadToApplyAnd":{"message":"需要重新加载网页,才能对图片请求采用和停用缓存。"},"entrypoints/inspector_main/RenderingOptions.ts | scrollingPerformanceIssues":{"message":"滚动性能问题"},"entrypoints/inspector_main/RenderingOptions.ts | showsAnOverlayWithCoreWebVitals":{"message":"根据核心网页指标显示叠加层。"},"entrypoints/inspector_main/RenderingOptions.ts | showsLayerBordersOrangeoliveAnd":{"message":"显示图层边框(橙色/橄榄色)和图块(青色)。"},"entrypoints/inspector_main/inspector_main-meta.ts | autoOpenDevTools":{"message":"为弹出式窗口自动打开 DevTools"},"entrypoints/inspector_main/inspector_main-meta.ts | blockAds":{"message":"屏蔽此网站上的广告"},"entrypoints/inspector_main/inspector_main-meta.ts | colorVisionDeficiency":{"message":"色觉缺陷"},"entrypoints/inspector_main/inspector_main-meta.ts | cssMediaFeature":{"message":"CSS 媒体功能"},"entrypoints/inspector_main/inspector_main-meta.ts | cssMediaType":{"message":"CSS 媒体类型"},"entrypoints/inspector_main/inspector_main-meta.ts | disablePaused":{"message":"停用已暂停的状态叠加层"},"entrypoints/inspector_main/inspector_main-meta.ts | doNotAutoOpen":{"message":"不为弹出式窗口自动打开 DevTools"},"entrypoints/inspector_main/inspector_main-meta.ts | forceAdBlocking":{"message":"在此网站上强制屏蔽广告"},"entrypoints/inspector_main/inspector_main-meta.ts | fps":{"message":"fps"},"entrypoints/inspector_main/inspector_main-meta.ts | hardReloadPage":{"message":"强制重新加载网页"},"entrypoints/inspector_main/inspector_main-meta.ts | layout":{"message":"布局"},"entrypoints/inspector_main/inspector_main-meta.ts | paint":{"message":"绘制"},"entrypoints/inspector_main/inspector_main-meta.ts | reloadPage":{"message":"重新加载网页"},"entrypoints/inspector_main/inspector_main-meta.ts | rendering":{"message":"渲染"},"entrypoints/inspector_main/inspector_main-meta.ts | showAds":{"message":"在此网站上显示广告(如果允许)"},"entrypoints/inspector_main/inspector_main-meta.ts | showRendering":{"message":"显示“渲染”工具"},"entrypoints/inspector_main/inspector_main-meta.ts | toggleCssPrefersColorSchemeMedia":{"message":"开启/关闭 CSS 媒体功能 prefers-color-scheme"},"entrypoints/inspector_main/inspector_main-meta.ts | visionDeficiency":{"message":"视觉缺陷"},"entrypoints/js_app/js_app.ts | main":{"message":"主要"},"entrypoints/main/MainImpl.ts | customizeAndControlDevtools":{"message":"自定义和控制 DevTools"},"entrypoints/main/MainImpl.ts | dockSide":{"message":"停靠侧"},"entrypoints/main/MainImpl.ts | dockSideNaviation":{"message":"使用向左键和向右键可浏览选项"},"entrypoints/main/MainImpl.ts | dockToBottom":{"message":"停靠至底部"},"entrypoints/main/MainImpl.ts | dockToLeft":{"message":"停靠至左侧"},"entrypoints/main/MainImpl.ts | dockToRight":{"message":"停靠至右侧"},"entrypoints/main/MainImpl.ts | focusDebuggee":{"message":"焦点调试对象"},"entrypoints/main/MainImpl.ts | help":{"message":"帮助"},"entrypoints/main/MainImpl.ts | hideConsoleDrawer":{"message":"隐藏控制台抽屉栏"},"entrypoints/main/MainImpl.ts | moreTools":{"message":"更多工具"},"entrypoints/main/MainImpl.ts | placementOfDevtoolsRelativeToThe":{"message":"DevTools 相对于网页的位置。(按 {PH1} 即可恢复上一个位置)"},"entrypoints/main/MainImpl.ts | showConsoleDrawer":{"message":"显示控制台抽屉栏"},"entrypoints/main/MainImpl.ts | undockIntoSeparateWindow":{"message":"取消停靠至单独的窗口"},"entrypoints/main/OutermostTargetSelector.ts | targetNotSelected":{"message":"页面:未选择"},"entrypoints/main/OutermostTargetSelector.ts | targetS":{"message":"页面:{PH1}"},"entrypoints/main/main-meta.ts | asAuthored":{"message":"按原始格式设置"},"entrypoints/main/main-meta.ts | auto":{"message":"自动"},"entrypoints/main/main-meta.ts | bottom":{"message":"底部"},"entrypoints/main/main-meta.ts | browserLanguage":{"message":"浏览器界面语言"},"entrypoints/main/main-meta.ts | cancelSearch":{"message":"取消搜索"},"entrypoints/main/main-meta.ts | colorFormat":{"message":"颜色格式:"},"entrypoints/main/main-meta.ts | colorFormatSettingDisabled":{"message":"此设置已被弃用,因为它与现代颜色空间不兼容。若要重新启用此设置,请停用相应的实验。"},"entrypoints/main/main-meta.ts | darkCapital":{"message":"深色"},"entrypoints/main/main-meta.ts | darkLower":{"message":"深色"},"entrypoints/main/main-meta.ts | devtoolsDefault":{"message":"DevTools(默认)"},"entrypoints/main/main-meta.ts | dockToBottom":{"message":"停靠至底部"},"entrypoints/main/main-meta.ts | dockToLeft":{"message":"停靠至左侧"},"entrypoints/main/main-meta.ts | dockToRight":{"message":"停靠至右侧"},"entrypoints/main/main-meta.ts | enableCtrlShortcutToSwitchPanels":{"message":"启用 Ctrl + 1-9 快捷键切换面板"},"entrypoints/main/main-meta.ts | enableShortcutToSwitchPanels":{"message":"启用 ⌘ + 1-9 快捷键切换面板"},"entrypoints/main/main-meta.ts | enableSync":{"message":"启用设置同步"},"entrypoints/main/main-meta.ts | findNextResult":{"message":"查找下一个结果"},"entrypoints/main/main-meta.ts | findPreviousResult":{"message":"查找上一个结果"},"entrypoints/main/main-meta.ts | focusDebuggee":{"message":"焦点调试对象"},"entrypoints/main/main-meta.ts | horizontal":{"message":"横向"},"entrypoints/main/main-meta.ts | language":{"message":"语言:"},"entrypoints/main/main-meta.ts | left":{"message":"左侧"},"entrypoints/main/main-meta.ts | lightCapital":{"message":"浅色"},"entrypoints/main/main-meta.ts | lightLower":{"message":"浅色"},"entrypoints/main/main-meta.ts | nextPanel":{"message":"下一个面板"},"entrypoints/main/main-meta.ts | panelLayout":{"message":"面板布局:"},"entrypoints/main/main-meta.ts | previousPanel":{"message":"上一个面板"},"entrypoints/main/main-meta.ts | reloadDevtools":{"message":"重新加载 DevTools"},"entrypoints/main/main-meta.ts | resetZoomLevel":{"message":"重置缩放级别"},"entrypoints/main/main-meta.ts | restoreLastDockPosition":{"message":"恢复上一个停靠位置"},"entrypoints/main/main-meta.ts | right":{"message":"右侧"},"entrypoints/main/main-meta.ts | searchAsYouTypeCommand":{"message":"启用即输即搜功能"},"entrypoints/main/main-meta.ts | searchAsYouTypeSetting":{"message":"即输即搜"},"entrypoints/main/main-meta.ts | searchInPanel":{"message":"在面板中搜索"},"entrypoints/main/main-meta.ts | searchOnEnterCommand":{"message":"停用即输即搜功能(按 Enter 键即可搜索)"},"entrypoints/main/main-meta.ts | setColorFormatAsAuthored":{"message":"按原始格式设置颜色格式"},"entrypoints/main/main-meta.ts | setColorFormatToHex":{"message":"将颜色格式设为 HEX"},"entrypoints/main/main-meta.ts | setColorFormatToHsl":{"message":"将颜色格式设为 HSL"},"entrypoints/main/main-meta.ts | setColorFormatToRgb":{"message":"将颜色格式设为 RGB"},"entrypoints/main/main-meta.ts | switchToDarkTheme":{"message":"切换到深色主题"},"entrypoints/main/main-meta.ts | switchToLightTheme":{"message":"切换到浅色主题"},"entrypoints/main/main-meta.ts | switchToSystemPreferredColor":{"message":"切换到系统首选颜色主题"},"entrypoints/main/main-meta.ts | systemPreference":{"message":"系统偏好设置"},"entrypoints/main/main-meta.ts | theme":{"message":"主题:"},"entrypoints/main/main-meta.ts | toggleDrawer":{"message":"显示/隐藏抽屉栏"},"entrypoints/main/main-meta.ts | undockIntoSeparateWindow":{"message":"取消停靠至单独的窗口"},"entrypoints/main/main-meta.ts | undocked":{"message":"已取消停靠"},"entrypoints/main/main-meta.ts | useAutomaticPanelLayout":{"message":"使用自动面板布局"},"entrypoints/main/main-meta.ts | useHorizontalPanelLayout":{"message":"使用水平面板布局"},"entrypoints/main/main-meta.ts | useVerticalPanelLayout":{"message":"使用垂直面板布局"},"entrypoints/main/main-meta.ts | vertical":{"message":"纵向"},"entrypoints/main/main-meta.ts | zoomIn":{"message":"放大"},"entrypoints/main/main-meta.ts | zoomOut":{"message":"缩小"},"entrypoints/node_app/NodeConnectionsPanel.ts | addConnection":{"message":"添加网络连接"},"entrypoints/node_app/NodeConnectionsPanel.ts | networkAddressEgLocalhost":{"message":"网络地址(例如,localhost:9229)"},"entrypoints/node_app/NodeConnectionsPanel.ts | noConnectionsSpecified":{"message":"未指定连接"},"entrypoints/node_app/NodeConnectionsPanel.ts | nodejsDebuggingGuide":{"message":"Node.js 调试指南"},"entrypoints/node_app/NodeConnectionsPanel.ts | specifyNetworkEndpointAnd":{"message":"只要您指定网络端点,DevTools 就会自动连接到该端点。如需了解详情,请阅读 {PH1}。"},"entrypoints/node_app/NodeMain.ts | main":{"message":"主要"},"entrypoints/node_app/NodeMain.ts | nodejsS":{"message":"Node.js:{PH1}"},"entrypoints/node_app/node_app.ts | connection":{"message":"网络连接"},"entrypoints/node_app/node_app.ts | networkTitle":{"message":"节点"},"entrypoints/node_app/node_app.ts | node":{"message":"节点"},"entrypoints/node_app/node_app.ts | showConnection":{"message":"显示“连接”"},"entrypoints/node_app/node_app.ts | showNode":{"message":"显示节点"},"entrypoints/worker_app/WorkerMain.ts | main":{"message":"主要"},"generated/Deprecation.ts | AuthorizationCoveredByWildcard":{"message":"处理 CORS Access-Control-Allow-Headers 时,授权将不在通配符 (*) 的涵盖范围内。"},"generated/Deprecation.ts | CSSSelectorInternalMediaControlsOverlayCastButton":{"message":"若要停用默认 Cast 集成,应使用 disableRemotePlayback 属性,而非 -internal-media-controls-overlay-cast-button 选择器。"},"generated/Deprecation.ts | CanRequestURLHTTPContainingNewline":{"message":"如果对应的网址同时包含已移除的空白字符 \\(n|r|t) 和小于字符 (<),资源请求会被屏蔽。请从元素属性值等位置移除换行符并编码小于字符,以便加载这些资源。"},"generated/Deprecation.ts | ChromeLoadTimesConnectionInfo":{"message":"chrome.loadTimes() 已被弃用,请改用标准化 API:Navigation Timing 2。"},"generated/Deprecation.ts | ChromeLoadTimesFirstPaintAfterLoadTime":{"message":"chrome.loadTimes() 已被弃用,请改用标准化 API:Paint Timing。"},"generated/Deprecation.ts | ChromeLoadTimesWasAlternateProtocolAvailable":{"message":"chrome.loadTimes() 已被弃用,请改用标准化 API:Navigation Timing 2 中的 nextHopProtocol。"},"generated/Deprecation.ts | CookieWithTruncatingChar":{"message":"包含 \\(0|r|n) 字符的 Cookie 将被拒,而不是被截断。"},"generated/Deprecation.ts | CrossOriginAccessBasedOnDocumentDomain":{"message":"通过设置 document.domain 放宽同源政策的功能已被弃用,并将默认处于停用状态。此弃用警告针对的是通过设置 document.domain 启用的跨源访问。"},"generated/Deprecation.ts | CrossOriginWindowAlert":{"message":"从跨源 iframe 触发 window.alert 的功能已被弃用,日后将被移除。"},"generated/Deprecation.ts | CrossOriginWindowConfirm":{"message":"从跨源 iframe 触发 window.confirm 的功能已被弃用,日后将被移除。"},"generated/Deprecation.ts | DocumentDomainSettingWithoutOriginAgentClusterHeader":{"message":"通过设置 document.domain 放宽同源政策的功能已被弃用,并将默认处于停用状态。若要继续使用此功能,请通过发送 Origin-Agent-Cluster: ?0 标头以及文档和框架的 HTTP 响应来选择停用以源为键的代理集群。如需了解详情,请访问 https://developer.chrome.com/blog/immutable-document-domain/。"},"generated/Deprecation.ts | EventPath":{"message":"Event.path 已被弃用,并将被移除。请改用 Event.composedPath()。"},"generated/Deprecation.ts | ExpectCTHeader":{"message":"Expect-CT 标头已不再受支持。Chrome 要求,在 2018 年 4 月 30 日之后颁发的所有受大众信任的证书均须遵守证书透明度政策。"},"generated/Deprecation.ts | GeolocationInsecureOrigin":{"message":"getCurrentPosition() 和 watchPosition() 不再适用于不安全的源。若要使用此功能,您应考虑将您的应用转移到安全的源,例如 HTTPS。如需了解详情,请访问 https://goo.gle/chrome-insecure-origins。"},"generated/Deprecation.ts | GeolocationInsecureOriginDeprecatedNotRemoved":{"message":"getCurrentPosition() 和 watchPosition() 不再适用于不安全的源。若要使用此功能,您应考虑将您的应用转移到安全的源,例如 HTTPS。如需了解详情,请访问 https://goo.gle/chrome-insecure-origins。"},"generated/Deprecation.ts | GetUserMediaInsecureOrigin":{"message":"getUserMedia() 不再适用于不安全的源。若要使用此功能,您应考虑将您的应用转移到安全的源,例如 HTTPS。如需了解详情,请访问 https://goo.gle/chrome-insecure-origins。"},"generated/Deprecation.ts | HostCandidateAttributeGetter":{"message":"RTCPeerConnectionIceErrorEvent.hostCandidate 已被弃用。请改用 RTCPeerConnectionIceErrorEvent.address 或 RTCPeerConnectionIceErrorEvent.port。"},"generated/Deprecation.ts | IdentityInCanMakePaymentEvent":{"message":"canmakepayment Service Worker 事件中的商家源和任意数据已被弃用,并将被移除:topOrigin、paymentRequestOrigin、methodData、modifiers。"},"generated/Deprecation.ts | InsecurePrivateNetworkSubresourceRequest":{"message":"该网站向网络请求了一项子资源,而且仅仅因为其用户的特权网络位置而能够访问此项资源。此类请求会向互联网公开非公用设备和服务器,这会增加跨站请求伪造 (CSRF) 攻击和/或信息泄露的风险。为降低这类风险,Chrome 不再支持从非安全上下文发起针对非公用子资源的请求,并将开始阻止此类请求。"},"generated/Deprecation.ts | InterestGroupDailyUpdateUrl":{"message":"向 joinAdInterestGroup() 传递的 InterestGroups 所含 dailyUpdateUrl 字段已被重命名为 updateUrl,以便更准确地反映其行为。"},"generated/Deprecation.ts | LocalCSSFileExtensionRejected":{"message":"无法从 file: 网址加载 CSS,除非它们以 .css 文件扩展名结尾。"},"generated/Deprecation.ts | MediaSourceAbortRemove":{"message":"由于规范变更,使用 SourceBuffer.abort() 中止 remove() 的异步范围移除的功能已被弃用。日后我们会移除相应支持。您应改为监听 updateend 事件。abort() 只应用于中止异步媒体附加或重置解析状态。"},"generated/Deprecation.ts | MediaSourceDurationTruncatingBuffered":{"message":"由于规范变更,我们不再支持将 MediaSource.duration 设为低于任何缓冲编码帧的最高呈现时间戳。日后我们将不再支持隐式移除被截断的缓冲媒体。您应改为对 newDuration < oldDuration 的所有 sourceBuffers 执行显式 remove(newDuration, oldDuration)。"},"generated/Deprecation.ts | NoSysexWebMIDIWithoutPermission":{"message":"即使 MIDIOptions 中未指定 sysex,Web MIDI 也会请求获得使用许可。"},"generated/Deprecation.ts | NonStandardDeclarativeShadowDOM":{"message":"较旧的非标准化 shadowroot 属性已被弃用,自 M119 起将*不再起作用*。请改用新的标准化 shadowrootmode 属性。"},"generated/Deprecation.ts | NotificationInsecureOrigin":{"message":"无法再从不安全的源使用 Notification API。您应考虑将您的应用转移到安全的源,例如 HTTPS。如需了解详情,请访问 https://goo.gle/chrome-insecure-origins。"},"generated/Deprecation.ts | NotificationPermissionRequestedIframe":{"message":"无法再从跨源 iframe 中请求 Notification API 权限。您应考虑改为从顶级框架中请求权限,或者打开一个新窗口。"},"generated/Deprecation.ts | ObsoleteCreateImageBitmapImageOrientationNone":{"message":"createImageBitmap 中的 imageOrientation: 'none' 选项已被弃用。请改用带有 {imageOrientation: 'from-image'} 选项的 createImageBitmap。"},"generated/Deprecation.ts | ObsoleteWebRtcCipherSuite":{"message":"您的合作伙伴正在协商某个已过时的 (D)TLS 版本。请与您的合作伙伴联系,以解决此问题。"},"generated/Deprecation.ts | OverflowVisibleOnReplacedElement":{"message":"为 img、video 和 canvas 标记指定 overflow: visible 可能会导致这些标记在元素边界之外生成视觉内容。请参阅 https://github.com/WICG/shared-element-transitions/blob/main/debugging_overflow_on_images.md。"},"generated/Deprecation.ts | PaymentInstruments":{"message":"paymentManager.instruments 已被弃用。请改用即时安装方式安装付款处理程序。"},"generated/Deprecation.ts | PaymentRequestCSPViolation":{"message":"您的 PaymentRequest 调用已绕过内容安全政策 (CSP) connect-src 指令。此绕过方式已被弃用。请将 PaymentRequest API 中的付款方式标识符(在 supportedMethods 字段中)添加到 CSP connect-src 指令中。"},"generated/Deprecation.ts | PersistentQuotaType":{"message":"StorageType.persistent 已被弃用。请改用标准化 navigator.storage。"},"generated/Deprecation.ts | PictureSourceSrc":{"message":"带有 父级的 无效,因此会被忽略。请改用 。"},"generated/Deprecation.ts | PrefixedCancelAnimationFrame":{"message":"webkitCancelAnimationFrame 因供应商而异。请改用标准 cancelAnimationFrame。"},"generated/Deprecation.ts | PrefixedRequestAnimationFrame":{"message":"webkitRequestAnimationFrame 因供应商而异。请改用标准 requestAnimationFrame。"},"generated/Deprecation.ts | PrefixedVideoDisplayingFullscreen":{"message":"HTMLVideoElement.webkitDisplayingFullscreen 已被弃用。请改用 Document.fullscreenElement。"},"generated/Deprecation.ts | PrefixedVideoEnterFullScreen":{"message":"HTMLVideoElement.webkitEnterFullScreen() 已被弃用。请改用 Element.requestFullscreen()。"},"generated/Deprecation.ts | PrefixedVideoEnterFullscreen":{"message":"HTMLVideoElement.webkitEnterFullscreen() 已被弃用。请改用 Element.requestFullscreen()。"},"generated/Deprecation.ts | PrefixedVideoExitFullScreen":{"message":"HTMLVideoElement.webkitExitFullScreen() 已被弃用。请改用 Document.exitFullscreen()。"},"generated/Deprecation.ts | PrefixedVideoExitFullscreen":{"message":"HTMLVideoElement.webkitExitFullscreen() 已被弃用。请改用 Document.exitFullscreen()。"},"generated/Deprecation.ts | PrefixedVideoSupportsFullscreen":{"message":"HTMLVideoElement.webkitSupportsFullscreen 已被弃用。请改用 Document.fullscreenEnabled。"},"generated/Deprecation.ts | PrivacySandboxExtensionsAPI":{"message":"我们即将弃用 API chrome.privacy.websites.privacySandboxEnabled,但为了保持向后兼容性,该 API 可持续使用到 M113 版。届时,请改用 chrome.privacy.websites.topicsEnabled、chrome.privacy.websites.fledgeEnabled 和 chrome.privacy.websites.adMeasurementEnabled。请参阅 https://developer.chrome.com/docs/extensions/reference/privacy/#property-websites-privacySandboxEnabled。"},"generated/Deprecation.ts | RTCConstraintEnableDtlsSrtpFalse":{"message":"约束条件 DtlsSrtpKeyAgreement 已被移除。您已为此约束条件指定 false 值,系统会将这种情况解读为尝试使用已被移除的 SDES key negotiation 方法。此功能已被移除;请改用支持 DTLS key negotiation的服务。"},"generated/Deprecation.ts | RTCConstraintEnableDtlsSrtpTrue":{"message":"约束条件 DtlsSrtpKeyAgreement 已被移除。您已为此约束条件指定 true 值,这没有任何作用,但为整洁起见,您可以移除此约束条件。"},"generated/Deprecation.ts | RTCPeerConnectionGetStatsLegacyNonCompliant":{"message":"基于回调的 getStats() 已被弃用,并将被移除。请改用符合规范的 getStats()。"},"generated/Deprecation.ts | RangeExpand":{"message":"Range.expand() 已被弃用。请改用 Selection.modify()。"},"generated/Deprecation.ts | RequestedSubresourceWithEmbeddedCredentials":{"message":"如果对应的网址包含嵌入式凭据(例如 https://user:pass@host/),子资源请求会被屏蔽。"},"generated/Deprecation.ts | RtcpMuxPolicyNegotiate":{"message":"rtcpMuxPolicy 选项已被弃用,并将被移除。"},"generated/Deprecation.ts | SharedArrayBufferConstructedWithoutIsolation":{"message":"SharedArrayBuffer 将要求进行跨域隔离。如需了解详情,请访问 https://developer.chrome.com/blog/enabling-shared-array-buffer/。"},"generated/Deprecation.ts | TextToSpeech_DisallowedByAutoplay":{"message":"无需用户激活的 speechSynthesis.speak() 已被弃用,并将被移除。"},"generated/Deprecation.ts | V8SharedArrayBufferConstructedInExtensionWithoutIsolation":{"message":"扩展程序应选择启用跨域隔离,以便继续使用 SharedArrayBuffer。请参阅 https://developer.chrome.com/docs/extensions/mv3/cross-origin-isolation/。"},"generated/Deprecation.ts | WebSQL":{"message":"Web SQL 已被弃用。请使用 SQLite WebAssembly 或 Indexed Database"},"generated/Deprecation.ts | WindowPlacementPermissionDescriptorUsed":{"message":"权限描述符 window-placement 已被弃用。请改用 window-management。如需更多帮助,请访问 https://bit.ly/window-placement-rename。"},"generated/Deprecation.ts | WindowPlacementPermissionPolicyParsed":{"message":"权限政策 window-placement 已被弃用。请改用 window-management。如需更多帮助,请访问 https://bit.ly/window-placement-rename。"},"generated/Deprecation.ts | XHRJSONEncodingDetection":{"message":"XMLHttpRequest 中的响应 JSON 不再支持 UTF-16"},"generated/Deprecation.ts | XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload":{"message":"主线程上的同步 XMLHttpRequest 已被弃用,因为它会对最终用户的体验产生不利影响。如需更多帮助,请访问 https://xhr.spec.whatwg.org/。"},"generated/Deprecation.ts | XRSupportsSession":{"message":"supportsSession() 已被弃用。请改用 isSessionSupported() 并查看已解析的布尔值。"},"models/bindings/ContentProviderBasedProject.ts | unknownErrorLoadingFile":{"message":"加载文件时发生未知错误"},"models/bindings/DebuggerLanguagePlugins.ts | debugSymbolsIncomplete":{"message":"函数“{PH1}”的调试信息不完整"},"models/bindings/DebuggerLanguagePlugins.ts | errorInDebuggerLanguagePlugin":{"message":"调试程序语言插件发生错误:{PH1}"},"models/bindings/DebuggerLanguagePlugins.ts | failedToLoadDebugSymbolsFor":{"message":"[{PH1}] 无法加载 {PH2} 的调试符号({PH3})"},"models/bindings/DebuggerLanguagePlugins.ts | failedToLoadDebugSymbolsForFunction":{"message":"未找到函数“{PH1}”的调试信息"},"models/bindings/DebuggerLanguagePlugins.ts | loadedDebugSymbolsForButDidnt":{"message":"[{PH1}] 已加载 {PH2} 的调试符号,但找不到任何源文件"},"models/bindings/DebuggerLanguagePlugins.ts | loadedDebugSymbolsForFound":{"message":"[{PH1}] 已加载 {PH2} 的调试符号,找到了 {PH3} 个源文件"},"models/bindings/DebuggerLanguagePlugins.ts | loadingDebugSymbolsFor":{"message":"[{PH1}] 正在加载 {PH2} 的调试符号…"},"models/bindings/DebuggerLanguagePlugins.ts | loadingDebugSymbolsForVia":{"message":"[{PH1}] 正在通过 {PH3} 加载 {PH2} 的调试符号…"},"models/bindings/IgnoreListManager.ts | addAllContentScriptsToIgnoreList":{"message":"将所有扩展程序脚本添加到忽略列表"},"models/bindings/IgnoreListManager.ts | addAllThirdPartyScriptsToIgnoreList":{"message":"将所有第三方脚本添加到忽略列表"},"models/bindings/IgnoreListManager.ts | addDirectoryToIgnoreList":{"message":"将目录添加到忽略列表"},"models/bindings/IgnoreListManager.ts | addScriptToIgnoreList":{"message":"向忽略列表添加脚本"},"models/bindings/IgnoreListManager.ts | removeFromIgnoreList":{"message":"从忽略列表中移除"},"models/bindings/ResourceScriptMapping.ts | liveEditCompileFailed":{"message":"LiveEdit 编译失败:{PH1}"},"models/bindings/ResourceScriptMapping.ts | liveEditFailed":{"message":"LiveEdit 失败:{PH1}"},"models/emulation/DeviceModeModel.ts | devicePixelRatioMustBeANumberOr":{"message":"设备像素比必须为数字或为空。"},"models/emulation/DeviceModeModel.ts | devicePixelRatioMustBeGreater":{"message":"设备像素比必须大于或等于 {PH1}。"},"models/emulation/DeviceModeModel.ts | devicePixelRatioMustBeLessThanOr":{"message":"设备像素比必须小于或等于 {PH1}。"},"models/emulation/DeviceModeModel.ts | heightMustBeANumber":{"message":"高度必须是数字。"},"models/emulation/DeviceModeModel.ts | heightMustBeGreaterThanOrEqualTo":{"message":"高度必须大于或等于 {PH1}。"},"models/emulation/DeviceModeModel.ts | heightMustBeLessThanOrEqualToS":{"message":"高度必须小于或等于 {PH1}。"},"models/emulation/DeviceModeModel.ts | widthMustBeANumber":{"message":"宽度必须是数字。"},"models/emulation/DeviceModeModel.ts | widthMustBeGreaterThanOrEqualToS":{"message":"宽度必须大于或等于 {PH1}。"},"models/emulation/DeviceModeModel.ts | widthMustBeLessThanOrEqualToS":{"message":"宽度必须小于或等于 {PH1}。"},"models/emulation/EmulatedDevices.ts | laptopWithHiDPIScreen":{"message":"配有 HiDPI 屏幕的笔记本电脑"},"models/emulation/EmulatedDevices.ts | laptopWithMDPIScreen":{"message":"配有 MDPI 屏幕的笔记本电脑"},"models/emulation/EmulatedDevices.ts | laptopWithTouch":{"message":"配有触控装置的笔记本电脑"},"models/har/Writer.ts | collectingContent":{"message":"正在收集内容…"},"models/har/Writer.ts | writingFile":{"message":"正在写入文件…"},"models/issues_manager/BounceTrackingIssue.ts | bounceTrackingMitigations":{"message":"跳出跟踪缓解措施"},"models/issues_manager/ClientHintIssue.ts | clientHintsInfrastructure":{"message":"客户端提示基础架构"},"models/issues_manager/ContentSecurityPolicyIssue.ts | contentSecurityPolicyEval":{"message":"内容安全政策 - Eval"},"models/issues_manager/ContentSecurityPolicyIssue.ts | contentSecurityPolicyInlineCode":{"message":"内容安全政策 - 内嵌代码"},"models/issues_manager/ContentSecurityPolicyIssue.ts | contentSecurityPolicySource":{"message":"内容安全政策 - 来源许可名单"},"models/issues_manager/ContentSecurityPolicyIssue.ts | trustedTypesFixViolations":{"message":"Trusted Types - 修正违规问题"},"models/issues_manager/ContentSecurityPolicyIssue.ts | trustedTypesPolicyViolation":{"message":"Trusted Types - 违反政策"},"models/issues_manager/CookieIssue.ts | aSecure":{"message":"安全的"},"models/issues_manager/CookieIssue.ts | anInsecure":{"message":"不安全的"},"models/issues_manager/CookieIssue.ts | firstPartySetsExplained":{"message":"First-Party Sets 和 SameParty 属性"},"models/issues_manager/CookieIssue.ts | howSchemefulSamesiteWorks":{"message":"Schemeful Same-Site 的运作方式"},"models/issues_manager/CookieIssue.ts | samesiteCookiesExplained":{"message":"SameSite Cookie 说明"},"models/issues_manager/CorsIssue.ts | CORS":{"message":"跨域资源共享 (CORS)"},"models/issues_manager/CorsIssue.ts | corsPrivateNetworkAccess":{"message":"专用网络访问"},"models/issues_manager/CrossOriginEmbedderPolicyIssue.ts | coopAndCoep":{"message":"COOP 和 COEP"},"models/issues_manager/CrossOriginEmbedderPolicyIssue.ts | samesiteAndSameorigin":{"message":"Same-Site 和 Same-Origin"},"models/issues_manager/DeprecationIssue.ts | feature":{"message":"如需了解详情,请参阅功能状态页面。"},"models/issues_manager/DeprecationIssue.ts | milestone":{"message":"此变更将从里程碑 {milestone} 生效。"},"models/issues_manager/DeprecationIssue.ts | title":{"message":"使用了已弃用的功能"},"models/issues_manager/FederatedAuthRequestIssue.ts | fedCm":{"message":"Federated Credential Management API"},"models/issues_manager/GenericIssue.ts | autocompleteAttributePageTitle":{"message":"HTML 属性:自动补全"},"models/issues_manager/GenericIssue.ts | crossOriginPortalPostMessage":{"message":"门户 - 同源通信渠道"},"models/issues_manager/GenericIssue.ts | howDoesAutofillWorkPageTitle":{"message":"自动填充功能是如何运作的?"},"models/issues_manager/GenericIssue.ts | inputFormElementPageTitle":{"message":"表单输入元素"},"models/issues_manager/GenericIssue.ts | labelFormlementsPageTitle":{"message":"标签元素"},"models/issues_manager/HeavyAdIssue.ts | handlingHeavyAdInterventions":{"message":"针对消耗过多资源的广告的干预措施"},"models/issues_manager/Issue.ts | breakingChangeIssue":{"message":"破坏性更改问题:网页在即将发布的 Chrome 版本中可能无法正常运行"},"models/issues_manager/Issue.ts | breakingChanges":{"message":"重大变更"},"models/issues_manager/Issue.ts | improvementIssue":{"message":"可改进的问题:网页有改进空间"},"models/issues_manager/Issue.ts | improvements":{"message":"改进"},"models/issues_manager/Issue.ts | pageErrorIssue":{"message":"网页错误问题:网页无法正常运行"},"models/issues_manager/Issue.ts | pageErrors":{"message":"网页错误"},"models/issues_manager/LowTextContrastIssue.ts | colorAndContrastAccessibility":{"message":"颜色和对比度无障碍功能"},"models/issues_manager/MixedContentIssue.ts | preventingMixedContent":{"message":"防止混合内容"},"models/issues_manager/NavigatorUserAgentIssue.ts | userAgentReduction":{"message":"用户代理字符串缩短"},"models/issues_manager/QuirksModeIssue.ts | documentCompatibilityMode":{"message":"文档兼容模式"},"models/issues_manager/SharedArrayBufferIssue.ts | enablingSharedArrayBuffer":{"message":"启用 SharedArrayBuffer"},"models/logs/NetworkLog.ts | anonymous":{"message":"<匿名>"},"models/logs/logs-meta.ts | clear":{"message":"清除"},"models/logs/logs-meta.ts | doNotPreserveLogOnPageReload":{"message":"重新加载/浏览网页时不保留日志"},"models/logs/logs-meta.ts | preserve":{"message":"保留"},"models/logs/logs-meta.ts | preserveLog":{"message":"保留日志"},"models/logs/logs-meta.ts | preserveLogOnPageReload":{"message":"重新加载/浏览网页时保留日志"},"models/logs/logs-meta.ts | recordNetworkLog":{"message":"录制网络日志"},"models/logs/logs-meta.ts | reset":{"message":"重置"},"models/persistence/EditFileSystemView.ts | add":{"message":"添加"},"models/persistence/EditFileSystemView.ts | enterAPath":{"message":"输入路径"},"models/persistence/EditFileSystemView.ts | enterAUniquePath":{"message":"请输入唯一路径"},"models/persistence/EditFileSystemView.ts | excludedFolders":{"message":"排除的文件夹"},"models/persistence/EditFileSystemView.ts | folderPath":{"message":"文件夹路径"},"models/persistence/EditFileSystemView.ts | none":{"message":"无"},"models/persistence/EditFileSystemView.ts | sViaDevtools":{"message":"{PH1}(通过 .devtools)"},"models/persistence/IsolatedFileSystem.ts | blobCouldNotBeLoaded":{"message":"无法加载 blob。"},"models/persistence/IsolatedFileSystem.ts | cantReadFileSS":{"message":"无法读取文件:{PH1} - {PH2}"},"models/persistence/IsolatedFileSystem.ts | fileSystemErrorS":{"message":"文件系统错误:{PH1}"},"models/persistence/IsolatedFileSystem.ts | linkedToS":{"message":"已链接到 {PH1}"},"models/persistence/IsolatedFileSystem.ts | unknownErrorReadingFileS":{"message":"读取以下文件时发生未知错误:{PH1}"},"models/persistence/IsolatedFileSystemManager.ts | unableToAddFilesystemS":{"message":"无法添加文件系统:{PH1}"},"models/persistence/PersistenceActions.ts | openInContainingFolder":{"message":"在包含此文件的文件夹中打开"},"models/persistence/PersistenceActions.ts | saveAs":{"message":"另存为…"},"models/persistence/PersistenceActions.ts | saveForOverrides":{"message":"保存并覆盖"},"models/persistence/PersistenceActions.ts | saveImage":{"message":"保存图片"},"models/persistence/PersistenceUtils.ts | linkedToS":{"message":"已链接到 {PH1}"},"models/persistence/PersistenceUtils.ts | linkedToSourceMapS":{"message":"已链接到来源映射的网址:{PH1}"},"models/persistence/PlatformFileSystem.ts | unableToReadFilesWithThis":{"message":"PlatformFileSystem 无法读取文件。"},"models/persistence/WorkspaceSettingsTab.ts | addFolder":{"message":"添加文件夹…"},"models/persistence/WorkspaceSettingsTab.ts | folderExcludePattern":{"message":"文件夹排除模式"},"models/persistence/WorkspaceSettingsTab.ts | mappingsAreInferredAutomatically":{"message":"映射是系统自动推断出的。"},"models/persistence/WorkspaceSettingsTab.ts | remove":{"message":"移除"},"models/persistence/WorkspaceSettingsTab.ts | workspace":{"message":"工作区"},"models/persistence/persistence-meta.ts | disableOverrideNetworkRequests":{"message":"禁止替换网络请求"},"models/persistence/persistence-meta.ts | enableLocalOverrides":{"message":"启用本地替换"},"models/persistence/persistence-meta.ts | enableOverrideNetworkRequests":{"message":"启用覆盖网络请求"},"models/persistence/persistence-meta.ts | interception":{"message":"拦截"},"models/persistence/persistence-meta.ts | network":{"message":"网络"},"models/persistence/persistence-meta.ts | override":{"message":"override"},"models/persistence/persistence-meta.ts | request":{"message":"请求"},"models/persistence/persistence-meta.ts | rewrite":{"message":"重写"},"models/persistence/persistence-meta.ts | showWorkspace":{"message":"显示工作区"},"models/persistence/persistence-meta.ts | workspace":{"message":"工作区"},"models/timeline_model/TimelineJSProfile.ts | threadS":{"message":"线程 {PH1}"},"models/timeline_model/TimelineModel.ts | bidderWorklet":{"message":"出价方 Worklet"},"models/timeline_model/TimelineModel.ts | bidderWorkletS":{"message":"出价方 Worklet - {PH1}"},"models/timeline_model/TimelineModel.ts | dedicatedWorker":{"message":"专用 Worker"},"models/timeline_model/TimelineModel.ts | sellerWorklet":{"message":"卖方 Worklet"},"models/timeline_model/TimelineModel.ts | sellerWorkletS":{"message":"卖方 Worklet - {PH1}"},"models/timeline_model/TimelineModel.ts | threadS":{"message":"线程 {PH1}"},"models/timeline_model/TimelineModel.ts | unknownWorklet":{"message":"竞价 Worklet"},"models/timeline_model/TimelineModel.ts | unknownWorkletS":{"message":"竞价 Worklet - {PH1}"},"models/timeline_model/TimelineModel.ts | workerS":{"message":"Worker - {PH1}"},"models/timeline_model/TimelineModel.ts | workerSS":{"message":"Worker:{PH1} - {PH2}"},"models/timeline_model/TimelineModel.ts | workletService":{"message":"竞价 Worklet 服务"},"models/timeline_model/TimelineModel.ts | workletServiceS":{"message":"竞价 Worklet 服务 - {PH1}"},"models/workspace/UISourceCode.ts | index":{"message":"(索引)"},"models/workspace/UISourceCode.ts | thisFileWasChangedExternally":{"message":"此文件已在外部发生更改。是否要重新加载?"},"panels/accessibility/ARIAAttributesView.ts | ariaAttributes":{"message":"ARIA 属性"},"panels/accessibility/ARIAAttributesView.ts | noAriaAttributes":{"message":"没有任何 ARIA 属性"},"panels/accessibility/AXBreadcrumbsPane.ts | accessibilityTree":{"message":"无障碍功能树"},"panels/accessibility/AXBreadcrumbsPane.ts | fullTreeExperimentDescription":{"message":"无障碍功能树已移至 DOM 树的右上角。"},"panels/accessibility/AXBreadcrumbsPane.ts | fullTreeExperimentName":{"message":"启用整页模式的无障碍功能树"},"panels/accessibility/AXBreadcrumbsPane.ts | ignored":{"message":"已忽略"},"panels/accessibility/AXBreadcrumbsPane.ts | reloadRequired":{"message":"需要重新加载才能使更改生效。"},"panels/accessibility/AXBreadcrumbsPane.ts | scrollIntoView":{"message":"滚动到视野范围内"},"panels/accessibility/AccessibilityNodeView.ts | accessibilityNodeNotExposed":{"message":"未公开无障碍功能节点"},"panels/accessibility/AccessibilityNodeView.ts | ancestorChildrenAreAll":{"message":"祖先的后代均为展示性元素:"},"panels/accessibility/AccessibilityNodeView.ts | computedProperties":{"message":"计算后的属性"},"panels/accessibility/AccessibilityNodeView.ts | elementHasEmptyAltText":{"message":"元素包含空的替代文本。"},"panels/accessibility/AccessibilityNodeView.ts | elementHasPlaceholder":{"message":"元素包含 {PH1}。"},"panels/accessibility/AccessibilityNodeView.ts | elementIsHiddenBy":{"message":"元素已被正在使用的模态对话框隐藏:"},"panels/accessibility/AccessibilityNodeView.ts | elementIsInAnInertSubTree":{"message":"此元素位于具有 inert 属性的子树中:"},"panels/accessibility/AccessibilityNodeView.ts | elementIsInert":{"message":"元素为 inert。"},"panels/accessibility/AccessibilityNodeView.ts | elementIsNotRendered":{"message":"元素未渲染。"},"panels/accessibility/AccessibilityNodeView.ts | elementIsNotVisible":{"message":"元素不可见。"},"panels/accessibility/AccessibilityNodeView.ts | elementIsPlaceholder":{"message":"元素为 {PH1}。"},"panels/accessibility/AccessibilityNodeView.ts | elementIsPresentational":{"message":"这是一个演示性元素。"},"panels/accessibility/AccessibilityNodeView.ts | elementNotInteresting":{"message":"无障碍功能引擎不感兴趣的元素。"},"panels/accessibility/AccessibilityNodeView.ts | elementsInheritsPresentational":{"message":"元素从以下项目继承展示性角色:"},"panels/accessibility/AccessibilityNodeView.ts | invalidSource":{"message":"来源无效。"},"panels/accessibility/AccessibilityNodeView.ts | labelFor":{"message":"标签所属元素"},"panels/accessibility/AccessibilityNodeView.ts | noAccessibilityNode":{"message":"没有无障碍功能节点"},"panels/accessibility/AccessibilityNodeView.ts | noNodeWithThisId":{"message":"未找到此 ID 对应的节点。"},"panels/accessibility/AccessibilityNodeView.ts | noTextContent":{"message":"无文本内容。"},"panels/accessibility/AccessibilityNodeView.ts | notSpecified":{"message":"未指定"},"panels/accessibility/AccessibilityNodeView.ts | partOfLabelElement":{"message":"属于标签元素:"},"panels/accessibility/AccessibilityNodeView.ts | placeholderIsPlaceholderOnAncestor":{"message":"在祖先节点上 {PH1} 为 {PH2}:"},"panels/accessibility/AccessibilityStrings.ts | aHumanreadableVersionOfTheValue":{"message":"简单易懂的范围微件值(如有必要)。"},"panels/accessibility/AccessibilityStrings.ts | activeDescendant":{"message":"活跃后代"},"panels/accessibility/AccessibilityStrings.ts | atomicLiveRegions":{"message":"Atomic(动态区域)"},"panels/accessibility/AccessibilityStrings.ts | busyLiveRegions":{"message":"Busy(动态区域)"},"panels/accessibility/AccessibilityStrings.ts | canSetValue":{"message":"可以设置值"},"panels/accessibility/AccessibilityStrings.ts | checked":{"message":"已选中"},"panels/accessibility/AccessibilityStrings.ts | contents":{"message":"目录"},"panels/accessibility/AccessibilityStrings.ts | controls":{"message":"控件"},"panels/accessibility/AccessibilityStrings.ts | describedBy":{"message":"说明元素"},"panels/accessibility/AccessibilityStrings.ts | description":{"message":"说明"},"panels/accessibility/AccessibilityStrings.ts | disabled":{"message":"已停用"},"panels/accessibility/AccessibilityStrings.ts | editable":{"message":"可修改"},"panels/accessibility/AccessibilityStrings.ts | elementOrElementsWhichFormThe":{"message":"一个或多个构成此元素的说明的元素。"},"panels/accessibility/AccessibilityStrings.ts | elementOrElementsWhichMayFormThe":{"message":"此元素的名称中可能包含的一个或多个元素。"},"panels/accessibility/AccessibilityStrings.ts | elementOrElementsWhichShouldBe":{"message":"一个或多个应视为此元素的子项(尽管不是 DOM 中的子项)的元素。"},"panels/accessibility/AccessibilityStrings.ts | elementOrElementsWhoseContentOr":{"message":"内容或存在状态由此微件控制的一个或多个元素。"},"panels/accessibility/AccessibilityStrings.ts | elementToWhichTheUserMayChooseTo":{"message":"用户在转到当前元素后可以选择转到的元素,而非按 DOM 顺序的下一个元素。"},"panels/accessibility/AccessibilityStrings.ts | expanded":{"message":"已展开"},"panels/accessibility/AccessibilityStrings.ts | focusable":{"message":"可聚焦"},"panels/accessibility/AccessibilityStrings.ts | focused":{"message":"已聚焦"},"panels/accessibility/AccessibilityStrings.ts | forARangeWidgetTheMaximumAllowed":{"message":"(针对范围微件)允许的最大值。"},"panels/accessibility/AccessibilityStrings.ts | forARangeWidgetTheMinimumAllowed":{"message":"(针对范围微件)允许的最小值。"},"panels/accessibility/AccessibilityStrings.ts | fromAttribute":{"message":"所属的属性"},"panels/accessibility/AccessibilityStrings.ts | fromCaption":{"message":"来自 caption"},"panels/accessibility/AccessibilityStrings.ts | fromDescription":{"message":"源自:description"},"panels/accessibility/AccessibilityStrings.ts | fromLabel":{"message":"来自 label"},"panels/accessibility/AccessibilityStrings.ts | fromLabelFor":{"message":"来自 label(for= 属性)"},"panels/accessibility/AccessibilityStrings.ts | fromLabelWrapped":{"message":"来自封装该元素的 label"},"panels/accessibility/AccessibilityStrings.ts | fromLegend":{"message":"来自 legend"},"panels/accessibility/AccessibilityStrings.ts | fromNativeHtml":{"message":"来自原生 HTML"},"panels/accessibility/AccessibilityStrings.ts | fromPlaceholderAttribute":{"message":"所属的占位符属性"},"panels/accessibility/AccessibilityStrings.ts | fromRubyAnnotation":{"message":"来自 Ruby 注解"},"panels/accessibility/AccessibilityStrings.ts | fromStyle":{"message":"所属样式"},"panels/accessibility/AccessibilityStrings.ts | fromTitle":{"message":"From title"},"panels/accessibility/AccessibilityStrings.ts | hasAutocomplete":{"message":"支持自动补全"},"panels/accessibility/AccessibilityStrings.ts | hasPopup":{"message":"带有弹出式组件"},"panels/accessibility/AccessibilityStrings.ts | help":{"message":"帮助"},"panels/accessibility/AccessibilityStrings.ts | ifAndHowThisElementCanBeEdited":{"message":"此元素是否可修改以及如何修改。"},"panels/accessibility/AccessibilityStrings.ts | ifThisElementMayReceiveLive":{"message":"如果此元素可能接收到实时更新,用户是否会在变更时看到整个实时区域,还是仅看到变更的节点。"},"panels/accessibility/AccessibilityStrings.ts | ifThisElementMayReceiveLiveUpdates":{"message":"如果此元素可能接收到实时更新,哪些类型的更新应触发通知。"},"panels/accessibility/AccessibilityStrings.ts | ifThisElementMayReceiveLiveUpdatesThe":{"message":"如果此元素可以收到实时更新,它即是所在动态区域的根元素。"},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementCanReceiveFocus":{"message":"若为 true,则此元素可以获得焦点。"},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementCurrentlyCannot":{"message":"若为 true,则当前无法与此元素交互。"},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementCurrentlyHas":{"message":"如果为 true,则表示此元素目前已获得焦点。"},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementMayBeInteracted":{"message":"若为 true,那么您可以与此元素进行交互,但其值无法更改。"},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementsUserentered":{"message":"如果为 true,用户为此元素输入的值便不符合验证要求。"},"panels/accessibility/AccessibilityStrings.ts | implicit":{"message":"隐式"},"panels/accessibility/AccessibilityStrings.ts | implicitValue":{"message":"隐式值。"},"panels/accessibility/AccessibilityStrings.ts | indicatesThePurposeOfThisElement":{"message":"指示此元素的用途,例如微件的界面习语,或文档内的结构角色。"},"panels/accessibility/AccessibilityStrings.ts | invalidUserEntry":{"message":"用户输入无效"},"panels/accessibility/AccessibilityStrings.ts | labeledBy":{"message":"标签添加者:"},"panels/accessibility/AccessibilityStrings.ts | level":{"message":"级别"},"panels/accessibility/AccessibilityStrings.ts | liveRegion":{"message":"实时区域"},"panels/accessibility/AccessibilityStrings.ts | liveRegionRoot":{"message":"动态区域的根级"},"panels/accessibility/AccessibilityStrings.ts | maximumValue":{"message":"最大值"},"panels/accessibility/AccessibilityStrings.ts | minimumValue":{"message":"最小值"},"panels/accessibility/AccessibilityStrings.ts | multiline":{"message":"多行"},"panels/accessibility/AccessibilityStrings.ts | multiselectable":{"message":"可多选"},"panels/accessibility/AccessibilityStrings.ts | orientation":{"message":"方向"},"panels/accessibility/AccessibilityStrings.ts | pressed":{"message":"已按下"},"panels/accessibility/AccessibilityStrings.ts | readonlyString":{"message":"只读"},"panels/accessibility/AccessibilityStrings.ts | relatedElement":{"message":"相关元素"},"panels/accessibility/AccessibilityStrings.ts | relevantLiveRegions":{"message":"相关(动态区域)"},"panels/accessibility/AccessibilityStrings.ts | requiredString":{"message":"必需"},"panels/accessibility/AccessibilityStrings.ts | role":{"message":"角色"},"panels/accessibility/AccessibilityStrings.ts | selectedString":{"message":"已选择"},"panels/accessibility/AccessibilityStrings.ts | theAccessibleDescriptionForThis":{"message":"此元素的可访问说明。"},"panels/accessibility/AccessibilityStrings.ts | theComputedHelpTextForThis":{"message":"此元素经计算得出的帮助文本。"},"panels/accessibility/AccessibilityStrings.ts | theComputedNameOfThisElement":{"message":"此元素经计算得出的名称。"},"panels/accessibility/AccessibilityStrings.ts | theDescendantOfThisElementWhich":{"message":"此元素的活跃后代;即应向其委托焦点的元素。"},"panels/accessibility/AccessibilityStrings.ts | theHierarchicalLevelOfThis":{"message":"此元素的层级。"},"panels/accessibility/AccessibilityStrings.ts | theValueOfThisElementThisMayBe":{"message":"此元素的值;可以由用户或开发者提供,视元素而定。"},"panels/accessibility/AccessibilityStrings.ts | value":{"message":"值"},"panels/accessibility/AccessibilityStrings.ts | valueDescription":{"message":"值说明"},"panels/accessibility/AccessibilityStrings.ts | valueFromAttribute":{"message":"来自属性的值。"},"panels/accessibility/AccessibilityStrings.ts | valueFromDescriptionElement":{"message":"来自 description 元素的值。"},"panels/accessibility/AccessibilityStrings.ts | valueFromElementContents":{"message":"来自元素内容的值。"},"panels/accessibility/AccessibilityStrings.ts | valueFromFigcaptionElement":{"message":"来自 figcaption 元素的值。"},"panels/accessibility/AccessibilityStrings.ts | valueFromLabelElement":{"message":"来自 label 元素的值。"},"panels/accessibility/AccessibilityStrings.ts | valueFromLabelElementWithFor":{"message":"来自具有 for= 属性的 label 元素的值。"},"panels/accessibility/AccessibilityStrings.ts | valueFromLabelElementWrapped":{"message":"来自封装该元素的 label 元素的值。"},"panels/accessibility/AccessibilityStrings.ts | valueFromLegendElement":{"message":"来自 legend 元素的值。"},"panels/accessibility/AccessibilityStrings.ts | valueFromNativeHtmlRuby":{"message":"来自普通 HTML Ruby 注解的值。"},"panels/accessibility/AccessibilityStrings.ts | valueFromNativeHtmlUnknownSource":{"message":"来自原生 HTML 的值(未知来源)。"},"panels/accessibility/AccessibilityStrings.ts | valueFromPlaceholderAttribute":{"message":"来自 placeholder 属性的值。"},"panels/accessibility/AccessibilityStrings.ts | valueFromRelatedElement":{"message":"相关元素中的值。"},"panels/accessibility/AccessibilityStrings.ts | valueFromStyle":{"message":"来自样式的值。"},"panels/accessibility/AccessibilityStrings.ts | valueFromTableCaption":{"message":"来自 table caption 的值。"},"panels/accessibility/AccessibilityStrings.ts | valueFromTitleAttribute":{"message":"来自标题属性的值。"},"panels/accessibility/AccessibilityStrings.ts | whetherAUserMaySelectMoreThanOne":{"message":"用户是否会从此微件选择多个选项。"},"panels/accessibility/AccessibilityStrings.ts | whetherAndWhatPriorityOfLive":{"message":"此元素是否需要实时更新以及需要何种实时更新优先级。"},"panels/accessibility/AccessibilityStrings.ts | whetherAndWhatTypeOfAutocomplete":{"message":"此元素目前是否提供了自动补全建议以及提供了何种自动补全建议。"},"panels/accessibility/AccessibilityStrings.ts | whetherTheOptionRepresentedBy":{"message":"目前是否已选择此元素所表示的选项。"},"panels/accessibility/AccessibilityStrings.ts | whetherTheValueOfThisElementCan":{"message":"是否可以设置此元素的值。"},"panels/accessibility/AccessibilityStrings.ts | whetherThisCheckboxRadioButtonOr":{"message":"此复选框、单选按钮或树状目录项处于选中状态、未选中状态还是混合状态(例如,既有已选中的子级,也有未选中的子级)。"},"panels/accessibility/AccessibilityStrings.ts | whetherThisElementHasCausedSome":{"message":"此元素是否导致某类内容(例如菜单)弹出。"},"panels/accessibility/AccessibilityStrings.ts | whetherThisElementIsARequired":{"message":"此元素是否为表单中的必填字段。"},"panels/accessibility/AccessibilityStrings.ts | whetherThisElementOrAnother":{"message":"此元素或它控制的另一个分组元素是否已展开。"},"panels/accessibility/AccessibilityStrings.ts | whetherThisElementOrItsSubtree":{"message":"此元素或其子树当前是否正在更新(因此可能状态不一致)。"},"panels/accessibility/AccessibilityStrings.ts | whetherThisLinearElements":{"message":"此线性元素的方向是水平方向还是垂直方向。"},"panels/accessibility/AccessibilityStrings.ts | whetherThisTextBoxMayHaveMore":{"message":"此文本框是否可以拥有超过一行内容。"},"panels/accessibility/AccessibilityStrings.ts | whetherThisToggleButtonIs":{"message":"此切换按钮当前是否处于已按下状态。"},"panels/accessibility/SourceOrderView.ts | noSourceOrderInformation":{"message":"无可用的源代码顺序信息"},"panels/accessibility/SourceOrderView.ts | showSourceOrder":{"message":"显示源代码顺序"},"panels/accessibility/SourceOrderView.ts | sourceOrderViewer":{"message":"来源顺序查看器"},"panels/accessibility/SourceOrderView.ts | thereMayBeADelayInDisplaying":{"message":"在为包含很多子项的元素显示源代码顺序时,可能会有延迟"},"panels/accessibility/accessibility-meta.ts | accessibility":{"message":"无障碍功能"},"panels/accessibility/accessibility-meta.ts | shoAccessibility":{"message":"显示“无障碍功能”"},"panels/animation/AnimationTimeline.ts | animationPreviewS":{"message":"动画预览 {PH1}"},"panels/animation/AnimationTimeline.ts | animationPreviews":{"message":"动画预览"},"panels/animation/AnimationTimeline.ts | clearAll":{"message":"全部清除"},"panels/animation/AnimationTimeline.ts | pause":{"message":"暂停"},"panels/animation/AnimationTimeline.ts | pauseAll":{"message":"全部暂停"},"panels/animation/AnimationTimeline.ts | pauseTimeline":{"message":"暂停时间轴"},"panels/animation/AnimationTimeline.ts | playTimeline":{"message":"播放时间轴"},"panels/animation/AnimationTimeline.ts | playbackRatePlaceholder":{"message":"{PH1}%"},"panels/animation/AnimationTimeline.ts | playbackRates":{"message":"播放速率"},"panels/animation/AnimationTimeline.ts | replayTimeline":{"message":"重放时间轴"},"panels/animation/AnimationTimeline.ts | resumeAll":{"message":"全部恢复"},"panels/animation/AnimationTimeline.ts | selectAnEffectAboveToInspectAnd":{"message":"从上方选择一种效果以检查和修改。"},"panels/animation/AnimationTimeline.ts | setSpeedToS":{"message":"将速度设为 {PH1}"},"panels/animation/AnimationTimeline.ts | waitingForAnimations":{"message":"正在等待动画…"},"panels/animation/AnimationUI.ts | animationEndpointSlider":{"message":"动画端点滑块"},"panels/animation/AnimationUI.ts | animationKeyframeSlider":{"message":"动画关键帧滑块"},"panels/animation/AnimationUI.ts | sSlider":{"message":"{PH1} 滑块"},"panels/animation/animation-meta.ts | animations":{"message":"动画"},"panels/animation/animation-meta.ts | showAnimations":{"message":"显示“动画”工具"},"panels/application/AppManifestView.ts | aUrlInTheManifestContainsA":{"message":"清单中的某个网址包含用户名、密码或端口"},"panels/application/AppManifestView.ts | actualHeightSpxOfSSDoesNotMatch":{"message":"{PH2} {PH3} 的实际高度({PH1} 像素)与指定高度({PH4} 像素)不匹配"},"panels/application/AppManifestView.ts | actualSizeSspxOfSSDoesNotMatch":{"message":"{PH3} {PH4} 的实际大小({PH1}×{PH2} 像素)与指定大小({PH5}×{PH6} 像素)不一致"},"panels/application/AppManifestView.ts | actualWidthSpxOfSSDoesNotMatch":{"message":"{PH2} {PH3} 的实际宽度({PH1} 像素)与指定宽度({PH4} 像素)不一致"},"panels/application/AppManifestView.ts | appIdExplainer":{"message":"浏览器会根据此 ID 判断清单是否应该更新现有应用,或者清单是否引用的是可安装的新 Web 应用。"},"panels/application/AppManifestView.ts | appIdNote":{"message":"{PH1}您未在清单中指定 {PH2},而是使用了 {PH3}。若要指定一个与当前标识符匹配的应用 ID,请将“{PH4}”字段设为 {PH5}{PH6}。"},"panels/application/AppManifestView.ts | avoidPurposeAnyAndMaskable":{"message":"最好不要使用“purpose: \"any maskable\"”来声明图标。否则,相应图标可能会因内边距过大或过小而无法在某些平台上正确显示。"},"panels/application/AppManifestView.ts | backgroundColor":{"message":"背景颜色"},"panels/application/AppManifestView.ts | computedAppId":{"message":"计算出的应用 Id"},"panels/application/AppManifestView.ts | copiedToClipboard":{"message":"已将建议 ID {PH1} 复制到剪贴板"},"panels/application/AppManifestView.ts | copyToClipboard":{"message":"复制到剪贴板"},"panels/application/AppManifestView.ts | couldNotCheckServiceWorker":{"message":"如果清单不含“start_url”字段,则无法检查 service worker"},"panels/application/AppManifestView.ts | couldNotDownloadARequiredIcon":{"message":"无法从清单下载必需的图标"},"panels/application/AppManifestView.ts | darkBackgroundColor":{"message":"深色背景颜色"},"panels/application/AppManifestView.ts | darkThemeColor":{"message":"深色主题颜色"},"panels/application/AppManifestView.ts | description":{"message":"说明"},"panels/application/AppManifestView.ts | descriptionMayBeTruncated":{"message":"说明可能被截断了。"},"panels/application/AppManifestView.ts | display":{"message":"显示"},"panels/application/AppManifestView.ts | documentationOnMaskableIcons":{"message":"有关可遮罩式图标的文档"},"panels/application/AppManifestView.ts | downloadedIconWasEmptyOr":{"message":"下载的图标为空或已损坏"},"panels/application/AppManifestView.ts | errorsAndWarnings":{"message":"错误和警告"},"panels/application/AppManifestView.ts | icon":{"message":"图标"},"panels/application/AppManifestView.ts | icons":{"message":"图标"},"panels/application/AppManifestView.ts | identity":{"message":"身份"},"panels/application/AppManifestView.ts | imageFromS":{"message":"图片来自 {PH1}"},"panels/application/AppManifestView.ts | installability":{"message":"可安装性"},"panels/application/AppManifestView.ts | learnMore":{"message":"了解详情"},"panels/application/AppManifestView.ts | manifestContainsDisplayoverride":{"message":"清单包含“display_override”字段,并且第一个受支持的显示模式必须是“standalone”、“fullscreen”或“minimal-ui”之一"},"panels/application/AppManifestView.ts | manifestCouldNotBeFetchedIsEmpty":{"message":"清单无法提取、为空或无法解析"},"panels/application/AppManifestView.ts | manifestDisplayPropertyMustBeOne":{"message":"清单“display”属性必须是“standalone”、“fullscreen”或“minimal-ui”之一"},"panels/application/AppManifestView.ts | manifestDoesNotContainANameOr":{"message":"清单未包含“name”或“short_name”字段"},"panels/application/AppManifestView.ts | manifestDoesNotContainASuitable":{"message":"清单未包含合适的图标 - 必须采用 PNG、SVG 或 WebP 格式,且大小至少要为 {PH1} 像素;必须设置“sizes”属性;如果设置了“purpose”属性,其中必须包含“any”。"},"panels/application/AppManifestView.ts | manifestSpecifies":{"message":"清单指定了“prefer_related_applications: true”"},"panels/application/AppManifestView.ts | manifestStartUrlIsNotValid":{"message":"清单“start_URL”无效"},"panels/application/AppManifestView.ts | name":{"message":"名称"},"panels/application/AppManifestView.ts | needHelpReadOurS":{"message":"需要帮助?请阅读 {PH1} 上的文章。"},"panels/application/AppManifestView.ts | newNoteUrl":{"message":"新备注网址"},"panels/application/AppManifestView.ts | noPlayStoreIdProvided":{"message":"未提供 Play 商店 ID"},"panels/application/AppManifestView.ts | noSuppliedIconIsAtLeastSpxSquare":{"message":"未提供满足以下所有条件的图标:至少为 {PH1} 像素的正方形图标,采用 PNG、SVG 或 WebP 格式,而且 purpose 属性未设置或已设为“any”。"},"panels/application/AppManifestView.ts | note":{"message":"注意:"},"panels/application/AppManifestView.ts | orientation":{"message":"方向"},"panels/application/AppManifestView.ts | pageDoesNotWorkOffline":{"message":"该网页无法离线使用"},"panels/application/AppManifestView.ts | pageDoesNotWorkOfflineThePage":{"message":"该网页无法离线使用。从 Chrome 93 开始,可安装性标准已发生变化,与该网站对应的应用将不再可安装。如需了解详情,请参阅 {PH1}。"},"panels/application/AppManifestView.ts | pageHasNoManifestLinkUrl":{"message":"网页没有清单 URL"},"panels/application/AppManifestView.ts | pageIsLoadedInAnIncognitoWindow":{"message":"该网页是在无痕式窗口中加载的"},"panels/application/AppManifestView.ts | pageIsNotLoadedInTheMainFrame":{"message":"该网页不是在主框架中加载的"},"panels/application/AppManifestView.ts | pageIsNotServedFromASecureOrigin":{"message":"该网页不是从安全来源提供的"},"panels/application/AppManifestView.ts | preferrelatedapplicationsIsOnly":{"message":"仅 Android 设备上的 Chrome Beta 版和稳定版支持“prefer_related_applications”。"},"panels/application/AppManifestView.ts | presentation":{"message":"演示文稿"},"panels/application/AppManifestView.ts | protocolHandlers":{"message":"协议处理程序"},"panels/application/AppManifestView.ts | sSDoesNotSpecifyItsSizeInThe":{"message":"{PH1} {PH2} 未在清单中指定其大小"},"panels/application/AppManifestView.ts | sSFailedToLoad":{"message":"{PH1} {PH2} 无法加载"},"panels/application/AppManifestView.ts | sSHeightDoesNotComplyWithRatioRequirement":{"message":"{PH1} {PH2} 高度不能超过宽度的 2.3 倍"},"panels/application/AppManifestView.ts | sSShouldHaveSquareIcon":{"message":"大多数操作系统都需要方形图标。请在数组中包含至少一个方形图标。"},"panels/application/AppManifestView.ts | sSShouldSpecifyItsSizeAs":{"message":"{PH1} {PH2} 应将其大小指定为 [width]x[height]"},"panels/application/AppManifestView.ts | sSSizeShouldBeAtLeast320":{"message":"{PH1} {PH2} 尺寸至少应为 320×320"},"panels/application/AppManifestView.ts | sSSizeShouldBeAtMost3840":{"message":"{PH1} {PH2} 的大小不应超过 3840×3840"},"panels/application/AppManifestView.ts | sSWidthDoesNotComplyWithRatioRequirement":{"message":"{PH1} {PH2} 宽度不能超过高度的 2.3 倍"},"panels/application/AppManifestView.ts | sSrcIsNotSet":{"message":"未设置 {PH1} 的“src”"},"panels/application/AppManifestView.ts | sUrlSFailedToParse":{"message":"未能解析{PH1}网址“{PH2}”"},"panels/application/AppManifestView.ts | screenshot":{"message":"屏幕截图"},"panels/application/AppManifestView.ts | screenshotPixelSize":{"message":"屏幕截图 {url} 应将一种像素尺寸 [width]x[height](而非 \"any\")指定为尺寸列表中的第一个条目。"},"panels/application/AppManifestView.ts | screenshotS":{"message":"屏幕截图 #{PH1}"},"panels/application/AppManifestView.ts | shortName":{"message":"简称"},"panels/application/AppManifestView.ts | shortcutS":{"message":"快捷方式 {PH1}"},"panels/application/AppManifestView.ts | shortcutSShouldIncludeAXPixel":{"message":"第 {PH1} 个快捷方式应当包含 96x96 像素的图标"},"panels/application/AppManifestView.ts | showOnlyTheMinimumSafeAreaFor":{"message":"仅显示可遮盖式图标的最小安全区域"},"panels/application/AppManifestView.ts | startUrl":{"message":"起始网址"},"panels/application/AppManifestView.ts | theAppIsAlreadyInstalled":{"message":"该应用已安装"},"panels/application/AppManifestView.ts | thePlayStoreAppUrlAndPlayStoreId":{"message":"Play 商店应用网址与 Play 商店 ID 不符"},"panels/application/AppManifestView.ts | theSpecifiedApplicationPlatform":{"message":"指定的应用平台在 Android 设备上不受支持"},"panels/application/AppManifestView.ts | themeColor":{"message":"主题颜色"},"panels/application/ApplicationPanelSidebar.ts | appManifest":{"message":"应用清单"},"panels/application/ApplicationPanelSidebar.ts | application":{"message":"应用"},"panels/application/ApplicationPanelSidebar.ts | applicationSidebarPanel":{"message":"应用面板边栏"},"panels/application/ApplicationPanelSidebar.ts | backgroundServices":{"message":"后台服务"},"panels/application/ApplicationPanelSidebar.ts | beforeInvokeAlert":{"message":"{PH1}:调用后可滚动至清单中的这一部分"},"panels/application/ApplicationPanelSidebar.ts | clear":{"message":"清除"},"panels/application/ApplicationPanelSidebar.ts | cookies":{"message":"Cookie"},"panels/application/ApplicationPanelSidebar.ts | cookiesUsedByFramesFromS":{"message":"来自 {PH1} 的框架使用的 Cookie"},"panels/application/ApplicationPanelSidebar.ts | documentNotAvailable":{"message":"文档不可用"},"panels/application/ApplicationPanelSidebar.ts | frames":{"message":"帧"},"panels/application/ApplicationPanelSidebar.ts | indexeddb":{"message":"IndexedDB"},"panels/application/ApplicationPanelSidebar.ts | keyPathS":{"message":"关键路径:{PH1}"},"panels/application/ApplicationPanelSidebar.ts | localFiles":{"message":"本地文件"},"panels/application/ApplicationPanelSidebar.ts | localStorage":{"message":"本地存储空间"},"panels/application/ApplicationPanelSidebar.ts | manifest":{"message":"清单"},"panels/application/ApplicationPanelSidebar.ts | noManifestDetected":{"message":"未检测到任何清单"},"panels/application/ApplicationPanelSidebar.ts | onInvokeAlert":{"message":"已滚动至{PH1}"},"panels/application/ApplicationPanelSidebar.ts | onInvokeManifestAlert":{"message":"清单:调用后可滚动至清单顶部"},"panels/application/ApplicationPanelSidebar.ts | openedWindows":{"message":"已打开的窗口"},"panels/application/ApplicationPanelSidebar.ts | preloading":{"message":"预加载"},"panels/application/ApplicationPanelSidebar.ts | refreshIndexeddb":{"message":"刷新 IndexedDB"},"panels/application/ApplicationPanelSidebar.ts | sessionStorage":{"message":"会话存储空间"},"panels/application/ApplicationPanelSidebar.ts | storage":{"message":"存储"},"panels/application/ApplicationPanelSidebar.ts | theContentOfThisDocumentHasBeen":{"message":"已通过“document.write()”动态生成此文档的内容。"},"panels/application/ApplicationPanelSidebar.ts | versionS":{"message":"版本:{PH1}"},"panels/application/ApplicationPanelSidebar.ts | versionSEmpty":{"message":"版本:{PH1}(空)"},"panels/application/ApplicationPanelSidebar.ts | webSql":{"message":"Web SQL"},"panels/application/ApplicationPanelSidebar.ts | webWorkers":{"message":"网络工作器"},"panels/application/ApplicationPanelSidebar.ts | windowWithoutTitle":{"message":"没有标题的窗口"},"panels/application/ApplicationPanelSidebar.ts | worker":{"message":"worker"},"panels/application/BackForwardCacheTreeElement.ts | backForwardCache":{"message":"往返缓存"},"panels/application/BackgroundServiceView.ts | backgroundFetch":{"message":"后台提取"},"panels/application/BackgroundServiceView.ts | backgroundServices":{"message":"后台服务"},"panels/application/BackgroundServiceView.ts | backgroundSync":{"message":"后台同步"},"panels/application/BackgroundServiceView.ts | clear":{"message":"清除"},"panels/application/BackgroundServiceView.ts | clickTheRecordButtonSOrHitSTo":{"message":"点击录制按钮 {PH1} 或按 {PH2} 即可开始录制。"},"panels/application/BackgroundServiceView.ts | devtoolsWillRecordAllSActivity":{"message":"对于所有{PH1}活动,DevTools 会记录最多 3 天,即使处于关闭状态也不例外。"},"panels/application/BackgroundServiceView.ts | empty":{"message":"空白"},"panels/application/BackgroundServiceView.ts | event":{"message":"事件"},"panels/application/BackgroundServiceView.ts | instanceId":{"message":"实例 ID"},"panels/application/BackgroundServiceView.ts | learnMore":{"message":"了解详情"},"panels/application/BackgroundServiceView.ts | noMetadataForThisEvent":{"message":"此事件无任何元数据"},"panels/application/BackgroundServiceView.ts | notifications":{"message":"通知"},"panels/application/BackgroundServiceView.ts | origin":{"message":"来源"},"panels/application/BackgroundServiceView.ts | paymentHandler":{"message":"付款处理程序"},"panels/application/BackgroundServiceView.ts | periodicBackgroundSync":{"message":"定期后台同步"},"panels/application/BackgroundServiceView.ts | pushMessaging":{"message":"推送消息"},"panels/application/BackgroundServiceView.ts | recordingSActivity":{"message":"正在录制{PH1}活动…"},"panels/application/BackgroundServiceView.ts | saveEvents":{"message":"保存事件"},"panels/application/BackgroundServiceView.ts | selectAnEntryToViewMetadata":{"message":"选择条目以查看元数据"},"panels/application/BackgroundServiceView.ts | showEventsForOtherStorageKeys":{"message":"显示来自其他存储分区的事件"},"panels/application/BackgroundServiceView.ts | showEventsFromOtherDomains":{"message":"显示其他网域的事件"},"panels/application/BackgroundServiceView.ts | startRecordingEvents":{"message":"启动录制事件"},"panels/application/BackgroundServiceView.ts | stopRecordingEvents":{"message":"停止记录事件"},"panels/application/BackgroundServiceView.ts | storageKey":{"message":"存储空间密钥"},"panels/application/BackgroundServiceView.ts | swScope":{"message":"Service Worker 范围"},"panels/application/BackgroundServiceView.ts | timestamp":{"message":"时间戳"},"panels/application/BounceTrackingMitigationsTreeElement.ts | bounceTrackingMitigations":{"message":"跳出跟踪缓解措施"},"panels/application/CookieItemsView.ts | clearAllCookies":{"message":"清除所有 Cookie"},"panels/application/CookieItemsView.ts | clearFilteredCookies":{"message":"清除过滤出的 Cookie"},"panels/application/CookieItemsView.ts | cookies":{"message":"Cookie"},"panels/application/CookieItemsView.ts | numberOfCookiesShownInTableS":{"message":"表格中显示的 Cookie 数量:{PH1}"},"panels/application/CookieItemsView.ts | onlyShowCookiesWhichHaveAn":{"message":"仅显示那些有相关问题的 Cookie"},"panels/application/CookieItemsView.ts | onlyShowCookiesWithAnIssue":{"message":"仅显示有问题的 Cookie"},"panels/application/CookieItemsView.ts | selectACookieToPreviewItsValue":{"message":"选择一个 Cookie 以预览其值"},"panels/application/CookieItemsView.ts | showUrlDecoded":{"message":"显示已解码的网址"},"panels/application/DOMStorageItemsView.ts | domStorage":{"message":"DOM 存储空间"},"panels/application/DOMStorageItemsView.ts | domStorageItemDeleted":{"message":"此存储空间项已被删除。"},"panels/application/DOMStorageItemsView.ts | domStorageItems":{"message":"DOM 存储项"},"panels/application/DOMStorageItemsView.ts | domStorageItemsCleared":{"message":"DOM 存储项已被清除"},"panels/application/DOMStorageItemsView.ts | domStorageNumberEntries":{"message":"表格中所显示条目的数量:{PH1}"},"panels/application/DOMStorageItemsView.ts | key":{"message":"密钥"},"panels/application/DOMStorageItemsView.ts | selectAValueToPreview":{"message":"选择一个值以预览"},"panels/application/DOMStorageItemsView.ts | value":{"message":"值"},"panels/application/DatabaseModel.ts | anUnexpectedErrorSOccurred":{"message":"发生意外错误 {PH1}。"},"panels/application/DatabaseModel.ts | databaseNoLongerHasExpected":{"message":"数据库不再有预期版本。"},"panels/application/DatabaseQueryView.ts | databaseQuery":{"message":"数据库查询"},"panels/application/DatabaseQueryView.ts | queryS":{"message":"查询:{PH1}"},"panels/application/DatabaseTableView.ts | anErrorOccurredTryingToreadTheS":{"message":"尝试读取“{PH1}”表时发生错误。"},"panels/application/DatabaseTableView.ts | database":{"message":"数据库"},"panels/application/DatabaseTableView.ts | refresh":{"message":"刷新"},"panels/application/DatabaseTableView.ts | theStableIsEmpty":{"message":"“{PH1}”表格为空。"},"panels/application/DatabaseTableView.ts | visibleColumns":{"message":"可见列"},"panels/application/IndexedDBViews.ts | clearObjectStore":{"message":"清除对象仓库"},"panels/application/IndexedDBViews.ts | collapse":{"message":"收起"},"panels/application/IndexedDBViews.ts | dataMayBeStale":{"message":"数据可能已过时"},"panels/application/IndexedDBViews.ts | deleteDatabase":{"message":"删除数据库"},"panels/application/IndexedDBViews.ts | deleteSelected":{"message":"删除所选项"},"panels/application/IndexedDBViews.ts | expandRecursively":{"message":"以递归方式展开"},"panels/application/IndexedDBViews.ts | idb":{"message":"IDB"},"panels/application/IndexedDBViews.ts | indexedDb":{"message":"Indexed DB"},"panels/application/IndexedDBViews.ts | keyGeneratorValueS":{"message":"密钥生成器值:{PH1}"},"panels/application/IndexedDBViews.ts | keyPath":{"message":"键路径: "},"panels/application/IndexedDBViews.ts | keyString":{"message":"密钥"},"panels/application/IndexedDBViews.ts | objectStores":{"message":"对象存储区"},"panels/application/IndexedDBViews.ts | pleaseConfirmDeleteOfSDatabase":{"message":"请确认您要删除“{PH1}”数据库。"},"panels/application/IndexedDBViews.ts | primaryKey":{"message":"主键"},"panels/application/IndexedDBViews.ts | refresh":{"message":"刷新"},"panels/application/IndexedDBViews.ts | refreshDatabase":{"message":"刷新数据库"},"panels/application/IndexedDBViews.ts | showNextPage":{"message":"显示下一页"},"panels/application/IndexedDBViews.ts | showPreviousPage":{"message":"显示上一页"},"panels/application/IndexedDBViews.ts | someEntriesMayHaveBeenModified":{"message":"部分条目可能已被修改"},"panels/application/IndexedDBViews.ts | startFromKey":{"message":"从键开始"},"panels/application/IndexedDBViews.ts | totalEntriesS":{"message":"总条目数:{PH1}"},"panels/application/IndexedDBViews.ts | valueString":{"message":"值"},"panels/application/IndexedDBViews.ts | version":{"message":"版本"},"panels/application/InterestGroupStorageView.ts | clickToDisplayBody":{"message":"点击任意兴趣群体事件即可显示该群体的当前状态"},"panels/application/InterestGroupStorageView.ts | noDataAvailable":{"message":"没有所选兴趣群体的任何详细信息。浏览器可能已退出该群体。"},"panels/application/InterestGroupTreeElement.ts | interestGroups":{"message":"兴趣群体"},"panels/application/OpenedWindowDetailsView.ts | accessToOpener":{"message":"访问打开者"},"panels/application/OpenedWindowDetailsView.ts | clickToRevealInElementsPanel":{"message":"点击即可在“元素”面板中显示"},"panels/application/OpenedWindowDetailsView.ts | closed":{"message":"已关闭"},"panels/application/OpenedWindowDetailsView.ts | crossoriginEmbedderPolicy":{"message":"跨源嵌入器政策"},"panels/application/OpenedWindowDetailsView.ts | document":{"message":"文档"},"panels/application/OpenedWindowDetailsView.ts | no":{"message":"否"},"panels/application/OpenedWindowDetailsView.ts | openerFrame":{"message":"Opener 框架"},"panels/application/OpenedWindowDetailsView.ts | reportingTo":{"message":"报告对象:"},"panels/application/OpenedWindowDetailsView.ts | security":{"message":"安全"},"panels/application/OpenedWindowDetailsView.ts | securityIsolation":{"message":"安全与隔离"},"panels/application/OpenedWindowDetailsView.ts | showsWhetherTheOpenedWindowIs":{"message":"显示打开的窗口是否能够访问其打开者,反之亦然"},"panels/application/OpenedWindowDetailsView.ts | type":{"message":"类型"},"panels/application/OpenedWindowDetailsView.ts | unknown":{"message":"未知"},"panels/application/OpenedWindowDetailsView.ts | url":{"message":"网址"},"panels/application/OpenedWindowDetailsView.ts | webWorker":{"message":"网络工作器"},"panels/application/OpenedWindowDetailsView.ts | windowWithoutTitle":{"message":"没有标题的窗口"},"panels/application/OpenedWindowDetailsView.ts | worker":{"message":"worker"},"panels/application/OpenedWindowDetailsView.ts | yes":{"message":"是"},"panels/application/PreloadingTreeElement.ts | prefetchingAndPrerendering":{"message":"预提取和预渲染"},"panels/application/ReportingApiReportsView.ts | clickToDisplayBody":{"message":"点击任一报告即可显示相应正文"},"panels/application/ReportingApiTreeElement.ts | reportingApi":{"message":"报告 API"},"panels/application/ServiceWorkerCacheTreeElement.ts | cacheStorage":{"message":"缓存空间"},"panels/application/ServiceWorkerCacheTreeElement.ts | delete":{"message":"删除"},"panels/application/ServiceWorkerCacheTreeElement.ts | refreshCaches":{"message":"刷新缓存"},"panels/application/ServiceWorkerCacheViews.ts | cache":{"message":"缓存"},"panels/application/ServiceWorkerCacheViews.ts | deleteSelected":{"message":"删除所选项"},"panels/application/ServiceWorkerCacheViews.ts | filterByPath":{"message":"按路径过滤"},"panels/application/ServiceWorkerCacheViews.ts | headers":{"message":"标头"},"panels/application/ServiceWorkerCacheViews.ts | matchingEntriesS":{"message":"匹配的条目数:{PH1}"},"panels/application/ServiceWorkerCacheViews.ts | name":{"message":"名称"},"panels/application/ServiceWorkerCacheViews.ts | preview":{"message":"预览"},"panels/application/ServiceWorkerCacheViews.ts | refresh":{"message":"刷新"},"panels/application/ServiceWorkerCacheViews.ts | selectACacheEntryAboveToPreview":{"message":"选择上方的缓存条目进行预览"},"panels/application/ServiceWorkerCacheViews.ts | serviceWorkerCache":{"message":"Service Worker 缓存"},"panels/application/ServiceWorkerCacheViews.ts | timeCached":{"message":"缓存时长"},"panels/application/ServiceWorkerCacheViews.ts | totalEntriesS":{"message":"总条目数:{PH1}"},"panels/application/ServiceWorkerCacheViews.ts | varyHeaderWarning":{"message":"⚠️ 匹配此条目时将 ignoreVary 设为 true"},"panels/application/ServiceWorkerUpdateCycleView.ts | endTimeS":{"message":"结束时间:{PH1}"},"panels/application/ServiceWorkerUpdateCycleView.ts | startTimeS":{"message":"开始时间:{PH1}"},"panels/application/ServiceWorkerUpdateCycleView.ts | timeline":{"message":"时间轴"},"panels/application/ServiceWorkerUpdateCycleView.ts | updateActivity":{"message":"更新活动"},"panels/application/ServiceWorkerUpdateCycleView.ts | version":{"message":"版本"},"panels/application/ServiceWorkersView.ts | bypassForNetwork":{"message":"绕过以转到网络"},"panels/application/ServiceWorkersView.ts | bypassTheServiceWorkerAndLoad":{"message":"绕过 service worker 并从网络加载资源"},"panels/application/ServiceWorkersView.ts | clients":{"message":"客户端"},"panels/application/ServiceWorkersView.ts | focus":{"message":"聚焦"},"panels/application/ServiceWorkersView.ts | inspect":{"message":"检查"},"panels/application/ServiceWorkersView.ts | networkRequests":{"message":"网络请求"},"panels/application/ServiceWorkersView.ts | onPageReloadForceTheService":{"message":"网页重新加载时,强制更新并激活 service worker"},"panels/application/ServiceWorkersView.ts | periodicSync":{"message":"定期同步"},"panels/application/ServiceWorkersView.ts | periodicSyncTag":{"message":"定期同步标记"},"panels/application/ServiceWorkersView.ts | pushData":{"message":"推送数据"},"panels/application/ServiceWorkersView.ts | pushString":{"message":"推送"},"panels/application/ServiceWorkersView.ts | receivedS":{"message":"接收时间:{PH1}"},"panels/application/ServiceWorkersView.ts | sActivatedAndIsS":{"message":"已激活 #{PH1} 次,当前{PH2}"},"panels/application/ServiceWorkersView.ts | sDeleted":{"message":"{PH1} - 已删除"},"panels/application/ServiceWorkersView.ts | sIsRedundant":{"message":"第 {PH1} 项为多余项"},"panels/application/ServiceWorkersView.ts | sRegistrationErrors":{"message":"{PH1} 个注册错误"},"panels/application/ServiceWorkersView.ts | sTryingToInstall":{"message":"#{PH1} 正在尝试安装"},"panels/application/ServiceWorkersView.ts | sWaitingToActivate":{"message":"#{PH1} 个正在等待激活"},"panels/application/ServiceWorkersView.ts | seeAllRegistrations":{"message":"查看所有注册"},"panels/application/ServiceWorkersView.ts | serviceWorkerForS":{"message":"{PH1} 的 Service worker"},"panels/application/ServiceWorkersView.ts | serviceWorkersFromOtherOrigins":{"message":"来自其他来源的 Service Worker"},"panels/application/ServiceWorkersView.ts | source":{"message":"来源"},"panels/application/ServiceWorkersView.ts | startString":{"message":"开始"},"panels/application/ServiceWorkersView.ts | status":{"message":"状态"},"panels/application/ServiceWorkersView.ts | stopString":{"message":"停止"},"panels/application/ServiceWorkersView.ts | syncString":{"message":"同步"},"panels/application/ServiceWorkersView.ts | syncTag":{"message":"同步标记"},"panels/application/ServiceWorkersView.ts | testPushMessageFromDevtools":{"message":"测试来自 DevTools 的推送消息。"},"panels/application/ServiceWorkersView.ts | unregister":{"message":"取消注册"},"panels/application/ServiceWorkersView.ts | unregisterServiceWorker":{"message":"取消注册 Service Worker"},"panels/application/ServiceWorkersView.ts | update":{"message":"更新"},"panels/application/ServiceWorkersView.ts | updateCycle":{"message":"更新周期"},"panels/application/ServiceWorkersView.ts | updateOnReload":{"message":"重新加载时更新"},"panels/application/ServiceWorkersView.ts | workerS":{"message":"工作器:{PH1}"},"panels/application/SharedStorageEventsView.ts | clickToDisplayBody":{"message":"点击任一共享存储空间事件即可显示事件参数。"},"panels/application/SharedStorageItemsView.ts | key":{"message":"键"},"panels/application/SharedStorageItemsView.ts | selectAValueToPreview":{"message":"选择一个值以预览"},"panels/application/SharedStorageItemsView.ts | sharedStorage":{"message":"共享存储空间"},"panels/application/SharedStorageItemsView.ts | sharedStorageFilteredItemsCleared":{"message":"已清除共享存储空间中被滤除的项"},"panels/application/SharedStorageItemsView.ts | sharedStorageItemDeleted":{"message":"此存储空间项已被删除。"},"panels/application/SharedStorageItemsView.ts | sharedStorageItemEditCanceled":{"message":"已取消修改此存储空间项。"},"panels/application/SharedStorageItemsView.ts | sharedStorageItemEdited":{"message":"此存储空间项已被修改。"},"panels/application/SharedStorageItemsView.ts | sharedStorageItems":{"message":"共享存储空间项"},"panels/application/SharedStorageItemsView.ts | sharedStorageItemsCleared":{"message":"已清除共享存储空间项"},"panels/application/SharedStorageItemsView.ts | sharedStorageNumberEntries":{"message":"表格中所显示条目的数量:{PH1}"},"panels/application/SharedStorageItemsView.ts | value":{"message":"值"},"panels/application/SharedStorageListTreeElement.ts | sharedStorage":{"message":"共享存储空间"},"panels/application/StorageItemsView.ts | clearAll":{"message":"全部清除"},"panels/application/StorageItemsView.ts | deleteSelected":{"message":"删除所选项"},"panels/application/StorageItemsView.ts | filter":{"message":"过滤"},"panels/application/StorageItemsView.ts | refresh":{"message":"刷新"},"panels/application/StorageItemsView.ts | refreshedStatus":{"message":"已刷新表"},"panels/application/StorageView.ts | SiteDataCleared":{"message":"已清除网站数据"},"panels/application/StorageView.ts | application":{"message":"应用"},"panels/application/StorageView.ts | cache":{"message":"缓存"},"panels/application/StorageView.ts | cacheStorage":{"message":"缓存空间"},"panels/application/StorageView.ts | clearSiteData":{"message":"清除网站数据"},"panels/application/StorageView.ts | clearing":{"message":"正在清除…"},"panels/application/StorageView.ts | cookies":{"message":"Cookie"},"panels/application/StorageView.ts | fileSystem":{"message":"文件系统"},"panels/application/StorageView.ts | includingThirdPartyCookies":{"message":"包括第三方 Cookie"},"panels/application/StorageView.ts | indexDB":{"message":"IndexedDB"},"panels/application/StorageView.ts | internalError":{"message":"内部错误"},"panels/application/StorageView.ts | learnMore":{"message":"了解详情"},"panels/application/StorageView.ts | localAndSessionStorage":{"message":"本地存储空间和会话存储空间"},"panels/application/StorageView.ts | mb":{"message":"MB"},"panels/application/StorageView.ts | numberMustBeNonNegative":{"message":"数字必须是非负数"},"panels/application/StorageView.ts | numberMustBeSmaller":{"message":"数字必须小于 {PH1}"},"panels/application/StorageView.ts | other":{"message":"其他"},"panels/application/StorageView.ts | pleaseEnterANumber":{"message":"请输入一个数字"},"panels/application/StorageView.ts | sFailedToLoad":{"message":"{PH1}(无法加载)"},"panels/application/StorageView.ts | serviceWorkers":{"message":"Service Worker"},"panels/application/StorageView.ts | simulateCustomStorage":{"message":"模拟自定义存储空间配额"},"panels/application/StorageView.ts | storageQuotaIsLimitedIn":{"message":"在无痕模式下,存储空间配额有限。"},"panels/application/StorageView.ts | storageQuotaUsed":{"message":"已使用 {PH1} 存储空间配额,共 {PH2}"},"panels/application/StorageView.ts | storageQuotaUsedWithBytes":{"message":"已使用 {PH1} 字节(共 {PH2} 字节存储空间配额)"},"panels/application/StorageView.ts | storageTitle":{"message":"存储"},"panels/application/StorageView.ts | storageUsage":{"message":"存储空间用量"},"panels/application/StorageView.ts | storageWithCustomMarker":{"message":"{PH1}(自定义)"},"panels/application/StorageView.ts | unregisterServiceWorker":{"message":"取消注册 Service Worker"},"panels/application/StorageView.ts | usage":{"message":"用量"},"panels/application/StorageView.ts | webSql":{"message":"Web SQL"},"panels/application/TrustTokensTreeElement.ts | trustTokens":{"message":"私密状态令牌"},"panels/application/application-meta.ts | application":{"message":"应用"},"panels/application/application-meta.ts | clearSiteData":{"message":"清除网站数据"},"panels/application/application-meta.ts | clearSiteDataIncludingThirdparty":{"message":"清除网站数据(包括第三方 Cookie)"},"panels/application/application-meta.ts | pwa":{"message":"pwa"},"panels/application/application-meta.ts | showApplication":{"message":"显示应用"},"panels/application/application-meta.ts | startRecordingEvents":{"message":"启动录制事件"},"panels/application/application-meta.ts | stopRecordingEvents":{"message":"停止记录事件"},"panels/application/components/BackForwardCacheStrings.ts | HTTPMethodNotGET":{"message":"只有通过 GET 请求进行加载的网页才能储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | HTTPStatusNotOK":{"message":"只有状态代码为 2XX 的网页才能被缓存。"},"panels/application/components/BackForwardCacheStrings.ts | JavaScriptExecution":{"message":"Chrome 检测到一项在储存于缓存期间执行 JavaScript 的意图。"},"panels/application/components/BackForwardCacheStrings.ts | appBanner":{"message":"已请求 AppBanner 的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | authorizationHeader":{"message":"往返缓存已被停用,因为这是一项 keepalive 请求。"},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabled":{"message":"往返缓存被相关 flag 停用了。请在此设备上访问 chrome://flags/#back-forward-cache 以从本地启用该功能。"},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabledByCommandLine":{"message":"往返缓存已被命令行停用。"},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabledByLowMemory":{"message":"因为内存不足,往返缓存已被停用。"},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabledForDelegate":{"message":"委托行为不支持往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabledForPrerender":{"message":"已针对预渲染程序停用往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | broadcastChannel":{"message":"该网页无法缓存,因为它包含的 BroadcastChannel 实例具有已注册的监听器。"},"panels/application/components/BackForwardCacheStrings.ts | cacheControlNoStore":{"message":"含 cache-control:no-store 标头的网页无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | cacheFlushed":{"message":"缓存被刻意清除了。"},"panels/application/components/BackForwardCacheStrings.ts | cacheLimit":{"message":"该网页被逐出了缓存,以使另一个网页能够缓存。"},"panels/application/components/BackForwardCacheStrings.ts | containsPlugins":{"message":"包含插件的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | contentFileChooser":{"message":"使用 FileChooser API 的网页无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | contentFileSystemAccess":{"message":"使用 File System Access API 的网页无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | contentMediaDevicesDispatcherHost":{"message":"使用媒体设备调度程序的网页无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | contentMediaPlay":{"message":"媒体播放器正在播放内容时用户就离开了网页。"},"panels/application/components/BackForwardCacheStrings.ts | contentMediaSession":{"message":"使用 MediaSession API 并设置了播放状态的网页无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | contentMediaSessionService":{"message":"使用 MediaSession API 并设置了操作处理程序的网页无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | contentScreenReader":{"message":"往返缓存已被停用,因为受屏幕阅读器影响。"},"panels/application/components/BackForwardCacheStrings.ts | contentSecurityHandler":{"message":"使用 SecurityHandler 的网页无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | contentSerial":{"message":"使用 Serial API 的网页无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | contentWebAuthenticationAPI":{"message":"使用 WebAuthetication API 的网页无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | contentWebBluetooth":{"message":"使用 WebBluetooth API 的网页无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | contentWebUSB":{"message":"使用 WebUSB API 的网页无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | dedicatedWorkerOrWorklet":{"message":"使用专用 Worker 或 Worklet 的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | documentLoaded":{"message":"该文档还未加载完毕时用户就离开了。"},"panels/application/components/BackForwardCacheStrings.ts | embedderAppBannerManager":{"message":"用户离开网页时,系统显示了应用横幅。"},"panels/application/components/BackForwardCacheStrings.ts | embedderChromePasswordManagerClientBindCredentialManager":{"message":"用户离开网页时,系统显示了 Chrome 密码管理器。"},"panels/application/components/BackForwardCacheStrings.ts | embedderDomDistillerSelfDeletingRequestDelegate":{"message":"用户离开网页时,DOM 提取正在进行。"},"panels/application/components/BackForwardCacheStrings.ts | embedderDomDistillerViewerSource":{"message":"用户离开网页时,系统显示了 DOM Distiller Viewer。"},"panels/application/components/BackForwardCacheStrings.ts | embedderExtensionMessaging":{"message":"往返缓存已被停用,因为扩展程序使用了 Messaging API。"},"panels/application/components/BackForwardCacheStrings.ts | embedderExtensionMessagingForOpenPort":{"message":"在进入往返缓存之前,采用长期有效连接的扩展程序应断开连接。"},"panels/application/components/BackForwardCacheStrings.ts | embedderExtensionSentMessageToCachedFrame":{"message":"采用长期有效连接的扩展程序试图将消息发送到往返缓存中的框架。"},"panels/application/components/BackForwardCacheStrings.ts | embedderExtensions":{"message":"往返缓存已被停用,因为受扩展程序影响。"},"panels/application/components/BackForwardCacheStrings.ts | embedderModalDialog":{"message":"用户离开网页时,该网页上显示了模态对话框(例如表单重新提交)或 HTTP 密码对话框。"},"panels/application/components/BackForwardCacheStrings.ts | embedderOfflinePage":{"message":"用户离开网页时,系统显示了离线版网页。"},"panels/application/components/BackForwardCacheStrings.ts | embedderOomInterventionTabHelper":{"message":"用户离开网页时,系统显示了 Out-Of-Memory Intervention 栏。"},"panels/application/components/BackForwardCacheStrings.ts | embedderPermissionRequestManager":{"message":"用户离开网页时,系统显示了权限请求。"},"panels/application/components/BackForwardCacheStrings.ts | embedderPopupBlockerTabHelper":{"message":"用户离开网页时,系统显示了弹出式内容拦截器。"},"panels/application/components/BackForwardCacheStrings.ts | embedderSafeBrowsingThreatDetails":{"message":"用户离开网页时,系统显示了安全浏览详情。"},"panels/application/components/BackForwardCacheStrings.ts | embedderSafeBrowsingTriggeredPopupBlocker":{"message":"“安全浏览”功能认定该网页有滥用性质,因此拦截了弹出式窗口。"},"panels/application/components/BackForwardCacheStrings.ts | enteredBackForwardCacheBeforeServiceWorkerHostAdded":{"message":"在该网页储存于往返缓存期间,有一个 Service Worker 被启用了。"},"panels/application/components/BackForwardCacheStrings.ts | errorDocument":{"message":"往返缓存已被停用,因为文档出错了。"},"panels/application/components/BackForwardCacheStrings.ts | fencedFramesEmbedder":{"message":"采用 FencedFrame 的网页无法存储在 bfcache 中。"},"panels/application/components/BackForwardCacheStrings.ts | foregroundCacheLimit":{"message":"该网页被逐出了缓存,以使另一个网页能够缓存。"},"panels/application/components/BackForwardCacheStrings.ts | grantedMediaStreamAccess":{"message":"已被授予媒体流访问权的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | haveInnerContents":{"message":"使用门户的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | idleManager":{"message":"使用 IdleManager 的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | indexedDBConnection":{"message":"具备开放的 IndexedDB 连接的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | indexedDBEvent":{"message":"往返缓存已被停用,因为发生了 IndexedDB 事件。"},"panels/application/components/BackForwardCacheStrings.ts | ineligibleAPI":{"message":"使用了不符合条件的 API。"},"panels/application/components/BackForwardCacheStrings.ts | injectedJavascript":{"message":"已被扩展程序注入 JavaScript 的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | injectedStyleSheet":{"message":"已被扩展程序注入 StyleSheet 的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | internalError":{"message":"内部出错了。"},"panels/application/components/BackForwardCacheStrings.ts | keepaliveRequest":{"message":"往返缓存已被停用,因为这是一项 keepalive 请求。"},"panels/application/components/BackForwardCacheStrings.ts | keyboardLock":{"message":"使用“键盘锁定”功能的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | loading":{"message":"该网页还未加载完毕时用户就离开了。"},"panels/application/components/BackForwardCacheStrings.ts | mainResourceHasCacheControlNoCache":{"message":"主资源包含 ache-control:no-cache 的网页无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | mainResourceHasCacheControlNoStore":{"message":"主资源包含 cache-control:no-store 的网页无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | navigationCancelledWhileRestoring":{"message":"该网页还没从往返缓存中恢复时导航就被取消了。"},"panels/application/components/BackForwardCacheStrings.ts | networkExceedsBufferLimit":{"message":"该网页被逐出了缓存,因为有一项使用中的网络连接收到了太多数据。Chrome 会限制网页在缓存期间可接收的数据量。"},"panels/application/components/BackForwardCacheStrings.ts | networkRequestDatapipeDrainedAsBytesConsumer":{"message":"包含传输中的 fetch() 或 XHR 的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | networkRequestRedirected":{"message":"该网页被逐出了往返缓存,因为有一项使用中的网络请求涉及了重定向。"},"panels/application/components/BackForwardCacheStrings.ts | networkRequestTimeout":{"message":"该网页被逐出了缓存,因为有一项网络连接处于开放状态的时间太长。Chrome 会限制网页在缓存期间可接收数据的时长。"},"panels/application/components/BackForwardCacheStrings.ts | noResponseHead":{"message":"不含有效响应标头的网页无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | notMainFrame":{"message":"导航是在主框架之外的某个框架中发生的。"},"panels/application/components/BackForwardCacheStrings.ts | outstandingIndexedDBTransaction":{"message":"正在针对已建立索引的数据库处理事务的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | outstandingNetworkRequestDirectSocket":{"message":"包含传输中的网络请求的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | outstandingNetworkRequestFetch":{"message":"包含传输中的 fetch() 网络请求的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | outstandingNetworkRequestOthers":{"message":"包含传输中的网络请求的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | outstandingNetworkRequestXHR":{"message":"包含传输中的 XHR 网络请求的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | paymentManager":{"message":"使用 PaymentManager 的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | pictureInPicture":{"message":"使用“画中画”功能的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | portal":{"message":"使用门户的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | printing":{"message":"显示打印界面的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | relatedActiveContentsExist":{"message":"该网页是使用“window.open()”打开的,而另一个标签页引用了该网页;或者,该网页打开了一个窗口。"},"panels/application/components/BackForwardCacheStrings.ts | rendererProcessCrashed":{"message":"储存在往返缓存中的网页的渲染程序进程崩溃了。"},"panels/application/components/BackForwardCacheStrings.ts | rendererProcessKilled":{"message":"储存于往返缓存中的网页的渲染程序进程被终止了。"},"panels/application/components/BackForwardCacheStrings.ts | requestedAudioCapturePermission":{"message":"已请求音频截取权的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | requestedBackForwardCacheBlockedSensors":{"message":"已请求传感器使用权的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | requestedBackgroundWorkPermission":{"message":"已请求后台同步或提取权限的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | requestedMIDIPermission":{"message":"已请求 MIDI 权限的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | requestedNotificationsPermission":{"message":"已请求通知权限的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | requestedStorageAccessGrant":{"message":"已请求存储空间使用权的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | requestedVideoCapturePermission":{"message":"已请求视频拍摄权的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | schemeNotHTTPOrHTTPS":{"message":"只有网址架构为 HTTP / HTTPS 的网页才能被缓存。"},"panels/application/components/BackForwardCacheStrings.ts | serviceWorkerClaim":{"message":"在储存于往返缓存期间,该网页被一个 Service Worker 认领了。"},"panels/application/components/BackForwardCacheStrings.ts | serviceWorkerPostMessage":{"message":"有一个 Service Worker 尝试向储存于往返缓存中的网页发送 MessageEvent。"},"panels/application/components/BackForwardCacheStrings.ts | serviceWorkerUnregistration":{"message":"在网页储存于往返缓存期间,ServiceWorker 被取消注册了。"},"panels/application/components/BackForwardCacheStrings.ts | serviceWorkerVersionActivation":{"message":"该网页被逐出了往返缓存,因为有一个 Service Worker 被启用了。"},"panels/application/components/BackForwardCacheStrings.ts | sessionRestored":{"message":"Chrome 重启了,因而清除了往返缓存条目。"},"panels/application/components/BackForwardCacheStrings.ts | sharedWorker":{"message":"使用 SharedWorker 的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | speechRecognizer":{"message":"使用 SpeechRecognizer 的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | speechSynthesis":{"message":"使用 SpeechSynthesis 的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | subframeIsNavigating":{"message":"该网页上某个 iframe 发起的导航并未完成。"},"panels/application/components/BackForwardCacheStrings.ts | subresourceHasCacheControlNoCache":{"message":"子资源包含 ache-control:no-cache 的网页无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | subresourceHasCacheControlNoStore":{"message":"子资源包含 cache-control:no-store 的网页无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | timeout":{"message":"该网页超出了往返缓存中的储存时长上限,因而已过期。"},"panels/application/components/BackForwardCacheStrings.ts | timeoutPuttingInCache":{"message":"该网页在储存至往返缓存时超时了(可能是因为 pagehide 处理程序长时间运行)。"},"panels/application/components/BackForwardCacheStrings.ts | unloadHandlerExistsInMainFrame":{"message":"该网页的主框架中含有一款卸载处理程序。"},"panels/application/components/BackForwardCacheStrings.ts | unloadHandlerExistsInSubFrame":{"message":"该网页的子框架中含有一款卸载处理程序。"},"panels/application/components/BackForwardCacheStrings.ts | userAgentOverrideDiffers":{"message":"浏览器更改了用户代理替换标头。"},"panels/application/components/BackForwardCacheStrings.ts | wasGrantedMediaAccess":{"message":"已被授予视频/音频录制权的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | webDatabase":{"message":"使用 WebDatabase 的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | webHID":{"message":"使用 WebHID 的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | webLocks":{"message":"使用 WebLocks 的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | webNfc":{"message":"使用 WebNfc 的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | webOTPService":{"message":"使用 WebOTPService 的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | webRTC":{"message":"使用 WebRTC 的网页无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | webShare":{"message":"使用 Webshare 的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | webSocket":{"message":"使用 WebSocket 的网页无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | webTransport":{"message":"使用 WebTransport 的网页无法储存至往返缓存。"},"panels/application/components/BackForwardCacheStrings.ts | webXR":{"message":"使用 WebXR 的网页目前无法储存至往返缓存。"},"panels/application/components/BackForwardCacheView.ts | backForwardCacheTitle":{"message":"往返缓存"},"panels/application/components/BackForwardCacheView.ts | blankURLTitle":{"message":"缺少网址 [{PH1}]"},"panels/application/components/BackForwardCacheView.ts | blockingExtensionId":{"message":"扩展程序 ID: "},"panels/application/components/BackForwardCacheView.ts | circumstantial":{"message":"无法解决"},"panels/application/components/BackForwardCacheView.ts | circumstantialExplanation":{"message":"这些原因无法作为行动依据,即:缓存被阻止的原因超出了该网页的直接控制范围。"},"panels/application/components/BackForwardCacheView.ts | framesPerIssue":{"message":"{n,plural, =1{# 个框架}other{# 个框架}}"},"panels/application/components/BackForwardCacheView.ts | framesTitle":{"message":"框架"},"panels/application/components/BackForwardCacheView.ts | issuesInMultipleFrames":{"message":"{n,plural, =1{在 {m} 个框架中发现了 # 个问题。}other{在 {m} 个框架中发现了 # 个问题。}}"},"panels/application/components/BackForwardCacheView.ts | issuesInSingleFrame":{"message":"{n,plural, =1{在 1 个框架中发现了 # 个问题。}other{在 1 个框架中发现了 # 个问题。}}"},"panels/application/components/BackForwardCacheView.ts | learnMore":{"message":"了解详情:往返缓存资格条件"},"panels/application/components/BackForwardCacheView.ts | mainFrame":{"message":"主框架"},"panels/application/components/BackForwardCacheView.ts | neverUseUnload":{"message":"了解详情:一律不使用卸载处理程序"},"panels/application/components/BackForwardCacheView.ts | normalNavigation":{"message":"不是从往返缓存中恢复的:若要触发往返缓存,请使用 Chrome 的“后退”/“前进”按钮,或者使用下面的“测试”按钮自动离开并返回。"},"panels/application/components/BackForwardCacheView.ts | pageSupportNeeded":{"message":"有待解决"},"panels/application/components/BackForwardCacheView.ts | pageSupportNeededExplanation":{"message":"这些原因可作为行动依据,即:网页在排除这些原因后便能储存至往返缓存。"},"panels/application/components/BackForwardCacheView.ts | restoredFromBFCache":{"message":"从往返缓存中成功恢复了。"},"panels/application/components/BackForwardCacheView.ts | runTest":{"message":"测试往返缓存"},"panels/application/components/BackForwardCacheView.ts | runningTest":{"message":"正在运行测试"},"panels/application/components/BackForwardCacheView.ts | supportPending":{"message":"尚不支持"},"panels/application/components/BackForwardCacheView.ts | supportPendingExplanation":{"message":"Chrome 将会针对这些原因提供应对支持,即:在 Chrome 的某个未来版本中,这些原因将不会阻止该网页储存至往返缓存。"},"panels/application/components/BackForwardCacheView.ts | unavailable":{"message":"不可用"},"panels/application/components/BackForwardCacheView.ts | unknown":{"message":"状态不明"},"panels/application/components/BackForwardCacheView.ts | url":{"message":"网址:"},"panels/application/components/BounceTrackingMitigationsView.ts | bounceTrackingMitigationsTitle":{"message":"跳出跟踪缓解措施"},"panels/application/components/BounceTrackingMitigationsView.ts | checkingPotentialTrackers":{"message":"正在检查是否有潜在的跳出跟踪网站。"},"panels/application/components/BounceTrackingMitigationsView.ts | forceRun":{"message":"强制运行"},"panels/application/components/BounceTrackingMitigationsView.ts | learnMore":{"message":"了解详情:反弹跟踪缓解措施"},"panels/application/components/BounceTrackingMitigationsView.ts | noPotentialBounceTrackersIdentified":{"message":"未清除任何潜在跳出跟踪网站的状态。原因可能包括:未发现任何潜在的跳出跟踪网站,未启用跳出跟踪缓解措施,或未阻止第三方 Cookie。"},"panels/application/components/BounceTrackingMitigationsView.ts | runningMitigations":{"message":"正在运行"},"panels/application/components/BounceTrackingMitigationsView.ts | stateDeletedFor":{"message":"已删除以下网站的状态:"},"panels/application/components/EndpointsGrid.ts | noEndpointsToDisplay":{"message":"没有可显示的端点"},"panels/application/components/FrameDetailsView.ts | aFrameAncestorIsAnInsecure":{"message":"祖先框架是非安全上下文"},"panels/application/components/FrameDetailsView.ts | adStatus":{"message":"广告状态"},"panels/application/components/FrameDetailsView.ts | additionalInformation":{"message":"其他信息"},"panels/application/components/FrameDetailsView.ts | apiAvailability":{"message":"API 可用性"},"panels/application/components/FrameDetailsView.ts | availabilityOfCertainApisDepends":{"message":"某些 API 的可用性取决于正在被跨源隔离的文档。"},"panels/application/components/FrameDetailsView.ts | available":{"message":"可用"},"panels/application/components/FrameDetailsView.ts | availableNotTransferable":{"message":"可用,不可传输"},"panels/application/components/FrameDetailsView.ts | availableTransferable":{"message":"可用,可传输"},"panels/application/components/FrameDetailsView.ts | child":{"message":"子级"},"panels/application/components/FrameDetailsView.ts | childDescription":{"message":"此框架已被识别为某个广告的子框架"},"panels/application/components/FrameDetailsView.ts | clickToRevealInElementsPanel":{"message":"点击即可在“元素”面板中显示"},"panels/application/components/FrameDetailsView.ts | clickToRevealInNetworkPanel":{"message":"点击即可在“网络”面板中显示"},"panels/application/components/FrameDetailsView.ts | clickToRevealInNetworkPanelMight":{"message":"点击即可在“网络”面板中显示(可能需要重新加载页面)"},"panels/application/components/FrameDetailsView.ts | clickToRevealInSourcesPanel":{"message":"点击即可在“来源”面板中显示"},"panels/application/components/FrameDetailsView.ts | createdByAdScriptExplanation":{"message":"创建此框架时使用的(async) stack中有广告脚本。检查此框架的创建stack trace或许有助于深入了解这一问题。"},"panels/application/components/FrameDetailsView.ts | creationStackTrace":{"message":"框架创建Stack Trace"},"panels/application/components/FrameDetailsView.ts | creationStackTraceExplanation":{"message":"此框架是以编程方式创建的。stack trace会显示相应的创建位置。"},"panels/application/components/FrameDetailsView.ts | creatorAdScript":{"message":"创作者广告脚本"},"panels/application/components/FrameDetailsView.ts | crossoriginIsolated":{"message":"已跨源隔离"},"panels/application/components/FrameDetailsView.ts | document":{"message":"文档"},"panels/application/components/FrameDetailsView.ts | frameId":{"message":"框架 ID"},"panels/application/components/FrameDetailsView.ts | learnMore":{"message":"了解详情"},"panels/application/components/FrameDetailsView.ts | localhostIsAlwaysASecureContext":{"message":"Localhost 始终是安全的上下文"},"panels/application/components/FrameDetailsView.ts | matchedBlockingRuleExplanation":{"message":"此框架被视为广告框架,因为它目前(或以前)的主文档是广告资源。"},"panels/application/components/FrameDetailsView.ts | measureMemory":{"message":"衡量内存"},"panels/application/components/FrameDetailsView.ts | no":{"message":"否"},"panels/application/components/FrameDetailsView.ts | origin":{"message":"源"},"panels/application/components/FrameDetailsView.ts | ownerElement":{"message":"所有者元素"},"panels/application/components/FrameDetailsView.ts | parentIsAdExplanation":{"message":"此框架被视为广告框架,因为它的父框架是广告框架。"},"panels/application/components/FrameDetailsView.ts | prerendering":{"message":"预渲染"},"panels/application/components/FrameDetailsView.ts | prerenderingStatus":{"message":"预渲染状态"},"panels/application/components/FrameDetailsView.ts | refresh":{"message":"刷新"},"panels/application/components/FrameDetailsView.ts | reportingTo":{"message":"报告对象:"},"panels/application/components/FrameDetailsView.ts | requiresCrossoriginIsolated":{"message":"需要跨域隔离的上下文"},"panels/application/components/FrameDetailsView.ts | root":{"message":"根"},"panels/application/components/FrameDetailsView.ts | rootDescription":{"message":"此框架已被识别为广告的根框架"},"panels/application/components/FrameDetailsView.ts | secureContext":{"message":"安全上下文"},"panels/application/components/FrameDetailsView.ts | securityIsolation":{"message":"安全与隔离"},"panels/application/components/FrameDetailsView.ts | sharedarraybufferConstructorIs":{"message":"可以使用 SharedArrayBuffer 这一构造函数,且可通过 postMessage 传输 SABs"},"panels/application/components/FrameDetailsView.ts | sharedarraybufferConstructorIsAvailable":{"message":"可以使用 SharedArrayBuffer 这一构造函数,但无法通过 postMessage 传输 SABs"},"panels/application/components/FrameDetailsView.ts | theFramesSchemeIsInsecure":{"message":"框架的架构不安全"},"panels/application/components/FrameDetailsView.ts | thePerformanceAPI":{"message":"可以使用 performance.measureUserAgentSpecificMemory() API"},"panels/application/components/FrameDetailsView.ts | thePerformancemeasureuseragentspecificmemory":{"message":"无法使用 performance.measureUserAgentSpecificMemory() API"},"panels/application/components/FrameDetailsView.ts | thisAdditionalDebugging":{"message":"显示此额外(调试)信息是因为已启用“协议监视器”实验。"},"panels/application/components/FrameDetailsView.ts | transferRequiresCrossoriginIsolatedPermission":{"message":"若要传输 SharedArrayBuffer,必须启用以下权限政策:"},"panels/application/components/FrameDetailsView.ts | unavailable":{"message":"不可用"},"panels/application/components/FrameDetailsView.ts | unreachableUrl":{"message":"无法访问的网址"},"panels/application/components/FrameDetailsView.ts | url":{"message":"网址"},"panels/application/components/FrameDetailsView.ts | willRequireCrossoriginIsolated":{"message":"⚠️ 未来将需要跨源隔离上下文"},"panels/application/components/FrameDetailsView.ts | yes":{"message":"是"},"panels/application/components/InterestGroupAccessGrid.ts | allInterestGroupStorageEvents":{"message":"所有兴趣群体存储事件。"},"panels/application/components/InterestGroupAccessGrid.ts | eventTime":{"message":"事件时间"},"panels/application/components/InterestGroupAccessGrid.ts | eventType":{"message":"权限类型"},"panels/application/components/InterestGroupAccessGrid.ts | groupName":{"message":"名称"},"panels/application/components/InterestGroupAccessGrid.ts | groupOwner":{"message":"所有者"},"panels/application/components/InterestGroupAccessGrid.ts | noEvents":{"message":"未记录任何兴趣群体事件。"},"panels/application/components/OriginTrialTreeView.ts | expiryTime":{"message":"到期时间"},"panels/application/components/OriginTrialTreeView.ts | isThirdParty":{"message":"第三方"},"panels/application/components/OriginTrialTreeView.ts | matchSubDomains":{"message":"子域名匹配"},"panels/application/components/OriginTrialTreeView.ts | origin":{"message":"源"},"panels/application/components/OriginTrialTreeView.ts | rawTokenText":{"message":"原始令牌"},"panels/application/components/OriginTrialTreeView.ts | status":{"message":"令牌状态"},"panels/application/components/OriginTrialTreeView.ts | token":{"message":"令牌"},"panels/application/components/OriginTrialTreeView.ts | tokens":{"message":"{PH1} 个令牌"},"panels/application/components/OriginTrialTreeView.ts | trialName":{"message":"试用版名称"},"panels/application/components/OriginTrialTreeView.ts | usageRestriction":{"message":"使用限制"},"panels/application/components/PermissionsPolicySection.ts | allowedFeatures":{"message":"允许的功能"},"panels/application/components/PermissionsPolicySection.ts | clickToShowHeader":{"message":"点击即可显示哪项请求的“Permissions-Policy”HTTP 标头会停用此功能。"},"panels/application/components/PermissionsPolicySection.ts | clickToShowIframe":{"message":"点击即可在“元素”面板中显示不允许使用此功能的最顶部 iframe。"},"panels/application/components/PermissionsPolicySection.ts | disabledByFencedFrame":{"message":"已在 fencedframe 内停用"},"panels/application/components/PermissionsPolicySection.ts | disabledByHeader":{"message":"已被“Permissions-Policy”标头停用"},"panels/application/components/PermissionsPolicySection.ts | disabledByIframe":{"message":"未纳入 iframe 的“allow”属性中"},"panels/application/components/PermissionsPolicySection.ts | disabledFeatures":{"message":"停用的功能"},"panels/application/components/PermissionsPolicySection.ts | hideDetails":{"message":"隐藏详细信息"},"panels/application/components/PermissionsPolicySection.ts | showDetails":{"message":"显示详细信息"},"panels/application/components/Prerender2.ts | Activated":{"message":"已启用。"},"panels/application/components/Prerender2.ts | ActivatedBeforeStarted":{"message":"启动前已激活"},"panels/application/components/Prerender2.ts | ActivationNavigationParameterMismatch":{"message":"此网页是预渲染的,但最终结果是导航执行方式不同于原始预渲染,所以系统无法激活预渲染的网页。"},"panels/application/components/Prerender2.ts | AudioOutputDeviceRequested":{"message":"预渲染尚不支持 AudioContext API。"},"panels/application/components/Prerender2.ts | BlockedByClient":{"message":"客户端阻止了资源加载。"},"panels/application/components/Prerender2.ts | CancelAllHostsForTesting":{"message":"CancelAllHostsForTesting。"},"panels/application/components/Prerender2.ts | ClientCertRequested":{"message":"该网页正在请求客户端证书,但此证书不适用于隐藏的网页(例如预渲染的网页)。"},"panels/application/components/Prerender2.ts | CrossSiteNavigation":{"message":"预渲染的网页在加载后导航到了跨网站网址。目前不允许预渲染跨网站网页。"},"panels/application/components/Prerender2.ts | CrossSiteRedirect":{"message":"尝试了预渲染一个重定向到跨网站网址的网址。目前不允许预渲染跨网站网页。"},"panels/application/components/Prerender2.ts | DataSaverEnabled":{"message":"流量节省程序已启用"},"panels/application/components/Prerender2.ts | Destroyed":{"message":"预渲染的网页因不明原因被舍弃。"},"panels/application/components/Prerender2.ts | DidFailLoad":{"message":"预渲染期间发生了 DidFailLoadWithError。"},"panels/application/components/Prerender2.ts | DisallowedApiMethod":{"message":"禁用的 API 方法"},"panels/application/components/Prerender2.ts | Download":{"message":"禁止在预渲染模式下进行下载。"},"panels/application/components/Prerender2.ts | EmbedderTriggeredAndCrossOriginRedirected":{"message":"Chrome 自身触发的预渲染(例如多功能框预渲染)被取消了,因为导航会重定向到另一个跨源网页。"},"panels/application/components/Prerender2.ts | EmbedderTriggeredAndSameOriginRedirected":{"message":"Chrome 自身触发的预渲染(例如多功能框预渲染)被取消了,因为导航会重定向到另一个同源网页。"},"panels/application/components/Prerender2.ts | FailToGetMemoryUsage":{"message":"未能获取内存用量"},"panels/application/components/Prerender2.ts | HasEffectiveUrl":{"message":"包含有效网址"},"panels/application/components/Prerender2.ts | InProgressNavigation":{"message":"InProgressNavigation。"},"panels/application/components/Prerender2.ts | InactivePageRestriction":{"message":"无效的网页限制"},"panels/application/components/Prerender2.ts | InvalidSchemeNavigation":{"message":"预渲染时只能使用 HTTP(S) 导航。"},"panels/application/components/Prerender2.ts | InvalidSchemeRedirect":{"message":"已尝试预渲染重定向到非 HTTP(S) 网址的网址。只能预渲染 HTTP(S) 网页。"},"panels/application/components/Prerender2.ts | LoginAuthRequested":{"message":"预渲染不支持来自界面的身份验证请求。"},"panels/application/components/Prerender2.ts | LowEndDevice":{"message":"内存较小的设备不支持预渲染。"},"panels/application/components/Prerender2.ts | MainFrameNavigation":{"message":"禁止在初始预渲染导航之后进行导航"},"panels/application/components/Prerender2.ts | MaxNumOfRunningPrerendersExceeded":{"message":"超出了预渲染次数上限。"},"panels/application/components/Prerender2.ts | MemoryLimitExceeded":{"message":"超出了内存上限"},"panels/application/components/Prerender2.ts | MixedContent":{"message":"混合内容框架取消了预渲染。"},"panels/application/components/Prerender2.ts | MojoBinderPolicy":{"message":"预渲染的网页使用了被禁用的 API"},"panels/application/components/Prerender2.ts | NavigationBadHttpStatus":{"message":"由于服务器返回的状态代码不是 200/204/205,初始预渲染导航未成功。"},"panels/application/components/Prerender2.ts | NavigationNotCommitted":{"message":"预渲染网页最终不会显示。"},"panels/application/components/Prerender2.ts | NavigationRequestBlockedByCsp":{"message":"CSP 阻止了导航请求。"},"panels/application/components/Prerender2.ts | NavigationRequestNetworkError":{"message":"在预渲染过程中遇到了网络连接错误。"},"panels/application/components/Prerender2.ts | PrerenderingOngoing":{"message":"正在进行预渲染"},"panels/application/components/Prerender2.ts | RendererProcessCrashed":{"message":"预渲染的网页崩溃了。"},"panels/application/components/Prerender2.ts | RendererProcessKilled":{"message":"预渲染页面的渲染程序进程被终止了。"},"panels/application/components/Prerender2.ts | SameSiteCrossOriginNavigation":{"message":"预渲染的网页在加载后导航到了同网站的跨源网址。目前不允许预渲染跨源网页。"},"panels/application/components/Prerender2.ts | SameSiteCrossOriginNavigationNotOptIn":{"message":"预渲染的网页在加载后导航到了同网站的跨源网址。系统不允许这种做法,除非目标网站发送 Supports-Loading-Mode: credentialed-prerender 标头。"},"panels/application/components/Prerender2.ts | SameSiteCrossOriginRedirect":{"message":"尝试了预渲染一个重定向到同网站跨源网址的网址。目前不允许预渲染跨源网页。"},"panels/application/components/Prerender2.ts | SameSiteCrossOriginRedirectNotOptIn":{"message":"尝试了预渲染一个重定向到同网站跨源网址的网址。系统不允许这种做法,除非目标网站发送 Supports-Loading-Mode: credentialed-prerender 标头。"},"panels/application/components/Prerender2.ts | SslCertificateError":{"message":"SSL 证书错误。"},"panels/application/components/Prerender2.ts | StartFailed":{"message":"启动失败"},"panels/application/components/Prerender2.ts | Stop":{"message":"该标签页已停止。"},"panels/application/components/Prerender2.ts | TriggerBackgrounded":{"message":"该标签页位于后台"},"panels/application/components/Prerender2.ts | TriggerDestroyed":{"message":"预渲染未启用,且已通过触发器销毁。"},"panels/application/components/Prerender2.ts | UaChangeRequiresReload":{"message":"执行 UserAgentOverride 之后需要重新加载。"},"panels/application/components/ProtocolHandlersView.ts | dropdownLabel":{"message":"选择协议处理程序"},"panels/application/components/ProtocolHandlersView.ts | manifest":{"message":"清单"},"panels/application/components/ProtocolHandlersView.ts | needHelpReadOur":{"message":"需要帮助?请阅读 {PH1} 上的文章。"},"panels/application/components/ProtocolHandlersView.ts | protocolDetected":{"message":"在 {PH1} 中找到了有效注册的协议处理程序。安装应用后,测试已注册的协议。"},"panels/application/components/ProtocolHandlersView.ts | protocolHandlerRegistrations":{"message":"PWA 的网址协议处理程序注册"},"panels/application/components/ProtocolHandlersView.ts | protocolNotDetected":{"message":"在 {PH1} 中定义协议处理程序,以便在用户安装您的应用时将它注册为自定义协议的处理程序。"},"panels/application/components/ProtocolHandlersView.ts | testProtocol":{"message":"测试协议"},"panels/application/components/ProtocolHandlersView.ts | textboxLabel":{"message":"协议处理程序的查询参数或端点"},"panels/application/components/ProtocolHandlersView.ts | textboxPlaceholder":{"message":"输入网址"},"panels/application/components/ReportsGrid.ts | destination":{"message":"目标端点"},"panels/application/components/ReportsGrid.ts | generatedAt":{"message":"生成时间"},"panels/application/components/ReportsGrid.ts | noReportsToDisplay":{"message":"没有可显示的报告"},"panels/application/components/ReportsGrid.ts | status":{"message":"状态"},"panels/application/components/SharedStorageAccessGrid.ts | allSharedStorageEvents":{"message":"此网页的所有共享存储空间事件。"},"panels/application/components/SharedStorageAccessGrid.ts | eventParams":{"message":"可选事件参数"},"panels/application/components/SharedStorageAccessGrid.ts | eventTime":{"message":"事件时间"},"panels/application/components/SharedStorageAccessGrid.ts | eventType":{"message":"权限类型"},"panels/application/components/SharedStorageAccessGrid.ts | mainFrameId":{"message":"主框架 ID"},"panels/application/components/SharedStorageAccessGrid.ts | noEvents":{"message":"未记录任何共享存储空间事件。"},"panels/application/components/SharedStorageAccessGrid.ts | ownerOrigin":{"message":"所有者源"},"panels/application/components/SharedStorageAccessGrid.ts | sharedStorage":{"message":"共享存储空间"},"panels/application/components/SharedStorageMetadataView.ts | budgetExplanation":{"message":"此源在 24 小时内还可泄露多少数据(以位熵为单位)"},"panels/application/components/SharedStorageMetadataView.ts | creation":{"message":"创建时间"},"panels/application/components/SharedStorageMetadataView.ts | entropyBudget":{"message":"围栏框架的熵预算"},"panels/application/components/SharedStorageMetadataView.ts | notYetCreated":{"message":"尚未创建"},"panels/application/components/SharedStorageMetadataView.ts | numEntries":{"message":"条目数"},"panels/application/components/SharedStorageMetadataView.ts | resetBudget":{"message":"重置预算"},"panels/application/components/SharedStorageMetadataView.ts | sharedStorage":{"message":"共享存储空间"},"panels/application/components/StackTrace.ts | cannotRenderStackTrace":{"message":"无法渲染堆栈轨迹"},"panels/application/components/StackTrace.ts | showLess":{"message":"收起"},"panels/application/components/StackTrace.ts | showSMoreFrames":{"message":"{n,plural, =1{显示另外 # 个框架}other{显示另外 # 个框架}}"},"panels/application/components/TrustTokensView.ts | allStoredTrustTokensAvailableIn":{"message":"在此浏览器实例中可用的所有已存储私密状态令牌。"},"panels/application/components/TrustTokensView.ts | deleteTrustTokens":{"message":"删除 {PH1} 颁发的所有已存储私密状态令牌。"},"panels/application/components/TrustTokensView.ts | issuer":{"message":"颁发者"},"panels/application/components/TrustTokensView.ts | noTrustTokensStored":{"message":"尚未存储任何私密状态令牌。"},"panels/application/components/TrustTokensView.ts | storedTokenCount":{"message":"已存储的令牌数"},"panels/application/components/TrustTokensView.ts | trustTokens":{"message":"私密状态令牌"},"panels/application/preloading/PreloadingView.ts | checkboxFilterBySelectedRuleSet":{"message":"按所选规则集过滤"},"panels/application/preloading/PreloadingView.ts | extensionSettings":{"message":"扩展程序设置"},"panels/application/preloading/PreloadingView.ts | preloadingPageSettings":{"message":"预加载网页设置"},"panels/application/preloading/PreloadingView.ts | statusFailure":{"message":"失败"},"panels/application/preloading/PreloadingView.ts | statusNotTriggered":{"message":"未触发"},"panels/application/preloading/PreloadingView.ts | statusPending":{"message":"待处理"},"panels/application/preloading/PreloadingView.ts | statusReady":{"message":"已就绪"},"panels/application/preloading/PreloadingView.ts | statusRunning":{"message":"正在运行"},"panels/application/preloading/PreloadingView.ts | statusSuccess":{"message":"成功"},"panels/application/preloading/PreloadingView.ts | validityInvalid":{"message":"无效"},"panels/application/preloading/PreloadingView.ts | validitySomeRulesInvalid":{"message":"部分规则无效"},"panels/application/preloading/PreloadingView.ts | validityValid":{"message":"有效"},"panels/application/preloading/PreloadingView.ts | warningDetailPreloadingDisabledByBatterysaver":{"message":"由于操作系统启用了省电模式,预加载已停用。"},"panels/application/preloading/PreloadingView.ts | warningDetailPreloadingDisabledByDatasaver":{"message":"由于操作系统启用了省流量模式,预加载已停用。"},"panels/application/preloading/PreloadingView.ts | warningDetailPreloadingDisabledByFeatureFlag":{"message":"由于开发者工具已打开,因此系统已强制启用预加载功能。关闭开发者工具后,系统将停用预渲染功能,因为此浏览器会话属于用于比较性能的对照组。"},"panels/application/preloading/PreloadingView.ts | warningDetailPreloadingStateDisabled":{"message":"预加载由于用户设置或扩展程序而停用。请前往 {PH1} 了解详情,或前往 {PH2} 停用相应扩展程序。"},"panels/application/preloading/PreloadingView.ts | warningDetailPrerenderingDisabledByFeatureFlag":{"message":"由于开发者工具已打开,因此系统已强制启用预渲染功能。关闭开发者工具后,系统将停用预渲染功能,因为此浏览器会话属于用于比较性能的对照组。"},"panels/application/preloading/PreloadingView.ts | warningTitlePreloadingDisabledByFeatureFlag":{"message":"预加载功能之前已停用,但现已强制启用"},"panels/application/preloading/PreloadingView.ts | warningTitlePreloadingStateDisabled":{"message":"已停用预加载"},"panels/application/preloading/PreloadingView.ts | warningTitlePrerenderingDisabledByFeatureFlag":{"message":"预渲染功能之前已停用,但现已强制启用"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusFailure":{"message":"预加载失败。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusNotTriggered":{"message":"预加载尝试尚未触发。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusPending":{"message":"预加载尝试符合条件,但尚待处理。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusReady":{"message":"预加载完毕,结果已就绪,可供下次导航使用。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusRunning":{"message":"预加载正在运行。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusSuccess":{"message":"预加载完毕,且已用于导航。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsAction":{"message":"操作"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsDetailedInformation":{"message":"详细信息"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsFailureReason":{"message":"失败原因"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsRuleSet":{"message":"规则集"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsStatus":{"message":"状态"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusActivatedDuringMainFrameNavigation":{"message":"在发起页的主框架导航期间激活的预渲染网页。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusActivationFramePolicyNotCompatible":{"message":"未使用预渲染,因为就沙盒标记或权限政策而言,发起页与预渲染页面不兼容。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusActivationNavigationParameterMismatch":{"message":"未使用预渲染,因为激活期间计算的导航参数(例如 HTTP 标头)不同于原始预渲染导航请求期间计算的参数。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusAudioOutputDeviceRequested":{"message":"预渲染的网页请求进行音频输出,但目前不支持该操作。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusBatterySaverEnabled":{"message":"未执行预渲染,因为用户已请求浏览器降低耗电量。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusBlockedByClient":{"message":"已阻止加载部分资源。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusClientCertRequested":{"message":"预渲染导航要求提供 HTTP 客户端证书。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusCrossSiteNavigationInInitialNavigation":{"message":"预渲染导航失败,因为定向到了跨网站网址。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusCrossSiteNavigationInMainFrameNavigation":{"message":"预渲染的网页导航到了跨网站网址。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusCrossSiteRedirectInInitialNavigation":{"message":"预渲染导航失败,因为预渲染的网址重定向到了跨网站网址。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusCrossSiteRedirectInMainFrameNavigation":{"message":"预渲染的网页导航到的网址重定向到了跨网站网址。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusDataSaverEnabled":{"message":"未执行预渲染,因为用户已请求浏览器节省数据流量。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusDownload":{"message":"预渲染的网页尝试发起下载,但该操作目前不受支持。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusFailToGetMemoryUsage":{"message":"未执行预渲染,因为浏览器在尝试确定当前内存用量时遇到内部错误。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusHasEffectiveUrl":{"message":"发起页无法执行预渲染,因为该页面的有效网址不同于它的常规网址。(例如,“新标签页”页面或托管的应用。)"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusInvalidSchemeNavigation":{"message":"由于网址的架构不是 http: 或 https:,因此无法进行预渲染。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusInvalidSchemeRedirect":{"message":"预渲染导航失败,因为它重定向到的网址不是 http: 或 https: 架构。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusLoginAuthRequested":{"message":"预渲染导航要求进行 HTTP 身份验证,但目前不支持这种验证。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusLowEndDevice":{"message":"未执行预渲染,因为此设备没有足够的系统总内存来支持预渲染。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusMainFrameNavigation":{"message":"预渲染的网页自行导航到了另一个网址,但该网址目前不受支持。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusMaxNumOfRunningPrerendersExceeded":{"message":"未执行预渲染,因为发起页中已有太多正在进行的预渲染。请移除其他推测规则,以便执行进一步的预渲染。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusMemoryLimitExceeded":{"message":"未执行预渲染,因为浏览器的内存用量超出了预渲染内存上限。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusMemoryPressureAfterTriggered":{"message":"由于浏览器面临极大的内存压力,因此预渲染的网页被卸载了。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusMemoryPressureOnTrigger":{"message":"未执行预渲染,因为浏览器面临极大的内存压力。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusMixedContent":{"message":"预渲染的网页包含混合内容。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusMojoBinderPolicy":{"message":"预渲染的网页使用了被禁用的 JavaScript API,但该 API 目前不受支持。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusNavigationBadHttpStatus":{"message":"预渲染导航失败,因为 HTTP 响应状态代码不是 2xx。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusNavigationRequestBlockedByCsp":{"message":"预渲染导航被内容安全政策阻止了。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusNavigationRequestNetworkError":{"message":"预渲染导航遇到了网络连接错误。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusPreloadingDisabled":{"message":"由于用户在其浏览器设置中停用了预加载,因此无法进行预渲染"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusPrimaryMainFrameRendererProcessCrashed":{"message":"发起页崩溃了。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusPrimaryMainFrameRendererProcessKilled":{"message":"发起页被终止了。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusRendererProcessCrashed":{"message":"预渲染的网页崩溃了。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusRendererProcessKilled":{"message":"预渲染的网页被终止了。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusSameSiteCrossOriginNavigationNotOptInInInitialNavigation":{"message":"预渲染的网页自行导航到了一个同网站跨源网址,但目标响应未包含相应的 Supports-Loading-Mode 标头。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusSameSiteCrossOriginNavigationNotOptInInMainFrameNavigation":{"message":"预渲染的网页导航到了同网站跨源网址,但目标响应未包含相应的 Supports-Loading-Mode 标头。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusSameSiteCrossOriginRedirectNotOptInInInitialNavigation":{"message":"预渲染导航失败,因为预渲染的网址重定向到了同网站跨源网址,但目标响应未包含相应的 Supports-Loading-Mode 标头。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusSameSiteCrossOriginRedirectNotOptInInMainFrameNavigation":{"message":"预渲染的网页导航到的网址重定向到了同网站跨源网址,但目标响应未包含相应的 Supports-Loading-Mode 标头。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusSslCertificateError":{"message":"预渲染导航失败,因为 SSL 证书无效。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusTimeoutBackgrounded":{"message":"预渲染的网页被舍弃了,因为发起页已转至后台运行且已运行很长时间。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusTriggerBackgrounded":{"message":"由于发起页已转至后台运行,因此预渲染的网页被舍弃了。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | prerenderFinalStatusUaChangeRequiresReload":{"message":"预渲染导航过程中用户代理发生了更改。"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | selectAnElementForMoreDetails":{"message":"选择一个元素即可了解更多详情"},"panels/application/preloading/components/PreloadingGrid.ts | action":{"message":"操作"},"panels/application/preloading/components/PreloadingGrid.ts | status":{"message":"状态"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | buttonClickToRevealInElementsPanel":{"message":"点击即可在“元素”面板中显示"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | buttonClickToRevealInNetworkPanel":{"message":"点击即可在“网络”面板中显示"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | detailsDetailedInformation":{"message":"详细信息"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | detailsError":{"message":"错误"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | detailsLocation":{"message":"位置"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | detailsSource":{"message":"来源"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | detailsValidity":{"message":"有效期"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | validityInvalid":{"message":"无效;来源不是 JSON 对象"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | validitySomeRulesInvalid":{"message":"某些规则无效,会被忽略"},"panels/application/preloading/components/RuleSetDetailsReportView.ts | validityValid":{"message":"有效"},"panels/application/preloading/components/RuleSetGrid.ts | location":{"message":"位置"},"panels/application/preloading/components/RuleSetGrid.ts | validity":{"message":"有效性"},"panels/application/preloading/components/UsedPreloadingView.ts | prefetchUsed":{"message":"此网页使用了 {PH1} 个预提取的资源"},"panels/application/preloading/components/UsedPreloadingView.ts | prerenderUsed":{"message":"此网页是预呈现的网页"},"panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts | breakpointHit":{"message":"断点命中"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | attributeModified":{"message":"已修改属性"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | breakOn":{"message":"发生中断的条件"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | breakpointHit":{"message":"断点命中"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | breakpointRemoved":{"message":"移除了断点"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | breakpointSet":{"message":"断点设置"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | checked":{"message":"已勾选"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | domBreakpointsList":{"message":"DOM 断点列表"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | noBreakpoints":{"message":"无断点"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | nodeRemoved":{"message":"节点已移除"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | removeAllDomBreakpoints":{"message":"移除所有 DOM 断点"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | removeBreakpoint":{"message":"移除断点"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | revealDomNodeInElementsPanel":{"message":"在“元素”面板中显示 DOM 节点"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | sBreakpointHit":{"message":"遇到{PH1}断点"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | sS":{"message":"{PH1}:{PH2}"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | sSS":{"message":"{PH1}:{PH2},{PH3}"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | subtreeModified":{"message":"已修改子树"},"panels/browser_debugger/DOMBreakpointsSidebarPane.ts | unchecked":{"message":"未选中"},"panels/browser_debugger/ObjectEventListenersSidebarPane.ts | refreshGlobalListeners":{"message":"刷新全局监听器"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | addBreakpoint":{"message":"添加断点"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | addXhrfetchBreakpoint":{"message":"添加 XHR/Fetch 断点"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | anyXhrOrFetch":{"message":"任何 XHR 或提取"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | breakWhenUrlContains":{"message":"网址包含以下内容时中断:"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | breakpointHit":{"message":"断点命中"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | noBreakpoints":{"message":"无断点"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | removeAllBreakpoints":{"message":"移除所有断点"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | removeBreakpoint":{"message":"移除断点"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | urlBreakpoint":{"message":"网址断点"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | urlContainsS":{"message":"网址包含“{PH1}”"},"panels/browser_debugger/XHRBreakpointsSidebarPane.ts | xhrfetchBreakpoints":{"message":"XHR/提取断点"},"panels/browser_debugger/browser_debugger-meta.ts | contentScripts":{"message":"内容脚本"},"panels/browser_debugger/browser_debugger-meta.ts | cspViolationBreakpoints":{"message":"CSP 违规断点"},"panels/browser_debugger/browser_debugger-meta.ts | domBreakpoints":{"message":"DOM 断点"},"panels/browser_debugger/browser_debugger-meta.ts | eventListenerBreakpoints":{"message":"事件监听器断点"},"panels/browser_debugger/browser_debugger-meta.ts | globalListeners":{"message":"全局监听器"},"panels/browser_debugger/browser_debugger-meta.ts | overrides":{"message":"替换"},"panels/browser_debugger/browser_debugger-meta.ts | page":{"message":"网页"},"panels/browser_debugger/browser_debugger-meta.ts | showContentScripts":{"message":"显示内容脚本"},"panels/browser_debugger/browser_debugger-meta.ts | showCspViolationBreakpoints":{"message":"显示 CSP 违规断点"},"panels/browser_debugger/browser_debugger-meta.ts | showDomBreakpoints":{"message":"显示 DOM 断点"},"panels/browser_debugger/browser_debugger-meta.ts | showEventListenerBreakpoints":{"message":"显示事件监听器断点"},"panels/browser_debugger/browser_debugger-meta.ts | showGlobalListeners":{"message":"显示“全局监听器\""},"panels/browser_debugger/browser_debugger-meta.ts | showOverrides":{"message":"显示“替换”工具"},"panels/browser_debugger/browser_debugger-meta.ts | showPage":{"message":"显示“网页”标签页"},"panels/browser_debugger/browser_debugger-meta.ts | showXhrfetchBreakpoints":{"message":"显示 XHR/提取断点"},"panels/browser_debugger/browser_debugger-meta.ts | xhrfetchBreakpoints":{"message":"XHR/提取断点"},"panels/changes/ChangesSidebar.ts | sFromSourceMap":{"message":"{PH1}(来自来源映射)"},"panels/changes/ChangesView.ts | binaryData":{"message":"二进制数据"},"panels/changes/ChangesView.ts | copy":{"message":"复制"},"panels/changes/ChangesView.ts | copyAllChangesFromCurrentFile":{"message":"复制当前文件中的所有更改"},"panels/changes/ChangesView.ts | noChanges":{"message":"无更改"},"panels/changes/ChangesView.ts | revertAllChangesToCurrentFile":{"message":"还原对当前文件所做的所有更改"},"panels/changes/ChangesView.ts | sDeletions":{"message":"{n,plural, =1{# 行删除代码 (-)}other{# 行删除代码 (-)}}"},"panels/changes/ChangesView.ts | sInsertions":{"message":"{n,plural, =1{# 行插入代码 (+)}other{# 行插入代码 (+)}}"},"panels/changes/changes-meta.ts | changes":{"message":"变更"},"panels/changes/changes-meta.ts | showChanges":{"message":"显示“更改”工具"},"panels/console/ConsoleContextSelector.ts | extension":{"message":"扩展程序"},"panels/console/ConsoleContextSelector.ts | javascriptContextNotSelected":{"message":"JavaScript 上下文:未选择"},"panels/console/ConsoleContextSelector.ts | javascriptContextS":{"message":"JavaScript 上下文:{PH1}"},"panels/console/ConsolePinPane.ts | evaluateAllowingSideEffects":{"message":"评估,允许有副作用"},"panels/console/ConsolePinPane.ts | expression":{"message":"表达式"},"panels/console/ConsolePinPane.ts | liveExpressionEditor":{"message":"实时表达式编辑器"},"panels/console/ConsolePinPane.ts | notAvailable":{"message":"不可用"},"panels/console/ConsolePinPane.ts | removeAllExpressions":{"message":"移除所有表达式"},"panels/console/ConsolePinPane.ts | removeBlankExpression":{"message":"移除空白表达式"},"panels/console/ConsolePinPane.ts | removeExpression":{"message":"移除表达式"},"panels/console/ConsolePinPane.ts | removeExpressionS":{"message":"移除表达式:{PH1}"},"panels/console/ConsolePrompt.ts | consolePrompt":{"message":"控制台提示"},"panels/console/ConsoleSidebar.ts | dErrors":{"message":"{n,plural, =0{无错误}=1{# 个错误}other{# 个错误}}"},"panels/console/ConsoleSidebar.ts | dInfo":{"message":"{n,plural, =0{无信息}=1{# 条信息}other{# 条信息}}"},"panels/console/ConsoleSidebar.ts | dMessages":{"message":"{n,plural, =0{没有任何消息}=1{# 条消息}other{# 条消息}}"},"panels/console/ConsoleSidebar.ts | dUserMessages":{"message":"{n,plural, =0{没有用户消息}=1{# 条用户消息}other{# 条用户消息}}"},"panels/console/ConsoleSidebar.ts | dVerbose":{"message":"{n,plural, =0{无详细消息}=1{# 条详细消息}other{# 条详细消息}}"},"panels/console/ConsoleSidebar.ts | dWarnings":{"message":"{n,plural, =0{无警告}=1{# 条警告}other{# 条警告}}"},"panels/console/ConsoleSidebar.ts | other":{"message":"<其他>"},"panels/console/ConsoleView.ts | allLevels":{"message":"所有级别"},"panels/console/ConsoleView.ts | autocompleteFromHistory":{"message":"根据历史记录自动补全"},"panels/console/ConsoleView.ts | consoleCleared":{"message":"已清除控制台"},"panels/console/ConsoleView.ts | consolePasteBlocked":{"message":"此页面禁止粘贴代码。将代码粘贴到开发者工具中可让攻击者接管您的帐号。"},"panels/console/ConsoleView.ts | consoleSettings":{"message":"控制台设置"},"panels/console/ConsoleView.ts | consoleSidebarHidden":{"message":"控制台边栏处于隐藏状态"},"panels/console/ConsoleView.ts | consoleSidebarShown":{"message":"控制台边栏处于显示状态"},"panels/console/ConsoleView.ts | copyVisibleStyledSelection":{"message":"复制带有可见样式的选择内容"},"panels/console/ConsoleView.ts | customLevels":{"message":"自定义级别"},"panels/console/ConsoleView.ts | default":{"message":"默认"},"panels/console/ConsoleView.ts | defaultLevels":{"message":"默认级别"},"panels/console/ConsoleView.ts | doNotClearLogOnPageReload":{"message":"网页重新加载/导航时不清除日志"},"panels/console/ConsoleView.ts | eagerlyEvaluateTextInThePrompt":{"message":"及早评估提示文字"},"panels/console/ConsoleView.ts | egEventdCdnUrlacom":{"message":"例如:/eventd/ -cdn url:a.com"},"panels/console/ConsoleView.ts | errors":{"message":"错误"},"panels/console/ConsoleView.ts | filter":{"message":"过滤"},"panels/console/ConsoleView.ts | filteredMessagesInConsole":{"message":"控制台中有 {PH1} 条消息"},"panels/console/ConsoleView.ts | findStringInLogs":{"message":"在日志中查找字符串"},"panels/console/ConsoleView.ts | groupSimilarMessagesInConsole":{"message":"在控制台中对相似消息进行分组"},"panels/console/ConsoleView.ts | hideAll":{"message":"隐藏全部"},"panels/console/ConsoleView.ts | hideConsoleSidebar":{"message":"隐藏控制台边栏"},"panels/console/ConsoleView.ts | hideMessagesFromS":{"message":"隐藏来自 {PH1} 的消息"},"panels/console/ConsoleView.ts | hideNetwork":{"message":"隐藏网络"},"panels/console/ConsoleView.ts | info":{"message":"信息"},"panels/console/ConsoleView.ts | issueToolbarClickToGoToTheIssuesTab":{"message":"点击即可转到“问题”标签页"},"panels/console/ConsoleView.ts | issueToolbarClickToView":{"message":"点击即可查看 {issueEnumeration}"},"panels/console/ConsoleView.ts | issueToolbarTooltipGeneral":{"message":"某些问题不再生成控制台消息,但会显示在“问题”标签页中。"},"panels/console/ConsoleView.ts | issuesWithColon":{"message":"{n,plural, =0{无问题}=1{# 个问题:}other{# 个问题:}}"},"panels/console/ConsoleView.ts | logLevelS":{"message":"日志级别:{PH1}"},"panels/console/ConsoleView.ts | logLevels":{"message":"日志级别"},"panels/console/ConsoleView.ts | logXMLHttpRequests":{"message":"记录 XMLHttpRequest"},"panels/console/ConsoleView.ts | onlyShowMessagesFromTheCurrentContext":{"message":"仅显示来自当前上下文(top、iframe、worker、扩展程序)的消息"},"panels/console/ConsoleView.ts | overriddenByFilterSidebar":{"message":"已被过滤器边栏覆盖"},"panels/console/ConsoleView.ts | preserveLog":{"message":"保留日志"},"panels/console/ConsoleView.ts | replayXhr":{"message":"重放 XHR"},"panels/console/ConsoleView.ts | sHidden":{"message":"{n,plural, =1{# 条已隐藏}other{# 条已隐藏}}"},"panels/console/ConsoleView.ts | sOnly":{"message":"仅限{PH1}"},"panels/console/ConsoleView.ts | saveAs":{"message":"另存为…"},"panels/console/ConsoleView.ts | searching":{"message":"正在搜索…"},"panels/console/ConsoleView.ts | selectedContextOnly":{"message":"仅限已选择的上下文"},"panels/console/ConsoleView.ts | showConsoleSidebar":{"message":"显示控制台边栏"},"panels/console/ConsoleView.ts | showCorsErrorsInConsole":{"message":"在控制台中显示CORS错误"},"panels/console/ConsoleView.ts | treatEvaluationAsUserActivation":{"message":"将评估视为用户激活行为"},"panels/console/ConsoleView.ts | verbose":{"message":"详细"},"panels/console/ConsoleView.ts | warnings":{"message":"警告"},"panels/console/ConsoleView.ts | writingFile":{"message":"正在写入文件…"},"panels/console/ConsoleViewMessage.ts | Mxx":{"message":" M"},"panels/console/ConsoleViewMessage.ts | assertionFailed":{"message":"断言失败: "},"panels/console/ConsoleViewMessage.ts | attribute":{"message":""},"panels/console/ConsoleViewMessage.ts | clearAllMessagesWithS":{"message":"使用 {PH1} 清除所有消息"},"panels/console/ConsoleViewMessage.ts | cndBreakpoint":{"message":"条件断点"},"panels/console/ConsoleViewMessage.ts | console":{"message":"控制台"},"panels/console/ConsoleViewMessage.ts | consoleWasCleared":{"message":"控制台数据已被清除"},"panels/console/ConsoleViewMessage.ts | consoleclearWasPreventedDueTo":{"message":"由于要“保留日志”,系统已阻止 console.clear() 发挥作用"},"panels/console/ConsoleViewMessage.ts | deprecationS":{"message":"[Deprecation] {PH1}"},"panels/console/ConsoleViewMessage.ts | error":{"message":"错误"},"panels/console/ConsoleViewMessage.ts | errorS":{"message":"{n,plural, =1{错误,已重复 # 次}other{错误,已重复 # 次}}"},"panels/console/ConsoleViewMessage.ts | exception":{"message":""},"panels/console/ConsoleViewMessage.ts | functionWasResolvedFromBound":{"message":"函数已根据绑定的函数进行解析。"},"panels/console/ConsoleViewMessage.ts | index":{"message":"(索引)"},"panels/console/ConsoleViewMessage.ts | interventionS":{"message":"[Intervention] {PH1}"},"panels/console/ConsoleViewMessage.ts | logpoint":{"message":"日志点"},"panels/console/ConsoleViewMessage.ts | repeatS":{"message":"{n,plural, =1{已重复 # 次}other{已重复 # 次}}"},"panels/console/ConsoleViewMessage.ts | someEvent":{"message":"<某些> 事件"},"panels/console/ConsoleViewMessage.ts | stackMessageCollapsed":{"message":"堆栈表格已收起"},"panels/console/ConsoleViewMessage.ts | stackMessageExpanded":{"message":"堆栈表格已展开"},"panels/console/ConsoleViewMessage.ts | thisValueWasEvaluatedUponFirst":{"message":"此值是在第一次展开时评估得出的。之后可能已发生更改。"},"panels/console/ConsoleViewMessage.ts | thisValueWillNotBeCollectedUntil":{"message":"在清除控制台之前,系统不会收集此值。"},"panels/console/ConsoleViewMessage.ts | tookNms":{"message":"用时 毫秒"},"panels/console/ConsoleViewMessage.ts | url":{"message":""},"panels/console/ConsoleViewMessage.ts | value":{"message":"值"},"panels/console/ConsoleViewMessage.ts | violationS":{"message":"[Violation] {PH1}"},"panels/console/ConsoleViewMessage.ts | warning":{"message":"警告"},"panels/console/ConsoleViewMessage.ts | warningS":{"message":"{n,plural, =1{警告,已重复 # 次}other{警告,已重复 # 次}}"},"panels/console/console-meta.ts | autocompleteFromHistory":{"message":"根据历史记录自动补全"},"panels/console/console-meta.ts | autocompleteOnEnter":{"message":"按 Enter 键时接受自动补全建议"},"panels/console/console-meta.ts | clearConsole":{"message":"清除控制台"},"panels/console/console-meta.ts | clearConsoleHistory":{"message":"清除控制台历史记录"},"panels/console/console-meta.ts | collapseConsoleTraceMessagesByDefault":{"message":"不自动展开 console.trace() 消息"},"panels/console/console-meta.ts | console":{"message":"控制台"},"panels/console/console-meta.ts | createLiveExpression":{"message":"创建实时表达式"},"panels/console/console-meta.ts | doNotAutocompleteFromHistory":{"message":"不根据历史记录自动补全"},"panels/console/console-meta.ts | doNotAutocompleteOnEnter":{"message":"按 Enter 键时不接受自动补全建议"},"panels/console/console-meta.ts | doNotEagerlyEvaluateConsole":{"message":"不即时评估控制台提示文字"},"panels/console/console-meta.ts | doNotGroupSimilarMessagesIn":{"message":"不要对控制台中的类似消息分组"},"panels/console/console-meta.ts | doNotShowCorsErrorsIn":{"message":"不在控制台中显示CORS错误"},"panels/console/console-meta.ts | doNotTreatEvaluationAsUser":{"message":"请勿将评估视为用户激活行为"},"panels/console/console-meta.ts | eagerEvaluation":{"message":"及早评估"},"panels/console/console-meta.ts | eagerlyEvaluateConsolePromptText":{"message":"即时评估控制台提示文字"},"panels/console/console-meta.ts | evaluateTriggersUserActivation":{"message":"将代码评估视为用户操作"},"panels/console/console-meta.ts | expandConsoleTraceMessagesByDefault":{"message":"自动展开 console.trace() 消息"},"panels/console/console-meta.ts | groupSimilarMessagesInConsole":{"message":"在控制台中对相似消息进行分组"},"panels/console/console-meta.ts | hideNetworkMessages":{"message":"隐藏网络消息"},"panels/console/console-meta.ts | hideTimestamps":{"message":"隐藏时间戳"},"panels/console/console-meta.ts | logXmlhttprequests":{"message":"记录 XMLHttpRequest"},"panels/console/console-meta.ts | onlyShowMessagesFromTheCurrent":{"message":"仅显示来自当前上下文(top、iframe、worker、扩展程序)的消息"},"panels/console/console-meta.ts | selectedContextOnly":{"message":"仅限已选择的上下文"},"panels/console/console-meta.ts | showConsole":{"message":"显示控制台"},"panels/console/console-meta.ts | showCorsErrorsInConsole":{"message":"在控制台中显示CORS错误"},"panels/console/console-meta.ts | showMessagesFromAllContexts":{"message":"显示来自所有上下文的消息"},"panels/console/console-meta.ts | showNetworkMessages":{"message":"显示网络消息"},"panels/console/console-meta.ts | showTimestamps":{"message":"显示时间戳"},"panels/console/console-meta.ts | treatEvaluationAsUserActivation":{"message":"将评估视为用户激活行为"},"panels/console_counters/WarningErrorCounter.ts | openConsoleToViewS":{"message":"打开控制台即可查看 {PH1}"},"panels/console_counters/WarningErrorCounter.ts | openIssuesToView":{"message":"{n,plural, =1{打开“问题”即可查看 # 个问题:}other{打开“问题”即可查看 # 个问题:}}"},"panels/console_counters/WarningErrorCounter.ts | sErrors":{"message":"{n,plural, =1{# 个错误}other{# 个错误}}"},"panels/console_counters/WarningErrorCounter.ts | sWarnings":{"message":"{n,plural, =1{# 条警告}other{# 条警告}}"},"panels/coverage/CoverageListView.ts | codeCoverage":{"message":"代码覆盖率"},"panels/coverage/CoverageListView.ts | css":{"message":"CSS"},"panels/coverage/CoverageListView.ts | jsCoverageWithPerBlock":{"message":"按块粒度衡量的 JS 覆盖率:JavaScript 代码块执行后,相应块将标记为已覆盖。"},"panels/coverage/CoverageListView.ts | jsCoverageWithPerFunction":{"message":"按函数粒度得出的 JS 覆盖范围:某个函数一旦执行,整个函数便会被标记为已覆盖。"},"panels/coverage/CoverageListView.ts | jsPerBlock":{"message":"JS(按块)"},"panels/coverage/CoverageListView.ts | jsPerFunction":{"message":"JS(按函数)"},"panels/coverage/CoverageListView.ts | sBytes":{"message":"{n,plural, =1{# 个字节}other{# 个字节}}"},"panels/coverage/CoverageListView.ts | sBytesS":{"message":"{n,plural, =1{# 个字节,{percentage}}other{# 个字节,{percentage}}}"},"panels/coverage/CoverageListView.ts | sBytesSBelongToBlocksOf":{"message":"有 {PH1} 个字节 ({PH2}) 位于尚未执行的 JavaScript 块中。"},"panels/coverage/CoverageListView.ts | sBytesSBelongToBlocksOfJavascript":{"message":"有 {PH1} 个字节 ({PH2}) 位于已执行至少 1 次的 JavaScript 代码块中。"},"panels/coverage/CoverageListView.ts | sBytesSBelongToFunctionsThatHave":{"message":"有 {PH1} 个字节 ({PH2}) 位于尚未执行的函数中。"},"panels/coverage/CoverageListView.ts | sBytesSBelongToFunctionsThatHaveExecuted":{"message":"有 {PH1} 个字节 ({PH2}) 位于已执行至少 1 次的函数中。"},"panels/coverage/CoverageListView.ts | sOfFileUnusedSOfFileUsed":{"message":"{PH1}% 的文件未使用,{PH2}% 的文件已使用"},"panels/coverage/CoverageListView.ts | totalBytes":{"message":"总字节数"},"panels/coverage/CoverageListView.ts | type":{"message":"类型"},"panels/coverage/CoverageListView.ts | unusedBytes":{"message":"未使用的字节数"},"panels/coverage/CoverageListView.ts | url":{"message":"网址"},"panels/coverage/CoverageListView.ts | usageVisualization":{"message":"使用情况可视化图表"},"panels/coverage/CoverageView.ts | all":{"message":"全部"},"panels/coverage/CoverageView.ts | chooseCoverageGranularityPer":{"message":"选择覆盖范围粒度:“按函数”的开销很低,“按块”的开销很高。"},"panels/coverage/CoverageView.ts | clearAll":{"message":"全部清除"},"panels/coverage/CoverageView.ts | clickTheRecordButtonSToStart":{"message":"点击“记录”按钮 {PH1} 即可开始记录覆盖范围。"},"panels/coverage/CoverageView.ts | clickTheReloadButtonSToReloadAnd":{"message":"点击“重新加载”按钮 {PH1} 即可重新加载并开始记录覆盖范围。"},"panels/coverage/CoverageView.ts | contentScripts":{"message":"内容脚本"},"panels/coverage/CoverageView.ts | css":{"message":"CSS"},"panels/coverage/CoverageView.ts | export":{"message":"导出…"},"panels/coverage/CoverageView.ts | filterCoverageByType":{"message":"按类型过滤覆盖率"},"panels/coverage/CoverageView.ts | filteredSTotalS":{"message":"过滤后:{PH1};总计:{PH2}"},"panels/coverage/CoverageView.ts | includeExtensionContentScripts":{"message":"添加扩展程序内容脚本"},"panels/coverage/CoverageView.ts | javascript":{"message":"JavaScript"},"panels/coverage/CoverageView.ts | perBlock":{"message":"按块"},"panels/coverage/CoverageView.ts | perFunction":{"message":"按函数"},"panels/coverage/CoverageView.ts | sOfSSUsedSoFarSUnused":{"message":"到目前为止,已使用 {PH1} ({PH3}%),共 {PH2},还有 {PH4} 未使用。"},"panels/coverage/CoverageView.ts | urlFilter":{"message":"网址过滤条件"},"panels/coverage/coverage-meta.ts | coverage":{"message":"覆盖率"},"panels/coverage/coverage-meta.ts | instrumentCoverage":{"message":"插桩覆盖范围"},"panels/coverage/coverage-meta.ts | showCoverage":{"message":"显示覆盖范围"},"panels/coverage/coverage-meta.ts | startInstrumentingCoverageAnd":{"message":"开始检测覆盖率,并重新加载网页"},"panels/coverage/coverage-meta.ts | stopInstrumentingCoverageAndShow":{"message":"停止检测覆盖率并显示结果"},"panels/css_overview/CSSOverviewCompletedView.ts | aa":{"message":"AA"},"panels/css_overview/CSSOverviewCompletedView.ts | aaa":{"message":"AAA"},"panels/css_overview/CSSOverviewCompletedView.ts | apca":{"message":"APCA"},"panels/css_overview/CSSOverviewCompletedView.ts | attributeSelectors":{"message":"属性选择器"},"panels/css_overview/CSSOverviewCompletedView.ts | backgroundColorsS":{"message":"背景颜色:{PH1}"},"panels/css_overview/CSSOverviewCompletedView.ts | borderColorsS":{"message":"边框颜色:{PH1}"},"panels/css_overview/CSSOverviewCompletedView.ts | classSelectors":{"message":"类选择器"},"panels/css_overview/CSSOverviewCompletedView.ts | colors":{"message":"颜色"},"panels/css_overview/CSSOverviewCompletedView.ts | contrastIssues":{"message":"对比度问题"},"panels/css_overview/CSSOverviewCompletedView.ts | contrastIssuesS":{"message":"对比度问题:{PH1}"},"panels/css_overview/CSSOverviewCompletedView.ts | contrastRatio":{"message":"对比度"},"panels/css_overview/CSSOverviewCompletedView.ts | cssOverviewElements":{"message":"CSS 概览元素"},"panels/css_overview/CSSOverviewCompletedView.ts | declaration":{"message":"声明"},"panels/css_overview/CSSOverviewCompletedView.ts | element":{"message":"元素"},"panels/css_overview/CSSOverviewCompletedView.ts | elements":{"message":"元素"},"panels/css_overview/CSSOverviewCompletedView.ts | externalStylesheets":{"message":"外部样式表"},"panels/css_overview/CSSOverviewCompletedView.ts | fillColorsS":{"message":"填充颜色:{PH1}"},"panels/css_overview/CSSOverviewCompletedView.ts | fontInfo":{"message":"字体信息"},"panels/css_overview/CSSOverviewCompletedView.ts | idSelectors":{"message":"ID 选择器"},"panels/css_overview/CSSOverviewCompletedView.ts | inlineStyleElements":{"message":"内嵌样式元素"},"panels/css_overview/CSSOverviewCompletedView.ts | mediaQueries":{"message":"媒体查询数量"},"panels/css_overview/CSSOverviewCompletedView.ts | nOccurrences":{"message":"{n,plural, =1{# 次}other{# 次}}"},"panels/css_overview/CSSOverviewCompletedView.ts | nonsimpleSelectors":{"message":"非简单选择器"},"panels/css_overview/CSSOverviewCompletedView.ts | overviewSummary":{"message":"概览摘要"},"panels/css_overview/CSSOverviewCompletedView.ts | showElement":{"message":"显示元素"},"panels/css_overview/CSSOverviewCompletedView.ts | source":{"message":"来源"},"panels/css_overview/CSSOverviewCompletedView.ts | styleRules":{"message":"样式规则"},"panels/css_overview/CSSOverviewCompletedView.ts | textColorSOverSBackgroundResults":{"message":"文本颜色 {PH1} 与背景色 {PH2} 搭配将导致 {PH3} 个元素的对比度较低"},"panels/css_overview/CSSOverviewCompletedView.ts | textColorsS":{"message":"文字颜色:{PH1}"},"panels/css_overview/CSSOverviewCompletedView.ts | thereAreNoFonts":{"message":"没有使用字体。"},"panels/css_overview/CSSOverviewCompletedView.ts | thereAreNoMediaQueries":{"message":"没有任何媒体查询。"},"panels/css_overview/CSSOverviewCompletedView.ts | thereAreNoUnusedDeclarations":{"message":"没有未使用的声明。"},"panels/css_overview/CSSOverviewCompletedView.ts | typeSelectors":{"message":"类型选择器"},"panels/css_overview/CSSOverviewCompletedView.ts | universalSelectors":{"message":"通用选择器"},"panels/css_overview/CSSOverviewCompletedView.ts | unusedDeclarations":{"message":"未使用的声明"},"panels/css_overview/CSSOverviewProcessingView.ts | cancel":{"message":"取消"},"panels/css_overview/CSSOverviewSidebarPanel.ts | clearOverview":{"message":"清除概览"},"panels/css_overview/CSSOverviewSidebarPanel.ts | cssOverviewPanelSidebar":{"message":"“CSS 概览”面板边栏"},"panels/css_overview/CSSOverviewUnusedDeclarations.ts | bottomAppliedToAStatically":{"message":"Bottom值已应用于静态放置的元素"},"panels/css_overview/CSSOverviewUnusedDeclarations.ts | heightAppliedToAnInlineElement":{"message":"Height值已应用于内嵌元素"},"panels/css_overview/CSSOverviewUnusedDeclarations.ts | leftAppliedToAStatically":{"message":"Left值已应用于静态放置的元素"},"panels/css_overview/CSSOverviewUnusedDeclarations.ts | rightAppliedToAStatically":{"message":"Right值已应用于静态放置的元素"},"panels/css_overview/CSSOverviewUnusedDeclarations.ts | topAppliedToAStatically":{"message":"Top值已应用于静态放置的元素"},"panels/css_overview/CSSOverviewUnusedDeclarations.ts | verticalAlignmentAppliedTo":{"message":"已对既非 inline 也非 table-cell 的元素采用垂直对齐样式"},"panels/css_overview/CSSOverviewUnusedDeclarations.ts | widthAppliedToAnInlineElement":{"message":"Width值已应用于内嵌元素"},"panels/css_overview/components/CSSOverviewStartView.ts | captureOverview":{"message":"捕获概览"},"panels/css_overview/components/CSSOverviewStartView.ts | capturePageCSSOverview":{"message":"捕获您网页的 CSS 概况"},"panels/css_overview/components/CSSOverviewStartView.ts | identifyCSSImprovements":{"message":"发掘潜在的 CSS 改进机会"},"panels/css_overview/components/CSSOverviewStartView.ts | identifyCSSImprovementsWithExampleIssues":{"message":"发掘潜在的 CSS 改进机会(例如低对比度问题、未使用的声明、颜色或字体不匹配)"},"panels/css_overview/components/CSSOverviewStartView.ts | locateAffectedElements":{"message":"在“元素”面板中找到受影响的元素"},"panels/css_overview/components/CSSOverviewStartView.ts | quickStartWithCSSOverview":{"message":"快速入门:开始使用新面板“CSS 概览”"},"panels/css_overview/css_overview-meta.ts | cssOverview":{"message":"CSS 概览"},"panels/css_overview/css_overview-meta.ts | showCssOverview":{"message":"显示 CSS 概览"},"panels/developer_resources/DeveloperResourcesListView.ts | copyInitiatorUrl":{"message":"复制启动器网址"},"panels/developer_resources/DeveloperResourcesListView.ts | copyUrl":{"message":"复制网址"},"panels/developer_resources/DeveloperResourcesListView.ts | developerResources":{"message":"开发者资源"},"panels/developer_resources/DeveloperResourcesListView.ts | error":{"message":"错误"},"panels/developer_resources/DeveloperResourcesListView.ts | failure":{"message":"失败"},"panels/developer_resources/DeveloperResourcesListView.ts | initiator":{"message":"启动器"},"panels/developer_resources/DeveloperResourcesListView.ts | pending":{"message":"待处理"},"panels/developer_resources/DeveloperResourcesListView.ts | sBytes":{"message":"{n,plural, =1{# 个字节}other{# 个字节}}"},"panels/developer_resources/DeveloperResourcesListView.ts | status":{"message":"状态"},"panels/developer_resources/DeveloperResourcesListView.ts | success":{"message":"成功"},"panels/developer_resources/DeveloperResourcesListView.ts | totalBytes":{"message":"总字节数"},"panels/developer_resources/DeveloperResourcesListView.ts | url":{"message":"网址"},"panels/developer_resources/DeveloperResourcesView.ts | enableLoadingThroughTarget":{"message":"通过网站加载"},"panels/developer_resources/DeveloperResourcesView.ts | enterTextToSearchTheUrlAndError":{"message":"输入要在“网址”和“错误”列中搜索的文本"},"panels/developer_resources/DeveloperResourcesView.ts | loadHttpsDeveloperResources":{"message":"通过您检查的网站(而不是通过开发者工具)加载 HTTP(S) 开发者资源"},"panels/developer_resources/DeveloperResourcesView.ts | resources":{"message":"{n,plural, =1{# 项资源}other{# 项资源}}"},"panels/developer_resources/DeveloperResourcesView.ts | resourcesCurrentlyLoading":{"message":"共有 {PH1} 项资源,正在加载 {PH2} 项"},"panels/developer_resources/developer_resources-meta.ts | developerResources":{"message":"开发者资源"},"panels/developer_resources/developer_resources-meta.ts | showDeveloperResources":{"message":"显示“开发者资源”面板"},"panels/elements/CSSRuleValidator.ts | fontVariationSettingsWarning":{"message":"“{PH1}”设置的值 {PH2} 超出了字体系列“{PH5}”的支持范围 [{PH3},{PH4}]。"},"panels/elements/CSSRuleValidator.ts | ruleViolatedByParentElementRuleFix":{"message":"不妨尝试将父级元素的 {EXISTING_PARENT_ELEMENT_RULE} 属性设为 {TARGET_PARENT_ELEMENT_RULE}。"},"panels/elements/CSSRuleValidator.ts | ruleViolatedByParentElementRuleReason":{"message":"父元素的 {REASON_PROPERTY_DECLARATION_CODE} 属性可防止 {AFFECTED_PROPERTY_DECLARATION_CODE} 产生影响。"},"panels/elements/CSSRuleValidator.ts | ruleViolatedBySameElementRuleChangeSuggestion":{"message":"不妨尝试将 {EXISTING_PROPERTY_DECLARATION} 属性设为 {TARGET_PROPERTY_DECLARATION}。"},"panels/elements/CSSRuleValidator.ts | ruleViolatedBySameElementRuleFix":{"message":"不妨尝试将 {PROPERTY_NAME} 设为除 {PROPERTY_VALUE} 之外的某个值。"},"panels/elements/CSSRuleValidator.ts | ruleViolatedBySameElementRuleReason":{"message":"{REASON_PROPERTY_DECLARATION_CODE} 属性可防止 {AFFECTED_PROPERTY_DECLARATION_CODE} 产生影响。"},"panels/elements/ClassesPaneWidget.ts | addNewClass":{"message":"添加新类"},"panels/elements/ClassesPaneWidget.ts | classSAdded":{"message":"已添加 {PH1} 类"},"panels/elements/ClassesPaneWidget.ts | classesSAdded":{"message":"已添加 {PH1} 类"},"panels/elements/ClassesPaneWidget.ts | elementClasses":{"message":"元素类"},"panels/elements/ColorSwatchPopoverIcon.ts | openCubicBezierEditor":{"message":"打开三次贝塞尔曲线编辑器"},"panels/elements/ColorSwatchPopoverIcon.ts | openShadowEditor":{"message":"打开阴影编辑器"},"panels/elements/ComputedStyleWidget.ts | filter":{"message":"过滤"},"panels/elements/ComputedStyleWidget.ts | filterComputedStyles":{"message":"过滤计算样式"},"panels/elements/ComputedStyleWidget.ts | group":{"message":"组合"},"panels/elements/ComputedStyleWidget.ts | navigateToSelectorSource":{"message":"转到选择器源代码"},"panels/elements/ComputedStyleWidget.ts | navigateToStyle":{"message":"转到“样式”"},"panels/elements/ComputedStyleWidget.ts | noMatchingProperty":{"message":"无相符属性"},"panels/elements/ComputedStyleWidget.ts | showAll":{"message":"全部显示"},"panels/elements/DOMLinkifier.ts | node":{"message":"<节点>"},"panels/elements/ElementStatePaneWidget.ts | forceElementState":{"message":"强制设置元素状态"},"panels/elements/ElementStatePaneWidget.ts | toggleElementState":{"message":"启用/停用元素状态"},"panels/elements/ElementsPanel.ts | computed":{"message":"计算样式"},"panels/elements/ElementsPanel.ts | computedStylesHidden":{"message":"“计算样式”边栏处于隐藏状态"},"panels/elements/ElementsPanel.ts | computedStylesShown":{"message":"“计算样式”边栏处于显示状态"},"panels/elements/ElementsPanel.ts | domTreeExplorer":{"message":"DOM 树浏览器"},"panels/elements/ElementsPanel.ts | elementStateS":{"message":"元素状态:{PH1}"},"panels/elements/ElementsPanel.ts | findByStringSelectorOrXpath":{"message":"按字符串、选择器或 XPath 查找"},"panels/elements/ElementsPanel.ts | hideComputedStylesSidebar":{"message":"隐藏“计算样式”边栏"},"panels/elements/ElementsPanel.ts | nodeCannotBeFoundInTheCurrent":{"message":"无法在当前网页中找到相应节点。"},"panels/elements/ElementsPanel.ts | revealInElementsPanel":{"message":"在“元素”面板中显示"},"panels/elements/ElementsPanel.ts | showComputedStylesSidebar":{"message":"显示“计算样式”边栏"},"panels/elements/ElementsPanel.ts | sidePanelContent":{"message":"侧边栏中的内容"},"panels/elements/ElementsPanel.ts | sidePanelToolbar":{"message":"侧边栏中的工具栏"},"panels/elements/ElementsPanel.ts | styles":{"message":"样式"},"panels/elements/ElementsPanel.ts | switchToAccessibilityTreeView":{"message":"切换到无障碍功能树状视图"},"panels/elements/ElementsPanel.ts | switchToDomTreeView":{"message":"切换到 DOM 树状视图"},"panels/elements/ElementsPanel.ts | theDeferredDomNodeCouldNotBe":{"message":"延迟的 DOM 节点无法解析为有效节点。"},"panels/elements/ElementsPanel.ts | theRemoteObjectCouldNotBe":{"message":"远程对象无法解析为有效节点。"},"panels/elements/ElementsTreeElement.ts | addAttribute":{"message":"添加属性"},"panels/elements/ElementsTreeElement.ts | captureNodeScreenshot":{"message":"截取节点屏幕截图"},"panels/elements/ElementsTreeElement.ts | children":{"message":"子元素:"},"panels/elements/ElementsTreeElement.ts | collapseChildren":{"message":"收起子级"},"panels/elements/ElementsTreeElement.ts | copy":{"message":"复制"},"panels/elements/ElementsTreeElement.ts | copyElement":{"message":"复制元素"},"panels/elements/ElementsTreeElement.ts | copyFullXpath":{"message":"复制完整 XPath"},"panels/elements/ElementsTreeElement.ts | copyJsPath":{"message":"复制 JS 路径"},"panels/elements/ElementsTreeElement.ts | copyOuterhtml":{"message":"复制 outerHTML"},"panels/elements/ElementsTreeElement.ts | copySelector":{"message":"复制selector"},"panels/elements/ElementsTreeElement.ts | copyStyles":{"message":"复制样式"},"panels/elements/ElementsTreeElement.ts | copyXpath":{"message":"复制 XPath"},"panels/elements/ElementsTreeElement.ts | cut":{"message":"剪切"},"panels/elements/ElementsTreeElement.ts | deleteElement":{"message":"删除元素"},"panels/elements/ElementsTreeElement.ts | disableFlexMode":{"message":"停用灵活模式"},"panels/elements/ElementsTreeElement.ts | disableGridMode":{"message":"停用网格模式"},"panels/elements/ElementsTreeElement.ts | disableScrollSnap":{"message":"停用滚动贴靠叠加层"},"panels/elements/ElementsTreeElement.ts | duplicateElement":{"message":"复制粘贴元素"},"panels/elements/ElementsTreeElement.ts | editAsHtml":{"message":"以 HTML 格式修改"},"panels/elements/ElementsTreeElement.ts | editAttribute":{"message":"修改属性"},"panels/elements/ElementsTreeElement.ts | editText":{"message":"修改文本"},"panels/elements/ElementsTreeElement.ts | enableFlexMode":{"message":"启用灵活模式"},"panels/elements/ElementsTreeElement.ts | enableGridMode":{"message":"启用网格模式"},"panels/elements/ElementsTreeElement.ts | enableScrollSnap":{"message":"启用滚动贴靠叠加层"},"panels/elements/ElementsTreeElement.ts | expandRecursively":{"message":"以递归方式展开"},"panels/elements/ElementsTreeElement.ts | focus":{"message":"聚焦"},"panels/elements/ElementsTreeElement.ts | forceState":{"message":"强制执行状态"},"panels/elements/ElementsTreeElement.ts | hideElement":{"message":"隐藏元素"},"panels/elements/ElementsTreeElement.ts | paste":{"message":"粘贴"},"panels/elements/ElementsTreeElement.ts | scrollIntoView":{"message":"滚动到视野范围内"},"panels/elements/ElementsTreeElement.ts | showFrameDetails":{"message":"显示 iframe 详细信息"},"panels/elements/ElementsTreeElement.ts | thisFrameWasIdentifiedAsAnAd":{"message":"此框架被确定为广告框架"},"panels/elements/ElementsTreeElement.ts | useSInTheConsoleToReferToThis":{"message":"在控制台中使用 {PH1} 表示此元素。"},"panels/elements/ElementsTreeElement.ts | valueIsTooLargeToEdit":{"message":"<值过大,无法修改>"},"panels/elements/ElementsTreeOutline.ts | adornerSettings":{"message":"标志设置…"},"panels/elements/ElementsTreeOutline.ts | pageDom":{"message":"网页 DOM"},"panels/elements/ElementsTreeOutline.ts | reveal":{"message":"显示"},"panels/elements/ElementsTreeOutline.ts | showAllNodesDMore":{"message":"显示所有节点(另外 {PH1} 个)"},"panels/elements/ElementsTreeOutline.ts | storeAsGlobalVariable":{"message":"存储为全局变量"},"panels/elements/EventListenersWidget.ts | all":{"message":"全部"},"panels/elements/EventListenersWidget.ts | ancestors":{"message":"祖先"},"panels/elements/EventListenersWidget.ts | blocking":{"message":"屏蔽"},"panels/elements/EventListenersWidget.ts | eventListenersCategory":{"message":"事件监听器类别"},"panels/elements/EventListenersWidget.ts | frameworkListeners":{"message":"Framework监听器"},"panels/elements/EventListenersWidget.ts | passive":{"message":"被动式"},"panels/elements/EventListenersWidget.ts | refresh":{"message":"刷新"},"panels/elements/EventListenersWidget.ts | resolveEventListenersBoundWith":{"message":"解析与框架绑定的事件监听器"},"panels/elements/EventListenersWidget.ts | showListenersOnTheAncestors":{"message":"显示祖先中的监听器"},"panels/elements/LayersWidget.ts | cssLayersTitle":{"message":"CSS 级联层"},"panels/elements/LayersWidget.ts | toggleCSSLayers":{"message":"显示/隐藏 CSS 图层视图"},"panels/elements/MarkerDecorator.ts | domBreakpoint":{"message":"DOM 断点"},"panels/elements/MarkerDecorator.ts | elementIsHidden":{"message":"元素处于隐藏状态"},"panels/elements/NodeStackTraceWidget.ts | noStackTraceAvailable":{"message":"无可用堆栈轨迹"},"panels/elements/PlatformFontsWidget.ts | dGlyphs":{"message":"{n,plural, =1{(# 个字形)}other{(# 个字形)}}"},"panels/elements/PlatformFontsWidget.ts | localFile":{"message":"本地文件"},"panels/elements/PlatformFontsWidget.ts | networkResource":{"message":"网络资源"},"panels/elements/PlatformFontsWidget.ts | renderedFonts":{"message":"渲染的字体"},"panels/elements/PropertiesWidget.ts | filter":{"message":"过滤"},"panels/elements/PropertiesWidget.ts | filterProperties":{"message":"过滤属性"},"panels/elements/PropertiesWidget.ts | noMatchingProperty":{"message":"无相符属性"},"panels/elements/PropertiesWidget.ts | showAll":{"message":"全部显示"},"panels/elements/PropertiesWidget.ts | showAllTooltip":{"message":"取消选中该设置后,系统会仅显示已定义了非 null 值的属性"},"panels/elements/StylePropertiesSection.ts | constructedStylesheet":{"message":"构造的样式表"},"panels/elements/StylePropertiesSection.ts | copyAllCSSChanges":{"message":"复制所有 CSS 更改"},"panels/elements/StylePropertiesSection.ts | copyAllDeclarations":{"message":"复制所有声明"},"panels/elements/StylePropertiesSection.ts | copyRule":{"message":"复制规则"},"panels/elements/StylePropertiesSection.ts | copySelector":{"message":"复制selector"},"panels/elements/StylePropertiesSection.ts | cssSelector":{"message":"CSS 选择器"},"panels/elements/StylePropertiesSection.ts | injectedStylesheet":{"message":"注入的样式表"},"panels/elements/StylePropertiesSection.ts | insertStyleRuleBelow":{"message":"在下方插入样式规则"},"panels/elements/StylePropertiesSection.ts | sattributesStyle":{"message":"{PH1}[属性样式]"},"panels/elements/StylePropertiesSection.ts | showAllPropertiesSMore":{"message":"显示所有属性(另外 {PH1} 个)"},"panels/elements/StylePropertiesSection.ts | styleAttribute":{"message":"style属性"},"panels/elements/StylePropertiesSection.ts | userAgentStylesheet":{"message":"用户代理样式表"},"panels/elements/StylePropertiesSection.ts | viaInspector":{"message":"通过检查器"},"panels/elements/StylePropertyTreeElement.ts | copyAllCSSChanges":{"message":"复制所有 CSS 更改"},"panels/elements/StylePropertyTreeElement.ts | copyAllCssDeclarationsAsJs":{"message":"以 JS 格式复制所有声明"},"panels/elements/StylePropertyTreeElement.ts | copyAllDeclarations":{"message":"复制所有声明"},"panels/elements/StylePropertyTreeElement.ts | copyCssDeclarationAsJs":{"message":"以 JS 格式复制声明"},"panels/elements/StylePropertyTreeElement.ts | copyDeclaration":{"message":"复制声明"},"panels/elements/StylePropertyTreeElement.ts | copyProperty":{"message":"复制属性"},"panels/elements/StylePropertyTreeElement.ts | copyRule":{"message":"复制规则"},"panels/elements/StylePropertyTreeElement.ts | copyValue":{"message":"复制值"},"panels/elements/StylePropertyTreeElement.ts | flexboxEditorButton":{"message":"打开 flexbox 编辑器"},"panels/elements/StylePropertyTreeElement.ts | gridEditorButton":{"message":"打开grid编辑器"},"panels/elements/StylePropertyTreeElement.ts | openColorPickerS":{"message":"打开颜色选择器。{PH1}"},"panels/elements/StylePropertyTreeElement.ts | revealInSourcesPanel":{"message":"在“来源”面板中显示"},"panels/elements/StylePropertyTreeElement.ts | shiftClickToChangeColorFormat":{"message":"按住 Shift 键并点击即可更改颜色格式。"},"panels/elements/StylePropertyTreeElement.ts | togglePropertyAndContinueEditing":{"message":"切换属性并继续编辑"},"panels/elements/StylePropertyTreeElement.ts | viewComputedValue":{"message":"查看计算得出的值"},"panels/elements/StylesSidebarPane.ts | automaticDarkMode":{"message":"自动深色模式"},"panels/elements/StylesSidebarPane.ts | clickToRevealLayer":{"message":"点击即可在级联层树中显示级联层"},"panels/elements/StylesSidebarPane.ts | copiedToClipboard":{"message":"已复制到剪贴板"},"panels/elements/StylesSidebarPane.ts | copyAllCSSChanges":{"message":"复制所有 CSS 更改"},"panels/elements/StylesSidebarPane.ts | cssPropertyName":{"message":"CSS 属性名称:{PH1}"},"panels/elements/StylesSidebarPane.ts | cssPropertyValue":{"message":"CSS 属性值:{PH1}"},"panels/elements/StylesSidebarPane.ts | filter":{"message":"过滤"},"panels/elements/StylesSidebarPane.ts | filterStyles":{"message":"过滤样式"},"panels/elements/StylesSidebarPane.ts | incrementdecrementWithMousewheelHundred":{"message":"使用鼠标滚轮或向上/向下键调大/调小。{PH1}:±100、Shift:±10、Alt:±0.1"},"panels/elements/StylesSidebarPane.ts | incrementdecrementWithMousewheelOne":{"message":"使用鼠标滚轮或向上/向下键调大/调小。{PH1}:R ±1、Shift:G ±1、Alt:B ±1"},"panels/elements/StylesSidebarPane.ts | inheritedFromSPseudoOf":{"message":"继承自:{PH1}以下项的伪元素 "},"panels/elements/StylesSidebarPane.ts | inheritedFroms":{"message":"继承自 "},"panels/elements/StylesSidebarPane.ts | invalidPropertyValue":{"message":"属性值无效"},"panels/elements/StylesSidebarPane.ts | invalidString":{"message":"{PH1},属性名称:{PH2},属性值:{PH3}"},"panels/elements/StylesSidebarPane.ts | layer":{"message":"级联层"},"panels/elements/StylesSidebarPane.ts | newStyleRule":{"message":"新建样式规则"},"panels/elements/StylesSidebarPane.ts | noMatchingSelectorOrStyle":{"message":"找不到匹配的选择器或样式"},"panels/elements/StylesSidebarPane.ts | pseudoSElement":{"message":"伪 ::{PH1} 元素"},"panels/elements/StylesSidebarPane.ts | specificity":{"message":"明确性:{PH1}"},"panels/elements/StylesSidebarPane.ts | toggleRenderingEmulations":{"message":"显示/隐藏常用渲染模拟"},"panels/elements/StylesSidebarPane.ts | unknownPropertyName":{"message":"属性名称未知"},"panels/elements/StylesSidebarPane.ts | visibleSelectors":{"message":"{n,plural, =1{下方列出了 # 个可见选择器}other{下方列出了 # 个可见选择器}}"},"panels/elements/TopLayerContainer.ts | reveal":{"message":"显示"},"panels/elements/components/AccessibilityTreeNode.ts | ignored":{"message":"已忽略"},"panels/elements/components/AdornerSettingsPane.ts | closeButton":{"message":"关闭"},"panels/elements/components/AdornerSettingsPane.ts | settingsTitle":{"message":"显示标志"},"panels/elements/components/CSSHintDetailsView.ts | learnMore":{"message":"了解详情"},"panels/elements/components/CSSPropertyDocsView.ts | dontShow":{"message":"不显示"},"panels/elements/components/CSSPropertyDocsView.ts | learnMore":{"message":"了解详情"},"panels/elements/components/ElementsBreadcrumbs.ts | breadcrumbs":{"message":"DOM 树面包屑导航"},"panels/elements/components/ElementsBreadcrumbs.ts | scrollLeft":{"message":"向左滚动"},"panels/elements/components/ElementsBreadcrumbs.ts | scrollRight":{"message":"向右滚动"},"panels/elements/components/ElementsBreadcrumbsUtils.ts | text":{"message":"(文本)"},"panels/elements/components/LayoutPane.ts | chooseElementOverlayColor":{"message":"为此元素选择叠加层颜色"},"panels/elements/components/LayoutPane.ts | colorPickerOpened":{"message":"颜色选择器已打开。"},"panels/elements/components/LayoutPane.ts | flexbox":{"message":"Flexbox"},"panels/elements/components/LayoutPane.ts | flexboxOverlays":{"message":"Flexbox 叠加层"},"panels/elements/components/LayoutPane.ts | grid":{"message":"网格"},"panels/elements/components/LayoutPane.ts | gridOverlays":{"message":"网格叠加层"},"panels/elements/components/LayoutPane.ts | noFlexboxLayoutsFoundOnThisPage":{"message":"在此网页上找不到 Flexbox 布局"},"panels/elements/components/LayoutPane.ts | noGridLayoutsFoundOnThisPage":{"message":"在此网页上找不到网格布局"},"panels/elements/components/LayoutPane.ts | overlayDisplaySettings":{"message":"叠加层显示设置"},"panels/elements/components/LayoutPane.ts | showElementInTheElementsPanel":{"message":"在“元素”面板中显示元素"},"panels/elements/components/StylePropertyEditor.ts | deselectButton":{"message":"移除 {propertyName}:{propertyValue}"},"panels/elements/components/StylePropertyEditor.ts | selectButton":{"message":"添加 {propertyName}:{propertyValue}"},"panels/elements/elements-meta.ts | captureAreaScreenshot":{"message":"截取区域屏幕截图"},"panels/elements/elements-meta.ts | copyStyles":{"message":"复制样式"},"panels/elements/elements-meta.ts | disableDomWordWrap":{"message":"停用 DOM 自动换行"},"panels/elements/elements-meta.ts | duplicateElement":{"message":"复制粘贴元素"},"panels/elements/elements-meta.ts | editAsHtml":{"message":"以 HTML 格式修改"},"panels/elements/elements-meta.ts | elements":{"message":"元素"},"panels/elements/elements-meta.ts | enableDomWordWrap":{"message":"启用 DOM 自动换行"},"panels/elements/elements-meta.ts | eventListeners":{"message":"事件监听器"},"panels/elements/elements-meta.ts | hideElement":{"message":"隐藏元素"},"panels/elements/elements-meta.ts | hideHtmlComments":{"message":"隐藏 HTML 注释"},"panels/elements/elements-meta.ts | layout":{"message":"布局"},"panels/elements/elements-meta.ts | properties":{"message":"属性"},"panels/elements/elements-meta.ts | redo":{"message":"重做"},"panels/elements/elements-meta.ts | revealDomNodeOnHover":{"message":"在鼠标悬停时显示 DOM 节点"},"panels/elements/elements-meta.ts | selectAnElementInThePageTo":{"message":"选择网页中的相应元素即可进行检查"},"panels/elements/elements-meta.ts | showCSSDocumentationTooltip":{"message":"显示 CSS 文档提示"},"panels/elements/elements-meta.ts | showComputedStyles":{"message":"显示计算出的样式"},"panels/elements/elements-meta.ts | showDetailedInspectTooltip":{"message":"显示详细检查提示"},"panels/elements/elements-meta.ts | showElements":{"message":"显示“元素”面板"},"panels/elements/elements-meta.ts | showEventListeners":{"message":"显示事件监听器"},"panels/elements/elements-meta.ts | showHtmlComments":{"message":"显示 HTML 注释"},"panels/elements/elements-meta.ts | showLayout":{"message":"显示“布局”工具"},"panels/elements/elements-meta.ts | showProperties":{"message":"显示“属性”工具"},"panels/elements/elements-meta.ts | showStackTrace":{"message":"显示“堆栈轨迹”工具"},"panels/elements/elements-meta.ts | showStyles":{"message":"显示样式"},"panels/elements/elements-meta.ts | showUserAgentShadowDOM":{"message":"显示用户代理 Shadow DOM"},"panels/elements/elements-meta.ts | stackTrace":{"message":"堆栈轨迹"},"panels/elements/elements-meta.ts | toggleEyeDropper":{"message":"显示/隐藏颜色提取器"},"panels/elements/elements-meta.ts | undo":{"message":"撤消"},"panels/elements/elements-meta.ts | wordWrap":{"message":"自动换行"},"panels/emulation/DeviceModeToolbar.ts | addDevicePixelRatio":{"message":"添加设备像素比"},"panels/emulation/DeviceModeToolbar.ts | addDeviceType":{"message":"添加设备类型"},"panels/emulation/DeviceModeToolbar.ts | autoadjustZoom":{"message":"自动调整缩放级别"},"panels/emulation/DeviceModeToolbar.ts | closeDevtools":{"message":"关闭 DevTools"},"panels/emulation/DeviceModeToolbar.ts | defaultF":{"message":"默认值:{PH1}"},"panels/emulation/DeviceModeToolbar.ts | devicePixelRatio":{"message":"设备像素比"},"panels/emulation/DeviceModeToolbar.ts | deviceType":{"message":"设备类型"},"panels/emulation/DeviceModeToolbar.ts | dimensions":{"message":"尺寸"},"panels/emulation/DeviceModeToolbar.ts | edit":{"message":"修改…"},"panels/emulation/DeviceModeToolbar.ts | experimentalWebPlatformFeature":{"message":"“Experimental Web Platform Feature”flag 已启用。点击即可将其停用。"},"panels/emulation/DeviceModeToolbar.ts | experimentalWebPlatformFeatureFlag":{"message":"“Experimental Web Platform Feature”flag 已停用。点击即可将其启用。"},"panels/emulation/DeviceModeToolbar.ts | fitToWindowF":{"message":"适合窗口大小 ({PH1}%)"},"panels/emulation/DeviceModeToolbar.ts | heightLeaveEmptyForFull":{"message":"高度(留空即表示全高显示网页)"},"panels/emulation/DeviceModeToolbar.ts | hideDeviceFrame":{"message":"隐藏设备边框"},"panels/emulation/DeviceModeToolbar.ts | hideMediaQueries":{"message":"隐藏媒体查询"},"panels/emulation/DeviceModeToolbar.ts | hideRulers":{"message":"隐藏标尺"},"panels/emulation/DeviceModeToolbar.ts | landscape":{"message":"横向"},"panels/emulation/DeviceModeToolbar.ts | moreOptions":{"message":"更多选项"},"panels/emulation/DeviceModeToolbar.ts | none":{"message":"无"},"panels/emulation/DeviceModeToolbar.ts | portrait":{"message":"纵向"},"panels/emulation/DeviceModeToolbar.ts | removeDevicePixelRatio":{"message":"移除设备像素比"},"panels/emulation/DeviceModeToolbar.ts | removeDeviceType":{"message":"移除设备类型"},"panels/emulation/DeviceModeToolbar.ts | resetToDefaults":{"message":"重置为默认值"},"panels/emulation/DeviceModeToolbar.ts | responsive":{"message":"自适应"},"panels/emulation/DeviceModeToolbar.ts | rotate":{"message":"旋转"},"panels/emulation/DeviceModeToolbar.ts | screenOrientationOptions":{"message":"屏幕方向选项"},"panels/emulation/DeviceModeToolbar.ts | showDeviceFrame":{"message":"显示设备边框"},"panels/emulation/DeviceModeToolbar.ts | showMediaQueries":{"message":"显示媒体查询"},"panels/emulation/DeviceModeToolbar.ts | showRulers":{"message":"显示标尺"},"panels/emulation/DeviceModeToolbar.ts | toggleDualscreenMode":{"message":"开启/关闭双屏模式"},"panels/emulation/DeviceModeToolbar.ts | width":{"message":"宽度"},"panels/emulation/DeviceModeToolbar.ts | zoom":{"message":"缩放"},"panels/emulation/DeviceModeView.ts | doubleclickForFullHeight":{"message":"双击即可全高显示"},"panels/emulation/DeviceModeView.ts | laptop":{"message":"笔记本电脑"},"panels/emulation/DeviceModeView.ts | laptopL":{"message":"大型笔记本电脑"},"panels/emulation/DeviceModeView.ts | mobileL":{"message":"大型移动设备"},"panels/emulation/DeviceModeView.ts | mobileM":{"message":"中型移动设备"},"panels/emulation/DeviceModeView.ts | mobileS":{"message":"小型移动设备"},"panels/emulation/DeviceModeView.ts | tablet":{"message":"平板电脑"},"panels/emulation/MediaQueryInspector.ts | revealInSourceCode":{"message":"在源代码中显示"},"panels/emulation/emulation-meta.ts | captureFullSizeScreenshot":{"message":"截取完整尺寸的屏幕截图"},"panels/emulation/emulation-meta.ts | captureNodeScreenshot":{"message":"当前节点屏幕截图"},"panels/emulation/emulation-meta.ts | captureScreenshot":{"message":"截取屏幕截图"},"panels/emulation/emulation-meta.ts | device":{"message":"设备"},"panels/emulation/emulation-meta.ts | hideDeviceFrame":{"message":"隐藏设备边框"},"panels/emulation/emulation-meta.ts | hideMediaQueries":{"message":"隐藏媒体查询"},"panels/emulation/emulation-meta.ts | hideRulers":{"message":"在设备模式工具栏中隐藏标尺"},"panels/emulation/emulation-meta.ts | showDeviceFrame":{"message":"显示设备边框"},"panels/emulation/emulation-meta.ts | showMediaQueries":{"message":"显示媒体查询"},"panels/emulation/emulation-meta.ts | showRulers":{"message":"在设备模式工具栏中显示标尺"},"panels/emulation/emulation-meta.ts | toggleDeviceToolbar":{"message":"显示/隐藏设备工具栏"},"panels/event_listeners/EventListenersView.ts | deleteEventListener":{"message":"删除事件监听器"},"panels/event_listeners/EventListenersView.ts | noEventListeners":{"message":"无事件监听器"},"panels/event_listeners/EventListenersView.ts | passive":{"message":"被动式"},"panels/event_listeners/EventListenersView.ts | remove":{"message":"移除"},"panels/event_listeners/EventListenersView.ts | revealInElementsPanel":{"message":"在“元素”面板中显示"},"panels/event_listeners/EventListenersView.ts | togglePassive":{"message":"开启/关闭被动式监听器"},"panels/event_listeners/EventListenersView.ts | toggleWhetherEventListenerIs":{"message":"将事件监听器状态切换为被动或屏蔽"},"panels/issues/AffectedBlockedByResponseView.ts | blockedResource":{"message":"已拦截的资源"},"panels/issues/AffectedBlockedByResponseView.ts | nRequests":{"message":"{n,plural, =1{# 项请求}other{# 项请求}}"},"panels/issues/AffectedBlockedByResponseView.ts | parentFrame":{"message":"父框架"},"panels/issues/AffectedBlockedByResponseView.ts | requestC":{"message":"请求"},"panels/issues/AffectedCookiesView.ts | domain":{"message":"网域"},"panels/issues/AffectedCookiesView.ts | filterSetCookieTitle":{"message":"在“网络”面板中显示包含此 Set-Cookie 标头的网络请求"},"panels/issues/AffectedCookiesView.ts | nCookies":{"message":"{n,plural, =1{# 个 Cookie}other{# 个 Cookie}}"},"panels/issues/AffectedCookiesView.ts | nRawCookieLines":{"message":"{n,plural, =1{1 个原始 Set-Cookie 标头}other{# 个原始 Set-Cookie 标头}}"},"panels/issues/AffectedCookiesView.ts | name":{"message":"名称"},"panels/issues/AffectedCookiesView.ts | path":{"message":"路径"},"panels/issues/AffectedDirectivesView.ts | blocked":{"message":"已屏蔽"},"panels/issues/AffectedDirectivesView.ts | clickToRevealTheViolatingDomNode":{"message":"点击即可在“元素”面板显示违规 DOM 节点"},"panels/issues/AffectedDirectivesView.ts | directiveC":{"message":"指令"},"panels/issues/AffectedDirectivesView.ts | element":{"message":"元素"},"panels/issues/AffectedDirectivesView.ts | nDirectives":{"message":"{n,plural, =1{# 条指令}other{# 条指令}}"},"panels/issues/AffectedDirectivesView.ts | reportonly":{"message":"仅报告"},"panels/issues/AffectedDirectivesView.ts | resourceC":{"message":"资源"},"panels/issues/AffectedDirectivesView.ts | sourceLocation":{"message":"源位置"},"panels/issues/AffectedDirectivesView.ts | status":{"message":"状态"},"panels/issues/AffectedDocumentsInQuirksModeView.ts | documentInTheDOMTree":{"message":"DOM 树中的文档"},"panels/issues/AffectedDocumentsInQuirksModeView.ts | mode":{"message":"模式"},"panels/issues/AffectedDocumentsInQuirksModeView.ts | nDocuments":{"message":"{n,plural, =1{ 个文档}other{ 个文档}}"},"panels/issues/AffectedDocumentsInQuirksModeView.ts | url":{"message":"网址"},"panels/issues/AffectedElementsView.ts | nElements":{"message":"{n,plural, =1{# 个元素}other{# 个元素}}"},"panels/issues/AffectedElementsWithLowContrastView.ts | contrastRatio":{"message":"对比度"},"panels/issues/AffectedElementsWithLowContrastView.ts | element":{"message":"元素"},"panels/issues/AffectedElementsWithLowContrastView.ts | minimumAA":{"message":"最低 AA 对比度"},"panels/issues/AffectedElementsWithLowContrastView.ts | minimumAAA":{"message":"最低 AAA 对比度"},"panels/issues/AffectedElementsWithLowContrastView.ts | textSize":{"message":"文字大小"},"panels/issues/AffectedElementsWithLowContrastView.ts | textWeight":{"message":"文本字重"},"panels/issues/AffectedHeavyAdView.ts | cpuPeakLimit":{"message":"CPU 峰值上限"},"panels/issues/AffectedHeavyAdView.ts | cpuTotalLimit":{"message":"CPU 总限制"},"panels/issues/AffectedHeavyAdView.ts | frameUrl":{"message":"框架网址"},"panels/issues/AffectedHeavyAdView.ts | limitExceeded":{"message":"超出限额"},"panels/issues/AffectedHeavyAdView.ts | nResources":{"message":"{n,plural, =1{# 项资源}other{# 项资源}}"},"panels/issues/AffectedHeavyAdView.ts | networkLimit":{"message":"网络限制"},"panels/issues/AffectedHeavyAdView.ts | removed":{"message":"已移除"},"panels/issues/AffectedHeavyAdView.ts | resolutionStatus":{"message":"解决状态"},"panels/issues/AffectedHeavyAdView.ts | warned":{"message":"已警告"},"panels/issues/AffectedResourcesView.ts | clickToRevealTheFramesDomNodeIn":{"message":"点击即可在“元素”面板中显示相应框架的 DOM 节点"},"panels/issues/AffectedResourcesView.ts | unavailable":{"message":"无法使用了"},"panels/issues/AffectedResourcesView.ts | unknown":{"message":"未知"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | aSharedarraybufferWas":{"message":"SharedArrayBuffer 已在非跨域隔离的上下文中实例化"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | blocked":{"message":"已屏蔽"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | instantiation":{"message":"实例化"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | nViolations":{"message":"{n,plural, =1{# 项违规行为}other{# 项违规行为}}"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | sharedarraybufferWasTransferedTo":{"message":"SharedArrayBuffer 已转移到非跨域隔离的上下文"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | sourceLocation":{"message":"源位置"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | status":{"message":"状态"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | transfer":{"message":"传输"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | trigger":{"message":"触发因素"},"panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts | warning":{"message":"警告"},"panels/issues/AffectedSourcesView.ts | nSources":{"message":"{n,plural, =1{# 个来源}other{# 个来源}}"},"panels/issues/AffectedTrackingSitesView.ts | nTrackingSites":{"message":"{n,plural, =1{有 1 个可能会跟踪的网站}other{有 # 个可能会跟踪的网站}}"},"panels/issues/AttributionReportingIssueDetailsView.ts | element":{"message":"元素"},"panels/issues/AttributionReportingIssueDetailsView.ts | invalidHeaderValue":{"message":"无效的标头值"},"panels/issues/AttributionReportingIssueDetailsView.ts | nViolations":{"message":"{n,plural, =1{# 项违规行为}other{# 项违规行为}}"},"panels/issues/AttributionReportingIssueDetailsView.ts | request":{"message":"请求"},"panels/issues/AttributionReportingIssueDetailsView.ts | untrustworthyOrigin":{"message":"不可信的源"},"panels/issues/CSPViolationsView.ts | filter":{"message":"过滤"},"panels/issues/ComboBoxOfCheckBoxes.ts | genericMenuLabel":{"message":"菜单"},"panels/issues/CorsIssueDetailsView.ts | allowCredentialsValueFromHeader":{"message":"Access-Control-Allow-Credentials 标头值"},"panels/issues/CorsIssueDetailsView.ts | allowedOrigin":{"message":"允许的来源(根据标头)"},"panels/issues/CorsIssueDetailsView.ts | blocked":{"message":"已屏蔽"},"panels/issues/CorsIssueDetailsView.ts | disallowedRequestHeader":{"message":"禁止的请求标头"},"panels/issues/CorsIssueDetailsView.ts | disallowedRequestMethod":{"message":"禁止的请求方法"},"panels/issues/CorsIssueDetailsView.ts | failedRequest":{"message":"失败的请求"},"panels/issues/CorsIssueDetailsView.ts | header":{"message":"标头"},"panels/issues/CorsIssueDetailsView.ts | initiatorAddressSpace":{"message":"启动器地址"},"panels/issues/CorsIssueDetailsView.ts | initiatorContext":{"message":"启动器上下文"},"panels/issues/CorsIssueDetailsView.ts | insecure":{"message":"不安全"},"panels/issues/CorsIssueDetailsView.ts | invalidValue":{"message":"无效值(若有)"},"panels/issues/CorsIssueDetailsView.ts | nRequests":{"message":"{n,plural, =1{# 项请求}other{# 项请求}}"},"panels/issues/CorsIssueDetailsView.ts | preflightDisallowedRedirect":{"message":"对预检的响应是重定向"},"panels/issues/CorsIssueDetailsView.ts | preflightInvalidStatus":{"message":"预检请求的 HTTP 状态表明未成功"},"panels/issues/CorsIssueDetailsView.ts | preflightRequest":{"message":"预检请求"},"panels/issues/CorsIssueDetailsView.ts | preflightRequestIfProblematic":{"message":"预检请求(如果出现问题)"},"panels/issues/CorsIssueDetailsView.ts | problem":{"message":"问题"},"panels/issues/CorsIssueDetailsView.ts | problemInvalidValue":{"message":"无效值"},"panels/issues/CorsIssueDetailsView.ts | problemMissingHeader":{"message":"缺少标头"},"panels/issues/CorsIssueDetailsView.ts | problemMultipleValues":{"message":"多个值"},"panels/issues/CorsIssueDetailsView.ts | request":{"message":"请求"},"panels/issues/CorsIssueDetailsView.ts | resourceAddressSpace":{"message":"资源地址"},"panels/issues/CorsIssueDetailsView.ts | secure":{"message":"安全"},"panels/issues/CorsIssueDetailsView.ts | sourceLocation":{"message":"源位置"},"panels/issues/CorsIssueDetailsView.ts | status":{"message":"状态"},"panels/issues/CorsIssueDetailsView.ts | unsupportedScheme":{"message":"架构不受支持"},"panels/issues/CorsIssueDetailsView.ts | warning":{"message":"警告"},"panels/issues/GenericIssueDetailsView.ts | frameId":{"message":"框架"},"panels/issues/GenericIssueDetailsView.ts | nResources":{"message":"{n,plural, =1{# 项资源}other{# 项资源}}"},"panels/issues/GenericIssueDetailsView.ts | violatingNode":{"message":"违规节点"},"panels/issues/HiddenIssuesRow.ts | hiddenIssues":{"message":"已隐藏的问题"},"panels/issues/HiddenIssuesRow.ts | unhideAll":{"message":"取消隐藏全部"},"panels/issues/IssueKindView.ts | hideAllCurrentBreakingChanges":{"message":"隐藏当前的所有重大变更"},"panels/issues/IssueKindView.ts | hideAllCurrentImprovements":{"message":"隐藏当前的所有改进"},"panels/issues/IssueKindView.ts | hideAllCurrentPageErrors":{"message":"隐藏当前的所有网页错误"},"panels/issues/IssueView.ts | affectedResources":{"message":"受影响的资源"},"panels/issues/IssueView.ts | automaticallyUpgraded":{"message":"已自动升级"},"panels/issues/IssueView.ts | blocked":{"message":"已屏蔽"},"panels/issues/IssueView.ts | hideIssuesLikeThis":{"message":"隐藏与此类似的问题"},"panels/issues/IssueView.ts | learnMoreS":{"message":"了解详情:{PH1}"},"panels/issues/IssueView.ts | nRequests":{"message":"{n,plural, =1{# 项请求}other{# 项请求}}"},"panels/issues/IssueView.ts | nResources":{"message":"{n,plural, =1{# 项资源}other{# 项资源}}"},"panels/issues/IssueView.ts | name":{"message":"名称"},"panels/issues/IssueView.ts | restrictionStatus":{"message":"限制状态"},"panels/issues/IssueView.ts | unhideIssuesLikeThis":{"message":"取消隐藏与此类似的问题"},"panels/issues/IssueView.ts | warned":{"message":"已警告"},"panels/issues/IssuesPane.ts | attributionReporting":{"message":"Attribution Reporting API"},"panels/issues/IssuesPane.ts | contentSecurityPolicy":{"message":"内容安全政策"},"panels/issues/IssuesPane.ts | cors":{"message":"跨域资源共享"},"panels/issues/IssuesPane.ts | crossOriginEmbedderPolicy":{"message":"跨域嵌入器政策"},"panels/issues/IssuesPane.ts | generic":{"message":"一般"},"panels/issues/IssuesPane.ts | groupByCategory":{"message":"按类别分组"},"panels/issues/IssuesPane.ts | groupByKind":{"message":"按种类分组"},"panels/issues/IssuesPane.ts | groupDisplayedIssuesUnder":{"message":"将显示的问题归入关联的类别下"},"panels/issues/IssuesPane.ts | groupDisplayedIssuesUnderKind":{"message":"将所显示的问题分组为“网页错误”、“重大变更”和“改进”"},"panels/issues/IssuesPane.ts | heavyAds":{"message":"过度消耗资源的广告"},"panels/issues/IssuesPane.ts | includeCookieIssuesCausedBy":{"message":"包含由第三方网站导致的 Cookie 问题"},"panels/issues/IssuesPane.ts | includeThirdpartyCookieIssues":{"message":"包含第三方 Cookie 问题"},"panels/issues/IssuesPane.ts | lowTextContrast":{"message":"低文字对比度"},"panels/issues/IssuesPane.ts | mixedContent":{"message":"混合内容"},"panels/issues/IssuesPane.ts | noIssuesDetectedSoFar":{"message":"截至目前未检测到任何问题"},"panels/issues/IssuesPane.ts | onlyThirdpartyCookieIssues":{"message":"目前仅检测到第三方 Cookie 问题"},"panels/issues/IssuesPane.ts | other":{"message":"其他"},"panels/issues/IssuesPane.ts | quirksMode":{"message":"怪异模式"},"panels/issues/IssuesPane.ts | samesiteCookie":{"message":"SameSite Cookie"},"panels/issues/components/HideIssuesMenu.ts | tooltipTitle":{"message":"隐藏问题"},"panels/issues/issues-meta.ts | cspViolations":{"message":"CSP 违规行为"},"panels/issues/issues-meta.ts | issues":{"message":"问题"},"panels/issues/issues-meta.ts | showCspViolations":{"message":"显示“CSP 违规行为”"},"panels/issues/issues-meta.ts | showIssues":{"message":"显示“问题”工具"},"panels/js_profiler/js_profiler-meta.ts | performance":{"message":"性能"},"panels/js_profiler/js_profiler-meta.ts | profiler":{"message":"分析器"},"panels/js_profiler/js_profiler-meta.ts | record":{"message":"录制"},"panels/js_profiler/js_profiler-meta.ts | showPerformance":{"message":"显示“性能”工具"},"panels/js_profiler/js_profiler-meta.ts | showProfiler":{"message":"显示“分析器”工具"},"panels/js_profiler/js_profiler-meta.ts | showRecentTimelineSessions":{"message":"显示近期时间轴会话"},"panels/js_profiler/js_profiler-meta.ts | startProfilingAndReloadPage":{"message":"开始分析并重新加载网页"},"panels/js_profiler/js_profiler-meta.ts | startStopRecording":{"message":"开始/停止录制"},"panels/js_profiler/js_profiler-meta.ts | stop":{"message":"停止"},"panels/layer_viewer/LayerDetailsView.ts | compositingReasons":{"message":"合成原因"},"panels/layer_viewer/LayerDetailsView.ts | containingBlocRectangleDimensions":{"message":"包含块 {PH1} × {PH2}(位于 {PH3}, {PH4})"},"panels/layer_viewer/LayerDetailsView.ts | mainThreadScrollingReason":{"message":"主线程滚动原因"},"panels/layer_viewer/LayerDetailsView.ts | memoryEstimate":{"message":"内存估计值"},"panels/layer_viewer/LayerDetailsView.ts | nearestLayerShiftingContaining":{"message":"最近的图层移动包含块"},"panels/layer_viewer/LayerDetailsView.ts | nearestLayerShiftingStickyBox":{"message":"最近的图层移位粘滞框"},"panels/layer_viewer/LayerDetailsView.ts | nonFastScrollable":{"message":"不可快速滚动"},"panels/layer_viewer/LayerDetailsView.ts | paintCount":{"message":"绘制次数"},"panels/layer_viewer/LayerDetailsView.ts | paintProfiler":{"message":"绘制性能剖析器"},"panels/layer_viewer/LayerDetailsView.ts | repaintsOnScroll":{"message":"滚动时重新渲染"},"panels/layer_viewer/LayerDetailsView.ts | scrollRectangleDimensions":{"message":"{PH1} {PH2} × {PH3}(位于 {PH4},{PH5})"},"panels/layer_viewer/LayerDetailsView.ts | selectALayerToSeeItsDetails":{"message":"选择某个层以查看其详情"},"panels/layer_viewer/LayerDetailsView.ts | size":{"message":"大小"},"panels/layer_viewer/LayerDetailsView.ts | slowScrollRegions":{"message":"缓慢滚动区域"},"panels/layer_viewer/LayerDetailsView.ts | stickyAncenstorLayersS":{"message":"{PH1}:{PH2} ({PH3})"},"panels/layer_viewer/LayerDetailsView.ts | stickyBoxRectangleDimensions":{"message":"粘滞框 {PH1} × {PH2}(位于:{PH3}, {PH4})"},"panels/layer_viewer/LayerDetailsView.ts | stickyPositionConstraint":{"message":"粘性位置限制"},"panels/layer_viewer/LayerDetailsView.ts | touchEventHandler":{"message":"触摸事件处理脚本"},"panels/layer_viewer/LayerDetailsView.ts | unnamed":{"message":"<未命名>"},"panels/layer_viewer/LayerDetailsView.ts | updateRectangleDimensions":{"message":"{PH1} × {PH2}(位于 {PH3}, {PH4})"},"panels/layer_viewer/LayerDetailsView.ts | wheelEventHandler":{"message":"滚轮事件处理脚本"},"panels/layer_viewer/LayerTreeOutline.ts | layersTreePane":{"message":"图层树窗格"},"panels/layer_viewer/LayerTreeOutline.ts | showPaintProfiler":{"message":"显示“绘制性能剖析器”"},"panels/layer_viewer/LayerTreeOutline.ts | updateChildDimension":{"message":" ({PH1} × {PH2})"},"panels/layer_viewer/LayerViewHost.ts | showInternalLayers":{"message":"显示内部层"},"panels/layer_viewer/Layers3DView.ts | cantDisplayLayers":{"message":"无法显示图层,"},"panels/layer_viewer/Layers3DView.ts | checkSForPossibleReasons":{"message":"请检查 {PH1} 以了解可能的原因。"},"panels/layer_viewer/Layers3DView.ts | dLayersView":{"message":"3D 图层视图"},"panels/layer_viewer/Layers3DView.ts | layerInformationIsNotYet":{"message":"尚无层信息。"},"panels/layer_viewer/Layers3DView.ts | paints":{"message":"渲染"},"panels/layer_viewer/Layers3DView.ts | resetView":{"message":"重置视图"},"panels/layer_viewer/Layers3DView.ts | showPaintProfiler":{"message":"显示“绘制性能剖析器”"},"panels/layer_viewer/Layers3DView.ts | slowScrollRects":{"message":"慢速滚动方框"},"panels/layer_viewer/Layers3DView.ts | webglSupportIsDisabledInYour":{"message":"您的浏览器已停用 WebGL 支持。"},"panels/layer_viewer/PaintProfilerView.ts | bitmap":{"message":"位图"},"panels/layer_viewer/PaintProfilerView.ts | commandLog":{"message":"命令日志"},"panels/layer_viewer/PaintProfilerView.ts | misc":{"message":"其他"},"panels/layer_viewer/PaintProfilerView.ts | profiling":{"message":"正在进行性能分析…"},"panels/layer_viewer/PaintProfilerView.ts | profilingResults":{"message":"性能分析结果"},"panels/layer_viewer/PaintProfilerView.ts | shapes":{"message":"图形"},"panels/layer_viewer/PaintProfilerView.ts | text":{"message":"文本"},"panels/layer_viewer/TransformController.ts | panModeX":{"message":"平移模式 (X)"},"panels/layer_viewer/TransformController.ts | resetTransform":{"message":"重置转换 (0)"},"panels/layer_viewer/TransformController.ts | rotateModeV":{"message":"旋转模式 (V)"},"panels/layer_viewer/layer_viewer-meta.ts | panOrRotateDown":{"message":"向下平移或旋转"},"panels/layer_viewer/layer_viewer-meta.ts | panOrRotateLeft":{"message":"向左平移或旋转"},"panels/layer_viewer/layer_viewer-meta.ts | panOrRotateRight":{"message":"向右平移或旋转"},"panels/layer_viewer/layer_viewer-meta.ts | panOrRotateUp":{"message":"向上平移或旋转"},"panels/layer_viewer/layer_viewer-meta.ts | resetView":{"message":"重置视图"},"panels/layer_viewer/layer_viewer-meta.ts | switchToPanMode":{"message":"切换到平移模式"},"panels/layer_viewer/layer_viewer-meta.ts | switchToRotateMode":{"message":"切换到旋转模式"},"panels/layer_viewer/layer_viewer-meta.ts | zoomIn":{"message":"放大"},"panels/layer_viewer/layer_viewer-meta.ts | zoomOut":{"message":"缩小"},"panels/layers/LayersPanel.ts | details":{"message":"详细信息"},"panels/layers/LayersPanel.ts | profiler":{"message":"分析器"},"panels/layers/layers-meta.ts | layers":{"message":"图层"},"panels/layers/layers-meta.ts | showLayers":{"message":"显示“图层”工具"},"panels/lighthouse/LighthouseController.ts | accessibility":{"message":"无障碍功能"},"panels/lighthouse/LighthouseController.ts | applyMobileEmulation":{"message":"应用移动设备模拟"},"panels/lighthouse/LighthouseController.ts | applyMobileEmulationDuring":{"message":"在审核期间应用移动设备模拟"},"panels/lighthouse/LighthouseController.ts | atLeastOneCategoryMustBeSelected":{"message":"必须选择至少 1 个类别。"},"panels/lighthouse/LighthouseController.ts | bestPractices":{"message":"最佳做法"},"panels/lighthouse/LighthouseController.ts | canOnlyAuditHttphttpsPages":{"message":"只能审核使用 HTTP 或 HTTPS 的网页。请前往其他网页。"},"panels/lighthouse/LighthouseController.ts | clearStorage":{"message":"清除存储数据"},"panels/lighthouse/LighthouseController.ts | desktop":{"message":"桌面设备"},"panels/lighthouse/LighthouseController.ts | devtoolsThrottling":{"message":"开发者工具节流(高级)"},"panels/lighthouse/LighthouseController.ts | doesThisPageFollowBestPractices":{"message":"此网页是否遵循现代 Web 开发的最佳做法"},"panels/lighthouse/LighthouseController.ts | doesThisPageMeetTheStandardOfA":{"message":"此网页是否符合渐进式 Web 应用的标准"},"panels/lighthouse/LighthouseController.ts | howLongDoesThisAppTakeToShow":{"message":"此应用需要多长时间才会显示内容并变为可以使用"},"panels/lighthouse/LighthouseController.ts | indexeddb":{"message":"IndexedDB"},"panels/lighthouse/LighthouseController.ts | isThisPageOptimizedForAdSpeedAnd":{"message":"此网页是否针对广告速度和质量进行了优化"},"panels/lighthouse/LighthouseController.ts | isThisPageOptimizedForSearch":{"message":"该网页是否已经过优化,以提升其在搜索引擎结果中的排名"},"panels/lighthouse/LighthouseController.ts | isThisPageUsableByPeopleWith":{"message":"此网页是否可供残障人士使用"},"panels/lighthouse/LighthouseController.ts | javaScriptDisabled":{"message":"JavaScript 已被停用。您需要启用 JavaScript 才能审核此网页。若要启用 JavaScript,请打开“命令”菜单,然后运行“启用 JavaScript”命令。"},"panels/lighthouse/LighthouseController.ts | legacyNavigation":{"message":"旧版导航"},"panels/lighthouse/LighthouseController.ts | lighthouseMode":{"message":"Lighthouse 模式"},"panels/lighthouse/LighthouseController.ts | localStorage":{"message":"本地存储空间"},"panels/lighthouse/LighthouseController.ts | mobile":{"message":"移动设备"},"panels/lighthouse/LighthouseController.ts | multipleTabsAreBeingControlledBy":{"message":"多个标签页正受到同一个 service worker 的控制。请关闭同一来源的其他标签页以审核此网页。"},"panels/lighthouse/LighthouseController.ts | navigation":{"message":"导航(默认)"},"panels/lighthouse/LighthouseController.ts | navigationTooltip":{"message":"导航模式旨在分析网页加载情况,与最初的 Lighthouse 报告完全一样。"},"panels/lighthouse/LighthouseController.ts | performance":{"message":"性能"},"panels/lighthouse/LighthouseController.ts | progressiveWebApp":{"message":"渐进式 Web 应用"},"panels/lighthouse/LighthouseController.ts | publisherAds":{"message":"发布商广告"},"panels/lighthouse/LighthouseController.ts | resetStorageLocalstorage":{"message":"在审核前重置存储空间(cache 和 service workers 等)。(适用于性能和 PWA 测试)"},"panels/lighthouse/LighthouseController.ts | runLighthouseInMode":{"message":"在导航模式、时间跨度模式或快照模式下运行 Lighthouse"},"panels/lighthouse/LighthouseController.ts | seo":{"message":"SEO"},"panels/lighthouse/LighthouseController.ts | simulateASlowerPageLoadBasedOn":{"message":"模拟节流会根据初始未节流加载的数据来模拟较慢的网页加载速度。开发者工具节流确实会减慢网页的加载速度。"},"panels/lighthouse/LighthouseController.ts | simulatedThrottling":{"message":"模拟节流(默认)"},"panels/lighthouse/LighthouseController.ts | snapshot":{"message":"快照"},"panels/lighthouse/LighthouseController.ts | snapshotTooltip":{"message":"快照模式旨在分析处于特定状态(通常是用户互动之后)的网页。"},"panels/lighthouse/LighthouseController.ts | thereMayBeStoredDataAffectingLoadingPlural":{"message":"下列位置可能存储了会影响加载性能的数据:{PH1}。请在无痕式窗口中审核此页面,以防止这些资源影响您的得分。"},"panels/lighthouse/LighthouseController.ts | thereMayBeStoredDataAffectingSingular":{"message":"下列位置可能存储了会影响加载性能的数据:{PH1}。请在无痕式窗口中审核此网页,以防止这些资源影响您的得分。"},"panels/lighthouse/LighthouseController.ts | throttlingMethod":{"message":"节流方法"},"panels/lighthouse/LighthouseController.ts | timespan":{"message":"时间跨度"},"panels/lighthouse/LighthouseController.ts | timespanTooltip":{"message":"时间跨度模式旨在分析任意时间段(通常包含用户互动)。"},"panels/lighthouse/LighthouseController.ts | useLegacyNavigation":{"message":"在导航模式下使用传统版 Lighthouse 分析网页。"},"panels/lighthouse/LighthouseController.ts | webSql":{"message":"Web SQL"},"panels/lighthouse/LighthousePanel.ts | cancelling":{"message":"正在取消"},"panels/lighthouse/LighthousePanel.ts | clearAll":{"message":"全部清除"},"panels/lighthouse/LighthousePanel.ts | dropLighthouseJsonHere":{"message":"将 Lighthouse JSON 拖到此处"},"panels/lighthouse/LighthousePanel.ts | lighthouseSettings":{"message":"Lighthouse 设置"},"panels/lighthouse/LighthousePanel.ts | performAnAudit":{"message":"执行审核…"},"panels/lighthouse/LighthousePanel.ts | printing":{"message":"正在打印"},"panels/lighthouse/LighthousePanel.ts | thePrintPopupWindowIsOpenPlease":{"message":"弹出式窗口“打印”已打开。请关闭它以继续操作。"},"panels/lighthouse/LighthouseReportSelector.ts | newReport":{"message":"(新报告)"},"panels/lighthouse/LighthouseReportSelector.ts | reports":{"message":"报告"},"panels/lighthouse/LighthouseStartView.ts | analyzeNavigation":{"message":"分析网页加载情况"},"panels/lighthouse/LighthouseStartView.ts | analyzeSnapshot":{"message":"分析网页状态"},"panels/lighthouse/LighthouseStartView.ts | categories":{"message":"类别"},"panels/lighthouse/LighthouseStartView.ts | device":{"message":"设备"},"panels/lighthouse/LighthouseStartView.ts | generateLighthouseReport":{"message":"生成 Lighthouse 报告"},"panels/lighthouse/LighthouseStartView.ts | learnMore":{"message":"了解详情"},"panels/lighthouse/LighthouseStartView.ts | mode":{"message":"模式"},"panels/lighthouse/LighthouseStartView.ts | plugins":{"message":"插件"},"panels/lighthouse/LighthouseStartView.ts | startTimespan":{"message":"启用时间跨度模式"},"panels/lighthouse/LighthouseStatusView.ts | OfGlobalMobileUsersInWereOnGOrG":{"message":"2016 年,全球有 75% 的手机用户使用的是 2G 或 3G 网络 [来源:GSMA Mobile]"},"panels/lighthouse/LighthouseStatusView.ts | OfMobilePagesTakeNearlySeconds":{"message":"70% 的移动版页面需要将近 7 秒的时间才能在屏幕上显示首屏视觉内容。[来源:Think with Google]"},"panels/lighthouse/LighthouseStatusView.ts | SecondsIsTheAverageTimeAMobile":{"message":"移动网页使用 3G 网络连接完成加载所需的平均时间为 19 秒。[来源:Google DoubleClick blog]"},"panels/lighthouse/LighthouseStatusView.ts | ahSorryWeRanIntoAnError":{"message":"抱歉!出错了。"},"panels/lighthouse/LighthouseStatusView.ts | almostThereLighthouseIsNow":{"message":"即将完成!Lighthouse 正在为您生成报告。"},"panels/lighthouse/LighthouseStatusView.ts | asPageLoadTimeIncreasesFromOne":{"message":"当网页加载用时从 1 秒增加到 7 秒时,移动网站访问者的跳出概率会增大 113%。[来源:Think with Google]"},"panels/lighthouse/LighthouseStatusView.ts | asTheNumberOfElementsOnAPage":{"message":"随着网页上元素的数量从 400 增加到 6000,转化率下降了 95%。[来源:Think with Google]"},"panels/lighthouse/LighthouseStatusView.ts | auditingS":{"message":"正在审核 {PH1}"},"panels/lighthouse/LighthouseStatusView.ts | auditingYourWebPage":{"message":"正在评估您的网页"},"panels/lighthouse/LighthouseStatusView.ts | byReducingTheResponseSizeOfJson":{"message":"通过降低显示评论所需的 JSON 的响应大小,Instagram 的展示次数得到了提升 [来源:WPO Stats]"},"panels/lighthouse/LighthouseStatusView.ts | cancel":{"message":"取消"},"panels/lighthouse/LighthouseStatusView.ts | cancelling":{"message":"正在取消…"},"panels/lighthouse/LighthouseStatusView.ts | fastFactMessageWithPlaceholder":{"message":"💡 {PH1}"},"panels/lighthouse/LighthouseStatusView.ts | ifASiteTakesSecondToBecome":{"message":"如果某个网站需要花费 >1 秒的时间才能进入可互动的状态,用户就会对该网站失去兴趣,并且会不愿完成网页任务 [来源:Google Developers Blog]"},"panels/lighthouse/LighthouseStatusView.ts | ifThisIssueIsReproduciblePlease":{"message":"如果此问题可重现,请在 Lighthouse GitHub 代码库中报告此问题。"},"panels/lighthouse/LighthouseStatusView.ts | lighthouseIsGatheringInformation":{"message":"Lighthouse 正在收集该网页的相关信息以计算您的得分。"},"panels/lighthouse/LighthouseStatusView.ts | lighthouseIsLoadingThePage":{"message":"Lighthouse 正在加载网页。"},"panels/lighthouse/LighthouseStatusView.ts | lighthouseIsLoadingYourPage":{"message":"Lighthouse 正在加载您的网页"},"panels/lighthouse/LighthouseStatusView.ts | lighthouseIsLoadingYourPageWith":{"message":"Lighthouse 正在使用节流功能加载您的网页,以便衡量 3G 网络下移动设备的性能。"},"panels/lighthouse/LighthouseStatusView.ts | lighthouseIsLoadingYourPageWithMobile":{"message":"Lighthouse 正在通过移动设备模拟加载您的网页。"},"panels/lighthouse/LighthouseStatusView.ts | lighthouseIsLoadingYourPageWithThrottling":{"message":"Lighthouse 正在使用节流功能加载您的网页,以便衡量 3G 网络下慢速桌面设备的性能。"},"panels/lighthouse/LighthouseStatusView.ts | lighthouseIsWarmingUp":{"message":"Lighthouse 正在预热…"},"panels/lighthouse/LighthouseStatusView.ts | lighthouseOnlySimulatesMobile":{"message":"Lighthouse 仅模拟移动端性能;若要衡量在实际设备上的性能,请访问 WebPageTest.org [来源:Lighthouse 团队]"},"panels/lighthouse/LighthouseStatusView.ts | loading":{"message":"正在加载…"},"panels/lighthouse/LighthouseStatusView.ts | mbTakesAMinimumOfSecondsTo":{"message":"通过一般的 3G 网络连接下载 1MB 内容至少需要 5 秒 [来源:WebPageTest 和 DevTools 3G 定义]。"},"panels/lighthouse/LighthouseStatusView.ts | rebuildingPinterestPagesFor":{"message":"Pinterest 以优化性能为目的重新构建网页后,转化率提升了 15% [来源:WPO Stats]"},"panels/lighthouse/LighthouseStatusView.ts | theAverageUserDeviceCostsLess":{"message":"用户设备平均成本低于 200 美元。[来源:International Data Corporation]"},"panels/lighthouse/LighthouseStatusView.ts | tryToNavigateToTheUrlInAFresh":{"message":"尝试在新的 Chrome 个人资料名下转到相应网址,并且不打开任何其他标签页或扩展程序,然后重试。"},"panels/lighthouse/LighthouseStatusView.ts | walmartSawAIncreaseInRevenueFor":{"message":"Walmart 发现,网页加载用时每减少 100 毫秒,收入就会增加 1% [来源:WPO Stats]"},"panels/lighthouse/LighthouseTimespanView.ts | cancel":{"message":"取消"},"panels/lighthouse/LighthouseTimespanView.ts | endTimespan":{"message":"结束时间跨度模式"},"panels/lighthouse/LighthouseTimespanView.ts | timespanStarted":{"message":"时间跨度模式已启用,与网页互动"},"panels/lighthouse/LighthouseTimespanView.ts | timespanStarting":{"message":"时间跨度模式正在开启…"},"panels/lighthouse/lighthouse-meta.ts | showLighthouse":{"message":"显示 Lighthouse"},"panels/media/EventDisplayTable.ts | eventDisplay":{"message":"事件显示"},"panels/media/EventDisplayTable.ts | eventName":{"message":"事件名称"},"panels/media/EventDisplayTable.ts | timestamp":{"message":"时间戳"},"panels/media/EventDisplayTable.ts | value":{"message":"值"},"panels/media/EventTimelineView.ts | bufferingStatus":{"message":"缓冲状态"},"panels/media/EventTimelineView.ts | playbackStatus":{"message":"播放状态"},"panels/media/PlayerDetailView.ts | events":{"message":"事件"},"panels/media/PlayerDetailView.ts | messages":{"message":"消息"},"panels/media/PlayerDetailView.ts | playerEvents":{"message":"播放器事件"},"panels/media/PlayerDetailView.ts | playerMessages":{"message":"播放器消息"},"panels/media/PlayerDetailView.ts | playerProperties":{"message":"播放器属性"},"panels/media/PlayerDetailView.ts | playerTimeline":{"message":"播放器时间轴"},"panels/media/PlayerDetailView.ts | properties":{"message":"属性"},"panels/media/PlayerDetailView.ts | timeline":{"message":"时间轴"},"panels/media/PlayerListView.ts | hideAllOthers":{"message":"隐藏其他所有条目"},"panels/media/PlayerListView.ts | hidePlayer":{"message":"隐藏播放器"},"panels/media/PlayerListView.ts | players":{"message":"播放器"},"panels/media/PlayerListView.ts | savePlayerInfo":{"message":"保存播放器信息"},"panels/media/PlayerMessagesView.ts | all":{"message":"全部"},"panels/media/PlayerMessagesView.ts | custom":{"message":"自定义"},"panels/media/PlayerMessagesView.ts | debug":{"message":"调试"},"panels/media/PlayerMessagesView.ts | default":{"message":"默认"},"panels/media/PlayerMessagesView.ts | error":{"message":"错误"},"panels/media/PlayerMessagesView.ts | errorCauseLabel":{"message":"原因:"},"panels/media/PlayerMessagesView.ts | errorCodeLabel":{"message":"错误代码:"},"panels/media/PlayerMessagesView.ts | errorDataLabel":{"message":"数据:"},"panels/media/PlayerMessagesView.ts | errorGroupLabel":{"message":"错误组:"},"panels/media/PlayerMessagesView.ts | errorStackLabel":{"message":"堆栈轨迹:"},"panels/media/PlayerMessagesView.ts | filterLogMessages":{"message":"过滤日志消息"},"panels/media/PlayerMessagesView.ts | info":{"message":"信息"},"panels/media/PlayerMessagesView.ts | logLevel":{"message":"日志级别:"},"panels/media/PlayerMessagesView.ts | warning":{"message":"警告"},"panels/media/PlayerPropertiesView.ts | audio":{"message":"音频"},"panels/media/PlayerPropertiesView.ts | bitrate":{"message":"比特率"},"panels/media/PlayerPropertiesView.ts | decoder":{"message":"解码器"},"panels/media/PlayerPropertiesView.ts | decoderName":{"message":"解码器名称"},"panels/media/PlayerPropertiesView.ts | decryptingDemuxer":{"message":"正在为 demuxer 解密"},"panels/media/PlayerPropertiesView.ts | duration":{"message":"时长"},"panels/media/PlayerPropertiesView.ts | encoderName":{"message":"编码器名称"},"panels/media/PlayerPropertiesView.ts | fileSize":{"message":"文件大小"},"panels/media/PlayerPropertiesView.ts | frameRate":{"message":"帧速率"},"panels/media/PlayerPropertiesView.ts | hardwareDecoder":{"message":"硬件解码器"},"panels/media/PlayerPropertiesView.ts | hardwareEncoder":{"message":"硬件编码器"},"panels/media/PlayerPropertiesView.ts | noDecoder":{"message":"无解码器"},"panels/media/PlayerPropertiesView.ts | noEncoder":{"message":"无解码器"},"panels/media/PlayerPropertiesView.ts | noTextTracks":{"message":"无文本轨道"},"panels/media/PlayerPropertiesView.ts | playbackFrameTitle":{"message":"播放框架标题"},"panels/media/PlayerPropertiesView.ts | playbackFrameUrl":{"message":"播放框架网址"},"panels/media/PlayerPropertiesView.ts | properties":{"message":"属性"},"panels/media/PlayerPropertiesView.ts | rangeHeaderSupport":{"message":"支持 Range 标头"},"panels/media/PlayerPropertiesView.ts | rendererName":{"message":"渲染程序名称"},"panels/media/PlayerPropertiesView.ts | resolution":{"message":"分辨率"},"panels/media/PlayerPropertiesView.ts | singleoriginPlayback":{"message":"单源播放"},"panels/media/PlayerPropertiesView.ts | startTime":{"message":"开始时间"},"panels/media/PlayerPropertiesView.ts | streaming":{"message":"在线播放"},"panels/media/PlayerPropertiesView.ts | textTrack":{"message":"文本轨道"},"panels/media/PlayerPropertiesView.ts | track":{"message":"曲目"},"panels/media/PlayerPropertiesView.ts | video":{"message":"视频"},"panels/media/PlayerPropertiesView.ts | videoFreezingScore":{"message":"视频冻结得分"},"panels/media/PlayerPropertiesView.ts | videoPlaybackRoughness":{"message":"视频播放质量差距"},"panels/media/media-meta.ts | media":{"message":"媒体"},"panels/media/media-meta.ts | showMedia":{"message":"显示“媒体”"},"panels/media/media-meta.ts | video":{"message":"视频"},"panels/mobile_throttling/MobileThrottlingSelector.ts | advanced":{"message":"高级"},"panels/mobile_throttling/MobileThrottlingSelector.ts | disabled":{"message":"已停用"},"panels/mobile_throttling/MobileThrottlingSelector.ts | presets":{"message":"预设"},"panels/mobile_throttling/NetworkPanelIndicator.ts | acceptedEncodingOverrideSet":{"message":"接受的 Content-Encoding 标头集合已被 DevTools 修改。请查看“网络状况”面板。"},"panels/mobile_throttling/NetworkPanelIndicator.ts | networkThrottlingIsEnabled":{"message":"已启用网络节流"},"panels/mobile_throttling/NetworkPanelIndicator.ts | requestsMayBeBlocked":{"message":"请求可能会被屏蔽"},"panels/mobile_throttling/NetworkPanelIndicator.ts | requestsMayBeRewrittenByLocal":{"message":"请求可能会被本地替换重写"},"panels/mobile_throttling/NetworkThrottlingSelector.ts | custom":{"message":"自定义"},"panels/mobile_throttling/NetworkThrottlingSelector.ts | disabled":{"message":"已停用"},"panels/mobile_throttling/NetworkThrottlingSelector.ts | presets":{"message":"预设"},"panels/mobile_throttling/ThrottlingManager.ts | add":{"message":"添加…"},"panels/mobile_throttling/ThrottlingManager.ts | addS":{"message":"添加{PH1}"},"panels/mobile_throttling/ThrottlingManager.ts | cpuThrottling":{"message":"CPU 节流"},"panels/mobile_throttling/ThrottlingManager.ts | cpuThrottlingIsEnabled":{"message":"CPU 节流已启用"},"panels/mobile_throttling/ThrottlingManager.ts | dSlowdown":{"message":"{PH1} 倍降速"},"panels/mobile_throttling/ThrottlingManager.ts | excessConcurrency":{"message":"超过默认值可能会降低系统性能。"},"panels/mobile_throttling/ThrottlingManager.ts | forceDisconnectedFromNetwork":{"message":"强制断开网络连接"},"panels/mobile_throttling/ThrottlingManager.ts | hardwareConcurrency":{"message":"硬件并发"},"panels/mobile_throttling/ThrottlingManager.ts | hardwareConcurrencyIsEnabled":{"message":"硬件并发替换已启用"},"panels/mobile_throttling/ThrottlingManager.ts | hardwareConcurrencyValue":{"message":"navigator.hardwareConcurrency 的值"},"panels/mobile_throttling/ThrottlingManager.ts | noThrottling":{"message":"已停用节流模式"},"panels/mobile_throttling/ThrottlingManager.ts | offline":{"message":"离线"},"panels/mobile_throttling/ThrottlingManager.ts | resetConcurrency":{"message":"重置为默认值"},"panels/mobile_throttling/ThrottlingManager.ts | sS":{"message":"{PH1}:{PH2}"},"panels/mobile_throttling/ThrottlingManager.ts | throttling":{"message":"节流"},"panels/mobile_throttling/ThrottlingPresets.ts | checkNetworkAndPerformancePanels":{"message":"检查“网络”和“性能”面板"},"panels/mobile_throttling/ThrottlingPresets.ts | custom":{"message":"自定义"},"panels/mobile_throttling/ThrottlingPresets.ts | fastGXCpuSlowdown":{"message":"快速 3G 和 4 倍 CPU 降速"},"panels/mobile_throttling/ThrottlingPresets.ts | lowendMobile":{"message":"低端手机"},"panels/mobile_throttling/ThrottlingPresets.ts | midtierMobile":{"message":"中端移动设备"},"panels/mobile_throttling/ThrottlingPresets.ts | noInternetConnectivity":{"message":"未连接到互联网"},"panels/mobile_throttling/ThrottlingPresets.ts | noThrottling":{"message":"已停用节流模式"},"panels/mobile_throttling/ThrottlingPresets.ts | slowGXCpuSlowdown":{"message":"慢速 3G 和 6 倍 CPU 降速"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | addCustomProfile":{"message":"添加自定义配置文件…"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | dms":{"message":"{PH1} ms"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | download":{"message":"下载"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | dskbits":{"message":"{PH1} kbit/s"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | fsmbits":{"message":"{PH1} Mbit/s"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | latency":{"message":"延迟时间"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | latencyMustBeAnIntegerBetweenSms":{"message":"延迟时间必须是介于 {PH1} ms到 {PH2} ms(含端点值)之间的整数"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | networkThrottlingProfiles":{"message":"网络节流性能分析报告"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | optional":{"message":"可选"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | profileName":{"message":"性能分析报告名称"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | profileNameCharactersLengthMust":{"message":"配置文件名称的长度必须介于 1 到 {PH1} 个字符之间(包括端点值)"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | sMustBeANumberBetweenSkbsToSkbs":{"message":"{PH1}必须是介于 {PH2} kbit/s到 {PH3} kbit/s(含端点值)之间的数字"},"panels/mobile_throttling/ThrottlingSettingsTab.ts | upload":{"message":"上传"},"panels/mobile_throttling/mobile_throttling-meta.ts | device":{"message":"设备"},"panels/mobile_throttling/mobile_throttling-meta.ts | enableFastGThrottling":{"message":"启用快速 3G 节流"},"panels/mobile_throttling/mobile_throttling-meta.ts | enableSlowGThrottling":{"message":"启用低速 3G 节流"},"panels/mobile_throttling/mobile_throttling-meta.ts | goOffline":{"message":"转为离线模式"},"panels/mobile_throttling/mobile_throttling-meta.ts | goOnline":{"message":"恢复在线状态"},"panels/mobile_throttling/mobile_throttling-meta.ts | showThrottling":{"message":"显示“节流”"},"panels/mobile_throttling/mobile_throttling-meta.ts | throttling":{"message":"节流"},"panels/mobile_throttling/mobile_throttling-meta.ts | throttlingTag":{"message":"节流"},"panels/network/BinaryResourceView.ts | binaryViewType":{"message":"二进制视图类型"},"panels/network/BinaryResourceView.ts | copiedAsBase":{"message":"已经以 Base64 格式复制"},"panels/network/BinaryResourceView.ts | copiedAsHex":{"message":"已经以 Hex 格式复制"},"panels/network/BinaryResourceView.ts | copiedAsUtf":{"message":"已经以 UTF-8 格式复制"},"panels/network/BinaryResourceView.ts | copyAsBase":{"message":"以 Base64 格式复制"},"panels/network/BinaryResourceView.ts | copyAsHex":{"message":"以 Hex 格式复制"},"panels/network/BinaryResourceView.ts | copyAsUtf":{"message":"以 UTF-8 格式复制"},"panels/network/BinaryResourceView.ts | copyToClipboard":{"message":"复制到剪贴板"},"panels/network/BinaryResourceView.ts | hexViewer":{"message":"Hex查看器"},"panels/network/BlockedURLsPane.ts | addNetworkRequestBlockingPattern":{"message":"添加网络请求屏蔽模式"},"panels/network/BlockedURLsPane.ts | addPattern":{"message":"添加模式"},"panels/network/BlockedURLsPane.ts | dBlocked":{"message":"已屏蔽 {PH1} 个"},"panels/network/BlockedURLsPane.ts | enableNetworkRequestBlocking":{"message":"启用网络请求屏蔽功能"},"panels/network/BlockedURLsPane.ts | itemDeleted":{"message":"已成功删除此列表项"},"panels/network/BlockedURLsPane.ts | networkRequestsAreNotBlockedS":{"message":"未屏蔽网络请求。{PH1}"},"panels/network/BlockedURLsPane.ts | patternAlreadyExists":{"message":"模式已经存在。"},"panels/network/BlockedURLsPane.ts | patternInputCannotBeEmpty":{"message":"模式输入不能为空。"},"panels/network/BlockedURLsPane.ts | removeAllPatterns":{"message":"移除所有模式"},"panels/network/BlockedURLsPane.ts | textPatternToBlockMatching":{"message":"用于屏蔽匹配请求的文本模式;请使用 * 作为通配符"},"panels/network/EventSourceMessagesView.ts | copyMessage":{"message":"复制消息"},"panels/network/EventSourceMessagesView.ts | data":{"message":"数据"},"panels/network/EventSourceMessagesView.ts | eventSource":{"message":"事件来源"},"panels/network/EventSourceMessagesView.ts | id":{"message":"ID"},"panels/network/EventSourceMessagesView.ts | time":{"message":"时间"},"panels/network/EventSourceMessagesView.ts | type":{"message":"类型"},"panels/network/NetworkConfigView.ts | acceptedEncoding":{"message":"接受的 Content-Encoding"},"panels/network/NetworkConfigView.ts | caching":{"message":"缓存"},"panels/network/NetworkConfigView.ts | clientHintsStatusText":{"message":"用户代理已更新。"},"panels/network/NetworkConfigView.ts | custom":{"message":"自定义…"},"panels/network/NetworkConfigView.ts | customUserAgentFieldIsRequired":{"message":"“自定义用户代理”字段是必填项"},"panels/network/NetworkConfigView.ts | disableCache":{"message":"停用缓存"},"panels/network/NetworkConfigView.ts | enterACustomUserAgent":{"message":"输入自定义用户代理"},"panels/network/NetworkConfigView.ts | networkConditionsPanelShown":{"message":"已显示“网络状况”面板"},"panels/network/NetworkConfigView.ts | networkThrottling":{"message":"网络节流"},"panels/network/NetworkConfigView.ts | selectAutomatically":{"message":"使用浏览器默认设置"},"panels/network/NetworkConfigView.ts | userAgent":{"message":"用户代理"},"panels/network/NetworkDataGridNode.ts | alternativeJobWonRace":{"message":"Chrome 使用了由“Alt-Svc”标头引发的 HTTP/3 连接,因为该连接在与使用不同 HTTP 版本建立的连接竞争时胜出。"},"panels/network/NetworkDataGridNode.ts | alternativeJobWonWithoutRace":{"message":"Chrome 使用了由“Alt-Svc”标头引发的 HTTP/3 连接,该连接未与使用不同 HTTP 版本建立的连接发生竞争。"},"panels/network/NetworkDataGridNode.ts | blockedTooltip":{"message":"此请求因配置有误的响应标头而被屏蔽,点击即可查看这些标头"},"panels/network/NetworkDataGridNode.ts | blockeds":{"message":"(已屏蔽:{PH1})"},"panels/network/NetworkDataGridNode.ts | broken":{"message":"Chrome 未尝试建立 HTTP/3 连接,因为该连接已被标记为损坏。"},"panels/network/NetworkDataGridNode.ts | canceled":{"message":"(已取消)"},"panels/network/NetworkDataGridNode.ts | corsError":{"message":"CORS 错误"},"panels/network/NetworkDataGridNode.ts | crossoriginResourceSharingErrorS":{"message":"跨域资源共享错误:{PH1}"},"panels/network/NetworkDataGridNode.ts | csp":{"message":"csp"},"panels/network/NetworkDataGridNode.ts | data":{"message":"(数据)"},"panels/network/NetworkDataGridNode.ts | devtools":{"message":"DevTools"},"panels/network/NetworkDataGridNode.ts | diskCache":{"message":"(disk cache)"},"panels/network/NetworkDataGridNode.ts | dnsAlpnH3JobWonRace":{"message":"Chrome 使用了 HTTP/3 连接,因为 DNS record表明支持 HTTP/3,该连接在与使用不同 HTTP 版本建立的连接竞争时胜出。"},"panels/network/NetworkDataGridNode.ts | dnsAlpnH3JobWonWithoutRace":{"message":"Chrome 使用了 HTTP/3 连接,因为 DNS record表明支持 HTTP/3。该连接未与使用不同 HTTP 版本建立的连接发生竞争。"},"panels/network/NetworkDataGridNode.ts | failed":{"message":"(失败)"},"panels/network/NetworkDataGridNode.ts | finished":{"message":"已完成"},"panels/network/NetworkDataGridNode.ts | hasOverriddenHeaders":{"message":"此请求的标头已被替换"},"panels/network/NetworkDataGridNode.ts | level":{"message":"级别 1"},"panels/network/NetworkDataGridNode.ts | mainJobWonRace":{"message":"Chrome 使用了该协议,因为它在与使用 HTTP/3 建立的连接竞争时胜出。"},"panels/network/NetworkDataGridNode.ts | mappingMissing":{"message":"Chrome 未使用替代 HTTP 版本,因为在发出请求时没有任何可用的替代协议信息,但响应包含“Alt-Svc”标头。"},"panels/network/NetworkDataGridNode.ts | memoryCache":{"message":"(内存缓存)"},"panels/network/NetworkDataGridNode.ts | origin":{"message":"来源"},"panels/network/NetworkDataGridNode.ts | other":{"message":"其他"},"panels/network/NetworkDataGridNode.ts | otherC":{"message":"其他"},"panels/network/NetworkDataGridNode.ts | parser":{"message":"解析器"},"panels/network/NetworkDataGridNode.ts | pending":{"message":"待处理"},"panels/network/NetworkDataGridNode.ts | pendingq":{"message":"(待处理)"},"panels/network/NetworkDataGridNode.ts | prefetchCache":{"message":"(预提取缓存)"},"panels/network/NetworkDataGridNode.ts | preflight":{"message":"预检"},"panels/network/NetworkDataGridNode.ts | preload":{"message":"预加载"},"panels/network/NetworkDataGridNode.ts | push":{"message":"推送 / "},"panels/network/NetworkDataGridNode.ts | redirect":{"message":"重定向"},"panels/network/NetworkDataGridNode.ts | sPreflight":{"message":"{PH1} + 预检"},"panels/network/NetworkDataGridNode.ts | script":{"message":"脚本"},"panels/network/NetworkDataGridNode.ts | selectPreflightRequest":{"message":"选择预定流程请求"},"panels/network/NetworkDataGridNode.ts | selectTheRequestThatTriggered":{"message":"选择触发了此预定流程的请求"},"panels/network/NetworkDataGridNode.ts | servedFromDiskCacheResourceSizeS":{"message":"通过磁盘缓存提供,资源大小:{PH1}"},"panels/network/NetworkDataGridNode.ts | servedFromMemoryCacheResource":{"message":"由内存缓存提供,资源大小:{PH1}"},"panels/network/NetworkDataGridNode.ts | servedFromPrefetchCacheResource":{"message":"由预提取缓存提供,资源大小:{PH1}"},"panels/network/NetworkDataGridNode.ts | servedFromServiceworkerResource":{"message":"由 ServiceWorker 提供,资源大小:{PH1}"},"panels/network/NetworkDataGridNode.ts | servedFromSignedHttpExchange":{"message":"通过 Signed HTTP Exchange 提供,资源大小:{PH1}"},"panels/network/NetworkDataGridNode.ts | servedFromWebBundle":{"message":"由 Web Bundle 提供,资源大小:{PH1}"},"panels/network/NetworkDataGridNode.ts | serviceworker":{"message":"(ServiceWorker)"},"panels/network/NetworkDataGridNode.ts | signedexchange":{"message":"signed-exchange"},"panels/network/NetworkDataGridNode.ts | timeSubtitleTooltipText":{"message":"延迟时间(收到响应的时间 - 发起请求的时间)"},"panels/network/NetworkDataGridNode.ts | unknown":{"message":"(未知)"},"panels/network/NetworkDataGridNode.ts | unknownExplanation":{"message":"无法在此处显示该请求的状态,因为发出该请求的网页在传输该请求的过程中被卸载了。您可以使用 chrome://net-export 来捕获网络日志并查看所有请求详情。"},"panels/network/NetworkDataGridNode.ts | webBundle":{"message":"(Web Bundle)"},"panels/network/NetworkDataGridNode.ts | webBundleError":{"message":"Web Bundle 错误"},"panels/network/NetworkDataGridNode.ts | webBundleInnerRequest":{"message":"由 Web Bundle 传回"},"panels/network/NetworkItemView.ts | cookies":{"message":"Cookie"},"panels/network/NetworkItemView.ts | eventstream":{"message":"EventStream"},"panels/network/NetworkItemView.ts | headers":{"message":"标头"},"panels/network/NetworkItemView.ts | initiator":{"message":"启动器"},"panels/network/NetworkItemView.ts | messages":{"message":"消息"},"panels/network/NetworkItemView.ts | payload":{"message":"载荷"},"panels/network/NetworkItemView.ts | preview":{"message":"预览"},"panels/network/NetworkItemView.ts | rawResponseData":{"message":"原始响应数据"},"panels/network/NetworkItemView.ts | requestAndResponseCookies":{"message":"请求和响应 Cookie"},"panels/network/NetworkItemView.ts | requestAndResponseTimeline":{"message":"请求和响应时间轴"},"panels/network/NetworkItemView.ts | requestInitiatorCallStack":{"message":"请求启动器调用堆栈"},"panels/network/NetworkItemView.ts | response":{"message":"响应"},"panels/network/NetworkItemView.ts | responsePreview":{"message":"响应预览"},"panels/network/NetworkItemView.ts | signedexchangeError":{"message":"SignedExchange 错误"},"panels/network/NetworkItemView.ts | timing":{"message":"时间"},"panels/network/NetworkItemView.ts | trustTokenOperationDetails":{"message":"私密状态令牌操作详情"},"panels/network/NetworkItemView.ts | trustTokens":{"message":"私密状态令牌"},"panels/network/NetworkItemView.ts | websocketMessages":{"message":"WebSocket 消息"},"panels/network/NetworkLogView.ts | areYouSureYouWantToClearBrowser":{"message":"确定要清除浏览器缓存吗?"},"panels/network/NetworkLogView.ts | areYouSureYouWantToClearBrowserCookies":{"message":"确定要清除浏览器 Cookie 吗?"},"panels/network/NetworkLogView.ts | blockRequestDomain":{"message":"屏蔽请求网域"},"panels/network/NetworkLogView.ts | blockRequestUrl":{"message":"屏蔽请求网址"},"panels/network/NetworkLogView.ts | blockedRequests":{"message":"被屏蔽的请求"},"panels/network/NetworkLogView.ts | clearBrowserCache":{"message":"清除浏览器缓存"},"panels/network/NetworkLogView.ts | clearBrowserCookies":{"message":"清除浏览器 Cookie"},"panels/network/NetworkLogView.ts | copy":{"message":"复制"},"panels/network/NetworkLogView.ts | copyAllAsCurl":{"message":"以 cURL 格式复制所有内容"},"panels/network/NetworkLogView.ts | copyAllAsCurlBash":{"message":"以 cURL (bash) 格式复制所有内容"},"panels/network/NetworkLogView.ts | copyAllAsCurlCmd":{"message":"以 cURL (cmd) 格式复制所有内容"},"panels/network/NetworkLogView.ts | copyAllAsFetch":{"message":"以 fetch 格式复制所有内容"},"panels/network/NetworkLogView.ts | copyAllAsHar":{"message":"以 HAR 格式复制所有内容"},"panels/network/NetworkLogView.ts | copyAllAsNodejsFetch":{"message":"以 Node.js fetch 格式复制所有内容"},"panels/network/NetworkLogView.ts | copyAllAsPowershell":{"message":"以 PowerShell 格式复制所有内容"},"panels/network/NetworkLogView.ts | copyAsCurl":{"message":"以 cURL 格式复制"},"panels/network/NetworkLogView.ts | copyAsCurlBash":{"message":"以 cURL (bash) 格式复制"},"panels/network/NetworkLogView.ts | copyAsCurlCmd":{"message":"以 cURL (cmd) 格式复制"},"panels/network/NetworkLogView.ts | copyAsFetch":{"message":"以 fetch 格式复制"},"panels/network/NetworkLogView.ts | copyAsNodejsFetch":{"message":"以 Node.js fetch 格式复制"},"panels/network/NetworkLogView.ts | copyAsPowershell":{"message":"以 PowerShell 格式复制"},"panels/network/NetworkLogView.ts | copyRequestHeaders":{"message":"复制请求标头"},"panels/network/NetworkLogView.ts | copyResponse":{"message":"复制响应"},"panels/network/NetworkLogView.ts | copyResponseHeaders":{"message":"复制响应标头"},"panels/network/NetworkLogView.ts | copyStacktrace":{"message":"复制堆栈轨迹"},"panels/network/NetworkLogView.ts | domcontentloadedS":{"message":"DOMContentLoaded:{PH1}"},"panels/network/NetworkLogView.ts | dropHarFilesHere":{"message":"将 HAR 文件拖放到此处"},"panels/network/NetworkLogView.ts | finishS":{"message":"完成用时:{PH1}"},"panels/network/NetworkLogView.ts | hasBlockedCookies":{"message":"有已拦截的 Cookie"},"panels/network/NetworkLogView.ts | hideDataUrls":{"message":"隐藏数据网址"},"panels/network/NetworkLogView.ts | hidesDataAndBlobUrls":{"message":"隐藏 data: 和 blob: 网址"},"panels/network/NetworkLogView.ts | invertFilter":{"message":"反转"},"panels/network/NetworkLogView.ts | invertsFilter":{"message":"反转搜索过滤器"},"panels/network/NetworkLogView.ts | learnMore":{"message":"了解详情"},"panels/network/NetworkLogView.ts | loadS":{"message":"加载时间:{PH1}"},"panels/network/NetworkLogView.ts | networkDataAvailable":{"message":"网络数据可用"},"panels/network/NetworkLogView.ts | onlyShowBlockedRequests":{"message":"仅显示被屏蔽的请求"},"panels/network/NetworkLogView.ts | onlyShowRequestsWithBlocked":{"message":"仅显示带有被屏蔽的响应 Cookie 的请求"},"panels/network/NetworkLogView.ts | onlyShowThirdPartyRequests":{"message":"仅显示不是由网页源发出的请求"},"panels/network/NetworkLogView.ts | overrideHeaders":{"message":"替换标头"},"panels/network/NetworkLogView.ts | performARequestOrHitSToRecordThe":{"message":"执行某项请求或按 {PH1} 即可记录重新加载。"},"panels/network/NetworkLogView.ts | recordToDisplayNetworkActivity":{"message":"如果想让当前界面显示网络活动,请开始记录网络日志 ({PH1})。"},"panels/network/NetworkLogView.ts | recordingNetworkActivity":{"message":"正在录制网络活动…"},"panels/network/NetworkLogView.ts | replayXhr":{"message":"重放 XHR"},"panels/network/NetworkLogView.ts | resourceTypesToInclude":{"message":"要包含的资源类型"},"panels/network/NetworkLogView.ts | sBResourcesLoadedByThePage":{"message":"网页加载了 {PH1} B 的资源"},"panels/network/NetworkLogView.ts | sBSBResourcesLoadedByThePage":{"message":"网页加载的资源大小为 {PH1} B,资源总大小为 {PH2} B"},"panels/network/NetworkLogView.ts | sBSBTransferredOverNetwork":{"message":"已通过网络传输 {PH1} B(共 {PH2} B)"},"panels/network/NetworkLogView.ts | sBTransferredOverNetwork":{"message":"已通过网络传输 {PH1} B"},"panels/network/NetworkLogView.ts | sRequests":{"message":"{PH1} 个请求"},"panels/network/NetworkLogView.ts | sResources":{"message":"{PH1} 项资源"},"panels/network/NetworkLogView.ts | sSRequests":{"message":"第 {PH1} 项请求,共 {PH2} 项"},"panels/network/NetworkLogView.ts | sSResources":{"message":"所选资源大小为 {PH1},共 {PH2}"},"panels/network/NetworkLogView.ts | sSTransferred":{"message":"已传输 {PH1},共 {PH2}"},"panels/network/NetworkLogView.ts | sTransferred":{"message":"已传输 {PH1}"},"panels/network/NetworkLogView.ts | saveAllAsHarWithContent":{"message":"以 HAR 格式保存所有内容"},"panels/network/NetworkLogView.ts | thirdParty":{"message":"第三方请求"},"panels/network/NetworkLogView.ts | unblockS":{"message":"取消屏蔽 {PH1}"},"panels/network/NetworkLogViewColumns.ts | connectionId":{"message":"连接 ID"},"panels/network/NetworkLogViewColumns.ts | content":{"message":"内容"},"panels/network/NetworkLogViewColumns.ts | cookies":{"message":"Cookie"},"panels/network/NetworkLogViewColumns.ts | domain":{"message":"网域"},"panels/network/NetworkLogViewColumns.ts | endTime":{"message":"结束时间"},"panels/network/NetworkLogViewColumns.ts | initiator":{"message":"启动器"},"panels/network/NetworkLogViewColumns.ts | initiatorAddressSpace":{"message":"启动器地址空间"},"panels/network/NetworkLogViewColumns.ts | latency":{"message":"延迟时间"},"panels/network/NetworkLogViewColumns.ts | manageHeaderColumns":{"message":"管理标头列…"},"panels/network/NetworkLogViewColumns.ts | method":{"message":"方法"},"panels/network/NetworkLogViewColumns.ts | name":{"message":"名称"},"panels/network/NetworkLogViewColumns.ts | networkLog":{"message":"网络日志"},"panels/network/NetworkLogViewColumns.ts | path":{"message":"路径"},"panels/network/NetworkLogViewColumns.ts | priority":{"message":"优先级"},"panels/network/NetworkLogViewColumns.ts | protocol":{"message":"协议"},"panels/network/NetworkLogViewColumns.ts | remoteAddress":{"message":"远程地址"},"panels/network/NetworkLogViewColumns.ts | remoteAddressSpace":{"message":"远程地址空间"},"panels/network/NetworkLogViewColumns.ts | responseHeaders":{"message":"响应标头"},"panels/network/NetworkLogViewColumns.ts | responseTime":{"message":"响应时间"},"panels/network/NetworkLogViewColumns.ts | scheme":{"message":"架构"},"panels/network/NetworkLogViewColumns.ts | setCookies":{"message":"设置 Cookie"},"panels/network/NetworkLogViewColumns.ts | size":{"message":"大小"},"panels/network/NetworkLogViewColumns.ts | startTime":{"message":"开始时间"},"panels/network/NetworkLogViewColumns.ts | status":{"message":"状态"},"panels/network/NetworkLogViewColumns.ts | text":{"message":"文本"},"panels/network/NetworkLogViewColumns.ts | time":{"message":"时间"},"panels/network/NetworkLogViewColumns.ts | totalDuration":{"message":"总时长"},"panels/network/NetworkLogViewColumns.ts | type":{"message":"类型"},"panels/network/NetworkLogViewColumns.ts | url":{"message":"网址"},"panels/network/NetworkLogViewColumns.ts | waterfall":{"message":"瀑布"},"panels/network/NetworkManageCustomHeadersView.ts | addCustomHeader":{"message":"添加自定义标头…"},"panels/network/NetworkManageCustomHeadersView.ts | headerName":{"message":"标头名称"},"panels/network/NetworkManageCustomHeadersView.ts | manageHeaderColumns":{"message":"管理标头列"},"panels/network/NetworkManageCustomHeadersView.ts | noCustomHeaders":{"message":"无自定义标头"},"panels/network/NetworkPanel.ts | captureScreenshots":{"message":"截取屏幕截图"},"panels/network/NetworkPanel.ts | captureScreenshotsWhenLoadingA":{"message":"加载网页时截取屏幕截图"},"panels/network/NetworkPanel.ts | close":{"message":"关闭"},"panels/network/NetworkPanel.ts | disableCache":{"message":"停用缓存"},"panels/network/NetworkPanel.ts | disableCacheWhileDevtoolsIsOpen":{"message":"停用缓存(在开发者工具已打开时)"},"panels/network/NetworkPanel.ts | doNotClearLogOnPageReload":{"message":"网页重新加载/导航时不清除日志"},"panels/network/NetworkPanel.ts | exportHar":{"message":"导出 HAR 文件…"},"panels/network/NetworkPanel.ts | fetchingFrames":{"message":"正在提取框架…"},"panels/network/NetworkPanel.ts | groupByFrame":{"message":"按框架分组"},"panels/network/NetworkPanel.ts | groupRequestsByTopLevelRequest":{"message":"按顶级请求框架对请求分组"},"panels/network/NetworkPanel.ts | hitSToReloadAndCaptureFilmstrip":{"message":"按 {PH1} 即可重新加载和截取幻灯影片。"},"panels/network/NetworkPanel.ts | importHarFile":{"message":"导入 HAR 文件…"},"panels/network/NetworkPanel.ts | moreNetworkConditions":{"message":"更多网络状况…"},"panels/network/NetworkPanel.ts | networkSettings":{"message":"网络设置"},"panels/network/NetworkPanel.ts | preserveLog":{"message":"保留日志"},"panels/network/NetworkPanel.ts | recordingFrames":{"message":"正在录制框架…"},"panels/network/NetworkPanel.ts | revealInNetworkPanel":{"message":"在“网络”面板中显示"},"panels/network/NetworkPanel.ts | search":{"message":"搜索"},"panels/network/NetworkPanel.ts | showMoreInformationInRequestRows":{"message":"在请求行中显示更多信息"},"panels/network/NetworkPanel.ts | showOverview":{"message":"显示概览"},"panels/network/NetworkPanel.ts | showOverviewOfNetworkRequests":{"message":"显示网络请求概览"},"panels/network/NetworkPanel.ts | throttling":{"message":"节流"},"panels/network/NetworkPanel.ts | useLargeRequestRows":{"message":"使用大量请求行"},"panels/network/NetworkSearchScope.ts | url":{"message":"网址"},"panels/network/NetworkTimeCalculator.ts | sDownload":{"message":"下载速度为 {PH1}"},"panels/network/NetworkTimeCalculator.ts | sFromCache":{"message":"{PH1}(来自缓存)"},"panels/network/NetworkTimeCalculator.ts | sFromServiceworker":{"message":"{PH1}(来自 ServiceWorker)"},"panels/network/NetworkTimeCalculator.ts | sLatency":{"message":"延迟时间:{PH1}"},"panels/network/NetworkTimeCalculator.ts | sLatencySDownloadSTotal":{"message":"{PH1} 延迟时间,{PH2} 下载时间(总计 {PH3})"},"panels/network/RequestCookiesView.ts | cookiesThatWereReceivedFromThe":{"message":"通过响应的“set-cookie”标头从服务器接收的 Cookie"},"panels/network/RequestCookiesView.ts | cookiesThatWereReceivedFromTheServer":{"message":"在响应的“set-cookie”标头中从服务器接收的格式不正确的 Cookie"},"panels/network/RequestCookiesView.ts | cookiesThatWereSentToTheServerIn":{"message":"请求的“cookie”标头中已发送到服务器的 Cookie"},"panels/network/RequestCookiesView.ts | learnMore":{"message":"了解详情"},"panels/network/RequestCookiesView.ts | malformedResponseCookies":{"message":"格式不正确的响应 Cookie"},"panels/network/RequestCookiesView.ts | noRequestCookiesWereSent":{"message":"未发送任何请求 Cookie。"},"panels/network/RequestCookiesView.ts | requestCookies":{"message":"请求 Cookie"},"panels/network/RequestCookiesView.ts | responseCookies":{"message":"响应 Cookie"},"panels/network/RequestCookiesView.ts | showFilteredOutRequestCookies":{"message":"显示滤除的请求 Cookie"},"panels/network/RequestCookiesView.ts | siteHasCookieInOtherPartition":{"message":"此网站在另一个分区中有 Cookie,这些 Cookie 不是随该请求发送的。{PH1}"},"panels/network/RequestCookiesView.ts | thisRequestHasNoCookies":{"message":"此请求不含任何 Cookie。"},"panels/network/RequestHeadersView.ts | activeClientExperimentVariation":{"message":"活跃的client experiment variation IDs。"},"panels/network/RequestHeadersView.ts | activeClientExperimentVariationIds":{"message":"触发服务器端行为的活跃client experiment variation IDs。"},"panels/network/RequestHeadersView.ts | chooseThisOptionIfTheResourceAnd":{"message":"如果资源和文档由同一网站提供,请选择此选项。"},"panels/network/RequestHeadersView.ts | copyValue":{"message":"复制值"},"panels/network/RequestHeadersView.ts | decoded":{"message":"已解码:"},"panels/network/RequestHeadersView.ts | fromDiskCache":{"message":"(来自磁盘缓存)"},"panels/network/RequestHeadersView.ts | fromMemoryCache":{"message":"(来自内存缓存)"},"panels/network/RequestHeadersView.ts | fromPrefetchCache":{"message":"(来自预提取缓存)"},"panels/network/RequestHeadersView.ts | fromServiceWorker":{"message":"(来自 service worker)"},"panels/network/RequestHeadersView.ts | fromSignedexchange":{"message":"(来自 signed-exchange)"},"panels/network/RequestHeadersView.ts | fromWebBundle":{"message":"(来自 Web Bundle)"},"panels/network/RequestHeadersView.ts | general":{"message":"常规"},"panels/network/RequestHeadersView.ts | headerOverrides":{"message":"标头覆盖"},"panels/network/RequestHeadersView.ts | learnMore":{"message":"了解详情"},"panels/network/RequestHeadersView.ts | learnMoreInTheIssuesTab":{"message":"前往“问题”标签页了解详情"},"panels/network/RequestHeadersView.ts | onlyChooseThisOptionIfAn":{"message":"仅当包括此资源在内的任意网站不会带来安全风险时,才可选择此选项。"},"panels/network/RequestHeadersView.ts | onlyProvisionalHeadersAre":{"message":"仅预配标头可用,因为此请求并非通过网络发送,而是从本地缓存提供,其中不会存储原始请求标头。停用缓存即可查看完整请求标头。"},"panels/network/RequestHeadersView.ts | provisionalHeadersAreShown":{"message":"显示的是预配标头"},"panels/network/RequestHeadersView.ts | provisionalHeadersAreShownS":{"message":"当前显示的是预配标头。停用缓存即可查看完整标头。"},"panels/network/RequestHeadersView.ts | referrerPolicy":{"message":"引荐来源网址政策"},"panels/network/RequestHeadersView.ts | remoteAddress":{"message":"远程地址"},"panels/network/RequestHeadersView.ts | requestHeaders":{"message":"请求标头"},"panels/network/RequestHeadersView.ts | requestMethod":{"message":"请求方法"},"panels/network/RequestHeadersView.ts | requestUrl":{"message":"请求网址"},"panels/network/RequestHeadersView.ts | responseHeaders":{"message":"响应标头"},"panels/network/RequestHeadersView.ts | showMore":{"message":"展开"},"panels/network/RequestHeadersView.ts | statusCode":{"message":"状态代码"},"panels/network/RequestHeadersView.ts | thisDocumentWasBlockedFrom":{"message":"此文档指定了跨源 opener 政策,因此被禁止在具有 sandbox 属性的 iframe 中加载。"},"panels/network/RequestHeadersView.ts | toEmbedThisFrameInYourDocument":{"message":"若要在您的文档中嵌入此框架,则需在响应中指定如下响应标头,以启用跨源嵌入器政策:"},"panels/network/RequestHeadersView.ts | toUseThisResourceFromADifferent":{"message":"为了从另一个源使用此资源,服务器需要在响应标头中指定跨源资源政策:"},"panels/network/RequestHeadersView.ts | toUseThisResourceFromADifferentOrigin":{"message":"为了从另一个源使用此资源,服务器可能会放宽对跨源资源政策响应标头的要求:"},"panels/network/RequestHeadersView.ts | toUseThisResourceFromADifferentSite":{"message":"为了从另一个网站使用此资源,服务器可能会放宽对跨源资源政策响应标头的要求:"},"panels/network/RequestHeadersView.ts | viewParsed":{"message":"查看解析结果"},"panels/network/RequestHeadersView.ts | viewSource":{"message":"查看源代码"},"panels/network/RequestInitiatorView.ts | requestCallStack":{"message":"请求调用堆栈"},"panels/network/RequestInitiatorView.ts | requestInitiatorChain":{"message":"请求启动器链"},"panels/network/RequestInitiatorView.ts | thisRequestHasNoInitiatorData":{"message":"此请求没有任何启动器数据。"},"panels/network/RequestPayloadView.ts | copyValue":{"message":"复制值"},"panels/network/RequestPayloadView.ts | empty":{"message":"(空)"},"panels/network/RequestPayloadView.ts | formData":{"message":"表单数据"},"panels/network/RequestPayloadView.ts | queryStringParameters":{"message":"查询字符串参数"},"panels/network/RequestPayloadView.ts | requestPayload":{"message":"请求载荷"},"panels/network/RequestPayloadView.ts | showMore":{"message":"展开"},"panels/network/RequestPayloadView.ts | unableToDecodeValue":{"message":"(无法解码值)"},"panels/network/RequestPayloadView.ts | viewDecoded":{"message":"视图已解码"},"panels/network/RequestPayloadView.ts | viewDecodedL":{"message":"视图已解码"},"panels/network/RequestPayloadView.ts | viewParsed":{"message":"查看解析结果"},"panels/network/RequestPayloadView.ts | viewParsedL":{"message":"查看已解析的结果"},"panels/network/RequestPayloadView.ts | viewSource":{"message":"查看源代码"},"panels/network/RequestPayloadView.ts | viewSourceL":{"message":"查看源代码"},"panels/network/RequestPayloadView.ts | viewUrlEncoded":{"message":"查看网址编码格式的数据"},"panels/network/RequestPayloadView.ts | viewUrlEncodedL":{"message":"查看网址编码格式的数据"},"panels/network/RequestPreviewView.ts | failedToLoadResponseData":{"message":"无法加载响应数据"},"panels/network/RequestPreviewView.ts | previewNotAvailable":{"message":"无法预览"},"panels/network/RequestResponseView.ts | failedToLoadResponseData":{"message":"无法加载响应数据"},"panels/network/RequestResponseView.ts | thisRequestHasNoResponseData":{"message":"此请求没有可用的响应数据。"},"panels/network/RequestTimingView.ts | cacheStorageCacheNameS":{"message":"缓存空间缓存名称:{PH1}"},"panels/network/RequestTimingView.ts | cacheStorageCacheNameUnknown":{"message":"缓存空间缓存名称:不明"},"panels/network/RequestTimingView.ts | cautionRequestIsNotFinishedYet":{"message":"注意:尚未完成请求!"},"panels/network/RequestTimingView.ts | connectionStart":{"message":"开始连接"},"panels/network/RequestTimingView.ts | contentDownload":{"message":"下载内容"},"panels/network/RequestTimingView.ts | dnsLookup":{"message":"DNS 查找"},"panels/network/RequestTimingView.ts | duration":{"message":"时长"},"panels/network/RequestTimingView.ts | durationC":{"message":"时长"},"panels/network/RequestTimingView.ts | duringDevelopmentYouCanUseSToAdd":{"message":"在开发过程中,您可以使用 {PH1} 向此请求的服务器端时间信息添加数据洞见。"},"panels/network/RequestTimingView.ts | explanation":{"message":"说明"},"panels/network/RequestTimingView.ts | fallbackCode":{"message":"后备代码"},"panels/network/RequestTimingView.ts | fromHttpCache":{"message":"来自 HTTP 缓存"},"panels/network/RequestTimingView.ts | initialConnection":{"message":"初始连接"},"panels/network/RequestTimingView.ts | label":{"message":"标签"},"panels/network/RequestTimingView.ts | networkFetch":{"message":"网络提取"},"panels/network/RequestTimingView.ts | originalRequest":{"message":"原始请求"},"panels/network/RequestTimingView.ts | proxyNegotiation":{"message":"代理协商"},"panels/network/RequestTimingView.ts | queuedAtS":{"message":"进入队列时间:{PH1}"},"panels/network/RequestTimingView.ts | queueing":{"message":"正在排队"},"panels/network/RequestTimingView.ts | readingPush":{"message":"读取 Push 消息"},"panels/network/RequestTimingView.ts | receivingPush":{"message":"接收 Push 消息"},"panels/network/RequestTimingView.ts | requestSent":{"message":"已发送请求"},"panels/network/RequestTimingView.ts | requestToServiceworker":{"message":"向 ServiceWorker 发送的请求"},"panels/network/RequestTimingView.ts | requestresponse":{"message":"请求/响应"},"panels/network/RequestTimingView.ts | resourceScheduling":{"message":"资源调度"},"panels/network/RequestTimingView.ts | respondwith":{"message":"respondWith"},"panels/network/RequestTimingView.ts | responseReceived":{"message":"已收到响应"},"panels/network/RequestTimingView.ts | retrievalTimeS":{"message":"检索时间:{PH1}"},"panels/network/RequestTimingView.ts | serverPush":{"message":"服务器推送"},"panels/network/RequestTimingView.ts | serverTiming":{"message":"服务器计时"},"panels/network/RequestTimingView.ts | serviceworkerCacheStorage":{"message":"ServiceWorker 缓存存储空间"},"panels/network/RequestTimingView.ts | sourceOfResponseS":{"message":"响应来源:{PH1}"},"panels/network/RequestTimingView.ts | ssl":{"message":"SSL"},"panels/network/RequestTimingView.ts | stalled":{"message":"已停止"},"panels/network/RequestTimingView.ts | startedAtS":{"message":"开始时间:{PH1}"},"panels/network/RequestTimingView.ts | startup":{"message":"启动"},"panels/network/RequestTimingView.ts | theServerTimingApi":{"message":"Server Timing API"},"panels/network/RequestTimingView.ts | time":{"message":"时间"},"panels/network/RequestTimingView.ts | total":{"message":"总计"},"panels/network/RequestTimingView.ts | unknown":{"message":"未知"},"panels/network/RequestTimingView.ts | waitingTtfb":{"message":"正在等待服务器响应"},"panels/network/RequestTimingView.ts | waterfall":{"message":"瀑布"},"panels/network/ResourceWebSocketFrameView.ts | all":{"message":"全部"},"panels/network/ResourceWebSocketFrameView.ts | binaryMessage":{"message":"二进制消息"},"panels/network/ResourceWebSocketFrameView.ts | clearAll":{"message":"全部清除"},"panels/network/ResourceWebSocketFrameView.ts | clearAllL":{"message":"全部清除"},"panels/network/ResourceWebSocketFrameView.ts | connectionCloseMessage":{"message":"连接关闭消息"},"panels/network/ResourceWebSocketFrameView.ts | continuationFrame":{"message":"延续框架"},"panels/network/ResourceWebSocketFrameView.ts | copyMessage":{"message":"复制消息"},"panels/network/ResourceWebSocketFrameView.ts | copyMessageD":{"message":"复制消息…"},"panels/network/ResourceWebSocketFrameView.ts | data":{"message":"数据"},"panels/network/ResourceWebSocketFrameView.ts | enterRegex":{"message":"输入正则表达式,例如:(web)?socket"},"panels/network/ResourceWebSocketFrameView.ts | filter":{"message":"过滤"},"panels/network/ResourceWebSocketFrameView.ts | length":{"message":"长度"},"panels/network/ResourceWebSocketFrameView.ts | na":{"message":"不适用"},"panels/network/ResourceWebSocketFrameView.ts | pingMessage":{"message":"Ping 消息"},"panels/network/ResourceWebSocketFrameView.ts | pongMessage":{"message":"Pong 消息"},"panels/network/ResourceWebSocketFrameView.ts | receive":{"message":"接收"},"panels/network/ResourceWebSocketFrameView.ts | sOpcodeS":{"message":"{PH1}(操作码 {PH2})"},"panels/network/ResourceWebSocketFrameView.ts | sOpcodeSMask":{"message":"{PH1}(操作码 {PH2}、掩码)"},"panels/network/ResourceWebSocketFrameView.ts | selectMessageToBrowseItsContent":{"message":"选择消息以浏览其内容。"},"panels/network/ResourceWebSocketFrameView.ts | send":{"message":"发送"},"panels/network/ResourceWebSocketFrameView.ts | textMessage":{"message":"文本消息"},"panels/network/ResourceWebSocketFrameView.ts | time":{"message":"时间"},"panels/network/ResourceWebSocketFrameView.ts | webSocketFrame":{"message":"WebSocket 框架"},"panels/network/SignedExchangeInfoView.ts | certificate":{"message":"证书"},"panels/network/SignedExchangeInfoView.ts | certificateSha":{"message":"证书 SHA256"},"panels/network/SignedExchangeInfoView.ts | certificateUrl":{"message":"证书网址"},"panels/network/SignedExchangeInfoView.ts | date":{"message":"日期"},"panels/network/SignedExchangeInfoView.ts | errors":{"message":"错误"},"panels/network/SignedExchangeInfoView.ts | expires":{"message":"到期"},"panels/network/SignedExchangeInfoView.ts | headerIntegrityHash":{"message":"标头完整性哈希"},"panels/network/SignedExchangeInfoView.ts | integrity":{"message":"完整性"},"panels/network/SignedExchangeInfoView.ts | issuer":{"message":"颁发者"},"panels/network/SignedExchangeInfoView.ts | label":{"message":"标签"},"panels/network/SignedExchangeInfoView.ts | learnmore":{"message":"了解详情"},"panels/network/SignedExchangeInfoView.ts | requestUrl":{"message":"请求网址"},"panels/network/SignedExchangeInfoView.ts | responseCode":{"message":"响应代码"},"panels/network/SignedExchangeInfoView.ts | responseHeaders":{"message":"响应标头"},"panels/network/SignedExchangeInfoView.ts | signature":{"message":"签名"},"panels/network/SignedExchangeInfoView.ts | signedHttpExchange":{"message":"Signed HTTP Exchange"},"panels/network/SignedExchangeInfoView.ts | subject":{"message":"主题"},"panels/network/SignedExchangeInfoView.ts | validFrom":{"message":"生效时间:"},"panels/network/SignedExchangeInfoView.ts | validUntil":{"message":"截止日期:"},"panels/network/SignedExchangeInfoView.ts | validityUrl":{"message":"有效性网址"},"panels/network/SignedExchangeInfoView.ts | viewCertificate":{"message":"查看证书"},"panels/network/components/HeaderSectionRow.ts | activeClientExperimentVariation":{"message":"活跃的client experiment variation IDs。"},"panels/network/components/HeaderSectionRow.ts | activeClientExperimentVariationIds":{"message":"触发服务器端行为的活跃client experiment variation IDs。"},"panels/network/components/HeaderSectionRow.ts | decoded":{"message":"已解码:"},"panels/network/components/HeaderSectionRow.ts | editHeader":{"message":"替换标头"},"panels/network/components/HeaderSectionRow.ts | headerNamesOnlyLetters":{"message":"标头名称只能包含字母、数字、连字符或下划线"},"panels/network/components/HeaderSectionRow.ts | learnMore":{"message":"了解详情"},"panels/network/components/HeaderSectionRow.ts | learnMoreInTheIssuesTab":{"message":"前往“问题”标签页了解详情"},"panels/network/components/HeaderSectionRow.ts | reloadPrompt":{"message":"刷新页面/请求即可使这些更改生效"},"panels/network/components/HeaderSectionRow.ts | removeOverride":{"message":"移除此标头替换值"},"panels/network/components/RequestHeaderSection.ts | learnMore":{"message":"了解详情"},"panels/network/components/RequestHeaderSection.ts | onlyProvisionalHeadersAre":{"message":"仅预配标头可用,因为此请求并非通过网络发送,而是从本地缓存提供,其中不会存储原始请求标头。停用缓存即可查看完整请求标头。"},"panels/network/components/RequestHeaderSection.ts | provisionalHeadersAreShown":{"message":"当前显示的是预配标头。"},"panels/network/components/RequestHeaderSection.ts | provisionalHeadersAreShownDisableCache":{"message":"当前显示的是预配标头。停用缓存即可查看完整标头。"},"panels/network/components/RequestHeadersView.ts | fromDiskCache":{"message":"(来自磁盘缓存)"},"panels/network/components/RequestHeadersView.ts | fromMemoryCache":{"message":"(来自内存缓存)"},"panels/network/components/RequestHeadersView.ts | fromPrefetchCache":{"message":"(来自预提取缓存)"},"panels/network/components/RequestHeadersView.ts | fromServiceWorker":{"message":"(来自 service worker)"},"panels/network/components/RequestHeadersView.ts | fromSignedexchange":{"message":"(来自 signed-exchange)"},"panels/network/components/RequestHeadersView.ts | fromWebBundle":{"message":"(来自 Web Bundle)"},"panels/network/components/RequestHeadersView.ts | general":{"message":"常规"},"panels/network/components/RequestHeadersView.ts | headerOverrides":{"message":"标头覆盖"},"panels/network/components/RequestHeadersView.ts | raw":{"message":"原始"},"panels/network/components/RequestHeadersView.ts | referrerPolicy":{"message":"引荐来源网址政策"},"panels/network/components/RequestHeadersView.ts | remoteAddress":{"message":"远程地址"},"panels/network/components/RequestHeadersView.ts | requestHeaders":{"message":"请求标头"},"panels/network/components/RequestHeadersView.ts | requestMethod":{"message":"请求方法"},"panels/network/components/RequestHeadersView.ts | requestUrl":{"message":"请求网址"},"panels/network/components/RequestHeadersView.ts | responseHeaders":{"message":"响应标头"},"panels/network/components/RequestHeadersView.ts | revealHeaderOverrides":{"message":"显示标头替换值定义"},"panels/network/components/RequestHeadersView.ts | showMore":{"message":"展开"},"panels/network/components/RequestHeadersView.ts | statusCode":{"message":"状态代码"},"panels/network/components/RequestTrustTokensView.ts | aClientprovidedArgumentWas":{"message":"客户端提供的参数格式不正确或无效。"},"panels/network/components/RequestTrustTokensView.ts | eitherNoInputsForThisOperation":{"message":"此操作没有任何可用输入,或者输出超过操作配额。"},"panels/network/components/RequestTrustTokensView.ts | failure":{"message":"失败"},"panels/network/components/RequestTrustTokensView.ts | issuer":{"message":"颁发者"},"panels/network/components/RequestTrustTokensView.ts | issuers":{"message":"颁发者"},"panels/network/components/RequestTrustTokensView.ts | numberOfIssuedTokens":{"message":"已颁发的令牌数量"},"panels/network/components/RequestTrustTokensView.ts | parameters":{"message":"参数"},"panels/network/components/RequestTrustTokensView.ts | refreshPolicy":{"message":"刷新政策"},"panels/network/components/RequestTrustTokensView.ts | result":{"message":"结果"},"panels/network/components/RequestTrustTokensView.ts | status":{"message":"状态"},"panels/network/components/RequestTrustTokensView.ts | success":{"message":"成功"},"panels/network/components/RequestTrustTokensView.ts | theOperationFailedForAnUnknown":{"message":"由于未知原因,此操作失败。"},"panels/network/components/RequestTrustTokensView.ts | theOperationWasFulfilledLocally":{"message":"操作在本地执行,未发送任何请求。"},"panels/network/components/RequestTrustTokensView.ts | theOperationsResultWasServedFrom":{"message":"操作结果由缓存提供。"},"panels/network/components/RequestTrustTokensView.ts | theServersResponseWasMalformedOr":{"message":"服务器响应格式不正确或无效。"},"panels/network/components/RequestTrustTokensView.ts | topLevelOrigin":{"message":"顶级来源"},"panels/network/components/RequestTrustTokensView.ts | type":{"message":"类型"},"panels/network/components/ResponseHeaderSection.ts | addHeader":{"message":"添加标头"},"panels/network/components/ResponseHeaderSection.ts | chooseThisOptionIfTheResourceAnd":{"message":"如果资源和文档由同一网站提供,请选择此选项。"},"panels/network/components/ResponseHeaderSection.ts | onlyChooseThisOptionIfAn":{"message":"仅当包括此资源在内的任意网站不会带来安全风险时,才可选择此选项。"},"panels/network/components/ResponseHeaderSection.ts | thisDocumentWasBlockedFrom":{"message":"此文档指定了跨源 opener 政策,因此被禁止在具有 sandbox 属性的 iframe 中加载。"},"panels/network/components/ResponseHeaderSection.ts | toEmbedThisFrameInYourDocument":{"message":"若要在您的文档中嵌入此框架,则需在响应中指定如下响应标头,以启用跨源嵌入器政策:"},"panels/network/components/ResponseHeaderSection.ts | toUseThisResourceFromADifferent":{"message":"为了从另一个源使用此资源,服务器需要在响应标头中指定跨源资源政策:"},"panels/network/components/ResponseHeaderSection.ts | toUseThisResourceFromADifferentOrigin":{"message":"为了从另一个源使用此资源,服务器可能会放宽对跨源资源政策响应标头的要求:"},"panels/network/components/ResponseHeaderSection.ts | toUseThisResourceFromADifferentSite":{"message":"为了从另一个网站使用此资源,服务器可能会放宽对跨源资源政策响应标头的要求:"},"panels/network/components/WebBundleInfoView.ts | bundledResource":{"message":"捆绑的资源"},"panels/network/network-meta.ts | clear":{"message":"清除网络日志"},"panels/network/network-meta.ts | colorCode":{"message":"颜色代码"},"panels/network/network-meta.ts | colorCodeByResourceType":{"message":"按资源类型划分的颜色代码"},"panels/network/network-meta.ts | colorcodeResourceTypes":{"message":"颜色代码资源类型"},"panels/network/network-meta.ts | diskCache":{"message":"磁盘缓存"},"panels/network/network-meta.ts | dontGroupNetworkLogItemsByFrame":{"message":"请勿按框架对网络日志内容分组"},"panels/network/network-meta.ts | frame":{"message":"框架"},"panels/network/network-meta.ts | group":{"message":"群组"},"panels/network/network-meta.ts | groupNetworkLogByFrame":{"message":"按框架对网络日志分组"},"panels/network/network-meta.ts | groupNetworkLogItemsByFrame":{"message":"按框架对网络日志内容进行分组"},"panels/network/network-meta.ts | hideRequestDetails":{"message":"隐藏请求详情"},"panels/network/network-meta.ts | netWork":{"message":"网络"},"panels/network/network-meta.ts | network":{"message":"网络"},"panels/network/network-meta.ts | networkConditions":{"message":"网络状况"},"panels/network/network-meta.ts | networkRequestBlocking":{"message":"网络请求屏蔽"},"panels/network/network-meta.ts | networkThrottling":{"message":"网络节流"},"panels/network/network-meta.ts | recordNetworkLog":{"message":"录制网络日志"},"panels/network/network-meta.ts | resourceType":{"message":"资源类型"},"panels/network/network-meta.ts | search":{"message":"搜索"},"panels/network/network-meta.ts | showNetwork":{"message":"显示“网络”工具"},"panels/network/network-meta.ts | showNetworkConditions":{"message":"显示“网络状况”"},"panels/network/network-meta.ts | showNetworkRequestBlocking":{"message":"显示“网络请求屏蔽”"},"panels/network/network-meta.ts | showSearch":{"message":"显示“搜索”工具"},"panels/network/network-meta.ts | stopRecordingNetworkLog":{"message":"停止录制网络日志"},"panels/network/network-meta.ts | useDefaultColors":{"message":"使用默认颜色"},"panels/performance_monitor/PerformanceMonitor.ts | cpuUsage":{"message":"CPU 使用情况"},"panels/performance_monitor/PerformanceMonitor.ts | documentFrames":{"message":"文档框架"},"panels/performance_monitor/PerformanceMonitor.ts | documents":{"message":"文档"},"panels/performance_monitor/PerformanceMonitor.ts | domNodes":{"message":"DOM 节点"},"panels/performance_monitor/PerformanceMonitor.ts | graphsDisplayingARealtimeViewOf":{"message":"显示实时性能指标视图的图表"},"panels/performance_monitor/PerformanceMonitor.ts | jsEventListeners":{"message":"JS 事件监听器"},"panels/performance_monitor/PerformanceMonitor.ts | jsHeapSize":{"message":"JS 堆大小"},"panels/performance_monitor/PerformanceMonitor.ts | layoutsSec":{"message":"布局个数/秒"},"panels/performance_monitor/PerformanceMonitor.ts | paused":{"message":"已暂停"},"panels/performance_monitor/PerformanceMonitor.ts | styleRecalcsSec":{"message":"样式重新计算次数/秒"},"panels/performance_monitor/performance_monitor-meta.ts | activity":{"message":"活动"},"panels/performance_monitor/performance_monitor-meta.ts | metrics":{"message":"指标"},"panels/performance_monitor/performance_monitor-meta.ts | monitor":{"message":"监视器"},"panels/performance_monitor/performance_monitor-meta.ts | performance":{"message":"性能"},"panels/performance_monitor/performance_monitor-meta.ts | performanceMonitor":{"message":"性能监视器"},"panels/performance_monitor/performance_monitor-meta.ts | showPerformanceMonitor":{"message":"显示“性能监视器”"},"panels/performance_monitor/performance_monitor-meta.ts | systemMonitor":{"message":"系统监视器"},"panels/profiler/CPUProfileView.ts | aggregatedSelfTime":{"message":"汇总的自身时间"},"panels/profiler/CPUProfileView.ts | aggregatedTotalTime":{"message":"累计总时间"},"panels/profiler/CPUProfileView.ts | cpuProfiles":{"message":"CPU 性能分析报告"},"panels/profiler/CPUProfileView.ts | cpuProfilesShow":{"message":"CPU 性能分析报告会显示网页的各项 JavaScript 函数所花费的执行时间。"},"panels/profiler/CPUProfileView.ts | fms":{"message":"{PH1} 毫秒"},"panels/profiler/CPUProfileView.ts | formatPercent":{"message":"{PH1}%"},"panels/profiler/CPUProfileView.ts | name":{"message":"名称"},"panels/profiler/CPUProfileView.ts | notOptimized":{"message":"未优化"},"panels/profiler/CPUProfileView.ts | recordJavascriptCpuProfile":{"message":"录制 JavaScript CPU 性能分析报告"},"panels/profiler/CPUProfileView.ts | recording":{"message":"正在录制…"},"panels/profiler/CPUProfileView.ts | selfTime":{"message":"自身耗时"},"panels/profiler/CPUProfileView.ts | startCpuProfiling":{"message":"开始 CPU 分析"},"panels/profiler/CPUProfileView.ts | stopCpuProfiling":{"message":"停止分析 CPU 性能"},"panels/profiler/CPUProfileView.ts | totalTime":{"message":"总时间"},"panels/profiler/CPUProfileView.ts | url":{"message":"网址"},"panels/profiler/HeapProfileView.ts | allocationSampling":{"message":"分配采样"},"panels/profiler/HeapProfileView.ts | formatPercent":{"message":"{PH1}%"},"panels/profiler/HeapProfileView.ts | heapProfilerIsRecording":{"message":"堆分析器正在记录"},"panels/profiler/HeapProfileView.ts | itProvidesGoodApproximation":{"message":"此工具能非常可靠地估计分配情况,并按 JavaScript 执行堆栈细分结果。"},"panels/profiler/HeapProfileView.ts | name":{"message":"名称"},"panels/profiler/HeapProfileView.ts | profileD":{"message":"性能分析报告 {PH1}"},"panels/profiler/HeapProfileView.ts | recordMemoryAllocations":{"message":"使用采样方法录制内存分配情况。"},"panels/profiler/HeapProfileView.ts | recording":{"message":"正在录制…"},"panels/profiler/HeapProfileView.ts | sBytes":{"message":"{PH1} 个字节"},"panels/profiler/HeapProfileView.ts | samplingProfiles":{"message":"抽样分析"},"panels/profiler/HeapProfileView.ts | selectedSizeS":{"message":"所选大小:{PH1}"},"panels/profiler/HeapProfileView.ts | selfSize":{"message":"自身大小"},"panels/profiler/HeapProfileView.ts | selfSizeBytes":{"message":"自身大小(以字节为单位)"},"panels/profiler/HeapProfileView.ts | skb":{"message":"{PH1} kB"},"panels/profiler/HeapProfileView.ts | startHeapProfiling":{"message":"开始堆分析"},"panels/profiler/HeapProfileView.ts | stopHeapProfiling":{"message":"停止堆性能分析"},"panels/profiler/HeapProfileView.ts | stopping":{"message":"正在停止…"},"panels/profiler/HeapProfileView.ts | thisProfileTypeHasMinimal":{"message":"此性能分析类型的性能开销最低,可用于长时间运行的操作。"},"panels/profiler/HeapProfileView.ts | totalSize":{"message":"总大小"},"panels/profiler/HeapProfileView.ts | totalSizeBytes":{"message":"总大小(字节)"},"panels/profiler/HeapProfileView.ts | url":{"message":"网址"},"panels/profiler/HeapProfilerPanel.ts | revealInSummaryView":{"message":"在“摘要”视图中显示"},"panels/profiler/HeapSnapshotDataGrids.ts | Deleted":{"message":"已删除 # 项"},"panels/profiler/HeapSnapshotDataGrids.ts | Delta":{"message":"# 增量"},"panels/profiler/HeapSnapshotDataGrids.ts | New":{"message":"新对象数"},"panels/profiler/HeapSnapshotDataGrids.ts | allocSize":{"message":"分配大小"},"panels/profiler/HeapSnapshotDataGrids.ts | allocation":{"message":"分配"},"panels/profiler/HeapSnapshotDataGrids.ts | constructorString":{"message":"构造函数"},"panels/profiler/HeapSnapshotDataGrids.ts | count":{"message":"计数"},"panels/profiler/HeapSnapshotDataGrids.ts | distance":{"message":"距离"},"panels/profiler/HeapSnapshotDataGrids.ts | distanceFromWindowObject":{"message":"与窗口对象的距离"},"panels/profiler/HeapSnapshotDataGrids.ts | freedSize":{"message":"已释放的大小"},"panels/profiler/HeapSnapshotDataGrids.ts | function":{"message":"函数"},"panels/profiler/HeapSnapshotDataGrids.ts | heapSnapshotConstructors":{"message":"堆快照构造函数"},"panels/profiler/HeapSnapshotDataGrids.ts | heapSnapshotDiff":{"message":"堆快照差异"},"panels/profiler/HeapSnapshotDataGrids.ts | heapSnapshotRetainment":{"message":"堆快照保留"},"panels/profiler/HeapSnapshotDataGrids.ts | liveCount":{"message":"实时计数"},"panels/profiler/HeapSnapshotDataGrids.ts | liveSize":{"message":"实时大小"},"panels/profiler/HeapSnapshotDataGrids.ts | object":{"message":"对象"},"panels/profiler/HeapSnapshotDataGrids.ts | retainedSize":{"message":"保留的大小"},"panels/profiler/HeapSnapshotDataGrids.ts | shallowSize":{"message":"浅层大小"},"panels/profiler/HeapSnapshotDataGrids.ts | size":{"message":"大小"},"panels/profiler/HeapSnapshotDataGrids.ts | sizeDelta":{"message":"大小增量"},"panels/profiler/HeapSnapshotDataGrids.ts | sizeOfTheObjectItselfInBytes":{"message":"对象本身的大小(以字节为单位)"},"panels/profiler/HeapSnapshotDataGrids.ts | sizeOfTheObjectPlusTheGraphIt":{"message":"对象加上其保留的图表的大小(以字节为单位)"},"panels/profiler/HeapSnapshotGridNodes.ts | detachedFromDomTree":{"message":"已从 DOM 树分离"},"panels/profiler/HeapSnapshotGridNodes.ts | genericStringsTwoPlaceholders":{"message":"{PH1}、{PH2}"},"panels/profiler/HeapSnapshotGridNodes.ts | inElement":{"message":"位于:"},"panels/profiler/HeapSnapshotGridNodes.ts | internalArray":{"message":"(内部数组)[]"},"panels/profiler/HeapSnapshotGridNodes.ts | previewIsNotAvailable":{"message":"无法预览"},"panels/profiler/HeapSnapshotGridNodes.ts | revealInSummaryView":{"message":"在“摘要”视图中显示"},"panels/profiler/HeapSnapshotGridNodes.ts | revealObjectSWithIdSInSummary":{"message":"在“摘要”视图中显示 ID 为 @{PH2} 的对象“{PH1}”"},"panels/profiler/HeapSnapshotGridNodes.ts | storeAsGlobalVariable":{"message":"存储为全局变量"},"panels/profiler/HeapSnapshotGridNodes.ts | summary":{"message":"摘要"},"panels/profiler/HeapSnapshotGridNodes.ts | userObjectReachableFromWindow":{"message":"可通过窗口访问的用户对象"},"panels/profiler/HeapSnapshotProxy.ts | anErrorOccurredWhenACallToMethod":{"message":"请求调用“{PH1}”方法时出错"},"panels/profiler/HeapSnapshotView.ts | AllocationTimelinesShowInstrumented":{"message":"分配时间轴显示了插桩的 JavaScript 内存分配随时间变化的情况。记录分析后,您可选择一个时间间隔,以查看已在其中分配且到录制结束时仍保持活跃状态的对象。使用此分析类型隔离内存泄漏。"},"panels/profiler/HeapSnapshotView.ts | allObjects":{"message":"所有对象"},"panels/profiler/HeapSnapshotView.ts | allocation":{"message":"分配"},"panels/profiler/HeapSnapshotView.ts | allocationInstrumentationOn":{"message":"时间轴上的分配插桩"},"panels/profiler/HeapSnapshotView.ts | allocationStack":{"message":"分配堆栈"},"panels/profiler/HeapSnapshotView.ts | allocationTimelines":{"message":"分配时间轴"},"panels/profiler/HeapSnapshotView.ts | baseSnapshot":{"message":"基础快照"},"panels/profiler/HeapSnapshotView.ts | captureNumericValue":{"message":"在快照中添加数字值"},"panels/profiler/HeapSnapshotView.ts | classFilter":{"message":"类过滤器"},"panels/profiler/HeapSnapshotView.ts | code":{"message":"代码"},"panels/profiler/HeapSnapshotView.ts | comparison":{"message":"比较"},"panels/profiler/HeapSnapshotView.ts | containment":{"message":"控制"},"panels/profiler/HeapSnapshotView.ts | exposeInternals":{"message":"公开内部设置(包括因实现而异的更多详情)"},"panels/profiler/HeapSnapshotView.ts | filter":{"message":"过滤"},"panels/profiler/HeapSnapshotView.ts | find":{"message":"查找"},"panels/profiler/HeapSnapshotView.ts | heapMemoryUsage":{"message":"堆内存用量"},"panels/profiler/HeapSnapshotView.ts | heapSnapshot":{"message":"堆快照"},"panels/profiler/HeapSnapshotView.ts | heapSnapshotProfilesShowMemory":{"message":"堆快照性能分析会显示您网页的 JavaScript 对象和相关 DOM 节点中的内存分配情况。"},"panels/profiler/HeapSnapshotView.ts | heapSnapshots":{"message":"堆快照"},"panels/profiler/HeapSnapshotView.ts | jsArrays":{"message":"JS 数组"},"panels/profiler/HeapSnapshotView.ts | liveObjects":{"message":"实时对象"},"panels/profiler/HeapSnapshotView.ts | loading":{"message":"正在加载…"},"panels/profiler/HeapSnapshotView.ts | objectsAllocatedBeforeS":{"message":"在{PH1} 之前分配的对象"},"panels/profiler/HeapSnapshotView.ts | objectsAllocatedBetweenSAndS":{"message":"在{PH1} 和{PH2} 之间分配的对象"},"panels/profiler/HeapSnapshotView.ts | percentagePlaceholder":{"message":"{PH1}%"},"panels/profiler/HeapSnapshotView.ts | perspective":{"message":"视角"},"panels/profiler/HeapSnapshotView.ts | recordAllocationStacksExtra":{"message":"录制各项分配的堆栈轨迹(会产生额外的性能开销)"},"panels/profiler/HeapSnapshotView.ts | recording":{"message":"正在录制…"},"panels/profiler/HeapSnapshotView.ts | retainers":{"message":"保留器"},"panels/profiler/HeapSnapshotView.ts | sKb":{"message":"{PH1} KB"},"panels/profiler/HeapSnapshotView.ts | savingD":{"message":"正在保存… {PH1}%"},"panels/profiler/HeapSnapshotView.ts | selectedSizeS":{"message":"所选大小:{PH1}"},"panels/profiler/HeapSnapshotView.ts | snapshotD":{"message":"快照 {PH1}"},"panels/profiler/HeapSnapshotView.ts | snapshotting":{"message":"正在拍摄快照…"},"panels/profiler/HeapSnapshotView.ts | stackWasNotRecordedForThisObject":{"message":"由于在开始录制这项性能分析之前已经分配了此对象,因此没有为此对象录制堆栈。"},"panels/profiler/HeapSnapshotView.ts | startRecordingHeapProfile":{"message":"开始录制堆分析情况"},"panels/profiler/HeapSnapshotView.ts | statistics":{"message":"统计信息"},"panels/profiler/HeapSnapshotView.ts | stopRecordingHeapProfile":{"message":"停止录制堆性能分析报告"},"panels/profiler/HeapSnapshotView.ts | strings":{"message":"字符串"},"panels/profiler/HeapSnapshotView.ts | summary":{"message":"摘要"},"panels/profiler/HeapSnapshotView.ts | systemObjects":{"message":"系统对象"},"panels/profiler/HeapSnapshotView.ts | takeHeapSnapshot":{"message":"拍摄堆快照"},"panels/profiler/HeapSnapshotView.ts | typedArrays":{"message":"类型化数组"},"panels/profiler/IsolateSelector.ts | changeRate":{"message":"{PH1}/s"},"panels/profiler/IsolateSelector.ts | decreasingBySPerSecond":{"message":"每秒降低 {PH1}"},"panels/profiler/IsolateSelector.ts | empty":{"message":"(空)"},"panels/profiler/IsolateSelector.ts | heapSizeChangeTrendOverTheLastS":{"message":"过去 {PH1} 分钟堆大小的变化趋势。"},"panels/profiler/IsolateSelector.ts | heapSizeInUseByLiveJsObjects":{"message":"已发布的 JS 对象所使用的堆大小。"},"panels/profiler/IsolateSelector.ts | increasingBySPerSecond":{"message":"正在按每秒 {PH1} 递增"},"panels/profiler/IsolateSelector.ts | javascriptVmInstances":{"message":"JavaScript 虚拟机实例"},"panels/profiler/IsolateSelector.ts | totalJsHeapSize":{"message":"JS 堆总大小"},"panels/profiler/IsolateSelector.ts | totalPageJsHeapSizeAcrossAllVm":{"message":"所有虚拟机实例的网页 JS 堆总大小。"},"panels/profiler/IsolateSelector.ts | totalPageJsHeapSizeChangeTrend":{"message":"过去 {PH1} 分钟总页面 JS 堆大小的变化趋势。"},"panels/profiler/LiveHeapProfileView.ts | allocatedJsHeapSizeCurrentlyIn":{"message":"当前正在使用的已分配 JS 堆的大小"},"panels/profiler/LiveHeapProfileView.ts | anonymousScriptS":{"message":"(匿名脚本 {PH1})"},"panels/profiler/LiveHeapProfileView.ts | heapProfile":{"message":"堆性能分析报告"},"panels/profiler/LiveHeapProfileView.ts | jsHeap":{"message":"JS 堆"},"panels/profiler/LiveHeapProfileView.ts | kb":{"message":"kB"},"panels/profiler/LiveHeapProfileView.ts | numberOfVmsSharingTheSameScript":{"message":"共用同一脚本来源的虚拟机数量"},"panels/profiler/LiveHeapProfileView.ts | scriptUrl":{"message":"脚本网址"},"panels/profiler/LiveHeapProfileView.ts | urlOfTheScriptSource":{"message":"脚本来源的网址"},"panels/profiler/LiveHeapProfileView.ts | vms":{"message":"虚拟机"},"panels/profiler/ModuleUIStrings.ts | buildingAllocationStatistics":{"message":"正在建立分配统计信息…"},"panels/profiler/ModuleUIStrings.ts | buildingDominatedNodes":{"message":"正在构建支配节点…"},"panels/profiler/ModuleUIStrings.ts | buildingDominatorTree":{"message":"正在生成支配项树…"},"panels/profiler/ModuleUIStrings.ts | buildingEdgeIndexes":{"message":"正在建立边缘索引…"},"panels/profiler/ModuleUIStrings.ts | buildingLocations":{"message":"正在建立位置…"},"panels/profiler/ModuleUIStrings.ts | buildingPostorderIndex":{"message":"正在构建后序索引…"},"panels/profiler/ModuleUIStrings.ts | buildingRetainers":{"message":"正在构建保留器…"},"panels/profiler/ModuleUIStrings.ts | calculatingDistances":{"message":"正在计算距离…"},"panels/profiler/ModuleUIStrings.ts | calculatingNodeFlags":{"message":"正在计算节点标记…"},"panels/profiler/ModuleUIStrings.ts | calculatingRetainedSizes":{"message":"正在计算保留的大小…"},"panels/profiler/ModuleUIStrings.ts | calculatingSamples":{"message":"正在计算样本…"},"panels/profiler/ModuleUIStrings.ts | calculatingStatistics":{"message":"正在计算统计值…"},"panels/profiler/ModuleUIStrings.ts | done":{"message":"完成"},"panels/profiler/ModuleUIStrings.ts | finishedProcessing":{"message":"处理已完成。"},"panels/profiler/ModuleUIStrings.ts | loadingAllocationTracesD":{"message":"正在加载分配跟踪记录…{PH1}%"},"panels/profiler/ModuleUIStrings.ts | loadingEdgesD":{"message":"正在加载边缘… {PH1}%"},"panels/profiler/ModuleUIStrings.ts | loadingLocations":{"message":"正在加载位置…"},"panels/profiler/ModuleUIStrings.ts | loadingNodesD":{"message":"正在加载节点… {PH1}%"},"panels/profiler/ModuleUIStrings.ts | loadingSamples":{"message":"正在加载示例…"},"panels/profiler/ModuleUIStrings.ts | loadingSnapshotInfo":{"message":"正在加载快照信息…"},"panels/profiler/ModuleUIStrings.ts | loadingStrings":{"message":"正在加载字符串…"},"panels/profiler/ModuleUIStrings.ts | parsingStrings":{"message":"正在解析字符串…"},"panels/profiler/ModuleUIStrings.ts | processingSnapshot":{"message":"正在处理快照…"},"panels/profiler/ModuleUIStrings.ts | propagatingDomState":{"message":"正在传播 DOM 状态…"},"panels/profiler/ProfileDataGrid.ts | genericTextTwoPlaceholders":{"message":"{PH1}、{PH2}"},"panels/profiler/ProfileDataGrid.ts | notOptimizedS":{"message":"未优化:{PH1}"},"panels/profiler/ProfileLauncherView.ts | load":{"message":"加载"},"panels/profiler/ProfileLauncherView.ts | selectJavascriptVmInstance":{"message":"选择 JavaScript 虚拟机实例"},"panels/profiler/ProfileLauncherView.ts | selectProfilingType":{"message":"选择性能分析类型"},"panels/profiler/ProfileLauncherView.ts | start":{"message":"开始"},"panels/profiler/ProfileLauncherView.ts | stop":{"message":"停止"},"panels/profiler/ProfileLauncherView.ts | takeSnapshot":{"message":"拍摄快照"},"panels/profiler/ProfileSidebarTreeElement.ts | delete":{"message":"删除"},"panels/profiler/ProfileSidebarTreeElement.ts | load":{"message":"加载…"},"panels/profiler/ProfileSidebarTreeElement.ts | save":{"message":"保存"},"panels/profiler/ProfileSidebarTreeElement.ts | saveWithEllipsis":{"message":"保存…"},"panels/profiler/ProfileView.ts | chart":{"message":"图表"},"panels/profiler/ProfileView.ts | excludeSelectedFunction":{"message":"排除所选函数"},"panels/profiler/ProfileView.ts | failedToReadFile":{"message":"无法读取文件"},"panels/profiler/ProfileView.ts | fileSReadErrorS":{"message":"文件“{PH1}”读取错误:{PH2}"},"panels/profiler/ProfileView.ts | findByCostMsNameOrFile":{"message":"按所用时间(大于 50 毫秒)、名称或文件查找"},"panels/profiler/ProfileView.ts | focusSelectedFunction":{"message":"聚焦所选函数"},"panels/profiler/ProfileView.ts | function":{"message":"函数"},"panels/profiler/ProfileView.ts | heavyBottomUp":{"message":"大量(自下而上)"},"panels/profiler/ProfileView.ts | loaded":{"message":"已加载"},"panels/profiler/ProfileView.ts | loading":{"message":"正在加载…"},"panels/profiler/ProfileView.ts | loadingD":{"message":"正在加载…{PH1}%"},"panels/profiler/ProfileView.ts | parsing":{"message":"正在解析…"},"panels/profiler/ProfileView.ts | profile":{"message":"性能分析"},"panels/profiler/ProfileView.ts | profileD":{"message":"性能分析报告 {PH1}"},"panels/profiler/ProfileView.ts | profileViewMode":{"message":"性能分析报告视图模式"},"panels/profiler/ProfileView.ts | profiler":{"message":"分析器"},"panels/profiler/ProfileView.ts | restoreAllFunctions":{"message":"恢复所有函数"},"panels/profiler/ProfileView.ts | treeTopDown":{"message":"树(自顶向下)"},"panels/profiler/ProfilesPanel.ts | cantLoadFileSupportedFile":{"message":"无法加载文件。支持的文件扩展名:{PH1}。"},"panels/profiler/ProfilesPanel.ts | cantLoadProfileWhileAnother":{"message":"无法加载这项分析,因为系统正在记录另一项分析"},"panels/profiler/ProfilesPanel.ts | clearAllProfiles":{"message":"清除所有性能分析数据"},"panels/profiler/ProfilesPanel.ts | deprecationWarnMsg":{"message":"在即将发布的版本中,此面板会被弃用。请改用“性能”面板记录 JavaScript CPU 性能分析报告。"},"panels/profiler/ProfilesPanel.ts | enableThisPanelTemporarily":{"message":"暂时启用此面板"},"panels/profiler/ProfilesPanel.ts | feedback":{"message":"反馈"},"panels/profiler/ProfilesPanel.ts | goToPerformancePanel":{"message":"前往“性能”面板"},"panels/profiler/ProfilesPanel.ts | learnMore":{"message":"了解详情"},"panels/profiler/ProfilesPanel.ts | load":{"message":"加载…"},"panels/profiler/ProfilesPanel.ts | profileLoadingFailedS":{"message":"性能分析报告加载失败:{PH1}。"},"panels/profiler/ProfilesPanel.ts | profiles":{"message":"性能分析"},"panels/profiler/ProfilesPanel.ts | runD":{"message":"运行 {PH1}"},"panels/profiler/profiler-meta.ts | liveHeapProfile":{"message":"实时堆性能分析报告"},"panels/profiler/profiler-meta.ts | memory":{"message":"内存"},"panels/profiler/profiler-meta.ts | showLiveHeapProfile":{"message":"显示实时堆分析"},"panels/profiler/profiler-meta.ts | showMemory":{"message":"显示内存"},"panels/profiler/profiler-meta.ts | showNativeFunctions":{"message":"在 JS 性能分析报告中显示原生函数"},"panels/profiler/profiler-meta.ts | startRecordingHeapAllocations":{"message":"开始录制堆分配量"},"panels/profiler/profiler-meta.ts | startRecordingHeapAllocationsAndReload":{"message":"开始录制堆分配量,并重新加载网页"},"panels/profiler/profiler-meta.ts | startStopRecording":{"message":"开始/停止录制"},"panels/profiler/profiler-meta.ts | stopRecordingHeapAllocations":{"message":"停止记录堆分配"},"panels/protocol_monitor/ProtocolMonitor.ts | clearAll":{"message":"全部清除"},"panels/protocol_monitor/ProtocolMonitor.ts | documentation":{"message":"文档"},"panels/protocol_monitor/ProtocolMonitor.ts | elapsedTime":{"message":"用时"},"panels/protocol_monitor/ProtocolMonitor.ts | filter":{"message":"过滤"},"panels/protocol_monitor/ProtocolMonitor.ts | method":{"message":"方法"},"panels/protocol_monitor/ProtocolMonitor.ts | noMessageSelected":{"message":"未选择任何消息"},"panels/protocol_monitor/ProtocolMonitor.ts | record":{"message":"录制"},"panels/protocol_monitor/ProtocolMonitor.ts | request":{"message":"请求"},"panels/protocol_monitor/ProtocolMonitor.ts | response":{"message":"响应"},"panels/protocol_monitor/ProtocolMonitor.ts | sMs":{"message":"{PH1} 毫秒"},"panels/protocol_monitor/ProtocolMonitor.ts | save":{"message":"保存"},"panels/protocol_monitor/ProtocolMonitor.ts | selectTarget":{"message":"选择一个目标"},"panels/protocol_monitor/ProtocolMonitor.ts | sendRawCDPCommand":{"message":"发送原始 CDP 命令"},"panels/protocol_monitor/ProtocolMonitor.ts | sendRawCDPCommandExplanation":{"message":"格式:'Domain.commandName' 表示不带参数的命令,也可将 '{\"command\":\"Domain.commandName\", \"parameters\": {...}}' 作为一个 JSON 对象表示带有参数的命令。系统还支持将 'cmd'/'method' 和 'args'/'params'/'arguments' 用作 JSON 对象的替代键。"},"panels/protocol_monitor/ProtocolMonitor.ts | session":{"message":"会话"},"panels/protocol_monitor/ProtocolMonitor.ts | target":{"message":"目标"},"panels/protocol_monitor/ProtocolMonitor.ts | timestamp":{"message":"时间戳"},"panels/protocol_monitor/ProtocolMonitor.ts | type":{"message":"类型"},"panels/protocol_monitor/protocol_monitor-meta.ts | protocolMonitor":{"message":"协议监视器"},"panels/protocol_monitor/protocol_monitor-meta.ts | showProtocolMonitor":{"message":"显示协议监视器"},"panels/recorder/RecorderController.ts | continueReplay":{"message":"继续"},"panels/recorder/RecorderController.ts | copyShortcut":{"message":"复制录制内容或所选步骤"},"panels/recorder/RecorderController.ts | createRecording":{"message":"创建新录制"},"panels/recorder/RecorderController.ts | deleteRecording":{"message":"删除录制内容"},"panels/recorder/RecorderController.ts | export":{"message":"导出"},"panels/recorder/RecorderController.ts | exportRecording":{"message":"导出"},"panels/recorder/RecorderController.ts | exportViaExtensions":{"message":"通过扩展程序导出"},"panels/recorder/RecorderController.ts | getExtensions":{"message":"获取扩展程序…"},"panels/recorder/RecorderController.ts | importRecording":{"message":"导入录制内容"},"panels/recorder/RecorderController.ts | replayRecording":{"message":"重放录制的内容"},"panels/recorder/RecorderController.ts | sendFeedback":{"message":"发送反馈"},"panels/recorder/RecorderController.ts | startStopRecording":{"message":"开始/停止录制"},"panels/recorder/RecorderController.ts | stepOverReplay":{"message":"执行 1 步"},"panels/recorder/RecorderController.ts | toggleCode":{"message":"切换代码视图"},"panels/recorder/components/CreateRecordingView.ts | cancelRecording":{"message":"取消录制"},"panels/recorder/components/CreateRecordingView.ts | createRecording":{"message":"创建新录制"},"panels/recorder/components/CreateRecordingView.ts | includeNecessarySelectors":{"message":"您必须选择 CSS、Pierce 或 XPath 作为您的选项之一。仅这些选择器保证会被记录,因为 ARIA 和文本选择器未必是独一无二的。"},"panels/recorder/components/CreateRecordingView.ts | recordingName":{"message":"录制内容名称"},"panels/recorder/components/CreateRecordingView.ts | recordingNameIsRequired":{"message":"必须输入录制内容名称"},"panels/recorder/components/CreateRecordingView.ts | selectorAttribute":{"message":"选择器属性"},"panels/recorder/components/CreateRecordingView.ts | selectorTypeARIA":{"message":"ARIA"},"panels/recorder/components/CreateRecordingView.ts | selectorTypeCSS":{"message":"CSS"},"panels/recorder/components/CreateRecordingView.ts | selectorTypePierce":{"message":"Pierce"},"panels/recorder/components/CreateRecordingView.ts | selectorTypeText":{"message":"文本"},"panels/recorder/components/CreateRecordingView.ts | selectorTypeXPath":{"message":"XPath"},"panels/recorder/components/CreateRecordingView.ts | selectorTypes":{"message":"记录时要使用的选择器类型"},"panels/recorder/components/CreateRecordingView.ts | startRecording":{"message":"开始录制"},"panels/recorder/components/ExtensionView.ts | closeView":{"message":"关闭"},"panels/recorder/components/ExtensionView.ts | extension":{"message":"内容由某款浏览器扩展程序提供"},"panels/recorder/components/RecordingListView.ts | createRecording":{"message":"创建新录制"},"panels/recorder/components/RecordingListView.ts | deleteRecording":{"message":"删除录制内容"},"panels/recorder/components/RecordingListView.ts | openRecording":{"message":"打开录制内容"},"panels/recorder/components/RecordingListView.ts | playRecording":{"message":"播放录制内容"},"panels/recorder/components/RecordingListView.ts | savedRecordings":{"message":"已保存的录制内容"},"panels/recorder/components/RecordingView.ts | addAssertion":{"message":"添加断言"},"panels/recorder/components/RecordingView.ts | cancelReplay":{"message":"取消重放"},"panels/recorder/components/RecordingView.ts | default":{"message":"默认"},"panels/recorder/components/RecordingView.ts | desktop":{"message":"桌面设备"},"panels/recorder/components/RecordingView.ts | download":{"message":"下载速度:{value}"},"panels/recorder/components/RecordingView.ts | editReplaySettings":{"message":"修改重放设置"},"panels/recorder/components/RecordingView.ts | editTitle":{"message":"修改标题"},"panels/recorder/components/RecordingView.ts | endRecording":{"message":"结束录制"},"panels/recorder/components/RecordingView.ts | environment":{"message":"环境"},"panels/recorder/components/RecordingView.ts | hideCode":{"message":"隐藏代码"},"panels/recorder/components/RecordingView.ts | latency":{"message":"延迟时间:{value} 毫秒"},"panels/recorder/components/RecordingView.ts | mobile":{"message":"移动设备"},"panels/recorder/components/RecordingView.ts | network":{"message":"网络"},"panels/recorder/components/RecordingView.ts | performancePanel":{"message":"性能面板"},"panels/recorder/components/RecordingView.ts | recording":{"message":"正在录制…"},"panels/recorder/components/RecordingView.ts | recordingIsBeingStopped":{"message":"正在停止录制…"},"panels/recorder/components/RecordingView.ts | replaySettings":{"message":"重放设置"},"panels/recorder/components/RecordingView.ts | requiredTitleError":{"message":"必须输入标题"},"panels/recorder/components/RecordingView.ts | screenshotForSection":{"message":"此部分的屏幕截图"},"panels/recorder/components/RecordingView.ts | showCode":{"message":"显示代码"},"panels/recorder/components/RecordingView.ts | timeout":{"message":"超时时限:{value} 毫秒"},"panels/recorder/components/RecordingView.ts | timeoutExplanation":{"message":"超时设置(以毫秒为单位)适用于重放录制内容时的每项操作。例如,如果 CSS 选择器标识的 DOM 元素未在指定超时时间内显示在网页上,重放会失败并返回错误。"},"panels/recorder/components/RecordingView.ts | timeoutLabel":{"message":"超时时限"},"panels/recorder/components/RecordingView.ts | upload":{"message":"上传速度:{value}"},"panels/recorder/components/ReplayButton.ts | ReplayExtremelySlowButtonLabel":{"message":"以极慢的速度重放"},"panels/recorder/components/ReplayButton.ts | ReplayExtremelySlowItemLabel":{"message":"极慢"},"panels/recorder/components/ReplayButton.ts | ReplayNormalButtonLabel":{"message":"重放"},"panels/recorder/components/ReplayButton.ts | ReplayNormalItemLabel":{"message":"正常(默认)"},"panels/recorder/components/ReplayButton.ts | ReplaySlowButtonLabel":{"message":"慢速重放"},"panels/recorder/components/ReplayButton.ts | ReplaySlowItemLabel":{"message":"慢"},"panels/recorder/components/ReplayButton.ts | ReplayVerySlowButtonLabel":{"message":"以非常慢的速度重放"},"panels/recorder/components/ReplayButton.ts | ReplayVerySlowItemLabel":{"message":"非常慢"},"panels/recorder/components/ReplayButton.ts | extensionGroup":{"message":"扩展程序"},"panels/recorder/components/ReplayButton.ts | speedGroup":{"message":"速度"},"panels/recorder/components/StartView.ts | createRecording":{"message":"创建新录制"},"panels/recorder/components/StartView.ts | header":{"message":"衡量整个用户体验历程中的性能"},"panels/recorder/components/StartView.ts | quickStart":{"message":"快速入门:了解开发者工具中新增的“记录器”面板"},"panels/recorder/components/StartView.ts | step1":{"message":"录制您的网站或应用中常见的用户体验历程"},"panels/recorder/components/StartView.ts | step2":{"message":"重放录制内容以检查流程能否正常运行"},"panels/recorder/components/StartView.ts | step3":{"message":"生成详细的性能跟踪记录或者导出 Puppeteer 脚本以用于测试"},"panels/recorder/components/StepEditor.ts | addAttribute":{"message":"添加{attributeName}"},"panels/recorder/components/StepEditor.ts | addFrameIndex":{"message":"在框架树内添加框架索引"},"panels/recorder/components/StepEditor.ts | addSelector":{"message":"添加选择器"},"panels/recorder/components/StepEditor.ts | addSelectorPart":{"message":"添加选择器的一个部分"},"panels/recorder/components/StepEditor.ts | deleteRow":{"message":"删除行"},"panels/recorder/components/StepEditor.ts | notSaved":{"message":"未保存:{error}"},"panels/recorder/components/StepEditor.ts | removeFrameIndex":{"message":"移除框架索引"},"panels/recorder/components/StepEditor.ts | removeSelector":{"message":"移除选择器"},"panels/recorder/components/StepEditor.ts | removeSelectorPart":{"message":"移除选择器的一个部分"},"panels/recorder/components/StepEditor.ts | selectorPicker":{"message":"选择网页中的某个元素即可更新选择器"},"panels/recorder/components/StepEditor.ts | unknownActionType":{"message":"操作类型不明。"},"panels/recorder/components/StepView.ts | addBreakpoint":{"message":"添加断点"},"panels/recorder/components/StepView.ts | addStepAfter":{"message":"在此后添加步骤"},"panels/recorder/components/StepView.ts | addStepBefore":{"message":"在此前添加步骤"},"panels/recorder/components/StepView.ts | breakpoints":{"message":"断点"},"panels/recorder/components/StepView.ts | changeStepTitle":{"message":"更改"},"panels/recorder/components/StepView.ts | clickStepTitle":{"message":"点击"},"panels/recorder/components/StepView.ts | closeStepTitle":{"message":"关闭"},"panels/recorder/components/StepView.ts | copyAs":{"message":"复制为以下格式"},"panels/recorder/components/StepView.ts | customStepTitle":{"message":"自定义步骤"},"panels/recorder/components/StepView.ts | doubleClickStepTitle":{"message":"双击"},"panels/recorder/components/StepView.ts | elementRoleButton":{"message":"按钮"},"panels/recorder/components/StepView.ts | elementRoleFallback":{"message":"元素"},"panels/recorder/components/StepView.ts | elementRoleInput":{"message":"输入"},"panels/recorder/components/StepView.ts | emulateNetworkConditionsStepTitle":{"message":"模拟网络状况"},"panels/recorder/components/StepView.ts | hoverStepTitle":{"message":"悬停"},"panels/recorder/components/StepView.ts | keyDownStepTitle":{"message":"按下按键"},"panels/recorder/components/StepView.ts | keyUpStepTitle":{"message":"释放按键"},"panels/recorder/components/StepView.ts | navigateStepTitle":{"message":"导航"},"panels/recorder/components/StepView.ts | openStepActions":{"message":"打开步骤操作"},"panels/recorder/components/StepView.ts | removeBreakpoint":{"message":"移除断点"},"panels/recorder/components/StepView.ts | removeStep":{"message":"移除步骤"},"panels/recorder/components/StepView.ts | scrollStepTitle":{"message":"滚动"},"panels/recorder/components/StepView.ts | setViewportClickTitle":{"message":"设置视口"},"panels/recorder/components/StepView.ts | stepManagement":{"message":"管理步骤"},"panels/recorder/components/StepView.ts | waitForElementStepTitle":{"message":"等待元素"},"panels/recorder/components/StepView.ts | waitForExpressionStepTitle":{"message":"等待表达式"},"panels/recorder/models/RecorderSettings.ts | defaultRecordingName":{"message":"{DATE} {TIME} 录制的内容"},"panels/recorder/recorder-meta.ts | createRecording":{"message":"创建新录制"},"panels/recorder/recorder-meta.ts | recorder":{"message":"记录器"},"panels/recorder/recorder-meta.ts | replayRecording":{"message":"重放录制的内容"},"panels/recorder/recorder-meta.ts | showRecorder":{"message":"显示记录器"},"panels/recorder/recorder-meta.ts | startStopRecording":{"message":"开始/停止录制"},"panels/recorder/recorder-meta.ts | toggleCode":{"message":"切换代码视图"},"panels/screencast/ScreencastApp.ts | toggleScreencast":{"message":"开启/关闭抓屏功能"},"panels/screencast/ScreencastView.ts | addressBar":{"message":"地址栏"},"panels/screencast/ScreencastView.ts | back":{"message":"返回"},"panels/screencast/ScreencastView.ts | forward":{"message":"前进"},"panels/screencast/ScreencastView.ts | profilingInProgress":{"message":"正在进行性能分析"},"panels/screencast/ScreencastView.ts | reload":{"message":"重新加载"},"panels/screencast/ScreencastView.ts | screencastViewOfDebugTarget":{"message":"调试目标的抓屏视图"},"panels/screencast/ScreencastView.ts | theTabIsInactive":{"message":"此标签页不活跃"},"panels/search/SearchResultsPane.ts | lineS":{"message":"第 {PH1} 行"},"panels/search/SearchResultsPane.ts | matchesCountS":{"message":"匹配项计数 {PH1}"},"panels/search/SearchResultsPane.ts | showDMore":{"message":"再显示 {PH1} 项"},"panels/search/SearchView.ts | clear":{"message":"清除"},"panels/search/SearchView.ts | foundDMatchingLinesInDFiles":{"message":"在 {PH2} 个文件中找到 {PH1} 个匹配行。"},"panels/search/SearchView.ts | foundDMatchingLinesInFile":{"message":"在 1 个文件中找到了 {PH1} 个匹配行。"},"panels/search/SearchView.ts | foundMatchingLineInFile":{"message":"在 1 个文件中找到了 1 个匹配行。"},"panels/search/SearchView.ts | indexing":{"message":"正在编入索引…"},"panels/search/SearchView.ts | indexingInterrupted":{"message":"索引编制已中断。"},"panels/search/SearchView.ts | matchCase":{"message":"匹配大小写"},"panels/search/SearchView.ts | noMatchesFound":{"message":"未找到匹配项。"},"panels/search/SearchView.ts | refresh":{"message":"刷新"},"panels/search/SearchView.ts | search":{"message":"搜索"},"panels/search/SearchView.ts | searchFinished":{"message":"搜索已完成。"},"panels/search/SearchView.ts | searchInterrupted":{"message":"搜索已中断。"},"panels/search/SearchView.ts | searchQuery":{"message":"搜索查询"},"panels/search/SearchView.ts | searching":{"message":"正在搜索…"},"panels/search/SearchView.ts | useRegularExpression":{"message":"使用正则表达式"},"panels/security/SecurityModel.ts | cipherWithMAC":{"message":"包含 {PH2} 的 {PH1}"},"panels/security/SecurityModel.ts | keyExchangeWithGroup":{"message":"密钥交换分组模式为 {PH2} 的 {PH1}"},"panels/security/SecurityModel.ts | theSecurityOfThisPageIsUnknown":{"message":"此网页的安全性不明。"},"panels/security/SecurityModel.ts | thisPageIsNotSecure":{"message":"这是一个不安全的网页。"},"panels/security/SecurityModel.ts | thisPageIsNotSecureBrokenHttps":{"message":"这是一个不安全的网页(HTTPS 已遭破坏)。"},"panels/security/SecurityModel.ts | thisPageIsSecureValidHttps":{"message":"这是一个安全的网页(HTTPS 有效)。"},"panels/security/SecurityPanel.ts | activeContentWithCertificate":{"message":"包含证书错误的有效内容"},"panels/security/SecurityPanel.ts | activeMixedContent":{"message":"主动型混合内容"},"panels/security/SecurityPanel.ts | allResourcesOnThisPageAreServed":{"message":"此网页上的所有资源均以安全方式提供。"},"panels/security/SecurityPanel.ts | allServedSecurely":{"message":"所有资源均以安全方式提供"},"panels/security/SecurityPanel.ts | blockedMixedContent":{"message":"被屏蔽的混合内容"},"panels/security/SecurityPanel.ts | certificate":{"message":"证书"},"panels/security/SecurityPanel.ts | certificateExpiresSoon":{"message":"证书即将过期"},"panels/security/SecurityPanel.ts | certificateTransparency":{"message":"证书透明度"},"panels/security/SecurityPanel.ts | chromeHasDeterminedThatThisSiteS":{"message":"Chrome 已确定此网站可能是虚假网站或欺诈性网站。"},"panels/security/SecurityPanel.ts | cipher":{"message":"加密算法"},"panels/security/SecurityPanel.ts | connection":{"message":"网络连接"},"panels/security/SecurityPanel.ts | contentWithCertificateErrors":{"message":"具有证书错误的内容"},"panels/security/SecurityPanel.ts | enabled":{"message":"已启用"},"panels/security/SecurityPanel.ts | encryptedClientHello":{"message":"已加密的 ClientHello"},"panels/security/SecurityPanel.ts | flaggedByGoogleSafeBrowsing":{"message":"已被 Google 安全浏览标记"},"panels/security/SecurityPanel.ts | hashAlgorithm":{"message":"哈希算法"},"panels/security/SecurityPanel.ts | hideFullDetails":{"message":"隐藏完整的详细信息"},"panels/security/SecurityPanel.ts | ifYouBelieveThisIsShownIn":{"message":"如果您认为系统不该向您显示这条提示,请访问 https://g.co/chrome/lookalike-warnings。"},"panels/security/SecurityPanel.ts | ifYouBelieveThisIsShownInErrorSafety":{"message":"如果您认为系统不该向您显示这条提示,请访问 https://g.co/chrome/lookalike-warnings。"},"panels/security/SecurityPanel.ts | info":{"message":"信息"},"panels/security/SecurityPanel.ts | insecureSha":{"message":"不安全 (SHA-1)"},"panels/security/SecurityPanel.ts | issuedAt":{"message":"颁发时间"},"panels/security/SecurityPanel.ts | issuer":{"message":"颁发者"},"panels/security/SecurityPanel.ts | keyExchange":{"message":"密钥交换"},"panels/security/SecurityPanel.ts | logId":{"message":"日志 ID"},"panels/security/SecurityPanel.ts | logName":{"message":"日志名称"},"panels/security/SecurityPanel.ts | mainOrigin":{"message":"主要来源"},"panels/security/SecurityPanel.ts | mainOriginNonsecure":{"message":"主要来源(非安全来源)"},"panels/security/SecurityPanel.ts | mainOriginSecure":{"message":"主要来源(安全)"},"panels/security/SecurityPanel.ts | missing":{"message":"缺失"},"panels/security/SecurityPanel.ts | mixedContent":{"message":"混合内容"},"panels/security/SecurityPanel.ts | na":{"message":"(不适用)"},"panels/security/SecurityPanel.ts | noSecurityDetailsAreAvailableFor":{"message":"没有此来源的任何安全详情。"},"panels/security/SecurityPanel.ts | noSecurityInformation":{"message":"无安全信息"},"panels/security/SecurityPanel.ts | nonsecureForm":{"message":"不安全的表单"},"panels/security/SecurityPanel.ts | nonsecureOrigins":{"message":"不安全的来源"},"panels/security/SecurityPanel.ts | notSecure":{"message":"不安全"},"panels/security/SecurityPanel.ts | notSecureBroken":{"message":"不安全(已损坏)"},"panels/security/SecurityPanel.ts | obsoleteConnectionSettings":{"message":"过时的连接设置"},"panels/security/SecurityPanel.ts | openFullCertificateDetails":{"message":"打开完整的证书详情"},"panels/security/SecurityPanel.ts | origin":{"message":"来源"},"panels/security/SecurityPanel.ts | overview":{"message":"概览"},"panels/security/SecurityPanel.ts | possibleSpoofingUrl":{"message":"可能是仿冒网址"},"panels/security/SecurityPanel.ts | protocol":{"message":"协议"},"panels/security/SecurityPanel.ts | publickeypinningBypassed":{"message":"已绕过 Public-Key-Pinning"},"panels/security/SecurityPanel.ts | publickeypinningWasBypassedByA":{"message":"本地根证书绕过了 Public-Key-Pinning。"},"panels/security/SecurityPanel.ts | reloadThePageToRecordRequestsFor":{"message":"重新加载网页,以录制针对 HTTP 资源的请求。"},"panels/security/SecurityPanel.ts | reloadToViewDetails":{"message":"重新加载即可查看详情"},"panels/security/SecurityPanel.ts | resources":{"message":"资源"},"panels/security/SecurityPanel.ts | rsaKeyExchangeIsObsoleteEnableAn":{"message":"RSA 密钥交换已过时。请启用基于 ECDHE 的加密套件。"},"panels/security/SecurityPanel.ts | sIsObsoleteEnableAnAesgcmbased":{"message":"{PH1} 已过时。请启用基于 AES-GCM 的加密套件。"},"panels/security/SecurityPanel.ts | sIsObsoleteEnableTlsOrLater":{"message":"{PH1} 已过时。请启用 TLS 1.2 或更高版本。"},"panels/security/SecurityPanel.ts | sct":{"message":"SCT"},"panels/security/SecurityPanel.ts | secure":{"message":"安全"},"panels/security/SecurityPanel.ts | secureConnectionSettings":{"message":"安全连接设置"},"panels/security/SecurityPanel.ts | secureOrigins":{"message":"安全的来源"},"panels/security/SecurityPanel.ts | securityOverview":{"message":"安全性概览"},"panels/security/SecurityPanel.ts | serverSignature":{"message":"服务器签名"},"panels/security/SecurityPanel.ts | showFullDetails":{"message":"显示完整详情"},"panels/security/SecurityPanel.ts | showLess":{"message":"收起"},"panels/security/SecurityPanel.ts | showMoreSTotal":{"message":"展开(共 {PH1} 个)"},"panels/security/SecurityPanel.ts | signatureAlgorithm":{"message":"签名算法"},"panels/security/SecurityPanel.ts | signatureData":{"message":"签名数据"},"panels/security/SecurityPanel.ts | source":{"message":"来源"},"panels/security/SecurityPanel.ts | subject":{"message":"主题"},"panels/security/SecurityPanel.ts | subjectAlternativeNameMissing":{"message":"缺少 Subject Alternative Name"},"panels/security/SecurityPanel.ts | theCertificateChainForThisSite":{"message":"此网站的证书链包含使用 SHA-1 签署的证书。"},"panels/security/SecurityPanel.ts | theCertificateForThisSiteDoesNot":{"message":"此网站的证书不包含任何内含域名或 IP 地址的 Subject Alternative Name 扩展项。"},"panels/security/SecurityPanel.ts | theCertificateForThisSiteExpires":{"message":"此网站的证书将在 48 小时内过期,因此需要更新。"},"panels/security/SecurityPanel.ts | theConnectionToThisSiteIs":{"message":"与此网站的连接已使用 {PH1}、{PH2} 和 {PH3} 进行加密和身份验证。"},"panels/security/SecurityPanel.ts | theConnectionToThisSiteIsUsingA":{"message":"与此网站的连接使用的是 {PH1} 颁发的可信且有效的服务器证书。"},"panels/security/SecurityPanel.ts | theSecurityDetailsAboveAreFrom":{"message":"上方的安全详情来自首个已检查的响应。"},"panels/security/SecurityPanel.ts | theServerSignatureUsesShaWhichIs":{"message":"服务器签名使用的是过时的 SHA-1。请启用 SHA-2 签名算法。(请注意,这不同于证书中的签名。)"},"panels/security/SecurityPanel.ts | thisIsAnErrorPage":{"message":"这是一个错误网页。"},"panels/security/SecurityPanel.ts | thisOriginIsANonhttpsSecure":{"message":"此来源是非 HTTPS 安全来源。"},"panels/security/SecurityPanel.ts | thisPageHasANonhttpsSecureOrigin":{"message":"此网页拥有非 HTTPS 来源。"},"panels/security/SecurityPanel.ts | thisPageIncludesAFormWithA":{"message":"该网页中有一个包含不安全的“action”属性的表单。"},"panels/security/SecurityPanel.ts | thisPageIncludesHttpResources":{"message":"此网页包含 HTTP 资源。"},"panels/security/SecurityPanel.ts | thisPageIncludesResourcesThat":{"message":"此网页包含加载后出现证书错误的资源。"},"panels/security/SecurityPanel.ts | thisPageIsDangerousFlaggedBy":{"message":"这是一个危险网页(已被 Google 安全浏览功能做了标记)。"},"panels/security/SecurityPanel.ts | thisPageIsInsecureUnencrypted":{"message":"这是一个不安全的网页(未加密的 HTTP)。"},"panels/security/SecurityPanel.ts | thisPageIsSuspicious":{"message":"此网页可疑"},"panels/security/SecurityPanel.ts | thisPageIsSuspiciousFlaggedBy":{"message":"此网页可疑(已被 Chrome 标记)。"},"panels/security/SecurityPanel.ts | thisRequestCompliesWithChromes":{"message":"此请求符合 Chrome 的证书透明度政策。"},"panels/security/SecurityPanel.ts | thisRequestDoesNotComplyWith":{"message":"此请求不符合 Chrome 的证书透明度政策。"},"panels/security/SecurityPanel.ts | thisResponseWasLoadedFromCache":{"message":"此响应是从缓存加载的。可能缺少一些安全性详细信息。"},"panels/security/SecurityPanel.ts | thisSiteIsMissingAValidTrusted":{"message":"此网站缺少可信且有效的证书 ({PH1})。"},"panels/security/SecurityPanel.ts | thisSitesHostnameLooksSimilarToP":{"message":"此网站的主机名看起来和 {PH1} 很相似。攻击者有时会通过对域名进行一些细微变更来仿冒网站,这样的变更通常很难被发现。"},"panels/security/SecurityPanel.ts | toCheckThisPagesStatusVisit":{"message":"如需查看此网页的状态,请访问 g.co/safebrowsingstatus。"},"panels/security/SecurityPanel.ts | unknownCanceled":{"message":"未知/已取消"},"panels/security/SecurityPanel.ts | unknownField":{"message":"未知"},"panels/security/SecurityPanel.ts | validAndTrusted":{"message":"有效且可信"},"panels/security/SecurityPanel.ts | validFrom":{"message":"生效时间:"},"panels/security/SecurityPanel.ts | validUntil":{"message":"截止日期:"},"panels/security/SecurityPanel.ts | validationStatus":{"message":"验证状态"},"panels/security/SecurityPanel.ts | viewCertificate":{"message":"查看证书"},"panels/security/SecurityPanel.ts | viewDRequestsInNetworkPanel":{"message":"{n,plural, =1{查看“网络”面板中的 # 个请求}other{查看“网络”面板中的 # 个请求}}"},"panels/security/SecurityPanel.ts | viewRequestsInNetworkPanel":{"message":"在“网络”面板中查看请求"},"panels/security/SecurityPanel.ts | youHaveRecentlyAllowedContent":{"message":"您最近已允许在此网站上运行已加载但有证书错误的内容(如脚本或 iframe)。"},"panels/security/SecurityPanel.ts | youHaveRecentlyAllowedNonsecure":{"message":"您最近曾允许在此网站上运行非安全内容(如脚本或 iframe)。"},"panels/security/SecurityPanel.ts | yourConnectionToThisOriginIsNot":{"message":"您与此来源之间的连接不安全。"},"panels/security/SecurityPanel.ts | yourPageRequestedNonsecure":{"message":"您的网页请求了被屏蔽的非安全资源。"},"panels/security/security-meta.ts | security":{"message":"安全"},"panels/security/security-meta.ts | showSecurity":{"message":"显示“安全”面板"},"panels/sensors/LocationsSettingsTab.ts | addLocation":{"message":"添加位置…"},"panels/sensors/LocationsSettingsTab.ts | customLocations":{"message":"自定义位置"},"panels/sensors/LocationsSettingsTab.ts | lat":{"message":"纬度"},"panels/sensors/LocationsSettingsTab.ts | latitude":{"message":"纬度"},"panels/sensors/LocationsSettingsTab.ts | latitudeMustBeANumber":{"message":"纬度必须是数字"},"panels/sensors/LocationsSettingsTab.ts | latitudeMustBeGreaterThanOrEqual":{"message":"纬度必须大于或等于 {PH1}"},"panels/sensors/LocationsSettingsTab.ts | latitudeMustBeLessThanOrEqualToS":{"message":"纬度必须小于或等于 {PH1}"},"panels/sensors/LocationsSettingsTab.ts | locale":{"message":"语言区域"},"panels/sensors/LocationsSettingsTab.ts | localeMustContainAlphabetic":{"message":"语言区域必须包含字母字符"},"panels/sensors/LocationsSettingsTab.ts | locationName":{"message":"位置名称"},"panels/sensors/LocationsSettingsTab.ts | locationNameCannotBeEmpty":{"message":"位置名称不得为空"},"panels/sensors/LocationsSettingsTab.ts | locationNameMustBeLessThanS":{"message":"位置名称必须少于 {PH1} 个字符"},"panels/sensors/LocationsSettingsTab.ts | long":{"message":"经度"},"panels/sensors/LocationsSettingsTab.ts | longitude":{"message":"经度"},"panels/sensors/LocationsSettingsTab.ts | longitudeMustBeANumber":{"message":"经度必须是数字"},"panels/sensors/LocationsSettingsTab.ts | longitudeMustBeGreaterThanOr":{"message":"经度必须大于或等于 {PH1}"},"panels/sensors/LocationsSettingsTab.ts | longitudeMustBeLessThanOrEqualTo":{"message":"经度必须小于或等于 {PH1}"},"panels/sensors/LocationsSettingsTab.ts | timezoneId":{"message":"时区 ID"},"panels/sensors/LocationsSettingsTab.ts | timezoneIdMustContainAlphabetic":{"message":"时区 ID 必须包含字母字符"},"panels/sensors/SensorsView.ts | adjustWithMousewheelOrUpdownKeys":{"message":"使用鼠标滚轮或向上/向下键进行调整。{PH1}:±10、Shift:±1、Alt:±0.01"},"panels/sensors/SensorsView.ts | alpha":{"message":"α (Alpha)"},"panels/sensors/SensorsView.ts | beta":{"message":"β (Beta)"},"panels/sensors/SensorsView.ts | customOrientation":{"message":"自定义屏幕方向"},"panels/sensors/SensorsView.ts | deviceOrientationSetToAlphaSBeta":{"message":"设备屏幕方向已设为 Alpha:{PH1},Beta:{PH2},Gamma:{PH3}"},"panels/sensors/SensorsView.ts | displayDown":{"message":"屏幕向下"},"panels/sensors/SensorsView.ts | displayUp":{"message":"屏幕向上"},"panels/sensors/SensorsView.ts | enableOrientationToRotate":{"message":"允许旋转屏幕方向"},"panels/sensors/SensorsView.ts | error":{"message":"错误"},"panels/sensors/SensorsView.ts | forcesSelectedIdleStateEmulation":{"message":"强制模拟所选空闲状态"},"panels/sensors/SensorsView.ts | forcesTouchInsteadOfClick":{"message":"只能轻触,不能点击"},"panels/sensors/SensorsView.ts | gamma":{"message":"γ (Gamma)"},"panels/sensors/SensorsView.ts | landscapeLeft":{"message":"横向(向左)"},"panels/sensors/SensorsView.ts | landscapeRight":{"message":"横向(向右)"},"panels/sensors/SensorsView.ts | latitude":{"message":"纬度"},"panels/sensors/SensorsView.ts | locale":{"message":"语言区域"},"panels/sensors/SensorsView.ts | location":{"message":"位置"},"panels/sensors/SensorsView.ts | locationUnavailable":{"message":"无法获取位置信息"},"panels/sensors/SensorsView.ts | longitude":{"message":"经度"},"panels/sensors/SensorsView.ts | manage":{"message":"管理"},"panels/sensors/SensorsView.ts | manageTheListOfLocations":{"message":"管理位置列表"},"panels/sensors/SensorsView.ts | noOverride":{"message":"禁止替换"},"panels/sensors/SensorsView.ts | off":{"message":"停用"},"panels/sensors/SensorsView.ts | orientation":{"message":"屏幕方向"},"panels/sensors/SensorsView.ts | other":{"message":"其他…"},"panels/sensors/SensorsView.ts | overrides":{"message":"替换"},"panels/sensors/SensorsView.ts | portrait":{"message":"纵向"},"panels/sensors/SensorsView.ts | portraitUpsideDown":{"message":"纵向(上下颠倒)"},"panels/sensors/SensorsView.ts | presets":{"message":"预设"},"panels/sensors/SensorsView.ts | reset":{"message":"重置"},"panels/sensors/SensorsView.ts | resetDeviceOrientation":{"message":"重置设备屏幕方向"},"panels/sensors/SensorsView.ts | shiftdragHorizontallyToRotate":{"message":"按 Shift 键并横向拖动即可绕 y 轴旋转"},"panels/sensors/SensorsView.ts | timezoneId":{"message":"时区 ID"},"panels/sensors/sensors-meta.ts | accelerometer":{"message":"加速度计"},"panels/sensors/sensors-meta.ts | deviceOrientation":{"message":"设备屏幕方向"},"panels/sensors/sensors-meta.ts | devicebased":{"message":"基于设备"},"panels/sensors/sensors-meta.ts | emulateIdleDetectorState":{"message":"模拟空闲检测器状态"},"panels/sensors/sensors-meta.ts | forceEnabled":{"message":"已强制启用"},"panels/sensors/sensors-meta.ts | geolocation":{"message":"地理定位"},"panels/sensors/sensors-meta.ts | locale":{"message":"语言区域"},"panels/sensors/sensors-meta.ts | locales":{"message":"语言区域"},"panels/sensors/sensors-meta.ts | locations":{"message":"位置"},"panels/sensors/sensors-meta.ts | noIdleEmulation":{"message":"无空闲模拟"},"panels/sensors/sensors-meta.ts | sensors":{"message":"传感器"},"panels/sensors/sensors-meta.ts | showLocations":{"message":"显示位置"},"panels/sensors/sensors-meta.ts | showSensors":{"message":"显示“传感器”工具"},"panels/sensors/sensors-meta.ts | timezones":{"message":"时区"},"panels/sensors/sensors-meta.ts | touch":{"message":"轻触"},"panels/sensors/sensors-meta.ts | userActiveScreenLocked":{"message":"用户处于活跃状态,屏幕已锁定"},"panels/sensors/sensors-meta.ts | userActiveScreenUnlocked":{"message":"用户处于活跃状态,屏幕已解锁"},"panels/sensors/sensors-meta.ts | userIdleScreenLocked":{"message":"用户处于空闲状态,屏幕已锁定"},"panels/sensors/sensors-meta.ts | userIdleScreenUnlocked":{"message":"用户处于空闲状态,屏幕已解锁"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | addFilenamePattern":{"message":"添加文件名模式"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | addPattern":{"message":"添加格式…"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | automaticallyIgnoreListKnownThirdPartyScripts":{"message":"来源映射中的已知第三方脚本"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | customExclusionRules":{"message":"自定义排除规则:"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | debuggerWillSkipThroughThe":{"message":"调试程序将快速浏览脚本,且不会在遇到脚本抛出的异常时停止。"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | enableIgnoreListing":{"message":"启用忽略清单"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | enableIgnoreListingTooltip":{"message":"取消选中即可停用所有忽略清单"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | frameworkIgnoreList":{"message":"框架忽略列表"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | generalExclusionRules":{"message":"一般排除规则:"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | ignoreListContentScripts":{"message":"由扩展程序注入的内容脚本"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | ignoreScriptsWhoseNamesMatchS":{"message":"忽略名称与“{PH1}”匹配的脚本"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | learnMore":{"message":"了解详情"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | pattern":{"message":"添加模式"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | patternAlreadyExists":{"message":"模式已存在"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | patternCannotBeEmpty":{"message":"模式不能为空"},"panels/settings/FrameworkIgnoreListSettingsTab.ts | patternMustBeAValidRegular":{"message":"模式必须是有效的正则表达式"},"panels/settings/KeybindsSettingsTab.ts | FullListOfDevtoolsKeyboard":{"message":"DevTools 键盘快捷键和手势的完整列表"},"panels/settings/KeybindsSettingsTab.ts | ResetShortcutsForAction":{"message":"重置操作的快捷键"},"panels/settings/KeybindsSettingsTab.ts | RestoreDefaultShortcuts":{"message":"恢复默认快捷键"},"panels/settings/KeybindsSettingsTab.ts | addAShortcut":{"message":"添加快捷方式"},"panels/settings/KeybindsSettingsTab.ts | confirmChanges":{"message":"确认更改"},"panels/settings/KeybindsSettingsTab.ts | discardChanges":{"message":"舍弃更改"},"panels/settings/KeybindsSettingsTab.ts | editShortcut":{"message":"修改快捷方式"},"panels/settings/KeybindsSettingsTab.ts | keyboardShortcutsList":{"message":"键盘快捷键列表"},"panels/settings/KeybindsSettingsTab.ts | matchShortcutsFromPreset":{"message":"与预设中的快捷键匹配"},"panels/settings/KeybindsSettingsTab.ts | noShortcutForAction":{"message":"操作未设置快捷键"},"panels/settings/KeybindsSettingsTab.ts | removeShortcut":{"message":"移除快捷键"},"panels/settings/KeybindsSettingsTab.ts | shortcutModified":{"message":"快捷方式已修改"},"panels/settings/KeybindsSettingsTab.ts | shortcuts":{"message":"快捷键"},"panels/settings/KeybindsSettingsTab.ts | shortcutsCannotContainOnly":{"message":"快捷键不能只包含辅助键。"},"panels/settings/KeybindsSettingsTab.ts | thisShortcutIsInUseByS":{"message":"{PH1}正在使用此快捷键:{PH2}。"},"panels/settings/SettingsScreen.ts | experiments":{"message":"实验"},"panels/settings/SettingsScreen.ts | filterExperimentsLabel":{"message":"过滤"},"panels/settings/SettingsScreen.ts | learnMore":{"message":"了解详情"},"panels/settings/SettingsScreen.ts | noResults":{"message":"没有符合过滤条件的实验"},"panels/settings/SettingsScreen.ts | oneOrMoreSettingsHaveChanged":{"message":"一项或多项设置已更改,需要重新加载才能生效。"},"panels/settings/SettingsScreen.ts | preferences":{"message":"偏好设置"},"panels/settings/SettingsScreen.ts | restoreDefaultsAndReload":{"message":"恢复默认值并重新加载"},"panels/settings/SettingsScreen.ts | sendFeedback":{"message":"发送反馈"},"panels/settings/SettingsScreen.ts | settings":{"message":"设置"},"panels/settings/SettingsScreen.ts | shortcuts":{"message":"快捷键"},"panels/settings/SettingsScreen.ts | theseExperimentsAreParticularly":{"message":"这些实验尤其不稳定。您需要自行承担启用后所产生的风险。"},"panels/settings/SettingsScreen.ts | theseExperimentsCouldBeUnstable":{"message":"这些实验可能不稳定或不可靠,因此可能需要您重启 DevTools。"},"panels/settings/SettingsScreen.ts | warning":{"message":"警告:"},"panels/settings/components/SyncSection.ts | preferencesSyncDisabled":{"message":"若要开启此设置,您必须先在 Chrome 中启用设置同步。"},"panels/settings/components/SyncSection.ts | settings":{"message":"转到“设置”"},"panels/settings/components/SyncSection.ts | signedIn":{"message":"登录 Chrome 时使用的帐号:"},"panels/settings/components/SyncSection.ts | syncDisabled":{"message":"若要开启此设置,您必须先启用 Chrome 同步。"},"panels/settings/emulation/DevicesSettingsTab.ts | addCustomDevice":{"message":"添加自定义设备…"},"panels/settings/emulation/DevicesSettingsTab.ts | device":{"message":"设备"},"panels/settings/emulation/DevicesSettingsTab.ts | deviceAddedOrUpdated":{"message":"已成功添加/更新设备“{PH1}”。"},"panels/settings/emulation/DevicesSettingsTab.ts | deviceName":{"message":"设备名称"},"panels/settings/emulation/DevicesSettingsTab.ts | deviceNameCannotBeEmpty":{"message":"设备名称不得为空。"},"panels/settings/emulation/DevicesSettingsTab.ts | deviceNameMustBeLessThanS":{"message":"设备名称必须少于 {PH1} 个字符。"},"panels/settings/emulation/DevicesSettingsTab.ts | devicePixelRatio":{"message":"设备像素比"},"panels/settings/emulation/DevicesSettingsTab.ts | emulatedDevices":{"message":"模拟的设备"},"panels/settings/emulation/DevicesSettingsTab.ts | height":{"message":"高度"},"panels/settings/emulation/DevicesSettingsTab.ts | userAgentString":{"message":"用户代理字符串"},"panels/settings/emulation/DevicesSettingsTab.ts | userAgentType":{"message":"用户代理类型"},"panels/settings/emulation/DevicesSettingsTab.ts | width":{"message":"宽度"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | addBrand":{"message":"添加品牌"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | addedBrand":{"message":"已添加品牌行"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | architecture":{"message":"架构 (Sec-CH-UA-Arch)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | architecturePlaceholder":{"message":"架构(例如 x86)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | brandFullVersionListDelete":{"message":"从完整版本列表中删除品牌"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | brandName":{"message":"品牌"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | brandNameAriaLabel":{"message":"品牌 {PH1}"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | brandProperties":{"message":"用户代理属性"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | brandUserAgentDelete":{"message":"从“用户代理”部分中删除品牌"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | brandVersionAriaLabel":{"message":"版本 {PH1}"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | brandVersionPlaceholder":{"message":"版本(例如 87.0.4280.88)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | deletedBrand":{"message":"已删除品牌行"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | deviceModel":{"message":"设备型号 (Sec-CH-UA-Model)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | deviceProperties":{"message":"设备属性"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | fullBrowserVersion":{"message":"完整的浏览器版本 (Sec-CH-UA-Full-Browser-Version)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | fullBrowserVersionPlaceholder":{"message":"完整的浏览器版本号(例如 87.0.4280.88)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | fullVersionList":{"message":"完整版本列表 (Sec-CH-UA-Full-Version-List)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | learnMore":{"message":"了解详情"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | mobileCheckboxLabel":{"message":"手机"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | notRepresentable":{"message":"无法显示为结构化标头字符串。"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | platformLabel":{"message":"平台 (Sec-CH-UA-Platform/Sec-CH-UA-Platform-Version)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | platformPlaceholder":{"message":"平台(例如 Android)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | platformProperties":{"message":"平台属性"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | platformVersion":{"message":"平台版本"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | significantBrandVersionPlaceholder":{"message":"重大版本(例如 87)"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | title":{"message":"用户代理客户端提示"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | update":{"message":"更新"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | userAgentClientHintsInfo":{"message":"用户代理客户端提示是用户代理字符串的替代文字,能以结构更完善的方式识别浏览器和设备,同时提供更好的隐私保护。"},"panels/settings/emulation/components/UserAgentClientHintsForm.ts | useragent":{"message":"用户代理 (Sec-CH-UA)"},"panels/settings/emulation/emulation-meta.ts | devices":{"message":"设备"},"panels/settings/emulation/emulation-meta.ts | showDevices":{"message":"显示设备"},"panels/settings/settings-meta.ts | documentation":{"message":"文档"},"panels/settings/settings-meta.ts | experiments":{"message":"实验"},"panels/settings/settings-meta.ts | ignoreList":{"message":"忽略列表"},"panels/settings/settings-meta.ts | preferences":{"message":"偏好设置"},"panels/settings/settings-meta.ts | settings":{"message":"设置"},"panels/settings/settings-meta.ts | shortcuts":{"message":"快捷键"},"panels/settings/settings-meta.ts | showExperiments":{"message":"显示实验"},"panels/settings/settings-meta.ts | showIgnoreList":{"message":"显示“忽略列表”"},"panels/settings/settings-meta.ts | showPreferences":{"message":"显示偏好设置"},"panels/settings/settings-meta.ts | showShortcuts":{"message":"显示快捷键"},"panels/snippets/ScriptSnippetFileSystem.ts | linkedTo":{"message":"已链接到 {PH1}"},"panels/snippets/ScriptSnippetFileSystem.ts | scriptSnippet":{"message":"脚本代码段 #{PH1}"},"panels/snippets/SnippetsQuickOpen.ts | noSnippetsFound":{"message":"找不到任何代码段。"},"panels/snippets/SnippetsQuickOpen.ts | run":{"message":"运行"},"panels/snippets/SnippetsQuickOpen.ts | snippet":{"message":"代码段"},"panels/sources/AddSourceMapURLDialog.ts | add":{"message":"添加"},"panels/sources/AddSourceMapURLDialog.ts | debugInfoUrl":{"message":"DWARF 符号网址: "},"panels/sources/AddSourceMapURLDialog.ts | sourceMapUrl":{"message":"来源映射网址:"},"panels/sources/BreakpointEditDialog.ts | breakpoint":{"message":"断点"},"panels/sources/BreakpointEditDialog.ts | breakpointType":{"message":"断点类型"},"panels/sources/BreakpointEditDialog.ts | closeDialog":{"message":"关闭修改对话框并保存更改"},"panels/sources/BreakpointEditDialog.ts | conditionalBreakpoint":{"message":"条件断点"},"panels/sources/BreakpointEditDialog.ts | expressionToCheckBeforePausingEg":{"message":"在暂停之前要检查的表达式,例如 x > 5"},"panels/sources/BreakpointEditDialog.ts | learnMoreOnBreakpointTypes":{"message":"了解详情:断点类型"},"panels/sources/BreakpointEditDialog.ts | logAMessageToConsoleDoNotBreak":{"message":"将消息记录到控制台,不要中断"},"panels/sources/BreakpointEditDialog.ts | logMessageEgXIsX":{"message":"记录消息,例如:'x is', x"},"panels/sources/BreakpointEditDialog.ts | logpoint":{"message":"日志点"},"panels/sources/BreakpointEditDialog.ts | pauseOnlyWhenTheConditionIsTrue":{"message":"仅在条件为 true 时暂停"},"panels/sources/CSSPlugin.ts | openColorPicker":{"message":"打开颜色选择器。"},"panels/sources/CSSPlugin.ts | openCubicBezierEditor":{"message":"打开三次贝塞尔曲线编辑器。"},"panels/sources/CallStackSidebarPane.ts | callFrameWarnings":{"message":"某些调用帧包含警告"},"panels/sources/CallStackSidebarPane.ts | callStack":{"message":"调用堆栈"},"panels/sources/CallStackSidebarPane.ts | copyStackTrace":{"message":"复制堆栈轨迹"},"panels/sources/CallStackSidebarPane.ts | debugFileNotFound":{"message":"未能加载调试文件“{PH1}”。"},"panels/sources/CallStackSidebarPane.ts | notPaused":{"message":"未暂停"},"panels/sources/CallStackSidebarPane.ts | onIgnoreList":{"message":"在忽略列表中"},"panels/sources/CallStackSidebarPane.ts | restartFrame":{"message":"重启帧"},"panels/sources/CallStackSidebarPane.ts | showIgnorelistedFrames":{"message":"显示已列入忽略列表的帧"},"panels/sources/CallStackSidebarPane.ts | showMore":{"message":"展开"},"panels/sources/CoveragePlugin.ts | clickToShowCoveragePanel":{"message":"点击即可显示“覆盖率”面板"},"panels/sources/CoveragePlugin.ts | coverageNa":{"message":"覆盖率:不适用"},"panels/sources/CoveragePlugin.ts | coverageS":{"message":"覆盖率:{PH1}"},"panels/sources/CoveragePlugin.ts | showDetails":{"message":"显示详细信息"},"panels/sources/DebuggerPausedMessage.ts | attributeModifications":{"message":"属性修改"},"panels/sources/DebuggerPausedMessage.ts | childSAdded":{"message":"已添加子{PH1}"},"panels/sources/DebuggerPausedMessage.ts | debuggerPaused":{"message":"调试程序已暂停"},"panels/sources/DebuggerPausedMessage.ts | descendantSAdded":{"message":"添加了后代{PH1}"},"panels/sources/DebuggerPausedMessage.ts | descendantSRemoved":{"message":"后代{PH1}已移除"},"panels/sources/DebuggerPausedMessage.ts | nodeRemoval":{"message":"移除节点"},"panels/sources/DebuggerPausedMessage.ts | pausedBeforePotentialOutofmemory":{"message":"在内存不足可能导致崩溃之前已暂停"},"panels/sources/DebuggerPausedMessage.ts | pausedOnAssertion":{"message":"已在断言部分暂停"},"panels/sources/DebuggerPausedMessage.ts | pausedOnBreakpoint":{"message":"已在断点暂停"},"panels/sources/DebuggerPausedMessage.ts | pausedOnCspViolation":{"message":"已在违反 CSP 时暂停"},"panels/sources/DebuggerPausedMessage.ts | pausedOnDebuggedFunction":{"message":"已在已调试的函数上暂停"},"panels/sources/DebuggerPausedMessage.ts | pausedOnEventListener":{"message":"已在事件监听器中暂停"},"panels/sources/DebuggerPausedMessage.ts | pausedOnException":{"message":"已在遇到异常时暂停"},"panels/sources/DebuggerPausedMessage.ts | pausedOnPromiseRejection":{"message":"已在 promise 遭拒时暂停"},"panels/sources/DebuggerPausedMessage.ts | pausedOnS":{"message":"已在{PH1}暂停"},"panels/sources/DebuggerPausedMessage.ts | pausedOnXhrOrFetch":{"message":"已在 XHR 或 fetch 中暂停"},"panels/sources/DebuggerPausedMessage.ts | subtreeModifications":{"message":"子树修改"},"panels/sources/DebuggerPausedMessage.ts | trustedTypePolicyViolation":{"message":"Trusted Type - 违反政策"},"panels/sources/DebuggerPausedMessage.ts | trustedTypeSinkViolation":{"message":"Trusted Type - 接收器违规行为"},"panels/sources/DebuggerPlugin.ts | addBreakpoint":{"message":"添加断点"},"panels/sources/DebuggerPlugin.ts | addConditionalBreakpoint":{"message":"添加条件断点…"},"panels/sources/DebuggerPlugin.ts | addLogpoint":{"message":"添加日志点…"},"panels/sources/DebuggerPlugin.ts | addSourceMap":{"message":"添加来源映射…"},"panels/sources/DebuggerPlugin.ts | addWasmDebugInfo":{"message":"添加 DWARF 调试信息…"},"panels/sources/DebuggerPlugin.ts | associatedFilesAreAvailable":{"message":"相关文件可通过文件树或按相应的组合键 ({PH1}) 获取。"},"panels/sources/DebuggerPlugin.ts | associatedFilesShouldBeAdded":{"message":"应将相关文件添加到文件树。您可以将这些已解析的源文件作为常规 JavaScript 文件进行调试。"},"panels/sources/DebuggerPlugin.ts | configure":{"message":"配置"},"panels/sources/DebuggerPlugin.ts | debugFileNotFound":{"message":"未能加载调试文件“{PH1}”。"},"panels/sources/DebuggerPlugin.ts | debugInfoNotFound":{"message":"未能加载“{PH1}”的任何调试信息。"},"panels/sources/DebuggerPlugin.ts | disableBreakpoint":{"message":"{n,plural, =1{停用断点}other{停用行内所有断点}}"},"panels/sources/DebuggerPlugin.ts | editBreakpoint":{"message":"修改断点…"},"panels/sources/DebuggerPlugin.ts | enableBreakpoint":{"message":"{n,plural, =1{启用断点}other{启用行内所有断点}}"},"panels/sources/DebuggerPlugin.ts | neverPauseHere":{"message":"一律不在此处暂停"},"panels/sources/DebuggerPlugin.ts | removeBreakpoint":{"message":"{n,plural, =1{移除 1 个断点}other{移除行内所有断点}}"},"panels/sources/DebuggerPlugin.ts | removeFromIgnoreList":{"message":"从忽略列表中移除"},"panels/sources/DebuggerPlugin.ts | sourceMapDetected":{"message":"已检测到来源映射。"},"panels/sources/DebuggerPlugin.ts | sourceMapFoundButIgnoredForFile":{"message":"来源映射已找到,但对于忽略列表中的文件而言已忽略。"},"panels/sources/DebuggerPlugin.ts | theDebuggerWillSkipStepping":{"message":"调试程序将跳过逐步执行此脚本的过程,且不会在遇到异常时停止。"},"panels/sources/DebuggerPlugin.ts | thisScriptIsOnTheDebuggersIgnore":{"message":"此脚本位于调试程序的忽略列表中"},"panels/sources/FilteredUISourceCodeListProvider.ts | noFilesFound":{"message":"找不到任何文件"},"panels/sources/FilteredUISourceCodeListProvider.ts | sIgnoreListed":{"message":"{PH1}(位于忽略列表中)"},"panels/sources/GoToLineQuickOpen.ts | currentLineSTypeALineNumber":{"message":"当前行:{PH1}。输入介于 1 和 {PH2} 之间的行号即可转到相应行。"},"panels/sources/GoToLineQuickOpen.ts | currentPositionXsTypeAnOffset":{"message":"当前位置:0x{PH1}。输入介于 0x{PH2} 和 0x{PH3} 之间的偏移值,即可转到相应位置。"},"panels/sources/GoToLineQuickOpen.ts | goToLineS":{"message":"转到第 {PH1} 行。"},"panels/sources/GoToLineQuickOpen.ts | goToLineSAndColumnS":{"message":"转到第 {PH1} 行第 {PH2} 列。"},"panels/sources/GoToLineQuickOpen.ts | goToOffsetXs":{"message":"转到偏移值 0x{PH1}。"},"panels/sources/GoToLineQuickOpen.ts | noFileSelected":{"message":"未选择任何文件。"},"panels/sources/GoToLineQuickOpen.ts | noResultsFound":{"message":"未找到任何结果"},"panels/sources/GoToLineQuickOpen.ts | typeANumberToGoToThatLine":{"message":"输入数字即可前往相应的行。"},"panels/sources/InplaceFormatterEditorAction.ts | format":{"message":"格式"},"panels/sources/InplaceFormatterEditorAction.ts | formatS":{"message":"格式化“{PH1}”"},"panels/sources/NavigatorView.ts | areYouSureYouWantToDeleteAll":{"message":"确定要删除此文件夹中包含的所有替换项吗?"},"panels/sources/NavigatorView.ts | areYouSureYouWantToDeleteThis":{"message":"确定要删除此文件吗?"},"panels/sources/NavigatorView.ts | areYouSureYouWantToExcludeThis":{"message":"确定要排除此文件夹吗?"},"panels/sources/NavigatorView.ts | areYouSureYouWantToRemoveThis":{"message":"确定要移除此文件夹吗?"},"panels/sources/NavigatorView.ts | authored":{"message":"已编写"},"panels/sources/NavigatorView.ts | authoredTooltip":{"message":"包含原始来源"},"panels/sources/NavigatorView.ts | delete":{"message":"删除"},"panels/sources/NavigatorView.ts | deleteAllOverrides":{"message":"删除所有替换项"},"panels/sources/NavigatorView.ts | deployed":{"message":"已部署"},"panels/sources/NavigatorView.ts | deployedTooltip":{"message":"包含浏览器检测到的最终来源"},"panels/sources/NavigatorView.ts | excludeFolder":{"message":"排除文件夹"},"panels/sources/NavigatorView.ts | makeACopy":{"message":"制作副本…"},"panels/sources/NavigatorView.ts | newFile":{"message":"新文件"},"panels/sources/NavigatorView.ts | noDomain":{"message":"(无网域)"},"panels/sources/NavigatorView.ts | openFolder":{"message":"打开文件夹"},"panels/sources/NavigatorView.ts | removeFolderFromWorkspace":{"message":"从工作区中移除文件夹"},"panels/sources/NavigatorView.ts | rename":{"message":"重命名…"},"panels/sources/NavigatorView.ts | sFromSourceMap":{"message":"{PH1}(来自来源映射)"},"panels/sources/NavigatorView.ts | sIgnoreListed":{"message":"{PH1}(位于忽略列表中)"},"panels/sources/NavigatorView.ts | searchInAllFiles":{"message":"在所有文件中搜索"},"panels/sources/NavigatorView.ts | searchInFolder":{"message":"在文件夹中搜索"},"panels/sources/OutlineQuickOpen.ts | noFileSelected":{"message":"未选择任何文件。"},"panels/sources/OutlineQuickOpen.ts | noResultsFound":{"message":"未找到任何结果"},"panels/sources/OutlineQuickOpen.ts | openAJavascriptOrCssFileToSee":{"message":"打开 JavaScript 或 CSS 文件即可查看符号"},"panels/sources/ProfilePlugin.ts | kb":{"message":"kB"},"panels/sources/ProfilePlugin.ts | mb":{"message":"MB"},"panels/sources/ProfilePlugin.ts | ms":{"message":"毫秒"},"panels/sources/ResourceOriginPlugin.ts | fromS":{"message":"(来自 {PH1})"},"panels/sources/ResourceOriginPlugin.ts | sourceMappedFromS":{"message":"(从 {PH1} 映射的来源)"},"panels/sources/ScopeChainSidebarPane.ts | closure":{"message":"闭包"},"panels/sources/ScopeChainSidebarPane.ts | closureS":{"message":"闭包 ({PH1})"},"panels/sources/ScopeChainSidebarPane.ts | exception":{"message":"异常"},"panels/sources/ScopeChainSidebarPane.ts | loading":{"message":"正在加载…"},"panels/sources/ScopeChainSidebarPane.ts | noVariables":{"message":"无变量"},"panels/sources/ScopeChainSidebarPane.ts | notPaused":{"message":"未暂停"},"panels/sources/ScopeChainSidebarPane.ts | returnValue":{"message":"返回值"},"panels/sources/ScopeChainSidebarPane.ts | revealInMemoryInspectorPanel":{"message":"在“内存检查器”面板中显示"},"panels/sources/SnippetsPlugin.ts | ctrlenter":{"message":"Ctrl+Enter"},"panels/sources/SnippetsPlugin.ts | enter":{"message":"⌘+Enter"},"panels/sources/SourcesNavigator.ts | clearConfiguration":{"message":"清除配置"},"panels/sources/SourcesNavigator.ts | contentScriptsServedByExtensions":{"message":"扩展程序提供的内容脚本会显示在此处"},"panels/sources/SourcesNavigator.ts | createAndSaveCodeSnippetsFor":{"message":"创建并保存代码段以供之后使用"},"panels/sources/SourcesNavigator.ts | createNewSnippet":{"message":"创建新代码段"},"panels/sources/SourcesNavigator.ts | learnMore":{"message":"了解详情"},"panels/sources/SourcesNavigator.ts | learnMoreAboutWorkspaces":{"message":"详细了解工作区"},"panels/sources/SourcesNavigator.ts | newSnippet":{"message":"新代码段"},"panels/sources/SourcesNavigator.ts | overridePageAssetsWithFilesFromA":{"message":"使用本地文件夹中的文件替换网页资源"},"panels/sources/SourcesNavigator.ts | remove":{"message":"移除"},"panels/sources/SourcesNavigator.ts | rename":{"message":"重命名…"},"panels/sources/SourcesNavigator.ts | run":{"message":"运行"},"panels/sources/SourcesNavigator.ts | saveAs":{"message":"另存为…"},"panels/sources/SourcesNavigator.ts | selectFolderForOverrides":{"message":"选择放置替换项的文件夹"},"panels/sources/SourcesNavigator.ts | syncChangesInDevtoolsWithThe":{"message":"将 DevTools 中的更改与本地文件系统同步"},"panels/sources/SourcesPanel.ts | continueToHere":{"message":"继续执行到此处"},"panels/sources/SourcesPanel.ts | copyS":{"message":"复制{PH1}"},"panels/sources/SourcesPanel.ts | copyStringAsJSLiteral":{"message":"复制字符串作为 JavaScript 字面量"},"panels/sources/SourcesPanel.ts | copyStringAsJSONLiteral":{"message":"复制字符串作为 JSON 字面量"},"panels/sources/SourcesPanel.ts | copyStringContents":{"message":"复制字符串内容"},"panels/sources/SourcesPanel.ts | debuggerHidden":{"message":"调试程序边栏处于隐藏状态"},"panels/sources/SourcesPanel.ts | debuggerShown":{"message":"调试程序边栏处于显示状态"},"panels/sources/SourcesPanel.ts | dropWorkspaceFolderHere":{"message":"将工作区文件夹拖放到此处"},"panels/sources/SourcesPanel.ts | groupByAuthored":{"message":"按“已编写”/“已部署”分组"},"panels/sources/SourcesPanel.ts | groupByFolder":{"message":"按文件夹分组"},"panels/sources/SourcesPanel.ts | hideDebugger":{"message":"隐藏调试程序"},"panels/sources/SourcesPanel.ts | hideIgnoreListed":{"message":"隐藏已列入忽略列表的来源"},"panels/sources/SourcesPanel.ts | hideNavigator":{"message":"隐藏导航器"},"panels/sources/SourcesPanel.ts | moreOptions":{"message":"更多选项"},"panels/sources/SourcesPanel.ts | navigatorHidden":{"message":"导航器边栏处于隐藏状态"},"panels/sources/SourcesPanel.ts | navigatorShown":{"message":"导航器边栏处于显示状态"},"panels/sources/SourcesPanel.ts | openInSourcesPanel":{"message":"在“来源”面板中打开"},"panels/sources/SourcesPanel.ts | pauseOnCaughtExceptions":{"message":"在遇到异常时暂停"},"panels/sources/SourcesPanel.ts | resumeWithAllPausesBlockedForMs":{"message":"忽略所有暂停项达 500 毫秒并继续"},"panels/sources/SourcesPanel.ts | revealInSidebar":{"message":"在边栏中显示"},"panels/sources/SourcesPanel.ts | showDebugger":{"message":"显示调试程序"},"panels/sources/SourcesPanel.ts | showFunctionDefinition":{"message":"显示函数定义"},"panels/sources/SourcesPanel.ts | showNavigator":{"message":"显示导航器"},"panels/sources/SourcesPanel.ts | storeSAsGlobalVariable":{"message":"将{PH1}存储为全局变量"},"panels/sources/SourcesPanel.ts | terminateCurrentJavascriptCall":{"message":"终止当前 JavaScript 调用"},"panels/sources/SourcesView.ts | dropInAFolderToAddToWorkspace":{"message":"将一个文件夹拖放到此处即可添加至工作区"},"panels/sources/SourcesView.ts | openFile":{"message":"打开文件"},"panels/sources/SourcesView.ts | runCommand":{"message":"运行命令"},"panels/sources/SourcesView.ts | sourceViewActions":{"message":"源代码查看操作"},"panels/sources/TabbedEditorContainer.ts | areYouSureYouWantToCloseUnsaved":{"message":"确定要关闭未保存的文件 ({PH1}) 吗?"},"panels/sources/TabbedEditorContainer.ts | changesToThisFileWereNotSavedTo":{"message":"对此文件做出的更改未保存到文件系统。"},"panels/sources/TabbedEditorContainer.ts | unableToLoadThisContent":{"message":"无法加载此内容。"},"panels/sources/ThreadsSidebarPane.ts | paused":{"message":"已暂停"},"panels/sources/WatchExpressionsSidebarPane.ts | addPropertyPathToWatch":{"message":"向监视表达式添加属性路径"},"panels/sources/WatchExpressionsSidebarPane.ts | addWatchExpression":{"message":"添加监视表达式"},"panels/sources/WatchExpressionsSidebarPane.ts | copyValue":{"message":"复制值"},"panels/sources/WatchExpressionsSidebarPane.ts | deleteAllWatchExpressions":{"message":"删除所有监视表达式"},"panels/sources/WatchExpressionsSidebarPane.ts | deleteWatchExpression":{"message":"删除监视表达式"},"panels/sources/WatchExpressionsSidebarPane.ts | noWatchExpressions":{"message":"没有监视表达式"},"panels/sources/WatchExpressionsSidebarPane.ts | notAvailable":{"message":"<无法计算>"},"panels/sources/WatchExpressionsSidebarPane.ts | refreshWatchExpressions":{"message":"刷新监视表达式"},"panels/sources/components/BreakpointsView.ts | breakpointHit":{"message":"遇到{PH1}断点"},"panels/sources/components/BreakpointsView.ts | checked":{"message":"已勾选"},"panels/sources/components/BreakpointsView.ts | conditionCode":{"message":"条件:{PH1}"},"panels/sources/components/BreakpointsView.ts | disableAllBreakpointsInFile":{"message":"停用文件内所有断点"},"panels/sources/components/BreakpointsView.ts | editCondition":{"message":"修改条件"},"panels/sources/components/BreakpointsView.ts | editLogpoint":{"message":"修改日志点"},"panels/sources/components/BreakpointsView.ts | enableAllBreakpointsInFile":{"message":"启用文件内所有断点"},"panels/sources/components/BreakpointsView.ts | indeterminate":{"message":"混合"},"panels/sources/components/BreakpointsView.ts | logpointCode":{"message":"日志点:{PH1}"},"panels/sources/components/BreakpointsView.ts | pauseOnCaughtExceptions":{"message":"在遇到异常时暂停"},"panels/sources/components/BreakpointsView.ts | pauseOnUncaughtExceptions":{"message":"遇到未捕获的异常时暂停"},"panels/sources/components/BreakpointsView.ts | removeAllBreakpoints":{"message":"移除所有断点"},"panels/sources/components/BreakpointsView.ts | removeAllBreakpointsInFile":{"message":"移除文件内所有断点"},"panels/sources/components/BreakpointsView.ts | removeBreakpoint":{"message":"移除断点"},"panels/sources/components/BreakpointsView.ts | removeOtherBreakpoints":{"message":"移除其他断点"},"panels/sources/components/BreakpointsView.ts | revealLocation":{"message":"显示位置"},"panels/sources/components/BreakpointsView.ts | unchecked":{"message":"未选中"},"panels/sources/components/HeadersView.ts | addHeader":{"message":"添加标题"},"panels/sources/components/HeadersView.ts | addOverrideRule":{"message":"添加替换规则"},"panels/sources/components/HeadersView.ts | errorWhenParsing":{"message":"解析“{PH1}”时出错。"},"panels/sources/components/HeadersView.ts | learnMore":{"message":"了解详情"},"panels/sources/components/HeadersView.ts | parsingErrorExplainer":{"message":"这很可能是由于“{PH1}”中存在语法错误。请尝试在外部编辑器中打开此文件以修正该错误,或者删除此文件然后重新创建替换项。"},"panels/sources/components/HeadersView.ts | removeBlock":{"message":"移除此“ApplyTo”部分"},"panels/sources/components/HeadersView.ts | removeHeader":{"message":"移除此标题"},"panels/sources/sources-meta.ts | activateBreakpoints":{"message":"启用断点"},"panels/sources/sources-meta.ts | addFolderToWorkspace":{"message":"向工作区添加文件夹"},"panels/sources/sources-meta.ts | addSelectedTextToWatches":{"message":"将所选文本添加至监视表达式"},"panels/sources/sources-meta.ts | all":{"message":"全部"},"panels/sources/sources-meta.ts | allowScrollingPastEndOfFile":{"message":"允许滚动范围超出文件末尾"},"panels/sources/sources-meta.ts | autocompletion":{"message":"自动补全"},"panels/sources/sources-meta.ts | automaticallyRevealFilesIn":{"message":"自动在边栏中显示文件"},"panels/sources/sources-meta.ts | bracketMatching":{"message":"括号匹配"},"panels/sources/sources-meta.ts | breakpoints":{"message":"断点"},"panels/sources/sources-meta.ts | closeAll":{"message":"全部关闭"},"panels/sources/sources-meta.ts | closeTheActiveTab":{"message":"关闭使用中的标签页"},"panels/sources/sources-meta.ts | codeFolding":{"message":"代码折叠"},"panels/sources/sources-meta.ts | createNewSnippet":{"message":"创建新代码段"},"panels/sources/sources-meta.ts | deactivateBreakpoints":{"message":"停用断点"},"panels/sources/sources-meta.ts | decrementCssUnitBy":{"message":"将 CSS 单位减少 {PH1}"},"panels/sources/sources-meta.ts | detectIndentation":{"message":"检测缩进"},"panels/sources/sources-meta.ts | disableAutoFocusOnDebuggerPaused":{"message":"触发断点后不聚焦于“来源”面板"},"panels/sources/sources-meta.ts | disableAutocompletion":{"message":"停用自动补全功能"},"panels/sources/sources-meta.ts | disableBracketMatching":{"message":"停用括号匹配"},"panels/sources/sources-meta.ts | disableCodeFolding":{"message":"停用代码折叠功能"},"panels/sources/sources-meta.ts | disableCssSourceMaps":{"message":"停用 CSS 源代码映射"},"panels/sources/sources-meta.ts | disableJavascriptSourceMaps":{"message":"停用 JavaScript 源代码映射"},"panels/sources/sources-meta.ts | disableTabMovesFocus":{"message":"停用通过 Tab 键移动焦点功能"},"panels/sources/sources-meta.ts | disableWasmAutoStepping":{"message":"停用 wasm 自动步进"},"panels/sources/sources-meta.ts | disallowScrollingPastEndOfFile":{"message":"不允许滚动范围超出文件末尾"},"panels/sources/sources-meta.ts | displayVariableValuesInlineWhile":{"message":"在调试时显示内嵌变量值"},"panels/sources/sources-meta.ts | doNotAutomaticallyRevealFilesIn":{"message":"不自动在边栏中显示文件"},"panels/sources/sources-meta.ts | doNotDetectIndentation":{"message":"不检测缩进"},"panels/sources/sources-meta.ts | doNotDisplayVariableValuesInline":{"message":"调试时不以内嵌方式显示变量值"},"panels/sources/sources-meta.ts | doNotSearchInAnonymousAndContent":{"message":"不在匿名和内容脚本中搜索"},"panels/sources/sources-meta.ts | doNotShowWhitespaceCharacters":{"message":"不显示空格字符串"},"panels/sources/sources-meta.ts | enableAutoFocusOnDebuggerPaused":{"message":"触发断点后聚焦于“来源”面板"},"panels/sources/sources-meta.ts | enableAutocompletion":{"message":"启用自动补全功能"},"panels/sources/sources-meta.ts | enableBracketMatching":{"message":"启用括号匹配功能"},"panels/sources/sources-meta.ts | enableCodeFolding":{"message":"启用代码折叠功能"},"panels/sources/sources-meta.ts | enableCssSourceMaps":{"message":"启用 CSS 源代码映射"},"panels/sources/sources-meta.ts | enableJavascriptSourceMaps":{"message":"启用 JavaScript 源代码映射"},"panels/sources/sources-meta.ts | enableTabMovesFocus":{"message":"启用通过 Tab 键移动焦点功能"},"panels/sources/sources-meta.ts | enableWasmAutoStepping":{"message":"启用 wasm 自动步进"},"panels/sources/sources-meta.ts | evaluateSelectedTextInConsole":{"message":"在控制台中评估所选文本"},"panels/sources/sources-meta.ts | file":{"message":"文件"},"panels/sources/sources-meta.ts | filesystem":{"message":"文件系统"},"panels/sources/sources-meta.ts | goTo":{"message":"转到"},"panels/sources/sources-meta.ts | goToAFunctionDeclarationruleSet":{"message":"转到函数声明/规则组"},"panels/sources/sources-meta.ts | goToLine":{"message":"转到行"},"panels/sources/sources-meta.ts | incrementCssUnitBy":{"message":"将 CSS 单位增加 {PH1}"},"panels/sources/sources-meta.ts | jumpToNextEditingLocation":{"message":"跳转到下一个修改位置"},"panels/sources/sources-meta.ts | jumpToPreviousEditingLocation":{"message":"跳转到上一个修改位置"},"panels/sources/sources-meta.ts | line":{"message":"行"},"panels/sources/sources-meta.ts | nextCallFrame":{"message":"下一个调用帧"},"panels/sources/sources-meta.ts | nextEditorTab":{"message":"下一个编辑器"},"panels/sources/sources-meta.ts | none":{"message":"无"},"panels/sources/sources-meta.ts | open":{"message":"打开"},"panels/sources/sources-meta.ts | pauseScriptExecution":{"message":"暂停脚本执行"},"panels/sources/sources-meta.ts | previousCallFrame":{"message":"上一个调用帧"},"panels/sources/sources-meta.ts | previousEditorTab":{"message":"上一个编辑器"},"panels/sources/sources-meta.ts | quickSource":{"message":"快速来源"},"panels/sources/sources-meta.ts | rename":{"message":"重命名"},"panels/sources/sources-meta.ts | resumeScriptExecution":{"message":"继续执行脚本"},"panels/sources/sources-meta.ts | runSnippet":{"message":"运行代码段"},"panels/sources/sources-meta.ts | save":{"message":"保存"},"panels/sources/sources-meta.ts | saveAll":{"message":"全部保存"},"panels/sources/sources-meta.ts | scope":{"message":"作用域"},"panels/sources/sources-meta.ts | search":{"message":"搜索"},"panels/sources/sources-meta.ts | searchInAnonymousAndContent":{"message":"在匿名和内容脚本中搜索"},"panels/sources/sources-meta.ts | showAllWhitespaceCharacters":{"message":"显示所有空格字符"},"panels/sources/sources-meta.ts | showBreakpoints":{"message":"显示“断点”工具"},"panels/sources/sources-meta.ts | showFilesystem":{"message":"显示“文件系统”工具"},"panels/sources/sources-meta.ts | showQuickSource":{"message":"显示“快速来源”工具"},"panels/sources/sources-meta.ts | showScope":{"message":"显示“作用域”"},"panels/sources/sources-meta.ts | showSearch":{"message":"显示“搜索”工具"},"panels/sources/sources-meta.ts | showSnippets":{"message":"显示“代码段”工具"},"panels/sources/sources-meta.ts | showSources":{"message":"显示“来源”工具"},"panels/sources/sources-meta.ts | showThreads":{"message":"显示“线程”工具"},"panels/sources/sources-meta.ts | showTrailingWhitespaceCharacters":{"message":"显示尾随空格字符"},"panels/sources/sources-meta.ts | showWatch":{"message":"显示“监视”工具"},"panels/sources/sources-meta.ts | showWhitespaceCharacters":{"message":"显示空格字符:"},"panels/sources/sources-meta.ts | snippets":{"message":"代码段"},"panels/sources/sources-meta.ts | sources":{"message":"源代码"},"panels/sources/sources-meta.ts | step":{"message":"单步调试"},"panels/sources/sources-meta.ts | stepIntoNextFunctionCall":{"message":"进入下一个函数调用"},"panels/sources/sources-meta.ts | stepOutOfCurrentFunction":{"message":"跳出当前函数"},"panels/sources/sources-meta.ts | stepOverNextFunctionCall":{"message":"跳过下一个函数调用"},"panels/sources/sources-meta.ts | switchFile":{"message":"切换文件"},"panels/sources/sources-meta.ts | symbol":{"message":"符号"},"panels/sources/sources-meta.ts | threads":{"message":"线程"},"panels/sources/sources-meta.ts | toggleBreakpoint":{"message":"切换断点"},"panels/sources/sources-meta.ts | toggleBreakpointEnabled":{"message":"已启用切换断点快捷键"},"panels/sources/sources-meta.ts | toggleBreakpointInputWindow":{"message":"开启/关闭断点输入窗口"},"panels/sources/sources-meta.ts | toggleDebuggerSidebar":{"message":"开启/关闭调试程序边栏"},"panels/sources/sources-meta.ts | toggleNavigatorSidebar":{"message":"开启/关闭导航器边栏"},"panels/sources/sources-meta.ts | trailing":{"message":"尾随"},"panels/sources/sources-meta.ts | wasmAutoStepping":{"message":"使用调试信息调试 wasm 时,尽量别在 wasm 字节码处暂停"},"panels/sources/sources-meta.ts | watch":{"message":"监视"},"panels/timeline/AppenderUtils.ts | sSelfS":{"message":"{PH1}(自身耗时 {PH2})"},"panels/timeline/CountersGraph.ts | documents":{"message":"文档"},"panels/timeline/CountersGraph.ts | gpuMemory":{"message":"GPU 内存"},"panels/timeline/CountersGraph.ts | jsHeap":{"message":"JS 堆"},"panels/timeline/CountersGraph.ts | listeners":{"message":"监听器"},"panels/timeline/CountersGraph.ts | nodes":{"message":"节点"},"panels/timeline/CountersGraph.ts | ss":{"message":"[{PH1} - {PH2}]"},"panels/timeline/EventsTimelineTreeView.ts | Dms":{"message":"{PH1} 毫秒"},"panels/timeline/EventsTimelineTreeView.ts | all":{"message":"全部"},"panels/timeline/EventsTimelineTreeView.ts | durationFilter":{"message":"时长过滤器"},"panels/timeline/EventsTimelineTreeView.ts | filterEventLog":{"message":"过滤事件日志"},"panels/timeline/EventsTimelineTreeView.ts | startTime":{"message":"开始时间"},"panels/timeline/GPUTrackAppender.ts | gpu":{"message":"GPU"},"panels/timeline/InteractionsTrackAppender.ts | interactions":{"message":"互动"},"panels/timeline/LayoutShiftsTrackAppender.ts | layoutShifts":{"message":"布局偏移"},"panels/timeline/TimelineController.ts | cpuProfileForATargetIsNot":{"message":"无法显示目标的 CPU 性能分析报告。"},"panels/timeline/TimelineController.ts | tracingNotSupported":{"message":"无法为这类目标提供性能跟踪记录"},"panels/timeline/TimelineDetailsView.ts | bottomup":{"message":"自下而上"},"panels/timeline/TimelineDetailsView.ts | callTree":{"message":"调用树"},"panels/timeline/TimelineDetailsView.ts | estimated":{"message":"估算值"},"panels/timeline/TimelineDetailsView.ts | eventLog":{"message":"事件日志"},"panels/timeline/TimelineDetailsView.ts | layers":{"message":"图层"},"panels/timeline/TimelineDetailsView.ts | learnMore":{"message":"了解详情"},"panels/timeline/TimelineDetailsView.ts | paintProfiler":{"message":"绘制性能剖析器"},"panels/timeline/TimelineDetailsView.ts | rangeSS":{"message":"范围:{PH1} - {PH2}"},"panels/timeline/TimelineDetailsView.ts | summary":{"message":"摘要"},"panels/timeline/TimelineDetailsView.ts | totalBlockingTimeSmss":{"message":"总阻塞时间:{PH1} 毫秒{PH2}"},"panels/timeline/TimelineEventOverview.ts | cpu":{"message":"CPU"},"panels/timeline/TimelineEventOverview.ts | heap":{"message":"堆"},"panels/timeline/TimelineEventOverview.ts | net":{"message":"网络"},"panels/timeline/TimelineEventOverview.ts | sSDash":{"message":"{PH1} - {PH2}"},"panels/timeline/TimelineFlameChartDataProvider.ts | animation":{"message":"动画"},"panels/timeline/TimelineFlameChartDataProvider.ts | droppedFrame":{"message":"丢弃的帧"},"panels/timeline/TimelineFlameChartDataProvider.ts | frame":{"message":"帧"},"panels/timeline/TimelineFlameChartDataProvider.ts | frameS":{"message":"帧 - {PH1}"},"panels/timeline/TimelineFlameChartDataProvider.ts | frames":{"message":"帧"},"panels/timeline/TimelineFlameChartDataProvider.ts | idleFrame":{"message":"空闲帧"},"panels/timeline/TimelineFlameChartDataProvider.ts | longFrame":{"message":"长帧"},"panels/timeline/TimelineFlameChartDataProvider.ts | main":{"message":"主要"},"panels/timeline/TimelineFlameChartDataProvider.ts | mainS":{"message":"主要 - {PH1}"},"panels/timeline/TimelineFlameChartDataProvider.ts | onIgnoreList":{"message":"在忽略列表中"},"panels/timeline/TimelineFlameChartDataProvider.ts | partiallyPresentedFrame":{"message":"部分呈现帧"},"panels/timeline/TimelineFlameChartDataProvider.ts | raster":{"message":"光栅"},"panels/timeline/TimelineFlameChartDataProvider.ts | rasterizerThreadS":{"message":"光栅器线程 {PH1}"},"panels/timeline/TimelineFlameChartDataProvider.ts | sSelfS":{"message":"{PH1}(自身耗时 {PH2})"},"panels/timeline/TimelineFlameChartDataProvider.ts | subframe":{"message":"子帧"},"panels/timeline/TimelineFlameChartDataProvider.ts | thread":{"message":"线程"},"panels/timeline/TimelineFlameChartNetworkDataProvider.ts | network":{"message":"网络"},"panels/timeline/TimelineFlameChartView.ts | sAtS":{"message":"{PH2}时显示的{PH1}"},"panels/timeline/TimelineHistoryManager.ts | currentSessionSS":{"message":"当前会话:{PH1}。{PH2}"},"panels/timeline/TimelineHistoryManager.ts | moments":{"message":"时刻"},"panels/timeline/TimelineHistoryManager.ts | noRecordings":{"message":"(无录制内容)"},"panels/timeline/TimelineHistoryManager.ts | sAgo":{"message":"({PH1}前)"},"panels/timeline/TimelineHistoryManager.ts | sD":{"message":"{PH1} #{PH2}"},"panels/timeline/TimelineHistoryManager.ts | sH":{"message":"{PH1} 小时"},"panels/timeline/TimelineHistoryManager.ts | sM":{"message":"{PH1} 分钟"},"panels/timeline/TimelineHistoryManager.ts | selectTimelineSession":{"message":"选择时间轴会话"},"panels/timeline/TimelineLoader.ts | legacyTimelineFormatIsNot":{"message":"旧版时间轴格式不受支持。"},"panels/timeline/TimelineLoader.ts | malformedCpuProfileFormat":{"message":"CPU 配置文件格式有误"},"panels/timeline/TimelineLoader.ts | malformedTimelineDataS":{"message":"格式有误的时间轴数据:{PH1}"},"panels/timeline/TimelineLoader.ts | malformedTimelineDataUnknownJson":{"message":"时间轴数据格式错误:未知 JSON 格式"},"panels/timeline/TimelineLoader.ts | malformedTimelineInputWrongJson":{"message":"时间轴输入项格式错误,JSON 括号对应有误"},"panels/timeline/TimelinePanel.ts | CpuThrottlingIsEnabled":{"message":"- CPU 节流已启用"},"panels/timeline/TimelinePanel.ts | HardwareConcurrencyIsEnabled":{"message":"- 硬件并发替换已启用"},"panels/timeline/TimelinePanel.ts | JavascriptSamplingIsDisabled":{"message":"- JavaScript 采样已停用"},"panels/timeline/TimelinePanel.ts | NetworkThrottlingIsEnabled":{"message":"- 已启用网络节流功能"},"panels/timeline/TimelinePanel.ts | SignificantOverheadDueToPaint":{"message":"- 因绘制插桩而产生大量开销"},"panels/timeline/TimelinePanel.ts | afterRecordingSelectAnAreaOf":{"message":"录制结束后,在概览中以拖动方式选择感兴趣的区域。然后,使用鼠标滚轮或 {PH1} 组合键缩放并平移时间轴。{PH2}"},"panels/timeline/TimelinePanel.ts | bufferUsage":{"message":"缓冲区使用情况"},"panels/timeline/TimelinePanel.ts | captureScreenshots":{"message":"截取屏幕截图"},"panels/timeline/TimelinePanel.ts | captureSettings":{"message":"录制设置"},"panels/timeline/TimelinePanel.ts | capturesAdvancedPaint":{"message":"捕获高级绘制插桩,产生大量性能开销"},"panels/timeline/TimelinePanel.ts | clear":{"message":"清除"},"panels/timeline/TimelinePanel.ts | clickTheRecordButtonSOrHitSTo":{"message":"点击录制按钮“{PH1}”或按 {PH2} 即可开始录制新内容。"},"panels/timeline/TimelinePanel.ts | clickTheReloadButtonSOrHitSTo":{"message":"点击重新加载按钮 {PH1} 或按 {PH2} 即可录制网页加载过程。"},"panels/timeline/TimelinePanel.ts | close":{"message":"关闭"},"panels/timeline/TimelinePanel.ts | cpu":{"message":"CPU:"},"panels/timeline/TimelinePanel.ts | description":{"message":"说明"},"panels/timeline/TimelinePanel.ts | disableJavascriptSamples":{"message":"停用 JavaScript 示例"},"panels/timeline/TimelinePanel.ts | disablesJavascriptSampling":{"message":"停用 JavaScript 采样,减少在移动设备上运行时的开销"},"panels/timeline/TimelinePanel.ts | dropTimelineFileOrUrlHere":{"message":"将时间轴文件或网址拖放到此处"},"panels/timeline/TimelinePanel.ts | enableAdvancedPaint":{"message":"启用高级绘制插桩(慢速)"},"panels/timeline/TimelinePanel.ts | failedToSaveTimelineSS":{"message":"未能保存时间轴:{PH1}({PH2})"},"panels/timeline/TimelinePanel.ts | initializingProfiler":{"message":"正在初始化性能剖析器…"},"panels/timeline/TimelinePanel.ts | learnmore":{"message":"了解详情"},"panels/timeline/TimelinePanel.ts | loadProfile":{"message":"加载性能分析报告…"},"panels/timeline/TimelinePanel.ts | loadingProfile":{"message":"正在加载性能分析报告…"},"panels/timeline/TimelinePanel.ts | memory":{"message":"内存"},"panels/timeline/TimelinePanel.ts | network":{"message":"网络:"},"panels/timeline/TimelinePanel.ts | networkConditions":{"message":"网络状况"},"panels/timeline/TimelinePanel.ts | processingProfile":{"message":"正在处理性能分析报告…"},"panels/timeline/TimelinePanel.ts | profiling":{"message":"正在进行性能分析…"},"panels/timeline/TimelinePanel.ts | received":{"message":"已接收"},"panels/timeline/TimelinePanel.ts | recordingFailed":{"message":"录制失败"},"panels/timeline/TimelinePanel.ts | saveProfile":{"message":"保存性能分析报告…"},"panels/timeline/TimelinePanel.ts | screenshots":{"message":"屏幕截图"},"panels/timeline/TimelinePanel.ts | showMemoryTimeline":{"message":"显示内存时间轴"},"panels/timeline/TimelinePanel.ts | ssec":{"message":"{PH1} 秒"},"panels/timeline/TimelinePanel.ts | status":{"message":"状态"},"panels/timeline/TimelinePanel.ts | stop":{"message":"停止"},"panels/timeline/TimelinePanel.ts | stoppingTimeline":{"message":"正在停止时间轴…"},"panels/timeline/TimelinePanel.ts | time":{"message":"时间"},"panels/timeline/TimelinePanel.ts | wasd":{"message":"WASD"},"panels/timeline/TimelineTreeView.ts | activity":{"message":"活动"},"panels/timeline/TimelineTreeView.ts | chromeExtensionsOverhead":{"message":"[Chrome 扩展程序开销]"},"panels/timeline/TimelineTreeView.ts | filter":{"message":"过滤"},"panels/timeline/TimelineTreeView.ts | filterBottomup":{"message":"过滤条件为自下而上"},"panels/timeline/TimelineTreeView.ts | filterCallTree":{"message":"过滤调用树"},"panels/timeline/TimelineTreeView.ts | fms":{"message":"{PH1} 毫秒"},"panels/timeline/TimelineTreeView.ts | groupBy":{"message":"分组依据"},"panels/timeline/TimelineTreeView.ts | groupByActivity":{"message":"按活动分组"},"panels/timeline/TimelineTreeView.ts | groupByCategory":{"message":"按类别分组"},"panels/timeline/TimelineTreeView.ts | groupByDomain":{"message":"按网域分组"},"panels/timeline/TimelineTreeView.ts | groupByFrame":{"message":"按帧分组"},"panels/timeline/TimelineTreeView.ts | groupBySubdomain":{"message":"按子网域分组"},"panels/timeline/TimelineTreeView.ts | groupByUrl":{"message":"按网址分组"},"panels/timeline/TimelineTreeView.ts | heaviestStack":{"message":"执行用时最长的堆栈"},"panels/timeline/TimelineTreeView.ts | heaviestStackHidden":{"message":"“执行用时最长的堆栈”边栏处于隐藏状态"},"panels/timeline/TimelineTreeView.ts | heaviestStackShown":{"message":"“执行用时最长的堆栈”边栏处于显示状态"},"panels/timeline/TimelineTreeView.ts | hideHeaviestStack":{"message":"隐藏“执行用时最长的堆栈”边栏"},"panels/timeline/TimelineTreeView.ts | javascript":{"message":"JavaScript"},"panels/timeline/TimelineTreeView.ts | noGrouping":{"message":"未分组"},"panels/timeline/TimelineTreeView.ts | notOptimizedS":{"message":"未优化:{PH1}"},"panels/timeline/TimelineTreeView.ts | page":{"message":"网页"},"panels/timeline/TimelineTreeView.ts | percentPlaceholder":{"message":"{PH1}%"},"panels/timeline/TimelineTreeView.ts | performance":{"message":"性能"},"panels/timeline/TimelineTreeView.ts | selectItemForDetails":{"message":"选择项目即可查看详细信息。"},"panels/timeline/TimelineTreeView.ts | selfTime":{"message":"自身耗时"},"panels/timeline/TimelineTreeView.ts | showHeaviestStack":{"message":"显示“执行用时最长的堆栈”边栏"},"panels/timeline/TimelineTreeView.ts | timelineStack":{"message":"时间轴堆栈"},"panels/timeline/TimelineTreeView.ts | totalTime":{"message":"总时间"},"panels/timeline/TimelineTreeView.ts | unattributed":{"message":"[未归因]"},"panels/timeline/TimelineTreeView.ts | vRuntime":{"message":"[V8 运行时]"},"panels/timeline/TimelineUIUtils.ts | FromCache":{"message":" (来自缓存)"},"panels/timeline/TimelineUIUtils.ts | FromMemoryCache":{"message":" (来自内存缓存)"},"panels/timeline/TimelineUIUtils.ts | FromPush":{"message":" (来自推送)"},"panels/timeline/TimelineUIUtils.ts | FromServiceWorker":{"message":" (来自 service worker)"},"panels/timeline/TimelineUIUtils.ts | SSSResourceLoading":{"message":" ({PH1}{PH2} + {PH3}资源加载)"},"panels/timeline/TimelineUIUtils.ts | UnknownNode":{"message":"[未知节点]"},"panels/timeline/TimelineUIUtils.ts | aggregatedTime":{"message":"总时间"},"panels/timeline/TimelineUIUtils.ts | allottedTime":{"message":"分配的时间"},"panels/timeline/TimelineUIUtils.ts | animation":{"message":"动画"},"panels/timeline/TimelineUIUtils.ts | animationFrameFired":{"message":"动画帧已触发"},"panels/timeline/TimelineUIUtils.ts | animationFrameRequested":{"message":"已请求动画帧"},"panels/timeline/TimelineUIUtils.ts | async":{"message":"异步"},"panels/timeline/TimelineUIUtils.ts | asyncTask":{"message":"异步任务"},"panels/timeline/TimelineUIUtils.ts | cacheModule":{"message":"缓存模块代码"},"panels/timeline/TimelineUIUtils.ts | cacheScript":{"message":"缓存脚本代码"},"panels/timeline/TimelineUIUtils.ts | cachedWasmModule":{"message":"缓存的 Wasm 模块"},"panels/timeline/TimelineUIUtils.ts | callStacks":{"message":"调用堆栈"},"panels/timeline/TimelineUIUtils.ts | callbackFunction":{"message":"回调函数"},"panels/timeline/TimelineUIUtils.ts | callbackId":{"message":"回调 ID"},"panels/timeline/TimelineUIUtils.ts | cancelAnimationFrame":{"message":"取消动画帧"},"panels/timeline/TimelineUIUtils.ts | cancelIdleCallback":{"message":"取消空闲回调"},"panels/timeline/TimelineUIUtils.ts | changedAttributeToSs":{"message":"(已将属性更改为“{PH1}”{PH2})"},"panels/timeline/TimelineUIUtils.ts | changedClassToSs":{"message":"(已将类更改为“{PH1}”{PH2})"},"panels/timeline/TimelineUIUtils.ts | changedIdToSs":{"message":"(已将 ID 更改为“{PH1}”{PH2})"},"panels/timeline/TimelineUIUtils.ts | changedPesudoToSs":{"message":"(已将伪元素更改为“{PH1}”{PH2})"},"panels/timeline/TimelineUIUtils.ts | changedSs":{"message":"(已更改“{PH1}”{PH2})"},"panels/timeline/TimelineUIUtils.ts | collected":{"message":"已回收"},"panels/timeline/TimelineUIUtils.ts | commit":{"message":"提交"},"panels/timeline/TimelineUIUtils.ts | compilationCacheSize":{"message":"编译缓存大小"},"panels/timeline/TimelineUIUtils.ts | compilationCacheStatus":{"message":"编译缓存状态"},"panels/timeline/TimelineUIUtils.ts | compile":{"message":"编译"},"panels/timeline/TimelineUIUtils.ts | compileCode":{"message":"编译代码"},"panels/timeline/TimelineUIUtils.ts | compileModule":{"message":"编译模块"},"panels/timeline/TimelineUIUtils.ts | compileScript":{"message":"编译脚本"},"panels/timeline/TimelineUIUtils.ts | compiledWasmModule":{"message":"已编译的 Wasm 模块"},"panels/timeline/TimelineUIUtils.ts | compositeLayers":{"message":"复合图层"},"panels/timeline/TimelineUIUtils.ts | computeIntersections":{"message":"计算相交部分"},"panels/timeline/TimelineUIUtils.ts | consoleTime":{"message":"控制台时间事件"},"panels/timeline/TimelineUIUtils.ts | consumedCacheSize":{"message":"已使用的缓存大小"},"panels/timeline/TimelineUIUtils.ts | cpuTime":{"message":"CPU 时间"},"panels/timeline/TimelineUIUtils.ts | createWebsocket":{"message":"创建 WebSocket"},"panels/timeline/TimelineUIUtils.ts | cumulativeLayoutShifts":{"message":"Cumulative Layout Shift"},"panels/timeline/TimelineUIUtils.ts | cumulativeScore":{"message":"累积分数"},"panels/timeline/TimelineUIUtils.ts | currentClusterId":{"message":"当前集群 ID"},"panels/timeline/TimelineUIUtils.ts | currentClusterScore":{"message":"当前集群分数"},"panels/timeline/TimelineUIUtils.ts | decodedBody":{"message":"经过解码的正文"},"panels/timeline/TimelineUIUtils.ts | decrypt":{"message":"解密"},"panels/timeline/TimelineUIUtils.ts | decryptReply":{"message":"解密回复"},"panels/timeline/TimelineUIUtils.ts | deserializeCodeCache":{"message":"反序列化代码缓存"},"panels/timeline/TimelineUIUtils.ts | destroyWebsocket":{"message":"销毁 WebSocket"},"panels/timeline/TimelineUIUtils.ts | details":{"message":"详细信息"},"panels/timeline/TimelineUIUtils.ts | digest":{"message":"摘要"},"panels/timeline/TimelineUIUtils.ts | digestReply":{"message":"摘要回复"},"panels/timeline/TimelineUIUtils.ts | dimensions":{"message":"尺寸"},"panels/timeline/TimelineUIUtils.ts | domGc":{"message":"DOM GC"},"panels/timeline/TimelineUIUtils.ts | domcontentloadedEvent":{"message":"DOMContentLoaded 事件"},"panels/timeline/TimelineUIUtils.ts | drawFrame":{"message":"绘制帧"},"panels/timeline/TimelineUIUtils.ts | duration":{"message":"时长"},"panels/timeline/TimelineUIUtils.ts | eagerCompile":{"message":"及早编译所有函数"},"panels/timeline/TimelineUIUtils.ts | elementsAffected":{"message":"受影响的元素"},"panels/timeline/TimelineUIUtils.ts | embedderCallback":{"message":"嵌入器回调"},"panels/timeline/TimelineUIUtils.ts | emptyPlaceholder":{"message":"{PH1}"},"panels/timeline/TimelineUIUtils.ts | emptyPlaceholderColon":{"message":":{PH1}"},"panels/timeline/TimelineUIUtils.ts | encodedData":{"message":"已编码的数据"},"panels/timeline/TimelineUIUtils.ts | encrypt":{"message":"加密"},"panels/timeline/TimelineUIUtils.ts | encryptReply":{"message":"加密回复"},"panels/timeline/TimelineUIUtils.ts | evaluateModule":{"message":"评估模块"},"panels/timeline/TimelineUIUtils.ts | evaluateScript":{"message":"评估脚本"},"panels/timeline/TimelineUIUtils.ts | event":{"message":"事件"},"panels/timeline/TimelineUIUtils.ts | eventTiming":{"message":"事件时间"},"panels/timeline/TimelineUIUtils.ts | evolvedClsLink":{"message":"演变了"},"panels/timeline/TimelineUIUtils.ts | experience":{"message":"经验"},"panels/timeline/TimelineUIUtils.ts | failedToLoadScriptFromCache":{"message":"无法从缓存加载脚本"},"panels/timeline/TimelineUIUtils.ts | finishLoading":{"message":"完成加载"},"panels/timeline/TimelineUIUtils.ts | fireIdleCallback":{"message":"触发空闲回调"},"panels/timeline/TimelineUIUtils.ts | firstContentfulPaint":{"message":"First Contentful Paint"},"panels/timeline/TimelineUIUtils.ts | firstInvalidated":{"message":"首次失效"},"panels/timeline/TimelineUIUtils.ts | firstLayoutInvalidation":{"message":"首次布局失效"},"panels/timeline/TimelineUIUtils.ts | firstPaint":{"message":"首次绘制"},"panels/timeline/TimelineUIUtils.ts | forcedReflow":{"message":"已强制自动重排"},"panels/timeline/TimelineUIUtils.ts | frame":{"message":"帧"},"panels/timeline/TimelineUIUtils.ts | frameStart":{"message":"开始显示帧"},"panels/timeline/TimelineUIUtils.ts | frameStartMainThread":{"message":"帧开始(主线程)"},"panels/timeline/TimelineUIUtils.ts | frameStartedLoading":{"message":"帧开始加载"},"panels/timeline/TimelineUIUtils.ts | function":{"message":"函数"},"panels/timeline/TimelineUIUtils.ts | functionCall":{"message":"函数调用"},"panels/timeline/TimelineUIUtils.ts | gcEvent":{"message":"垃圾回收事件"},"panels/timeline/TimelineUIUtils.ts | gpu":{"message":"GPU"},"panels/timeline/TimelineUIUtils.ts | hadRecentInput":{"message":"包含最近输入的内容"},"panels/timeline/TimelineUIUtils.ts | handlerTookS":{"message":"处理程序耗时 {PH1}"},"panels/timeline/TimelineUIUtils.ts | hitTest":{"message":"命中测试"},"panels/timeline/TimelineUIUtils.ts | idle":{"message":"空闲"},"panels/timeline/TimelineUIUtils.ts | idleCallbackExecutionExtended":{"message":"空闲回调的执行时间超出截止时间 {PH1}"},"panels/timeline/TimelineUIUtils.ts | idleCallbackRequested":{"message":"已请求空闲回调"},"panels/timeline/TimelineUIUtils.ts | imageDecode":{"message":"图片解码"},"panels/timeline/TimelineUIUtils.ts | imageResize":{"message":"调整图片大小"},"panels/timeline/TimelineUIUtils.ts | imageUrl":{"message":"图片网址"},"panels/timeline/TimelineUIUtils.ts | initiator":{"message":"启动器"},"panels/timeline/TimelineUIUtils.ts | installTimer":{"message":"安装定时器"},"panels/timeline/TimelineUIUtils.ts | interactionID":{"message":"ID"},"panels/timeline/TimelineUIUtils.ts | invalidateLayout":{"message":"使布局失效"},"panels/timeline/TimelineUIUtils.ts | invalidations":{"message":"失效内容"},"panels/timeline/TimelineUIUtils.ts | invokedByTimeout":{"message":"根据超时时长调用"},"panels/timeline/TimelineUIUtils.ts | jank":{"message":"卡顿"},"panels/timeline/TimelineUIUtils.ts | jsFrame":{"message":"JS 帧"},"panels/timeline/TimelineUIUtils.ts | jsIdleFrame":{"message":"JS 空闲框架"},"panels/timeline/TimelineUIUtils.ts | jsRoot":{"message":"JS 根"},"panels/timeline/TimelineUIUtils.ts | jsSystemFrame":{"message":"JS 系统框架"},"panels/timeline/TimelineUIUtils.ts | largestContentfulPaint":{"message":"Largest Contentful Paint"},"panels/timeline/TimelineUIUtils.ts | layerRoot":{"message":"图层根"},"panels/timeline/TimelineUIUtils.ts | layerTree":{"message":"图层树"},"panels/timeline/TimelineUIUtils.ts | layerize":{"message":"分层"},"panels/timeline/TimelineUIUtils.ts | layout":{"message":"布局"},"panels/timeline/TimelineUIUtils.ts | layoutForced":{"message":"已强制应用布局"},"panels/timeline/TimelineUIUtils.ts | layoutInvalidations":{"message":"布局失效"},"panels/timeline/TimelineUIUtils.ts | layoutRoot":{"message":"布局根"},"panels/timeline/TimelineUIUtils.ts | layoutShift":{"message":"布局偏移"},"panels/timeline/TimelineUIUtils.ts | learnMore":{"message":"了解详情"},"panels/timeline/TimelineUIUtils.ts | loadFromCache":{"message":"从缓存加载"},"panels/timeline/TimelineUIUtils.ts | loading":{"message":"正在加载"},"panels/timeline/TimelineUIUtils.ts | location":{"message":"位置"},"panels/timeline/TimelineUIUtils.ts | longInteractionINP":{"message":"互动耗时非常长"},"panels/timeline/TimelineUIUtils.ts | longTask":{"message":"长任务"},"panels/timeline/TimelineUIUtils.ts | majorGc":{"message":"主要垃圾回收"},"panels/timeline/TimelineUIUtils.ts | message":{"message":"消息"},"panels/timeline/TimelineUIUtils.ts | mimeType":{"message":"MIME 类型"},"panels/timeline/TimelineUIUtils.ts | mimeTypeCaps":{"message":"MIME 类型"},"panels/timeline/TimelineUIUtils.ts | minorGc":{"message":"次要垃圾回收"},"panels/timeline/TimelineUIUtils.ts | module":{"message":"模块"},"panels/timeline/TimelineUIUtils.ts | movedFrom":{"message":"来自:"},"panels/timeline/TimelineUIUtils.ts | movedTo":{"message":"移至:"},"panels/timeline/TimelineUIUtils.ts | networkRequest":{"message":"网络请求"},"panels/timeline/TimelineUIUtils.ts | networkTransfer":{"message":"网络传输"},"panels/timeline/TimelineUIUtils.ts | no":{"message":"否"},"panels/timeline/TimelineUIUtils.ts | node":{"message":"节点:"},"panels/timeline/TimelineUIUtils.ts | nodes":{"message":"节点:"},"panels/timeline/TimelineUIUtils.ts | nodesThatNeedLayout":{"message":"需要布局的节点"},"panels/timeline/TimelineUIUtils.ts | notOptimized":{"message":"未优化"},"panels/timeline/TimelineUIUtils.ts | onloadEvent":{"message":"Onload 事件"},"panels/timeline/TimelineUIUtils.ts | optimizeCode":{"message":"优化代码"},"panels/timeline/TimelineUIUtils.ts | other":{"message":"其他"},"panels/timeline/TimelineUIUtils.ts | otherInvalidations":{"message":"其他失效内容"},"panels/timeline/TimelineUIUtils.ts | ownerElement":{"message":"所有者元素"},"panels/timeline/TimelineUIUtils.ts | paint":{"message":"绘制"},"panels/timeline/TimelineUIUtils.ts | paintImage":{"message":"绘制图片"},"panels/timeline/TimelineUIUtils.ts | paintProfiler":{"message":"绘制性能剖析器"},"panels/timeline/TimelineUIUtils.ts | paintSetup":{"message":"绘制设置"},"panels/timeline/TimelineUIUtils.ts | painting":{"message":"绘制"},"panels/timeline/TimelineUIUtils.ts | parse":{"message":"解析"},"panels/timeline/TimelineUIUtils.ts | parseAndCompile":{"message":"解析和编译"},"panels/timeline/TimelineUIUtils.ts | parseHtml":{"message":"解析 HTML"},"panels/timeline/TimelineUIUtils.ts | parseStylesheet":{"message":"解析样式表"},"panels/timeline/TimelineUIUtils.ts | pendingFor":{"message":"等待"},"panels/timeline/TimelineUIUtils.ts | prePaint":{"message":"预先绘制"},"panels/timeline/TimelineUIUtils.ts | preview":{"message":"预览"},"panels/timeline/TimelineUIUtils.ts | priority":{"message":"优先级"},"panels/timeline/TimelineUIUtils.ts | producedCacheSize":{"message":"已产生的缓存大小"},"panels/timeline/TimelineUIUtils.ts | profilingOverhead":{"message":"分析开销"},"panels/timeline/TimelineUIUtils.ts | range":{"message":"范围"},"panels/timeline/TimelineUIUtils.ts | rasterizePaint":{"message":"光栅化绘制内容"},"panels/timeline/TimelineUIUtils.ts | recalculateStyle":{"message":"重新计算样式"},"panels/timeline/TimelineUIUtils.ts | recalculationForced":{"message":"已强制重新计算"},"panels/timeline/TimelineUIUtils.ts | receiveData":{"message":"接收数据"},"panels/timeline/TimelineUIUtils.ts | receiveResponse":{"message":"接收响应"},"panels/timeline/TimelineUIUtils.ts | receiveWebsocketHandshake":{"message":"接收 WebSocket 握手"},"panels/timeline/TimelineUIUtils.ts | recurringHandlerTookS":{"message":"重复性处理程序耗时 {PH1}"},"panels/timeline/TimelineUIUtils.ts | relatedNode":{"message":"相关节点"},"panels/timeline/TimelineUIUtils.ts | removeTimer":{"message":"移除定时器"},"panels/timeline/TimelineUIUtils.ts | rendering":{"message":"渲染"},"panels/timeline/TimelineUIUtils.ts | repeats":{"message":"重复"},"panels/timeline/TimelineUIUtils.ts | requestAnimationFrame":{"message":"请求动画帧"},"panels/timeline/TimelineUIUtils.ts | requestIdleCallback":{"message":"请求空闲回调"},"panels/timeline/TimelineUIUtils.ts | requestMainThreadFrame":{"message":"请求主线程帧"},"panels/timeline/TimelineUIUtils.ts | requestMethod":{"message":"请求方法"},"panels/timeline/TimelineUIUtils.ts | resource":{"message":"资源"},"panels/timeline/TimelineUIUtils.ts | reveal":{"message":"显示"},"panels/timeline/TimelineUIUtils.ts | runMicrotasks":{"message":"运行微任务"},"panels/timeline/TimelineUIUtils.ts | sAndS":{"message":"{PH1} 和 {PH2}"},"panels/timeline/TimelineUIUtils.ts | sAndSOther":{"message":"{PH1}、{PH2} 以及另外 1 个"},"panels/timeline/TimelineUIUtils.ts | sAtS":{"message":"{PH2}时显示的{PH1}"},"panels/timeline/TimelineUIUtils.ts | sAtSParentheses":{"message":"{PH1}(在 {PH2}时)"},"panels/timeline/TimelineUIUtils.ts | sBytes":{"message":"{n,plural, =1{# 个字节}other{# 个字节}}"},"panels/timeline/TimelineUIUtils.ts | sCLSInformation":{"message":"{PH1} 可能会导致用户体验不佳。此指标最近{PH2}。"},"panels/timeline/TimelineUIUtils.ts | sChildren":{"message":"{PH1}(子级)"},"panels/timeline/TimelineUIUtils.ts | sCollected":{"message":"已回收 {PH1}"},"panels/timeline/TimelineUIUtils.ts | sForS":{"message":"{PH1}:{PH2}"},"panels/timeline/TimelineUIUtils.ts | sIsALikelyPerformanceBottleneck":{"message":"{PH1}可能是性能瓶颈。"},"panels/timeline/TimelineUIUtils.ts | sIsLikelyPoorPageResponsiveness":{"message":"“{PH1}”表明网页响应速度非常慢。"},"panels/timeline/TimelineUIUtils.ts | sLongFrameTimesAreAnIndicationOf":{"message":"{PH1}。帧时间较长表明出现{PH2}。"},"panels/timeline/TimelineUIUtils.ts | sOfS":{"message":"{PH1} 个(共 {PH2} 个)"},"panels/timeline/TimelineUIUtils.ts | sS":{"message":"{PH1}:{PH2}"},"panels/timeline/TimelineUIUtils.ts | sSAndSOthers":{"message":"{PH1}、{PH2} 和另外 {PH3} 个"},"panels/timeline/TimelineUIUtils.ts | sSCurlyBrackets":{"message":"({PH1}、{PH2})"},"panels/timeline/TimelineUIUtils.ts | sSDimensions":{"message":"{PH1} × {PH2}"},"panels/timeline/TimelineUIUtils.ts | sSDot":{"message":"{PH1}。{PH2}"},"panels/timeline/TimelineUIUtils.ts | sSSquareBrackets":{"message":"{PH1} [{PH2}…]"},"panels/timeline/TimelineUIUtils.ts | sSelf":{"message":"{PH1}(自身)"},"panels/timeline/TimelineUIUtils.ts | sSs":{"message":"{PH1} [{PH2}…{PH3}]"},"panels/timeline/TimelineUIUtils.ts | sTookS":{"message":"{PH1}耗时 {PH2}。"},"panels/timeline/TimelineUIUtils.ts | scheduleStyleRecalculation":{"message":"安排重新计算样式的时间"},"panels/timeline/TimelineUIUtils.ts | score":{"message":"得分"},"panels/timeline/TimelineUIUtils.ts | script":{"message":"脚本"},"panels/timeline/TimelineUIUtils.ts | scriptLoadedFromCache":{"message":"已从缓存加载脚本"},"panels/timeline/TimelineUIUtils.ts | scriptNotEligible":{"message":"脚本不符合条件"},"panels/timeline/TimelineUIUtils.ts | scripting":{"message":"正在执行脚本"},"panels/timeline/TimelineUIUtils.ts | scroll":{"message":"滚动"},"panels/timeline/TimelineUIUtils.ts | selfTime":{"message":"自身耗时"},"panels/timeline/TimelineUIUtils.ts | sendRequest":{"message":"发送请求"},"panels/timeline/TimelineUIUtils.ts | sendWebsocketHandshake":{"message":"发送 WebSocket 握手"},"panels/timeline/TimelineUIUtils.ts | show":{"message":"显示"},"panels/timeline/TimelineUIUtils.ts | sign":{"message":"签名"},"panels/timeline/TimelineUIUtils.ts | signReply":{"message":"签名回复"},"panels/timeline/TimelineUIUtils.ts | size":{"message":"大小"},"panels/timeline/TimelineUIUtils.ts | stackTrace":{"message":"堆栈轨迹"},"panels/timeline/TimelineUIUtils.ts | stackTraceColon":{"message":"堆栈轨迹:"},"panels/timeline/TimelineUIUtils.ts | state":{"message":"状态"},"panels/timeline/TimelineUIUtils.ts | statusCode":{"message":"状态代码"},"panels/timeline/TimelineUIUtils.ts | streamed":{"message":"流式"},"panels/timeline/TimelineUIUtils.ts | streamingCompileTask":{"message":"流式编译任务"},"panels/timeline/TimelineUIUtils.ts | streamingWasmResponse":{"message":"流式 Wasm 响应"},"panels/timeline/TimelineUIUtils.ts | styleInvalidations":{"message":"样式失效"},"panels/timeline/TimelineUIUtils.ts | stylesheetUrl":{"message":"样式表网址"},"panels/timeline/TimelineUIUtils.ts | system":{"message":"系统"},"panels/timeline/TimelineUIUtils.ts | task":{"message":"任务"},"panels/timeline/TimelineUIUtils.ts | timeSpentInRendering":{"message":"渲染耗时"},"panels/timeline/TimelineUIUtils.ts | timeout":{"message":"超时时限"},"panels/timeline/TimelineUIUtils.ts | timerFired":{"message":"定时器已触发"},"panels/timeline/TimelineUIUtils.ts | timerId":{"message":"定时器 ID"},"panels/timeline/TimelineUIUtils.ts | timerInstalled":{"message":"定时器已安装"},"panels/timeline/TimelineUIUtils.ts | timestamp":{"message":"时间戳"},"panels/timeline/TimelineUIUtils.ts | totalTime":{"message":"总时间"},"panels/timeline/TimelineUIUtils.ts | type":{"message":"类型"},"panels/timeline/TimelineUIUtils.ts | unknown":{"message":"未知"},"panels/timeline/TimelineUIUtils.ts | unknownCause":{"message":"未知原因"},"panels/timeline/TimelineUIUtils.ts | updateLayer":{"message":"更新图层"},"panels/timeline/TimelineUIUtils.ts | updateLayerTree":{"message":"更新图层树"},"panels/timeline/TimelineUIUtils.ts | url":{"message":"网址"},"panels/timeline/TimelineUIUtils.ts | userTiming":{"message":"用户计时"},"panels/timeline/TimelineUIUtils.ts | verify":{"message":"验证"},"panels/timeline/TimelineUIUtils.ts | verifyReply":{"message":"验证回复"},"panels/timeline/TimelineUIUtils.ts | waitingForNetwork":{"message":"正在等待连接到网络"},"panels/timeline/TimelineUIUtils.ts | warning":{"message":"警告"},"panels/timeline/TimelineUIUtils.ts | wasmModuleCacheHit":{"message":"Wasm 模块缓存命中"},"panels/timeline/TimelineUIUtils.ts | wasmModuleCacheInvalid":{"message":"Wasm 模块缓存无效"},"panels/timeline/TimelineUIUtils.ts | websocketProtocol":{"message":"WebSocket 协议"},"panels/timeline/TimelineUIUtils.ts | willSendRequest":{"message":"将发送请求"},"panels/timeline/TimelineUIUtils.ts | xhrLoad":{"message":"XHR 加载"},"panels/timeline/TimelineUIUtils.ts | xhrReadyStateChange":{"message":"XHR 就绪状态变更"},"panels/timeline/TimelineUIUtils.ts | yes":{"message":"是"},"panels/timeline/TimingsTrackAppender.ts | timings":{"message":"时间"},"panels/timeline/UIDevtoolsUtils.ts | drawFrame":{"message":"绘制帧"},"panels/timeline/UIDevtoolsUtils.ts | drawing":{"message":"正在绘制"},"panels/timeline/UIDevtoolsUtils.ts | frameStart":{"message":"开始显示帧"},"panels/timeline/UIDevtoolsUtils.ts | idle":{"message":"空闲"},"panels/timeline/UIDevtoolsUtils.ts | layout":{"message":"布局"},"panels/timeline/UIDevtoolsUtils.ts | painting":{"message":"正在绘制"},"panels/timeline/UIDevtoolsUtils.ts | rasterizing":{"message":"正在光栅化"},"panels/timeline/UIDevtoolsUtils.ts | system":{"message":"系统"},"panels/timeline/timeline-meta.ts | hideChromeFrameInLayersView":{"message":"在“图层”视图中隐藏 chrome 框架"},"panels/timeline/timeline-meta.ts | javascriptProfiler":{"message":"JavaScript 性能分析器"},"panels/timeline/timeline-meta.ts | loadProfile":{"message":"加载性能分析报告…"},"panels/timeline/timeline-meta.ts | nextFrame":{"message":"下一帧"},"panels/timeline/timeline-meta.ts | nextRecording":{"message":"下一项录制内容"},"panels/timeline/timeline-meta.ts | performance":{"message":"性能"},"panels/timeline/timeline-meta.ts | previousFrame":{"message":"上一帧"},"panels/timeline/timeline-meta.ts | previousRecording":{"message":"上一项录制内容"},"panels/timeline/timeline-meta.ts | record":{"message":"录制"},"panels/timeline/timeline-meta.ts | saveProfile":{"message":"保存性能分析报告…"},"panels/timeline/timeline-meta.ts | showJavascriptProfiler":{"message":"显示“JavaScript 性能剖析器”"},"panels/timeline/timeline-meta.ts | showPerformance":{"message":"显示“性能”工具"},"panels/timeline/timeline-meta.ts | showRecentTimelineSessions":{"message":"显示近期时间轴会话"},"panels/timeline/timeline-meta.ts | startProfilingAndReloadPage":{"message":"开始分析并重新加载网页"},"panels/timeline/timeline-meta.ts | startStopRecording":{"message":"开始/停止录制"},"panels/timeline/timeline-meta.ts | stop":{"message":"停止"},"panels/web_audio/AudioContextContentBuilder.ts | callbackBufferSize":{"message":"回调缓冲区空间"},"panels/web_audio/AudioContextContentBuilder.ts | callbackInterval":{"message":"回调时间间隔"},"panels/web_audio/AudioContextContentBuilder.ts | currentTime":{"message":"当前时间"},"panels/web_audio/AudioContextContentBuilder.ts | maxOutputChannels":{"message":"最大输出声道"},"panels/web_audio/AudioContextContentBuilder.ts | renderCapacity":{"message":"渲染能力"},"panels/web_audio/AudioContextContentBuilder.ts | sampleRate":{"message":"采样率"},"panels/web_audio/AudioContextContentBuilder.ts | state":{"message":"状态"},"panels/web_audio/AudioContextSelector.ts | audioContextS":{"message":"音频情境:{PH1}"},"panels/web_audio/AudioContextSelector.ts | noRecordings":{"message":"(无录制内容)"},"panels/web_audio/WebAudioView.ts | openAPageThatUsesWebAudioApiTo":{"message":"打开使用 Web Audio API 的网页开始监控。"},"panels/web_audio/web_audio-meta.ts | audio":{"message":"audio"},"panels/web_audio/web_audio-meta.ts | showWebaudio":{"message":"显示 WebAudio"},"panels/web_audio/web_audio-meta.ts | webaudio":{"message":"WebAudio"},"panels/webauthn/WebauthnPane.ts | actions":{"message":"操作"},"panels/webauthn/WebauthnPane.ts | active":{"message":"活跃"},"panels/webauthn/WebauthnPane.ts | add":{"message":"添加"},"panels/webauthn/WebauthnPane.ts | addAuthenticator":{"message":"添加身份验证器"},"panels/webauthn/WebauthnPane.ts | authenticatorS":{"message":"身份验证器 {PH1}"},"panels/webauthn/WebauthnPane.ts | credentials":{"message":"凭据"},"panels/webauthn/WebauthnPane.ts | editName":{"message":"修改名称"},"panels/webauthn/WebauthnPane.ts | enableVirtualAuthenticator":{"message":"启用虚拟身份验证器环境"},"panels/webauthn/WebauthnPane.ts | export":{"message":"导出"},"panels/webauthn/WebauthnPane.ts | id":{"message":"ID"},"panels/webauthn/WebauthnPane.ts | isResident":{"message":"为常驻凭据"},"panels/webauthn/WebauthnPane.ts | learnMore":{"message":"了解详情"},"panels/webauthn/WebauthnPane.ts | newAuthenticator":{"message":"新建身份验证器"},"panels/webauthn/WebauthnPane.ts | no":{"message":"否"},"panels/webauthn/WebauthnPane.ts | noCredentialsTryCallingSFromYour":{"message":"没有凭据。请尝试从您的网站调用 {PH1}。"},"panels/webauthn/WebauthnPane.ts | privateKeypem":{"message":"私钥.pem"},"panels/webauthn/WebauthnPane.ts | protocol":{"message":"协议"},"panels/webauthn/WebauthnPane.ts | remove":{"message":"移除"},"panels/webauthn/WebauthnPane.ts | rpId":{"message":"依赖方 ID"},"panels/webauthn/WebauthnPane.ts | saveName":{"message":"保存名称"},"panels/webauthn/WebauthnPane.ts | setSAsTheActiveAuthenticator":{"message":"将{PH1} 设为有效的身份验证器"},"panels/webauthn/WebauthnPane.ts | signCount":{"message":"签名数量"},"panels/webauthn/WebauthnPane.ts | supportsLargeBlob":{"message":"支持大型 blob"},"panels/webauthn/WebauthnPane.ts | supportsResidentKeys":{"message":"支持常驻密钥"},"panels/webauthn/WebauthnPane.ts | supportsUserVerification":{"message":"支持用户验证"},"panels/webauthn/WebauthnPane.ts | transport":{"message":"传输"},"panels/webauthn/WebauthnPane.ts | useWebauthnForPhishingresistant":{"message":"使用 WebAuthn 进行身份验证以防网上诱骗"},"panels/webauthn/WebauthnPane.ts | userHandle":{"message":"用户处理"},"panels/webauthn/WebauthnPane.ts | uuid":{"message":"UUID"},"panels/webauthn/WebauthnPane.ts | yes":{"message":"是"},"panels/webauthn/webauthn-meta.ts | showWebauthn":{"message":"显示 WebAuthn"},"panels/webauthn/webauthn-meta.ts | webauthn":{"message":"WebAuthn"},"ui/components/data_grid/DataGrid.ts | enterToSort":{"message":"列排序状态:{PH1}。按 Enter 键即可应用排序过滤条件"},"ui/components/data_grid/DataGrid.ts | headerOptions":{"message":"标头选项"},"ui/components/data_grid/DataGrid.ts | resetColumns":{"message":"重置列"},"ui/components/data_grid/DataGrid.ts | sortAsc":{"message":"升序"},"ui/components/data_grid/DataGrid.ts | sortBy":{"message":"排序依据"},"ui/components/data_grid/DataGrid.ts | sortDesc":{"message":"降序"},"ui/components/data_grid/DataGrid.ts | sortNone":{"message":"无"},"ui/components/data_grid/DataGridController.ts | sortInAscendingOrder":{"message":"{PH1} 目前是按升序排序"},"ui/components/data_grid/DataGridController.ts | sortInDescendingOrder":{"message":"{PH1} 目前是按降序排序"},"ui/components/data_grid/DataGridController.ts | sortingCanceled":{"message":"已取消{PH1}排序"},"ui/components/dialogs/ShortcutDialog.ts | close":{"message":"关闭"},"ui/components/dialogs/ShortcutDialog.ts | dialogTitle":{"message":"键盘快捷键"},"ui/components/dialogs/ShortcutDialog.ts | showShortcutTitle":{"message":"显示快捷键"},"ui/components/diff_view/DiffView.ts | SkippingDMatchingLines":{"message":"(…正在跳过 {PH1} 个匹配行…)"},"ui/components/diff_view/DiffView.ts | additions":{"message":"添加的项:"},"ui/components/diff_view/DiffView.ts | changesDiffViewer":{"message":"更改差异查看器"},"ui/components/diff_view/DiffView.ts | deletions":{"message":"删除的项:"},"ui/components/issue_counter/IssueCounter.ts | breakingChanges":{"message":"{issueCount,plural, =1{# 项破坏性更改}other{# 项破坏性更改}}"},"ui/components/issue_counter/IssueCounter.ts | pageErrors":{"message":"{issueCount,plural, =1{# 个网页错误}other{# 个网页错误}}"},"ui/components/issue_counter/IssueCounter.ts | possibleImprovements":{"message":"{issueCount,plural, =1{# 个可以改进的问题}other{# 个可以改进的问题}}"},"ui/components/issue_counter/IssueLinkIcon.ts | clickToShowIssue":{"message":"点击即可在“问题”标签页中显示问题"},"ui/components/issue_counter/IssueLinkIcon.ts | clickToShowIssueWithTitle":{"message":"点击即可打开“问题”标签页并显示问题“{title}”"},"ui/components/issue_counter/IssueLinkIcon.ts | issueUnavailable":{"message":"目前无法解决的问题"},"ui/components/linear_memory_inspector/LinearMemoryHighlightChipList.ts | deleteHighlight":{"message":"停止突出显示此内存"},"ui/components/linear_memory_inspector/LinearMemoryHighlightChipList.ts | jumpToAddress":{"message":"跳转到此内存"},"ui/components/linear_memory_inspector/LinearMemoryInspector.ts | addressHasToBeANumberBetweenSAnd":{"message":"地址必须是一个介于 {PH1} 和 {PH2} 之间的数字"},"ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts | couldNotOpenLinearMemory":{"message":"无法打开线性内存检查器:无法找到缓冲区。"},"ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts | noOpenInspections":{"message":"没有待处理的检查"},"ui/components/linear_memory_inspector/LinearMemoryNavigator.ts | enterAddress":{"message":"输入地址"},"ui/components/linear_memory_inspector/LinearMemoryNavigator.ts | goBackInAddressHistory":{"message":"回顾地址历史记录"},"ui/components/linear_memory_inspector/LinearMemoryNavigator.ts | goForwardInAddressHistory":{"message":"在地址历史记录中前进"},"ui/components/linear_memory_inspector/LinearMemoryNavigator.ts | nextPage":{"message":"下一页"},"ui/components/linear_memory_inspector/LinearMemoryNavigator.ts | previousPage":{"message":"上一页"},"ui/components/linear_memory_inspector/LinearMemoryNavigator.ts | refresh":{"message":"刷新"},"ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.ts | changeEndianness":{"message":"更改Endianness"},"ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.ts | toggleValueTypeSettings":{"message":"开启/关闭值类型设置"},"ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts | addressOutOfRange":{"message":"地址超出内存范围"},"ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts | changeValueTypeMode":{"message":"更改模式"},"ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts | jumpToPointer":{"message":"跳转到地址"},"ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts | signedValue":{"message":"Signed的值"},"ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts | unsignedValue":{"message":"Unsigned的值"},"ui/components/linear_memory_inspector/ValueInterpreterDisplayUtils.ts | notApplicable":{"message":"不适用"},"ui/components/linear_memory_inspector/ValueInterpreterSettings.ts | otherGroup":{"message":"其他"},"ui/components/linear_memory_inspector/linear_memory_inspector-meta.ts | memoryInspector":{"message":"内存检查器"},"ui/components/linear_memory_inspector/linear_memory_inspector-meta.ts | showMemoryInspector":{"message":"显示“内存检查器”"},"ui/components/panel_feedback/FeedbackButton.ts | feedback":{"message":"反馈"},"ui/components/panel_feedback/PanelFeedback.ts | previewFeature":{"message":"试用型功能"},"ui/components/panel_feedback/PanelFeedback.ts | previewText":{"message":"我们的团队正在努力完善此功能,期待您与我们分享您的想法。"},"ui/components/panel_feedback/PanelFeedback.ts | previewTextFeedbackLink":{"message":"向我们提供反馈。"},"ui/components/panel_feedback/PanelFeedback.ts | videoAndDocumentation":{"message":"视频和文档"},"ui/components/panel_feedback/PreviewToggle.ts | learnMoreLink":{"message":"了解详情"},"ui/components/panel_feedback/PreviewToggle.ts | previewTextFeedbackLink":{"message":"向我们提供反馈。"},"ui/components/panel_feedback/PreviewToggle.ts | shortFeedbackLink":{"message":"发送反馈"},"ui/components/request_link_icon/RequestLinkIcon.ts | clickToShowRequestInTheNetwork":{"message":"点击即可打开“网络”面板并显示网址请求:{url}"},"ui/components/request_link_icon/RequestLinkIcon.ts | requestUnavailableInTheNetwork":{"message":"无法在“网络”面板中显示相应请求,请尝试重新加载要检查的网页"},"ui/components/request_link_icon/RequestLinkIcon.ts | shortenedURL":{"message":"缩短后的网址"},"ui/components/survey_link/SurveyLink.ts | anErrorOccurredWithTheSurvey":{"message":"调查问卷发生错误"},"ui/components/survey_link/SurveyLink.ts | openingSurvey":{"message":"正在打开调查问卷…"},"ui/components/survey_link/SurveyLink.ts | thankYouForYourFeedback":{"message":"感谢您的反馈"},"ui/components/text_editor/config.ts | codeEditor":{"message":"代码编辑器"},"ui/components/text_editor/config.ts | sSuggestionSOfS":{"message":"{PH1},这是第 {PH2} 条建议,共 {PH3} 条"},"ui/legacy/ActionRegistration.ts | background_services":{"message":"后台服务"},"ui/legacy/ActionRegistration.ts | console":{"message":"控制台"},"ui/legacy/ActionRegistration.ts | debugger":{"message":"调试程序"},"ui/legacy/ActionRegistration.ts | drawer":{"message":"抽屉式导航栏"},"ui/legacy/ActionRegistration.ts | elements":{"message":"元素"},"ui/legacy/ActionRegistration.ts | global":{"message":"全局"},"ui/legacy/ActionRegistration.ts | help":{"message":"帮助"},"ui/legacy/ActionRegistration.ts | javascript_profiler":{"message":"JavaScript 性能分析器"},"ui/legacy/ActionRegistration.ts | layers":{"message":"图层"},"ui/legacy/ActionRegistration.ts | memory":{"message":"内存"},"ui/legacy/ActionRegistration.ts | mobile":{"message":"移动设备"},"ui/legacy/ActionRegistration.ts | navigation":{"message":"导航"},"ui/legacy/ActionRegistration.ts | network":{"message":"网络"},"ui/legacy/ActionRegistration.ts | performance":{"message":"性能"},"ui/legacy/ActionRegistration.ts | rendering":{"message":"渲染"},"ui/legacy/ActionRegistration.ts | resources":{"message":"资源"},"ui/legacy/ActionRegistration.ts | screenshot":{"message":"屏幕截图"},"ui/legacy/ActionRegistration.ts | settings":{"message":"设置"},"ui/legacy/ActionRegistration.ts | sources":{"message":"来源"},"ui/legacy/DockController.ts | close":{"message":"关闭"},"ui/legacy/DockController.ts | devToolsDockedTo":{"message":"开发者工具已停靠至{PH1}"},"ui/legacy/DockController.ts | devtoolsUndocked":{"message":"已取消停靠开发者工具"},"ui/legacy/DockController.ts | dockToBottom":{"message":"停靠至底部"},"ui/legacy/DockController.ts | dockToLeft":{"message":"停靠至左侧"},"ui/legacy/DockController.ts | dockToRight":{"message":"停靠至右侧"},"ui/legacy/DockController.ts | undockIntoSeparateWindow":{"message":"取消停靠至单独的窗口"},"ui/legacy/EmptyWidget.ts | learnMore":{"message":"了解详情"},"ui/legacy/FilterBar.ts | allStrings":{"message":"全部"},"ui/legacy/FilterBar.ts | clearFilter":{"message":"清除输入的内容"},"ui/legacy/FilterBar.ts | egSmalldUrlacomb":{"message":"例如:/small[d]+/ url:a.com/b"},"ui/legacy/FilterBar.ts | filter":{"message":"过滤"},"ui/legacy/FilterBar.ts | sclickToSelectMultipleTypes":{"message":"{PH1}点击可选择多个类型"},"ui/legacy/Infobar.ts | close":{"message":"关闭"},"ui/legacy/Infobar.ts | dontShowAgain":{"message":"不再显示"},"ui/legacy/Infobar.ts | learnMore":{"message":"了解详情"},"ui/legacy/InspectorView.ts | closeDrawer":{"message":"关闭抽屉栏"},"ui/legacy/InspectorView.ts | devToolsLanguageMissmatch":{"message":"DevTools 现已支持{PH1}!"},"ui/legacy/InspectorView.ts | drawer":{"message":"工具抽屉式导航栏"},"ui/legacy/InspectorView.ts | drawerHidden":{"message":"已隐藏抽屉式导航栏"},"ui/legacy/InspectorView.ts | drawerShown":{"message":"已显示抽屉式导航栏"},"ui/legacy/InspectorView.ts | mainToolbar":{"message":"主工具栏"},"ui/legacy/InspectorView.ts | moreTools":{"message":"更多工具"},"ui/legacy/InspectorView.ts | moveToBottom":{"message":"移至底部"},"ui/legacy/InspectorView.ts | moveToTop":{"message":"移至顶部"},"ui/legacy/InspectorView.ts | panels":{"message":"面板"},"ui/legacy/InspectorView.ts | reloadDevtools":{"message":"重新加载 DevTools"},"ui/legacy/InspectorView.ts | selectFolder":{"message":"选择文件夹"},"ui/legacy/InspectorView.ts | selectOverrideFolder":{"message":"选择要用来存储替换文件的文件夹。"},"ui/legacy/InspectorView.ts | setToBrowserLanguage":{"message":"始终以 Chrome 所用的语言显示"},"ui/legacy/InspectorView.ts | setToSpecificLanguage":{"message":"将 DevTools 切换为{PH1}版"},"ui/legacy/ListWidget.ts | addString":{"message":"添加"},"ui/legacy/ListWidget.ts | cancelString":{"message":"取消"},"ui/legacy/ListWidget.ts | editString":{"message":"修改"},"ui/legacy/ListWidget.ts | removeString":{"message":"移除"},"ui/legacy/ListWidget.ts | saveString":{"message":"保存"},"ui/legacy/RemoteDebuggingTerminatedScreen.ts | debuggingConnectionWasClosed":{"message":"调试连接已关闭。原因: "},"ui/legacy/RemoteDebuggingTerminatedScreen.ts | reconnectDevtools":{"message":"重新连接 DevTools"},"ui/legacy/RemoteDebuggingTerminatedScreen.ts | reconnectWhenReadyByReopening":{"message":"准备就绪时,打开 DevTools 即可重新连接。"},"ui/legacy/SearchableView.ts | cancel":{"message":"取消"},"ui/legacy/SearchableView.ts | dMatches":{"message":"{PH1} 条匹配结果"},"ui/legacy/SearchableView.ts | dOfD":{"message":"{PH1} 个(共 {PH2} 个)"},"ui/legacy/SearchableView.ts | findString":{"message":"查找"},"ui/legacy/SearchableView.ts | matchCase":{"message":"匹配大小写"},"ui/legacy/SearchableView.ts | matchString":{"message":"1 个匹配项"},"ui/legacy/SearchableView.ts | replace":{"message":"替换"},"ui/legacy/SearchableView.ts | replaceAll":{"message":"全部替换"},"ui/legacy/SearchableView.ts | searchNext":{"message":"搜索下一个"},"ui/legacy/SearchableView.ts | searchPrevious":{"message":"搜索上一个"},"ui/legacy/SearchableView.ts | useRegularExpression":{"message":"使用正则表达式"},"ui/legacy/SettingsUI.ts | oneOrMoreSettingsHaveChanged":{"message":"一项或多项设置已更改,需要重新加载才能生效。"},"ui/legacy/SettingsUI.ts | srequiresReload":{"message":"*需要重新加载"},"ui/legacy/SoftContextMenu.ts | checked":{"message":"已勾选"},"ui/legacy/SoftContextMenu.ts | sS":{"message":"{PH1}、{PH2}"},"ui/legacy/SoftContextMenu.ts | sSS":{"message":"{PH1},{PH2},{PH3}"},"ui/legacy/SoftContextMenu.ts | unchecked":{"message":"未选中"},"ui/legacy/SoftDropDown.ts | noItemSelected":{"message":"(未选择任何条目)"},"ui/legacy/SuggestBox.ts | sSuggestionSOfS":{"message":"{PH1},这是第 {PH2} 条建议,共 {PH3} 条"},"ui/legacy/SuggestBox.ts | sSuggestionSSelected":{"message":"{PH1},这条建议已被选中"},"ui/legacy/TabbedPane.ts | close":{"message":"关闭"},"ui/legacy/TabbedPane.ts | closeAll":{"message":"全部关闭"},"ui/legacy/TabbedPane.ts | closeOthers":{"message":"关闭其他标签页"},"ui/legacy/TabbedPane.ts | closeS":{"message":"关闭{PH1}"},"ui/legacy/TabbedPane.ts | closeTabsToTheRight":{"message":"关闭右侧标签页"},"ui/legacy/TabbedPane.ts | moreTabs":{"message":"更多标签页"},"ui/legacy/TabbedPane.ts | previewFeature":{"message":"试用型功能"},"ui/legacy/TargetCrashedScreen.ts | devtoolsWasDisconnectedFromThe":{"message":"DevTools 与网页的连接已断开。"},"ui/legacy/TargetCrashedScreen.ts | oncePageIsReloadedDevtoolsWill":{"message":"网页重新加载后,DevTools 会自动重新连接。"},"ui/legacy/Toolbar.ts | clearInput":{"message":"清除输入的内容"},"ui/legacy/Toolbar.ts | notPressed":{"message":"未按下"},"ui/legacy/Toolbar.ts | pressed":{"message":"已按下"},"ui/legacy/UIUtils.ts | anonymous":{"message":"(匿名)"},"ui/legacy/UIUtils.ts | anotherProfilerIsAlreadyActive":{"message":"已激活另一个性能剖析器"},"ui/legacy/UIUtils.ts | asyncCall":{"message":"异步调用"},"ui/legacy/UIUtils.ts | cancel":{"message":"取消"},"ui/legacy/UIUtils.ts | close":{"message":"关闭"},"ui/legacy/UIUtils.ts | copyFileName":{"message":"复制文件名"},"ui/legacy/UIUtils.ts | copyLinkAddress":{"message":"复制链接地址"},"ui/legacy/UIUtils.ts | ok":{"message":"确定"},"ui/legacy/UIUtils.ts | openInNewTab":{"message":"在新标签页中打开"},"ui/legacy/UIUtils.ts | promiseRejectedAsync":{"message":"Promise 遭拒(异步)"},"ui/legacy/UIUtils.ts | promiseResolvedAsync":{"message":"Promise 已解析(异步)"},"ui/legacy/UIUtils.ts | sAsync":{"message":"{PH1}(异步)"},"ui/legacy/ViewManager.ts | sPanel":{"message":"{PH1}面板"},"ui/legacy/ViewRegistration.ts | drawer":{"message":"抽屉式导航栏"},"ui/legacy/ViewRegistration.ts | drawer_sidebar":{"message":"抽屉式导航栏边栏"},"ui/legacy/ViewRegistration.ts | elements":{"message":"元素"},"ui/legacy/ViewRegistration.ts | network":{"message":"网络"},"ui/legacy/ViewRegistration.ts | panel":{"message":"面板"},"ui/legacy/ViewRegistration.ts | settings":{"message":"设置"},"ui/legacy/ViewRegistration.ts | sources":{"message":"来源"},"ui/legacy/components/color_picker/ContrastDetails.ts | aa":{"message":"AA"},"ui/legacy/components/color_picker/ContrastDetails.ts | aaa":{"message":"AAA"},"ui/legacy/components/color_picker/ContrastDetails.ts | apca":{"message":"APCA"},"ui/legacy/components/color_picker/ContrastDetails.ts | contrastRatio":{"message":"对比度"},"ui/legacy/components/color_picker/ContrastDetails.ts | noContrastInformationAvailable":{"message":"没有可用的对比度信息"},"ui/legacy/components/color_picker/ContrastDetails.ts | pickBackgroundColor":{"message":"选择背景颜色"},"ui/legacy/components/color_picker/ContrastDetails.ts | placeholderWithColon":{"message":":{PH1}"},"ui/legacy/components/color_picker/ContrastDetails.ts | showLess":{"message":"收起"},"ui/legacy/components/color_picker/ContrastDetails.ts | showMore":{"message":"展开"},"ui/legacy/components/color_picker/ContrastDetails.ts | toggleBackgroundColorPicker":{"message":"切换背景颜色选择器"},"ui/legacy/components/color_picker/ContrastDetails.ts | useSuggestedColorStoFixLow":{"message":"使用建议的颜色 {PH1} 修正低对比度问题"},"ui/legacy/components/color_picker/FormatPickerContextMenu.ts | colorClippedTooltipText":{"message":"为了与格式的色域匹配,系统移除了此颜色。实际结果为 {PH1}"},"ui/legacy/components/color_picker/Spectrum.ts | addToPalette":{"message":"添加到调色板"},"ui/legacy/components/color_picker/Spectrum.ts | changeAlpha":{"message":"更改 Alpha"},"ui/legacy/components/color_picker/Spectrum.ts | changeColorFormat":{"message":"更改颜色格式"},"ui/legacy/components/color_picker/Spectrum.ts | changeHue":{"message":"更改色调"},"ui/legacy/components/color_picker/Spectrum.ts | clearPalette":{"message":"清除调色板"},"ui/legacy/components/color_picker/Spectrum.ts | colorPalettes":{"message":"调色板"},"ui/legacy/components/color_picker/Spectrum.ts | colorS":{"message":"颜色 {PH1}"},"ui/legacy/components/color_picker/Spectrum.ts | copyColorToClipboard":{"message":"将颜色复制到剪贴板"},"ui/legacy/components/color_picker/Spectrum.ts | hex":{"message":"十六进制"},"ui/legacy/components/color_picker/Spectrum.ts | longclickOrLongpressSpaceToShow":{"message":"长按空格键即可显示 {PH1} 的替代阴影"},"ui/legacy/components/color_picker/Spectrum.ts | pressArrowKeysMessage":{"message":"按箭头键(无论是否带辅助键)可移动色样位置。将箭头键与 Shift 键搭配使用可大幅移动位置,将箭头键与 Ctrl 键搭配使用可缩小位移幅度,将箭头键与 Alt 键搭配使用可进一步缩小位移幅度"},"ui/legacy/components/color_picker/Spectrum.ts | previewPalettes":{"message":"预览调色板"},"ui/legacy/components/color_picker/Spectrum.ts | removeAllToTheRight":{"message":"移除右侧的所有颜色"},"ui/legacy/components/color_picker/Spectrum.ts | removeColor":{"message":"移除颜色"},"ui/legacy/components/color_picker/Spectrum.ts | returnToColorPicker":{"message":"返回颜色选择器"},"ui/legacy/components/color_picker/Spectrum.ts | sInS":{"message":"{PH2} 中的 {PH1}"},"ui/legacy/components/color_picker/Spectrum.ts | toggleColorPicker":{"message":"颜色提取器 [{PH1}]"},"ui/legacy/components/cookie_table/CookiesTable.ts | cookies":{"message":"Cookie"},"ui/legacy/components/cookie_table/CookiesTable.ts | editableCookies":{"message":"可修改的 Cookie"},"ui/legacy/components/cookie_table/CookiesTable.ts | na":{"message":"不适用"},"ui/legacy/components/cookie_table/CookiesTable.ts | name":{"message":"名称"},"ui/legacy/components/cookie_table/CookiesTable.ts | opaquePartitionKey":{"message":"(不透明)"},"ui/legacy/components/cookie_table/CookiesTable.ts | session":{"message":"会话"},"ui/legacy/components/cookie_table/CookiesTable.ts | showIssueAssociatedWithThis":{"message":"显示与此 Cookie 相关的问题"},"ui/legacy/components/cookie_table/CookiesTable.ts | showRequestsWithThisCookie":{"message":"显示涉及此 Cookie 的请求"},"ui/legacy/components/cookie_table/CookiesTable.ts | size":{"message":"大小"},"ui/legacy/components/cookie_table/CookiesTable.ts | sourcePortTooltip":{"message":"显示先前设定 Cookie 的来源端口(范围为 1-65535)。如果端口未知,则显示为 -1。"},"ui/legacy/components/cookie_table/CookiesTable.ts | sourceSchemeTooltip":{"message":"显示先前设定 Cookie 的来源架构(Secure、NonSecure)。如果架构未知,则显示为“Unset”。"},"ui/legacy/components/cookie_table/CookiesTable.ts | timeAfter":{"message":"{date}之后"},"ui/legacy/components/cookie_table/CookiesTable.ts | timeAfterTooltip":{"message":"到期日期时间戳是 {seconds},对应于 {date} 之后的一个日期"},"ui/legacy/components/cookie_table/CookiesTable.ts | value":{"message":"值"},"ui/legacy/components/data_grid/DataGrid.ts | addNew":{"message":"新增"},"ui/legacy/components/data_grid/DataGrid.ts | checked":{"message":"已勾选"},"ui/legacy/components/data_grid/DataGrid.ts | collapsed":{"message":"已收起"},"ui/legacy/components/data_grid/DataGrid.ts | delete":{"message":"删除"},"ui/legacy/components/data_grid/DataGrid.ts | editS":{"message":"修改“{PH1}”"},"ui/legacy/components/data_grid/DataGrid.ts | emptyRowCreated":{"message":"已创建一个空的表格行。您可以双击此行或使用上下文菜单进行编辑。"},"ui/legacy/components/data_grid/DataGrid.ts | expanded":{"message":"已展开"},"ui/legacy/components/data_grid/DataGrid.ts | headerOptions":{"message":"标头选项"},"ui/legacy/components/data_grid/DataGrid.ts | levelS":{"message":"级别 {PH1}"},"ui/legacy/components/data_grid/DataGrid.ts | refresh":{"message":"刷新"},"ui/legacy/components/data_grid/DataGrid.ts | resetColumns":{"message":"重置列"},"ui/legacy/components/data_grid/DataGrid.ts | rowsS":{"message":"行数:{PH1}"},"ui/legacy/components/data_grid/DataGrid.ts | sRowS":{"message":"{PH1}行{PH2}"},"ui/legacy/components/data_grid/DataGrid.ts | sSUseTheUpAndDownArrowKeysTo":{"message":"{PH1} {PH2},使用向上和向下箭头键可浏览表格中的各行并与之交互;使用浏览模式可逐个读取单元格。"},"ui/legacy/components/data_grid/DataGrid.ts | sortByString":{"message":"排序依据"},"ui/legacy/components/data_grid/ShowMoreDataGridNode.ts | showAllD":{"message":"显示全部 {PH1} 项"},"ui/legacy/components/data_grid/ShowMoreDataGridNode.ts | showDAfter":{"message":"显示后 {PH1} 项"},"ui/legacy/components/data_grid/ShowMoreDataGridNode.ts | showDBefore":{"message":"显示前 {PH1} 项"},"ui/legacy/components/data_grid/ViewportDataGrid.ts | collapsed":{"message":"已收起"},"ui/legacy/components/inline_editor/CSSShadowEditor.ts | blur":{"message":"模糊"},"ui/legacy/components/inline_editor/CSSShadowEditor.ts | spread":{"message":"扩展"},"ui/legacy/components/inline_editor/CSSShadowEditor.ts | type":{"message":"类型"},"ui/legacy/components/inline_editor/CSSShadowEditor.ts | xOffset":{"message":"X 轴偏移"},"ui/legacy/components/inline_editor/CSSShadowEditor.ts | yOffset":{"message":"Y 轴偏移"},"ui/legacy/components/inline_editor/ColorSwatch.ts | shiftclickToChangeColorFormat":{"message":"按住 Shift 并点击即可更改颜色格式"},"ui/legacy/components/inline_editor/FontEditor.ts | PleaseEnterAValidValueForSText":{"message":"* 请为 {PH1} 文本输入指定有效值"},"ui/legacy/components/inline_editor/FontEditor.ts | cssProperties":{"message":"CSS 属性"},"ui/legacy/components/inline_editor/FontEditor.ts | deleteS":{"message":"删除 {PH1}"},"ui/legacy/components/inline_editor/FontEditor.ts | fallbackS":{"message":"后备选择器 {PH1}"},"ui/legacy/components/inline_editor/FontEditor.ts | fontFamily":{"message":"字体系列"},"ui/legacy/components/inline_editor/FontEditor.ts | fontSelectorDeletedAtIndexS":{"message":"已删除索引 {PH1} 处的字体选择器"},"ui/legacy/components/inline_editor/FontEditor.ts | fontSize":{"message":"字号"},"ui/legacy/components/inline_editor/FontEditor.ts | fontWeight":{"message":"字体粗细"},"ui/legacy/components/inline_editor/FontEditor.ts | lineHeight":{"message":"行高"},"ui/legacy/components/inline_editor/FontEditor.ts | sKeyValueSelector":{"message":"{PH1}键值对选择器"},"ui/legacy/components/inline_editor/FontEditor.ts | sSliderInput":{"message":"{PH1}滑块输入"},"ui/legacy/components/inline_editor/FontEditor.ts | sTextInput":{"message":"{PH1} 文本输入"},"ui/legacy/components/inline_editor/FontEditor.ts | sToggleInputType":{"message":"{PH1} 切换输入类型"},"ui/legacy/components/inline_editor/FontEditor.ts | sUnitInput":{"message":"{PH1}单位输入"},"ui/legacy/components/inline_editor/FontEditor.ts | selectorInputMode":{"message":"选择器输入法"},"ui/legacy/components/inline_editor/FontEditor.ts | sliderInputMode":{"message":"滑块输入法"},"ui/legacy/components/inline_editor/FontEditor.ts | spacing":{"message":"间距"},"ui/legacy/components/inline_editor/FontEditor.ts | thereIsNoValueToDeleteAtIndexS":{"message":"索引 {PH1} 处没有值可以删除"},"ui/legacy/components/inline_editor/FontEditor.ts | thisPropertyIsSetToContainUnits":{"message":"此属性设为包含单元,但没有已定义的相应 unitsArray:{PH1}"},"ui/legacy/components/inline_editor/FontEditor.ts | units":{"message":"单位"},"ui/legacy/components/inline_editor/LinkSwatch.ts | sIsNotDefined":{"message":"{PH1} 未定义"},"ui/legacy/components/object_ui/CustomPreviewComponent.ts | showAsJavascriptObject":{"message":"显示为 JavaScript 对象"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | collapseChildren":{"message":"收起子级"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | copy":{"message":"复制"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | copyPropertyPath":{"message":"复制属性路径"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | copyValue":{"message":"复制值"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | dots":{"message":"(…)"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | exceptionS":{"message":"[异常:{PH1}]"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | expandRecursively":{"message":"以递归方式展开"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | invokePropertyGetter":{"message":"调用属性 getter"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | longTextWasTruncatedS":{"message":"长文本被截断 ({PH1})"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | noProperties":{"message":"无属性"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | revealInMemoryInpector":{"message":"在“内存检查器”面板中显示"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | showAllD":{"message":"显示全部 {PH1} 项"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | showMoreS":{"message":"显示更多 ({PH1})"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | stringIsTooLargeToEdit":{"message":"<字符串过长,无法修改>"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | unknown":{"message":"未知"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | valueNotAccessibleToTheDebugger":{"message":"调试程序无法获取值"},"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | valueUnavailable":{"message":"<没有可用的值>"},"ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts | empty":{"message":"空白"},"ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts | emptyD":{"message":"空属性 × {PH1}"},"ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts | thePropertyIsComputedWithAGetter":{"message":"此属性使用 getter 计算得出"},"ui/legacy/components/perf_ui/FilmStripView.ts | doubleclickToZoomImageClickTo":{"message":"双击即可缩放图片。点击即可查看之前的请求。"},"ui/legacy/components/perf_ui/FilmStripView.ts | nextFrame":{"message":"下一帧"},"ui/legacy/components/perf_ui/FilmStripView.ts | previousFrame":{"message":"上一帧"},"ui/legacy/components/perf_ui/FilmStripView.ts | screenshot":{"message":"屏幕截图"},"ui/legacy/components/perf_ui/FilmStripView.ts | screenshotForSSelectToView":{"message":"{PH1}的屏幕截图 - 选择即可查看先前的请求。"},"ui/legacy/components/perf_ui/FlameChart.ts | flameChart":{"message":"火焰图"},"ui/legacy/components/perf_ui/FlameChart.ts | sCollapsed":{"message":"已收起{PH1}"},"ui/legacy/components/perf_ui/FlameChart.ts | sExpanded":{"message":"已展开{PH1}"},"ui/legacy/components/perf_ui/FlameChart.ts | sHovered":{"message":"已悬停在“{PH1}”上"},"ui/legacy/components/perf_ui/FlameChart.ts | sSelected":{"message":"已选择“{PH1}”"},"ui/legacy/components/perf_ui/NetworkPriorities.ts | high":{"message":"高"},"ui/legacy/components/perf_ui/NetworkPriorities.ts | highest":{"message":"最高"},"ui/legacy/components/perf_ui/NetworkPriorities.ts | low":{"message":"低"},"ui/legacy/components/perf_ui/NetworkPriorities.ts | lowest":{"message":"最低"},"ui/legacy/components/perf_ui/NetworkPriorities.ts | medium":{"message":"中"},"ui/legacy/components/perf_ui/OverviewGrid.ts | leftResizer":{"message":"左窗口调整器"},"ui/legacy/components/perf_ui/OverviewGrid.ts | overviewGridWindow":{"message":"概览网格窗口"},"ui/legacy/components/perf_ui/OverviewGrid.ts | rightResizer":{"message":"右窗口大小调整器"},"ui/legacy/components/perf_ui/PieChart.ts | total":{"message":"总计"},"ui/legacy/components/perf_ui/perf_ui-meta.ts | collectGarbage":{"message":"回收垃圾"},"ui/legacy/components/perf_ui/perf_ui-meta.ts | flamechartMouseWheelAction":{"message":"火焰图鼠标滚轮操作:"},"ui/legacy/components/perf_ui/perf_ui-meta.ts | hideLiveMemoryAllocation":{"message":"隐藏实时内存分配情况注解"},"ui/legacy/components/perf_ui/perf_ui-meta.ts | liveMemoryAllocationAnnotations":{"message":"实时内存分配情况注解"},"ui/legacy/components/perf_ui/perf_ui-meta.ts | scroll":{"message":"滚动"},"ui/legacy/components/perf_ui/perf_ui-meta.ts | showLiveMemoryAllocation":{"message":"显示实时内存分配情况注解"},"ui/legacy/components/perf_ui/perf_ui-meta.ts | zoom":{"message":"缩放"},"ui/legacy/components/quick_open/CommandMenu.ts | command":{"message":"命令"},"ui/legacy/components/quick_open/CommandMenu.ts | deprecated":{"message":"- 已被弃用"},"ui/legacy/components/quick_open/CommandMenu.ts | noCommandsFound":{"message":"找不到任何命令"},"ui/legacy/components/quick_open/CommandMenu.ts | oneOrMoreSettingsHaveChanged":{"message":"一项或多项设置已更改,需要重新加载才能生效。"},"ui/legacy/components/quick_open/CommandMenu.ts | run":{"message":"运行"},"ui/legacy/components/quick_open/FilteredListWidget.ts | noResultsFound":{"message":"未找到任何结果"},"ui/legacy/components/quick_open/FilteredListWidget.ts | quickOpen":{"message":"快速打开"},"ui/legacy/components/quick_open/FilteredListWidget.ts | quickOpenPrompt":{"message":"快速打开提示"},"ui/legacy/components/quick_open/QuickOpen.ts | typeToSeeAvailableCommands":{"message":"输入“?”即可查看可用命令"},"ui/legacy/components/quick_open/quick_open-meta.ts | openFile":{"message":"打开文件"},"ui/legacy/components/quick_open/quick_open-meta.ts | runCommand":{"message":"运行命令"},"ui/legacy/components/source_frame/FontView.ts | font":{"message":"字体"},"ui/legacy/components/source_frame/FontView.ts | previewOfFontFromS":{"message":"来自 {PH1} 的字体的预览"},"ui/legacy/components/source_frame/ImageView.ts | copyImageAsDataUri":{"message":"以数据 URI 格式复制图片"},"ui/legacy/components/source_frame/ImageView.ts | copyImageUrl":{"message":"复制图片网址"},"ui/legacy/components/source_frame/ImageView.ts | dD":{"message":"{PH1} × {PH2}"},"ui/legacy/components/source_frame/ImageView.ts | download":{"message":"download"},"ui/legacy/components/source_frame/ImageView.ts | dropImageFileHere":{"message":"将图片文件拖放到此处"},"ui/legacy/components/source_frame/ImageView.ts | image":{"message":"图片"},"ui/legacy/components/source_frame/ImageView.ts | imageFromS":{"message":"图片来自 {PH1}"},"ui/legacy/components/source_frame/ImageView.ts | openImageInNewTab":{"message":"在新标签页中打开图片"},"ui/legacy/components/source_frame/ImageView.ts | saveImageAs":{"message":"图片另存为…"},"ui/legacy/components/source_frame/JSONView.ts | find":{"message":"查找"},"ui/legacy/components/source_frame/PreviewFactory.ts | nothingToPreview":{"message":"没有可预览的内容"},"ui/legacy/components/source_frame/ResourceSourceFrame.ts | find":{"message":"查找"},"ui/legacy/components/source_frame/SourceFrame.ts | bytecodePositionXs":{"message":"字节码位置 0x{PH1}"},"ui/legacy/components/source_frame/SourceFrame.ts | dCharactersSelected":{"message":"已选择 {PH1} 个字符"},"ui/legacy/components/source_frame/SourceFrame.ts | dLinesDCharactersSelected":{"message":"已选择 {PH1} 行,{PH2} 个字符"},"ui/legacy/components/source_frame/SourceFrame.ts | dSelectionRegions":{"message":"{PH1} 个所选区域"},"ui/legacy/components/source_frame/SourceFrame.ts | lineSColumnS":{"message":"第 {PH1} 行,第 {PH2} 列"},"ui/legacy/components/source_frame/SourceFrame.ts | loading":{"message":"正在加载…"},"ui/legacy/components/source_frame/SourceFrame.ts | prettyPrint":{"message":"美观输出"},"ui/legacy/components/source_frame/SourceFrame.ts | source":{"message":"来源"},"ui/legacy/components/source_frame/XMLView.ts | find":{"message":"查找"},"ui/legacy/components/source_frame/source_frame-meta.ts | Spaces":{"message":"2 个空格"},"ui/legacy/components/source_frame/source_frame-meta.ts | defaultIndentation":{"message":"默认缩进:"},"ui/legacy/components/source_frame/source_frame-meta.ts | eSpaces":{"message":"8 个空格"},"ui/legacy/components/source_frame/source_frame-meta.ts | fSpaces":{"message":"4 个空格"},"ui/legacy/components/source_frame/source_frame-meta.ts | setIndentationToESpaces":{"message":"将缩进设为 8 个空格"},"ui/legacy/components/source_frame/source_frame-meta.ts | setIndentationToFSpaces":{"message":"将缩进设为 4 个空格"},"ui/legacy/components/source_frame/source_frame-meta.ts | setIndentationToSpaces":{"message":"将缩进设为 2 个空格"},"ui/legacy/components/source_frame/source_frame-meta.ts | setIndentationToTabCharacter":{"message":"将缩进快捷键设置为制表符"},"ui/legacy/components/source_frame/source_frame-meta.ts | tabCharacter":{"message":"制表符"},"ui/legacy/components/utils/ImagePreview.ts | currentSource":{"message":"当前来源:"},"ui/legacy/components/utils/ImagePreview.ts | fileSize":{"message":"文件大小:"},"ui/legacy/components/utils/ImagePreview.ts | imageFromS":{"message":"图片来自 {PH1}"},"ui/legacy/components/utils/ImagePreview.ts | intrinsicAspectRatio":{"message":"固定宽高比:"},"ui/legacy/components/utils/ImagePreview.ts | intrinsicSize":{"message":"固定尺寸:"},"ui/legacy/components/utils/ImagePreview.ts | renderedAspectRatio":{"message":"渲染时的宽高比:"},"ui/legacy/components/utils/ImagePreview.ts | renderedSize":{"message":"渲染的大小:"},"ui/legacy/components/utils/ImagePreview.ts | unknownSource":{"message":"未知来源"},"ui/legacy/components/utils/JSPresentationUtils.ts | addToIgnore":{"message":"向忽略列表添加脚本"},"ui/legacy/components/utils/JSPresentationUtils.ts | removeFromIgnore":{"message":"从忽略列表中移除"},"ui/legacy/components/utils/JSPresentationUtils.ts | showLess":{"message":"收起"},"ui/legacy/components/utils/JSPresentationUtils.ts | showSMoreFrames":{"message":"{n,plural, =1{显示另外 # 个框架}other{显示另外 # 个框架}}"},"ui/legacy/components/utils/JSPresentationUtils.ts | unknownSource":{"message":"未知"},"ui/legacy/components/utils/Linkifier.ts | auto":{"message":"自动"},"ui/legacy/components/utils/Linkifier.ts | linkHandling":{"message":"链接处理:"},"ui/legacy/components/utils/Linkifier.ts | openUsingS":{"message":"使用{PH1}打开"},"ui/legacy/components/utils/Linkifier.ts | reveal":{"message":"显示"},"ui/legacy/components/utils/Linkifier.ts | revealInS":{"message":"在{PH1}中显示"},"ui/legacy/components/utils/Linkifier.ts | unknown":{"message":"(未知)"},"ui/legacy/components/utils/TargetDetachedDialog.ts | websocketDisconnected":{"message":"WebSocket 已断开连接"}} \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/platform/platform.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/platform/platform.js deleted file mode 100644 index ee8c592f5..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/platform/platform.js +++ /dev/null @@ -1 +0,0 @@ -function e(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function t(r,n,o,i,s,l){if(i<=o)return;const a=function(t,r,n,o,i){const s=t[i];e(t,o,i);let l=n;for(let i=n;i=0&&s++}if(n){for(;i>1;r(t,e[n])>0?i=n+1:s=n}return s}function o(e,t,r){const n="END"===r;if(0===e.length)return null;let o=0,i=e.length-1,s=0,l=!1,a=!1,u=0;do{u=o+(i-o)/2,s=n?Math.ceil(u):Math.floor(u),l=t(e[s]),a=l===n,a?o=Math.min(i,s+(o===s?1:0)):i=Math.max(o,s+(i===s?-1:0))}while(i!==o);return t(e[o])?o:null}var i=Object.freeze({__proto__:null,removeElement:(e,t,r)=>{let n=e.indexOf(t);if(-1===n)return!1;if(r)return e.splice(n,1),!0;for(let r=n+1,o=e.length;r=o?e.sort(r):t(e,r,n,o,i,s),e},binaryIndexOf:(e,t,r)=>{const o=n(e,t,r);return or(e,t,n,!1),mergeOrdered:(e,t,n)=>r(e,t,n,!0),DEFAULT_COMPARATOR:(e,t)=>et?1:0,lowerBound:n,upperBound:function(e,t,r,n,o){let i=n||0,s=void 0!==o?o:e.length;for(;i>1;r(t,e[n])>=0?i=n+1:s=n}return s},nearestIndexFromBeginning:function(e,t){return o(e,t,"BEGINNING")},nearestIndexFromEnd:function(e,t){return o(e,t,"END")},arrayDoesNotContainNullOrUndefined:function(e){return!e.includes(null)&&!e.includes(void 0)}}),s=Object.freeze({__proto__:null});var l=Object.freeze({__proto__:null,isValid:e=>!isNaN(e.getTime()),toISO8601Compact:e=>{function t(e){return(e>9?"":"0")+e}return e.getFullYear()+t(e.getMonth()+1)+t(e.getDate())+"T"+t(e.getHours())+t(e.getMinutes())+t(e.getSeconds())}});var a=Object.freeze({__proto__:null,EmptyUrlString:"",EmptyRawPathString:"",EmptyEncodedPathString:""});var u=Object.freeze({__proto__:null,deepActiveElement:function(e){let t=e.activeElement;for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t},getEnclosingShadowRootForNode:function(e){let t=e.parentNodeOrShadowHost();for(;t;){if(t instanceof ShadowRoot)return t;t=t.parentNodeOrShadowHost()}return null},rangeOfWord:function(e,t,r,n,o){let i,s,l=0,a=0;if(n||(n=e),o&&"backward"!==o&&"both"!==o)i=e,l=t;else{let o=e;for(;o;){if(o===n){i||(i=n);break}if(o.nodeType===Node.TEXT_NODE&&null!==o.nodeValue){for(let n=o===e?t-1:o.nodeValue.length-1;n>=0;--n)if(-1!==r.indexOf(o.nodeValue[n])){i=o,l=n+1;break}}if(i)break;o=o.traversePreviousNode(n)}i||(i=n,l=0)}if(o&&"forward"!==o&&"both"!==o)s=e,a=t;else{let o=e;for(;o;){if(o===n){s||(s=n);break}if(o.nodeType===Node.TEXT_NODE&&null!==o.nodeValue){for(let n=o===e?t:0;n{for(e=Math.round(e),t=Math.round(t);0!==t;){const r=t;t=e%t,e=r}return e},p=new Map([["8∶5","16∶10"]]);var m=Object.freeze({__proto__:null,clamp:(e,t,r)=>{let n=e;return er&&(n=r),n},mod:(e,t)=>(e%t+t)%t,bytesToString:e=>{if(e<1e3)return`${e.toFixed(0)} B`;const t=e/1e3;if(t<100)return`${t.toFixed(1)} kB`;if(t<1e3)return`${t.toFixed(0)} kB`;const r=t/1e3;return r<100?`${r.toFixed(1)} MB`:`${r.toFixed(0)} MB`},toFixedIfFloating:e=>{if(!e||Number.isNaN(Number(e)))return e;const t=Number(e);return t%1?t.toFixed(3):String(t)},floor:(e,t=0)=>{const r=Math.pow(10,t);return Math.floor(e*r)/r},greatestCommonDivisor:g,aspectRatio:(e,t)=>{const r=g(e,t);0!==r&&(e/=r,t/=r);const n=`${e}∶${t}`;return p.get(n)||n},withThousandsSeparator:function(e){let t=String(e);const r=/(\d+)(\d{3})/;for(;t.match(r);)t=t.replace(r,"$1 $2");return t}});var b=Object.freeze({__proto__:null,addAll:function(e,t){for(const r of t)e.add(r)},isEqual:function(e,t){if(e===t)return!0;if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}});const E=(e,t)=>{let r=!1;for(let n=0;ne.toString(16).toUpperCase().padStart(t,"0"),x=new Map([["\b","\\b"],["\f","\\f"],["\n","\\n"],["\r","\\r"],["\t","\\t"],["\v","\\v"],["'","\\'"],["\\","\\\\"],["\x3c!--","\\x3C!--"],["{const r=[];let n=e.indexOf(t);for(;-1!==n;)r.push(n),n=e.indexOf(t,n+t.length);return r},w=function(){return"^[]{}()\\.^$*+?|-,"},S=function(e,t){let r="";for(let t=0;t{const t=/(\\|<(?:!--|\/?script))|(\p{Control})|(\p{Surrogate})/gu,r=/(\\|'|<(?:!--|\/?script))|(\p{Control})|(\p{Surrogate})/gu,n=(e,t,r,n)=>{if(r){if(x.has(r))return x.get(r);return"\\x"+_(r.charCodeAt(0),2)}if(n){return"\\u"+_(n.charCodeAt(0),4)}return t?x.get(t)||"":e};let o="",i="";return e.includes("'")?e.includes('"')?e.includes("`")||e.includes("${")?(i="'",o=e.replaceAll(r,n)):(i="`",o=e.replaceAll(t,n)):(i='"',o=e.replaceAll(t,n)):(i="'",o=e.replaceAll(t,n)),`${i}${o}${i}`},sprintf:(e,...t)=>{let r=0;return e.replaceAll(/%(?:(\d+)\$)?(?:\.(\d*))?([%dfs])/g,((e,n,o,i)=>{if("%"===i)return"%";if(void 0!==n&&(r=parseInt(n,10)-1,r<0))throw new RangeError(`Invalid parameter index ${r+1}`);if(r>=t.length)throw new RangeError(`Expected at least ${r+1} format parameters, but only ${t.length} where given.`);if("s"===i){const e=String(t[r++]);return void 0!==o?e.substring(0,Number(o)):e}let s=Number(t[r++]);return isNaN(s)&&(s=0),"d"===i?String(Math.floor(s)).padStart(Number(o),"0"):void 0!==o?s.toFixed(Number(o)):String(s)}))},toBase64:e=>{function t(e){return e<26?e+65:e<52?e+71:e<62?e-4:62===e?43:63===e?47:65}const r=(new TextEncoder).encode(e.toString()),n=r.length;let o,i="";if(0===n)return i;let s=0;for(let e=0;e>>o&24),2===o&&(i+=String.fromCharCode(t(s>>>18&63),t(s>>>12&63),t(s>>>6&63),t(63&s)),s=0);return 0===o?i+=String.fromCharCode(t(s>>>18&63),t(s>>>12&63),61,61):1===o&&(i+=String.fromCharCode(t(s>>>18&63),t(s>>>12&63),t(s>>>6&63),61)),i},findIndexesOfSubString:N,findLineEndingIndexes:e=>{const t=N(e,"\n");return t.push(e.length),t},isWhitespace:e=>/^\s*$/.test(e),trimURL:(e,t)=>{let r=e.replace(/^(https|http|file):\/\//i,"");return t&&r.toLowerCase().startsWith(t.toLowerCase())&&(r=r.substr(t.length)),r},collapseWhitespace:e=>e.replace(/[\s\xA0]+/g," "),reverse:e=>e.split("").reverse().join(""),replaceControlCharacters:e=>e.replace(/[\0-\x08\x0B\f\x0E-\x1F\x80-\x9F]/g,"�"),countWtf8Bytes:e=>{let t=0;for(let r=0;re.replace(/(\r)?\n/g,""),toTitleCase:e=>e.substring(0,1).toUpperCase()+e.substring(1),removeURLFragment:e=>{const t=new URL(e);return t.hash="",t.toString()},regexSpecialCharacters:w,filterRegex:function(e){let t="^(?:.*\\0)?";for(let r=0;rt?1:-1},hashCode:function(e){if(!e)return 0;const t=4294967291;let r=0,n=1;for(let o=0;oe>t?1:e{if(e.length<=t)return String(e);let r=t>>1,n=t-r-1;return e.codePointAt(e.length-n-1)>=65536&&(--n,++r),r>0&&e.codePointAt(r-1)>=65536&&--r,e.substr(0,r)+"…"+e.substr(e.length-n,n)},trimEndWithMaxLength:(e,t)=>e.length<=t?String(e):e.substr(0,t-1)+"…",escapeForRegExp:e=>E(e,"^[]{}()\\.^$*+?|-,"),naturalOrderComparator:(e,t)=>{const r=/^\d+|^\D+/;let n,o,i,s;for(;;){if(!e)return t?-1:0;if(!t)return 1;if(n=e.match(r)[0],o=t.match(r)[0],i=!Number.isNaN(Number(n)),s=!Number.isNaN(Number(o)),i&&!s)return-1;if(s&&!i)return 1;if(i&&s){const e=Number(n)-Number(o);if(e)return e;if(n.length!==o.length)return Number(n)||Number(o)?o.length-n.length:n.length-o.length}else if(n!==o)return n1&&"="===e[e.length-2]&&t--,t},SINGLE_QUOTE:"'",DOUBLE_QUOTE:'"',findUnclosedCssQuote:function(e){let t="";for(let r=0;r{const[t,r]=e.split(".");return[t,r]},a=(e,t)=>`${e}.${t}`;class i{agentPrototypes=new Map;#e=!1;#t=new Map;getOrCreateEventParameterNamesForDomain(e){let t=this.#t.get(e);return t||(t=new Map,this.#t.set(e,t)),t}getOrCreateEventParameterNamesForDomainForTesting(e){return this.getOrCreateEventParameterNamesForDomain(e)}getEventParameterNames(){return this.#t}static reportProtocolError(e,t){console.error(e+": "+JSON.stringify(t))}static reportProtocolWarning(e,t){console.warn(e+": "+JSON.stringify(t))}isInitialized(){return this.#e}agentPrototype(e){let t=this.agentPrototypes.get(e);return t||(t=new p(e),this.agentPrototypes.set(e,t)),t}registerCommand(e,t,r){const[n,a]=o(e);this.agentPrototype(n).registerCommand(a,t,r),this.#e=!0}registerEnum(e,t){const[r,n]=o(e);globalThis.Protocol[r]||(globalThis.Protocol[r]={}),globalThis.Protocol[r][n]=t,this.#e=!0}registerEvent(e,t){const r=e.split(".")[0];this.getOrCreateEventParameterNamesForDomain(r).set(e,t),this.#e=!0}}let s;const l={dumpProtocol:null,deprecatedRunAfterPendingDispatches:null,sendRawMessage:null,suppressRequestErrors:!1,onMessageSent:null,onMessageReceived:null},m=new Set(["CSS.takeComputedStyleUpdates"]);class d{#r;#n;#o;#a;#i;#s;constructor(e){this.#r=e,this.#n=1,this.#o=0,this.#a=new Set,this.#i=new Map,this.#s=[],l.deprecatedRunAfterPendingDispatches=this.deprecatedRunAfterPendingDispatches.bind(this),l.sendRawMessage=this.sendRawMessageForTesting.bind(this),this.#r.setOnMessage(this.onMessage.bind(this)),this.#r.setOnDisconnect((e=>{const t=this.#i.get("");t&&t.target.dispose(e)}))}registerSession(e,t,r){if(r)for(const e of this.#i.values())if(e.proxyConnection){console.error("Multiple simultaneous proxy connections are currently unsupported");break}this.#i.set(t,{target:e,callbacks:new Map,proxyConnection:r})}unregisterSession(e){const t=this.#i.get(e);if(t){for(const e of t.callbacks.values())d.dispatchUnregisterSessionError(e);this.#i.delete(e)}}getTargetBySessionId(e){const t=this.#i.get(e||"");return t?t.target:null}nextMessageId(){return this.#n++}connection(){return this.#r}sendMessage(e,t,r,n,o){const a=this.nextMessageId(),i={id:a,method:r};if(n&&(i.params=n),e&&(i.sessionId=e),l.dumpProtocol&&l.dumpProtocol("frontend: "+JSON.stringify(i)),l.onMessageSent){const o=JSON.parse(JSON.stringify(n||{}));l.onMessageSent({domain:t,method:r,params:o,id:a,sessionId:e},this.getTargetBySessionId(e))}++this.#o,m.has(r)&&this.#a.add(a);const s=this.#i.get(e);s&&(s.callbacks.set(a,{callback:o,method:r}),this.#r.sendRawMessage(JSON.stringify(i)))}sendRawMessageForTesting(e,t,r,n=""){const o=e.split(".")[0];this.sendMessage(n,o,e,t,r||(()=>{}))}onMessage(e){if(l.dumpProtocol&&l.dumpProtocol("backend: "+("string"==typeof e?e:JSON.stringify(e))),l.onMessageReceived){const t=JSON.parse("string"==typeof e?e:JSON.stringify(e));l.onMessageReceived(t,this.getTargetBySessionId(t.sessionId))}const t="string"==typeof e?JSON.parse(e):e;let n=!1;for(const e of this.#i.values())e.proxyConnection&&(e.proxyConnection.onMessage?(e.proxyConnection.onMessage(t),n=!0):i.reportProtocolError("Protocol Error: the session has a proxyConnection with no _onMessage",t));const o=t.sessionId||"",a=this.#i.get(o);if(a){if(!a.proxyConnection)if(a.target.getNeedsNodeJSPatching()&&r.patch(t),void 0!==t.id){const e=a.callbacks.get(t.id);if(a.callbacks.delete(t.id),!e){if(-32001===t.error?.code)return;return void(n||i.reportProtocolError("Protocol Error: the message with wrong id",t))}e.callback(t.error||null,t.result||null),--this.#o,this.#a.delete(t.id),this.#s.length&&!this.hasOutstandingNonLongPollingRequests()&&this.deprecatedRunAfterPendingDispatches()}else{if(void 0===t.method)return void i.reportProtocolError("Protocol Error: the message without method",t);const e=t;a.target.dispatch(e)}}else n||i.reportProtocolError("Protocol Error: the message with wrong session id",t)}hasOutstandingNonLongPollingRequests(){return this.#o-this.#a.size>0}deprecatedRunAfterPendingDispatches(e){e&&this.#s.push(e),window.setTimeout((()=>{this.hasOutstandingNonLongPollingRequests()?this.deprecatedRunAfterPendingDispatches():this.executeAfterPendingDispatches()}),0)}executeAfterPendingDispatches(){if(!this.hasOutstandingNonLongPollingRequests()){const e=this.#s;this.#s=[];for(let t=0;te(r,null)),0)}static dispatchUnregisterSessionError({callback:e,method:t}){const r={message:`Session is unregistering, can't dispatch pending call to ${t}`,code:-32001,data:null};window.setTimeout((()=>e(r,null)),0)}}class p{replyArgs;commandParameters;domain;target;constructor(e){this.replyArgs={},this.domain=e,this.commandParameters={}}registerCommand(e,t,r){const n=a(this.domain,e);this[e]=function(...e){return p.prototype.sendMessageToBackendPromise.call(this,n,t,e)},this.commandParameters[n]=t,this["invoke_"+e]=function(e={}){return this.invoke(n,e)},this.replyArgs[n]=r}prepareParameters(e,t,r,n){const o={};let a=!1;for(const i of t){const s=i.name,l=i.type,m=i.optional;if(!r.length&&!m)return n(`Protocol Error: Invalid number of arguments for method '${e}' call. It must have the following arguments ${JSON.stringify(t)}'.`),null;const d=r.shift();if(!m||void 0!==d){if(typeof d!==l)return n(`Protocol Error: Invalid type of argument '${s}' for method '${e}' call. It must be '${l}' but it is '${typeof d}'.`),null;o[s]=d,a=!0}}return r.length?(n(`Protocol Error: Extra ${r.length} arguments in a call to method '${e}'.`),null):a?o:null}sendMessageToBackendPromise(e,t,r){let n;const o=this.prepareParameters(e,t,r,(function(e){console.error(e),n=e}));return n?Promise.resolve(null):new Promise((t=>{const r=(r,n)=>{if(r)return l.suppressRequestErrors||-32015===r.code||-32e3===r.code||-32001===r.code||console.error("Request "+e+" failed. "+JSON.stringify(r)),void t(null);const o=this.replyArgs[e];t(n&&o.length?n[o[0]]:void 0)},n=this.target.router();n?n.sendMessage(this.target.sessionId,this.domain,e,o,r):d.dispatchConnectionError(r,e)}))}invoke(e,t){return new Promise((r=>{const n=(t,n)=>{t&&!l.suppressRequestErrors&&-32015!==t.code&&-32e3!==t.code&&-32001!==t.code&&console.error("Request "+e+" failed. "+JSON.stringify(t));const o=t?.message;r({...n,getError:()=>o})},o=this.target.router();o?o.sendMessage(this.target.sessionId,this.domain,e,t,n):d.dispatchConnectionError(n,e)}))}}class g{#l;#m=[];constructor(e){this.#l=e}addDomainDispatcher(e){this.#m.push(e)}removeDomainDispatcher(e){const t=this.#m.indexOf(e);-1!==t&&this.#m.splice(t,1)}dispatch(e,t){if(!this.#m.length)return;if(!this.#l.has(t.method))return void i.reportProtocolWarning(`Protocol Warning: Attempted to dispatch an unspecified event '${t.method}'`,t);const r={...t.params};for(let t=0;te.isEnabled()))}setExperimentsSetting(e){self.localStorage&&(self.localStorage.experiments=JSON.stringify(e))}register(t,n,s,r,i){this.#t.add(t),this.#e.push(new a(this,t,n,Boolean(s),r??e.DevToolsPath.EmptyUrlString,i??e.DevToolsPath.EmptyUrlString))}isEnabled(e){return this.checkExperiment(e),!1!==r.experimentsSetting()[e]&&(!(!this.#n.has(e)&&!this.#s.has(e))||(!!this.#r.has(e)||Boolean(r.experimentsSetting()[e])))}setEnabled(e,t){this.checkExperiment(e);const n=r.experimentsSetting();n[e]=t,this.setExperimentsSetting(n)}enableExperimentsTransiently(e){for(const t of e)this.checkExperiment(t),this.#n.add(t)}enableExperimentsByDefault(e){for(const t of e)this.checkExperiment(t),this.#s.add(t)}setServerEnabledExperiments(e){for(const t of e)this.checkExperiment(t),this.#r.add(t)}setNonConfigurableExperiments(e){for(const t of e)this.checkExperiment(t),this.#i.add(t)}enableForTest(e){this.checkExperiment(e),this.#n.add(e)}disableForTest(e){this.checkExperiment(e),this.#n.delete(e)}clearForTest(){this.#e=[],this.#t.clear(),this.#n.clear(),this.#s.clear(),this.#r.clear()}cleanUpStaleExperiments(){const e=r.experimentsSetting(),t={};for(const{name:n}of this.#e)if(e.hasOwnProperty(n)){const s=e[n];(s||this.#s.has(n))&&(t[n]=s)}this.setExperimentsSetting(t)}checkExperiment(e){}}class a{name;title;unstable;docLink;feedbackLink;#e;constructor(e,t,n,s,r,i){this.name=t,this.title=n,this.unstable=s,this.docLink=r,this.feedbackLink=i,this.#e=e}isEnabled(){return this.#e.isEnabled(this.name)}setEnabled(e){this.#e.setEnabled(this.name,e)}}const l=new i;var o,E;!function(e){e.CAPTURE_NODE_CREATION_STACKS="captureNodeCreationStacks",e.CSS_OVERVIEW="cssOverview",e.LIVE_HEAP_PROFILE="liveHeapProfile",e.DEVELOPER_RESOURCES_VIEW="developerResourcesView",e.CSP_VIOLATIONS_VIEW="cspViolationsView",e.WASM_DWARF_DEBUGGING="wasmDWARFDebugging",e.ALL="*",e.PROTOCOL_MONITOR="protocolMonitor",e.WEBAUTHN_PANE="webauthnPane",e.FULL_ACCESSIBILITY_TREE="fullAccessibilityTree",e.PRECISE_CHANGES="preciseChanges",e.STYLES_PANE_CSS_CHANGES="stylesPaneCSSChanges",e.HEADER_OVERRIDES="headerOverrides",e.EYEDROPPER_COLOR_PICKER="eyedropperColorPicker",e.INSTRUMENTATION_BREAKPOINTS="instrumentationBreakpoints",e.AUTHORED_DEPLOYED_GROUPING="authoredDeployedGrouping",e.IMPORTANT_DOM_PROPERTIES="importantDOMProperties",e.JUST_MY_CODE="justMyCode",e.PRELOADING_STATUS_PANEL="preloadingStatusPanel",e.DISABLE_COLOR_FORMAT_SETTING="disableColorFormatSetting",e.TIMELINE_AS_CONSOLE_PROFILE_RESULT_PANEL="timelineAsConsoleProfileResultPanel",e.OUTERMOST_TARGET_SELECTOR="outermostTargetSelector",e.JS_PROFILER_TEMP_ENABLE="jsProfilerTemporarilyEnable",e.HIGHLIGHT_ERRORS_ELEMENTS_PANEL="highlightErrorsElementsPanel",e.SET_ALL_BREAKPOINTS_EAGERLY="setAllBreakpointsEagerly",e.REACT_NATIVE_SPECIFIC_UI="reactNativeSpecificUI"}(o||(o={})),function(e){e.CAN_DOCK="can_dock",e.NOT_SOURCES_HIDE_ADD_FOLDER="!sources.hide_add_folder",e.REACT_NATIVE_UNSTABLE_NETWORK_PANEL="unstable_enableNetworkPanel"}(E||(E={}));var c=Object.freeze({__proto__:null,getRemoteBase:function(e=self.location.toString()){const t=new URL(e).searchParams.get("remoteBase");if(!t)return null;const n=/\/serve_file\/(@[0-9a-zA-Z]+)\/?$/.exec(t);return n?{base:`devtools://devtools/remote/serve_file/${n[1]}/`,version:n[1]}:null},Runtime:r,ExperimentsSupport:i,Experiment:a,experiments:l,get ExperimentName(){return o},get ConditionName(){return E}});export{c as Runtime}; diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/sdk/sdk-legacy.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/sdk/sdk-legacy.js deleted file mode 100644 index 92a074232..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/sdk/sdk-legacy.js +++ /dev/null @@ -1 +0,0 @@ -import*as e from"./sdk.js";self.SDK=self.SDK||{},SDK=SDK||{},SDK.CPUProfileDataModel=e.CPUProfileDataModel.CPUProfileDataModel,SDK.CPUProfilerModel=e.CPUProfilerModel.CPUProfilerModel,SDK.CPUThrottlingManager=e.CPUThrottlingManager.CPUThrottlingManager,SDK.CPUThrottlingManager.CPUThrottlingRates=e.CPUThrottlingManager.CPUThrottlingRates,SDK.cssMetadata=e.CSSMetadata.cssMetadata,SDK.CSSModel=e.CSSModel.CSSModel,SDK.CSSModel.Events=e.CSSModel.Events,SDK.CSSLocation=e.CSSModel.CSSLocation,SDK.CSSProperty=e.CSSProperty.CSSProperty,SDK.CSSStyleDeclaration=e.CSSStyleDeclaration.CSSStyleDeclaration,SDK.CSSStyleDeclaration.Type=e.CSSStyleDeclaration.Type,SDK.MainConnection=e.Connections.MainConnection,SDK.ConsoleModel=e.ConsoleModel.ConsoleModel,SDK.ConsoleMessage=e.ConsoleModel.ConsoleMessage,SDK.ConsoleModel.Events=e.ConsoleModel.Events,SDK.ConsoleMessage.MessageSource=e.ConsoleModel.MessageSource,SDK.ConsoleMessage.MessageType=e.ConsoleModel.MessageType,SDK.ConsoleMessage.MessageLevel=e.ConsoleModel.MessageLevel,SDK.ConsoleMessage.FrontendMessageType=e.ConsoleModel.FrontendMessageType,SDK.ConsoleMessage.FrontendMessageSource=e.ConsoleModel.FrontendMessageSource,SDK.Cookie=e.Cookie.Cookie,SDK.CookieParser=e.CookieParser.CookieParser,SDK.DOMDebuggerModel=e.DOMDebuggerModel.DOMDebuggerModel,SDK.DOMModel=e.DOMModel.DOMModel,SDK.DOMModel.Events=e.DOMModel.Events,SDK.DeferredDOMNode=e.DOMModel.DeferredDOMNode,SDK.DOMDocument=e.DOMModel.DOMDocument,SDK.DOMNode=e.DOMModel.DOMNode,SDK.DebuggerModel=e.DebuggerModel.DebuggerModel,SDK.DebuggerModel.PauseOnExceptionsState=e.DebuggerModel.PauseOnExceptionsState,SDK.DebuggerModel.Events=e.DebuggerModel.Events,SDK.DebuggerModel.BreakReason=Protocol.Debugger.PausedEventReason,SDK.DebuggerModel.Location=e.DebuggerModel.Location,SDK.DebuggerModel.CallFrame=e.DebuggerModel.CallFrame,SDK.DebuggerPausedDetails=e.DebuggerModel.DebuggerPausedDetails,SDK.FilmStripModel=e.FilmStripModel.FilmStripModel,SDK.HeapProfilerModel=e.HeapProfilerModel.HeapProfilerModel,SDK.IsolateManager=e.IsolateManager.IsolateManager,SDK.IsolateManager.MemoryTrend=e.IsolateManager.MemoryTrend,SDK.NetworkManager=e.NetworkManager.NetworkManager,SDK.NetworkManager.Events=e.NetworkManager.Events,SDK.NetworkManager.OfflineConditions=e.NetworkManager.OfflineConditions,SDK.NetworkManager.Fast3GConditions=e.NetworkManager.Fast3GConditions,SDK.NetworkDispatcher=e.NetworkManager.NetworkDispatcher,SDK.MultitargetNetworkManager=e.NetworkManager.MultitargetNetworkManager,SDK.MultitargetNetworkManager.InterceptedRequest=e.NetworkManager.InterceptedRequest,SDK.NetworkRequest=e.NetworkRequest.NetworkRequest,SDK.NetworkRequest.Events=e.NetworkRequest.Events,SDK.NetworkRequest.WebSocketFrameType=e.NetworkRequest.WebSocketFrameType,SDK.OverlayModel=e.OverlayModel.OverlayModel,SDK.PerformanceMetricsModel=e.PerformanceMetricsModel.PerformanceMetricsModel,SDK.ProfileTreeModel=e.ProfileTreeModel.ProfileTreeModel,SDK.RemoteObject=e.RemoteObject.RemoteObject,SDK.Resource=e.Resource.Resource,SDK.ResourceTreeModel=e.ResourceTreeModel.ResourceTreeModel,SDK.ResourceTreeModel.Events=e.ResourceTreeModel.Events,SDK.ResourceTreeFrame=e.ResourceTreeModel.ResourceTreeFrame,SDK.RuntimeModel=e.RuntimeModel.RuntimeModel,SDK.RuntimeModel.Events=e.RuntimeModel.Events,SDK.ExecutionContext=e.RuntimeModel.ExecutionContext,SDK.Script=e.Script.Script,SDK.SecurityOriginManager=e.SecurityOriginManager.SecurityOriginManager,SDK.StorageBucketsModel=e.StorageBucketsModel.StorageBucketsModel,SDK.StorageKeyManager=e.StorageKeyManager.StorageKeyManager,SDK.SecurityOriginManager.Events=e.SecurityOriginManager.Events,SDK.ServiceWorkerCacheModel=e.ServiceWorkerCacheModel.ServiceWorkerCacheModel,SDK.ServiceWorkerManager=e.ServiceWorkerManager.ServiceWorkerManager,SDK.SourceMap=e.SourceMap.SourceMap,SDK.SourceMapManager=e.SourceMapManager.SourceMapManager,SDK.SourceMapManager.Events=e.SourceMapManager.Events,SDK.Target=e.Target.Target,SDK.Target.Type=e.Target.Type,SDK.TargetManager=e.TargetManager.TargetManager,SDK.TargetManager.Events=e.TargetManager.Events,SDK.TargetManager.Observer=e.TargetManager.Observer,SDK.TracingManager=e.TracingManager.TracingManager,SDK.TracingModel=e.TracingModel.TracingModel,SDK.TracingModel.Phase=e.TracingModel.Phase,SDK.TracingModel.LegacyTopLevelEventCategory=e.TracingModel.LegacyTopLevelEventCategory,SDK.TracingModel.DevToolsMetadataEventCategory=e.TracingModel.DevToolsMetadataEventCategory,SDK.TracingModel.Event=e.TracingModel.Event,self.SDK.targetManager=e.TargetManager.TargetManager.instance(),self.SDK.isolateManager=e.IsolateManager.IsolateManager.instance({forceNew:!0}),self.SDK.domModelUndoStack=e.DOMModel.DOMModelUndoStack.instance(); diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/sdk/sdk-meta.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/sdk/sdk-meta.js deleted file mode 100644 index 75ef01b3e..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/sdk/sdk-meta.js +++ /dev/null @@ -1 +0,0 @@ -import*as e from"../common/common.js";import*as t from"../i18n/i18n.js";const i={preserveLogUponNavigation:"Preserve log upon navigation",doNotPreserveLogUponNavigation:"Do not preserve log upon navigation",pauseOnExceptions:"Pause on exceptions",doNotPauseOnExceptions:"Do not pause on exceptions",disableJavascript:"Disable JavaScript",enableJavascript:"Enable JavaScript",disableAsyncStackTraces:"Disable async stack traces",doNotCaptureAsyncStackTraces:"Do not capture async stack traces",captureAsyncStackTraces:"Capture async stack traces",showRulersOnHover:"Show rulers on hover",doNotShowRulersOnHover:"Do not show rulers on hover",showAreaNames:"Show area names",showGridNamedAreas:"Show grid named areas",doNotShowGridNamedAreas:"Do not show grid named areas",showTrackSizes:"Show track sizes",showGridTrackSizes:"Show grid track sizes",doNotShowGridTrackSizes:"Do not show grid track sizes",extendGridLines:"Extend grid lines",doNotExtendGridLines:"Do not extend grid lines",showLineLabels:"Show line labels",hideLineLabels:"Hide line labels",showLineNumbers:"Show line numbers",showLineNames:"Show line names",showPaintFlashingRectangles:"Show paint flashing rectangles",hidePaintFlashingRectangles:"Hide paint flashing rectangles",showLayoutShiftRegions:"Show layout shift regions",hideLayoutShiftRegions:"Hide layout shift regions",highlightAdFrames:"Highlight ad frames",doNotHighlightAdFrames:"Do not highlight ad frames",showLayerBorders:"Show layer borders",hideLayerBorders:"Hide layer borders",showCoreWebVitalsOverlay:"Show Core Web Vitals overlay",hideCoreWebVitalsOverlay:"Hide Core Web Vitals overlay",showFramesPerSecondFpsMeter:"Show frames per second (FPS) meter",hideFramesPerSecondFpsMeter:"Hide frames per second (FPS) meter",showScrollPerformanceBottlenecks:"Show scroll performance bottlenecks",hideScrollPerformanceBottlenecks:"Hide scroll performance bottlenecks",emulateAFocusedPage:"Emulate a focused page",doNotEmulateAFocusedPage:"Do not emulate a focused page",doNotEmulateCssMediaType:"Do not emulate CSS media type",noEmulation:"No emulation",emulateCssPrintMediaType:"Emulate CSS print media type",print:"print",emulateCssScreenMediaType:"Emulate CSS screen media type",screen:"screen",query:"query",emulateCssMediaType:"Emulate CSS media type",doNotEmulateCss:"Do not emulate CSS {PH1}",emulateCss:"Emulate CSS {PH1}",emulateCssMediaFeature:"Emulate CSS media feature {PH1}",doNotEmulateAnyVisionDeficiency:"Do not emulate any vision deficiency",emulateBlurredVision:"Emulate blurred vision",emulateReducedContrast:"Emulate reduced contrast",blurredVision:"Blurred vision",reducedContrast:"Reduced contrast",emulateProtanopia:"Emulate protanopia (no red)",protanopia:"Protanopia (no red)",emulateDeuteranopia:"Emulate deuteranopia (no green)",deuteranopia:"Deuteranopia (no green)",emulateTritanopia:"Emulate tritanopia (no blue)",tritanopia:"Tritanopia (no blue)",emulateAchromatopsia:"Emulate achromatopsia (no color)",achromatopsia:"Achromatopsia (no color)",emulateVisionDeficiencies:"Emulate vision deficiencies",disableLocalFonts:"Disable local fonts",enableLocalFonts:"Enable local fonts",disableAvifFormat:"Disable `AVIF` format",enableAvifFormat:"Enable `AVIF` format",disableWebpFormat:"Disable `WebP` format",enableWebpFormat:"Enable `WebP` format",enableCustomFormatters:"Enable custom formatters",enableNetworkRequestBlocking:"Enable network request blocking",disableNetworkRequestBlocking:"Disable network request blocking",enableCache:"Enable cache",disableCache:"Disable cache (while DevTools is open)",emulateAutoDarkMode:"Emulate auto dark mode",enableRemoteFileLoading:"Allow `DevTools` to load resources, such as source maps, from remote file paths. Disabled by default for security reasons."},s=t.i18n.registerUIStrings("core/sdk/sdk-meta.ts",i),a=t.i18n.getLazilyComputedLocalizedString.bind(void 0,s);e.Settings.registerSettingExtension({storageType:e.Settings.SettingStorageType.Synced,settingName:"skipStackFramesPattern",settingType:e.Settings.SettingType.REGEX,defaultValue:""}),e.Settings.registerSettingExtension({storageType:e.Settings.SettingStorageType.Synced,settingName:"skipContentScripts",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!0}),e.Settings.registerSettingExtension({storageType:e.Settings.SettingStorageType.Synced,settingName:"automaticallyIgnoreListKnownThirdPartyScripts",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!0}),e.Settings.registerSettingExtension({storageType:e.Settings.SettingStorageType.Synced,settingName:"enableIgnoreListing",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!0}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.CONSOLE,storageType:e.Settings.SettingStorageType.Synced,title:a(i.preserveLogUponNavigation),settingName:"preserveConsoleLog",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:a(i.preserveLogUponNavigation)},{value:!1,title:a(i.doNotPreserveLogUponNavigation)}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.DEBUGGER,settingName:"pauseOnExceptionEnabled",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:a(i.pauseOnExceptions)},{value:!1,title:a(i.doNotPauseOnExceptions)}]}),e.Settings.registerSettingExtension({settingName:"pauseOnCaughtException",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1}),e.Settings.registerSettingExtension({settingName:"pauseOnUncaughtException",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.DEBUGGER,title:a(i.disableJavascript),settingName:"javaScriptDisabled",settingType:e.Settings.SettingType.BOOLEAN,storageType:e.Settings.SettingStorageType.Session,order:1,defaultValue:!1,options:[{value:!0,title:a(i.disableJavascript)},{value:!1,title:a(i.enableJavascript)}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.DEBUGGER,title:a(i.disableAsyncStackTraces),settingName:"disableAsyncStackTraces",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,order:2,options:[{value:!0,title:a(i.doNotCaptureAsyncStackTraces)},{value:!1,title:a(i.captureAsyncStackTraces)}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.DEBUGGER,settingName:"breakpointsActive",settingType:e.Settings.SettingType.BOOLEAN,storageType:e.Settings.SettingStorageType.Session,defaultValue:!0}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.ELEMENTS,storageType:e.Settings.SettingStorageType.Synced,title:a(i.showRulersOnHover),settingName:"showMetricsRulers",settingType:e.Settings.SettingType.BOOLEAN,options:[{value:!0,title:a(i.showRulersOnHover)},{value:!1,title:a(i.doNotShowRulersOnHover)}],defaultValue:!1}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.GRID,storageType:e.Settings.SettingStorageType.Synced,title:a(i.showAreaNames),settingName:"showGridAreas",settingType:e.Settings.SettingType.BOOLEAN,options:[{value:!0,title:a(i.showGridNamedAreas)},{value:!1,title:a(i.doNotShowGridNamedAreas)}],defaultValue:!1}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.GRID,storageType:e.Settings.SettingStorageType.Synced,title:a(i.showTrackSizes),settingName:"showGridTrackSizes",settingType:e.Settings.SettingType.BOOLEAN,options:[{value:!0,title:a(i.showGridTrackSizes)},{value:!1,title:a(i.doNotShowGridTrackSizes)}],defaultValue:!1}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.GRID,storageType:e.Settings.SettingStorageType.Synced,title:a(i.extendGridLines),settingName:"extendGridLines",settingType:e.Settings.SettingType.BOOLEAN,options:[{value:!0,title:a(i.extendGridLines)},{value:!1,title:a(i.doNotExtendGridLines)}],defaultValue:!1}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.GRID,storageType:e.Settings.SettingStorageType.Synced,title:a(i.showLineLabels),settingName:"showGridLineLabels",settingType:e.Settings.SettingType.ENUM,options:[{title:a(i.hideLineLabels),text:a(i.hideLineLabels),value:"none"},{title:a(i.showLineNumbers),text:a(i.showLineNumbers),value:"lineNumbers"},{title:a(i.showLineNames),text:a(i.showLineNames),value:"lineNames"}],defaultValue:"lineNumbers"}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.RENDERING,settingName:"showPaintRects",settingType:e.Settings.SettingType.BOOLEAN,storageType:e.Settings.SettingStorageType.Session,options:[{value:!0,title:a(i.showPaintFlashingRectangles)},{value:!1,title:a(i.hidePaintFlashingRectangles)}],defaultValue:!1}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.RENDERING,settingName:"showLayoutShiftRegions",settingType:e.Settings.SettingType.BOOLEAN,storageType:e.Settings.SettingStorageType.Session,options:[{value:!0,title:a(i.showLayoutShiftRegions)},{value:!1,title:a(i.hideLayoutShiftRegions)}],defaultValue:!1}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.RENDERING,settingName:"showAdHighlights",settingType:e.Settings.SettingType.BOOLEAN,storageType:e.Settings.SettingStorageType.Session,options:[{value:!0,title:a(i.highlightAdFrames)},{value:!1,title:a(i.doNotHighlightAdFrames)}],defaultValue:!1}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.RENDERING,settingName:"showDebugBorders",settingType:e.Settings.SettingType.BOOLEAN,storageType:e.Settings.SettingStorageType.Session,options:[{value:!0,title:a(i.showLayerBorders)},{value:!1,title:a(i.hideLayerBorders)}],defaultValue:!1}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.RENDERING,settingName:"showWebVitals",settingType:e.Settings.SettingType.BOOLEAN,storageType:e.Settings.SettingStorageType.Session,options:[{value:!0,title:a(i.showCoreWebVitalsOverlay)},{value:!1,title:a(i.hideCoreWebVitalsOverlay)}],defaultValue:!1}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.RENDERING,settingName:"showFPSCounter",settingType:e.Settings.SettingType.BOOLEAN,storageType:e.Settings.SettingStorageType.Session,options:[{value:!0,title:a(i.showFramesPerSecondFpsMeter)},{value:!1,title:a(i.hideFramesPerSecondFpsMeter)}],defaultValue:!1}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.RENDERING,settingName:"showScrollBottleneckRects",settingType:e.Settings.SettingType.BOOLEAN,storageType:e.Settings.SettingStorageType.Session,options:[{value:!0,title:a(i.showScrollPerformanceBottlenecks)},{value:!1,title:a(i.hideScrollPerformanceBottlenecks)}],defaultValue:!1}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.RENDERING,title:a(i.emulateAFocusedPage),settingName:"emulatePageFocus",settingType:e.Settings.SettingType.BOOLEAN,storageType:e.Settings.SettingStorageType.Session,defaultValue:!1,options:[{value:!0,title:a(i.emulateAFocusedPage)},{value:!1,title:a(i.doNotEmulateAFocusedPage)}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.RENDERING,settingName:"emulatedCSSMedia",settingType:e.Settings.SettingType.ENUM,storageType:e.Settings.SettingStorageType.Session,defaultValue:"",options:[{title:a(i.doNotEmulateCssMediaType),text:a(i.noEmulation),value:""},{title:a(i.emulateCssPrintMediaType),text:a(i.print),value:"print"},{title:a(i.emulateCssScreenMediaType),text:a(i.screen),value:"screen"}],tags:[a(i.query)],title:a(i.emulateCssMediaType)}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.RENDERING,settingName:"emulatedCSSMediaFeaturePrefersColorScheme",settingType:e.Settings.SettingType.ENUM,storageType:e.Settings.SettingStorageType.Session,defaultValue:"",options:[{title:a(i.doNotEmulateCss,{PH1:"prefers-color-scheme"}),text:a(i.noEmulation),value:""},{title:a(i.emulateCss,{PH1:"prefers-color-scheme: light"}),text:t.i18n.lockedLazyString("prefers-color-scheme: light"),value:"light"},{title:a(i.emulateCss,{PH1:"prefers-color-scheme: dark"}),text:t.i18n.lockedLazyString("prefers-color-scheme: dark"),value:"dark"}],tags:[a(i.query)],title:a(i.emulateCssMediaFeature,{PH1:"prefers-color-scheme"})}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.RENDERING,settingName:"emulatedCSSMediaFeatureForcedColors",settingType:e.Settings.SettingType.ENUM,storageType:e.Settings.SettingStorageType.Session,defaultValue:"",options:[{title:a(i.doNotEmulateCss,{PH1:"forced-colors"}),text:a(i.noEmulation),value:""},{title:a(i.emulateCss,{PH1:"forced-colors: active"}),text:t.i18n.lockedLazyString("forced-colors: active"),value:"active"},{title:a(i.emulateCss,{PH1:"forced-colors: none"}),text:t.i18n.lockedLazyString("forced-colors: none"),value:"none"}],tags:[a(i.query)],title:a(i.emulateCssMediaFeature,{PH1:"forced-colors"})}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.RENDERING,settingName:"emulatedCSSMediaFeaturePrefersReducedMotion",settingType:e.Settings.SettingType.ENUM,storageType:e.Settings.SettingStorageType.Session,defaultValue:"",options:[{title:a(i.doNotEmulateCss,{PH1:"prefers-reduced-motion"}),text:a(i.noEmulation),value:""},{title:a(i.emulateCss,{PH1:"prefers-reduced-motion: reduce"}),text:t.i18n.lockedLazyString("prefers-reduced-motion: reduce"),value:"reduce"}],tags:[a(i.query)],title:a(i.emulateCssMediaFeature,{PH1:"prefers-reduced-motion"})}),e.Settings.registerSettingExtension({settingName:"emulatedCSSMediaFeaturePrefersContrast",settingType:e.Settings.SettingType.ENUM,storageType:e.Settings.SettingStorageType.Session,defaultValue:"",options:[{title:a(i.doNotEmulateCss,{PH1:"prefers-contrast"}),text:a(i.noEmulation),value:""},{title:a(i.emulateCss,{PH1:"prefers-contrast: more"}),text:t.i18n.lockedLazyString("prefers-contrast: more"),value:"more"},{title:a(i.emulateCss,{PH1:"prefers-contrast: less"}),text:t.i18n.lockedLazyString("prefers-contrast: less"),value:"less"},{title:a(i.emulateCss,{PH1:"prefers-contrast: custom"}),text:t.i18n.lockedLazyString("prefers-contrast: custom"),value:"custom"}],tags:[a(i.query)],title:a(i.emulateCssMediaFeature,{PH1:"prefers-contrast"})}),e.Settings.registerSettingExtension({settingName:"emulatedCSSMediaFeaturePrefersReducedData",settingType:e.Settings.SettingType.ENUM,storageType:e.Settings.SettingStorageType.Session,defaultValue:"",options:[{title:a(i.doNotEmulateCss,{PH1:"prefers-reduced-data"}),text:a(i.noEmulation),value:""},{title:a(i.emulateCss,{PH1:"prefers-reduced-data: reduce"}),text:t.i18n.lockedLazyString("prefers-reduced-data: reduce"),value:"reduce"}],title:a(i.emulateCssMediaFeature,{PH1:"prefers-reduced-data"})}),e.Settings.registerSettingExtension({settingName:"emulatedCSSMediaFeatureColorGamut",settingType:e.Settings.SettingType.ENUM,storageType:e.Settings.SettingStorageType.Session,defaultValue:"",options:[{title:a(i.doNotEmulateCss,{PH1:"color-gamut"}),text:a(i.noEmulation),value:""},{title:a(i.emulateCss,{PH1:"color-gamut: srgb"}),text:t.i18n.lockedLazyString("color-gamut: srgb"),value:"srgb"},{title:a(i.emulateCss,{PH1:"color-gamut: p3"}),text:t.i18n.lockedLazyString("color-gamut: p3"),value:"p3"},{title:a(i.emulateCss,{PH1:"color-gamut: rec2020"}),text:t.i18n.lockedLazyString("color-gamut: rec2020"),value:"rec2020"}],title:a(i.emulateCssMediaFeature,{PH1:"color-gamut"})}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.RENDERING,settingName:"emulatedVisionDeficiency",settingType:e.Settings.SettingType.ENUM,storageType:e.Settings.SettingStorageType.Session,defaultValue:"none",options:[{title:a(i.doNotEmulateAnyVisionDeficiency),text:a(i.noEmulation),value:"none"},{title:a(i.emulateBlurredVision),text:a(i.blurredVision),value:"blurredVision"},{title:a(i.emulateReducedContrast),text:a(i.reducedContrast),value:"reducedContrast"},{title:a(i.emulateProtanopia),text:a(i.protanopia),value:"protanopia"},{title:a(i.emulateDeuteranopia),text:a(i.deuteranopia),value:"deuteranopia"},{title:a(i.emulateTritanopia),text:a(i.tritanopia),value:"tritanopia"},{title:a(i.emulateAchromatopsia),text:a(i.achromatopsia),value:"achromatopsia"}],tags:[a(i.query)],title:a(i.emulateVisionDeficiencies)}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.RENDERING,settingName:"localFontsDisabled",settingType:e.Settings.SettingType.BOOLEAN,storageType:e.Settings.SettingStorageType.Session,options:[{value:!0,title:a(i.disableLocalFonts)},{value:!1,title:a(i.enableLocalFonts)}],defaultValue:!1}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.RENDERING,settingName:"avifFormatDisabled",settingType:e.Settings.SettingType.BOOLEAN,storageType:e.Settings.SettingStorageType.Session,options:[{value:!0,title:a(i.disableAvifFormat)},{value:!1,title:a(i.enableAvifFormat)}],defaultValue:!1}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.RENDERING,settingName:"webpFormatDisabled",settingType:e.Settings.SettingType.BOOLEAN,storageType:e.Settings.SettingStorageType.Session,options:[{value:!0,title:a(i.disableWebpFormat)},{value:!1,title:a(i.enableWebpFormat)}],defaultValue:!1}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.CONSOLE,title:a(i.enableCustomFormatters),settingName:"customFormatters",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.NETWORK,title:a(i.enableNetworkRequestBlocking),settingName:"requestBlockingEnabled",settingType:e.Settings.SettingType.BOOLEAN,storageType:e.Settings.SettingStorageType.Session,defaultValue:!1,options:[{value:!0,title:a(i.enableNetworkRequestBlocking)},{value:!1,title:a(i.disableNetworkRequestBlocking)}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.NETWORK,title:a(i.disableCache),settingName:"cacheDisabled",settingType:e.Settings.SettingType.BOOLEAN,order:0,defaultValue:!1,userActionCondition:"hasOtherClients",options:[{value:!0,title:a(i.disableCache)},{value:!1,title:a(i.enableCache)}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.RENDERING,title:a(i.emulateAutoDarkMode),settingName:"emulateAutoDarkMode",settingType:e.Settings.SettingType.BOOLEAN,storageType:e.Settings.SettingStorageType.Session,defaultValue:!1}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.SOURCES,storageType:e.Settings.SettingStorageType.Synced,title:a(i.enableRemoteFileLoading),settingName:"network.enable-remote-file-loading",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1}); diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/sdk/sdk.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/sdk/sdk.js deleted file mode 100644 index ddecfcd89..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/core/sdk/sdk.js +++ /dev/null @@ -1 +0,0 @@ -import*as e from"../common/common.js";import*as t from"../platform/platform.js";import{assertNotNullOrUndefined as n}from"../platform/platform.js";import*as r from"../../models/text_utils/text_utils.js";import*as s from"../i18n/i18n.js";import*as i from"../host/host.js";import*as a from"../protocol_client/protocol_client.js";import*as o from"../root/root.js";import*as l from"../../models/trace/trace.js";const d=new Map;class c extends e.ObjectWrapper.ObjectWrapper{#e;constructor(e){super(),this.#e=e}target(){return this.#e}async preSuspendModel(e){}async suspendModel(e){}async resumeModel(){}async postResumeModel(){}dispose(){}static register(e,t){if(t.early&&!t.autostart)throw new Error(`Error registering model ${e.name}: early models must be autostarted.`);d.set(e,t)}static get registeredModels(){return d}}var h=Object.freeze({__proto__:null,SDKModel:c});const u=[{longhands:["animation-delay-start","animation-delay-end"],name:"-alternative-animation-delay"},{longhands:["animation-duration","animation-timing-function","animation-delay-start","animation-delay-end","animation-iteration-count","animation-direction","animation-fill-mode","animation-play-state","animation-name","animation-timeline","animation-range-start","animation-range-end"],name:"-alternative-animation-with-delay-start-end"},{longhands:["animation-duration","animation-timing-function","animation-delay","animation-iteration-count","animation-direction","animation-fill-mode","animation-play-state","animation-name","animation-timeline","animation-range-start","animation-range-end"],name:"-alternative-animation-with-timeline"},{inherited:!0,longhands:["white-space-collapse","text-wrap"],name:"-alternative-white-space"},{inherited:!0,name:"-webkit-border-horizontal-spacing"},{name:"-webkit-border-image"},{inherited:!0,name:"-webkit-border-vertical-spacing"},{keywords:["stretch","start","center","end","baseline"],name:"-webkit-box-align"},{keywords:["slice","clone"],name:"-webkit-box-decoration-break"},{inherited:!0,keywords:["normal","reverse"],name:"-webkit-box-direction"},{name:"-webkit-box-flex"},{name:"-webkit-box-ordinal-group"},{keywords:["horizontal","vertical"],name:"-webkit-box-orient"},{keywords:["start","center","end","justify"],name:"-webkit-box-pack"},{name:"-webkit-box-reflect"},{longhands:["break-after"],name:"-webkit-column-break-after"},{longhands:["break-before"],name:"-webkit-column-break-before"},{longhands:["break-inside"],name:"-webkit-column-break-inside"},{inherited:!0,name:"-webkit-font-smoothing"},{inherited:!0,name:"-webkit-highlight"},{inherited:!0,keywords:["auto","loose","normal","strict","after-white-space","anywhere"],name:"-webkit-line-break"},{name:"-webkit-line-clamp"},{inherited:!0,name:"-webkit-locale"},{longhands:["-webkit-mask-image","-webkit-mask-position-x","-webkit-mask-position-y","-webkit-mask-size","-webkit-mask-repeat-x","-webkit-mask-repeat-y","-webkit-mask-origin","-webkit-mask-clip"],name:"-webkit-mask"},{longhands:["-webkit-mask-box-image-source","-webkit-mask-box-image-slice","-webkit-mask-box-image-width","-webkit-mask-box-image-outset","-webkit-mask-box-image-repeat"],name:"-webkit-mask-box-image"},{name:"-webkit-mask-box-image-outset"},{name:"-webkit-mask-box-image-repeat"},{name:"-webkit-mask-box-image-slice"},{name:"-webkit-mask-box-image-source"},{name:"-webkit-mask-box-image-width"},{name:"-webkit-mask-clip"},{name:"-webkit-mask-composite"},{name:"-webkit-mask-image"},{name:"-webkit-mask-origin"},{longhands:["-webkit-mask-position-x","-webkit-mask-position-y"],name:"-webkit-mask-position"},{name:"-webkit-mask-position-x"},{name:"-webkit-mask-position-y"},{longhands:["-webkit-mask-repeat-x","-webkit-mask-repeat-y"],name:"-webkit-mask-repeat"},{name:"-webkit-mask-repeat-x"},{name:"-webkit-mask-repeat-y"},{name:"-webkit-mask-size"},{name:"-webkit-perspective-origin-x"},{name:"-webkit-perspective-origin-y"},{inherited:!0,keywords:["economy","exact"],name:"-webkit-print-color-adjust"},{inherited:!0,keywords:["logical","visual"],name:"-webkit-rtl-ordering"},{inherited:!0,keywords:["before","after"],name:"-webkit-ruby-position"},{inherited:!0,name:"-webkit-tap-highlight-color"},{inherited:!0,name:"-webkit-text-combine"},{inherited:!0,name:"-webkit-text-decorations-in-effect"},{inherited:!0,name:"-webkit-text-fill-color"},{inherited:!0,name:"-webkit-text-orientation"},{inherited:!0,keywords:["none","disc","circle","square"],name:"-webkit-text-security"},{inherited:!0,longhands:["-webkit-text-stroke-width","-webkit-text-stroke-color"],name:"-webkit-text-stroke"},{inherited:!0,name:"-webkit-text-stroke-color"},{inherited:!0,name:"-webkit-text-stroke-width"},{name:"-webkit-transform-origin-x"},{name:"-webkit-transform-origin-y"},{name:"-webkit-transform-origin-z"},{keywords:["auto","none","element"],name:"-webkit-user-drag"},{inherited:!0,keywords:["read-only","read-write","read-write-plaintext-only"],name:"-webkit-user-modify"},{inherited:!0,name:"-webkit-writing-mode"},{inherited:!0,keywords:["auto","currentcolor"],name:"accent-color"},{name:"additive-symbols"},{name:"align-content"},{name:"align-items"},{name:"align-self"},{keywords:["auto","baseline","alphabetic","ideographic","middle","central","mathematical","before-edge","text-before-edge","after-edge","text-after-edge","hanging"],name:"alignment-baseline"},{name:"all"},{keywords:["none"],name:"anchor-default"},{keywords:["none"],name:"anchor-name"},{keywords:["none"],name:"anchor-scroll"},{longhands:["animation-duration","animation-timing-function","animation-delay","animation-iteration-count","animation-direction","animation-fill-mode","animation-play-state","animation-name"],name:"animation"},{keywords:["replace","add","accumulate"],name:"animation-composition"},{name:"animation-delay"},{name:"animation-delay-end"},{name:"animation-delay-start"},{keywords:["normal","reverse","alternate","alternate-reverse"],name:"animation-direction"},{name:"animation-duration"},{keywords:["none","forwards","backwards","both"],name:"animation-fill-mode"},{keywords:["infinite"],name:"animation-iteration-count"},{keywords:["none"],name:"animation-name"},{keywords:["running","paused"],name:"animation-play-state"},{longhands:["animation-range-start","animation-range-end"],name:"animation-range"},{name:"animation-range-end"},{name:"animation-range-start"},{keywords:["none","auto"],name:"animation-timeline"},{keywords:["linear","ease","ease-in","ease-out","ease-in-out","jump-both","jump-end","jump-none","jump-start","step-start","step-end"],name:"animation-timing-function"},{keywords:["none","drag","no-drag"],name:"app-region"},{name:"appearance"},{name:"ascent-override"},{keywords:["auto"],name:"aspect-ratio"},{keywords:["none"],name:"backdrop-filter"},{keywords:["visible","hidden"],name:"backface-visibility"},{longhands:["background-image","background-position-x","background-position-y","background-size","background-repeat-x","background-repeat-y","background-attachment","background-origin","background-clip","background-color"],name:"background"},{keywords:["scroll","fixed","local"],name:"background-attachment"},{keywords:["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],name:"background-blend-mode"},{keywords:["border-box","padding-box","content-box"],name:"background-clip"},{keywords:["currentcolor"],name:"background-color"},{keywords:["auto","none"],name:"background-image"},{keywords:["border-box","padding-box","content-box"],name:"background-origin"},{longhands:["background-position-x","background-position-y"],name:"background-position"},{name:"background-position-x"},{name:"background-position-y"},{longhands:["background-repeat-x","background-repeat-y"],name:"background-repeat"},{name:"background-repeat-x"},{name:"background-repeat-y"},{keywords:["auto","cover","contain"],name:"background-size"},{name:"base-palette"},{keywords:["baseline","sub","super"],name:"baseline-shift"},{keywords:["auto","first","last"],name:"baseline-source"},{keywords:["auto"],name:"block-size"},{longhands:["border-top-color","border-top-style","border-top-width","border-right-color","border-right-style","border-right-width","border-bottom-color","border-bottom-style","border-bottom-width","border-left-color","border-left-style","border-left-width","border-image-source","border-image-slice","border-image-width","border-image-outset","border-image-repeat"],name:"border"},{longhands:["border-block-start-color","border-block-start-style","border-block-start-width","border-block-end-color","border-block-end-style","border-block-end-width"],name:"border-block"},{longhands:["border-block-start-color","border-block-end-color"],name:"border-block-color"},{longhands:["border-block-end-width","border-block-end-style","border-block-end-color"],name:"border-block-end"},{name:"border-block-end-color"},{name:"border-block-end-style"},{name:"border-block-end-width"},{longhands:["border-block-start-width","border-block-start-style","border-block-start-color"],name:"border-block-start"},{name:"border-block-start-color"},{name:"border-block-start-style"},{name:"border-block-start-width"},{longhands:["border-block-start-style","border-block-end-style"],name:"border-block-style"},{longhands:["border-block-start-width","border-block-end-width"],name:"border-block-width"},{longhands:["border-bottom-width","border-bottom-style","border-bottom-color"],name:"border-bottom"},{keywords:["currentcolor"],name:"border-bottom-color"},{name:"border-bottom-left-radius"},{name:"border-bottom-right-radius"},{keywords:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"],name:"border-bottom-style"},{keywords:["thin","medium","thick"],name:"border-bottom-width"},{inherited:!0,keywords:["separate","collapse"],name:"border-collapse"},{longhands:["border-top-color","border-right-color","border-bottom-color","border-left-color"],name:"border-color"},{name:"border-end-end-radius"},{name:"border-end-start-radius"},{longhands:["border-image-source","border-image-slice","border-image-width","border-image-outset","border-image-repeat"],name:"border-image"},{name:"border-image-outset"},{keywords:["stretch","repeat","round","space"],name:"border-image-repeat"},{name:"border-image-slice"},{keywords:["none"],name:"border-image-source"},{keywords:["auto"],name:"border-image-width"},{longhands:["border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-end-color","border-inline-end-style","border-inline-end-width"],name:"border-inline"},{longhands:["border-inline-start-color","border-inline-end-color"],name:"border-inline-color"},{longhands:["border-inline-end-width","border-inline-end-style","border-inline-end-color"],name:"border-inline-end"},{name:"border-inline-end-color"},{name:"border-inline-end-style"},{name:"border-inline-end-width"},{longhands:["border-inline-start-width","border-inline-start-style","border-inline-start-color"],name:"border-inline-start"},{name:"border-inline-start-color"},{name:"border-inline-start-style"},{name:"border-inline-start-width"},{longhands:["border-inline-start-style","border-inline-end-style"],name:"border-inline-style"},{longhands:["border-inline-start-width","border-inline-end-width"],name:"border-inline-width"},{longhands:["border-left-width","border-left-style","border-left-color"],name:"border-left"},{keywords:["currentcolor"],name:"border-left-color"},{keywords:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"],name:"border-left-style"},{keywords:["thin","medium","thick"],name:"border-left-width"},{longhands:["border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius"],name:"border-radius"},{longhands:["border-right-width","border-right-style","border-right-color"],name:"border-right"},{keywords:["currentcolor"],name:"border-right-color"},{keywords:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"],name:"border-right-style"},{keywords:["thin","medium","thick"],name:"border-right-width"},{inherited:!0,longhands:["-webkit-border-horizontal-spacing","-webkit-border-vertical-spacing"],name:"border-spacing"},{name:"border-start-end-radius"},{name:"border-start-start-radius"},{keywords:["none"],longhands:["border-top-style","border-right-style","border-bottom-style","border-left-style"],name:"border-style"},{longhands:["border-top-width","border-top-style","border-top-color"],name:"border-top"},{keywords:["currentcolor"],name:"border-top-color"},{name:"border-top-left-radius"},{name:"border-top-right-radius"},{keywords:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"],name:"border-top-style"},{keywords:["thin","medium","thick"],name:"border-top-width"},{longhands:["border-top-width","border-right-width","border-bottom-width","border-left-width"],name:"border-width"},{keywords:["auto"],name:"bottom"},{keywords:["none"],name:"box-shadow"},{keywords:["content-box","border-box"],name:"box-sizing"},{keywords:["auto","avoid","avoid-column","avoid-page","column","left","page","recto","right","verso"],name:"break-after"},{keywords:["auto","avoid","avoid-column","avoid-page","column","left","page","recto","right","verso"],name:"break-before"},{keywords:["auto","avoid","avoid-column","avoid-page"],name:"break-inside"},{keywords:["auto","dynamic","static"],name:"buffered-rendering"},{inherited:!0,keywords:["top","bottom"],name:"caption-side"},{inherited:!0,keywords:["auto","currentcolor"],name:"caret-color"},{keywords:["none","left","right","both","inline-start","inline-end"],name:"clear"},{keywords:["auto"],name:"clip"},{keywords:["none"],name:"clip-path"},{inherited:!0,keywords:["nonzero","evenodd"],name:"clip-rule"},{inherited:!0,keywords:["currentcolor"],name:"color"},{inherited:!0,keywords:["auto","srgb","linearrgb"],name:"color-interpolation"},{inherited:!0,keywords:["auto","srgb","linearrgb"],name:"color-interpolation-filters"},{inherited:!0,keywords:["auto","optimizespeed","optimizequality"],name:"color-rendering"},{inherited:!0,name:"color-scheme"},{keywords:["auto"],name:"column-count"},{keywords:["balance","auto"],name:"column-fill"},{keywords:["normal"],name:"column-gap"},{longhands:["column-rule-width","column-rule-style","column-rule-color"],name:"column-rule"},{keywords:["currentcolor"],name:"column-rule-color"},{keywords:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"],name:"column-rule-style"},{keywords:["thin","medium","thick"],name:"column-rule-width"},{keywords:["none","all"],name:"column-span"},{keywords:["auto"],name:"column-width"},{longhands:["column-width","column-count"],name:"columns"},{keywords:["none","strict","content","size","layout","style","paint","inline-size","block-size"],name:"contain"},{name:"contain-intrinsic-block-size"},{keywords:["auto","none"],name:"contain-intrinsic-height"},{name:"contain-intrinsic-inline-size"},{longhands:["contain-intrinsic-width","contain-intrinsic-height"],name:"contain-intrinsic-size"},{keywords:["auto","none"],name:"contain-intrinsic-width"},{longhands:["container-name","container-type"],name:"container"},{keywords:["none"],name:"container-name"},{keywords:["normal","inline-size","size","sticky"],name:"container-type"},{name:"content"},{keywords:["visible","auto","hidden"],name:"content-visibility"},{keywords:["none"],name:"counter-increment"},{keywords:["none"],name:"counter-reset"},{keywords:["none"],name:"counter-set"},{inherited:!0,keywords:["auto","default","none","context-menu","help","pointer","progress","wait","cell","crosshair","text","vertical-text","alias","copy","move","no-drop","not-allowed","e-resize","n-resize","ne-resize","nw-resize","s-resize","se-resize","sw-resize","w-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","col-resize","row-resize","all-scroll","zoom-in","zoom-out","grab","grabbing"],name:"cursor"},{name:"cx"},{name:"cy"},{keywords:["none"],name:"d"},{name:"descent-override"},{inherited:!0,keywords:["ltr","rtl"],name:"direction"},{keywords:["inline","block","list-item","inline-block","table","inline-table","table-row-group","table-header-group","table-footer-group","table-row","table-column-group","table-column","table-cell","table-caption","-webkit-box","-webkit-inline-box","flex","inline-flex","grid","inline-grid","contents","flow-root","none","flow","math"],name:"display"},{inherited:!0,keywords:["auto","alphabetic","ideographic","middle","central","mathematical","hanging","use-script","no-change","reset-size","text-after-edge","text-before-edge"],name:"dominant-baseline"},{inherited:!0,keywords:["show","hide"],name:"empty-cells"},{name:"fallback"},{inherited:!0,name:"fill"},{inherited:!0,name:"fill-opacity"},{inherited:!0,keywords:["nonzero","evenodd"],name:"fill-rule"},{keywords:["none"],name:"filter"},{longhands:["flex-grow","flex-shrink","flex-basis"],name:"flex"},{keywords:["auto","fit-content","min-content","max-content","content"],name:"flex-basis"},{keywords:["row","row-reverse","column","column-reverse"],name:"flex-direction"},{longhands:["flex-direction","flex-wrap"],name:"flex-flow"},{name:"flex-grow"},{name:"flex-shrink"},{keywords:["nowrap","wrap","wrap-reverse"],name:"flex-wrap"},{keywords:["none","left","right","inline-start","inline-end"],name:"float"},{keywords:["currentcolor"],name:"flood-color"},{name:"flood-opacity"},{inherited:!0,longhands:["font-style","font-variant-ligatures","font-variant-caps","font-variant-numeric","font-variant-east-asian","font-variant-alternates","font-variant-position","font-weight","font-stretch","font-size","line-height","font-family","font-optical-sizing","font-size-adjust","font-kerning","font-feature-settings","font-variation-settings"],name:"font"},{name:"font-display"},{inherited:!0,name:"font-family"},{inherited:!0,keywords:["normal"],name:"font-feature-settings"},{inherited:!0,keywords:["auto","normal","none"],name:"font-kerning"},{inherited:!0,keywords:["auto","none"],name:"font-optical-sizing"},{inherited:!0,keywords:["normal","light","dark"],name:"font-palette"},{inherited:!0,keywords:["xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large","larger","smaller","-webkit-xxx-large"],name:"font-size"},{inherited:!0,keywords:["none","ex-height","cap-height","ch-width","ic-width"],name:"font-size-adjust"},{inherited:!0,keywords:["normal","ultra-condensed","extra-condensed","condensed","semi-condensed","semi-expanded","expanded","extra-expanded","ultra-expanded"],name:"font-stretch"},{inherited:!0,keywords:["normal","italic","oblique"],name:"font-style"},{inherited:!0,longhands:["font-synthesis-weight","font-synthesis-style","font-synthesis-small-caps"],name:"font-synthesis"},{inherited:!0,keywords:["auto","none"],name:"font-synthesis-small-caps"},{inherited:!0,keywords:["auto","none"],name:"font-synthesis-style"},{inherited:!0,keywords:["auto","none"],name:"font-synthesis-weight"},{inherited:!0,longhands:["font-variant-ligatures","font-variant-caps","font-variant-alternates","font-variant-numeric","font-variant-east-asian","font-variant-position"],name:"font-variant"},{inherited:!0,keywords:["normal"],name:"font-variant-alternates"},{inherited:!0,keywords:["normal","small-caps","all-small-caps","petite-caps","all-petite-caps","unicase","titling-caps"],name:"font-variant-caps"},{inherited:!0,keywords:["normal","jis78","jis83","jis90","jis04","simplified","traditional","full-width","proportional-width","ruby"],name:"font-variant-east-asian"},{inherited:!0,keywords:["normal","none","common-ligatures","no-common-ligatures","discretionary-ligatures","no-discretionary-ligatures","historical-ligatures","no-historical-ligatures","contextual","no-contextual"],name:"font-variant-ligatures"},{inherited:!0,keywords:["normal","lining-nums","oldstyle-nums","proportional-nums","tabular-nums","diagonal-fractions","stacked-fractions","ordinal","slashed-zero"],name:"font-variant-numeric"},{inherited:!0,keywords:["normal","sub","super"],name:"font-variant-position"},{inherited:!0,keywords:["normal"],name:"font-variation-settings"},{inherited:!0,keywords:["normal","bold","bolder","lighter"],name:"font-weight"},{inherited:!0,keywords:["auto","none","preserve-parent-color"],name:"forced-color-adjust"},{longhands:["row-gap","column-gap"],name:"gap"},{longhands:["grid-template-rows","grid-template-columns","grid-template-areas","grid-auto-flow","grid-auto-rows","grid-auto-columns"],name:"grid"},{longhands:["grid-row-start","grid-column-start","grid-row-end","grid-column-end"],name:"grid-area"},{keywords:["auto","min-content","max-content"],name:"grid-auto-columns"},{keywords:["row","column"],name:"grid-auto-flow"},{keywords:["auto","min-content","max-content"],name:"grid-auto-rows"},{longhands:["grid-column-start","grid-column-end"],name:"grid-column"},{keywords:["auto"],name:"grid-column-end"},{longhands:["column-gap"],name:"grid-column-gap"},{keywords:["auto"],name:"grid-column-start"},{longhands:["row-gap","column-gap"],name:"grid-gap"},{longhands:["grid-row-start","grid-row-end"],name:"grid-row"},{keywords:["auto"],name:"grid-row-end"},{longhands:["row-gap"],name:"grid-row-gap"},{keywords:["auto"],name:"grid-row-start"},{longhands:["grid-template-rows","grid-template-columns","grid-template-areas"],name:"grid-template"},{keywords:["none"],name:"grid-template-areas"},{keywords:["none"],name:"grid-template-columns"},{keywords:["none"],name:"grid-template-rows"},{keywords:["auto","fit-content","min-content","max-content"],name:"height"},{inherited:!0,name:"hyphenate-character"},{inherited:!0,keywords:["auto"],name:"hyphenate-limit-chars"},{inherited:!0,keywords:["none","manual","auto"],name:"hyphens"},{inherited:!0,name:"image-orientation"},{inherited:!0,keywords:["auto","optimizespeed","optimizequality","-webkit-optimize-contrast","pixelated"],name:"image-rendering"},{name:"inherits"},{inherited:!1,keywords:["drop","normal","raise"],name:"initial-letter"},{name:"initial-value"},{keywords:["auto"],name:"inline-size"},{longhands:["top","right","bottom","left"],name:"inset"},{longhands:["inset-block-start","inset-block-end"],name:"inset-block"},{name:"inset-block-end"},{name:"inset-block-start"},{longhands:["inset-inline-start","inset-inline-end"],name:"inset-inline"},{name:"inset-inline-end"},{name:"inset-inline-start"},{keywords:["auto","isolate"],name:"isolation"},{name:"justify-content"},{name:"justify-items"},{name:"justify-self"},{keywords:["auto"],name:"left"},{inherited:!0,keywords:["normal"],name:"letter-spacing"},{keywords:["currentcolor"],name:"lighting-color"},{inherited:!0,keywords:["auto","loose","normal","strict","anywhere"],name:"line-break"},{name:"line-gap-override"},{inherited:!0,keywords:["normal"],name:"line-height"},{inherited:!0,longhands:["list-style-position","list-style-image","list-style-type"],name:"list-style"},{inherited:!0,keywords:["none"],name:"list-style-image"},{inherited:!0,keywords:["outside","inside"],name:"list-style-position"},{inherited:!0,keywords:["disc","circle","square","disclosure-open","disclosure-closed","decimal","none"],name:"list-style-type"},{longhands:["margin-top","margin-right","margin-bottom","margin-left"],name:"margin"},{longhands:["margin-block-start","margin-block-end"],name:"margin-block"},{keywords:["auto"],name:"margin-block-end"},{keywords:["auto"],name:"margin-block-start"},{keywords:["auto"],name:"margin-bottom"},{longhands:["margin-inline-start","margin-inline-end"],name:"margin-inline"},{keywords:["auto"],name:"margin-inline-end"},{keywords:["auto"],name:"margin-inline-start"},{keywords:["auto"],name:"margin-left"},{keywords:["auto"],name:"margin-right"},{keywords:["auto"],name:"margin-top"},{inherited:!0,longhands:["marker-start","marker-mid","marker-end"],name:"marker"},{inherited:!0,keywords:["none"],name:"marker-end"},{inherited:!0,keywords:["none"],name:"marker-mid"},{inherited:!0,keywords:["none"],name:"marker-start"},{name:"mask"},{keywords:["luminance","alpha"],name:"mask-type"},{inherited:!0,name:"math-depth"},{inherited:!0,keywords:["normal","compact"],name:"math-shift"},{inherited:!0,keywords:["normal","compact"],name:"math-style"},{keywords:["none"],name:"max-block-size"},{keywords:["none"],name:"max-height"},{keywords:["none"],name:"max-inline-size"},{keywords:["none"],name:"max-width"},{name:"min-block-size"},{name:"min-height"},{name:"min-inline-size"},{name:"min-width"},{keywords:["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],name:"mix-blend-mode"},{name:"negative"},{keywords:["fill","contain","cover","none","scale-down"],name:"object-fit"},{name:"object-position"},{keywords:["none"],name:"object-view-box"},{longhands:["offset-position","offset-path","offset-distance","offset-rotate","offset-anchor"],name:"offset"},{keywords:["auto"],name:"offset-anchor"},{name:"offset-distance"},{keywords:["none"],name:"offset-path"},{keywords:["auto","normal"],name:"offset-position"},{keywords:["auto","reverse"],name:"offset-rotate"},{name:"opacity"},{name:"order"},{keywords:["normal","none"],name:"origin-trial-test-property"},{inherited:!0,name:"orphans"},{longhands:["outline-color","outline-style","outline-width"],name:"outline"},{keywords:["currentcolor"],name:"outline-color"},{name:"outline-offset"},{keywords:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"],name:"outline-style"},{keywords:["thin","medium","thick"],name:"outline-width"},{longhands:["overflow-x","overflow-y"],name:"overflow"},{inherited:!1,keywords:["visible","none","auto"],name:"overflow-anchor"},{name:"overflow-block"},{keywords:["border-box","content-box","padding-box"],name:"overflow-clip-margin"},{name:"overflow-inline"},{inherited:!0,keywords:["normal","break-word","anywhere"],name:"overflow-wrap"},{keywords:["visible","hidden","scroll","auto","overlay","clip"],name:"overflow-x"},{keywords:["visible","hidden","scroll","auto","overlay","clip"],name:"overflow-y"},{keywords:["none","auto"],name:"overlay"},{name:"override-colors"},{longhands:["overscroll-behavior-x","overscroll-behavior-y"],name:"overscroll-behavior"},{name:"overscroll-behavior-block"},{name:"overscroll-behavior-inline"},{keywords:["auto","contain","none"],name:"overscroll-behavior-x"},{keywords:["auto","contain","none"],name:"overscroll-behavior-y"},{name:"pad"},{longhands:["padding-top","padding-right","padding-bottom","padding-left"],name:"padding"},{longhands:["padding-block-start","padding-block-end"],name:"padding-block"},{name:"padding-block-end"},{name:"padding-block-start"},{name:"padding-bottom"},{longhands:["padding-inline-start","padding-inline-end"],name:"padding-inline"},{name:"padding-inline-end"},{name:"padding-inline-start"},{name:"padding-left"},{name:"padding-right"},{name:"padding-top"},{keywords:["auto"],name:"page"},{longhands:["break-after"],name:"page-break-after"},{longhands:["break-before"],name:"page-break-before"},{longhands:["break-inside"],name:"page-break-inside"},{name:"page-orientation"},{inherited:!0,keywords:["normal","fill","stroke","markers"],name:"paint-order"},{keywords:["none"],name:"perspective"},{name:"perspective-origin"},{longhands:["align-content","justify-content"],name:"place-content"},{longhands:["align-items","justify-items"],name:"place-items"},{longhands:["align-self","justify-self"],name:"place-self"},{inherited:!0,keywords:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","bounding-box","all"],name:"pointer-events"},{name:"popover-hide-delay"},{name:"popover-show-delay"},{keywords:["static","relative","absolute","fixed","sticky"],name:"position"},{keywords:["none"],name:"position-fallback"},{name:"prefix"},{inherited:!0,keywords:["auto","none"],name:"quotes"},{name:"r"},{name:"range"},{keywords:["none","both","horizontal","vertical","block","inline"],name:"resize"},{keywords:["auto"],name:"right"},{name:"rotate"},{keywords:["normal"],name:"row-gap"},{inherited:!0,name:"ruby-position"},{keywords:["auto"],name:"rx"},{keywords:["auto"],name:"ry"},{name:"scale"},{keywords:["auto","smooth"],name:"scroll-behavior"},{name:"scroll-customization"},{longhands:["scroll-margin-top","scroll-margin-right","scroll-margin-bottom","scroll-margin-left"],name:"scroll-margin"},{longhands:["scroll-margin-block-start","scroll-margin-block-end"],name:"scroll-margin-block"},{name:"scroll-margin-block-end"},{name:"scroll-margin-block-start"},{name:"scroll-margin-bottom"},{longhands:["scroll-margin-inline-start","scroll-margin-inline-end"],name:"scroll-margin-inline"},{name:"scroll-margin-inline-end"},{name:"scroll-margin-inline-start"},{name:"scroll-margin-left"},{name:"scroll-margin-right"},{name:"scroll-margin-top"},{longhands:["scroll-padding-top","scroll-padding-right","scroll-padding-bottom","scroll-padding-left"],name:"scroll-padding"},{longhands:["scroll-padding-block-start","scroll-padding-block-end"],name:"scroll-padding-block"},{keywords:["auto"],name:"scroll-padding-block-end"},{keywords:["auto"],name:"scroll-padding-block-start"},{keywords:["auto"],name:"scroll-padding-bottom"},{longhands:["scroll-padding-inline-start","scroll-padding-inline-end"],name:"scroll-padding-inline"},{keywords:["auto"],name:"scroll-padding-inline-end"},{keywords:["auto"],name:"scroll-padding-inline-start"},{keywords:["auto"],name:"scroll-padding-left"},{keywords:["auto"],name:"scroll-padding-right"},{keywords:["auto"],name:"scroll-padding-top"},{keywords:["none","start","end","center"],name:"scroll-snap-align"},{keywords:["normal","always"],name:"scroll-snap-stop"},{keywords:["none","x","y","block","inline","both","mandatory","proximity"],name:"scroll-snap-type"},{longhands:["scroll-start-block","scroll-start-inline"],name:"scroll-start"},{keywords:["auto","start","end","center","top","bottom","left","right"],name:"scroll-start-block"},{keywords:["auto","start","end","center","top","bottom","left","right"],name:"scroll-start-inline"},{longhands:["scroll-start-target-block","scroll-start-target-inline"],name:"scroll-start-target"},{keywords:["none","auto"],name:"scroll-start-target-block"},{keywords:["none","auto"],name:"scroll-start-target-inline"},{keywords:["none","auto"],name:"scroll-start-target-x"},{keywords:["none","auto"],name:"scroll-start-target-y"},{name:"scroll-start-x"},{name:"scroll-start-y"},{longhands:["scroll-timeline-name","scroll-timeline-axis","scroll-timeline-attachment"],name:"scroll-timeline"},{name:"scroll-timeline-attachment"},{name:"scroll-timeline-axis"},{name:"scroll-timeline-name"},{inherited:!0,keywords:["auto"],name:"scrollbar-color"},{inherited:!1,keywords:["auto","stable","both-edges"],name:"scrollbar-gutter"},{inherited:!1,keywords:["auto","thin","none"],name:"scrollbar-width"},{name:"shape-image-threshold"},{keywords:["none"],name:"shape-margin"},{keywords:["none"],name:"shape-outside"},{inherited:!0,keywords:["auto","optimizespeed","crispedges","geometricprecision"],name:"shape-rendering"},{name:"size"},{name:"size-adjust"},{inherited:!0,keywords:["none","normal","spell-out","digits","literal-punctuation","no-punctuation"],name:"speak"},{name:"speak-as"},{name:"src"},{keywords:["currentcolor"],name:"stop-color"},{name:"stop-opacity"},{inherited:!0,name:"stroke"},{inherited:!0,keywords:["none"],name:"stroke-dasharray"},{inherited:!0,name:"stroke-dashoffset"},{inherited:!0,keywords:["butt","round","square"],name:"stroke-linecap"},{inherited:!0,keywords:["miter","bevel","round"],name:"stroke-linejoin"},{inherited:!0,name:"stroke-miterlimit"},{inherited:!0,name:"stroke-opacity"},{inherited:!0,name:"stroke-width"},{name:"suffix"},{name:"symbols"},{name:"syntax"},{name:"system"},{inherited:!0,name:"tab-size"},{keywords:["auto","fixed"],name:"table-layout"},{inherited:!0,keywords:["left","right","center","justify","-webkit-left","-webkit-right","-webkit-center","start","end"],name:"text-align"},{inherited:!0,keywords:["auto","start","end","left","right","center","justify"],name:"text-align-last"},{inherited:!0,keywords:["start","middle","end"],name:"text-anchor"},{keywords:["none","start","end","both"],name:"text-box-trim"},{inherited:!0,keywords:["none","all"],name:"text-combine-upright"},{longhands:["text-decoration-line","text-decoration-thickness","text-decoration-style","text-decoration-color"],name:"text-decoration"},{keywords:["currentcolor"],name:"text-decoration-color"},{keywords:["none","underline","overline","line-through","blink","spelling-error","grammar-error"],name:"text-decoration-line"},{inherited:!0,keywords:["none","auto"],name:"text-decoration-skip-ink"},{keywords:["solid","double","dotted","dashed","wavy"],name:"text-decoration-style"},{inherited:!0,keywords:["auto","from-font"],name:"text-decoration-thickness"},{inherited:!0,longhands:["text-emphasis-style","text-emphasis-color"],name:"text-emphasis"},{inherited:!0,keywords:["currentcolor"],name:"text-emphasis-color"},{inherited:!0,name:"text-emphasis-position"},{inherited:!0,name:"text-emphasis-style"},{inherited:!0,name:"text-indent"},{inherited:!0,keywords:["sideways","mixed","upright"],name:"text-orientation"},{keywords:["clip","ellipsis"],name:"text-overflow"},{inherited:!0,keywords:["auto","optimizespeed","optimizelegibility","geometricprecision"],name:"text-rendering"},{inherited:!0,keywords:["none"],name:"text-shadow"},{inherited:!0,keywords:["none","auto"],name:"text-size-adjust"},{inherited:!0,keywords:["capitalize","uppercase","lowercase","none","math-auto"],name:"text-transform"},{inherited:!0,keywords:["auto"],name:"text-underline-offset"},{inherited:!0,keywords:["auto","from-font","under","left","right"],name:"text-underline-position"},{inherited:!0,keywords:["wrap","nowrap","balance","pretty"],name:"text-wrap"},{name:"timeline-scope"},{longhands:["toggle-root","toggle-trigger"],name:"toggle"},{keywords:["none"],name:"toggle-group"},{keywords:["none"],name:"toggle-root"},{keywords:["none"],name:"toggle-trigger"},{keywords:["normal"],name:"toggle-visibility"},{keywords:["auto"],name:"top"},{keywords:["auto","none","pan-x","pan-left","pan-right","pan-y","pan-up","pan-down","pinch-zoom","manipulation"],name:"touch-action"},{keywords:["none"],name:"transform"},{keywords:["fill-box","view-box"],name:"transform-box"},{name:"transform-origin"},{keywords:["flat","preserve-3d"],name:"transform-style"},{longhands:["transition-property","transition-duration","transition-timing-function","transition-delay"],name:"transition"},{name:"transition-delay"},{name:"transition-duration"},{keywords:["none"],name:"transition-property"},{keywords:["linear","ease","ease-in","ease-out","ease-in-out","jump-both","jump-end","jump-none","jump-start","step-start","step-end"],name:"transition-timing-function"},{name:"translate"},{keywords:["normal","embed","bidi-override","isolate","plaintext","isolate-override"],name:"unicode-bidi"},{name:"unicode-range"},{inherited:!0,keywords:["auto","none","text","all","contain"],name:"user-select"},{keywords:["none","non-scaling-stroke"],name:"vector-effect"},{keywords:["baseline","sub","super","text-top","text-bottom","middle"],name:"vertical-align"},{longhands:["view-timeline-name","view-timeline-axis","view-timeline-attachment"],name:"view-timeline"},{name:"view-timeline-attachment"},{name:"view-timeline-axis"},{name:"view-timeline-inset"},{name:"view-timeline-name"},{keywords:["none"],name:"view-transition-name"},{inherited:!0,keywords:["visible","hidden","collapse"],name:"visibility"},{inherited:!0,keywords:["normal","pre","pre-wrap","pre-line","nowrap","break-spaces"],name:"white-space"},{inherited:!0,keywords:["collapse","preserve","preserve-breaks","break-spaces"],name:"white-space-collapse"},{inherited:!0,name:"widows"},{keywords:["auto","fit-content","min-content","max-content"],name:"width"},{keywords:["auto"],name:"will-change"},{inherited:!0,keywords:["normal"],name:"word-boundary-detection"},{inherited:!0,keywords:["normal","break-all","keep-all","break-word"],name:"word-break"},{inherited:!0,keywords:["normal"],name:"word-spacing"},{inherited:!0,keywords:["horizontal-tb","vertical-rl","vertical-lr"],name:"writing-mode"},{name:"x"},{name:"y"},{keywords:["auto"],name:"z-index"},{name:"zoom"}],g={"-webkit-box-align":{values:["stretch","start","center","end","baseline"]},"-webkit-box-decoration-break":{values:["slice","clone"]},"-webkit-box-direction":{values:["normal","reverse"]},"-webkit-box-orient":{values:["horizontal","vertical"]},"-webkit-box-pack":{values:["start","center","end","justify"]},"-webkit-line-break":{values:["auto","loose","normal","strict","after-white-space","anywhere"]},"-webkit-print-color-adjust":{values:["economy","exact"]},"-webkit-rtl-ordering":{values:["logical","visual"]},"-webkit-ruby-position":{values:["before","after"]},"-webkit-text-security":{values:["none","disc","circle","square"]},"-webkit-user-drag":{values:["auto","none","element"]},"-webkit-user-modify":{values:["read-only","read-write","read-write-plaintext-only"]},"accent-color":{values:["auto","currentcolor"]},"alignment-baseline":{values:["auto","baseline","alphabetic","ideographic","middle","central","mathematical","before-edge","text-before-edge","after-edge","text-after-edge","hanging"]},"anchor-default":{values:["none"]},"anchor-name":{values:["none"]},"anchor-scroll":{values:["none"]},"animation-composition":{values:["replace","add","accumulate"]},"animation-direction":{values:["normal","reverse","alternate","alternate-reverse"]},"animation-fill-mode":{values:["none","forwards","backwards","both"]},"animation-iteration-count":{values:["infinite"]},"animation-name":{values:["none"]},"animation-play-state":{values:["running","paused"]},"animation-timeline":{values:["none","auto"]},"animation-timing-function":{values:["linear","ease","ease-in","ease-out","ease-in-out","jump-both","jump-end","jump-none","jump-start","step-start","step-end"]},"app-region":{values:["none","drag","no-drag"]},"aspect-ratio":{values:["auto"]},"backdrop-filter":{values:["none"]},"backface-visibility":{values:["visible","hidden"]},"background-attachment":{values:["scroll","fixed","local"]},"background-blend-mode":{values:["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},"background-clip":{values:["border-box","padding-box","content-box"]},"background-color":{values:["currentcolor"]},"background-image":{values:["auto","none"]},"background-origin":{values:["border-box","padding-box","content-box"]},"background-size":{values:["auto","cover","contain"]},"baseline-shift":{values:["baseline","sub","super"]},"baseline-source":{values:["auto","first","last"]},"block-size":{values:["auto"]},"border-bottom-color":{values:["currentcolor"]},"border-bottom-style":{values:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"]},"border-bottom-width":{values:["thin","medium","thick"]},"border-collapse":{values:["separate","collapse"]},"border-image-repeat":{values:["stretch","repeat","round","space"]},"border-image-source":{values:["none"]},"border-image-width":{values:["auto"]},"border-left-color":{values:["currentcolor"]},"border-left-style":{values:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"]},"border-left-width":{values:["thin","medium","thick"]},"border-right-color":{values:["currentcolor"]},"border-right-style":{values:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"]},"border-right-width":{values:["thin","medium","thick"]},"border-style":{values:["none"]},"border-top-color":{values:["currentcolor"]},"border-top-style":{values:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"]},"border-top-width":{values:["thin","medium","thick"]},bottom:{values:["auto"]},"box-shadow":{values:["none"]},"box-sizing":{values:["content-box","border-box"]},"break-after":{values:["auto","avoid","avoid-column","avoid-page","column","left","page","recto","right","verso"]},"break-before":{values:["auto","avoid","avoid-column","avoid-page","column","left","page","recto","right","verso"]},"break-inside":{values:["auto","avoid","avoid-column","avoid-page"]},"buffered-rendering":{values:["auto","dynamic","static"]},"caption-side":{values:["top","bottom"]},"caret-color":{values:["auto","currentcolor"]},clear:{values:["none","left","right","both","inline-start","inline-end"]},clip:{values:["auto"]},"clip-path":{values:["none"]},"clip-rule":{values:["nonzero","evenodd"]},color:{values:["currentcolor"]},"color-interpolation":{values:["auto","srgb","linearrgb"]},"color-interpolation-filters":{values:["auto","srgb","linearrgb"]},"color-rendering":{values:["auto","optimizespeed","optimizequality"]},"column-count":{values:["auto"]},"column-fill":{values:["balance","auto"]},"column-gap":{values:["normal"]},"column-rule-color":{values:["currentcolor"]},"column-rule-style":{values:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"]},"column-rule-width":{values:["thin","medium","thick"]},"column-span":{values:["none","all"]},"column-width":{values:["auto"]},contain:{values:["none","strict","content","size","layout","style","paint","inline-size","block-size"]},"contain-intrinsic-height":{values:["auto","none"]},"contain-intrinsic-width":{values:["auto","none"]},"container-name":{values:["none"]},"container-type":{values:["normal","inline-size","size","sticky"]},"content-visibility":{values:["visible","auto","hidden"]},"counter-increment":{values:["none"]},"counter-reset":{values:["none"]},"counter-set":{values:["none"]},cursor:{values:["auto","default","none","context-menu","help","pointer","progress","wait","cell","crosshair","text","vertical-text","alias","copy","move","no-drop","not-allowed","e-resize","n-resize","ne-resize","nw-resize","s-resize","se-resize","sw-resize","w-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","col-resize","row-resize","all-scroll","zoom-in","zoom-out","grab","grabbing"]},d:{values:["none"]},direction:{values:["ltr","rtl"]},display:{values:["inline","block","list-item","inline-block","table","inline-table","table-row-group","table-header-group","table-footer-group","table-row","table-column-group","table-column","table-cell","table-caption","-webkit-box","-webkit-inline-box","flex","inline-flex","grid","inline-grid","contents","flow-root","none","flow","math"]},"dominant-baseline":{values:["auto","alphabetic","ideographic","middle","central","mathematical","hanging","use-script","no-change","reset-size","text-after-edge","text-before-edge"]},"empty-cells":{values:["show","hide"]},"fill-rule":{values:["nonzero","evenodd"]},filter:{values:["none"]},"flex-basis":{values:["auto","fit-content","min-content","max-content","content"]},"flex-direction":{values:["row","row-reverse","column","column-reverse"]},"flex-wrap":{values:["nowrap","wrap","wrap-reverse"]},float:{values:["none","left","right","inline-start","inline-end"]},"flood-color":{values:["currentcolor"]},"font-feature-settings":{values:["normal"]},"font-kerning":{values:["auto","normal","none"]},"font-optical-sizing":{values:["auto","none"]},"font-palette":{values:["normal","light","dark"]},"font-size":{values:["xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large","larger","smaller","-webkit-xxx-large"]},"font-size-adjust":{values:["none","ex-height","cap-height","ch-width","ic-width"]},"font-stretch":{values:["normal","ultra-condensed","extra-condensed","condensed","semi-condensed","semi-expanded","expanded","extra-expanded","ultra-expanded"]},"font-style":{values:["normal","italic","oblique"]},"font-synthesis-small-caps":{values:["auto","none"]},"font-synthesis-style":{values:["auto","none"]},"font-synthesis-weight":{values:["auto","none"]},"font-variant-alternates":{values:["normal"]},"font-variant-caps":{values:["normal","small-caps","all-small-caps","petite-caps","all-petite-caps","unicase","titling-caps"]},"font-variant-east-asian":{values:["normal","jis78","jis83","jis90","jis04","simplified","traditional","full-width","proportional-width","ruby"]},"font-variant-ligatures":{values:["normal","none","common-ligatures","no-common-ligatures","discretionary-ligatures","no-discretionary-ligatures","historical-ligatures","no-historical-ligatures","contextual","no-contextual"]},"font-variant-numeric":{values:["normal","lining-nums","oldstyle-nums","proportional-nums","tabular-nums","diagonal-fractions","stacked-fractions","ordinal","slashed-zero"]},"font-variant-position":{values:["normal","sub","super"]},"font-variation-settings":{values:["normal"]},"font-weight":{values:["normal","bold","bolder","lighter"]},"forced-color-adjust":{values:["auto","none","preserve-parent-color"]},"grid-auto-columns":{values:["auto","min-content","max-content"]},"grid-auto-flow":{values:["row","column"]},"grid-auto-rows":{values:["auto","min-content","max-content"]},"grid-column-end":{values:["auto"]},"grid-column-start":{values:["auto"]},"grid-row-end":{values:["auto"]},"grid-row-start":{values:["auto"]},"grid-template-areas":{values:["none"]},"grid-template-columns":{values:["none"]},"grid-template-rows":{values:["none"]},height:{values:["auto","fit-content","min-content","max-content"]},"hyphenate-limit-chars":{values:["auto"]},hyphens:{values:["none","manual","auto"]},"image-rendering":{values:["auto","optimizespeed","optimizequality","-webkit-optimize-contrast","pixelated"]},"initial-letter":{values:["drop","normal","raise"]},"inline-size":{values:["auto"]},isolation:{values:["auto","isolate"]},left:{values:["auto"]},"letter-spacing":{values:["normal"]},"lighting-color":{values:["currentcolor"]},"line-break":{values:["auto","loose","normal","strict","anywhere"]},"line-height":{values:["normal"]},"list-style-image":{values:["none"]},"list-style-position":{values:["outside","inside"]},"list-style-type":{values:["disc","circle","square","disclosure-open","disclosure-closed","decimal","none"]},"margin-block-end":{values:["auto"]},"margin-block-start":{values:["auto"]},"margin-bottom":{values:["auto"]},"margin-inline-end":{values:["auto"]},"margin-inline-start":{values:["auto"]},"margin-left":{values:["auto"]},"margin-right":{values:["auto"]},"margin-top":{values:["auto"]},"marker-end":{values:["none"]},"marker-mid":{values:["none"]},"marker-start":{values:["none"]},"mask-type":{values:["luminance","alpha"]},"math-shift":{values:["normal","compact"]},"math-style":{values:["normal","compact"]},"max-block-size":{values:["none"]},"max-height":{values:["none"]},"max-inline-size":{values:["none"]},"max-width":{values:["none"]},"mix-blend-mode":{values:["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]},"object-fit":{values:["fill","contain","cover","none","scale-down"]},"object-view-box":{values:["none"]},"offset-anchor":{values:["auto"]},"offset-path":{values:["none"]},"offset-position":{values:["auto","normal"]},"offset-rotate":{values:["auto","reverse"]},"origin-trial-test-property":{values:["normal","none"]},"outline-color":{values:["currentcolor"]},"outline-style":{values:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"]},"outline-width":{values:["thin","medium","thick"]},"overflow-anchor":{values:["visible","none","auto"]},"overflow-clip-margin":{values:["border-box","content-box","padding-box"]},"overflow-wrap":{values:["normal","break-word","anywhere"]},"overflow-x":{values:["visible","hidden","scroll","auto","overlay","clip"]},"overflow-y":{values:["visible","hidden","scroll","auto","overlay","clip"]},overlay:{values:["none","auto"]},"overscroll-behavior-x":{values:["auto","contain","none"]},"overscroll-behavior-y":{values:["auto","contain","none"]},page:{values:["auto"]},"paint-order":{values:["normal","fill","stroke","markers"]},perspective:{values:["none"]},"pointer-events":{values:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","bounding-box","all"]},position:{values:["static","relative","absolute","fixed","sticky"]},"position-fallback":{values:["none"]},quotes:{values:["auto","none"]},resize:{values:["none","both","horizontal","vertical","block","inline"]},right:{values:["auto"]},"row-gap":{values:["normal"]},rx:{values:["auto"]},ry:{values:["auto"]},"scroll-behavior":{values:["auto","smooth"]},"scroll-padding-block-end":{values:["auto"]},"scroll-padding-block-start":{values:["auto"]},"scroll-padding-bottom":{values:["auto"]},"scroll-padding-inline-end":{values:["auto"]},"scroll-padding-inline-start":{values:["auto"]},"scroll-padding-left":{values:["auto"]},"scroll-padding-right":{values:["auto"]},"scroll-padding-top":{values:["auto"]},"scroll-snap-align":{values:["none","start","end","center"]},"scroll-snap-stop":{values:["normal","always"]},"scroll-snap-type":{values:["none","x","y","block","inline","both","mandatory","proximity"]},"scroll-start-block":{values:["auto","start","end","center","top","bottom","left","right"]},"scroll-start-inline":{values:["auto","start","end","center","top","bottom","left","right"]},"scroll-start-target-block":{values:["none","auto"]},"scroll-start-target-inline":{values:["none","auto"]},"scroll-start-target-x":{values:["none","auto"]},"scroll-start-target-y":{values:["none","auto"]},"scrollbar-color":{values:["auto"]},"scrollbar-gutter":{values:["auto","stable","both-edges"]},"scrollbar-width":{values:["auto","thin","none"]},"shape-margin":{values:["none"]},"shape-outside":{values:["none"]},"shape-rendering":{values:["auto","optimizespeed","crispedges","geometricprecision"]},speak:{values:["none","normal","spell-out","digits","literal-punctuation","no-punctuation"]},"stop-color":{values:["currentcolor"]},"stroke-dasharray":{values:["none"]},"stroke-linecap":{values:["butt","round","square"]},"stroke-linejoin":{values:["miter","bevel","round"]},"table-layout":{values:["auto","fixed"]},"text-align":{values:["left","right","center","justify","-webkit-left","-webkit-right","-webkit-center","start","end"]},"text-align-last":{values:["auto","start","end","left","right","center","justify"]},"text-anchor":{values:["start","middle","end"]},"text-box-trim":{values:["none","start","end","both"]},"text-combine-upright":{values:["none","all"]},"text-decoration-color":{values:["currentcolor"]},"text-decoration-line":{values:["none","underline","overline","line-through","blink","spelling-error","grammar-error"]},"text-decoration-skip-ink":{values:["none","auto"]},"text-decoration-style":{values:["solid","double","dotted","dashed","wavy"]},"text-decoration-thickness":{values:["auto","from-font"]},"text-emphasis-color":{values:["currentcolor"]},"text-orientation":{values:["sideways","mixed","upright"]},"text-overflow":{values:["clip","ellipsis"]},"text-rendering":{values:["auto","optimizespeed","optimizelegibility","geometricprecision"]},"text-shadow":{values:["none"]},"text-size-adjust":{values:["none","auto"]},"text-transform":{values:["capitalize","uppercase","lowercase","none","math-auto"]},"text-underline-offset":{values:["auto"]},"text-underline-position":{values:["auto","from-font","under","left","right"]},"text-wrap":{values:["wrap","nowrap","balance","pretty"]},"toggle-group":{values:["none"]},"toggle-root":{values:["none"]},"toggle-trigger":{values:["none"]},"toggle-visibility":{values:["normal"]},top:{values:["auto"]},"touch-action":{values:["auto","none","pan-x","pan-left","pan-right","pan-y","pan-up","pan-down","pinch-zoom","manipulation"]},transform:{values:["none"]},"transform-box":{values:["fill-box","view-box"]},"transform-style":{values:["flat","preserve-3d"]},"transition-property":{values:["none"]},"transition-timing-function":{values:["linear","ease","ease-in","ease-out","ease-in-out","jump-both","jump-end","jump-none","jump-start","step-start","step-end"]},"unicode-bidi":{values:["normal","embed","bidi-override","isolate","plaintext","isolate-override"]},"user-select":{values:["auto","none","text","all","contain"]},"vector-effect":{values:["none","non-scaling-stroke"]},"vertical-align":{values:["baseline","sub","super","text-top","text-bottom","middle"]},"view-transition-name":{values:["none"]},visibility:{values:["visible","hidden","collapse"]},"white-space":{values:["normal","pre","pre-wrap","pre-line","nowrap","break-spaces"]},"white-space-collapse":{values:["collapse","preserve","preserve-breaks","break-spaces"]},width:{values:["auto","fit-content","min-content","max-content"]},"will-change":{values:["auto"]},"word-boundary-detection":{values:["normal"]},"word-break":{values:["normal","break-all","keep-all","break-word"]},"word-spacing":{values:["normal"]},"writing-mode":{values:["horizontal-tb","vertical-rl","vertical-lr"]},"z-index":{values:["auto"]}},p=new Map([["-epub-caption-side","caption-side"],["-epub-text-combine","-webkit-text-combine"],["-epub-text-emphasis","text-emphasis"],["-epub-text-emphasis-color","text-emphasis-color"],["-epub-text-emphasis-style","text-emphasis-style"],["-epub-text-orientation","-webkit-text-orientation"],["-epub-text-transform","text-transform"],["-epub-word-break","word-break"],["-epub-writing-mode","-webkit-writing-mode"],["-webkit-align-content","align-content"],["-webkit-align-items","align-items"],["-webkit-align-self","align-self"],["-webkit-alternative-animation-delay","-alternative-animation-delay"],["-webkit-alternative-animation-with-delay-start-end","-alternative-animation-with-delay-start-end"],["-webkit-alternative-animation-with-timeline","-alternative-animation-with-timeline"],["-webkit-animation","animation"],["-webkit-animation-delay","animation-delay"],["-webkit-animation-direction","animation-direction"],["-webkit-animation-duration","animation-duration"],["-webkit-animation-fill-mode","animation-fill-mode"],["-webkit-animation-iteration-count","animation-iteration-count"],["-webkit-animation-name","animation-name"],["-webkit-animation-play-state","animation-play-state"],["-webkit-animation-timing-function","animation-timing-function"],["-webkit-app-region","app-region"],["-webkit-appearance","appearance"],["-webkit-backface-visibility","backface-visibility"],["-webkit-background-clip","background-clip"],["-webkit-background-origin","background-origin"],["-webkit-background-size","background-size"],["-webkit-border-after","border-block-end"],["-webkit-border-after-color","border-block-end-color"],["-webkit-border-after-style","border-block-end-style"],["-webkit-border-after-width","border-block-end-width"],["-webkit-border-before","border-block-start"],["-webkit-border-before-color","border-block-start-color"],["-webkit-border-before-style","border-block-start-style"],["-webkit-border-before-width","border-block-start-width"],["-webkit-border-bottom-left-radius","border-bottom-left-radius"],["-webkit-border-bottom-right-radius","border-bottom-right-radius"],["-webkit-border-end","border-inline-end"],["-webkit-border-end-color","border-inline-end-color"],["-webkit-border-end-style","border-inline-end-style"],["-webkit-border-end-width","border-inline-end-width"],["-webkit-border-radius","border-radius"],["-webkit-border-start","border-inline-start"],["-webkit-border-start-color","border-inline-start-color"],["-webkit-border-start-style","border-inline-start-style"],["-webkit-border-start-width","border-inline-start-width"],["-webkit-border-top-left-radius","border-top-left-radius"],["-webkit-border-top-right-radius","border-top-right-radius"],["-webkit-box-shadow","box-shadow"],["-webkit-box-sizing","box-sizing"],["-webkit-clip-path","clip-path"],["-webkit-column-count","column-count"],["-webkit-column-gap","column-gap"],["-webkit-column-rule","column-rule"],["-webkit-column-rule-color","column-rule-color"],["-webkit-column-rule-style","column-rule-style"],["-webkit-column-rule-width","column-rule-width"],["-webkit-column-span","column-span"],["-webkit-column-width","column-width"],["-webkit-columns","columns"],["-webkit-filter","filter"],["-webkit-flex","flex"],["-webkit-flex-basis","flex-basis"],["-webkit-flex-direction","flex-direction"],["-webkit-flex-flow","flex-flow"],["-webkit-flex-grow","flex-grow"],["-webkit-flex-shrink","flex-shrink"],["-webkit-flex-wrap","flex-wrap"],["-webkit-font-feature-settings","font-feature-settings"],["-webkit-hyphenate-character","hyphenate-character"],["-webkit-justify-content","justify-content"],["-webkit-logical-height","block-size"],["-webkit-logical-width","inline-size"],["-webkit-margin-after","margin-block-end"],["-webkit-margin-before","margin-block-start"],["-webkit-margin-end","margin-inline-end"],["-webkit-margin-start","margin-inline-start"],["-webkit-max-logical-height","max-block-size"],["-webkit-max-logical-width","max-inline-size"],["-webkit-min-logical-height","min-block-size"],["-webkit-min-logical-width","min-inline-size"],["-webkit-opacity","opacity"],["-webkit-order","order"],["-webkit-padding-after","padding-block-end"],["-webkit-padding-before","padding-block-start"],["-webkit-padding-end","padding-inline-end"],["-webkit-padding-start","padding-inline-start"],["-webkit-perspective","perspective"],["-webkit-perspective-origin","perspective-origin"],["-webkit-shape-image-threshold","shape-image-threshold"],["-webkit-shape-margin","shape-margin"],["-webkit-shape-outside","shape-outside"],["-webkit-text-emphasis","text-emphasis"],["-webkit-text-emphasis-color","text-emphasis-color"],["-webkit-text-emphasis-position","text-emphasis-position"],["-webkit-text-emphasis-style","text-emphasis-style"],["-webkit-text-size-adjust","text-size-adjust"],["-webkit-transform","transform"],["-webkit-transform-origin","transform-origin"],["-webkit-transform-style","transform-style"],["-webkit-transition","transition"],["-webkit-transition-delay","transition-delay"],["-webkit-transition-duration","transition-duration"],["-webkit-transition-property","transition-property"],["-webkit-transition-timing-function","transition-timing-function"],["-webkit-user-select","user-select"],["word-wrap","overflow-wrap"]]);class m{#t;#n;#r;#s;#i;#a;#o;#l;#d;#c;constructor(e,n){this.#t=[],this.#n=new Map,this.#r=new Map,this.#s=new Set,this.#i=new Set,this.#a=new Map,this.#o=n;for(let t=0;tCSS.supports(e,t))).sort(m.sortPrefixesToEnd).map((t=>`${e}: ${t}`));this.isSVGProperty(e)||this.#d.push(...t),this.#c.push(...t)}}static sortPrefixesToEnd(e,t){const n=e.startsWith("-webkit-"),r=t.startsWith("-webkit-");return n&&!r?1:!n&&r||et?1:0}allProperties(){return this.#t}aliasesFor(){return this.#o}nameValuePresets(e){return e?this.#c:this.#d}isSVGProperty(e){return e=e.toLowerCase(),this.#i.has(e)}getLonghands(e){return this.#n.get(e)||null}getShorthands(e){return this.#r.get(e)||null}isColorAwareProperty(e){return R.has(e.toLowerCase())||this.isCustomProperty(e.toLowerCase())}isFontFamilyProperty(e){return"font-family"===e.toLowerCase()}isAngleAwareProperty(e){const t=e.toLowerCase();return R.has(t)||x.has(t)}isGridAreaDefiningProperty(e){return"grid"===(e=e.toLowerCase())||"grid-template"===e||"grid-template-areas"===e}isLengthProperty(e){return"line-height"!==(e=e.toLowerCase())&&(w.has(e)||e.startsWith("margin")||e.startsWith("padding")||-1!==e.indexOf("width")||-1!==e.indexOf("height"))}isBezierAwareProperty(e){return e=e.toLowerCase(),C.has(e)||this.isCustomProperty(e)}isFontAwareProperty(e){return e=e.toLowerCase(),T.has(e)||this.isCustomProperty(e)}isCustomProperty(e){return e.startsWith("--")}isShadowProperty(e){return"box-shadow"===(e=e.toLowerCase())||"text-shadow"===e||"-webkit-box-shadow"===e}isStringProperty(e){return"content"===(e=e.toLowerCase())}canonicalPropertyName(e){if(this.isCustomProperty(e))return e;e=e.toLowerCase();const t=this.#o.get(e);if(t)return t;if(!e||e.length<9||"-"!==e.charAt(0))return e;const n=e.match(/(?:-webkit-)(.+)/);return n&&this.#l.has(n[1])?n[1]:e}isCSSPropertyName(e){return!!((e=e.toLowerCase()).startsWith("--")&&e.length>2||e.startsWith("-moz-")||e.startsWith("-ms-")||e.startsWith("-o-")||e.startsWith("-webkit-"))||this.#l.has(e)}isPropertyInherited(e){return(e=e.toLowerCase()).startsWith("--")||this.#s.has(this.canonicalPropertyName(e))||this.#s.has(e)}specificPropertyValues(e){const t=e.replace(/^-webkit-/,""),n=this.#a;let r=n.get(e)||n.get(t);if(!r){r=[];for(const t of L)CSS.supports(e,t)&&r.push(t);n.set(e,r)}return r}getPropertyValues(t){const n=["inherit","initial","revert","unset"];if(t=t.toLowerCase(),n.push(...this.specificPropertyValues(t)),this.isColorAwareProperty(t)){n.push("currentColor");for(const t of e.Color.Nicknames.keys())n.push(t)}return n.sort(m.sortPrefixesToEnd)}propertyUsageWeight(e){return P.get(e)||P.get(this.canonicalPropertyName(e))||0}getValuePreset(e,t){const n=S.get(e);let r=n?n.get(t):null;if(!r)return null;let s=r.length,i=r.length;return r&&(s=r.indexOf("|"),i=r.lastIndexOf("|"),i=s===i?i:i-1,r=r.replace(/\|/g,"")),{text:r,startColumn:s,endColumn:i}}isHighlightPseudoType(e){return"highlight"===e||"selection"===e||"target-text"===e||"grammar-error"===e||"spelling-error"===e}}const f=/(var\(\s*--.*?\))/g,b=/((?:\[[\w\- ]+\]\s*)*(?:"[^"]+"|'[^']+'))[^'"\[]*\[?[^'"\[]*/;let y=null;function v(){if(!y){y=new m(u,p)}return y}const I=new Map([["linear-gradient","linear-gradient(|45deg, black, transparent|)"],["radial-gradient","radial-gradient(|black, transparent|)"],["repeating-linear-gradient","repeating-linear-gradient(|45deg, black, transparent 100px|)"],["repeating-radial-gradient","repeating-radial-gradient(|black, transparent 100px|)"],["url","url(||)"]]),k=new Map([["blur","blur(|1px|)"],["brightness","brightness(|0.5|)"],["contrast","contrast(|0.5|)"],["drop-shadow","drop-shadow(|2px 4px 6px black|)"],["grayscale","grayscale(|1|)"],["hue-rotate","hue-rotate(|45deg|)"],["invert","invert(|1|)"],["opacity","opacity(|0.5|)"],["saturate","saturate(|0.5|)"],["sepia","sepia(|1|)"],["url","url(||)"]]),S=new Map([["filter",k],["backdrop-filter",k],["background",I],["background-image",I],["-webkit-mask-image",I],["transform",new Map([["scale","scale(|1.5|)"],["scaleX","scaleX(|1.5|)"],["scaleY","scaleY(|1.5|)"],["scale3d","scale3d(|1.5, 1.5, 1.5|)"],["rotate","rotate(|45deg|)"],["rotateX","rotateX(|45deg|)"],["rotateY","rotateY(|45deg|)"],["rotateZ","rotateZ(|45deg|)"],["rotate3d","rotate3d(|1, 1, 1, 45deg|)"],["skew","skew(|10deg, 10deg|)"],["skewX","skewX(|10deg|)"],["skewY","skewY(|10deg|)"],["translate","translate(|10px, 10px|)"],["translateX","translateX(|10px|)"],["translateY","translateY(|10px|)"],["translateZ","translateZ(|10px|)"],["translate3d","translate3d(|10px, 10px, 10px|)"],["matrix","matrix(|1, 0, 0, 1, 0, 0|)"],["matrix3d","matrix3d(|1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1|)"],["perspective","perspective(|10px|)"]])]]),w=new Set(["background-position","border-spacing","bottom","font-size","height","left","letter-spacing","max-height","max-width","min-height","min-width","right","text-indent","top","width","word-spacing","grid-row-gap","grid-column-gap","row-gap"]),C=new Set(["animation","animation-timing-function","transition","transition-timing-function","-webkit-animation","-webkit-animation-timing-function","-webkit-transition","-webkit-transition-timing-function"]),T=new Set(["font-size","line-height","font-weight","font-family","letter-spacing"]),R=new Set(["accent-color","background","background-color","background-image","border","border-color","border-image","border-image-source","border-bottom","border-bottom-color","border-left","border-left-color","border-right","border-right-color","border-top","border-top-color","box-shadow","caret-color","color","column-rule","column-rule-color","content","fill","list-style-image","outline","outline-color","stop-color","stroke","text-decoration-color","text-shadow","-webkit-border-after","-webkit-border-after-color","-webkit-border-before","-webkit-border-before-color","-webkit-border-end","-webkit-border-end-color","-webkit-border-start","-webkit-border-start-color","-webkit-box-reflect","-webkit-box-shadow","-webkit-column-rule-color","-webkit-mask","-webkit-mask-box-image","-webkit-mask-box-image-source","-webkit-mask-image","-webkit-tap-highlight-color","-webkit-text-decoration-color","-webkit-text-emphasis","-webkit-text-emphasis-color","-webkit-text-fill-color","-webkit-text-stroke","-webkit-text-stroke-color"]),x=new Set(["-webkit-border-image","transform","-webkit-transform","rotate","filter","-webkit-filter","backdrop-filter","offset","offset-rotate","font-style"]),M={"background-repeat":{values:["repeat","repeat-x","repeat-y","no-repeat","space","round"]},content:{values:["normal","close-quote","no-close-quote","no-open-quote","open-quote"]},"baseline-shift":{values:["baseline"]},"max-height":{values:["min-content","max-content","-webkit-fill-available","fit-content"]},color:{values:["black"]},"background-color":{values:["white"]},"box-shadow":{values:["inset"]},"text-shadow":{values:["0 0 black"]},"-webkit-writing-mode":{values:["horizontal-tb","vertical-rl","vertical-lr"]},"writing-mode":{values:["lr","rl","tb","lr-tb","rl-tb","tb-rl"]},"page-break-inside":{values:["avoid"]},cursor:{values:["-webkit-zoom-in","-webkit-zoom-out","-webkit-grab","-webkit-grabbing"]},"border-width":{values:["medium","thick","thin"]},"border-style":{values:["hidden","inset","groove","ridge","outset","dotted","dashed","solid","double"]},size:{values:["a3","a4","a5","b4","b5","landscape","ledger","legal","letter","portrait"]},overflow:{values:["hidden","visible","overlay","scroll"]},"overscroll-behavior":{values:["contain"]},"text-rendering":{values:["optimizeSpeed","optimizeLegibility","geometricPrecision"]},"text-align":{values:["-webkit-auto","-webkit-match-parent"]},"clip-path":{values:["circle","ellipse","inset","polygon","url"]},"color-interpolation":{values:["sRGB","linearRGB"]},"word-wrap":{values:["normal","break-word"]},"font-weight":{values:["100","200","300","400","500","600","700","800","900"]},"-webkit-text-emphasis":{values:["circle","filled","open","dot","double-circle","triangle","sesame"]},"color-rendering":{values:["optimizeSpeed","optimizeQuality"]},"-webkit-text-combine":{values:["horizontal"]},"text-orientation":{values:["sideways-right"]},outline:{values:["inset","groove","ridge","outset","dotted","dashed","solid","double","medium","thick","thin"]},font:{values:["caption","icon","menu","message-box","small-caption","-webkit-mini-control","-webkit-small-control","-webkit-control","status-bar"]},"dominant-baseline":{values:["text-before-edge","text-after-edge","use-script","no-change","reset-size"]},"-webkit-text-emphasis-position":{values:["over","under"]},"alignment-baseline":{values:["before-edge","after-edge","text-before-edge","text-after-edge","hanging"]},"page-break-before":{values:["left","right","always","avoid"]},"border-image":{values:["repeat","stretch","space","round"]},"text-decoration":{values:["blink","line-through","overline","underline","wavy","double","solid","dashed","dotted"]},"font-family":{values:["serif","sans-serif","cursive","fantasy","monospace","system-ui","emoji","math","fangsong","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","-webkit-body"]},zoom:{values:["normal"]},"max-width":{values:["min-content","max-content","-webkit-fill-available","fit-content"]},"-webkit-font-smoothing":{values:["antialiased","subpixel-antialiased"]},border:{values:["hidden","inset","groove","ridge","outset","dotted","dashed","solid","double","medium","thick","thin"]},"font-variant":{values:["small-caps","normal","common-ligatures","no-common-ligatures","discretionary-ligatures","no-discretionary-ligatures","historical-ligatures","no-historical-ligatures","contextual","no-contextual","all-small-caps","petite-caps","all-petite-caps","unicase","titling-caps","lining-nums","oldstyle-nums","proportional-nums","tabular-nums","diagonal-fractions","stacked-fractions","ordinal","slashed-zero","jis78","jis83","jis90","jis04","simplified","traditional","full-width","proportional-width","ruby"]},"vertical-align":{values:["top","bottom","-webkit-baseline-middle"]},"page-break-after":{values:["left","right","always","avoid"]},"-webkit-text-emphasis-style":{values:["circle","filled","open","dot","double-circle","triangle","sesame"]},transform:{values:["scale","scaleX","scaleY","scale3d","rotate","rotateX","rotateY","rotateZ","rotate3d","skew","skewX","skewY","translate","translateX","translateY","translateZ","translate3d","matrix","matrix3d","perspective"]},"align-content":{values:["normal","baseline","space-between","space-around","space-evenly","stretch","center","start","end","flex-start","flex-end"]},"justify-content":{values:["normal","space-between","space-around","space-evenly","stretch","center","start","end","flex-start","flex-end","left","right"]},"place-content":{values:["normal","space-between","space-around","space-evenly","stretch","center","start","end","flex-start","flex-end","baseline"]},"align-items":{values:["normal","stretch","baseline","center","start","end","self-start","self-end","flex-start","flex-end"]},"justify-items":{values:["normal","stretch","baseline","center","start","end","self-start","self-end","flex-start","flex-end","left","right","legacy"]},"place-items":{values:["normal","stretch","baseline","center","start","end","self-start","self-end","flex-start","flex-end"]},"align-self":{values:["normal","stretch","baseline","center","start","end","self-start","self-end","flex-start","flex-end"]},"justify-self":{values:["normal","stretch","baseline","center","start","end","self-start","self-end","flex-start","flex-end","left","right"]},"place-self":{values:["normal","stretch","baseline","center","start","end","self-start","self-end","flex-start","flex-end"]},"perspective-origin":{values:["left","center","right","top","bottom"]},"transform-origin":{values:["left","center","right","top","bottom"]},"transition-timing-function":{values:["cubic-bezier","steps"]},"animation-timing-function":{values:["cubic-bezier","steps"]},"-webkit-backface-visibility":{values:["visible","hidden"]},"-webkit-column-break-after":{values:["always","avoid"]},"-webkit-column-break-before":{values:["always","avoid"]},"-webkit-column-break-inside":{values:["avoid"]},"-webkit-column-span":{values:["all"]},"-webkit-column-gap":{values:["normal"]},filter:{values:["url","blur","brightness","contrast","drop-shadow","grayscale","hue-rotate","invert","opacity","saturate","sepia"]},"backdrop-filter":{values:["url","blur","brightness","contrast","drop-shadow","grayscale","hue-rotate","invert","opacity","saturate","sepia"]},"mix-blend-mode":{values:["unset"]},"background-blend-mode":{values:["unset"]},"grid-template-columns":{values:["min-content","max-content"]},"grid-template-rows":{values:["min-content","max-content"]},"grid-auto-flow":{values:["dense"]},background:{values:["repeat","repeat-x","repeat-y","no-repeat","top","bottom","left","right","center","fixed","local","scroll","space","round","border-box","content-box","padding-box","linear-gradient","radial-gradient","repeating-linear-gradient","repeating-radial-gradient","url"]},"background-image":{values:["linear-gradient","radial-gradient","repeating-linear-gradient","repeating-radial-gradient","url"]},"background-position":{values:["top","bottom","left","right","center"]},"background-position-x":{values:["left","right","center"]},"background-position-y":{values:["top","bottom","center"]},"background-repeat-x":{values:["repeat","no-repeat"]},"background-repeat-y":{values:["repeat","no-repeat"]},"border-bottom":{values:["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double","medium","thick","thin"]},"border-left":{values:["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double","medium","thick","thin"]},"border-right":{values:["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double","medium","thick","thin"]},"border-top":{values:["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double","medium","thick","thin"]},"buffered-rendering":{values:["static","dynamic"]},"color-interpolation-filters":{values:["srgb","linearrgb"]},"column-rule":{values:["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double","medium","thick","thin"]},"flex-flow":{values:["nowrap","row","row-reverse","column","column-reverse","wrap","wrap-reverse"]},height:{values:["-webkit-fill-available"]},"inline-size":{values:["-webkit-fill-available","min-content","max-content","fit-content"]},"list-style":{values:["outside","inside","disc","circle","square","decimal","decimal-leading-zero","arabic-indic","bengali","cambodian","khmer","devanagari","gujarati","gurmukhi","kannada","lao","malayalam","mongolian","myanmar","oriya","persian","urdu","telugu","tibetan","thai","lower-roman","upper-roman","lower-greek","lower-alpha","lower-latin","upper-alpha","upper-latin","cjk-earthly-branch","cjk-heavenly-stem","ethiopic-halehame","ethiopic-halehame-am","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","hangul","hangul-consonant","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","hebrew","armenian","lower-armenian","upper-armenian","georgian","cjk-ideographic","simp-chinese-formal","simp-chinese-informal","trad-chinese-formal","trad-chinese-informal","hiragana","katakana","hiragana-iroha","katakana-iroha"]},"max-block-size":{values:["-webkit-fill-available","min-content","max-content","fit-content"]},"max-inline-size":{values:["-webkit-fill-available","min-content","max-content","fit-content"]},"min-block-size":{values:["-webkit-fill-available","min-content","max-content","fit-content"]},"min-height":{values:["-webkit-fill-available","min-content","max-content","fit-content"]},"min-inline-size":{values:["-webkit-fill-available","min-content","max-content","fit-content"]},"min-width":{values:["-webkit-fill-available","min-content","max-content","fit-content"]},"object-position":{values:["top","bottom","left","right","center"]},"shape-outside":{values:["border-box","content-box","padding-box","margin-box"]},"-webkit-appearance":{values:["checkbox","radio","push-button","square-button","button","inner-spin-button","listbox","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","menulist","menulist-button","meter","progress-bar","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","searchfield","searchfield-cancel-button","textfield","textarea"]},"-webkit-border-after":{values:["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double","medium","thick","thin"]},"-webkit-border-after-style":{values:["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"]},"-webkit-border-after-width":{values:["medium","thick","thin"]},"-webkit-border-before":{values:["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double","medium","thick","thin"]},"-webkit-border-before-style":{values:["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"]},"-webkit-border-before-width":{values:["medium","thick","thin"]},"-webkit-border-end":{values:["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double","medium","thick","thin"]},"-webkit-border-end-style":{values:["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"]},"-webkit-border-end-width":{values:["medium","thick","thin"]},"-webkit-border-start":{values:["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double","medium","thick","thin"]},"-webkit-border-start-style":{values:["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"]},"-webkit-border-start-width":{values:["medium","thick","thin"]},"-webkit-logical-height":{values:["-webkit-fill-available","min-content","max-content","fit-content"]},"-webkit-logical-width":{values:["-webkit-fill-available","min-content","max-content","fit-content"]},"-webkit-margin-collapse":{values:["collapse","separate","discard"]},"-webkit-mask-box-image":{values:["repeat","stretch","space","round"]},"-webkit-mask-box-image-repeat":{values:["repeat","stretch","space","round"]},"-webkit-mask-clip":{values:["text","border","border-box","content","content-box","padding","padding-box"]},"-webkit-mask-composite":{values:["clear","copy","source-over","source-in","source-out","source-atop","destination-over","destination-in","destination-out","destination-atop","xor","plus-lighter"]},"-webkit-mask-image":{values:["linear-gradient","radial-gradient","repeating-linear-gradient","repeating-radial-gradient","url"]},"-webkit-mask-origin":{values:["border","border-box","content","content-box","padding","padding-box"]},"-webkit-mask-position":{values:["top","bottom","left","right","center"]},"-webkit-mask-position-x":{values:["left","right","center"]},"-webkit-mask-position-y":{values:["top","bottom","center"]},"-webkit-mask-repeat":{values:["repeat","repeat-x","repeat-y","no-repeat","space","round"]},"-webkit-mask-size":{values:["contain","cover"]},"-webkit-max-logical-height":{values:["-webkit-fill-available","min-content","max-content","fit-content"]},"-webkit-max-logical-width":{values:["-webkit-fill-available","min-content","max-content","fit-content"]},"-webkit-min-logical-height":{values:["-webkit-fill-available","min-content","max-content","fit-content"]},"-webkit-min-logical-width":{values:["-webkit-fill-available","min-content","max-content","fit-content"]},"-webkit-perspective-origin-x":{values:["left","right","center"]},"-webkit-perspective-origin-y":{values:["top","bottom","center"]},"-webkit-text-decorations-in-effect":{values:["blink","line-through","overline","underline"]},"-webkit-text-stroke":{values:["medium","thick","thin"]},"-webkit-text-stroke-width":{values:["medium","thick","thin"]},"-webkit-transform-origin-x":{values:["left","right","center"]},"-webkit-transform-origin-y":{values:["top","bottom","center"]},width:{values:["-webkit-fill-available"]}},P=new Map([["align-content",57],["align-items",129],["align-self",55],["animation",175],["animation-delay",114],["animation-direction",113],["animation-duration",137],["animation-fill-mode",132],["animation-iteration-count",124],["animation-name",139],["animation-play-state",104],["animation-timing-function",141],["backface-visibility",123],["background",260],["background-attachment",119],["background-clip",165],["background-color",259],["background-image",246],["background-origin",107],["background-position",237],["background-position-x",108],["background-position-y",93],["background-repeat",234],["background-size",203],["border",263],["border-bottom",233],["border-bottom-color",190],["border-bottom-left-radius",186],["border-bottom-right-radius",185],["border-bottom-style",150],["border-bottom-width",179],["border-collapse",209],["border-color",226],["border-image",89],["border-image-outset",50],["border-image-repeat",49],["border-image-slice",58],["border-image-source",32],["border-image-width",52],["border-left",221],["border-left-color",174],["border-left-style",142],["border-left-width",172],["border-radius",224],["border-right",223],["border-right-color",182],["border-right-style",130],["border-right-width",178],["border-spacing",198],["border-style",206],["border-top",231],["border-top-color",192],["border-top-left-radius",187],["border-top-right-radius",189],["border-top-style",152],["border-top-width",180],["border-width",214],["bottom",227],["box-shadow",213],["box-sizing",216],["caption-side",96],["clear",229],["clip",173],["clip-rule",5],["color",256],["content",219],["counter-increment",111],["counter-reset",110],["cursor",250],["direction",176],["display",262],["empty-cells",99],["fill",140],["fill-opacity",82],["fill-rule",22],["filter",160],["flex",133],["flex-basis",66],["flex-direction",85],["flex-flow",94],["flex-grow",112],["flex-shrink",61],["flex-wrap",68],["float",252],["font",211],["font-family",254],["font-kerning",18],["font-size",264],["font-stretch",77],["font-style",220],["font-variant",161],["font-weight",257],["height",266],["image-rendering",90],["justify-content",127],["left",248],["letter-spacing",188],["line-height",244],["list-style",215],["list-style-image",145],["list-style-position",149],["list-style-type",199],["margin",267],["margin-bottom",241],["margin-left",243],["margin-right",238],["margin-top",253],["mask",20],["max-height",205],["max-width",225],["min-height",217],["min-width",218],["object-fit",33],["opacity",251],["order",117],["orphans",146],["outline",222],["outline-color",153],["outline-offset",147],["outline-style",151],["outline-width",148],["overflow",255],["overflow-wrap",105],["overflow-x",184],["overflow-y",196],["padding",265],["padding-bottom",230],["padding-left",235],["padding-right",232],["padding-top",240],["page",8],["page-break-after",120],["page-break-before",69],["page-break-inside",121],["perspective",92],["perspective-origin",103],["pointer-events",183],["position",261],["quotes",158],["resize",168],["right",245],["shape-rendering",38],["size",64],["speak",118],["src",170],["stop-color",42],["stop-opacity",31],["stroke",98],["stroke-dasharray",36],["stroke-dashoffset",3],["stroke-linecap",30],["stroke-linejoin",21],["stroke-miterlimit",12],["stroke-opacity",34],["stroke-width",87],["table-layout",171],["tab-size",46],["text-align",260],["text-anchor",35],["text-decoration",247],["text-indent",207],["text-overflow",204],["text-rendering",155],["text-shadow",208],["text-transform",202],["top",258],["touch-action",80],["transform",181],["transform-origin",162],["transform-style",86],["transition",193],["transition-delay",134],["transition-duration",135],["transition-property",131],["transition-timing-function",122],["unicode-bidi",156],["unicode-range",136],["vertical-align",236],["visibility",242],["-webkit-appearance",191],["-webkit-backface-visibility",154],["-webkit-background-clip",164],["-webkit-background-origin",40],["-webkit-background-size",163],["-webkit-border-end",9],["-webkit-border-horizontal-spacing",81],["-webkit-border-image",75],["-webkit-border-radius",212],["-webkit-border-start",10],["-webkit-border-start-color",16],["-webkit-border-start-width",13],["-webkit-border-vertical-spacing",43],["-webkit-box-align",101],["-webkit-box-direction",51],["-webkit-box-flex",128],["-webkit-box-ordinal-group",91],["-webkit-box-orient",144],["-webkit-box-pack",106],["-webkit-box-reflect",39],["-webkit-box-shadow",210],["-webkit-column-break-inside",60],["-webkit-column-count",84],["-webkit-column-gap",76],["-webkit-column-rule",25],["-webkit-column-rule-color",23],["-webkit-columns",44],["-webkit-column-span",29],["-webkit-column-width",47],["-webkit-filter",159],["-webkit-font-feature-settings",59],["-webkit-font-smoothing",177],["-webkit-highlight",1],["-webkit-line-break",45],["-webkit-line-clamp",126],["-webkit-margin-after",67],["-webkit-margin-before",70],["-webkit-margin-collapse",14],["-webkit-margin-end",65],["-webkit-margin-start",100],["-webkit-margin-top-collapse",78],["-webkit-mask",19],["-webkit-mask-box-image",72],["-webkit-mask-image",88],["-webkit-mask-position",54],["-webkit-mask-repeat",63],["-webkit-mask-size",79],["-webkit-padding-after",15],["-webkit-padding-before",28],["-webkit-padding-end",48],["-webkit-padding-start",73],["-webkit-print-color-adjust",83],["-webkit-rtl-ordering",7],["-webkit-tap-highlight-color",169],["-webkit-text-emphasis-color",11],["-webkit-text-fill-color",71],["-webkit-text-security",17],["-webkit-text-stroke",56],["-webkit-text-stroke-color",37],["-webkit-text-stroke-width",53],["-webkit-user-drag",95],["-webkit-user-modify",62],["-webkit-user-select",194],["-webkit-writing-mode",4],["white-space",228],["widows",115],["width",268],["will-change",74],["word-break",166],["word-spacing",157],["word-wrap",197],["writing-mode",41],["z-index",239],["zoom",200]]),L=["auto","none"];var E=Object.freeze({__proto__:null,CSSMetadata:m,VariableRegex:f,CustomVariableRegex:/(var\(*--[\w\d]+-([\w]+-[\w]+)\))/g,URLRegex:/url\(\s*('.+?'|".+?"|[^)]+)\s*\)/g,GridAreaRowRegex:b,cssMetadata:v});class A{callFrame;callUID;self;total;id;parent;children;functionName;depth;deoptReason;#h;constructor(e,t){this.callFrame=e,this.callUID=`${e.functionName}@${e.scriptId}:${e.lineNumber}:${e.columnNumber}`,this.self=0,this.total=0,this.id=0,this.functionName=e.functionName,this.parent=null,this.children=[],this.#h=t}get scriptId(){return String(this.callFrame.scriptId)}get url(){return this.callFrame.url}get lineNumber(){return this.callFrame.lineNumber}get columnNumber(){return this.callFrame.columnNumber}setFunctionName(e){null!==e&&(this.functionName=e)}target(){return this.#h}}class O{#e;root;total;maxDepth;constructor(e){this.#e=e||null}initialize(e){this.root=e,this.assignDepthsAndParents(),this.total=this.calculateTotals(this.root)}assignDepthsAndParents(){const e=this.root;e.depth=-1,e.parent=null,this.maxDepth=0;const t=[e];for(;t.length;){const e=t.pop(),n=e.depth+1;n>this.maxDepth&&(this.maxDepth=n);const r=e.children;for(const s of r)s.depth=n,s.parent=e,s.children.length&&t.push(s)}}calculateTotals(e){const t=[e],n=[];for(;t.length;){const e=t.pop();e.total=e.self,n.push(e),t.push(...e.children)}for(;n.length>1;){const e=n.pop();e.parent&&(e.parent.total+=e.total)}return e.total}target(){return this.#e}}var N=Object.freeze({__proto__:null,ProfileNode:A,ProfileTreeModel:O});class F{#u;#g;#p;#m;#f;#b;#y;constructor(e,t,n,r){this.#u=e,this.#g=t,this.#p=n,this.#m={},this.#f=0,this.#b=r||"Medium",this.#y=null}static fromProtocolCookie(e){const t=new F(e.name,e.value,null,e.priority);return t.addAttribute("domain",e.domain),t.addAttribute("path",e.path),e.expires&&t.addAttribute("expires",1e3*e.expires),e.httpOnly&&t.addAttribute("httpOnly"),e.secure&&t.addAttribute("secure"),e.sameSite&&t.addAttribute("sameSite",e.sameSite),"sourcePort"in e&&t.addAttribute("sourcePort",e.sourcePort),"sourceScheme"in e&&t.addAttribute("sourceScheme",e.sourceScheme),"partitionKey"in e&&t.addAttribute("partitionKey",e.partitionKey),"partitionKeyOpaque"in e&&t.addAttribute("partitionKey",""),t.setSize(e.size),t}key(){return(this.domain()||"-")+" "+this.name()+" "+(this.path()||"-")}name(){return this.#u}value(){return this.#g}type(){return this.#p}httpOnly(){return"httponly"in this.#m}secure(){return"secure"in this.#m}sameSite(){return this.#m.samesite}partitionKey(){return this.#m.partitionkey}setPartitionKey(e){this.addAttribute("partitionKey",e)}partitionKeyOpaque(){return""===this.#m.partitionkey}setPartitionKeyOpaque(){this.addAttribute("partitionKey","")}priority(){return this.#b}session(){return!("expires"in this.#m||"max-age"in this.#m)}path(){return this.#m.path}domain(){return this.#m.domain}expires(){return this.#m.expires}maxAge(){return this.#m["max-age"]}sourcePort(){return this.#m.sourceport}sourceScheme(){return this.#m.sourcescheme}size(){return this.#f}url(){if(!this.domain()||!this.path())return null;let e="";const t=this.sourcePort();return t&&80!==t&&443!==t&&(e=`:${this.sourcePort()}`),(this.secure()?"https://":"http://")+this.domain()+e+this.path()}setSize(e){this.#f=e}expiresDate(e){return this.maxAge()?new Date(e.getTime()+1e3*this.maxAge()):this.expires()?new Date(this.expires()):null}addAttribute(e,t){const n=e.toLowerCase();if("priority"===n)this.#b=t;else this.#m[n]=t}setCookieLine(e){this.#y=e}getCookieLine(){return this.#y}matchesSecurityOrigin(e){const t=new URL(e).hostname;return F.isDomainMatch(this.domain(),t)}static isDomainMatch(e,t){return t===e||!(!e||"."!==e[0])&&(e.substr(1)===t||t.length>e.length&&t.endsWith(e))}}var B,D;!function(e){e[e.Request=0]="Request",e[e.Response=1]="Response"}(B||(B={})),function(e){e.Name="name",e.Value="value",e.Size="size",e.Domain="domain",e.Path="path",e.Expires="expires",e.HttpOnly="httpOnly",e.Secure="secure",e.SameSite="sameSite",e.SourceScheme="sourceScheme",e.SourcePort="sourcePort",e.Priority="priority",e.PartitionKey="partitionKey"}(D||(D={}));var U=Object.freeze({__proto__:null,Cookie:F,get Type(){return B},get Attributes(){return D}});class H{#v;#I;#k;#S;#w;#C;#T;constructor(e){e&&(this.#v=e.toLowerCase().replace(/^\./,"")),this.#I=[],this.#S=0}static parseSetCookie(e,t){return new H(t).parseSetCookie(e)}cookies(){return this.#I}parseSetCookie(e){if(!this.initialize(e))return null;for(let e=this.extractKeyValue();e;e=this.extractKeyValue())this.#w?this.#w.addAttribute(e.key,e.value):this.addCookie(e,B.Response),this.advanceAndCheckCookieDelimiter()&&this.flushCookie();return this.flushCookie(),this.#I}initialize(e){return this.#k=e,"string"==typeof e&&(this.#I=[],this.#w=null,this.#C="",this.#S=this.#k.length,!0)}flushCookie(){this.#w&&(this.#w.setSize(this.#S-this.#k.length-this.#T),this.#w.setCookieLine(this.#C.replace("\n",""))),this.#w=null,this.#C=""}extractKeyValue(){if(!this.#k||!this.#k.length)return null;const e=/^[ \t]*([^=;]+)[ \t]*(?:=[ \t]*([^;\n]*))?/.exec(this.#k);if(!e)return console.error("Failed parsing cookie header before: "+this.#k),null;const t=new q(e[1]&&e[1].trim(),e[2]&&e[2].trim(),this.#S-this.#k.length);return this.#C+=e[0],this.#k=this.#k.slice(e[0].length),t}advanceAndCheckCookieDelimiter(){if(!this.#k)return!1;const e=/^\s*[\n;]\s*/.exec(this.#k);return!!e&&(this.#C+=e[0],this.#k=this.#k.slice(e[0].length),null!==e[0].match("\n"))}addCookie(e,t){this.#w&&this.#w.setSize(e.position-this.#T),this.#w="string"==typeof e.value?new F(e.key,e.value,t):new F("",e.key,t),this.#v&&this.#w.addAttribute("domain",this.#v),this.#T=e.position,this.#I.push(this.#w)}}class q{key;value;position;constructor(e,t,n){this.key=e,this.value=t,this.position=n}}var _,z,j=Object.freeze({__proto__:null,CookieParser:H});class W extends a.InspectorBackend.TargetBase{#R;#u;#x;#M;#P;#p;#L;#E;#A;#O;#N;#F;constructor(e,n,r,s,i,a,o,l,d){switch(super(s===_.Node,i,a,l),this.#R=e,this.#u=r,this.#x=t.DevToolsPath.EmptyUrlString,this.#M="",this.#P=0,s){case _.Frame:this.#P=z.Browser|z.Storage|z.DOM|z.JS|z.Log|z.Network|z.Target|z.Tracing|z.Emulation|z.Input|z.Inspector|z.Audits|z.WebAuthn|z.IO|z.Media,i?.type()!==_.Frame&&(this.#P|=z.DeviceEmulation|z.ScreenCapture|z.Security|z.ServiceWorker,d?.url.startsWith("chrome-extension://")&&(this.#P&=~z.Security));break;case _.ServiceWorker:this.#P=z.JS|z.Log|z.Network|z.Target|z.Inspector|z.IO,i?.type()!==_.Frame&&(this.#P|=z.Browser);break;case _.SharedWorker:this.#P=z.JS|z.Log|z.Network|z.Target|z.IO|z.Media|z.Inspector;break;case _.Worker:this.#P=z.JS|z.Log|z.Network|z.Target|z.IO|z.Media|z.Emulation;break;case _.Node:this.#P=z.JS;break;case _.AuctionWorklet:this.#P=z.JS|z.EventBreakpoints;break;case _.Browser:this.#P=z.Target|z.IO;break;case _.Tab:this.#P=z.Target}this.#p=s,this.#L=i,this.#E=n,this.#A=new Map,this.#O=o,this.#N=d}createModels(e){this.#F=!0;const t=Array.from(c.registeredModels.entries());for(const[e,n]of t)n.early&&this.model(e);for(const[n,r]of t)(r.autostart||e.has(n))&&this.model(n);this.#F=!1}id(){return this.#E}name(){return this.#u||this.#M}setName(e){this.#u!==e&&(this.#u=e,this.#R.onNameChange(this))}type(){return this.#p}markAsNodeJSForTest(){super.markAsNodeJSForTest(),this.#p=_.Node}targetManager(){return this.#R}hasAllCapabilities(e){return(this.#P&e)===e}decorateLabel(e){return this.#p===_.Worker||this.#p===_.ServiceWorker?"⚙ "+e:e}parentTarget(){return this.#L}outermostTarget(){let e=null,t=this;do{t.type()!==_.Tab&&t.type()!==_.Browser&&(e=t),t=t.parentTarget()}while(t);return e}dispose(e){super.dispose(e),this.#R.removeTarget(this);for(const e of this.#A.values())e.dispose()}model(e){if(!this.#A.get(e)){const t=c.registeredModels.get(e);if(void 0===t)throw"Model class is not registered @"+(new Error).stack;if((this.#P&t.capabilities)===t.capabilities){const t=new e(this);this.#A.set(e,t),this.#F||this.#R.modelAdded(this,e,t,this.#R.isInScope(this))}}return this.#A.get(e)||null}models(){return this.#A}inspectedURL(){return this.#x}setInspectedURL(n){this.#x=n;const r=e.ParsedURL.ParsedURL.fromString(n);this.#M=r?r.lastPathComponentWithFragment():"#"+this.#E,this.parentTarget()?.type()!==_.Frame&&i.InspectorFrontendHost.InspectorFrontendHostInstance.inspectedURLChanged(n||t.DevToolsPath.EmptyUrlString),this.#R.onInspectedURLChange(this),this.#u||this.#R.onNameChange(this)}async suspend(e){this.#O||(this.#O=!0,await Promise.all(Array.from(this.models().values(),(t=>t.preSuspendModel(e)))),await Promise.all(Array.from(this.models().values(),(t=>t.suspendModel(e)))))}async resume(){this.#O&&(this.#O=!1,await Promise.all(Array.from(this.models().values(),(e=>e.resumeModel()))),await Promise.all(Array.from(this.models().values(),(e=>e.postResumeModel()))))}suspended(){return this.#O}updateTargetInfo(e){this.#N=e}targetInfo(){return this.#N}}!function(e){e.Frame="frame",e.ServiceWorker="service-worker",e.Worker="worker",e.SharedWorker="shared-worker",e.Node="node",e.Browser="browser",e.AuctionWorklet="auction-worklet",e.Tab="tab"}(_||(_={})),function(e){e[e.Browser=1]="Browser",e[e.DOM=2]="DOM",e[e.JS=4]="JS",e[e.Log=8]="Log",e[e.Network=16]="Network",e[e.Target=32]="Target",e[e.ScreenCapture=64]="ScreenCapture",e[e.Tracing=128]="Tracing",e[e.Emulation=256]="Emulation",e[e.Security=512]="Security",e[e.Input=1024]="Input",e[e.Inspector=2048]="Inspector",e[e.DeviceEmulation=4096]="DeviceEmulation",e[e.Storage=8192]="Storage",e[e.ServiceWorker=16384]="ServiceWorker",e[e.Audits=32768]="Audits",e[e.WebAuthn=65536]="WebAuthn",e[e.IO=131072]="IO",e[e.Media=262144]="Media",e[e.EventBreakpoints=524288]="EventBreakpoints",e[e.None=0]="None"}(z||(z={}));var V=Object.freeze({__proto__:null,Target:W,get Type(){return _},get Capability(){return z}});let G;class K extends e.ObjectWrapper.ObjectWrapper{#B;#D;#U;#H;#q;#O;#_;#z;#j;#W;constructor(){super(),this.#B=new Set,this.#D=new Set,this.#U=new t.MapUtilities.Multimap,this.#H=new t.MapUtilities.Multimap,this.#O=!1,this.#_=null,this.#z=null,this.#q=new WeakSet,this.#j=!1,this.#W=new Set}static instance({forceNew:e}={forceNew:!1}){return G&&!e||(G=new K),G}static removeInstance(){G=void 0}onInspectedURLChange(e){this.dispatchEventToListeners($.InspectedURLChanged,e)}onNameChange(e){this.dispatchEventToListeners($.NameChanged,e)}async suspendAllTargets(e){if(this.#O)return;this.#O=!0,this.dispatchEventToListeners($.SuspendStateChanged);const t=Array.from(this.#B.values(),(t=>t.suspend(e)));await Promise.all(t)}async resumeAllTargets(){if(!this.#O)return;this.#O=!1,this.dispatchEventToListeners($.SuspendStateChanged);const e=Array.from(this.#B.values(),(e=>e.resume()));await Promise.all(e)}allTargetsSuspended(){return this.#O}models(e,t){const n=[];for(const r of this.#B){if(t?.scoped&&!this.isInScope(r))continue;const s=r.model(e);s&&n.push(s)}return n}inspectedURL(){const e=this.primaryPageTarget();return e?e.inspectedURL():""}observeModels(e,t,n){const r=this.models(e,n);this.#H.set(e,t),n?.scoped&&this.#q.add(t);for(const e of r)t.modelAdded(e)}unobserveModels(e,t){this.#H.delete(e,t),this.#q.delete(t)}modelAdded(e,t,n,r){for(const e of this.#H.get(t).values())this.#q.has(e)&&!r||e.modelAdded(n)}modelRemoved(e,t,n,r){for(const e of this.#H.get(t).values())this.#q.has(e)&&!r||e.modelRemoved(n)}addModelListener(e,t,n,r,s){const i=e=>{s?.scoped&&!this.isInScope(e)||n.call(r,e)};for(const n of this.models(e))n.addEventListener(t,i);this.#U.set(t,{modelClass:e,thisObject:r,listener:n,wrappedListener:i})}removeModelListener(e,t,n,r){if(!this.#U.has(t))return;let s=null;for(const i of this.#U.get(t))i.modelClass===e&&i.listener===n&&i.thisObject===r&&(s=i.wrappedListener,this.#U.delete(t,i));if(s)for(const n of this.models(e))n.removeEventListener(t,s)}observeTargets(e,t){if(this.#D.has(e))throw new Error("Observer can only be registered once");t?.scoped&&this.#q.add(e);for(const n of this.#B)t?.scoped&&!this.isInScope(n)||e.targetAdded(n);this.#D.add(e)}unobserveTargets(e){this.#D.delete(e),this.#q.delete(e)}createTarget(e,t,n,r,s,i,a,o){const l=new W(this,e,t,n,r,s||"",this.#O,a||null,o);i&&l.pageAgent().invoke_waitForDebugger(),l.createModels(new Set(this.#H.keysArray())),this.#B.add(l);const d=this.isInScope(l);for(const e of[...this.#D])this.#q.has(e)&&!d||e.targetAdded(l);for(const[e,t]of l.models().entries())this.modelAdded(l,e,t,d);for(const e of this.#U.keysArray())for(const t of this.#U.get(e)){const n=l.model(t.modelClass);n&&n.addEventListener(e,t.wrappedListener)}return l!==l.outermostTarget()||l.type()===_.Frame&&l!==this.primaryPageTarget()||this.#j||this.setScopeTarget(l),l}removeTarget(e){if(!this.#B.has(e))return;const t=this.isInScope(e);this.#B.delete(e);for(const r of e.models().keys()){const s=e.models().get(r);n(s),this.modelRemoved(e,r,s,t)}for(const n of[...this.#D])this.#q.has(n)&&!t||n.targetRemoved(e);for(const t of this.#U.keysArray())for(const n of this.#U.get(t)){const r=e.model(n.modelClass);r&&r.removeEventListener(t,n.wrappedListener)}}targets(){return[...this.#B]}targetById(e){return this.targets().find((t=>t.id()===e))||null}rootTarget(){return this.#B.size?this.#B.values().next().value:null}primaryPageTarget(){let e=this.rootTarget();return e?.type()===_.Tab&&(e=this.targets().find((t=>t.parentTarget()===e&&t.type()===_.Frame&&!t.targetInfo()?.subtype?.length))||null),e}browserTarget(){return this.#_}async maybeAttachInitialTarget(){if(!Boolean(o.Runtime.Runtime.queryParam("browserConnection")))return!1;this.#_||(this.#_=new W(this,"main","browser",_.Browser,null,"",!1,null,void 0),this.#_.createModels(new Set(this.#H.keysArray())));const e=await i.InspectorFrontendHost.InspectorFrontendHostInstance.initialTargetId();return this.#_.targetAgent().invoke_autoAttachRelated({targetId:e,waitForDebuggerOnStart:!0}),!0}clearAllTargetsForTest(){this.#B.clear()}isInScope(e){if(!e)return!1;for(function(e){return"source"in e&&e.source instanceof c}(e)&&(e=e.source),e instanceof c&&(e=e.target());e&&e!==this.#z;)e=e.parentTarget();return Boolean(e)&&e===this.#z}setScopeTarget(e){if(e!==this.#z){for(const e of this.targets())if(this.isInScope(e)){for(const t of this.#H.keysArray()){const n=e.models().get(t);if(n)for(const e of[...this.#H.get(t)].filter((e=>this.#q.has(e))))e.modelRemoved(n)}for(const t of[...this.#D].filter((e=>this.#q.has(e))))t.targetRemoved(e)}this.#z=e;for(const e of this.targets())if(this.isInScope(e)){for(const t of[...this.#D].filter((e=>this.#q.has(e))))t.targetAdded(e);for(const[t,n]of e.models().entries())for(const e of[...this.#H.get(t)].filter((e=>this.#q.has(e))))e.modelAdded(n)}for(const e of this.#W)e()}}addScopeChangeListener(e){this.#W.add(e)}removeScopeChangeListener(e){this.#W.delete(e)}scopeTarget(){return this.#z}}var $;!function(e){e.AvailableTargetsChanged="AvailableTargetsChanged",e.InspectedURLChanged="InspectedURLChanged",e.NameChanged="NameChanged",e.SuspendStateChanged="SuspendStateChanged"}($||($={}));var Q=Object.freeze({__proto__:null,TargetManager:K,get Events(){return $},Observer:class{targetAdded(e){}targetRemoved(e){}},SDKModelObserver:class{modelAdded(e){}modelRemoved(e){}}});const X={noContentForWebSocket:"Content for WebSockets is currently not supported",noContentForRedirect:"No content available because this request was redirected",noContentForPreflight:"No content available for preflight request",noThrottling:"No throttling",offline:"Offline",slowG:"Slow 3G",fastG:"Fast 3G",requestWasBlockedByDevtoolsS:'Request was blocked by DevTools: "{PH1}"',crossoriginReadBlockingCorb:"Cross-Origin Read Blocking (CORB) blocked cross-origin response {PH1} with MIME type {PH2}. See https://www.chromestatus.com/feature/5629709824032768 for more details.",sFailedLoadingSS:'{PH1} failed loading: {PH2} "{PH3}".',sFinishedLoadingSS:'{PH1} finished loading: {PH2} "{PH3}".'},J=s.i18n.registerUIStrings("core/sdk/NetworkManager.ts",X),Y=s.i18n.getLocalizedString.bind(void 0,J),Z=s.i18n.getLazilyComputedLocalizedString.bind(void 0,J),ee=new WeakMap,te=new Map([["2g","cellular2g"],["3g","cellular3g"],["4g","cellular4g"],["bluetooth","bluetooth"],["wifi","wifi"],["wimax","wimax"]]);class ne extends c{dispatcher;fetchDispatcher;#V;#G;constructor(t){super(t),this.dispatcher=new ce(this),this.fetchDispatcher=new de(t.fetchAgent(),this),this.#V=t.networkAgent(),t.registerNetworkDispatcher(this.dispatcher),t.registerFetchDispatcher(this.fetchDispatcher),e.Settings.Settings.instance().moduleSetting("cacheDisabled").get()&&this.#V.invoke_setCacheDisabled({cacheDisabled:!0}),this.#V.invoke_enable({maxPostDataSize:le}),this.#V.invoke_setAttachDebugStack({enabled:!0}),this.#G=e.Settings.Settings.instance().createSetting("bypassServiceWorker",!1),this.#G.get()&&this.bypassServiceWorkerChanged(),this.#G.addChangeListener(this.bypassServiceWorkerChanged,this),e.Settings.Settings.instance().moduleSetting("cacheDisabled").addChangeListener(this.cacheDisabledSettingChanged,this)}static forRequest(e){return ee.get(e)||null}static canReplayRequest(t){return Boolean(ee.get(t))&&Boolean(t.backendRequestId())&&!t.isRedirect()&&t.resourceType()===e.ResourceType.resourceTypes.XHR}static replayRequest(e){const t=ee.get(e),n=e.backendRequestId();t&&n&&!e.isRedirect()&&t.#V.invoke_replayXHR({requestId:n})}static async searchInRequest(e,t,n,r){const s=ne.forRequest(e),i=e.backendRequestId();if(!s||!i||e.isRedirect())return[];return(await s.#V.invoke_searchInResponseBody({requestId:i,query:t,caseSensitive:n,isRegex:r})).result||[]}static async requestContentData(t){if(t.resourceType()===e.ResourceType.resourceTypes.WebSocket)return{error:Y(X.noContentForWebSocket),content:null,encoded:!1};if(t.finished||await t.once(Te.FinishedLoading),t.isRedirect())return{error:Y(X.noContentForRedirect),content:null,encoded:!1};if(t.isPreflightRequest())return{error:Y(X.noContentForPreflight),content:null,encoded:!1};const n=ne.forRequest(t);if(!n)return{error:"No network manager for request",content:null,encoded:!1};const r=t.backendRequestId();if(!r)return{error:"No backend request id for request",content:null,encoded:!1};const s=await n.#V.invoke_getResponseBody({requestId:r}),i=s.getError()||null;return{error:i,content:i?null:s.body,encoded:s.base64Encoded}}static async requestPostData(e){const t=ne.forRequest(e);if(!t)return console.error("No network manager for request"),null;const n=e.backendRequestId();if(!n)return console.error("No backend request id for request"),null;try{const{postData:e}=await t.#V.invoke_getRequestPostData({requestId:n});return e}catch(e){return e.message}}static connectionType(e){if(!e.download&&!e.upload)return"none";const t="function"==typeof e.title?e.title().toLowerCase():e.title.toLowerCase();for(const[e,n]of te)if(t.includes(e))return n;return"other"}static lowercaseHeaders(e){const t={};for(const n in e)t[n.toLowerCase()]=e[n];return t}requestForURL(e){return this.dispatcher.requestForURL(e)}requestForId(e){return this.dispatcher.requestForId(e)}requestForLoaderId(e){return this.dispatcher.requestForLoaderId(e)}cacheDisabledSettingChanged({data:e}){this.#V.invoke_setCacheDisabled({cacheDisabled:e})}dispose(){e.Settings.Settings.instance().moduleSetting("cacheDisabled").removeChangeListener(this.cacheDisabledSettingChanged,this)}bypassServiceWorkerChanged(){this.#V.invoke_setBypassServiceWorker({bypass:this.#G.get()})}async getSecurityIsolationStatus(e){const t=await this.#V.invoke_getSecurityIsolationStatus({frameId:e??void 0});return t.getError()?null:t.status}async enableReportingApi(e=!0){return this.#V.invoke_enableReportingApi({enable:e})}async loadNetworkResource(e,t,n){const r=await this.#V.invoke_loadNetworkResource({frameId:e??void 0,url:t,options:n});if(r.getError())throw new Error(r.getError());return r.resource}clearRequests(){this.dispatcher.clearRequests()}}var re;!function(e){e.RequestStarted="RequestStarted",e.RequestUpdated="RequestUpdated",e.RequestFinished="RequestFinished",e.RequestUpdateDropped="RequestUpdateDropped",e.ResponseReceived="ResponseReceived",e.MessageGenerated="MessageGenerated",e.RequestRedirected="RequestRedirected",e.LoadingFinished="LoadingFinished",e.ReportingApiReportAdded="ReportingApiReportAdded",e.ReportingApiReportUpdated="ReportingApiReportUpdated",e.ReportingApiEndpointsChangedForOrigin="ReportingApiEndpointsChangedForOrigin"}(re||(re={}));const se={title:Z(X.noThrottling),i18nTitleKey:X.noThrottling,download:-1,upload:-1,latency:0},ie={title:Z(X.offline),i18nTitleKey:X.offline,download:0,upload:0,latency:0},ae={title:Z(X.slowG),i18nTitleKey:X.slowG,download:5e4,upload:5e4,latency:2e3},oe={title:Z(X.fastG),i18nTitleKey:X.fastG,download:18e4,upload:84375,latency:562.5},le=65536;class de{#K;#$;constructor(e,t){this.#K=e,this.#$=t}requestPaused({requestId:e,request:t,resourceType:n,responseStatusCode:r,responseHeaders:s,networkId:i}){const a=i?this.#$.requestForId(i):null;0===a?.originalResponseHeaders.length&&s&&(a.originalResponseHeaders=s),ue.instance().requestIntercepted(new ge(this.#K,t,n,e,a,r,s))}authRequired({}){}}class ce{#$;#Q;#X;#J;#Y;#Z;constructor(e){this.#$=e,this.#Q=new Map,this.#X=new Map,this.#J=new Map,this.#Y=new Map,this.#Z=new Map,ue.instance().addEventListener(ue.Events.RequestIntercepted,this.#ee.bind(this))}#ee(e){const t=this.requestForId(e.data);t&&t.setWasIntercepted(!0)}headersMapToHeadersArray(e){const t=[];for(const n in e){const r=e[n].split("\n");for(let e=0;e=0&&t.setTransferSize(n.encodedDataLength),n.requestHeaders&&!t.hasExtraRequestInfo()&&(t.setRequestHeaders(this.headersMapToHeadersArray(n.requestHeaders)),t.setRequestHeadersText(n.requestHeadersText||"")),t.connectionReused=n.connectionReused,t.connectionId=String(n.connectionId),n.remoteIPAddress&&t.setRemoteAddress(n.remoteIPAddress,n.remotePort||-1),n.fromServiceWorker&&(t.fetchedViaServiceWorker=!0),n.fromDiskCache&&t.setFromDiskCache(),n.fromPrefetchCache&&t.setFromPrefetchCache(),n.cacheStorageCacheName&&t.setResponseCacheStorageCacheName(n.cacheStorageCacheName),n.responseTime&&t.setResponseRetrievalTime(new Date(n.responseTime)),t.timing=n.timing,t.protocol=n.protocol||"",t.alternateProtocolUsage=n.alternateProtocolUsage,n.serviceWorkerResponseSource&&t.setServiceWorkerResponseSource(n.serviceWorkerResponseSource),t.setSecurityState(n.securityState),n.securityDetails&&t.setSecurityDetails(n.securityDetails);const r=e.ResourceType.ResourceType.fromMimeTypeOverride(t.mimeType);r&&t.setResourceType(r)}requestForId(e){return this.#Q.get(e)||null}requestForURL(e){return this.#X.get(e)||null}requestForLoaderId(e){return this.#J.get(e)||null}resourceChangedPriority({requestId:e,newPriority:t}){const n=this.#Q.get(e);n&&n.setPriority(t)}signedExchangeReceived({requestId:t,info:n}){let r=this.#Q.get(t);(r||(r=this.#X.get(n.outerResponse.url),r))&&(r.setSignedExchangeInfo(n),r.setResourceType(e.ResourceType.resourceTypes.SignedExchange),this.updateNetworkRequestWithResponse(r,n.outerResponse),this.updateNetworkRequest(r),this.#$.dispatchEventToListeners(re.ResponseReceived,{request:r,response:n.outerResponse}))}requestWillBeSent({requestId:t,loaderId:n,documentURL:r,request:s,timestamp:i,wallTime:a,initiator:o,redirectResponse:l,type:d,frameId:c,hasUserGesture:h}){let u=this.#Q.get(t);if(u){if(!l)return;u.signedExchangeInfo()||this.responseReceived({requestId:t,loaderId:n,timestamp:i,type:d||"Other",response:l,hasExtraInfo:!1,frameId:c}),u=this.appendRedirect(t,i,s.url),this.#$.dispatchEventToListeners(re.RequestRedirected,u)}else u=Me.create(t,s.url,r,c??null,n,o,h),ee.set(u,this.#$);u.hasNetworkData=!0,this.updateNetworkRequestWithRequest(u,s),u.setIssueTime(i,a),u.setResourceType(d?e.ResourceType.resourceTypes[d]:e.ResourceType.resourceTypes.Other),s.trustTokenParams&&u.setTrustTokenParams(s.trustTokenParams);const g=this.#Z.get(t);g&&(u.setTrustTokenOperationDoneEvent(g),this.#Z.delete(t)),this.getExtraInfoBuilder(t).addRequest(u),this.startNetworkRequest(u,s)}requestServedFromCache({requestId:e}){const t=this.#Q.get(e);t&&t.setFromMemoryCache()}responseReceived({requestId:t,loaderId:n,timestamp:r,type:s,response:i,frameId:a}){const o=this.#Q.get(t),l=ne.lowercaseHeaders(i.headers);if(o)o.responseReceivedTime=r,o.setResourceType(e.ResourceType.resourceTypes[s]),this.updateNetworkRequestWithResponse(o,i),this.updateNetworkRequest(o),this.#$.dispatchEventToListeners(re.ResponseReceived,{request:o,response:i});else{const e=l["last-modified"],t={url:i.url,frameId:a??null,loaderId:n,resourceType:s,mimeType:i.mimeType,lastModified:e?new Date(e):null};this.#$.dispatchEventToListeners(re.RequestUpdateDropped,t)}}dataReceived({requestId:e,timestamp:t,dataLength:n,encodedDataLength:r}){let s=this.#Q.get(e);s||(s=this.maybeAdoptMainResourceRequest(e)),s&&(s.resourceSize+=n,-1!==r&&s.increaseTransferSize(r),s.endTime=t,this.updateNetworkRequest(s))}loadingFinished({requestId:e,timestamp:t,encodedDataLength:n,shouldReportCorbBlocking:r}){let s=this.#Q.get(e);s||(s=this.maybeAdoptMainResourceRequest(e)),s&&(this.getExtraInfoBuilder(e).finished(),this.finishNetworkRequest(s,t,n,r),this.#$.dispatchEventToListeners(re.LoadingFinished,s))}loadingFailed({requestId:t,timestamp:n,type:r,errorText:s,canceled:i,blockedReason:a,corsErrorStatus:o}){const l=this.#Q.get(t);if(l){if(l.failed=!0,l.setResourceType(e.ResourceType.resourceTypes[r]),l.canceled=Boolean(i),a&&(l.setBlockedReason(a),"inspector"===a)){const e=Y(X.requestWasBlockedByDevtoolsS,{PH1:l.url()});this.#$.dispatchEventToListeners(re.MessageGenerated,{message:e,requestId:t,warning:!0})}o&&l.setCorsErrorStatus(o),l.localizedFailDescription=s,this.getExtraInfoBuilder(t).finished(),this.finishNetworkRequest(l,n,-1)}}webSocketCreated({requestId:t,url:n,initiator:r}){const s=Me.createForWebSocket(t,n,r);ee.set(s,this.#$),s.setResourceType(e.ResourceType.resourceTypes.WebSocket),this.startNetworkRequest(s,null)}webSocketWillSendHandshakeRequest({requestId:e,timestamp:t,wallTime:n,request:r}){const s=this.#Q.get(e);s&&(s.requestMethod="GET",s.setRequestHeaders(this.headersMapToHeadersArray(r.headers)),s.setIssueTime(t,n),this.updateNetworkRequest(s))}webSocketHandshakeResponseReceived({requestId:e,timestamp:t,response:n}){const r=this.#Q.get(e);r&&(r.statusCode=n.status,r.statusText=n.statusText,r.responseHeaders=this.headersMapToHeadersArray(n.headers),r.responseHeadersText=n.headersText||"",n.requestHeaders&&r.setRequestHeaders(this.headersMapToHeadersArray(n.requestHeaders)),n.requestHeadersText&&r.setRequestHeadersText(n.requestHeadersText),r.responseReceivedTime=t,r.protocol="websocket",this.updateNetworkRequest(r))}webSocketFrameReceived({requestId:e,timestamp:t,response:n}){const r=this.#Q.get(e);r&&(r.addProtocolFrame(n,t,!1),r.responseReceivedTime=t,this.updateNetworkRequest(r))}webSocketFrameSent({requestId:e,timestamp:t,response:n}){const r=this.#Q.get(e);r&&(r.addProtocolFrame(n,t,!0),r.responseReceivedTime=t,this.updateNetworkRequest(r))}webSocketFrameError({requestId:e,timestamp:t,errorMessage:n}){const r=this.#Q.get(e);r&&(r.addProtocolFrameError(n,t),r.responseReceivedTime=t,this.updateNetworkRequest(r))}webSocketClosed({requestId:e,timestamp:t}){const n=this.#Q.get(e);n&&this.finishNetworkRequest(n,t,-1)}eventSourceMessageReceived({requestId:e,timestamp:t,eventName:n,eventId:r,data:s}){const i=this.#Q.get(e);i&&i.addEventSourceMessage(t,n,r,s)}requestIntercepted({}){}requestWillBeSentExtraInfo({requestId:e,associatedCookies:t,headers:n,clientSecurityState:r,connectTiming:s,siteHasCookieInOtherPartition:i}){const a=[],o=[];for(const{blockedReasons:e,cookie:n}of t)0===e.length?o.push(F.fromProtocolCookie(n)):a.push({blockedReasons:e,cookie:F.fromProtocolCookie(n)});const l={blockedRequestCookies:a,includedRequestCookies:o,requestHeaders:this.headersMapToHeadersArray(n),clientSecurityState:r,connectTiming:s,siteHasCookieInOtherPartition:i};this.getExtraInfoBuilder(e).addRequestExtraInfo(l)}responseReceivedExtraInfo({requestId:e,blockedCookies:t,headers:n,headersText:r,resourceIPAddressSpace:s,statusCode:i,cookiePartitionKey:a,cookiePartitionKeyOpaque:o}){const l={blockedResponseCookies:t.map((e=>({blockedReasons:e.blockedReasons,cookieLine:e.cookieLine,cookie:e.cookie?F.fromProtocolCookie(e.cookie):null}))),responseHeaders:this.headersMapToHeadersArray(n),responseHeadersText:r,resourceIPAddressSpace:s,statusCode:i,cookiePartitionKey:a,cookiePartitionKeyOpaque:o};this.getExtraInfoBuilder(e).addResponseExtraInfo(l)}getExtraInfoBuilder(e){let t;return this.#Y.has(e)?t=this.#Y.get(e):(t=new pe,this.#Y.set(e,t)),t}appendRedirect(e,t,n){const r=this.#Q.get(e);if(!r)throw new Error(`Could not find original network request for ${e}`);let s=0;for(let e=r.redirectSource();e;e=e.redirectSource())s++;r.markAsRedirect(s),this.finishNetworkRequest(r,t,-1);const i=Me.create(e,n,r.documentURL,r.frameId,r.loaderId,r.initiator(),r.hasUserGesture()??void 0);return ee.set(i,this.#$),i.setRedirectSource(r),r.setRedirectDestination(i),i}maybeAdoptMainResourceRequest(e){const t=ue.instance().inflightMainResourceRequests.get(e);if(!t)return null;const n=ne.forRequest(t).dispatcher;n.#Q.delete(e),n.#X.delete(t.url());const r=t.loaderId;r&&n.#J.delete(r);const s=n.#Y.get(e);return n.#Y.delete(e),this.#Q.set(e,t),this.#X.set(t.url(),t),r&&this.#J.set(r,t),s&&this.#Y.set(e,s),ee.set(t,this.#$),t}startNetworkRequest(e,t){this.#Q.set(e.requestId(),e),this.#X.set(e.url(),e);const n=e.loaderId;n&&this.#J.set(n,e),e.loaderId===e.requestId()&&ue.instance().inflightMainResourceRequests.set(e.requestId(),e),this.#$.dispatchEventToListeners(re.RequestStarted,{request:e,originalRequest:t})}updateNetworkRequest(e){this.#$.dispatchEventToListeners(re.RequestUpdated,e)}finishNetworkRequest(t,n,r,s){if(t.endTime=n,t.finished=!0,r>=0){const e=t.redirectSource();e&&e.signedExchangeInfo()?(t.setTransferSize(0),e.setTransferSize(r),this.updateNetworkRequest(e)):t.setTransferSize(r)}if(this.#$.dispatchEventToListeners(re.RequestFinished,t),ue.instance().inflightMainResourceRequests.delete(t.requestId()),s){const e=Y(X.crossoriginReadBlockingCorb,{PH1:t.url(),PH2:t.mimeType});this.#$.dispatchEventToListeners(re.MessageGenerated,{message:e,requestId:t.requestId(),warning:!0})}if(e.Settings.Settings.instance().moduleSetting("monitoringXHREnabled").get()&&t.resourceType().category()===e.ResourceType.resourceCategories.XHR){let e;const n=t.failed||t.hasErrorStatusCode();e=Y(n?X.sFailedLoadingSS:X.sFinishedLoadingSS,{PH1:t.resourceType().title(),PH2:t.requestMethod,PH3:t.url()}),this.#$.dispatchEventToListeners(re.MessageGenerated,{message:e,requestId:t.requestId(),warning:!1})}}clearRequests(){for(const[e,t]of this.#Q)t.finished&&this.#Q.delete(e);for(const[e,t]of this.#X)t.finished&&this.#X.delete(e);for(const[e,t]of this.#J)t.finished&&this.#J.delete(e);for(const[e,t]of this.#Y)t.isFinished()&&this.#Y.delete(e)}webTransportCreated({transportId:t,url:n,timestamp:r,initiator:s}){const i=Me.createForWebSocket(t,n,s);i.hasNetworkData=!0,ee.set(i,this.#$),i.setResourceType(e.ResourceType.resourceTypes.WebTransport),i.setIssueTime(r,0),this.startNetworkRequest(i,null)}webTransportConnectionEstablished({transportId:e,timestamp:t}){const n=this.#Q.get(e);n&&(n.responseReceivedTime=t,n.endTime=t+.001,this.updateNetworkRequest(n))}webTransportClosed({transportId:e,timestamp:t}){const n=this.#Q.get(e);n&&(n.endTime=t,this.finishNetworkRequest(n,t,0))}trustTokenOperationDone(e){const t=this.#Q.get(e.requestId);t?t.setTrustTokenOperationDoneEvent(e):this.#Z.set(e.requestId,e)}subresourceWebBundleMetadataReceived({requestId:e,urls:t}){const n=this.getExtraInfoBuilder(e);n.setWebBundleInfo({resourceUrls:t});const r=n.finalRequest();r&&this.updateNetworkRequest(r)}subresourceWebBundleMetadataError({requestId:e,errorMessage:t}){const n=this.getExtraInfoBuilder(e);n.setWebBundleInfo({errorMessage:t});const r=n.finalRequest();r&&this.updateNetworkRequest(r)}subresourceWebBundleInnerResponseParsed({innerRequestId:e,bundleRequestId:t}){const n=this.getExtraInfoBuilder(e);n.setWebBundleInnerRequestInfo({bundleRequestId:t});const r=n.finalRequest();r&&this.updateNetworkRequest(r)}subresourceWebBundleInnerResponseError({innerRequestId:e,errorMessage:t}){const n=this.getExtraInfoBuilder(e);n.setWebBundleInnerRequestInfo({errorMessage:t});const r=n.finalRequest();r&&this.updateNetworkRequest(r)}reportingApiReportAdded(e){this.#$.dispatchEventToListeners(re.ReportingApiReportAdded,e.report)}reportingApiReportUpdated(e){this.#$.dispatchEventToListeners(re.ReportingApiReportUpdated,e.report)}reportingApiEndpointsChangedForOrigin(e){this.#$.dispatchEventToListeners(re.ReportingApiEndpointsChangedForOrigin,e)}createNetworkRequest(e,t,n,r,s,i){const a=Me.create(e,r,s,t,n,i);return ee.set(a,this.#$),a}}let he;class ue extends e.ObjectWrapper.ObjectWrapper{#te;#ne;#re;#se;#ie;inflightMainResourceRequests;#ae;#oe;#le;#de;#ce;#he;#ue;#ge;constructor(){super(),this.#te="",this.#ne=null,this.#re=null,this.#se=new Set,this.#ie=new Set,this.inflightMainResourceRequests=new Map,this.#ae=se,this.#oe=null,this.#le=e.Settings.Settings.instance().moduleSetting("requestBlockingEnabled"),this.#de=e.Settings.Settings.instance().createSetting("networkBlockedPatterns",[]),this.#ce=[],this.updateBlockedPatterns(),this.#he=new t.MapUtilities.Multimap,K.instance().observeModels(ne,this)}static instance(e={forceNew:null}){const{forceNew:t}=e;return he&&!t||(he=new ue),he}static dispose(){he=null}static getChromeVersion(){const e=navigator.userAgent.match(/(?:^|\W)(?:Chrome|HeadlessChrome)\/(\S+)/);return e&&e.length>1?e[1]:""}static patchUserAgentWithChromeVersion(e){const n=ue.getChromeVersion();if(n.length>0){const r=n.split(".",1)[0]+".0.100.0";return t.StringUtilities.sprintf(e,n,r)}return e}static patchUserAgentMetadataWithChromeVersion(e){if(!e.brands)return;const n=ue.getChromeVersion();if(0===n.length)return;const r=n.split(".",1)[0];for(const n of e.brands)n.version.includes("%s")&&(n.version=t.StringUtilities.sprintf(n.version,r));e.fullVersion&&e.fullVersion.includes("%s")&&(e.fullVersion=t.StringUtilities.sprintf(e.fullVersion,n))}modelAdded(e){const t=e.target().networkAgent(),n=e.target().fetchAgent();this.#ue&&t.invoke_setExtraHTTPHeaders({headers:this.#ue}),this.currentUserAgent()&&t.invoke_setUserAgentOverride({userAgent:this.currentUserAgent(),userAgentMetadata:this.#ne||void 0}),this.#ce.length&&t.invoke_setBlockedURLs({urls:this.#ce}),this.isIntercepting()&&n.invoke_enable({patterns:this.#he.valuesArray()}),null===this.#re?t.invoke_clearAcceptedEncodingsOverride():t.invoke_setAcceptedEncodings({encodings:this.#re}),this.#se.add(t),this.#ie.add(n),this.isThrottling()&&this.updateNetworkConditions(t)}modelRemoved(e){for(const t of this.inflightMainResourceRequests){ne.forRequest(t[1])===e&&this.inflightMainResourceRequests.delete(t[0])}this.#se.delete(e.target().networkAgent()),this.#ie.delete(e.target().fetchAgent())}isThrottling(){return this.#ae.download>=0||this.#ae.upload>=0||this.#ae.latency>0}isOffline(){return!this.#ae.download&&!this.#ae.upload}setNetworkConditions(e){this.#ae=e;for(const e of this.#se)this.updateNetworkConditions(e);this.dispatchEventToListeners(ue.Events.ConditionsChanged)}networkConditions(){return this.#ae}updateNetworkConditions(e){const t=this.#ae;this.isThrottling()?e.invoke_emulateNetworkConditions({offline:this.isOffline(),latency:t.latency,downloadThroughput:t.download<0?0:t.download,uploadThroughput:t.upload<0?0:t.upload,connectionType:ne.connectionType(t)}):e.invoke_emulateNetworkConditions({offline:!1,latency:0,downloadThroughput:0,uploadThroughput:0})}setExtraHTTPHeaders(e){this.#ue=e;for(const e of this.#se)e.invoke_setExtraHTTPHeaders({headers:this.#ue})}currentUserAgent(){return this.#ge?this.#ge:this.#te}updateUserAgentOverride(){const e=this.currentUserAgent();for(const t of this.#se)t.invoke_setUserAgentOverride({userAgent:e,userAgentMetadata:this.#ne||void 0})}setUserAgentOverride(e,t){const n=this.#te!==e;this.#te=e,this.#ge?this.#ne=null:(this.#ne=t,this.updateUserAgentOverride()),n&&this.dispatchEventToListeners(ue.Events.UserAgentChanged)}userAgentOverride(){return this.#te}setCustomUserAgentOverride(e,t=null){this.#ge=e,this.#ne=t,this.updateUserAgentOverride()}setCustomAcceptedEncodingsOverride(e){this.#re=e,this.updateAcceptedEncodingsOverride(),this.dispatchEventToListeners(ue.Events.AcceptedEncodingsChanged)}clearCustomAcceptedEncodingsOverride(){this.#re=null,this.updateAcceptedEncodingsOverride(),this.dispatchEventToListeners(ue.Events.AcceptedEncodingsChanged)}isAcceptedEncodingOverrideSet(){return null!==this.#re}updateAcceptedEncodingsOverride(){const e=this.#re;for(const t of this.#se)null===e?t.invoke_clearAcceptedEncodingsOverride():t.invoke_setAcceptedEncodings({encodings:e})}blockedPatterns(){return this.#de.get().slice()}blockingEnabled(){return this.#le.get()}isBlocking(){return Boolean(this.#ce.length)}setBlockedPatterns(e){this.#de.set(e),this.updateBlockedPatterns(),this.dispatchEventToListeners(ue.Events.BlockedPatternsChanged)}setBlockingEnabled(e){this.#le.get()!==e&&(this.#le.set(e),this.updateBlockedPatterns(),this.dispatchEventToListeners(ue.Events.BlockedPatternsChanged))}updateBlockedPatterns(){const e=[];if(this.#le.get())for(const t of this.#de.get())t.enabled&&e.push(t.url);if(e.length||this.#ce.length){this.#ce=e;for(const e of this.#se)e.invoke_setBlockedURLs({urls:this.#ce})}}isIntercepting(){return Boolean(this.#he.size)}setInterceptionHandlerForPatterns(e,t){this.#he.deleteAll(t);for(const n of e)this.#he.set(t,n);return this.updateInterceptionPatternsOnNextTick()}updateInterceptionPatternsOnNextTick(){return this.#oe||(this.#oe=Promise.resolve().then(this.updateInterceptionPatterns.bind(this))),this.#oe}async updateInterceptionPatterns(){e.Settings.Settings.instance().moduleSetting("cacheDisabled").get()||e.Settings.Settings.instance().moduleSetting("cacheDisabled").set(!0),this.#oe=null;const t=[];for(const e of this.#ie)t.push(e.invoke_enable({patterns:this.#he.valuesArray()}));this.dispatchEventToListeners(ue.Events.InterceptorsChanged),await Promise.all(t)}async requestIntercepted(e){for(const t of this.#he.keysArray())if(await t(e),e.hasResponded()&&e.networkRequest)return void this.dispatchEventToListeners(ue.Events.RequestIntercepted,e.networkRequest.requestId());e.hasResponded()||e.continueRequestWithoutChange()}clearBrowserCache(){for(const e of this.#se)e.invoke_clearBrowserCache()}clearBrowserCookies(){for(const e of this.#se)e.invoke_clearBrowserCookies()}async getCertificate(e){const t=K.instance().primaryPageTarget();if(!t)return[];const n=await t.networkAgent().invoke_getCertificate({origin:e});return n?n.tableNames:[]}async loadResource(t){const n={},r=this.currentUserAgent();r&&(n["User-Agent"]=r),e.Settings.Settings.instance().moduleSetting("cacheDisabled").get()&&(n["Cache-Control"]="no-cache");const s=e.Settings.Settings.instance().moduleSetting("network.enable-remote-file-loading").get();return new Promise((e=>i.ResourceLoader.load(t,n,((t,n,r,s)=>{e({success:t,content:r,errorDescription:s})}),s)))}}!function(e){let t;!function(e){e.BlockedPatternsChanged="BlockedPatternsChanged",e.ConditionsChanged="ConditionsChanged",e.UserAgentChanged="UserAgentChanged",e.InterceptorsChanged="InterceptorsChanged",e.AcceptedEncodingsChanged="AcceptedEncodingsChanged",e.RequestIntercepted="RequestIntercepted",e.RequestFulfilled="RequestFulfilled"}(t=e.Events||(e.Events={}))}(ue||(ue={}));class ge{#K;#pe;request;resourceType;responseStatusCode;responseHeaders;requestId;networkRequest;constructor(e,t,n,r,s,i,a){this.#K=e,this.#pe=!1,this.request=t,this.resourceType=n,this.responseStatusCode=i,this.responseHeaders=a,this.requestId=r,this.networkRequest=s}hasResponded(){return this.#pe}static mergeSetCookieHeaders(e,t){const n=e=>{const t=new Map;for(const n of e){const e=n.value.match(/^([a-zA-Z0-9!#$%&'*+.^_`|~-]+=)(.*)$/);e?t.has(e[1])?t.get(e[1])?.push(n.value):t.set(e[1],[n.value]):t.has(n.value)?t.get(n.value)?.push(n.value):t.set(n.value,[n.value])}return t},r=n(e),s=n(t),i=[];for(const[e,t]of r)if(s.has(e))for(const t of s.get(e)||[])i.push({name:"set-cookie",value:t});else for(const e of t)i.push({name:"set-cookie",value:e});for(const[e,t]of s)if(!r.has(e))for(const e of t)i.push({name:"set-cookie",value:e});return i}async continueRequestWithContent(e,t,n,r){this.#pe=!0;const s=t?await e.text():await async function(e){const t=new FileReader,n=new Promise((e=>{t.onloadend=e}));if(t.readAsDataURL(e),await n,t.error)return console.error("Could not convert blob to base64.",t.error),"";const r=t.result;if(null==r||"string"!=typeof r)return console.error("Could not convert blob to base64."),"";return r.substring(r.indexOf(",")+1)}(e),i=r?200:this.responseStatusCode||200;if(this.networkRequest){const e=this.networkRequest?.originalResponseHeaders.filter((e=>"set-cookie"===e.name))||[],t=n.filter((e=>"set-cookie"===e.name));this.networkRequest.setCookieHeaders=ge.mergeSetCookieHeaders(e,t)}this.#K.invoke_fulfillRequest({requestId:this.requestId,responseCode:i,body:s,responseHeaders:n}),ue.instance().dispatchEventToListeners(ue.Events.RequestFulfilled,this.request.url)}continueRequestWithoutChange(){console.assert(!this.#pe),this.#pe=!0,this.#K.invoke_continueRequest({requestId:this.requestId})}continueRequestWithError(e){console.assert(!this.#pe),this.#pe=!0,this.#K.invoke_failRequest({requestId:this.requestId,errorReason:e})}async responseBody(){const e=await this.#K.invoke_getResponseBody({requestId:this.requestId}),t=e.getError()||null;return{error:t,content:t?null:e.body,encoded:e.base64Encoded}}isRedirect(){return void 0!==this.responseStatusCode&&this.responseStatusCode>=300&&this.responseStatusCode<400}}class pe{#me;#fe;#be;#ye;#ve;#Ie;constructor(){this.#me=[],this.#fe=[],this.#be=[],this.#ye=!1,this.#ve=null,this.#Ie=null}addRequest(e){this.#me.push(e),this.sync(this.#me.length-1)}addRequestExtraInfo(e){this.#fe.push(e),this.sync(this.#fe.length-1)}addResponseExtraInfo(e){this.#be.push(e),this.sync(this.#be.length-1)}setWebBundleInfo(e){this.#ve=e,this.updateFinalRequest()}setWebBundleInnerRequestInfo(e){this.#Ie=e,this.updateFinalRequest()}finished(){this.#ye=!0,this.updateFinalRequest()}isFinished(){return this.#ye}sync(e){const t=this.#me[e];if(!t)return;const n=this.#fe[e];n&&(t.addExtraRequestInfo(n),this.#fe[e]=null);const r=this.#be[e];r&&(t.addExtraResponseInfo(r),this.#be[e]=null)}finalRequest(){return this.#ye&&this.#me[this.#me.length-1]||null}updateFinalRequest(){if(!this.#ye)return;const e=this.finalRequest();e?.setWebBundleInfo(this.#ve),e?.setWebBundleInnerRequestInfo(this.#Ie)}}c.register(ne,{capabilities:z.Network,autostart:!0});var me=Object.freeze({__proto__:null,NetworkManager:ne,get Events(){return re},NoThrottlingConditions:se,OfflineConditions:ie,Slow3GConditions:ae,Fast3GConditions:oe,FetchDispatcher:de,NetworkDispatcher:ce,get MultitargetNetworkManager(){return ue},InterceptedRequest:ge,ConditionsSerializer:class{stringify(e){const t=e;return JSON.stringify({...t,title:"function"==typeof t.title?t.title():t.title})}parse(e){const t=JSON.parse(e);return{...t,title:t.i18nTitleKey?Z(t.i18nTitleKey):t.title}}},networkConditionsEqual:function(e,t){const n="function"==typeof e.title?e.title():e.title,r="function"==typeof t.title?t.title():t.title;return t.download===e.download&&t.upload===e.upload&&t.latency===e.latency&&r===n}});const fe={deprecatedSyntaxFoundPleaseUse:"Deprecated syntax found. Please use: ;dur=;desc=",duplicateParameterSIgnored:'Duplicate parameter "{PH1}" ignored.',noValueFoundForParameterS:'No value found for parameter "{PH1}".',unrecognizedParameterS:'Unrecognized parameter "{PH1}".',extraneousTrailingCharacters:"Extraneous trailing characters.",unableToParseSValueS:'Unable to parse "{PH1}" value "{PH2}".'},be=s.i18n.registerUIStrings("core/sdk/ServerTiming.ts",fe),ye=s.i18n.getLocalizedString.bind(void 0,be);class ve{metric;value;description;constructor(e,t,n){this.metric=e,this.value=t,this.description=n}static parseHeaders(e){const n=e.filter((e=>"server-timing"===e.name.toLowerCase()));if(!n.length)return null;const r=n.reduce(((e,t)=>{const n=this.createFromHeaderValue(t.value);return e.push(...n.map((function(e){return new ve(e.name,e.hasOwnProperty("dur")?e.dur:null,e.hasOwnProperty("desc")?e.desc:"")}))),e}),[]);return r.sort(((e,n)=>t.StringUtilities.compare(e.metric.toLowerCase(),n.metric.toLowerCase()))),r}static createFromHeaderValue(e){function t(){e=e.replace(/^\s*/,"")}function n(n){return console.assert(1===n.length),t(),e.charAt(0)===n&&(e=e.substring(1),!0)}function r(){const t=/^(?:\s*)([\w!#$%&'*+\-.^`|~]+)(?:\s*)(.*)/.exec(e);return t?(e=t[2],t[1]):null}function s(){return t(),'"'===e.charAt(0)?function(){console.assert('"'===e.charAt(0)),e=e.substring(1);let t="";for(;e.length;){const n=/^([^"\\]*)(.*)/.exec(e);if(!n)return null;if(t+=n[1],'"'===n[2].charAt(0))return e=n[2].substring(1),t;console.assert("\\"===n[2].charAt(0)),t+=n[2].charAt(1),e=n[2].substring(2)}return null}():r()}function i(){const t=/([,;].*)/.exec(e);t&&(e=t[1])}const a=[];let o;for(;null!==(o=r());){const t={name:o};for("="===e.charAt(0)&&this.showWarning(ye(fe.deprecatedSyntaxFoundPleaseUse));n(";");){let e;if(null===(e=r()))continue;e=e.toLowerCase();const a=this.getParserForParameter(e);let o=null;if(n("=")&&(o=s(),i()),a){if(t.hasOwnProperty(e)){this.showWarning(ye(fe.duplicateParameterSIgnored,{PH1:e}));continue}null===o&&this.showWarning(ye(fe.noValueFoundForParameterS,{PH1:e})),a.call(this,t,o)}else this.showWarning(ye(fe.unrecognizedParameterS,{PH1:e}))}if(a.push(t),!n(","))break}return e.length&&this.showWarning(ye(fe.extraneousTrailingCharacters)),a}static getParserForParameter(e){switch(e){case"dur":{function t(t,n){if(t.dur=0,null!==n){const r=parseFloat(n);if(isNaN(r))return void ve.showWarning(ye(fe.unableToParseSValueS,{PH1:e,PH2:n}));t.dur=r}}return t}case"desc":{function e(e,t){e.desc=t||""}return e}default:return null}}static showWarning(t){e.Console.Console.instance().warn(`ServerTiming: ${t}`)}}var Ie=Object.freeze({__proto__:null,ServerTiming:ve});const ke={binary:"(binary)",secureOnly:'This cookie was blocked because it had the "`Secure`" attribute and the connection was not secure.',notOnPath:"This cookie was blocked because its path was not an exact match for or a superdirectory of the request url's path.",domainMismatch:"This cookie was blocked because neither did the request URL's domain exactly match the cookie's domain, nor was the request URL's domain a subdomain of the cookie's Domain attribute value.",sameSiteStrict:'This cookie was blocked because it had the "`SameSite=Strict`" attribute and the request was made from a different site. This includes top-level navigation requests initiated by other sites.',sameSiteLax:'This cookie was blocked because it had the "`SameSite=Lax`" attribute and the request was made from a different site and was not initiated by a top-level navigation.',sameSiteUnspecifiedTreatedAsLax:'This cookie didn\'t specify a "`SameSite`" attribute when it was stored and was defaulted to "SameSite=Lax," and was blocked because the request was made from a different site and was not initiated by a top-level navigation. The cookie had to have been set with "`SameSite=None`" to enable cross-site usage.',sameSiteNoneInsecure:'This cookie was blocked because it had the "`SameSite=None`" attribute but was not marked "Secure". Cookies without SameSite restrictions must be marked "Secure" and sent over a secure connection.',userPreferences:"This cookie was blocked due to user preferences.",unknownError:"An unknown error was encountered when trying to send this cookie.",schemefulSameSiteStrict:'This cookie was blocked because it had the "`SameSite=Strict`" attribute but the request was cross-site. This includes top-level navigation requests initiated by other sites. This request is considered cross-site because the URL has a different scheme than the current site.',schemefulSameSiteLax:'This cookie was blocked because it had the "`SameSite=Lax`" attribute but the request was cross-site and was not initiated by a top-level navigation. This request is considered cross-site because the URL has a different scheme than the current site.',schemefulSameSiteUnspecifiedTreatedAsLax:'This cookie didn\'t specify a "`SameSite`" attribute when it was stored, was defaulted to "`SameSite=Lax"`, and was blocked because the request was cross-site and was not initiated by a top-level navigation. This request is considered cross-site because the URL has a different scheme than the current site.',samePartyFromCrossPartyContext:"This cookie was blocked because it had the \"`SameParty`\" attribute but the request was cross-party. The request was considered cross-party because the domain of the resource's URL and the domains of the resource's enclosing frames/documents are neither owners nor members in the same First-Party Set.",nameValuePairExceedsMaxSize:"This cookie was blocked because it was too large. The combined size of the name and value must be less than or equal to 4096 characters.",thisSetcookieWasBlockedDueToUser:"This attempt to set a cookie via a `Set-Cookie` header was blocked due to user preferences.",thisSetcookieHadInvalidSyntax:"This `Set-Cookie` header had invalid syntax.",theSchemeOfThisConnectionIsNot:"The scheme of this connection is not allowed to store cookies.",anUnknownErrorWasEncounteredWhenTrying:"An unknown error was encountered when trying to store this cookie.",thisSetcookieWasBlockedBecauseItHadTheSamesiteStrictLax:'This attempt to set a cookie via a `Set-Cookie` header was blocked because it had the "{PH1}" attribute but came from a cross-site response which was not the response to a top-level navigation. This response is considered cross-site because the URL has a different scheme than the current site.',thisSetcookieDidntSpecifyASamesite:'This `Set-Cookie` header didn\'t specify a "`SameSite`" attribute, was defaulted to "`SameSite=Lax"`, and was blocked because it came from a cross-site response which was not the response to a top-level navigation. This response is considered cross-site because the URL has a different scheme than the current site.',thisSetcookieWasBlockedBecauseItHadTheSameparty:"This attempt to set a cookie via a `Set-Cookie` header was blocked because it had the \"`SameParty`\" attribute but the request was cross-party. The request was considered cross-party because the domain of the resource's URL and the domains of the resource's enclosing frames/documents are neither owners nor members in the same First-Party Set.",thisSetcookieWasBlockedBecauseItHadTheSamepartyAttribute:'This attempt to set a cookie via a `Set-Cookie` header was blocked because it had the "`SameParty`" attribute but also had other conflicting attributes. Chrome requires cookies that use the "`SameParty`" attribute to also have the "Secure" attribute, and to not be restricted to "`SameSite=Strict`".',blockedReasonSecureOnly:'This attempt to set a cookie via a `Set-Cookie` header was blocked because it had the "Secure" attribute but was not received over a secure connection.',blockedReasonSameSiteStrictLax:'This attempt to set a cookie via a `Set-Cookie` header was blocked because it had the "{PH1}" attribute but came from a cross-site response which was not the response to a top-level navigation.',blockedReasonSameSiteUnspecifiedTreatedAsLax:'This `Set-Cookie` header didn\'t specify a "`SameSite`" attribute and was defaulted to "`SameSite=Lax,`" and was blocked because it came from a cross-site response which was not the response to a top-level navigation. The `Set-Cookie` had to have been set with "`SameSite=None`" to enable cross-site usage.',blockedReasonSameSiteNoneInsecure:'This attempt to set a cookie via a `Set-Cookie` header was blocked because it had the "`SameSite=None`" attribute but did not have the "Secure" attribute, which is required in order to use "`SameSite=None`".',blockedReasonOverwriteSecure:"This attempt to set a cookie via a `Set-Cookie` header was blocked because it was not sent over a secure connection and would have overwritten a cookie with the Secure attribute.",blockedReasonInvalidDomain:"This attempt to set a cookie via a `Set-Cookie` header was blocked because its Domain attribute was invalid with regards to the current host url.",blockedReasonInvalidPrefix:'This attempt to set a cookie via a `Set-Cookie` header was blocked because it used the "`__Secure-`" or "`__Host-`" prefix in its name and broke the additional rules applied to cookies with these prefixes as defined in `https://tools.ietf.org/html/draft-west-cookie-prefixes-05`.',thisSetcookieWasBlockedBecauseTheNameValuePairExceedsMaxSize:"This attempt to set a cookie via a `Set-Cookie` header was blocked because the cookie was too large. The combined size of the name and value must be less than or equal to 4096 characters.",setcookieHeaderIsIgnoredIn:"Set-Cookie header is ignored in response from url: {PH1}. The combined size of the name and value must be less than or equal to 4096 characters."},Se=s.i18n.registerUIStrings("core/sdk/NetworkRequest.ts",ke),we=s.i18n.getLocalizedString.bind(void 0,Se);var Ce,Te,Re,xe;!function(e){e.HTML="text/html",e.XML="text/xml",e.PLAIN="text/plain",e.XHTML="application/xhtml+xml",e.SVG="image/svg+xml",e.CSS="text/css",e.XSL="text/xsl",e.VTT="text/vtt",e.PDF="application/pdf",e.EVENTSTREAM="text/event-stream"}(Ce||(Ce={}));class Me extends e.ObjectWrapper.ObjectWrapper{#ke;#Se;#we;#Ce;#Te;#Re;#xe;#Me;#Pe;#Le;#Ee;#Ae;#Oe;#Ne;#Fe;#Be;#De;statusCode;statusText;requestMethod;requestTime;protocol;alternateProtocolUsage;mixedContentType;#Ue;#He;#qe;#_e;#ze;#je;#We;#Ve;#Ge;#Ke;#$e;#Qe;#Xe;#Je;#Ye;#Ze;#et;#tt;#nt;#rt;#st;connectionId;connectionReused;hasNetworkData;#it;#at;#ot;#lt;#dt;#ct;#ht;#ut;#gt;#pt;localizedFailDescription;#mt;#ft;#bt;#ye;#yt;#vt;#It;#kt;#St;#u;#wt;#Ct;#Tt;#Rt;#xt;#Mt;#Pt;#Lt;#Et;#At;#Ot;#Nt;#Ft;#Bt;#Dt;#Ut;#Ht;#qt;#_t;#zt;#jt;#Wt;#Vt;#Gt;#Kt=new Map;constructor(t,n,r,s,i,a,o,l){super(),this.#ke=t,this.#Se=n,this.setUrl(r),this.#we=s,this.#Ce=i,this.#Te=a,this.#Re=o,this.#xe=l,this.#Me=null,this.#Pe=null,this.#Le=null,this.#Ee=!1,this.#Ae=null,this.#Oe=-1,this.#Ne=-1,this.#Fe=-1,this.#Be=void 0,this.#De=void 0,this.statusCode=0,this.statusText="",this.requestMethod="",this.requestTime=0,this.protocol="",this.alternateProtocolUsage=void 0,this.mixedContentType="none",this.#Ue=null,this.#He=null,this.#qe=null,this.#_e=null,this.#ze=null,this.#je=e.ResourceType.resourceTypes.Other,this.#We=null,this.#Ve=[],this.#Ge=[],this.#Ke={},this.#$e="",this.#Qe=[],this.#Je=[],this.#Ye=[],this.#Ze={},this.#et="",this.#tt="Unknown",this.#nt=null,this.#rt="unknown",this.#st=null,this.connectionId="0",this.connectionReused=!1,this.hasNetworkData=!1,this.#it=null,this.#at=Promise.resolve(null),this.#ot=!1,this.#lt=!1,this.#dt=[],this.#ct=[],this.#ht=[],this.#pt=!1,this.#ut=null,this.#gt=null,this.localizedFailDescription=null,this.#Vt=null,this.#Gt=!1}static create(e,t,n,r,s,i,a){return new Me(e,e,t,n,r,s,i,a)}static createForWebSocket(e,n,r){return new Me(e,e,n,t.DevToolsPath.EmptyUrlString,null,null,r||null)}static createWithoutBackendRequest(e,t,n,r){return new Me(e,void 0,t,n,null,null,r)}identityCompare(e){const t=this.requestId(),n=e.requestId();return t>n?1:te&&(this.#ft=e)),this.dispatchEventToListeners(Te.TimingChanged,this)}get duration(){return-1===this.#Fe||-1===this.#Ne?-1:this.#Fe-this.#Ne}get latency(){return-1===this.#ft||-1===this.#Ne?-1:this.#ft-this.#Ne}get resourceSize(){return this.#Et||0}set resourceSize(e){this.#Et=e}get transferSize(){return this.#bt||0}increaseTransferSize(e){this.#bt=(this.#bt||0)+e}setTransferSize(e){this.#bt=e}get finished(){return this.#ye}set finished(e){this.#ye!==e&&(this.#ye=e,e&&this.dispatchEventToListeners(Te.FinishedLoading,this))}get failed(){return this.#yt}set failed(e){this.#yt=e}get canceled(){return this.#vt}set canceled(e){this.#vt=e}get preserved(){return this.#It}set preserved(e){this.#It=e}blockedReason(){return this.#Be}setBlockedReason(e){this.#Be=e}corsErrorStatus(){return this.#De}setCorsErrorStatus(e){this.#De=e}wasBlocked(){return Boolean(this.#Be)}cached(){return(Boolean(this.#At)||Boolean(this.#Ot))&&!this.#bt}cachedInMemory(){return Boolean(this.#At)&&!this.#bt}fromPrefetchCache(){return Boolean(this.#Nt)}setFromMemoryCache(){this.#At=!0,this.#Bt=void 0}get fromDiskCache(){return this.#Ot}setFromDiskCache(){this.#Ot=!0}setFromPrefetchCache(){this.#Nt=!0}get fetchedViaServiceWorker(){return Boolean(this.#Ft)}set fetchedViaServiceWorker(e){this.#Ft=e}initiatedByServiceWorker(){const e=ne.forRequest(this);return!!e&&e.target().type()===_.ServiceWorker}get timing(){return this.#Bt}set timing(e){if(!e||this.#At)return;this.#Ne=e.requestTime;const t=e.requestTime+e.receiveHeadersEnd/1e3;((this.#ft||-1)<0||this.#ft>t)&&(this.#ft=t),this.#Ne>this.#ft&&(this.#ft=this.#Ne),this.#Bt=e,this.dispatchEventToListeners(Te.TimingChanged,this)}setConnectTimingFromExtraInfo(e){this.#Ne=e.requestTime,this.dispatchEventToListeners(Te.TimingChanged,this)}get mimeType(){return this.#kt}set mimeType(e){this.#kt=e}get displayName(){return this.#St.displayName}name(){return this.#u||this.parseNameAndPathFromURL(),this.#u}path(){return this.#wt||this.parseNameAndPathFromURL(),this.#wt}parseNameAndPathFromURL(){if(this.#St.isDataURL())this.#u=this.#St.dataURLDisplayName(),this.#wt="";else if(this.#St.isBlobURL())this.#u=this.#St.url,this.#wt="";else if(this.#St.isAboutBlank())this.#u=this.#St.url,this.#wt="";else{this.#wt=this.#St.host+this.#St.folderPathComponents;const n=ne.forRequest(this),r=n?e.ParsedURL.ParsedURL.fromString(n.target().inspectedURL()):null;this.#wt=t.StringUtilities.trimURL(this.#wt,r?r.host:""),this.#St.lastPathComponent||this.#St.queryParams?this.#u=this.#St.lastPathComponent+(this.#St.queryParams?"?"+this.#St.queryParams:""):this.#St.folderPathComponents?(this.#u=this.#St.folderPathComponents.substring(this.#St.folderPathComponents.lastIndexOf("/")+1)+"/",this.#wt=this.#wt.substring(0,this.#wt.lastIndexOf("/"))):(this.#u=this.#St.host,this.#wt="")}}get folder(){let e=this.#St.path;const t=e.indexOf("?");-1!==t&&(e=e.substring(0,t));const n=e.lastIndexOf("/");return-1!==n?e.substring(0,n):""}get pathname(){return this.#St.path}resourceType(){return this.#je}setResourceType(e){this.#je=e}get domain(){return this.#St.host}get scheme(){return this.#St.scheme}redirectSource(){return this.#Me}setRedirectSource(e){this.#Me=e}preflightRequest(){return this.#Pe}setPreflightRequest(e){this.#Pe=e}preflightInitiatorRequest(){return this.#Le}setPreflightInitiatorRequest(e){this.#Le=e}isPreflightRequest(){return null!==this.#Re&&void 0!==this.#Re&&"preflight"===this.#Re.type}redirectDestination(){return this.#Ae}setRedirectDestination(e){this.#Ae=e}requestHeaders(){return this.#Ye}setRequestHeaders(e){this.#Ye=e,this.dispatchEventToListeners(Te.RequestHeadersChanged)}requestHeadersText(){return this.#Dt}setRequestHeadersText(e){this.#Dt=e,this.dispatchEventToListeners(Te.RequestHeadersChanged)}requestHeaderValue(e){return this.#Ze[e]||(this.#Ze[e]=this.computeHeaderValue(this.requestHeaders(),e)),this.#Ze[e]}requestFormData(){return this.#at||(this.#at=ne.requestPostData(this)),this.#at}setRequestFormData(e,t){this.#at=e&&null===t?null:Promise.resolve(t),this.#it=null}filteredProtocolName(){const e=this.protocol.toLowerCase();return"h2"===e?"http/2.0":e.replace(/^http\/2(\.0)?\+/,"http/2.0+")}requestHttpVersion(){const e=this.requestHeadersText();if(!e){const e=this.requestHeaderValue("version")||this.requestHeaderValue(":version");return e||this.filteredProtocolName()}const t=e.split(/\r\n/)[0].match(/(HTTP\/\d+\.\d+)$/);return t?t[1]:"HTTP/0.9"}get responseHeaders(){return this.#Ut||[]}set responseHeaders(e){this.#Ut=e,this.#Ht=void 0,this.#_t=void 0,this.#qt=void 0,this.#Ke={},this.dispatchEventToListeners(Te.ResponseHeadersChanged)}get originalResponseHeaders(){return this.#Qe}set originalResponseHeaders(e){this.#Qe=e,this.#Xe=void 0}get setCookieHeaders(){return this.#Je}set setCookieHeaders(e){this.#Je=e}get responseHeadersText(){return this.#$e}set responseHeadersText(e){this.#$e=e,this.dispatchEventToListeners(Te.ResponseHeadersChanged)}get sortedResponseHeaders(){return void 0!==this.#Ht?this.#Ht:(this.#Ht=this.responseHeaders.slice(),this.#Ht.sort((function(e,n){return t.StringUtilities.compare(e.name.toLowerCase(),n.name.toLowerCase())||t.StringUtilities.compare(e.value,n.value)})))}get sortedOriginalResponseHeaders(){return void 0!==this.#Xe?this.#Xe:(this.#Xe=this.originalResponseHeaders.slice(),this.#Xe.sort((function(e,n){return t.StringUtilities.compare(e.name.toLowerCase(),n.name.toLowerCase())||t.StringUtilities.compare(e.value,n.value)})))}hasOverriddenHeaders(){if(!this.#Qe.length)return!1;const e=this.sortedResponseHeaders,t=this.sortedOriginalResponseHeaders;if(t.length!==e.length)return!0;for(let n=0;ne.cookie)),...this.blockedResponseCookies().map((e=>e.cookie))].filter((e=>Boolean(e)))}get serverTimings(){return void 0===this.#_t&&(this.#_t=ve.parseHeaders(this.responseHeaders)),this.#_t}queryString(){if(void 0!==this.#zt)return this.#zt;let e=null;const t=this.url(),n=t.indexOf("?");if(-1!==n){e=t.substring(n+1);const r=e.indexOf("#");-1!==r&&(e=e.substring(0,r))}return this.#zt=e,this.#zt}get queryParameters(){if(this.#jt)return this.#jt;const e=this.queryString();return e?(this.#jt=this.parseParameters(e),this.#jt):null}async parseFormParameters(){const e=this.requestContentType();if(!e)return null;if(e.match(/^application\/x-www-form-urlencoded\s*(;.*)?$/i)){const e=await this.requestFormData();return e?this.parseParameters(e):null}const t=e.match(/^multipart\/form-data\s*;\s*boundary\s*=\s*(\S+)\s*$/);if(!t)return null;const n=t[1];if(!n)return null;const r=await this.requestFormData();return r?this.parseMultipartFormDataParameters(r,n):null}formParameters(){return this.#it||(this.#it=this.parseFormParameters()),this.#it}responseHttpVersion(){const e=this.#$e;if(!e){const e=this.responseHeaderValue("version")||this.responseHeaderValue(":version");return e||this.filteredProtocolName()}const t=e.split(/\r\n/)[0].match(/^(HTTP\/\d+\.\d+)/);return t?t[1]:"HTTP/0.9"}parseParameters(e){return e.split("&").map((function(e){const t=e.indexOf("=");return-1===t?{name:e,value:""}:{name:e.substring(0,t),value:e.substring(t+1)}}))}parseMultipartFormDataParameters(e,n){const r=t.StringUtilities.escapeForRegExp(n),s=new RegExp('^\\r\\ncontent-disposition\\s*:\\s*form-data\\s*;\\s*name="([^"]*)"(?:\\s*;\\s*filename="([^"]*)")?(?:\\r\\ncontent-type\\s*:\\s*([^\\r\\n]*))?\\r\\n\\r\\n(.*)\\r\\n$',"is");return e.split(new RegExp(`--${r}(?:--s*$)?`,"g")).reduce((function(e,t){const[n,r,i,a,o]=t.match(s)||[];if(!n)return e;const l=i||a?we(ke.binary):o;return e.push({name:r,value:l}),e}),[])}computeHeaderValue(e,t){t=t.toLowerCase();const n=[];for(let r=0;r=400}setInitialPriority(e){this.#Ue=e}initialPriority(){return this.#Ue}setPriority(e){this.#He=e}priority(){return this.#He||this.#Ue||null}setSignedExchangeInfo(e){this.#qe=e}signedExchangeInfo(){return this.#qe}setWebBundleInfo(e){this.#_e=e}webBundleInfo(){return this.#_e}setWebBundleInnerRequestInfo(e){this.#ze=e}webBundleInnerRequestInfo(){return this.#ze}async populateImageSource(e){const{content:t,encoded:n}=await this.contentData();let s=r.ContentProvider.contentAsDataURL(t,this.#kt,n);if(null===s&&!this.#yt){(this.responseHeaderValue("cache-control")||"").includes("no-cache")||(s=this.#mt)}null!==s&&(e.src=s)}initiator(){return this.#Re||null}hasUserGesture(){return this.#xe??null}frames(){return this.#Ve}addProtocolFrameError(e,t){this.addFrame({type:xe.Error,text:e,time:this.pseudoWallTime(t),opCode:-1,mask:!1})}addProtocolFrame(e,t,n){const r=n?xe.Send:xe.Receive;this.addFrame({type:r,text:e.payloadData,time:this.pseudoWallTime(t),opCode:e.opcode,mask:e.mask})}addFrame(e){this.#Ve.push(e),this.dispatchEventToListeners(Te.WebsocketFrameAdded,e)}eventSourceMessages(){return this.#Ge}addEventSourceMessage(e,t,n,r){const s={time:this.pseudoWallTime(e),eventName:t,eventId:n,data:r};this.#Ge.push(s),this.dispatchEventToListeners(Te.EventSourceMessageAdded,s)}markAsRedirect(e){this.#Ee=!0,this.#ke=`${this.#Se}:redirected.${e}`}isRedirect(){return this.#Ee}setRequestIdForTest(e){this.#Se=e,this.#ke=e}charset(){const e=this.responseHeaderValue("content-type");if(!e)return null;const t=e.replace(/ /g,"").split(";").filter((e=>e.toLowerCase().startsWith("charset="))).map((e=>e.slice("charset=".length)));return t.length?t[0]:null}addExtraRequestInfo(e){this.#dt=e.blockedRequestCookies,this.#ct=e.includedRequestCookies,this.setRequestHeaders(e.requestHeaders),this.#ot=!0,this.setRequestHeadersText(""),this.#Ct=e.clientSecurityState,this.setConnectTimingFromExtraInfo(e.connectTiming),this.#pt=e.siteHasCookieInOtherPartition??!1}hasExtraRequestInfo(){return this.#ot}blockedRequestCookies(){return this.#dt}includedRequestCookies(){return this.#ct}hasRequestCookies(){return this.#ct.length>0||this.#dt.length>0}siteHasCookieInOtherPartition(){return this.#pt}static parseStatusTextFromResponseHeadersText(e){return e.split("\r")[0].split(" ").slice(2).join(" ")}addExtraResponseInfo(e){if(this.#ht=e.blockedResponseCookies,this.#ut=e.cookiePartitionKey||null,this.#gt=e.cookiePartitionKeyOpaque||null,this.responseHeaders=e.responseHeaders,this.originalResponseHeaders=e.responseHeaders.map((e=>({...e}))),e.responseHeadersText){if(this.responseHeadersText=e.responseHeadersText,!this.requestHeadersText()){let e=`${this.requestMethod} ${this.parsedURL.path}`;this.parsedURL.queryParams&&(e+=`?${this.parsedURL.queryParams}`),e+=" HTTP/1.1\r\n";for(const{name:t,value:n}of this.requestHeaders())e+=`${t}: ${n}\r\n`;this.setRequestHeadersText(e)}this.statusText=Me.parseStatusTextFromResponseHeadersText(e.responseHeadersText)}this.#tt=e.resourceIPAddressSpace,e.statusCode&&(this.statusCode=e.statusCode),this.#lt=!0;const t=ne.forRequest(this);if(t)for(const e of this.#ht)if(e.blockedReasons.includes("NameValuePairExceedsMaxSize")){const e=we(ke.setcookieHeaderIsIgnoredIn,{PH1:this.url()});t.dispatchEventToListeners(re.MessageGenerated,{message:e,requestId:this.#ke,warning:!0})}}hasExtraResponseInfo(){return this.#lt}blockedResponseCookies(){return this.#ht}responseCookiesPartitionKey(){return this.#ut}responseCookiesPartitionKeyOpaque(){return this.#gt}redirectSourceSignedExchangeInfoHasNoErrors(){return null!==this.#Me&&null!==this.#Me.#qe&&!this.#Me.#qe.errors}clientSecurityState(){return this.#Ct}setTrustTokenParams(e){this.#Tt=e}trustTokenParams(){return this.#Tt}setTrustTokenOperationDoneEvent(e){this.#Rt=e,this.dispatchEventToListeners(Te.TrustTokenResultAdded)}trustTokenOperationDoneEvent(){return this.#Rt}setIsSameSite(e){this.#Vt=e}isSameSite(){return this.#Vt}getAssociatedData(e){return this.#Kt.get(e)||null}setAssociatedData(e,t){this.#Kt.set(e,t)}deleteAssociatedData(e){this.#Kt.delete(e)}}!function(e){e.FinishedLoading="FinishedLoading",e.TimingChanged="TimingChanged",e.RemoteAddressChanged="RemoteAddressChanged",e.RequestHeadersChanged="RequestHeadersChanged",e.ResponseHeadersChanged="ResponseHeadersChanged",e.WebsocketFrameAdded="WebsocketFrameAdded",e.EventSourceMessageAdded="EventSourceMessageAdded",e.TrustTokenResultAdded="TrustTokenResultAdded"}(Te||(Te={})),function(e){e.Other="other",e.Parser="parser",e.Redirect="redirect",e.Script="script",e.Preload="preload",e.SignedExchange="signedExchange",e.Preflight="preflight"}(Re||(Re={})),function(e){e.Send="send",e.Receive="receive",e.Error="error"}(xe||(xe={}));var Pe=Object.freeze({__proto__:null,get MIME_TYPE(){return Ce},NetworkRequest:Me,get Events(){return Te},get InitiatorType(){return Re},get WebSocketFrameType(){return xe},cookieBlockedReasonToUiString:function(e){switch(e){case"SecureOnly":return we(ke.secureOnly);case"NotOnPath":return we(ke.notOnPath);case"DomainMismatch":return we(ke.domainMismatch);case"SameSiteStrict":return we(ke.sameSiteStrict);case"SameSiteLax":return we(ke.sameSiteLax);case"SameSiteUnspecifiedTreatedAsLax":return we(ke.sameSiteUnspecifiedTreatedAsLax);case"SameSiteNoneInsecure":return we(ke.sameSiteNoneInsecure);case"UserPreferences":return we(ke.userPreferences);case"UnknownError":return we(ke.unknownError);case"SchemefulSameSiteStrict":return we(ke.schemefulSameSiteStrict);case"SchemefulSameSiteLax":return we(ke.schemefulSameSiteLax);case"SchemefulSameSiteUnspecifiedTreatedAsLax":return we(ke.schemefulSameSiteUnspecifiedTreatedAsLax);case"SamePartyFromCrossPartyContext":return we(ke.samePartyFromCrossPartyContext);case"NameValuePairExceedsMaxSize":return we(ke.nameValuePairExceedsMaxSize)}return""},setCookieBlockedReasonToUiString:function(e){switch(e){case"SecureOnly":return we(ke.blockedReasonSecureOnly);case"SameSiteStrict":return we(ke.blockedReasonSameSiteStrictLax,{PH1:"SameSite=Strict"});case"SameSiteLax":return we(ke.blockedReasonSameSiteStrictLax,{PH1:"SameSite=Lax"});case"SameSiteUnspecifiedTreatedAsLax":return we(ke.blockedReasonSameSiteUnspecifiedTreatedAsLax);case"SameSiteNoneInsecure":return we(ke.blockedReasonSameSiteNoneInsecure);case"UserPreferences":return we(ke.thisSetcookieWasBlockedDueToUser);case"SyntaxError":return we(ke.thisSetcookieHadInvalidSyntax);case"SchemeNotSupported":return we(ke.theSchemeOfThisConnectionIsNot);case"OverwriteSecure":return we(ke.blockedReasonOverwriteSecure);case"InvalidDomain":return we(ke.blockedReasonInvalidDomain);case"InvalidPrefix":return we(ke.blockedReasonInvalidPrefix);case"UnknownError":return we(ke.anUnknownErrorWasEncounteredWhenTrying);case"SchemefulSameSiteStrict":return we(ke.thisSetcookieWasBlockedBecauseItHadTheSamesiteStrictLax,{PH1:"SameSite=Strict"});case"SchemefulSameSiteLax":return we(ke.thisSetcookieWasBlockedBecauseItHadTheSamesiteStrictLax,{PH1:"SameSite=Lax"});case"SchemefulSameSiteUnspecifiedTreatedAsLax":return we(ke.thisSetcookieDidntSpecifyASamesite);case"SamePartyFromCrossPartyContext":return we(ke.thisSetcookieWasBlockedBecauseItHadTheSameparty);case"SamePartyConflictsWithOtherAttributes":return we(ke.thisSetcookieWasBlockedBecauseItHadTheSamepartyAttribute);case"NameValuePairExceedsMaxSize":return we(ke.thisSetcookieWasBlockedBecauseTheNameValuePairExceedsMaxSize)}return""},cookieBlockedReasonToAttribute:function(e){switch(e){case"SecureOnly":return D.Secure;case"NotOnPath":return D.Path;case"DomainMismatch":return D.Domain;case"SameSiteStrict":case"SameSiteLax":case"SameSiteUnspecifiedTreatedAsLax":case"SameSiteNoneInsecure":case"SchemefulSameSiteStrict":case"SchemefulSameSiteLax":case"SchemefulSameSiteUnspecifiedTreatedAsLax":return D.SameSite;case"SamePartyFromCrossPartyContext":case"NameValuePairExceedsMaxSize":case"UserPreferences":case"UnknownError":return null}return null},setCookieBlockedReasonToAttribute:function(e){switch(e){case"SecureOnly":case"OverwriteSecure":return D.Secure;case"SameSiteStrict":case"SameSiteLax":case"SameSiteUnspecifiedTreatedAsLax":case"SameSiteNoneInsecure":case"SchemefulSameSiteStrict":case"SchemefulSameSiteLax":case"SchemefulSameSiteUnspecifiedTreatedAsLax":return D.SameSite;case"InvalidDomain":return D.Domain;case"InvalidPrefix":return D.Name;case"SamePartyConflictsWithOtherAttributes":case"SamePartyFromCrossPartyContext":case"NameValuePairExceedsMaxSize":case"UserPreferences":case"SyntaxError":case"SchemeNotSupported":case"UnknownError":return null}return null}});class Le{static fromLocalObject(e){return new Fe(e)}static type(e){if(null===e)return"null";const t=typeof e;return"object"!==t&&"function"!==t?t:e.type}static isNullOrUndefined(e){if(void 0===e)return!0;switch(e.type){case"object":return"null"===e.subtype;case"undefined":return!0;default:return!1}}static arrayNameFromDescription(e){return e.replace(Ue,"").replace(He,"")}static arrayLength(e){if("array"!==e.subtype&&"typedarray"!==e.subtype)return 0;const t=e.description&&e.description.match(Ue),n=e.description&&e.description.match(He);return t?parseInt(t[1],10):n?parseInt(n[1],10):0}static arrayBufferByteLength(e){if("arraybuffer"!==e.subtype)return 0;const t=e.description&&e.description.match(Ue);return t?parseInt(t[1],10):0}static unserializableDescription(e){const t=typeof e;if("number"===t){const t=String(e);if(0===e&&1/e<0)return"-0";if("NaN"===t||"Infinity"===t||"-Infinity"===t)return t}return"bigint"===t?e+"n":null}static toCallArgument(e){const t=typeof e;if("undefined"===t)return{};const n=Le.unserializableDescription(e);if("number"===t)return null!==n?{unserializableValue:n}:{value:e};if("bigint"===t)return{unserializableValue:n};if("string"===t||"boolean"===t)return{value:e};if(!e)return{value:null};const r=e;if(e instanceof Le){const t=e.unserializableValue();if(void 0!==t)return{unserializableValue:t}}else if(void 0!==r.unserializableValue)return{unserializableValue:r.unserializableValue};return void 0!==r.objectId?{objectId:r.objectId}:{value:r.value}}static async loadFromObjectPerProto(e,t,n=!1){const r=await Promise.all([e.getAllProperties(!0,t,n),e.getOwnProperties(t,n)]),s=r[0].properties,i=r[1].properties,a=r[1].internalProperties;if(!i||!s)return{properties:null,internalProperties:null};const o=new Map,l=[];for(let e=0;e100){r+=",…";break}e&&(r+=", "),r+=t}return r+=t,r}get type(){return typeof this.valueInternal}get subtype(){return null===this.valueInternal?"null":Array.isArray(this.valueInternal)?"array":this.valueInternal instanceof Date?"date":void 0}get hasChildren(){return"object"==typeof this.valueInternal&&null!==this.valueInternal&&Boolean(Object.keys(this.valueInternal).length)}async getOwnProperties(e,t=!1){let n=this.children();return t&&(n=n.filter((e=>!function(e){const t=Number(e)>>>0;return String(t)===e}(e.name)))),{properties:n,internalProperties:null}}async getAllProperties(e,t,n=!1){return e?{properties:[],internalProperties:null}:await this.getOwnProperties(t,n)}children(){if(!this.hasChildren)return[];const e=this.valueInternal;return this.#in||(this.#in=Object.keys(e).map((function(t){let n=e[t];return n instanceof Le||(n=Le.fromLocalObject(n)),new Ne(t,n)}))),this.#in}arrayLength(){return Array.isArray(this.valueInternal)?this.valueInternal.length:0}async callFunction(e,t){const n=this.valueInternal,r=t?t.map((e=>e.value)):[];let s,i=!1;try{s=e.apply(n,r)}catch(e){i=!0}return{object:Le.fromLocalObject(s),wasThrown:i}}async callFunctionJSON(e,t){const n=this.valueInternal,r=t?t.map((e=>e.value)):[];let s;try{s=e.apply(n,r)}catch(e){s=null}return s}}class Be{#an;constructor(e){this.#an=e}static objectAsArray(e){if(!e||"object"!==e.type||"array"!==e.subtype&&"typedarray"!==e.subtype)throw new Error("Object is empty or not an array");return new Be(e)}static createFromRemoteObjects(e){if(!e.length)throw new Error("Input array is empty");const t=[];for(let n=0;n1)return new Array(arguments);return[arguments[0]]}),t).then((function(e){if(e.wasThrown||!e.object)throw new Error("Call function throws exceptions or returns empty value");return Be.objectAsArray(e.object)}))}at(e){if(e<0||e>this.#an.arrayLength())throw new Error("Out of range");return this.#an.callFunction((function(e){return this[e]}),[Le.toCallArgument(e)]).then((function(e){if(e.wasThrown||!e.object)throw new Error("Exception in callFunction or result value is empty");return e.object}))}length(){return this.#an.arrayLength()}map(e){const t=[];for(let n=0;n=this.byteLength())throw new RangeError("start is out of range");if(tthis.byteLength())throw new RangeError("end is out of range");return await this.#an.callFunctionJSON((function(e,t){return[...new Uint8Array(this,e,t)]}),[{value:e},{value:t-e}])}object(){return this.#an}},RemoteArray:Be,RemoteFunction:De});class _e{#on;#ln;#dn;#cn;#hn;constructor(e){this.#on=e.fontFamily,this.#ln=e.fontVariationAxes||[],this.#dn=new Map,this.#cn=e.src,this.#hn=e.fontDisplay;for(const e of this.#ln)this.#dn.set(e.tag,e)}getFontFamily(){return this.#on}getSrc(){return this.#cn}getFontDisplay(){return this.#hn}getVariationAxisByTag(e){return this.#dn.get(e)}}var ze=Object.freeze({__proto__:null,CSSFontFace:_e});class je{text="";range;styleSheetId;cssModel;constructor(e){this.cssModel=e}rebase(e){this.styleSheetId===e.styleSheetId&&this.range&&(e.oldRange.equal(this.range)?this.reinitialize(e.payload):this.range=this.range.rebaseAfterTextEdit(e.oldRange,e.newRange))}equal(e){return!!(this.styleSheetId&&this.range&&e.range)&&(this.styleSheetId===e.styleSheetId&&this.range.equal(e.range))}lineNumberInSource(){if(this.range)return this.header()?.lineNumberInSource(this.range.startLine)}columnNumberInSource(){if(this.range)return this.header()?.columnNumberInSource(this.range.startLine,this.range.startColumn)}header(){return this.styleSheetId?this.cssModel.styleSheetHeaderForId(this.styleSheetId):null}rawLocation(){const e=this.header();if(!e||void 0===this.lineNumberInSource())return null;const t=Number(this.lineNumberInSource());return new rn(e,t,this.columnNumberInSource())}}var We=Object.freeze({__proto__:null,CSSQuery:je});class Ve extends je{name;physicalAxes;logicalAxes;static parseContainerQueriesPayload(e,t){return t.map((t=>new Ve(e,t)))}constructor(e,t){super(e),this.reinitialize(t)}reinitialize(e){this.text=e.text,this.range=e.range?r.TextRange.TextRange.fromObject(e.range):null,this.styleSheetId=e.styleSheetId,this.name=e.name,this.physicalAxes=e.physicalAxes,this.logicalAxes=e.logicalAxes}active(){return!0}async getContainerForNode(e){const t=await this.cssModel.domModel().getContainerForNode(e,this.name,this.physicalAxes,this.logicalAxes);if(t)return new Ge(t)}}class Ge{containerNode;constructor(e){this.containerNode=e}async getContainerSizeDetails(){const e=await this.containerNode.domModel().cssModel().getComputedStyle(this.containerNode.id);if(!e)return;const t=e.get("container-type"),n=e.get("contain"),r=e.get("writing-mode");if(!t||!n||!r)return;const s=Ke(`${t} ${n}`),i=$e(s,r);let a,o;return"Both"!==i&&"Horizontal"!==i||(a=e.get("width")),"Both"!==i&&"Vertical"!==i||(o=e.get("height")),{queryAxis:s,physicalAxis:i,width:a,height:o}}}const Ke=e=>{const t=e.split(" ");let n=!1,r=!1;for(const e of t){if("size"===e)return"size";n=n||"inline-size"===e,r=r||"block-size"===e}return n&&r?"size":n?"inline-size":r?"block-size":""},$e=(e,t)=>{const n=t.startsWith("vertical");switch(e){case"":return"";case"size":return"Both";case"inline-size":return n?"Vertical":"Horizontal";case"block-size":return n?"Horizontal":"Vertical"}};var Qe=Object.freeze({__proto__:null,CSSContainerQuery:Ve,CSSContainerQueryContainer:Ge,getQueryAxis:Ke,getPhysicalAxisFromQueryAxis:$e});class Xe extends je{static parseLayerPayload(e,t){return t.map((t=>new Xe(e,t)))}constructor(e,t){super(e),this.reinitialize(t)}reinitialize(e){this.text=e.text,this.range=e.range?r.TextRange.TextRange.fromObject(e.range):null,this.styleSheetId=e.styleSheetId}active(){return!0}}var Je=Object.freeze({__proto__:null,CSSLayer:Xe});class Ye{#un;#gn;constructor(e){this.#un=e.active,this.#gn=[];for(let t=0;tnew et(e,t)))}constructor(e,t){super(e),this.reinitialize(t)}reinitialize(e){if(this.text=e.text,this.source=e.source,this.sourceURL=e.sourceURL||"",this.range=e.range?r.TextRange.TextRange.fromObject(e.range):null,this.styleSheetId=e.styleSheetId,this.mediaList=null,e.mediaList){this.mediaList=[];for(let t=0;tnew nt(e,t)))}constructor(e,t){super(e),this.reinitialize(t)}reinitialize(e){this.text=e.text,this.range=e.range?r.TextRange.TextRange.fromObject(e.range):null,this.styleSheetId=e.styleSheetId}active(){return!0}}var rt=Object.freeze({__proto__:null,CSSScope:nt});class st extends je{static parseSupportsPayload(e,t){return t.map((t=>new st(e,t)))}#yn=!0;constructor(e,t){super(e),this.reinitialize(t)}reinitialize(e){this.text=e.text,this.range=e.range?r.TextRange.TextRange.fromObject(e.range):null,this.styleSheetId=e.styleSheetId,this.#yn=e.active}active(){return this.#yn}}var it=Object.freeze({__proto__:null,CSSSupports:st});class at{ownerStyle;index;name;value;important;disabled;parsedOk;implicit;text;range;#yn;#vn;#fn;#In;#kn=[];constructor(e,t,n,s,i,a,o,l,d,c,h){if(this.ownerStyle=e,this.index=t,this.name=n,this.value=s,this.important=i,this.disabled=a,this.parsedOk=o,this.implicit=l,this.text=d,this.range=c?r.TextRange.TextRange.fromObject(c):null,this.#yn=!0,this.#vn=null,this.#fn=null,h&&h.length>0)for(const n of h)this.#kn.push(new at(e,++t,n.name,n.value,i,a,o,!0));else{const r=v().getLonghands(n);for(const n of r||[])this.#kn.push(new at(e,++t,n,"",i,a,o,!0))}}static parsePayload(e,t,n){return new at(e,t,n.name,n.value,n.important||!1,n.disabled||!1,!("parsedOk"in n)||Boolean(n.parsedOk),Boolean(n.implicit),n.text,n.range,n.longhandProperties)}ensureRanges(){if(this.#vn&&this.#fn)return;const e=this.range,t=this.text?new r.Text.Text(this.text):null;if(!e||!t)return;const n=t.value().indexOf(this.name),s=t.value().lastIndexOf(this.value);if(-1===n||-1===s||n>s)return;const i=new r.TextRange.SourceRange(n,this.name.length),a=new r.TextRange.SourceRange(s,this.value.length);function o(e,t,n){return 0===e.startLine&&(e.startColumn+=n,e.endColumn+=n),e.startLine+=t,e.endLine+=t,e}this.#vn=o(t.toTextRange(i),e.startLine,e.startColumn),this.#fn=o(t.toTextRange(a),e.startLine,e.startColumn)}nameRange(){return this.ensureRanges(),this.#vn}valueRange(){return this.ensureRanges(),this.#fn}rebase(e){this.ownerStyle.styleSheetId===e.styleSheetId&&this.range&&(this.range=this.range.rebaseAfterTextEdit(e.oldRange,e.newRange))}setActive(e){this.#yn=e}get propertyText(){return void 0!==this.text?this.text:""===this.name?"":this.name+": "+this.value+(this.important?" !important":"")+";"}activeInStyle(){return this.#yn}trimmedValueWithoutImportant(){const e="!important";return this.value.endsWith(e)?this.value.slice(0,-e.length).trim():this.value.trim()}async setText(n,s,a){if(!this.ownerStyle)throw new Error("No ownerStyle for property");if(!this.ownerStyle.styleSheetId)throw new Error("No owner style id");if(!this.range||!this.ownerStyle.range)throw new Error("Style not editable");if(s&&(i.userMetrics.actionTaken(i.UserMetrics.Action.StyleRuleEdited),this.name.startsWith("--")&&i.userMetrics.actionTaken(i.UserMetrics.Action.CustomPropertyEdited)),a&&n===this.propertyText)return this.ownerStyle.cssModel().domModel().markUndoableState(!s),!0;const o=this.range.relativeTo(this.ownerStyle.range.startLine,this.ownerStyle.range.startColumn),l=this.ownerStyle.cssText?this.detectIndentation(this.ownerStyle.cssText):e.Settings.Settings.instance().moduleSetting("textEditorIndent").get(),d=this.ownerStyle.cssText?l.substring(0,this.ownerStyle.range.endColumn):"",c=new r.Text.Text(this.ownerStyle.cssText||"").replaceRange(o,t.StringUtilities.sprintf(";%s;",n)),h=await at.formatStyle(c,l,d);return this.ownerStyle.setText(h,s)}static async formatStyle(e,t,n){const s=t.substring(n.length)+t;t&&(t="\n"+t);let i="",a="",o="",l=!1,d=!1;const c=r.CodeMirrorUtils.createCssTokenizer();return await c("*{"+e+"}",(function(e,n){if(!l){const r=n?.includes("comment")&&function(e){const t=e.indexOf(":");if(-1===t)return!1;const n=e.substring(2,t).trim();return v().isCSSPropertyName(n)}(e),s=n?.includes("string")||n?.includes("meta")||n?.includes("property")||n?.includes("variableName")&&"variableName.function"!==n;return r?i=i.trimEnd()+t+e:s?(l=!0,o=e):(";"!==e||d)&&(i+=e,e.trim()&&!n?.includes("comment")&&(d=";"!==e)),void("{"!==e||n||(d=!1))}if("}"===e||";"===e){const n=o.trim();return i=i.trimEnd()+t+n+(n.endsWith(":")?" ":"")+e,d=!1,l=!1,void(a="")}if(v().isGridAreaDefiningProperty(a)){const t=b.exec(e);t&&0===t.index&&!o.trimEnd().endsWith("]")&&(o=o.trimEnd()+"\n"+s)}a||":"!==e||(a=o);o+=e})),l&&(i+=o),i=i.substring(2,i.length-1).trimEnd(),i+(t?"\n"+n:"")}detectIndentation(e){const t=e.split("\n");return t.length<2?"":r.TextUtils.Utils.lineIndent(t[1])}setValue(e,t,n,r){const s=this.name+": "+e+(this.important?" !important":"")+";";this.setText(s,t,n).then(r)}async setDisabled(e){if(!this.ownerStyle)return!1;if(e===this.disabled)return!0;if(!this.text)return!0;const t=this.text.trim(),n=e=>e+(e.endsWith(";")?"":";");let r;return r=e?"/* "+n(t)+" */":n(this.text.substring(2,t.length-2).trim()),this.setText(r,!0,!0)}setDisplayedStringForInvalidProperty(e){this.#In=e}getInvalidStringForInvalidProperty(){return this.#In}getLonghandProperties(){return this.#kn}}var ot,lt=Object.freeze({__proto__:null,CSSProperty:at});class dt{#Sn;parentRule;#wn;styleSheetId;range;cssText;#Cn;#Tn;#Rn;#xn;type;constructor(e,t,n,r){this.#Sn=e,this.parentRule=t,this.#Mn(n),this.type=r}rebase(e){if(this.styleSheetId===e.styleSheetId&&this.range)if(e.oldRange.equal(this.range))this.#Mn(e.payload);else{this.range=this.range.rebaseAfterTextEdit(e.oldRange,e.newRange);for(let t=0;t0||!l.validContent)continue;let s=0;for(const i of l.validContent.split(";")){const a=i.trim();if(a){let o,l;const d=a.indexOf(":");-1===d?(o=a,l=""):(o=a.substring(0,d).trim(),l=a.substring(d+1).trim());const c=new r.TextRange.TextRange(e,s,e,s+i.length);this.#wn.push(new at(this,this.#wn.length,o,l,!1,!1,!1,!1,i,c.relativeFrom(t,n)))}s+=i.length+1}}function d(e,t){t.validContent="";for(let n=0;n=0;--e)if(this.allProperties()[e].range)return e+1;return 0}#On(e){const t=this.propertyAt(e);if(t&&t.range)return t.range.collapseToStart();if(!this.range)throw new Error("CSSStyleDeclaration.range is null");return this.range.collapseToEnd()}newBlankProperty(e){e=void 0===e?this.pastLastSourcePropertyIndex():e;return new at(this,e,"","",!1,!1,!0,!1,"",this.#On(e))}setText(e,t){return this.range&&this.styleSheetId?this.#Sn.setStyleText(this.styleSheetId,this.range,e,t):Promise.resolve(!1)}insertPropertyAt(e,t,n,r){this.newBlankProperty(e).setText(t+": "+n+";",!1,!0).then(r)}appendProperty(e,t,n){this.insertPropertyAt(this.allProperties().length,e,t,n)}}!function(e){e.Regular="Regular",e.Inline="Inline",e.Attributes="Attributes"}(ot||(ot={}));var ct=Object.freeze({__proto__:null,CSSStyleDeclaration:dt,get Type(){return ot}});class ht{cssModelInternal;styleSheetId;sourceURL;origin;style;constructor(e,t){if(this.cssModelInternal=e,this.styleSheetId=t.styleSheetId,this.styleSheetId){const e=this.getStyleSheetHeader(this.styleSheetId);this.sourceURL=e.sourceURL}this.origin=t.origin,this.style=new dt(this.cssModelInternal,this,t.style,ot.Regular)}rebase(e){this.styleSheetId===e.styleSheetId&&this.style.rebase(e)}resourceURL(){if(!this.styleSheetId)return t.DevToolsPath.EmptyUrlString;return this.getStyleSheetHeader(this.styleSheetId).resourceURL()}isUserAgent(){return"user-agent"===this.origin}isInjected(){return"injected"===this.origin}isViaInspector(){return"inspector"===this.origin}isRegular(){return"regular"===this.origin}cssModel(){return this.cssModelInternal}getStyleSheetHeader(e){const t=this.cssModelInternal.styleSheetHeaderForId(e);return console.assert(null!==t),t}}class ut{text;range;specificity;constructor(e){this.text=e.text,e.range&&(this.range=r.TextRange.TextRange.fromObject(e.range)),e.specificity&&(this.specificity=e.specificity)}rebase(e){this.range&&(this.range=this.range.rebaseAfterTextEdit(e.oldRange,e.newRange))}}class gt extends ht{selectors;nestingSelectors;media;containerQueries;supports;scopes;layers;wasUsed;constructor(e,t,n){super(e,{origin:t.origin,style:t.style,styleSheetId:t.styleSheetId}),this.reinitializeSelectors(t.selectorList),this.nestingSelectors=t.nestingSelectors,this.media=t.media?et.parseMediaArrayPayload(e,t.media):[],this.containerQueries=t.containerQueries?Ve.parseContainerQueriesPayload(e,t.containerQueries):[],this.scopes=t.scopes?nt.parseScopesPayload(e,t.scopes):[],this.supports=t.supports?st.parseSupportsPayload(e,t.supports):[],this.layers=t.layers?Xe.parseLayerPayload(e,t.layers):[],this.wasUsed=n||!1}static createDummyRule(e,t){const n={selectorList:{text:"",selectors:[{text:t,value:void 0}]},style:{styleSheetId:"0",range:new r.TextRange.TextRange(0,0,0,0),shorthandEntries:[],cssProperties:[]},origin:"inspector"};return new gt(e,n)}reinitializeSelectors(e){this.selectors=[];for(let t=0;te.text)).join(", ")}selectorRange(){const e=this.selectors[0].range,t=this.selectors[this.selectors.length-1].range;return e&&t?new r.TextRange.TextRange(e.startLine,e.startColumn,t.endLine,t.endColumn):null}lineNumberInSource(e){const t=this.selectors[e];if(!t||!t.range||!this.styleSheetId)return 0;return this.getStyleSheetHeader(this.styleSheetId).lineNumberInSource(t.range.startLine)}columnNumberInSource(e){const t=this.selectors[e];if(!t||!t.range||!this.styleSheetId)return;return this.getStyleSheetHeader(this.styleSheetId).columnNumberInSource(t.range.startLine,t.range.startColumn)}rebase(e){if(this.styleSheetId!==e.styleSheetId)return;const t=this.selectorRange();if(t&&t.equal(e.oldRange))this.reinitializeSelectors(e.payload);else for(let t=0;tt.rebase(e))),this.containerQueries.forEach((t=>t.rebase(e))),this.scopes.forEach((t=>t.rebase(e))),this.supports.forEach((t=>t.rebase(e))),super.rebase(e)}}class pt{#Nn;#Fn;constructor(e,t){this.#Nn=new ut(t.animationName),this.#Fn=t.keyframes.map((t=>new mt(e,t)))}name(){return this.#Nn}keyframes(){return this.#Fn}}class mt extends ht{#Bn;constructor(e,t){super(e,{origin:t.origin,style:t.style,styleSheetId:t.styleSheetId}),this.reinitializeKey(t.keyText)}key(){return this.#Bn}reinitializeKey(e){this.#Bn=new ut(e)}rebase(e){this.styleSheetId===e.styleSheetId&&this.#Bn.range&&(e.oldRange.equal(this.#Bn.range)?this.reinitializeKey(e.payload):this.#Bn.rebase(e),super.rebase(e))}setKeyText(e){const t=this.styleSheetId;if(!t)throw"No rule stylesheet id";const n=this.#Bn.range;if(!n)throw"Keyframe key is not editable";return this.cssModelInternal.setKeyframeKey(t,n,e)}}class ft{#Dn;#Un;constructor(e,t){this.#Dn=new ut(t.name),this.#Un=t.tryRules.map((t=>new ht(e,{origin:t.origin,style:t.style,styleSheetId:t.styleSheetId})))}name(){return this.#Dn}tryRules(){return this.#Un}}var bt,yt=Object.freeze({__proto__:null,CSSRule:ht,CSSStyleRule:gt,CSSKeyframesRule:pt,CSSKeyframeRule:mt,CSSPositionFallbackRule:ft});function vt(e){const t=e.match(/var\(\s*(--(?:[\s\w\P{ASCII}-]|\\.)+),?\s*(.*)\s*\)/u);return{variableName:t&&t[1].trim(),fallback:t&&t[2]}}class It{#Sn;#Hn;#qn;#_n;#Fn;#zn;#jn;#Wn;#Vn;#Gn;#Kn;#$n;#Qn;constructor({cssModel:e,node:t,inlinePayload:n,attributesPayload:r,matchedPayload:s,pseudoPayload:i,inheritedPayload:a,inheritedPseudoPayload:o,animationsPayload:l,parentLayoutNodeId:d,positionFallbackRules:c}){this.#Sn=e,this.#Hn=t,this.#qn=new Map,this.#_n=new Map,this.#Fn=[],l&&(this.#Fn=l.map((t=>new pt(e,t)))),this.#Qn=c.map((t=>new ft(e,t))),this.#$n=d,this.#zn=new Map,this.#jn=new Set,s=h(s);for(const e of a)e.matchedCSSRules=h(e.matchedCSSRules);this.#Wn=this.buildMainCascade(n,r,s,a),[this.#Vn,this.#Gn]=this.buildPseudoCascades(i,o),this.#Kn=new Map;for(const e of Array.from(this.#Gn.values()).concat(Array.from(this.#Vn.values())).concat(this.#Wn))for(const t of e.styles())this.#Kn.set(t,e);function h(e){for(const t of e)s(t);const t=[];for(const s of e){const e=t[t.length-1];e&&"user-agent"===s.rule.origin&&"user-agent"===e.rule.origin&&s.rule.selectorList.text===e.rule.selectorList.text&&r(s)===r(e)?n(s,e):t.push(s)}return t;function n(e,t){const n=new Map,r=new Map;for(const e of t.rule.style.shorthandEntries)n.set(e.name,e.value);for(const e of t.rule.style.cssProperties)r.set(e.name,e.value);for(const t of e.rule.style.shorthandEntries)n.set(t.name,t.value);for(const t of e.rule.style.cssProperties)r.set(t.name,t.value);t.rule.style.shorthandEntries=[...n.entries()].map((([e,t])=>({name:e,value:t}))),t.rule.style.cssProperties=[...r.entries()].map((([e,t])=>({name:e,value:t})))}function r(e){return e.rule.media?e.rule.media.map((e=>e.text)).join(", "):null}function s(e){const{matchingSelectors:t,rule:n}=e;"user-agent"===n.origin&&t.length&&(n.selectorList.selectors=n.selectorList.selectors.filter(((e,n)=>t.includes(n))),n.selectorList.text=n.selectorList.selectors.map((e=>e.text)).join(", "),e.matchingSelectors=t.map(((e,t)=>t)))}}}buildMainCascade(e,t,n,r){const s=[],i=[];function a(){if(!t)return;const e=new dt(this.#Sn,null,t,ot.Attributes);this.#zn.set(e,this.#Hn),i.push(e)}if(e&&this.#Hn.nodeType()===Node.ELEMENT_NODE){const t=new dt(this.#Sn,null,e,ot.Inline);this.#zn.set(t,this.#Hn),i.push(t)}let o;for(let e=n.length-1;e>=0;--e){const t=new gt(this.#Sn,n[e].rule);!t.isInjected()&&!t.isUserAgent()||o||(o=!0,a.call(this)),this.#zn.set(t.style,this.#Hn),i.push(t.style),this.addMatchingSelectors(this.#Hn,t,n[e].matchingSelectors)}o||a.call(this),s.push(new kt(this,i,!1));let l=this.#Hn.parentNode;for(let e=0;l&&r&&e=0;--e){const n=new gt(this.#Sn,o[e].rule);this.addMatchingSelectors(l,n,o[e].matchingSelectors),this.containsInherited(n.style)&&(d(i,n.style)||d(this.#jn,n.style)||(this.#zn.set(n.style,l),t.push(n.style),this.#jn.add(n.style)))}l=l.parentNode,s.push(new kt(this,t,!0))}return new St(s);function d(e,t){if(!t.styleSheetId||!t.range)return!1;for(const n of e)if(t.styleSheetId===n.styleSheetId&&n.range&&t.range.equal(n.range))return!0;return!1}}buildSplitCustomHighlightCascades(e,t,n,r){const s=new Map;for(let r=e.length-1;r>=0;--r){const i=this.customHighlightNamesToMatchingSelectorIndices(e[r]);for(const[a,o]of i){const i=new gt(this.#Sn,e[r].rule);this.#zn.set(i.style,t),n&&this.#jn.add(i.style),this.addMatchingSelectors(t,i,o);const l=s.get(a);l?l.push(i.style):s.set(a,[i.style])}}for(const[e,t]of s){const s=new kt(this,t,n,!0),i=r.get(e);i?i.push(s):r.set(e,[s])}}customHighlightNamesToMatchingSelectorIndices(e){const t=new Map;for(let n=0;n=0;--e){const t=new gt(this.#Sn,o[e].rule);a.push(t.style);const s=v().isHighlightPseudoType(n.pseudoType)?this.#Hn:r;this.#zn.set(t.style,s),s&&this.addMatchingSelectors(s,t,o[e].matchingSelectors)}const e=v().isHighlightPseudoType(n.pseudoType),t=new kt(this,a,!1,e);s.set(n.pseudoType,[t])}}if(t){let e=this.#Hn.parentNode;for(let n=0;e&&n=0;--n){const r=new gt(this.#Sn,a[n].rule);t.push(r.style),this.#zn.set(r.style,e),this.#jn.add(r.style),this.addMatchingSelectors(e,r,a[n].matchingSelectors)}const r=v().isHighlightPseudoType(n.pseudoType),i=new kt(this,t,!0,r),o=s.get(n.pseudoType);o?o.push(i):s.set(n.pseudoType,[i])}}e=e.parentNode}}for(const[e,t]of s.entries())n.set(e,new St(t));for(const[e,t]of i.entries())r.set(e,new St(t));return[n,r]}addMatchingSelectors(e,t,n){for(const r of n){const n=t.selectors[r];n&&this.setSelectorMatches(e,n.text,!0)}}node(){return this.#Hn}cssModel(){return this.#Sn}hasMatchingSelectors(e){return this.getMatchingSelectors(e).length>0&&this.queryMatches(e.style)}getParentLayoutNodeId(){return this.#$n}getMatchingSelectors(e){const t=this.nodeForStyle(e.style);if(!t||"number"!=typeof t.id)return[];const n=this.#_n.get(t.id);if(!n)return[];const r=[];for(let t=0;t=0;e--){const t=this.styles[e],n=t.parentRule;if((!n||n instanceof gt)&&(!n||this.#Xn.hasMatchingSelectors(n)))for(const e of t.allProperties()){const n=v();if(this.#Jn&&!this.#Yn&&!n.isPropertyInherited(e.name))continue;if(t.range&&!e.range)continue;if(!e.activeInStyle()){this.propertiesState.set(e,bt.Overloaded);continue}const r=n.canonicalPropertyName(e.name);this.updatePropertyState(e,r);for(const t of e.getLonghandProperties())n.isCSSPropertyName(t.name)&&this.updatePropertyState(t,t.name)}}}updatePropertyState(e,t){const n=this.activeProperties.get(t);!n?.important||e.important?(n&&this.propertiesState.set(n,bt.Overloaded),this.propertiesState.set(e,bt.Active),this.activeProperties.set(t,e)):this.propertiesState.set(e,bt.Overloaded)}}class St{#Zn;#er;#tr;#nr;#rr;#sr;constructor(e){this.#Zn=e,this.#er=new Map,this.#tr=new Map,this.#nr=new Map,this.#rr=!1,this.#sr=new Map;for(const t of e)for(const e of t.styles)this.#sr.set(e,t)}findAvailableCSSVariables(e){const t=this.#sr.get(e);if(!t)return[];this.ensureInitialized();const n=this.#tr.get(t);return n?Array.from(n.keys()):[]}computeCSSVariable(e,t){const n=this.#sr.get(e);if(!n)return null;this.ensureInitialized();const r=this.#tr.get(n),s=this.#nr.get(n);return r&&s?this.innerComputeCSSVariable(r,s,t):null}computeValue(e,t){const n=this.#sr.get(e);if(!n)return null;this.ensureInitialized();const r=this.#tr.get(n),s=this.#nr.get(n);return r&&s?this.innerComputeValue(r,s,t):null}computeSingleVariableValue(e,t){const n=this.#sr.get(e);if(!n)return null;this.ensureInitialized();const r=this.#tr.get(n),s=this.#nr.get(n);if(!r||!s)return null;const i=this.innerComputeValue(r,s,t),{variableName:a}=vt(t);return{computedValue:i,fromFallback:null!==a&&!r.has(a)}}innerComputeCSSVariable(e,t,n){if(!e.has(n))return null;if(t.has(n))return t.get(n)||null;t.set(n,null);const r=e.get(n);if(null==r)return null;const s=this.innerComputeValue(e,t,r);return t.set(n,s),s}innerComputeValue(e,t,n){const s=r.TextUtils.Utils.splitStringByRegexes(n,[f]),i=[];for(const n of s){if(-1===n.regexIndex){i.push(n.value);continue}const{variableName:r,fallback:s}=vt(n.value);if(!r)return null;const a=this.innerComputeCSSVariable(e,t,r);if(null===a&&!s)return null;null===a?i.push(s):i.push(a)}return i.map((e=>e?e.trim():"")).join(" ")}styles(){return Array.from(this.#sr.keys())}propertyState(e){return this.ensureInitialized(),this.#er.get(e)||null}reset(){this.#rr=!1,this.#er.clear(),this.#tr.clear(),this.#nr.clear()}ensureInitialized(){if(this.#rr)return;this.#rr=!0;const e=new Map;for(const t of this.#Zn){t.computeActiveProperties();for(const[n,r]of t.propertiesState){if(r===bt.Overloaded){this.#er.set(n,bt.Overloaded);continue}const t=v().canonicalPropertyName(n.name);e.has(t)?this.#er.set(n,bt.Overloaded):(e.set(t,n),this.#er.set(n,bt.Active))}}for(const[t,n]of e){const r=n.ownerStyle,s=n.getLonghandProperties();if(!s.length)continue;let i=!1;for(const t of s){const n=v().canonicalPropertyName(t.name),s=e.get(n);if(s&&s.ownerStyle===r){i=!0;break}}i||(e.delete(t),this.#er.set(n,bt.Overloaded))}const t=new Map;for(let e=this.#Zn.length-1;e>=0;--e){const n=this.#Zn[e],r=[];for(const e of n.activeProperties.entries()){const n=e[0],s=e[1];n.startsWith("--")&&(t.set(n,s.value),r.push(n))}const s=new Map(t),i=new Map;this.#tr.set(n,s),this.#nr.set(n,i);for(const e of r)t.delete(e),t.set(e,this.innerComputeCSSVariable(s,i,e))}}}!function(e){e.Active="Active",e.Overloaded="Overloaded"}(bt||(bt={}));var wt=Object.freeze({__proto__:null,parseCSSVariableNameAndFallback:vt,CSSMatchedStyles:It,get PropertyState(){return bt}});const Ct={couldNotFindTheOriginalStyle:"Could not find the original style sheet.",thereWasAnErrorRetrievingThe:"There was an error retrieving the source styles."},Tt=s.i18n.registerUIStrings("core/sdk/CSSStyleSheetHeader.ts",Ct),Rt=s.i18n.getLocalizedString.bind(void 0,Tt);class xt{#Sn;id;frameId;sourceURL;hasSourceURL;origin;title;disabled;isInline;isMutable;isConstructed;startLine;startColumn;endLine;endColumn;contentLength;ownerNode;sourceMapURL;loadingFailed;#ir;constructor(e,t){this.#Sn=e,this.id=t.styleSheetId,this.frameId=t.frameId,this.sourceURL=t.sourceURL,this.hasSourceURL=Boolean(t.hasSourceURL),this.origin=t.origin,this.title=t.title,this.disabled=t.disabled,this.isInline=t.isInline,this.isMutable=t.isMutable,this.isConstructed=t.isConstructed,this.startLine=t.startLine,this.startColumn=t.startColumn,this.endLine=t.endLine,this.endColumn=t.endColumn,this.contentLength=t.length,t.ownerNode&&(this.ownerNode=new Rn(e.target(),t.ownerNode)),this.sourceMapURL=t.sourceMapURL,this.loadingFailed=t.loadingFailed??!1,this.#ir=null}originalContentProvider(){if(!this.#ir){const e=async()=>{const e=await this.#Sn.originalStyleSheetText(this);return null===e?{content:null,error:Rt(Ct.couldNotFindTheOriginalStyle),isEncoded:!1}:{content:e,isEncoded:!1}};this.#ir=new r.StaticContentProvider.StaticContentProvider(this.contentURL(),this.contentType(),e)}return this.#ir}setSourceMapURL(e){this.sourceMapURL=e}cssModel(){return this.#Sn}isAnonymousInlineStyleSheet(){return!this.resourceURL()&&!this.#Sn.sourceMapManager().sourceMapForClient(this)}isConstructedByNew(){return this.isConstructed&&0===this.sourceURL.length}resourceURL(){const e=this.isViaInspector()?this.viaInspectorResourceURL():this.sourceURL;return!e&&o.Runtime.experiments.isEnabled(o.Runtime.ExperimentName.STYLES_PANE_CSS_CHANGES)?this.dynamicStyleURL():e}getFrameURLPath(){const t=this.#Sn.target().model(jn);if(console.assert(Boolean(t)),!t)return"";const n=t.frameForId(this.frameId);if(!n)return"";console.assert(Boolean(n));const r=new e.ParsedURL.ParsedURL(n.url);let s=r.host+r.folderPathComponents;return s.endsWith("/")||(s+="/"),s}viaInspectorResourceURL(){return`inspector://${this.getFrameURLPath()}inspector-stylesheet`}dynamicStyleURL(){return`stylesheet://${this.getFrameURLPath()}style#${this.id}`}lineNumberInSource(e){return this.startLine+e}columnNumberInSource(e,t){return(e?0:this.startColumn)+t}containsLocation(e,t){const n=e===this.startLine&&t>=this.startColumn||e>this.startLine,r=ee.isOutermostFrame()));this.#dr=e.length>0?e[0]:null}getFrame(e){const t=this.#or.get(e);return t?t.frame:null}getAllFrames(){return Array.from(this.#or.values(),(e=>e.frame))}getOutermostFrame(){return this.#dr}async getOrWaitForFrame(e,t){const n=this.getFrame(e);return!n||t&&t===n.resourceTreeModel().target()?new Promise((n=>{const r=this.#hr.get(e);r?r.push({notInTarget:t,resolve:n}):this.#hr.set(e,[{notInTarget:t,resolve:n}])})):n}resolveAwaitedFrame(e){const t=this.#hr.get(e.id);if(!t)return;const n=t.filter((({notInTarget:t,resolve:n})=>!(!t||t!==e.resourceTreeModel().target())||(n(e),!1)));n.length>0?this.#hr.set(e.id,n):this.#hr.delete(e.id)}}var Et;!function(e){e.FrameAddedToTarget="FrameAddedToTarget",e.FrameNavigated="FrameNavigated",e.FrameRemoved="FrameRemoved",e.ResourceAdded="ResourceAdded",e.OutermostFrameNavigated="OutermostFrameNavigated"}(Et||(Et={}));var At=Object.freeze({__proto__:null,FrameManager:Lt,get Events(){return Et}});class Ot extends c{constructor(e){super(e)}async read(t,n,r){const s=await this.target().ioAgent().invoke_read({handle:t,offset:r,size:n});if(s.getError())throw new Error(s.getError());return s.eof?null:s.base64Encoded?e.Base64.decode(s.data):s.data}async close(e){(await this.target().ioAgent().invoke_close({handle:e})).getError()&&console.error("Could not close stream.")}async resolveBlob(e){const t=e instanceof Le?e.objectId:e;if(!t)throw new Error("Remote object has undefined objectId");const n=await this.target().ioAgent().invoke_resolveBlob({objectId:t});if(n.getError())throw new Error(n.getError());return`blob:${n.uuid}`}async readToString(e){const t=[],n=new TextDecoder;for(;;){const r=await this.read(e,1048576);if(null===r){t.push(n.decode());break}r instanceof ArrayBuffer?t.push(n.decode(r,{stream:!0})):t.push(r)}return t.join("")}}c.register(Ot,{capabilities:z.IO,autostart:!0});var Nt=Object.freeze({__proto__:null,IOModel:Ot});const Ft={loadCanceledDueToReloadOf:"Load canceled due to reload of inspected page"},Bt=s.i18n.registerUIStrings("core/sdk/PageResourceLoader.ts",Ft),Dt=s.i18n.getLocalizedString.bind(void 0,Bt);let Ut=null;class Ht extends e.ObjectWrapper.ObjectWrapper{#ur;#gr;#pr;#mr;#fr;constructor(e,t){super(),this.#ur=0,this.#gr=t,this.#pr=new Map,this.#mr=[],K.instance().addModelListener(jn,_n.PrimaryPageChanged,this.onPrimaryPageChanged,this),this.#fr=e}static instance({forceNew:e,loadOverride:t,maxConcurrentLoads:n}={forceNew:!1,loadOverride:null,maxConcurrentLoads:500}){return Ut&&!e||(Ut=new Ht(t,n)),Ut}static removeInstance(){Ut=null}onPrimaryPageChanged(e){if(e.data.frame.isOutermostFrame()){for(const{reject:e}of this.#mr)e(new Error(Dt(Ft.loadCanceledDueToReloadOf)));this.#mr=[],this.#pr.clear(),this.dispatchEventToListeners(_t.Update)}}getResourcesLoaded(){return this.#pr}getNumberOfResources(){return{loading:this.#ur,queued:this.#mr.length,resources:this.#pr.size}}async acquireLoadSlot(){if(this.#ur++,this.#ur>this.#gr){const e={resolve:()=>{},reject:()=>{}},t=new Promise(((t,n)=>{e.resolve=t,e.reject=n}));this.#mr.push(e),await t}}releaseLoadSlot(){this.#ur--;const e=this.#mr.shift();e&&e.resolve()}static makeKey(e,t){if(t.frameId)return`${e}-${t.frameId}`;if(t.target)return`${e}-${t.target.id()}`;throw new Error("Invalid initiator")}async loadResource(e,t){const n=Ht.makeKey(e,t),r={success:null,size:null,errorMessage:void 0,url:e,initiator:t};this.#pr.set(n,r),this.dispatchEventToListeners(_t.Update);try{await this.acquireLoadSlot();const n=this.dispatchLoad(e,t),s=await n;if(r.errorMessage=s.errorDescription.message,r.success=s.success,s.success)return r.size=s.content.length,{content:s.content};throw new Error(s.errorDescription.message)}catch(e){throw void 0===r.errorMessage&&(r.errorMessage=e.message),null===r.success&&(r.success=!1),e}finally{this.releaseLoadSlot(),this.dispatchEventToListeners(_t.Update)}}async dispatchLoad(t,n){let r=null;if(this.#fr)return this.#fr(t);const s=new e.ParsedURL.ParsedURL(t),a=qt().get()&&s&&"file"!==s.scheme&&"data"!==s.scheme&&"devtools"!==s.scheme;if(i.userMetrics.developerResourceScheme(this.getDeveloperResourceScheme(s)),a){try{if(n.target){i.userMetrics.developerResourceLoaded(i.UserMetrics.DeveloperResourceLoaded.LoadThroughPageViaTarget);return await this.loadFromTarget(n.target,n.frameId,t)}const e=Lt.instance().getFrame(n.frameId);if(e){i.userMetrics.developerResourceLoaded(i.UserMetrics.DeveloperResourceLoaded.LoadThroughPageViaFrame);return await this.loadFromTarget(e.resourceTreeModel().target(),n.frameId,t)}}catch(e){e instanceof Error&&(i.userMetrics.developerResourceLoaded(i.UserMetrics.DeveloperResourceLoaded.LoadThroughPageFailure),r=e.message)}i.userMetrics.developerResourceLoaded(i.UserMetrics.DeveloperResourceLoaded.LoadThroughPageFallback),console.warn("Fallback triggered",t,n)}else{const e=qt().get()?i.UserMetrics.DeveloperResourceLoaded.FallbackPerProtocol:i.UserMetrics.DeveloperResourceLoaded.FallbackPerOverride;i.userMetrics.developerResourceLoaded(e)}const o=await ue.instance().loadResource(t);return a&&!o.success&&i.userMetrics.developerResourceLoaded(i.UserMetrics.DeveloperResourceLoaded.FallbackFailure),r&&(o.errorDescription.message=`Fetch through target failed: ${r}; Fallback: ${o.errorDescription.message}`),o}getDeveloperResourceScheme(e){if(!e||""===e.scheme)return i.UserMetrics.DeveloperResourceScheme.SchemeUnknown;const t="localhost"===e.host||e.host.endsWith(".localhost");switch(e.scheme){case"file":return i.UserMetrics.DeveloperResourceScheme.SchemeFile;case"data":return i.UserMetrics.DeveloperResourceScheme.SchemeData;case"blob":return i.UserMetrics.DeveloperResourceScheme.SchemeBlob;case"http":return t?i.UserMetrics.DeveloperResourceScheme.SchemeHttpLocalhost:i.UserMetrics.DeveloperResourceScheme.SchemeHttp;case"https":return t?i.UserMetrics.DeveloperResourceScheme.SchemeHttpsLocalhost:i.UserMetrics.DeveloperResourceScheme.SchemeHttps}return i.UserMetrics.DeveloperResourceScheme.SchemeOther}async loadFromTarget(t,n,r){const s=t.model(ne),a=t.model(Ot),o=e.Settings.Settings.instance().moduleSetting("cacheDisabled").get(),l=await s.loadNetworkResource(n,r,{disableCache:o,includeCredentials:!0});try{const e=l.stream?await a.readToString(l.stream):"";return{success:l.success,content:e,errorDescription:{statusCode:l.httpStatusCode||0,netError:l.netError,netErrorName:l.netErrorName,message:i.ResourceLoader.netErrorToMessage(l.netError,l.httpStatusCode,l.netErrorName)||"",urlValid:void 0}}}finally{l.stream&&a.close(l.stream)}}}function qt(){return e.Settings.Settings.instance().createSetting("loadThroughTarget",!0)}var _t;(_t||(_t={})).Update="Update";var zt=Object.freeze({__proto__:null,PageResourceLoader:Ht,getLoadThroughTargetSetting:qt,get Events(){return _t}});function jt(e){return e.startsWith(")]}")&&(e=e.substring(e.indexOf("\n"))),65279===e.charCodeAt(0)&&(e=e.slice(1)),JSON.parse(e)}class Wt{lineNumber;columnNumber;sourceURL;sourceLineNumber;sourceColumnNumber;name;constructor(e,t,n,r,s,i){this.lineNumber=e,this.columnNumber=t,this.sourceURL=n,this.sourceLineNumber=r,this.sourceColumnNumber=s,this.name=i}static compare(e,t){return e.lineNumber!==t.lineNumber?e.lineNumber-t.lineNumber:e.columnNumber-t.columnNumber}}const Vt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Gt=new Map;for(let e=0;e"url"in e))&&e.Console.Console.instance().warn(`SourceMap "${n}" contains unsupported "URL" field in one of its sections.`),this.eachSection(this.parseSources.bind(this))}compiledURL(){return this.#yr}url(){return this.#vr}sourceURLs(){return[...this.#Sr.keys()]}embeddedContentByURL(e){const t=this.#Sr.get(e);return t?t.content:null}findEntry(e,n){const r=this.mappings(),s=t.ArrayUtilities.upperBound(r,void 0,((t,r)=>e-r.lineNumber||n-r.columnNumber));return s?r[s-1]:null}findEntryRanges(e,n){const s=this.mappings(),i=t.ArrayUtilities.upperBound(s,void 0,((t,r)=>e-r.lineNumber||n-r.columnNumber));if(!i)return null;const a=i-1,o=s[a].sourceURL;if(!o)return null;const l=iu-s[t].sourceLineNumber||g-s[t].sourceColumnNumber));if(!p)return null;const m=p=i.length||s[i[a]].sourceLineNumber!==n)return null;const l=i.slice(a,o);if(!l.length)return null;const d=t.ArrayUtilities.lowerBound(l,r,((e,t)=>e-s[t].sourceColumnNumber));return d>=l.length?s[l[l.length-1]]:s[l[d]];function c(e,t){return e-s[t].sourceLineNumber}}findReverseIndices(e,n,r){const s=this.mappings(),i=this.reversedMappings(e),a=t.ArrayUtilities.upperBound(i,void 0,((e,t)=>n-s[t].sourceLineNumber||r-s[t].sourceColumnNumber));let o=a;for(;o>0&&s[i[o-1]].sourceLineNumber===s[i[a-1]].sourceLineNumber&&s[i[o-1]].sourceColumnNumber===s[i[a-1]].sourceColumnNumber;)--o;return i.slice(o,a)}findReverseEntries(e,t,n){const r=this.mappings();return this.findReverseIndices(e,t,n).map((e=>r[e]))}findReverseRanges(e,t,n){const s=this.mappings(),i=this.findReverseIndices(e,t,n),a=[];for(let e=0;e>=1,s?-t:t}reverseMapTextRanges(e,n){const s=this.reversedMappings(e),i=this.mappings();if(0===s.length)return[];let a=t.ArrayUtilities.lowerBound(s,n,(({startLine:e,startColumn:t},n)=>{const{sourceLineNumber:r,sourceColumnNumber:s}=i[n];return e-r||t-s}));for(;a===s.length||a>0&&(i[s[a]].sourceLineNumber>n.startLine||i[s[a]].sourceColumnNumber>n.startColumn);)a--;let o=a+1;for(;o0){const t=e[0];return 0===t?.lineNumber||0===t.columnNumber}return!1}hasIgnoreListHint(e){return this.#Sr.get(e)?.ignoreListHint??!1}findRanges(e,t){const n=this.mappings(),s=[];if(!n.length)return[];let i=null;0===n[0].lineNumber&&0===n[0].columnNumber||!t?.isStartMatching||(i=r.TextRange.TextRange.createUnboundedFromLocation(0,0),s.push(i));for(const{sourceURL:t,lineNumber:a,columnNumber:o}of n){const n=t&&e(t);i||!n?i&&!n&&(i.endLine=a,i.endColumn=o,i=null):(i=r.TextRange.TextRange.createUnboundedFromLocation(a,o),s.push(i))}return s}compatibleForURL(e,t){return this.embeddedContentByURL(e)===t.embeddedContentByURL(e)&&this.hasIgnoreListHint(e)===t.hasIgnoreListHint(e)}}!function(e){e._VLQ_BASE_SHIFT=5,e._VLQ_BASE_MASK=31,e._VLQ_CONTINUATION_MASK=32;e.StringCharIterator=class{string;position;constructor(e){this.string=e,this.position=0}next(){return this.string.charAt(this.position++)}peek(){return this.string.charAt(this.position)}hasNext(){return this.position{const n=new $t(i,a,e);return this.#Rr.get(t)===s&&(s.sourceMap=n,this.#xr.set(n,t),this.dispatchEventToListeners(Qt.SourceMapAttached,{client:t,sourceMap:n})),n}),(n=>{e.Console.Console.instance().warn(`DevTools failed to load source map: ${n.message}`),this.#Rr.get(t)===s&&this.dispatchEventToListeners(Qt.SourceMapFailedToAttach,{client:t})}))}}this.#Rr.set(t,s)}detachSourceMap(e){const t=this.#Rr.get(e);if(!t)return;if(this.#Rr.delete(e),!this.#Tr)return;const{sourceMap:n}=t;n?(this.#xr.delete(n),this.dispatchEventToListeners(Qt.SourceMapDetached,{client:e,sourceMap:n})):this.dispatchEventToListeners(Qt.SourceMapFailedToAttach,{client:e})}dispose(){K.instance().removeEventListener($.InspectedURLChanged,this.inspectedURLChanged,this)}}!function(e){e.SourceMapWillAttach="SourceMapWillAttach",e.SourceMapFailedToAttach="SourceMapFailedToAttach",e.SourceMapAttached="SourceMapAttached",e.SourceMapDetached="SourceMapDetached"}(Qt||(Qt={}));var Yt,Zt=Object.freeze({__proto__:null,SourceMapManager:Jt,get Events(){return Qt}});class en extends c{agent;#Mr;#Pr;#Lr;#Er;#Ar;#Or;#Nr;#Fr;#Br;#Dr;#Ur;#Hr;#qr;#Tr;#_r;#zr;constructor(t){super(t),this.#Tr=!1,this.#Dr=null,this.#Ur=null,this.#Mr=t.model(Pn),this.#Ar=new Jt(t),this.agent=t.cssAgent(),this.#Or=new an(this),this.#Er=t.model(jn),this.#Er&&this.#Er.addEventListener(_n.PrimaryPageChanged,this.onPrimaryPageChanged,this),t.registerCSSDispatcher(new sn(this)),t.suspended()||this.enable(),this.#Br=new Map,this.#Fr=new Map,this.#Lr=new Map,this.#_r=!1,this.#Pr=new Map,this.#Hr=null,this.#qr=!1,this.#zr=!1,this.#Nr=new e.Throttler.Throttler(dn),this.#Ar.setEnabled(e.Settings.Settings.instance().moduleSetting("cssSourceMapsEnabled").get()),e.Settings.Settings.instance().moduleSetting("cssSourceMapsEnabled").addChangeListener((e=>this.#Ar.setEnabled(e.data)))}headersForSourceURL(e){const t=[];for(const n of this.getStyleSheetIdsForURL(e)){const e=this.styleSheetHeaderForId(n);e&&t.push(e)}return t}createRawLocationsByURL(e,n,r=0){const s=this.headersForSourceURL(e);s.sort((function(e,t){return e.startLine-t.startLine||e.startColumn-t.startColumn||e.id.localeCompare(t.id)}));const i=t.ArrayUtilities.upperBound(s,void 0,((e,t)=>n-t.startLine||r-t.startColumn));if(!i)return[];const a=[],o=s[i-1];for(let e=i-1;e>=0&&s[e].startLine===o.startLine&&s[e].startColumn===o.startColumn;--e)s[e].containsLocation(n,r)&&a.push(new rn(s[e],n,r));return a}sourceMapManager(){return this.#Ar}static readableLayerName(e){return e||""}static trimSourceURL(e){let t=e.lastIndexOf("/*# sourceURL=");if(-1===t&&(t=e.lastIndexOf("/*@ sourceURL="),-1===t))return e;const n=e.lastIndexOf("\n",t);if(-1===n)return e;const r=e.substr(n+1).split("\n",1)[0];return-1===r.search(/[\040\t]*\/\*[#@] sourceURL=[\040\t]*([^\s]*)[\040\t]*\*\/[\040\t]*$/)?e:e.substr(0,n)+e.substr(n+r.length+1)}domModel(){return this.#Mr}async setStyleText(e,t,n,r){try{await this.ensureOriginalStyleSheetText(e);const{styles:s}=await this.agent.invoke_setStyleTexts({edits:[{styleSheetId:e,range:t.serializeToObject(),text:n}]});if(!s||1!==s.length)return!1;this.#Mr.markUndoableState(!r);const i=new nn(e,t,n,s[0]);return this.fireStyleSheetChanged(e,i),!0}catch(e){return!1}}async setSelectorText(e,t,n){i.userMetrics.actionTaken(i.UserMetrics.Action.StyleRuleEdited);try{await this.ensureOriginalStyleSheetText(e);const{selectorList:r}=await this.agent.invoke_setRuleSelector({styleSheetId:e,range:t,selector:n});if(!r)return!1;this.#Mr.markUndoableState();const s=new nn(e,t,n,r);return this.fireStyleSheetChanged(e,s),!0}catch(e){return!1}}async setKeyframeKey(e,t,n){i.userMetrics.actionTaken(i.UserMetrics.Action.StyleRuleEdited);try{await this.ensureOriginalStyleSheetText(e);const{keyText:r}=await this.agent.invoke_setKeyframeKey({styleSheetId:e,range:t,keyText:n});if(!r)return!1;this.#Mr.markUndoableState();const s=new nn(e,t,n,r);return this.fireStyleSheetChanged(e,s),!0}catch(e){return!1}}startCoverage(){return this.#_r=!0,this.agent.invoke_startRuleUsageTracking()}async takeCoverageDelta(){const e=await this.agent.invoke_takeCoverageDelta();return{timestamp:e&&e.timestamp||0,coverage:e&&e.coverage||[]}}setLocalFontsEnabled(e){return this.agent.invoke_setLocalFontsEnabled({enabled:e})}async stopCoverage(){this.#_r=!1,await this.agent.invoke_stopRuleUsageTracking()}async getMediaQueries(){const{medias:e}=await this.agent.invoke_getMediaQueries();return e?et.parseMediaArrayPayload(this,e):[]}async getRootLayer(e){const{rootLayer:t}=await this.agent.invoke_getLayersForNode({nodeId:e});return t}isEnabled(){return this.#Tr}async enable(){await this.agent.invoke_enable(),this.#Tr=!0,this.#_r&&await this.startCoverage(),this.dispatchEventToListeners(Yt.ModelWasEnabled)}async getMatchedStyles(e){const t=await this.agent.invoke_getMatchedStylesForNode({nodeId:e});if(t.getError())return null;const n=this.#Mr.nodeForId(e);return n?new It({cssModel:this,node:n,inlinePayload:t.inlineStyle||null,attributesPayload:t.attributesStyle||null,matchedPayload:t.matchedCSSRules||[],pseudoPayload:t.pseudoElements||[],inheritedPayload:t.inherited||[],inheritedPseudoPayload:t.inheritedPseudoElements||[],animationsPayload:t.cssKeyframesRules||[],parentLayoutNodeId:t.parentLayoutNodeId,positionFallbackRules:t.cssPositionFallbackRules||[]}):null}async getClassNames(e){const{classNames:t}=await this.agent.invoke_collectClassNames({styleSheetId:e});return t||[]}async getComputedStyle(e){return this.isEnabled()||await this.enable(),this.#Or.computedStylePromise(e)}async getBackgroundColors(e){const t=await this.agent.invoke_getBackgroundColors({nodeId:e});return t.getError()?null:{backgroundColors:t.backgroundColors||null,computedFontSize:t.computedFontSize||"",computedFontWeight:t.computedFontWeight||""}}async getPlatformFonts(e){const{fonts:t}=await this.agent.invoke_getPlatformFontsForNode({nodeId:e});return t}allStyleSheets(){const e=[...this.#Br.values()];return e.sort((function(e,t){return e.sourceURLt.sourceURL?1:e.startLine-t.startLine||e.startColumn-t.startColumn})),e}async getInlineStyles(e){const t=await this.agent.invoke_getInlineStylesForNode({nodeId:e});if(t.getError()||!t.inlineStyle)return null;const n=new dt(this,null,t.inlineStyle,ot.Inline),r=t.attributesStyle?new dt(this,null,t.attributesStyle,ot.Attributes):null;return new on(n,r)}forcePseudoState(e,n,r){const s=e.marker(tn)||[],i=s.includes(n);if(r){if(i)return!1;s.push(n),e.setMarker(tn,s)}else{if(!i)return!1;t.ArrayUtilities.removeElement(s,n),s.length?e.setMarker(tn,s):e.setMarker(tn,null)}return void 0!==e.id&&(this.agent.invoke_forcePseudoState({nodeId:e.id,forcedPseudoClasses:s}),this.dispatchEventToListeners(Yt.PseudoStateForced,{node:e,pseudoClass:n,enable:r}),!0)}pseudoState(e){return e.marker(tn)||[]}async setMediaText(e,t,n){i.userMetrics.actionTaken(i.UserMetrics.Action.StyleRuleEdited);try{await this.ensureOriginalStyleSheetText(e);const{media:r}=await this.agent.invoke_setMediaText({styleSheetId:e,range:t,text:n});if(!r)return!1;this.#Mr.markUndoableState();const s=new nn(e,t,n,r);return this.fireStyleSheetChanged(e,s),!0}catch(e){return!1}}async setContainerQueryText(e,t,n){i.userMetrics.actionTaken(i.UserMetrics.Action.StyleRuleEdited);try{await this.ensureOriginalStyleSheetText(e);const{containerQuery:r}=await this.agent.invoke_setContainerQueryText({styleSheetId:e,range:t,text:n});if(!r)return!1;this.#Mr.markUndoableState();const s=new nn(e,t,n,r);return this.fireStyleSheetChanged(e,s),!0}catch(e){return!1}}async setSupportsText(e,t,n){i.userMetrics.actionTaken(i.UserMetrics.Action.StyleRuleEdited);try{await this.ensureOriginalStyleSheetText(e);const{supports:r}=await this.agent.invoke_setSupportsText({styleSheetId:e,range:t,text:n});if(!r)return!1;this.#Mr.markUndoableState();const s=new nn(e,t,n,r);return this.fireStyleSheetChanged(e,s),!0}catch(e){return!1}}async setScopeText(e,t,n){i.userMetrics.actionTaken(i.UserMetrics.Action.StyleRuleEdited);try{await this.ensureOriginalStyleSheetText(e);const{scope:r}=await this.agent.invoke_setScopeText({styleSheetId:e,range:t,text:n});if(!r)return!1;this.#Mr.markUndoableState();const s=new nn(e,t,n,r);return this.fireStyleSheetChanged(e,s),!0}catch(e){return console.error(e),!1}}async addRule(e,t,n){try{await this.ensureOriginalStyleSheetText(e);const{rule:r}=await this.agent.invoke_addRule({styleSheetId:e,ruleText:t,location:n});if(!r)return null;this.#Mr.markUndoableState();const s=new nn(e,n,t,r);return this.fireStyleSheetChanged(e,s),new gt(this,r)}catch(e){return null}}async requestViaInspectorStylesheet(e){const t=e.frameId()||(this.#Er&&this.#Er.mainFrame?this.#Er.mainFrame.id:null),n=[...this.#Br.values()].find((e=>e.frameId===t&&e.isViaInspector()));if(n)return n;if(!t)return null;try{const{styleSheetId:e}=await this.agent.invoke_createStyleSheet({frameId:t});return e&&this.#Br.get(e)||null}catch(e){return null}}mediaQueryResultChanged(){this.dispatchEventToListeners(Yt.MediaQueryResultChanged)}fontsUpdated(e){e&&this.#Pr.set(e.src,new _e(e)),this.dispatchEventToListeners(Yt.FontsUpdated)}fontFaces(){return[...this.#Pr.values()]}fontFaceForSource(e){return this.#Pr.get(e)}styleSheetHeaderForId(e){return this.#Br.get(e)||null}styleSheetHeaders(){return[...this.#Br.values()]}fireStyleSheetChanged(e,t){this.dispatchEventToListeners(Yt.StyleSheetChanged,{styleSheetId:e,edit:t})}ensureOriginalStyleSheetText(e){const t=this.styleSheetHeaderForId(e);if(!t)return Promise.resolve(null);let n=this.#Lr.get(t);return n||(n=this.getStyleSheetText(t.id),this.#Lr.set(t,n),this.originalContentRequestedForTest(t)),n}originalContentRequestedForTest(e){}originalStyleSheetText(e){return this.ensureOriginalStyleSheetText(e.id)}getAllStyleSheetHeaders(){return this.#Br.values()}styleSheetAdded(e){console.assert(!this.#Br.get(e.styleSheetId)),e.loadingFailed&&(e.hasSourceURL=!1,e.isConstructed=!0,e.isInline=!1,e.isMutable=!1,e.sourceURL="",e.sourceMapURL=void 0);const t=new xt(this,e);this.#Br.set(e.styleSheetId,t);const n=t.resourceURL();let r=this.#Fr.get(n);if(r||(r=new Map,this.#Fr.set(n,r)),r){let e=r.get(t.frameId);e||(e=new Set,r.set(t.frameId,e)),e.add(t.id)}this.#Ar.attachSourceMap(t,t.sourceURL,t.sourceMapURL),this.dispatchEventToListeners(Yt.StyleSheetAdded,t)}styleSheetRemoved(e){const t=this.#Br.get(e);if(console.assert(Boolean(t)),!t)return;this.#Br.delete(e);const n=t.resourceURL(),r=this.#Fr.get(n);if(console.assert(Boolean(r),"No frameId to styleSheetId map is available for given style sheet URL."),r){const s=r.get(t.frameId);s&&(s.delete(e),s.size||(r.delete(t.frameId),r.size||this.#Fr.delete(n)))}this.#Lr.delete(t),this.#Ar.detachSourceMap(t),this.dispatchEventToListeners(Yt.StyleSheetRemoved,t)}getStyleSheetIdsForURL(e){const t=this.#Fr.get(e);if(!t)return[];const n=[];for(const e of t.values())n.push(...e);return n}async setStyleSheetText(e,t,n){const r=this.#Br.get(e);if(!r)return"Unknown stylesheet in CSS.setStyleSheetText";t=en.trimSourceURL(t),r.hasSourceURL&&(t+="\n/*# sourceURL="+r.sourceURL+" */"),await this.ensureOriginalStyleSheetText(e);const s=(await this.agent.invoke_setStyleSheetText({styleSheetId:r.id,text:t})).sourceMapURL;return this.#Ar.detachSourceMap(r),r.setSourceMapURL(s),this.#Ar.attachSourceMap(r,r.sourceURL,r.sourceMapURL),null===s?"Error in CSS.setStyleSheetText":(this.#Mr.markUndoableState(!n),this.fireStyleSheetChanged(e),null)}async getStyleSheetText(e){try{const{text:t}=await this.agent.invoke_getStyleSheetText({styleSheetId:e});return t&&en.trimSourceURL(t)}catch(e){return null}}async onPrimaryPageChanged(e){e.data.frame.backForwardCacheDetails.restoredFromCache?(await this.suspendModel(),await this.resumeModel()):(this.resetStyleSheets(),this.resetFontFaces())}resetStyleSheets(){const e=[...this.#Br.values()];this.#Fr.clear(),this.#Br.clear();for(const t of e)this.#Ar.detachSourceMap(t),this.dispatchEventToListeners(Yt.StyleSheetRemoved,t)}resetFontFaces(){this.#Pr.clear()}async suspendModel(){this.#Tr=!1,await this.agent.invoke_disable(),this.resetStyleSheets(),this.resetFontFaces()}async resumeModel(){return this.enable()}setEffectivePropertyValueForNode(e,t,n){this.agent.invoke_setEffectivePropertyValueForNode({nodeId:e,propertyName:t,value:n})}cachedMatchedCascadeForNode(e){if(this.#Dr!==e&&this.discardCachedMatchedCascade(),this.#Dr=e,!this.#Ur){if(!e.id)return Promise.resolve(null);this.#Ur=this.getMatchedStyles(e.id)}return this.#Ur}discardCachedMatchedCascade(){this.#Dr=null,this.#Ur=null}createCSSPropertyTracker(e){return new ln(this,e)}enableCSSPropertyTracker(e){const t=e.getTrackedProperties();0!==t.length&&(this.agent.invoke_trackComputedStyleUpdates({propertiesToTrack:t}),this.#qr=!0,this.#Hr=e,this.pollComputedStyleUpdates())}disableCSSPropertyTracker(){this.#qr=!1,this.#Hr=null,this.agent.invoke_trackComputedStyleUpdates({propertiesToTrack:[]})}async pollComputedStyleUpdates(){if(!this.#zr){if(this.#qr){this.#zr=!0;const e=await this.agent.invoke_takeComputedStyleUpdates();if(this.#zr=!1,e.getError()||!e.nodeIds||!this.#qr)return;this.#Hr&&this.#Hr.dispatchEventToListeners(cn.TrackedCSSPropertiesUpdated,e.nodeIds.map((e=>this.#Mr.nodeForId(e))))}this.#qr&&this.#Nr.schedule(this.pollComputedStyleUpdates.bind(this))}}dispose(){this.disableCSSPropertyTracker(),super.dispose(),this.#Ar.dispose()}getAgent(){return this.agent}}!function(e){e.FontsUpdated="FontsUpdated",e.MediaQueryResultChanged="MediaQueryResultChanged",e.ModelWasEnabled="ModelWasEnabled",e.PseudoStateForced="PseudoStateForced",e.StyleSheetAdded="StyleSheetAdded",e.StyleSheetChanged="StyleSheetChanged",e.StyleSheetRemoved="StyleSheetRemoved"}(Yt||(Yt={}));const tn="pseudo-state-marker";class nn{styleSheetId;oldRange;newRange;newText;payload;constructor(e,t,n,s){this.styleSheetId=e,this.oldRange=t,this.newRange=r.TextRange.TextRange.fromEdit(t,n),this.newText=n,this.payload=s}}class rn{#Sn;styleSheetId;url;lineNumber;columnNumber;constructor(e,t,n){this.#Sn=e.cssModel(),this.styleSheetId=e.id,this.url=e.resourceURL(),this.lineNumber=t,this.columnNumber=n||0}cssModel(){return this.#Sn}header(){return this.#Sn.styleSheetHeaderForId(this.styleSheetId)}}class sn{#jr;constructor(e){this.#jr=e}mediaQueryResultChanged(){this.#jr.mediaQueryResultChanged()}fontsUpdated({font:e}){this.#jr.fontsUpdated(e)}styleSheetChanged({styleSheetId:e}){this.#jr.fireStyleSheetChanged(e)}styleSheetAdded({header:e}){this.#jr.styleSheetAdded(e)}styleSheetRemoved({styleSheetId:e}){this.#jr.styleSheetRemoved(e)}}class an{#jr;#Wr;constructor(e){this.#jr=e,this.#Wr=new Map}computedStylePromise(e){let t=this.#Wr.get(e);return t||(t=this.#jr.getAgent().invoke_getComputedStyleForNode({nodeId:e}).then((({computedStyle:t})=>{if(this.#Wr.delete(e),!t||!t.length)return null;const n=new Map;for(const e of t)n.set(e.name,e.value);return n})),this.#Wr.set(e,t),t)}}class on{inlineStyle;attributesStyle;constructor(e,t){this.inlineStyle=e,this.attributesStyle=t}}class ln extends e.ObjectWrapper.ObjectWrapper{#jr;#Vr;constructor(e,t){super(),this.#jr=e,this.#Vr=t}start(){this.#jr.enableCSSPropertyTracker(this)}stop(){this.#jr.disableCSSPropertyTracker()}getTrackedProperties(){return this.#Vr}}const dn=1e3;var cn;!function(e){e.TrackedCSSPropertiesUpdated="TrackedCSSPropertiesUpdated"}(cn||(cn={})),c.register(en,{capabilities:z.DOM,autostart:!0});var hn=Object.freeze({__proto__:null,CSSModel:en,get Events(){return Yt},Edit:nn,CSSLocation:rn,InlineStyleResult:on,CSSPropertyTracker:ln,get CSSPropertyTrackerEvents(){return cn}});class un{#Gr;#Kr;constructor(){const t="rgba";this.#Gr=[new e.Color.Legacy([.9607843137254902,.592156862745098,.5803921568627451,1],t),new e.Color.Legacy([.9411764705882353,.7490196078431373,.2980392156862745,1],t),new e.Color.Legacy([.8313725490196079,.9294117647058824,.19215686274509805,1],t),new e.Color.Legacy([.6196078431372549,.9215686274509803,.2784313725490196,1],t),new e.Color.Legacy([.3568627450980392,.8196078431372549,.8431372549019608,1],t),new e.Color.Legacy([.7372549019607844,.807843137254902,.984313725490196,1],t),new e.Color.Legacy([.7764705882352941,.7450980392156863,.9333333333333333,1],t),new e.Color.Legacy([.8156862745098039,.5803921568627451,.9176470588235294,1],t),new e.Color.Legacy([.9215686274509803,.5803921568627451,.8117647058823529,1],t)],this.#Kr=0}next(){const e=this.#Gr[this.#Kr];return this.#Kr++,this.#Kr>=this.#Gr.length&&(this.#Kr=0),e}}var gn=Object.freeze({__proto__:null,OverlayColorGenerator:un});class pn{#$r;#Qr;#Xr;#Jr;#Yr;#Zr;#Gr;#es;#ts;#ns;#rs;#ss;#is;#as;constructor(t,n=!0){this.#$r=t,this.#Qr=new Map,this.#Xr=new Map,this.#Jr=new Map,this.#Yr=new Map,this.#Zr=new Map,this.#Gr=new Map,this.#es=new un,this.#ts=new un,this.#ns=n,this.#rs=e.Settings.Settings.instance().moduleSetting("showGridLineLabels"),this.#rs.addChangeListener(this.onSettingChange,this),this.#ss=e.Settings.Settings.instance().moduleSetting("extendGridLines"),this.#ss.addChangeListener(this.onSettingChange,this),this.#is=e.Settings.Settings.instance().moduleSetting("showGridAreas"),this.#is.addChangeListener(this.onSettingChange,this),this.#as=e.Settings.Settings.instance().moduleSetting("showGridTrackSizes"),this.#as.addChangeListener(this.onSettingChange,this)}onSettingChange(){this.resetOverlay()}buildGridHighlightConfig(e){const t=this.colorOfGrid(e).asLegacyColor(),n=t.setAlpha(.1).asLegacyColor(),r=t.setAlpha(.3).asLegacyColor(),s=t.setAlpha(.8).asLegacyColor(),i=this.#ss.get(),a="lineNumbers"===this.#rs.get(),o=a,l="lineNames"===this.#rs.get();return{rowGapColor:r.toProtocolRGBA(),rowHatchColor:s.toProtocolRGBA(),columnGapColor:r.toProtocolRGBA(),columnHatchColor:s.toProtocolRGBA(),gridBorderColor:t.toProtocolRGBA(),gridBorderDash:!1,rowLineColor:t.toProtocolRGBA(),columnLineColor:t.toProtocolRGBA(),rowLineDash:!0,columnLineDash:!0,showGridExtensionLines:i,showPositiveLineNumbers:a,showNegativeLineNumbers:o,showLineNames:l,showAreaNames:this.#is.get(),showTrackSizes:this.#as.get(),areaBorderColor:t.toProtocolRGBA(),gridBackgroundColor:n.toProtocolRGBA()}}buildFlexContainerHighlightConfig(e){const t=this.colorOfFlex(e).asLegacyColor();return{containerBorder:{color:t.toProtocolRGBA(),pattern:"dashed"},itemSeparator:{color:t.toProtocolRGBA(),pattern:"dotted"},lineSeparator:{color:t.toProtocolRGBA(),pattern:"dashed"},mainDistributedSpace:{hatchColor:t.toProtocolRGBA()},crossDistributedSpace:{hatchColor:t.toProtocolRGBA()}}}buildScrollSnapContainerHighlightConfig(t){return{snapAreaBorder:{color:e.Color.PageHighlight.GridBorder.toProtocolRGBA(),pattern:"dashed"},snapportBorder:{color:e.Color.PageHighlight.GridBorder.toProtocolRGBA()},scrollMarginColor:e.Color.PageHighlight.Margin.toProtocolRGBA(),scrollPaddingColor:e.Color.PageHighlight.Padding.toProtocolRGBA()}}highlightGridInOverlay(e){this.#Qr.set(e,this.buildGridHighlightConfig(e)),this.updateHighlightsInOverlay()}isGridHighlighted(e){return this.#Qr.has(e)}colorOfGrid(e){let t=this.#Gr.get(e);return t||(t=this.#es.next(),this.#Gr.set(e,t)),t}setColorOfGrid(e,t){this.#Gr.set(e,t)}hideGridInOverlay(e){this.#Qr.has(e)&&(this.#Qr.delete(e),this.updateHighlightsInOverlay())}highlightScrollSnapInOverlay(e){this.#Xr.set(e,this.buildScrollSnapContainerHighlightConfig(e)),this.updateHighlightsInOverlay()}isScrollSnapHighlighted(e){return this.#Xr.has(e)}hideScrollSnapInOverlay(e){this.#Xr.has(e)&&(this.#Xr.delete(e),this.updateHighlightsInOverlay())}highlightFlexInOverlay(e){this.#Jr.set(e,this.buildFlexContainerHighlightConfig(e)),this.updateHighlightsInOverlay()}isFlexHighlighted(e){return this.#Jr.has(e)}colorOfFlex(e){let t=this.#Gr.get(e);return t||(t=this.#ts.next(),this.#Gr.set(e,t)),t}setColorOfFlex(e,t){this.#Gr.set(e,t)}hideFlexInOverlay(e){this.#Jr.has(e)&&(this.#Jr.delete(e),this.updateHighlightsInOverlay())}highlightContainerQueryInOverlay(e){this.#Yr.set(e,this.buildContainerQueryContainerHighlightConfig()),this.updateHighlightsInOverlay()}hideContainerQueryInOverlay(e){this.#Yr.has(e)&&(this.#Yr.delete(e),this.updateHighlightsInOverlay())}isContainerQueryHighlighted(e){return this.#Yr.has(e)}buildContainerQueryContainerHighlightConfig(){return{containerBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"},descendantBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"}}}highlightIsolatedElementInOverlay(e){this.#Zr.set(e,this.buildIsolationModeHighlightConfig()),this.updateHighlightsInOverlay()}hideIsolatedElementInOverlay(e){this.#Zr.has(e)&&(this.#Zr.delete(e),this.updateHighlightsInOverlay())}isIsolatedElementHighlighted(e){return this.#Zr.has(e)}buildIsolationModeHighlightConfig(){return{resizerColor:e.Color.IsolationModeHighlight.Resizer.toProtocolRGBA(),resizerHandleColor:e.Color.IsolationModeHighlight.ResizerHandle.toProtocolRGBA(),maskColor:e.Color.IsolationModeHighlight.Mask.toProtocolRGBA()}}hideAllInOverlay(){this.#Jr.clear(),this.#Qr.clear(),this.#Xr.clear(),this.#Yr.clear(),this.#Zr.clear(),this.updateHighlightsInOverlay()}refreshHighlights(){const e=this.updateHighlightsForDeletedNodes(this.#Qr),t=this.updateHighlightsForDeletedNodes(this.#Jr),n=this.updateHighlightsForDeletedNodes(this.#Xr),r=this.updateHighlightsForDeletedNodes(this.#Yr),s=this.updateHighlightsForDeletedNodes(this.#Zr);(t||e||n||r||s)&&this.updateHighlightsInOverlay()}updateHighlightsForDeletedNodes(e){let t=!1;for(const n of e.keys())null===this.#$r.getDOMModel().nodeForId(n)&&(e.delete(n),t=!0);return t}resetOverlay(){for(const e of this.#Qr.keys())this.#Qr.set(e,this.buildGridHighlightConfig(e));for(const e of this.#Jr.keys())this.#Jr.set(e,this.buildFlexContainerHighlightConfig(e));for(const e of this.#Xr.keys())this.#Xr.set(e,this.buildScrollSnapContainerHighlightConfig(e));for(const e of this.#Yr.keys())this.#Yr.set(e,this.buildContainerQueryContainerHighlightConfig());for(const e of this.#Zr.keys())this.#Zr.set(e,this.buildIsolationModeHighlightConfig());this.updateHighlightsInOverlay()}updateHighlightsInOverlay(){const e=this.#Qr.size>0||this.#Jr.size>0||this.#Yr.size>0||this.#Zr.size>0;this.#$r.setShowViewportSizeOnResize(!e),this.updateGridHighlightsInOverlay(),this.updateFlexHighlightsInOverlay(),this.updateScrollSnapHighlightsInOverlay(),this.updateContainerQueryHighlightsInOverlay(),this.updateIsolatedElementHighlightsInOverlay()}updateGridHighlightsInOverlay(){const e=this.#$r,t=[];for(const[e,n]of this.#Qr.entries())t.push({nodeId:e,gridHighlightConfig:n});e.target().overlayAgent().invoke_setShowGridOverlays({gridNodeHighlightConfigs:t})}updateFlexHighlightsInOverlay(){if(!this.#ns)return;const e=this.#$r,t=[];for(const[e,n]of this.#Jr.entries())t.push({nodeId:e,flexContainerHighlightConfig:n});e.target().overlayAgent().invoke_setShowFlexOverlays({flexNodeHighlightConfigs:t})}updateScrollSnapHighlightsInOverlay(){const e=this.#$r,t=[];for(const[e,n]of this.#Xr.entries())t.push({nodeId:e,scrollSnapContainerHighlightConfig:n});e.target().overlayAgent().invoke_setShowScrollSnapOverlays({scrollSnapHighlightConfigs:t})}updateContainerQueryHighlightsInOverlay(){const e=this.#$r,t=[];for(const[e,n]of this.#Yr.entries())t.push({nodeId:e,containerQueryContainerHighlightConfig:n});e.target().overlayAgent().invoke_setShowContainerQueryOverlays({containerQueryHighlightConfigs:t})}updateIsolatedElementHighlightsInOverlay(){const e=this.#$r,t=[];for(const[e,n]of this.#Zr.entries())t.push({nodeId:e,isolationModeHighlightConfig:n});e.target().overlayAgent().invoke_setShowIsolatedElements({isolatedElementHighlightConfigs:t})}}var mn=Object.freeze({__proto__:null,OverlayPersistentHighlighter:pn});const fn={pausedInDebugger:"Paused in debugger"},bn=s.i18n.registerUIStrings("core/sdk/OverlayModel.ts",fn),yn=s.i18n.getLocalizedString.bind(void 0,bn);class vn extends c{#Mr;overlayAgent;#os;#ls;#ds;#cs;#hs;#us;#gs;#ps;#ms;#fs;#bs;#ys;#vs;#Is;#ks;#Ss;#ws;constructor(t){super(t),this.#Mr=t.model(Pn),t.registerOverlayDispatcher(this),this.overlayAgent=t.overlayAgent(),this.#os=t.model(or),this.#os&&(e.Settings.Settings.instance().moduleSetting("disablePausedStateOverlay").addChangeListener(this.updatePausedInDebuggerMessage,this),this.#os.addEventListener(cr.DebuggerPaused,this.updatePausedInDebuggerMessage,this),this.#os.addEventListener(cr.DebuggerResumed,this.updatePausedInDebuggerMessage,this),this.#os.addEventListener(cr.GlobalObjectCleared,this.updatePausedInDebuggerMessage,this)),this.#ls=!1,this.#ds=null,this.#cs=new kn(this),this.#hs=this.#cs,this.#us=e.Settings.Settings.instance().moduleSetting("showPaintRects"),this.#gs=e.Settings.Settings.instance().moduleSetting("showLayoutShiftRegions"),this.#ps=e.Settings.Settings.instance().moduleSetting("showAdHighlights"),this.#ms=e.Settings.Settings.instance().moduleSetting("showDebugBorders"),this.#fs=e.Settings.Settings.instance().moduleSetting("showFPSCounter"),this.#bs=e.Settings.Settings.instance().moduleSetting("showScrollBottleneckRects"),this.#ys=e.Settings.Settings.instance().moduleSetting("showWebVitals"),this.#vs=[],this.#Is=!0,t.suspended()||(this.overlayAgent.invoke_enable(),this.wireAgentToSettings()),this.#ks=new pn(this),this.#Mr.addEventListener(wn.NodeRemoved,(()=>{this.#ks&&this.#ks.refreshHighlights()})),this.#Mr.addEventListener(wn.DocumentUpdated,(()=>{this.#ks&&this.#ks.hideAllInOverlay()})),this.#Ss=new Sn(this),this.#ws=!1}static highlightObjectAsDOMNode(e){const t=e.runtimeModel().target().model(Pn);t&&t.overlayModel().highlightInOverlay({object:e,selectorList:void 0})}static hideDOMNodeHighlight(){for(const e of K.instance().models(vn))e.delayedHideHighlight(0)}static async muteHighlight(){return Promise.all(K.instance().models(vn).map((e=>e.suspendModel())))}static async unmuteHighlight(){return Promise.all(K.instance().models(vn).map((e=>e.resumeModel())))}static highlightRect(e){for(const t of K.instance().models(vn))t.highlightRect(e)}static clearHighlight(){for(const e of K.instance().models(vn))e.clearHighlight()}getDOMModel(){return this.#Mr}highlightRect({x:e,y:t,width:n,height:r,color:s,outlineColor:i}){const a=s||{r:255,g:0,b:255,a:.3},o=i||{r:255,g:0,b:255,a:.5};return this.overlayAgent.invoke_highlightRect({x:e,y:t,width:n,height:r,color:a,outlineColor:o})}clearHighlight(){return this.overlayAgent.invoke_hideHighlight()}async wireAgentToSettings(){this.#vs=[this.#us.addChangeListener((()=>this.overlayAgent.invoke_setShowPaintRects({result:this.#us.get()}))),this.#gs.addChangeListener((()=>this.overlayAgent.invoke_setShowLayoutShiftRegions({result:this.#gs.get()}))),this.#ps.addChangeListener((()=>this.overlayAgent.invoke_setShowAdHighlights({show:this.#ps.get()}))),this.#ms.addChangeListener((()=>this.overlayAgent.invoke_setShowDebugBorders({show:this.#ms.get()}))),this.#fs.addChangeListener((()=>this.overlayAgent.invoke_setShowFPSCounter({show:this.#fs.get()}))),this.#bs.addChangeListener((()=>this.overlayAgent.invoke_setShowScrollBottleneckRects({show:this.#bs.get()}))),this.#ys.addChangeListener((()=>this.overlayAgent.invoke_setShowWebVitals({show:this.#ys.get()})))],this.#us.get()&&this.overlayAgent.invoke_setShowPaintRects({result:!0}),this.#gs.get()&&this.overlayAgent.invoke_setShowLayoutShiftRegions({result:!0}),this.#ps.get()&&this.overlayAgent.invoke_setShowAdHighlights({show:!0}),this.#ms.get()&&this.overlayAgent.invoke_setShowDebugBorders({show:!0}),this.#fs.get()&&this.overlayAgent.invoke_setShowFPSCounter({show:!0}),this.#bs.get()&&this.overlayAgent.invoke_setShowScrollBottleneckRects({show:!0}),this.#ys.get()&&this.overlayAgent.invoke_setShowWebVitals({show:!0}),this.#os&&this.#os.isPaused()&&this.updatePausedInDebuggerMessage(),await this.overlayAgent.invoke_setShowViewportSizeOnResize({show:this.#Is})}async suspendModel(){e.EventTarget.removeEventListeners(this.#vs),await this.overlayAgent.invoke_disable()}async resumeModel(){await Promise.all([this.overlayAgent.invoke_enable(),this.wireAgentToSettings()])}setShowViewportSizeOnResize(e){this.#Is!==e&&(this.#Is=e,this.target().suspended()||this.overlayAgent.invoke_setShowViewportSizeOnResize({show:e}))}updatePausedInDebuggerMessage(){if(this.target().suspended())return;const t=this.#os&&this.#os.isPaused()&&!e.Settings.Settings.instance().moduleSetting("disablePausedStateOverlay").get()?yn(fn.pausedInDebugger):void 0;this.overlayAgent.invoke_setPausedInDebuggerMessage({message:t})}setHighlighter(e){this.#hs=e||this.#cs}async setInspectMode(e,t=!0){await this.#Mr.requestDocument(),this.#ls="none"!==e,this.dispatchEventToListeners(In.InspectModeWillBeToggled,this),this.#hs.setInspectMode(e,this.buildHighlightConfig("all",t))}inspectModeEnabled(){return this.#ls}highlightInOverlay(e,t,n){if(this.#ws)return;this.#ds&&(clearTimeout(this.#ds),this.#ds=null);const r=this.buildHighlightConfig(t);void 0!==n&&(r.showInfo=n),this.#hs.highlightInOverlay(e,r)}highlightInOverlayForTwoSeconds(e){this.highlightInOverlay(e),this.delayedHideHighlight(2e3)}highlightGridInPersistentOverlay(e){this.#ks&&(this.#ks.highlightGridInOverlay(e),this.dispatchEventToListeners(In.PersistentGridOverlayStateChanged,{nodeId:e,enabled:!0}))}isHighlightedGridInPersistentOverlay(e){return!!this.#ks&&this.#ks.isGridHighlighted(e)}hideGridInPersistentOverlay(e){this.#ks&&(this.#ks.hideGridInOverlay(e),this.dispatchEventToListeners(In.PersistentGridOverlayStateChanged,{nodeId:e,enabled:!1}))}highlightScrollSnapInPersistentOverlay(e){this.#ks&&(this.#ks.highlightScrollSnapInOverlay(e),this.dispatchEventToListeners(In.PersistentScrollSnapOverlayStateChanged,{nodeId:e,enabled:!0}))}isHighlightedScrollSnapInPersistentOverlay(e){return!!this.#ks&&this.#ks.isScrollSnapHighlighted(e)}hideScrollSnapInPersistentOverlay(e){this.#ks&&(this.#ks.hideScrollSnapInOverlay(e),this.dispatchEventToListeners(In.PersistentScrollSnapOverlayStateChanged,{nodeId:e,enabled:!1}))}highlightFlexContainerInPersistentOverlay(e){this.#ks&&(this.#ks.highlightFlexInOverlay(e),this.dispatchEventToListeners(In.PersistentFlexContainerOverlayStateChanged,{nodeId:e,enabled:!0}))}isHighlightedFlexContainerInPersistentOverlay(e){return!!this.#ks&&this.#ks.isFlexHighlighted(e)}hideFlexContainerInPersistentOverlay(e){this.#ks&&(this.#ks.hideFlexInOverlay(e),this.dispatchEventToListeners(In.PersistentFlexContainerOverlayStateChanged,{nodeId:e,enabled:!1}))}highlightContainerQueryInPersistentOverlay(e){this.#ks&&(this.#ks.highlightContainerQueryInOverlay(e),this.dispatchEventToListeners(In.PersistentContainerQueryOverlayStateChanged,{nodeId:e,enabled:!0}))}isHighlightedContainerQueryInPersistentOverlay(e){return!!this.#ks&&this.#ks.isContainerQueryHighlighted(e)}hideContainerQueryInPersistentOverlay(e){this.#ks&&(this.#ks.hideContainerQueryInOverlay(e),this.dispatchEventToListeners(In.PersistentContainerQueryOverlayStateChanged,{nodeId:e,enabled:!1}))}highlightSourceOrderInOverlay(t){const n={parentOutlineColor:e.Color.SourceOrderHighlight.ParentOutline.toProtocolRGBA(),childOutlineColor:e.Color.SourceOrderHighlight.ChildOutline.toProtocolRGBA()};this.#Ss.highlightSourceOrderInOverlay(t,n)}colorOfGridInPersistentOverlay(e){return this.#ks?this.#ks.colorOfGrid(e).asString("hex"):null}setColorOfGridInPersistentOverlay(t,n){if(!this.#ks)return;const r=e.Color.parse(n);r&&(this.#ks.setColorOfGrid(t,r),this.#ks.resetOverlay())}colorOfFlexInPersistentOverlay(e){return this.#ks?this.#ks.colorOfFlex(e).asString("hex"):null}setColorOfFlexInPersistentOverlay(t,n){if(!this.#ks)return;const r=e.Color.parse(n);r&&(this.#ks.setColorOfFlex(t,r),this.#ks.resetOverlay())}hideSourceOrderInOverlay(){this.#Ss.hideSourceOrderHighlight()}setSourceOrderActive(e){this.#ws=e}sourceOrderModeActive(){return this.#ws}highlightIsolatedElementInPersistentOverlay(e){this.#ks&&this.#ks.highlightIsolatedElementInOverlay(e)}hideIsolatedElementInPersistentOverlay(e){this.#ks&&this.#ks.hideIsolatedElementInOverlay(e)}isHighlightedIsolatedElementInPersistentOverlay(e){return!!this.#ks&&this.#ks.isIsolatedElementHighlighted(e)}delayedHideHighlight(e){null===this.#ds&&(this.#ds=window.setTimeout((()=>this.highlightInOverlay({clear:!0})),e))}highlightFrame(e){this.#ds&&(clearTimeout(this.#ds),this.#ds=null),this.#hs.highlightFrame(e)}showHingeForDualScreen(e){if(e){const{x:t,y:n,width:r,height:s,contentColor:i,outlineColor:a}=e;this.overlayAgent.invoke_setShowHinge({hingeConfig:{rect:{x:t,y:n,width:r,height:s},contentColor:i,outlineColor:a}})}else this.overlayAgent.invoke_setShowHinge({})}buildHighlightConfig(t="all",n=!1){const r=e.Settings.Settings.instance().moduleSetting("showMetricsRulers").get(),s=e.Settings.Settings.instance().moduleSetting("colorFormat").get(),i={showInfo:"all"===t||"container-outline"===t,showRulers:r,showStyles:n,showAccessibilityInfo:n,showExtensionLines:r,gridHighlightConfig:{},flexContainerHighlightConfig:{},flexItemHighlightConfig:{},contrastAlgorithm:o.Runtime.experiments.isEnabled("APCA")?"apca":"aa"};"all"!==t&&"content"!==t||(i.contentColor=e.Color.PageHighlight.Content.toProtocolRGBA()),"all"!==t&&"padding"!==t||(i.paddingColor=e.Color.PageHighlight.Padding.toProtocolRGBA()),"all"!==t&&"border"!==t||(i.borderColor=e.Color.PageHighlight.Border.toProtocolRGBA()),"all"!==t&&"margin"!==t||(i.marginColor=e.Color.PageHighlight.Margin.toProtocolRGBA()),"all"===t&&(i.eventTargetColor=e.Color.PageHighlight.EventTarget.toProtocolRGBA(),i.shapeColor=e.Color.PageHighlight.Shape.toProtocolRGBA(),i.shapeMarginColor=e.Color.PageHighlight.ShapeMargin.toProtocolRGBA(),i.gridHighlightConfig={rowGapColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA(),rowHatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),columnGapColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA(),columnHatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),rowLineColor:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),columnLineColor:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),rowLineDash:!0,columnLineDash:!0},i.flexContainerHighlightConfig={containerBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"},itemSeparator:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dotted"},lineSeparator:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"},mainDistributedSpace:{hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),fillColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA()},crossDistributedSpace:{hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),fillColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA()},rowGapSpace:{hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),fillColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA()},columnGapSpace:{hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),fillColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA()}},i.flexItemHighlightConfig={baseSizeBox:{hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA()},baseSizeBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dotted"},flexibilityArrow:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA()}}),t.endsWith("gap")&&(i.gridHighlightConfig={gridBorderColor:e.Color.PageHighlight.GridBorder.toProtocolRGBA(),gridBorderDash:!0},"gap"!==t&&"row-gap"!==t||(i.gridHighlightConfig.rowGapColor=e.Color.PageHighlight.GapBackground.toProtocolRGBA(),i.gridHighlightConfig.rowHatchColor=e.Color.PageHighlight.GapHatch.toProtocolRGBA()),"gap"!==t&&"column-gap"!==t||(i.gridHighlightConfig.columnGapColor=e.Color.PageHighlight.GapBackground.toProtocolRGBA(),i.gridHighlightConfig.columnHatchColor=e.Color.PageHighlight.GapHatch.toProtocolRGBA())),t.endsWith("gap")&&(i.flexContainerHighlightConfig={containerBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"}},"gap"!==t&&"row-gap"!==t||(i.flexContainerHighlightConfig.rowGapSpace={hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),fillColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA()}),"gap"!==t&&"column-gap"!==t||(i.flexContainerHighlightConfig.columnGapSpace={hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),fillColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA()})),"grid-areas"===t&&(i.gridHighlightConfig={rowLineColor:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),columnLineColor:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),rowLineDash:!0,columnLineDash:!0,showAreaNames:!0,areaBorderColor:e.Color.PageHighlight.GridAreaBorder.toProtocolRGBA()}),"grid-template-columns"===t&&(i.contentColor=e.Color.PageHighlight.Content.toProtocolRGBA(),i.gridHighlightConfig={columnLineColor:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),columnLineDash:!0}),"grid-template-rows"===t&&(i.contentColor=e.Color.PageHighlight.Content.toProtocolRGBA(),i.gridHighlightConfig={rowLineColor:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),rowLineDash:!0}),"justify-content"===t&&(i.flexContainerHighlightConfig={containerBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"},mainDistributedSpace:{hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),fillColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA()}}),"align-content"===t&&(i.flexContainerHighlightConfig={containerBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"},crossDistributedSpace:{hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),fillColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA()}}),"align-items"===t&&(i.flexContainerHighlightConfig={containerBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"},lineSeparator:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"},crossAlignment:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA()}}),"flexibility"===t&&(i.flexItemHighlightConfig={baseSizeBox:{hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA()},baseSizeBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dotted"},flexibilityArrow:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA()}}),"container-outline"===t&&(i.containerQueryContainerHighlightConfig={containerBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"}});return new Set(["rgb","hsl","hex"]).has(s)&&(i.colorFormat=s),i}nodeHighlightRequested({nodeId:e}){const t=this.#Mr.nodeForId(e);t&&this.dispatchEventToListeners(In.HighlightNodeRequested,t)}static setInspectNodeHandler(e){vn.inspectNodeHandler=e}inspectNodeRequested({backendNodeId:t}){const n=new Rn(this.target(),t);vn.inspectNodeHandler?n.resolvePromise().then((e=>{e&&vn.inspectNodeHandler&&vn.inspectNodeHandler(e)})):e.Revealer.reveal(n),this.dispatchEventToListeners(In.ExitedInspectMode)}screenshotRequested({viewport:e}){this.dispatchEventToListeners(In.ScreenshotRequested,e),this.dispatchEventToListeners(In.ExitedInspectMode)}inspectModeCanceled(){this.dispatchEventToListeners(In.ExitedInspectMode)}static inspectNodeHandler=null;getOverlayAgent(){return this.overlayAgent}}var In;!function(e){e.InspectModeWillBeToggled="InspectModeWillBeToggled",e.ExitedInspectMode="InspectModeExited",e.HighlightNodeRequested="HighlightNodeRequested",e.ScreenshotRequested="ScreenshotRequested",e.PersistentGridOverlayStateChanged="PersistentGridOverlayStateChanged",e.PersistentFlexContainerOverlayStateChanged="PersistentFlexContainerOverlayStateChanged",e.PersistentScrollSnapOverlayStateChanged="PersistentScrollSnapOverlayStateChanged",e.PersistentContainerQueryOverlayStateChanged="PersistentContainerQueryOverlayStateChanged"}(In||(In={}));class kn{#$r;constructor(e){this.#$r=e}highlightInOverlay(e,t){const{node:n,deferredNode:r,object:s,selectorList:i}={node:void 0,deferredNode:void 0,object:void 0,selectorList:void 0,...e},a=n?n.id:void 0,o=r?r.backendNodeId():void 0,l=s?s.objectId:void 0;a||o||l?this.#$r.target().overlayAgent().invoke_highlightNode({highlightConfig:t,nodeId:a,backendNodeId:o,objectId:l,selector:i}):this.#$r.target().overlayAgent().invoke_hideHighlight()}async setInspectMode(e,t){await this.#$r.target().overlayAgent().invoke_setInspectMode({mode:e,highlightConfig:t})}highlightFrame(t){this.#$r.target().overlayAgent().invoke_highlightFrame({frameId:t,contentColor:e.Color.PageHighlight.Content.toProtocolRGBA(),contentOutlineColor:e.Color.PageHighlight.ContentOutline.toProtocolRGBA()})}}class Sn{#$r;constructor(e){this.#$r=e}highlightSourceOrderInOverlay(e,t){this.#$r.setSourceOrderActive(!0),this.#$r.setShowViewportSizeOnResize(!1),this.#$r.getOverlayAgent().invoke_highlightSourceOrder({sourceOrderConfig:t,nodeId:e.id})}hideSourceOrderHighlight(){this.#$r.setSourceOrderActive(!1),this.#$r.setShowViewportSizeOnResize(!0),this.#$r.clearHighlight()}}c.register(vn,{capabilities:z.DOM,autostart:!0});var wn,Cn=Object.freeze({__proto__:null,OverlayModel:vn,get Events(){return In},SourceOrderHighlighter:Sn});class Tn{#Cs;#Ts;ownerDocument;#Rs;id;index;#xs;#Ms;#Ps;#Ls;nodeValueInternal;#Es;#As;#Os;#Ns;#Fs;#Bs;#Ds;#Us;#Hs;assignedSlot;shadowRootsInternal;#qs;#_s;#zs;childNodeCountInternal;childrenInternal;nextSibling;previousSibling;firstChild;lastChild;parentNode;templateContentInternal;contentDocumentInternal;childDocumentPromiseForTesting;#js;publicId;systemId;internalSubset;name;value;constructor(e){this.#Cs=e,this.#Ts=this.#Cs.getAgent(),this.index=void 0,this.#Ds=null,this.#Us=new Map,this.#Hs=[],this.assignedSlot=null,this.shadowRootsInternal=[],this.#qs=new Map,this.#_s=new Map,this.#zs=0,this.childrenInternal=null,this.nextSibling=null,this.previousSibling=null,this.firstChild=null,this.lastChild=null,this.parentNode=null}static create(e,t,n,r){const s=new Tn(e);return s.init(t,n,r),s}init(e,t,n){if(this.#Ts=this.#Cs.getAgent(),this.ownerDocument=e,this.#Rs=t,this.id=n.nodeId,this.#xs=n.backendNodeId,this.#Cs.registerNode(this),this.#Ms=n.nodeType,this.#Ps=n.nodeName,this.#Ls=n.localName,this.nodeValueInternal=n.nodeValue,this.#Es=n.pseudoType,this.#As=n.pseudoIdentifier,this.#Os=n.shadowRootType,this.#Ns=n.frameId||null,this.#Fs=n.xmlVersion,this.#Bs=Boolean(n.isSVG),n.attributes&&this.setAttributesPayload(n.attributes),this.childNodeCountInternal=n.childNodeCount||0,n.shadowRoots)for(let e=0;ee.creation||null)),this.#Ds}get subtreeMarkerCount(){return this.#zs}domModel(){return this.#Cs}backendNodeId(){return this.#xs}children(){return this.childrenInternal?this.childrenInternal.slice():null}setChildren(e){this.childrenInternal=e}hasAttributes(){return this.#qs.size>0}childNodeCount(){return this.childNodeCountInternal}setChildNodeCount(e){this.childNodeCountInternal=e}hasShadowRoots(){return Boolean(this.shadowRootsInternal.length)}shadowRoots(){return this.shadowRootsInternal.slice()}templateContent(){return this.templateContentInternal||null}contentDocument(){return this.contentDocumentInternal||null}setContentDocument(e){this.contentDocumentInternal=e}isIframe(){return"IFRAME"===this.#Ps}isPortal(){return"PORTAL"===this.#Ps}importedDocument(){return this.#js||null}nodeType(){return this.#Ms}nodeName(){return this.#Ps}pseudoType(){return this.#Es}pseudoIdentifier(){return this.#As}hasPseudoElements(){return this.#Us.size>0}pseudoElements(){return this.#Us}beforePseudoElement(){return this.#Us.get("before")?.at(-1)}afterPseudoElement(){return this.#Us.get("after")?.at(-1)}markerPseudoElement(){return this.#Us.get("marker")?.at(-1)}backdropPseudoElement(){return this.#Us.get("backdrop")?.at(-1)}viewTransitionPseudoElements(){return[...this.#Us.get("view-transition")||[],...this.#Us.get("view-transition-group")||[],...this.#Us.get("view-transition-image-pair")||[],...this.#Us.get("view-transition-old")||[],...this.#Us.get("view-transition-new")||[]]}hasAssignedSlot(){return null!==this.assignedSlot}isInsertionPoint(){return!this.isXMLNode()&&("SHADOW"===this.#Ps||"CONTENT"===this.#Ps||"SLOT"===this.#Ps)}distributedNodes(){return this.#Hs}isInShadowTree(){return this.#Rs}ancestorShadowHost(){const e=this.ancestorShadowRoot();return e?e.parentNode:null}ancestorShadowRoot(){if(!this.#Rs)return null;let e=this;for(;e&&!e.isShadowRoot();)e=e.parentNode;return e}ancestorUserAgentShadowRoot(){const e=this.ancestorShadowRoot();return e&&e.shadowRootType()===Tn.ShadowRootTypes.UserAgent?e:null}isShadowRoot(){return Boolean(this.#Os)}shadowRootType(){return this.#Os||null}nodeNameInCorrectCase(){const e=this.shadowRootType();return e?"#shadow-root ("+e+")":this.localName()?this.localName().length!==this.nodeName().length?this.nodeName():this.localName():this.nodeName()}setNodeName(e,t){this.#Ts.invoke_setNodeName({nodeId:this.id,name:e}).then((e=>{e.getError()||this.#Cs.markUndoableState(),t&&t(e.getError()||null,this.#Cs.nodeForId(e.nodeId))}))}localName(){return this.#Ls}nodeValue(){return this.nodeValueInternal}setNodeValueInternal(e){this.nodeValueInternal=e}setNodeValue(e,t){this.#Ts.invoke_setNodeValue({nodeId:this.id,value:e}).then((e=>{e.getError()||this.#Cs.markUndoableState(),t&&t(e.getError()||null)}))}getAttribute(e){const t=this.#qs.get(e);return t?t.value:void 0}setAttribute(e,t,n){this.#Ts.invoke_setAttributesAsText({nodeId:this.id,text:t,name:e}).then((e=>{e.getError()||this.#Cs.markUndoableState(),n&&n(e.getError()||null)}))}setAttributeValue(e,t,n){this.#Ts.invoke_setAttributeValue({nodeId:this.id,name:e,value:t}).then((e=>{e.getError()||this.#Cs.markUndoableState(),n&&n(e.getError()||null)}))}setAttributeValuePromise(e,t){return new Promise((n=>this.setAttributeValue(e,t,n)))}attributes(){return[...this.#qs.values()]}async removeAttribute(e){(await this.#Ts.invoke_removeAttribute({nodeId:this.id,name:e})).getError()||(this.#qs.delete(e),this.#Cs.markUndoableState())}getChildNodes(e){this.childrenInternal?e(this.children()):this.#Ts.invoke_requestChildNodes({nodeId:this.id}).then((t=>{e(t.getError()?null:this.children())}))}async getSubtree(e,t){return(await this.#Ts.invoke_requestChildNodes({nodeId:this.id,depth:e,pierce:t})).getError()?null:this.childrenInternal}async getOuterHTML(){const{outerHTML:e}=await this.#Ts.invoke_getOuterHTML({nodeId:this.id});return e}setOuterHTML(e,t){this.#Ts.invoke_setOuterHTML({nodeId:this.id,outerHTML:e}).then((e=>{e.getError()||this.#Cs.markUndoableState(),t&&t(e.getError()||null)}))}removeNode(e){return this.#Ts.invoke_removeNode({nodeId:this.id}).then((t=>{t.getError()||this.#Cs.markUndoableState(),e&&e(t.getError()||null)}))}async copyNode(){const{outerHTML:e}=await this.#Ts.invoke_getOuterHTML({nodeId:this.id});return null!==e&&i.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(e),e}path(){function e(e){return(void 0!==e.index||e.isShadowRoot()&&e.parentNode)&&e.#Ps.length}const t=[];let n=this;for(;n&&e(n);){const e="number"==typeof n.index?n.index:n.shadowRootType()===Tn.ShadowRootTypes.UserAgent?"u":"a";t.push([e,n.#Ps]),n=n.parentNode}return t.reverse(),t.join(",")}isAncestor(e){if(!e)return!1;let t=e.parentNode;for(;t;){if(this===t)return!0;t=t.parentNode}return!1}isDescendant(e){return null!==e&&e.isAncestor(this)}frameOwnerFrameId(){return this.#Ns}frameId(){let e=this.parentNode||this;for(;!e.#Ns&&e.parentNode;)e=e.parentNode;return e.#Ns}setAttributesPayload(e){let t=!this.#qs||e.length!==2*this.#qs.size;const n=this.#qs||new Map;this.#qs=new Map;for(let r=0;rt!==e));n&&n.length>0?this.#Us.set(t,n):this.#Us.delete(t)}else{const t=this.shadowRootsInternal.indexOf(e);if(-1!==t)this.shadowRootsInternal.splice(t,1);else{if(!this.childrenInternal)throw new Error("DOMNode._children is expected to not be null.");if(-1===this.childrenInternal.indexOf(e))throw new Error("DOMNode._children is expected to contain the node to be removed.");this.childrenInternal.splice(this.childrenInternal.indexOf(e),1)}}e.parentNode=null,this.#zs-=e.#zs,e.#zs&&this.#Cs.dispatchEventToListeners(wn.MarkersChanged,this),this.renumber()}setChildrenPayload(e){this.childrenInternal=[];for(let t=0;t=0?this.childrenInternal[e-1]:null,t.parentNode=this}}addAttribute(e,t){const n={name:e,value:t,_node:this};this.#qs.set(e,n)}setAttributeInternal(e,t){const n=this.#qs.get(e);n?n.value=t:this.addAttribute(e,t)}removeAttributeInternal(e){this.#qs.delete(e)}copyTo(e,t,n){this.#Ts.invoke_copyTo({nodeId:this.id,targetNodeId:e.id,insertBeforeNodeId:t?t.id:void 0}).then((e=>{e.getError()||this.#Cs.markUndoableState(),n&&n(e.getError()||null,this.#Cs.nodeForId(e.nodeId))}))}moveTo(e,t,n){this.#Ts.invoke_moveTo({nodeId:this.id,targetNodeId:e.id,insertBeforeNodeId:t?t.id:void 0}).then((e=>{e.getError()||this.#Cs.markUndoableState(),n&&n(e.getError()||null,this.#Cs.nodeForId(e.nodeId))}))}isXMLNode(){return Boolean(this.#Fs)}setMarker(e,t){if(null!==t){if(this.parentNode&&!this.#_s.has(e))for(let e=this;e;e=e.parentNode)++e.#zs;this.#_s.set(e,t);for(let e=this;e;e=e.parentNode)this.#Cs.dispatchEventToListeners(wn.MarkersChanged,e)}else{if(!this.#_s.has(e))return;this.#_s.delete(e);for(let e=this;e;e=e.parentNode)--e.#zs;for(let e=this;e;e=e.parentNode)this.#Cs.dispatchEventToListeners(wn.MarkersChanged,e)}}marker(e){return this.#_s.get(e)||null}getMarkerKeysForTest(){return[...this.#_s.keys()]}traverseMarkers(e){!function t(n){if(n.#zs){for(const t of n.#_s.keys())e(n,t);if(n.childrenInternal)for(const e of n.childrenInternal)t(e)}}(this)}resolveURL(t){if(!t)return t;for(let n=this;n;n=n.parentNode)if(n instanceof Mn&&n.baseURL)return e.ParsedURL.ParsedURL.completeURL(n.baseURL,t);return null}highlight(e){this.#Cs.overlayModel().highlightInOverlay({node:this,selectorList:void 0},e)}highlightForTwoSeconds(){this.#Cs.overlayModel().highlightInOverlayForTwoSeconds({node:this,selectorList:void 0})}async resolveToObject(e){const{object:t}=await this.#Ts.invoke_resolveNode({nodeId:this.id,backendNodeId:void 0,objectGroup:e});return t&&this.#Cs.runtimeModelInternal.createRemoteObject(t)||null}async boxModel(){const{model:e}=await this.#Ts.invoke_getBoxModel({nodeId:this.id});return e}async setAsInspectedNode(){let e=this;for(e&&e.pseudoType()&&(e=e.parentNode);e;){let t=e.ancestorUserAgentShadowRoot();if(!t)break;if(t=e.ancestorShadowHost(),!t)break;e=t}if(!e)throw new Error("In DOMNode.setAsInspectedNode: node is expected to not be null.");await this.#Ts.invoke_setInspectedNode({nodeId:e.id})}enclosingElementOrSelf(){let e=this;return e&&e.nodeType()===Node.TEXT_NODE&&e.parentNode&&(e=e.parentNode),e&&e.nodeType()!==Node.ELEMENT_NODE&&(e=null),e}async scrollIntoView(){const e=this.enclosingElementOrSelf();if(!e)return;const t=await e.resolveToObject();t&&(t.callFunction((function(){this.scrollIntoViewIfNeeded(!0)})),t.release(),e.highlightForTwoSeconds())}async focus(){const e=this.enclosingElementOrSelf();if(!e)throw new Error("DOMNode.focus expects node to not be null.");const t=await e.resolveToObject();t&&(await t.callFunction((function(){this.focus()})),t.release(),e.highlightForTwoSeconds(),await this.#Cs.target().pageAgent().invoke_bringToFront())}simpleSelector(){const e=this.localName()||this.nodeName().toLowerCase();if(this.nodeType()!==Node.ELEMENT_NODE)return e;const t=this.getAttribute("type"),n=this.getAttribute("id"),r=this.getAttribute("class");if("input"===e&&t&&!n&&!r)return e+'[type="'+CSS.escape(t)+'"]';if(n)return e+"#"+CSS.escape(n);if(r){return("div"===e?"":e)+"."+r.trim().split(/\s+/g).map((e=>CSS.escape(e))).join(".")}return e}}!function(e){let t;!function(e){e.UserAgent="user-agent",e.Open="open",e.Closed="closed"}(t=e.ShadowRootTypes||(e.ShadowRootTypes={}))}(Tn||(Tn={}));class Rn{#Cs;#xs;constructor(e,t){this.#Cs=e.model(Pn),this.#xs=t}resolve(e){this.resolvePromise().then(e)}async resolvePromise(){const e=await this.#Cs.pushNodesByBackendIdsToFrontend(new Set([this.#xs]));return e&&e.get(this.#xs)||null}backendNodeId(){return this.#xs}domModel(){return this.#Cs}highlight(){this.#Cs.overlayModel().highlightInOverlay({deferredNode:this,selectorList:void 0})}}class xn{nodeType;nodeName;deferredNode;constructor(e,t,n,r){this.nodeType=n,this.nodeName=r,this.deferredNode=new Rn(e,t)}}class Mn extends Tn{body;documentElement;documentURL;baseURL;constructor(e,t){super(e),this.body=null,this.documentElement=null,this.init(this,!1,t),this.documentURL=t.documentURL||"",this.baseURL=t.baseURL||""}}class Pn extends c{agent;idToDOMNode=new Map;#Ws;#Vs;runtimeModelInternal;#Gs;#Ks;#$s;#Qs;#Xs;constructor(e){super(e),this.agent=e.domAgent(),this.#Ws=null,this.#Vs=new Set,e.registerDOMDispatcher(new Ln(this)),this.runtimeModelInternal=e.model(Cr),this.#Ks=null,e.suspended()||this.agent.invoke_enable({}),o.Runtime.experiments.isEnabled("captureNodeCreationStacks")&&this.agent.invoke_setNodeStackTracesEnabled({enable:!0})}runtimeModel(){return this.runtimeModelInternal}cssModel(){return this.target().model(en)}overlayModel(){return this.target().model(vn)}static cancelSearch(){for(const e of K.instance().models(Pn))e.cancelSearch()}scheduleMutationEvent(e){this.hasEventListeners(wn.DOMMutated)&&(this.#Gs=(this.#Gs||0)+1,Promise.resolve().then(function(e,t){if(!this.hasEventListeners(wn.DOMMutated)||this.#Gs!==t)return;this.dispatchEventToListeners(wn.DOMMutated,e)}.bind(this,e,this.#Gs)))}requestDocument(){return this.#Ws?Promise.resolve(this.#Ws):(this.#Ks||(this.#Ks=this.requestDocumentInternal()),this.#Ks)}async getOwnerNodeForFrame(e){const t=await this.agent.invoke_getFrameOwner({frameId:e});return t.getError()?null:new Rn(this.target(),t.backendNodeId)}async requestDocumentInternal(){const e=await this.agent.invoke_getDocument({});if(e.getError())return null;const{root:t}=e;if(this.#Ks=null,t&&this.setDocument(t),!this.#Ws)return console.error("No document"),null;const n=this.parentModel();if(n&&!this.#$s){await n.requestDocument();const e=this.target().model(jn)?.mainFrame;if(e){const t=await n.agent.invoke_getFrameOwner({frameId:e.id});!t.getError()&&t.nodeId&&(this.#$s=n.nodeForId(t.nodeId))}}if(this.#$s){const e=this.#$s.contentDocument();this.#$s.setContentDocument(this.#Ws),this.#$s.setChildren([]),this.#Ws?(this.#Ws.parentNode=this.#$s,this.dispatchEventToListeners(wn.NodeInserted,this.#Ws)):e&&this.dispatchEventToListeners(wn.NodeRemoved,{node:e,parent:this.#$s})}return this.#Ws}existingDocument(){return this.#Ws}async pushNodeToFrontend(e){await this.requestDocument();const{nodeId:t}=await this.agent.invoke_requestNode({objectId:e});return t?this.nodeForId(t):null}pushNodeByPathToFrontend(e){return this.requestDocument().then((()=>this.agent.invoke_pushNodeByPathToFrontend({path:e}))).then((({nodeId:e})=>e))}async pushNodesByBackendIdsToFrontend(e){await this.requestDocument();const t=[...e],{nodeIds:n}=await this.agent.invoke_pushNodesByBackendIdsToFrontend({backendNodeIds:t});if(!n)return null;const r=new Map;for(let e=0;e{if(!t)return;const n=this.idToDOMNode.get(e);n&&n.setAttributesPayload(t)&&(this.dispatchEventToListeners(wn.AttrModified,{node:n,name:"style"}),this.scheduleMutationEvent(n))}));this.#Vs.clear()}characterDataModified(e,t){const n=this.idToDOMNode.get(e);n?(n.setNodeValueInternal(t),this.dispatchEventToListeners(wn.CharacterDataModified,n),this.scheduleMutationEvent(n)):console.error("nodeId could not be resolved to a node")}nodeForId(e){return e&&this.idToDOMNode.get(e)||null}documentUpdated(){const e=this.#Ks;this.setDocument(null),this.parentModel()&&!e&&this.requestDocument()}setDocument(e){this.idToDOMNode=new Map,this.#Ws=e&&"nodeId"in e?new Mn(this,e):null,An.instance().dispose(this),this.parentModel()||this.dispatchEventToListeners(wn.DocumentUpdated,this)}setDetachedRoot(e){"#document"===e.nodeName?new Mn(this,e):Tn.create(this,null,!1,e)}setChildNodes(e,t){if(!e&&t.length)return void this.setDetachedRoot(t[0]);this.idToDOMNode.get(e)?.setChildrenPayload(t)}childNodeCountUpdated(e,t){const n=this.idToDOMNode.get(e);n?(n.setChildNodeCount(t),this.dispatchEventToListeners(wn.ChildNodeCountUpdated,n),this.scheduleMutationEvent(n)):console.error("nodeId could not be resolved to a node")}childNodeInserted(e,t,n){const r=this.idToDOMNode.get(e),s=this.idToDOMNode.get(t);if(!r)return void console.error("parentId could not be resolved to a node");const i=r.insertChild(s,n);this.idToDOMNode.set(i.id,i),this.dispatchEventToListeners(wn.NodeInserted,i),this.scheduleMutationEvent(i)}childNodeRemoved(e,t){const n=this.idToDOMNode.get(e),r=this.idToDOMNode.get(t);n&&r?(n.removeChild(r),this.unbind(r),this.dispatchEventToListeners(wn.NodeRemoved,{node:r,parent:n}),this.scheduleMutationEvent(r)):console.error("parentId or nodeId could not be resolved to a node")}shadowRootPushed(e,t){const n=this.idToDOMNode.get(e);if(!n)return;const r=Tn.create(this,n.ownerDocument,!0,t);r.parentNode=n,this.idToDOMNode.set(r.id,r),n.shadowRootsInternal.unshift(r),this.dispatchEventToListeners(wn.NodeInserted,r),this.scheduleMutationEvent(r)}shadowRootPopped(e,t){const n=this.idToDOMNode.get(e);if(!n)return;const r=this.idToDOMNode.get(t);r&&(n.removeChild(r),this.unbind(r),this.dispatchEventToListeners(wn.NodeRemoved,{node:r,parent:n}),this.scheduleMutationEvent(r))}pseudoElementAdded(e,t){const n=this.idToDOMNode.get(e);if(!n)return;const r=Tn.create(this,n.ownerDocument,!1,t);r.parentNode=n,this.idToDOMNode.set(r.id,r);const s=r.pseudoType();if(!s)throw new Error("DOMModel._pseudoElementAdded expects pseudoType to be defined.");const i=n.pseudoElements().get(s);i?i.push(r):n.pseudoElements().set(s,[r]),this.dispatchEventToListeners(wn.NodeInserted,r),this.scheduleMutationEvent(r)}topLayerElementsUpdated(){this.dispatchEventToListeners(wn.TopLayerElementsChanged)}pseudoElementRemoved(e,t){const n=this.idToDOMNode.get(e);if(!n)return;const r=this.idToDOMNode.get(t);r&&(n.removeChild(r),this.unbind(r),this.dispatchEventToListeners(wn.NodeRemoved,{node:r,parent:n}),this.scheduleMutationEvent(r))}distributedNodesUpdated(e,t){const n=this.idToDOMNode.get(e);n&&(n.setDistributedNodePayloads(t),this.dispatchEventToListeners(wn.DistributedNodesChanged,n),this.scheduleMutationEvent(n))}unbind(e){this.idToDOMNode.delete(e.id);const t=e.children();for(let e=0;t&&ee||[]))}querySelector(e,t){return this.agent.invoke_querySelector({nodeId:e,selector:t}).then((({nodeId:e})=>e))}querySelectorAll(e,t){return this.agent.invoke_querySelectorAll({nodeId:e,selector:t}).then((({nodeIds:e})=>e))}getTopLayerElements(){return this.agent.invoke_getTopLayerElements().then((({nodeIds:e})=>e))}markUndoableState(e){An.instance().markUndoableState(this,e||!1)}async nodeForLocation(e,t,n){const r=await this.agent.invoke_getNodeForLocation({x:e,y:t,includeUserAgentShadowDOM:n});return r.getError()||!r.nodeId?null:this.nodeForId(r.nodeId)}async getContainerForNode(e,t,n,r){const{nodeId:s}=await this.agent.invoke_getContainerForNode({nodeId:e,containerName:t,physicalAxes:n,logicalAxes:r});return s?this.nodeForId(s):null}pushObjectAsNodeToFrontend(e){return e.isNode()&&e.objectId?this.pushNodeToFrontend(e.objectId):Promise.resolve(null)}suspendModel(){return this.agent.invoke_disable().then((()=>this.setDocument(null)))}async resumeModel(){await this.agent.invoke_enable({})}dispose(){An.instance().dispose(this)}parentModel(){const e=this.target().parentTarget();return e?e.model(Pn):null}getAgent(){return this.agent}registerNode(e){this.idToDOMNode.set(e.id,e)}}!function(e){e.AttrModified="AttrModified",e.AttrRemoved="AttrRemoved",e.CharacterDataModified="CharacterDataModified",e.DOMMutated="DOMMutated",e.NodeInserted="NodeInserted",e.NodeRemoved="NodeRemoved",e.DocumentUpdated="DocumentUpdated",e.ChildNodeCountUpdated="ChildNodeCountUpdated",e.DistributedNodesChanged="DistributedNodesChanged",e.MarkersChanged="MarkersChanged",e.TopLayerElementsChanged="TopLayerElementsChanged"}(wn||(wn={}));class Ln{#Mr;constructor(e){this.#Mr=e}documentUpdated(){this.#Mr.documentUpdated()}attributeModified({nodeId:e,name:t,value:n}){this.#Mr.attributeModified(e,t,n)}attributeRemoved({nodeId:e,name:t}){this.#Mr.attributeRemoved(e,t)}inlineStyleInvalidated({nodeIds:e}){this.#Mr.inlineStyleInvalidated(e)}characterDataModified({nodeId:e,characterData:t}){this.#Mr.characterDataModified(e,t)}setChildNodes({parentId:e,nodes:t}){this.#Mr.setChildNodes(e,t)}childNodeCountUpdated({nodeId:e,childNodeCount:t}){this.#Mr.childNodeCountUpdated(e,t)}childNodeInserted({parentNodeId:e,previousNodeId:t,node:n}){this.#Mr.childNodeInserted(e,t,n)}childNodeRemoved({parentNodeId:e,nodeId:t}){this.#Mr.childNodeRemoved(e,t)}shadowRootPushed({hostId:e,root:t}){this.#Mr.shadowRootPushed(e,t)}shadowRootPopped({hostId:e,rootId:t}){this.#Mr.shadowRootPopped(e,t)}pseudoElementAdded({parentId:e,pseudoElement:t}){this.#Mr.pseudoElementAdded(e,t)}pseudoElementRemoved({parentId:e,pseudoElementId:t}){this.#Mr.pseudoElementRemoved(e,t)}distributedNodesUpdated({insertionPointId:e,distributedNodes:t}){this.#Mr.distributedNodesUpdated(e,t)}topLayerElementsUpdated(){this.#Mr.topLayerElementsUpdated()}}let En;class An{#Js;#Kr;#Ys;constructor(){this.#Js=[],this.#Kr=0,this.#Ys=null}static instance(e={forceNew:null}){const{forceNew:t}=e;return En&&!t||(En=new An),En}async markUndoableState(e,t){this.#Ys&&e!==this.#Ys&&(this.#Ys.markUndoableState(),this.#Ys=null),t&&this.#Ys===e||(this.#Js=this.#Js.slice(0,this.#Kr),this.#Js.push(e),this.#Kr=this.#Js.length,t?this.#Ys=e:(await e.getAgent().invoke_markUndoableState(),this.#Ys=null))}async undo(){if(0===this.#Kr)return Promise.resolve();--this.#Kr,this.#Ys=null,await this.#Js[this.#Kr].getAgent().invoke_undo()}async redo(){if(this.#Kr>=this.#Js.length)return Promise.resolve();++this.#Kr,this.#Ys=null,await this.#Js[this.#Kr-1].getAgent().invoke_redo()}dispose(e){let n=0;for(let t=0;t{this.#ai.push(e),this.#Zs&&!this.#Zs.finished||this.innerRequestContent()}))}canonicalMimeType(){return this.contentType().canonicalMimeType()||this.mimeType}async searchInContent(e,t,n){if(!this.frameId)return[];if(this.request)return this.request.searchInContent(e,t,n);return(await this.#Er.target().pageAgent().invoke_searchInResource({frameId:this.frameId,url:this.url,query:e,caseSensitive:t,isRegex:n})).result||[]}async populateImageSource(e){const{content:t}=await this.requestContent(),n=this.#ii;e.src=r.ContentProvider.contentAsDataURL(t,this.#kt,n)||this.#mt}requestFinished(){this.#Zs&&this.#Zs.removeEventListener(Te.FinishedLoading,this.requestFinished,this),this.#ai.length&&this.innerRequestContent()}async innerRequestContent(){if(this.#oi)return;this.#oi=!0;let e=null;if(this.request){const t=await this.request.contentData();t.error||(this.#si=t.content,this.#ii=t.encoded,e={content:t.content,isEncoded:t.encoded})}if(!e){const t=await this.#Er.target().pageAgent().invoke_getResourceContent({frameId:this.frameId,url:this.url}),n=t.getError();n?(this.#si=null,e={content:null,error:n,isEncoded:!1}):(this.#si=t.content,e={content:t.content,isEncoded:t.base64Encoded}),this.#ii=t.base64Encoded}null===this.#si&&(this.#ii=!1);for(const t of this.#ai.splice(0))t(e);this.#oi=void 0}hasTextContent(){return!!this.#ei.isTextType()||this.#ei===e.ResourceType.resourceTypes.Other&&(Boolean(this.#si)&&!this.#ii)}frame(){return this.#Ce?this.#Er.frameForId(this.#Ce):null}statusCode(){return this.#Zs?this.#Zs.statusCode:0}}var Fn,Bn=Object.freeze({__proto__:null,Resource:Nn});class Dn extends c{#li;#di;#ci;constructor(e){super(e),this.#li="",this.#di="",this.#ci=new Set}updateSecurityOrigins(e){const t=this.#ci;this.#ci=e;for(const e of t)this.#ci.has(e)||this.dispatchEventToListeners(Fn.SecurityOriginRemoved,e);for(const e of this.#ci)t.has(e)||this.dispatchEventToListeners(Fn.SecurityOriginAdded,e)}securityOrigins(){return[...this.#ci]}mainSecurityOrigin(){return this.#li}unreachableMainSecurityOrigin(){return this.#di}setMainSecurityOrigin(e,t){this.#li=e,this.#di=t||null,this.dispatchEventToListeners(Fn.MainSecurityOriginChanged,{mainSecurityOrigin:this.#li,unreachableMainSecurityOrigin:this.#di})}}!function(e){e.SecurityOriginAdded="SecurityOriginAdded",e.SecurityOriginRemoved="SecurityOriginRemoved",e.MainSecurityOriginChanged="MainSecurityOriginChanged"}(Fn||(Fn={})),c.register(Dn,{capabilities:z.None,autostart:!1});var Un,Hn=Object.freeze({__proto__:null,SecurityOriginManager:Dn,get Events(){return Fn}});class qn extends c{#hi;#ui;constructor(e){super(e),this.#hi="",this.#ui=new Set}updateStorageKeys(e){const t=this.#ui;this.#ui=e;for(const e of t)this.#ui.has(e)||this.dispatchEventToListeners(Un.StorageKeyRemoved,e);for(const e of this.#ui)t.has(e)||this.dispatchEventToListeners(Un.StorageKeyAdded,e)}storageKeys(){return[...this.#ui]}mainStorageKey(){return this.#hi}setMainStorageKey(e){this.#hi=e,this.dispatchEventToListeners(Un.MainStorageKeyChanged,{mainStorageKey:this.#hi})}}!function(e){e.StorageKeyAdded="StorageKeyAdded",e.StorageKeyRemoved="StorageKeyRemoved",e.MainStorageKeyChanged="MainStorageKeyChanged"}(Un||(Un={})),c.register(qn,{capabilities:z.None,autostart:!1});var _n,zn=Object.freeze({__proto__:null,StorageKeyManager:qn,parseStorageKey:function(t){const n=t.split("^"),r={origin:e.ParsedURL.ParsedURL.extractOrigin(n[0]),components:new Map};for(let e=1;e{this.processCachedResources(e.getError()?null:e.frameTree),this.mainFrame&&this.processPendingEvents(this.mainFrame)}))}static frameForRequest(e){const t=ne.forRequest(e),n=t?t.target().model(jn):null;return n&&e.frameId?n.frameForId(e.frameId):null}static frames(){const e=[];for(const t of K.instance().models(jn))e.push(...t.frames());return e}static resourceForURL(e){for(const t of K.instance().models(jn)){const n=t.mainFrame,r=n?n.resourceForURL(e):null;if(r)return r}return null}static reloadAllPages(e,t){for(const n of K.instance().models(jn))n.target().parentTarget()?.type()!==_.Frame&&n.reloadPage(e,t)}async storageKeyForFrame(e){if(!this.framesInternal.has(e))return null;const t=await this.storageAgent.invoke_getStorageKeyForFrame({frameId:e});return"Frame tree node for given frame not found"===t.getError()?null:t.storageKey}domModel(){return this.target().model(Pn)}processCachedResources(e){e&&":"!==e.frame.url&&(this.dispatchEventToListeners(_n.WillLoadCachedResources),this.addFramesRecursively(null,e),this.target().setInspectedURL(e.frame.url)),this.#mi=!0;const t=this.target().model(Cr);t&&(t.setExecutionContextComparator(this.executionContextComparator.bind(this)),t.fireExecutionContextOrderChanged()),this.dispatchEventToListeners(_n.CachedResourcesLoaded,this)}cachedResourcesLoaded(){return this.#mi}addFrame(e,t){this.framesInternal.set(e.id,e),e.isMainFrame()&&(this.mainFrame=e),this.dispatchEventToListeners(_n.FrameAdded,e),this.updateSecurityOrigins(),this.updateStorageKeys()}frameAttached(e,t,n){const r=t&&this.framesInternal.get(t)||null;if(!this.#mi&&r)return null;if(this.framesInternal.has(e))return null;const s=new Wn(this,r,e,null,n||null);return t&&!r&&(s.crossTargetParentFrameId=t),s.isMainFrame()&&this.mainFrame&&this.frameDetached(this.mainFrame.id,!1),this.addFrame(s,!0),s}frameNavigated(e,t){const n=e.parentId&&this.framesInternal.get(e.parentId)||null;if(!this.#mi&&n)return;let r=this.framesInternal.get(e.id)||null;if(!r&&(r=this.frameAttached(e.id,e.parentId||null),console.assert(Boolean(r)),!r))return;this.dispatchEventToListeners(_n.FrameWillNavigate,r),r.navigate(e),t&&(r.backForwardCacheDetails.restoredFromCache="BackForwardCacheRestore"===t),this.dispatchEventToListeners(_n.FrameNavigated,r),r.isPrimaryFrame()&&this.primaryPageChanged(r,"Navigation");const s=r.resources();for(let e=0;e=0,"Unbalanced call to ResourceTreeModel.resumeReload()"),!this.#bi&&this.#fi){const{ignoreCache:e,scriptToEvaluateOnLoad:t}=this.#fi;this.reloadPage(e,t)}}reloadPage(e,t){if(this.#fi||this.dispatchEventToListeners(_n.PageReloadRequested,this),this.#bi)return void(this.#fi={ignoreCache:e,scriptToEvaluateOnLoad:t});this.#fi=null;const n=this.target().model(ne);n&&n.clearRequests(),this.dispatchEventToListeners(_n.WillReloadPage),this.agent.invoke_reload({ignoreCache:e,scriptToEvaluateOnLoad:t})}navigate(e){return this.agent.invoke_navigate({url:e})}async navigationHistory(){const e=await this.agent.invoke_getNavigationHistory();return e.getError()?null:{currentIndex:e.currentIndex,entries:e.entries}}navigateToHistoryEntry(e){this.agent.invoke_navigateToHistoryEntry({entryId:e.id})}setLifecycleEventsEnabled(e){return this.agent.invoke_setLifecycleEventsEnabled({enabled:e})}async fetchAppManifest(){const e=await this.agent.invoke_getAppManifest();return e.getError()?{url:e.url,data:null,errors:[]}:{url:e.url,data:e.data||null,errors:e.errors}}async getInstallabilityErrors(){return(await this.agent.invoke_getInstallabilityErrors()).installabilityErrors||[]}async getAppId(){return this.agent.invoke_getAppId()}executionContextComparator(e,t){function n(e){let t=e;const n=[];for(;t;)n.push(t),t=t.sameTargetParentFrame();return n.reverse()}if(e.target()!==t.target())return Mr.comparator(e,t);const r=e.frameId?n(this.frameForId(e.frameId)):[],s=t.frameId?n(this.frameForId(t.frameId)):[];let i,a;for(let e=0;;e++)if(!r[e]||!s[e]||r[e]!==s[e]){i=r[e],a=s[e];break}return!i&&a?-1:!a&&i?1:i&&a?i.id.localeCompare(a.id):Mr.comparator(e,t)}getSecurityOriginData(){const t=new Set;let n=null,r=null;for(const s of this.framesInternal.values()){const i=s.securityOrigin;if(i&&(t.add(i),s.isMainFrame()&&(n=i,s.unreachableUrl()))){r=new e.ParsedURL.ParsedURL(s.unreachableUrl()).securityOrigin()}}return{securityOrigins:t,mainSecurityOrigin:n,unreachableMainSecurityOrigin:r}}async getStorageKeyData(){const e=new Set;let t=null;for(const{isMainFrame:n,storageKey:r}of await Promise.all([...this.framesInternal.values()].map((e=>e.getStorageKey(!1).then((t=>({isMainFrame:e.isMainFrame(),storageKey:t})))))))n&&(t=r),r&&e.add(r);return{storageKeys:e,mainStorageKey:t}}updateSecurityOrigins(){const e=this.getSecurityOriginData();this.#gi.setMainSecurityOrigin(e.mainSecurityOrigin||"",e.unreachableMainSecurityOrigin||""),this.#gi.updateSecurityOrigins(e.securityOrigins)}async updateStorageKeys(){const e=await this.getStorageKeyData();this.#pi.setMainStorageKey(e.mainStorageKey||""),this.#pi.updateStorageKeys(e.storageKeys)}async getMainStorageKey(){return this.mainFrame?this.mainFrame.getStorageKey(!1):null}getMainSecurityOrigin(){const e=this.getSecurityOriginData();return e.mainSecurityOrigin||e.unreachableMainSecurityOrigin}onBackForwardCacheNotUsed(e){this.mainFrame&&this.mainFrame.id===e.frameId&&this.mainFrame.loaderId===e.loaderId?(this.mainFrame.setBackForwardCacheDetails(e),this.dispatchEventToListeners(_n.BackForwardCacheDetailsUpdated,this.mainFrame)):this.#yi.add(e)}onPrerenderAttemptCompleted(e){this.mainFrame&&this.mainFrame.id===e.initiatingFrameId?(this.mainFrame.setPrerenderFinalStatus(e.finalStatus),this.dispatchEventToListeners(_n.PrerenderingStatusUpdated,this.mainFrame),e.disallowedApiMethod&&this.mainFrame.setPrerenderDisallowedApiMethod(e.disallowedApiMethod)):this.#vi.add(e),this.dispatchEventToListeners(_n.PrerenderAttemptCompleted,e)}processPendingEvents(e){if(e.isMainFrame()){for(const t of this.#yi)if(e.id===t.frameId&&e.loaderId===t.loaderId){e.setBackForwardCacheDetails(t),this.#yi.delete(t);break}for(const t of this.#vi)if(e.id===t.initiatingFrameId){e.setPrerenderFinalStatus(t.finalStatus),t.disallowedApiMethod&&e.setPrerenderDisallowedApiMethod(t.disallowedApiMethod),this.#vi.delete(t);break}}}}!function(e){e.FrameAdded="FrameAdded",e.FrameNavigated="FrameNavigated",e.FrameDetached="FrameDetached",e.FrameResized="FrameResized",e.FrameWillNavigate="FrameWillNavigate",e.PrimaryPageChanged="PrimaryPageChanged",e.ResourceAdded="ResourceAdded",e.WillLoadCachedResources="WillLoadCachedResources",e.CachedResourcesLoaded="CachedResourcesLoaded",e.DOMContentLoaded="DOMContentLoaded",e.LifecycleEvent="LifecycleEvent",e.Load="Load",e.PageReloadRequested="PageReloadRequested",e.WillReloadPage="WillReloadPage",e.InterstitialShown="InterstitialShown",e.InterstitialHidden="InterstitialHidden",e.BackForwardCacheDetailsUpdated="BackForwardCacheDetailsUpdated",e.PrerenderingStatusUpdated="PrerenderingStatusUpdated",e.PrerenderAttemptCompleted="PrerenderAttemptCompleted",e.JavaScriptDialogOpening="JavaScriptDialogOpening"}(_n||(_n={}));class Wn{#$r;#ki;#E;crossTargetParentFrameId;#Te;#u;#mt;#Si;#wi;#Ci;#Ti;#Ri;#xi;#Mi;#Pi;#Li;#Ei;#Ai;resourcesMap;backForwardCacheDetails={restoredFromCache:void 0,explanations:[],explanationsTree:void 0};prerenderFinalStatus;prerenderDisallowedApiMethod;constructor(e,n,r,s,i){this.#$r=e,this.#ki=n,this.#E=r,this.crossTargetParentFrameId=null,this.#Te=s&&s.loaderId||"",this.#u=s&&s.name,this.#mt=s&&s.url||t.DevToolsPath.EmptyUrlString,this.#Si=s&&s.domainAndRegistry||"",this.#wi=s&&s.securityOrigin,this.#Ti=s&&s.unreachableUrl||t.DevToolsPath.EmptyUrlString,this.#Ri=s?.adFrameStatus,this.#xi=s&&s.secureContextType,this.#Mi=s&&s.crossOriginIsolatedContextType,this.#Pi=s&&s.gatedAPIFeatures,this.#Li=i,this.#Ei=null,this.#Ai=new Set,this.resourcesMap=new Map,this.prerenderFinalStatus=null,this.prerenderDisallowedApiMethod=null,this.#ki&&this.#ki.#Ai.add(this)}isSecureContext(){return null!==this.#xi&&this.#xi.startsWith("Secure")}getSecureContextType(){return this.#xi}isCrossOriginIsolated(){return null!==this.#Mi&&this.#Mi.startsWith("Isolated")}getCrossOriginIsolatedContextType(){return this.#Mi}getGatedAPIFeatures(){return this.#Pi}getCreationStackTraceData(){return{creationStackTrace:this.#Li,creationStackTraceTarget:this.#Ei||this.resourceTreeModel().target()}}navigate(e){this.#Te=e.loaderId,this.#u=e.name,this.#mt=e.url,this.#Si=e.domainAndRegistry,this.#wi=e.securityOrigin,this.getStorageKey(!0),this.#Ti=e.unreachableUrl||t.DevToolsPath.EmptyUrlString,this.#Ri=e?.adFrameStatus,this.#xi=e.secureContextType,this.#Mi=e.crossOriginIsolatedContextType,this.#Pi=e.gatedAPIFeatures,this.backForwardCacheDetails={restoredFromCache:void 0,explanations:[],explanationsTree:void 0};const n=this.resourcesMap.get(this.#mt);this.resourcesMap.clear(),this.removeChildFrames(),n&&n.loaderId===this.#Te&&this.addResource(n)}resourceTreeModel(){return this.#$r}get id(){return this.#E}get name(){return this.#u||""}get url(){return this.#mt}domainAndRegistry(){return this.#Si}async getAdScriptId(e){return(await this.#$r.agent.invoke_getAdScriptId({frameId:e})).adScriptId||null}get securityOrigin(){return this.#wi}getStorageKey(e){return this.#Ci&&!e||(this.#Ci=this.#$r.storageKeyForFrame(this.#E)),this.#Ci}unreachableUrl(){return this.#Ti}get loaderId(){return this.#Te}adFrameType(){return this.#Ri?.adFrameType||"none"}adFrameStatus(){return this.#Ri}get childFrames(){return[...this.#Ai]}sameTargetParentFrame(){return this.#ki}crossTargetParentFrame(){if(!this.crossTargetParentFrameId)return null;const e=this.#$r.target().parentTarget();if(e?.type()!==_.Frame)return null;const t=e.model(jn);return t&&t.framesInternal.get(this.crossTargetParentFrameId)||null}parentFrame(){return this.sameTargetParentFrame()||this.crossTargetParentFrame()}isMainFrame(){return!this.#ki}isOutermostFrame(){return this.#$r.target().parentTarget()?.type()!==_.Frame&&!this.#ki&&!this.crossTargetParentFrameId}isPrimaryFrame(){return!this.#ki&&this.#$r.target()===K.instance().primaryPageTarget()}removeChildFrame(e,t){this.#Ai.delete(e),e.remove(t)}removeChildFrames(){const e=this.#Ai;this.#Ai=new Set;for(const t of e)t.remove(!1)}remove(e){this.removeChildFrames(),this.#$r.framesInternal.delete(this.id),this.#$r.dispatchEventToListeners(_n.FrameDetached,{frame:this,isSwap:e})}addResource(e){this.resourcesMap.get(e.url)!==e&&(this.resourcesMap.set(e.url,e),this.#$r.dispatchEventToListeners(_n.ResourceAdded,e))}addRequest(e){let t=this.resourcesMap.get(e.url());t&&t.request===e||(t=new Nn(this.#$r,e,e.url(),e.documentURL,e.frameId,e.loaderId,e.resourceType(),e.mimeType,null,null),this.resourcesMap.set(t.url,t),this.#$r.dispatchEventToListeners(_n.ResourceAdded,t))}resources(){return Array.from(this.resourcesMap.values())}resourceForURL(e){const t=this.resourcesMap.get(e);if(t)return t;for(const t of this.#Ai){const n=t.resourceForURL(e);if(n)return n}return null}callForFrameResources(e){for(const t of this.resourcesMap.values())if(e(t))return!0;for(const t of this.#Ai)if(t.callForFrameResources(e))return!0;return!1}displayName(){if(this.isOutermostFrame())return s.i18n.lockedString("top");const t=new e.ParsedURL.ParsedURL(this.#mt).displayName;return t?this.#u?this.#u+" ("+t+")":t:s.i18n.lockedString("iframe")}async getOwnerDeferredDOMNode(){const e=this.parentFrame();return e?e.resourceTreeModel().domModel().getOwnerNodeForFrame(this.#E):null}async getOwnerDOMNodeOrDocument(){const e=await this.getOwnerDeferredDOMNode();return e?e.resolvePromise():this.isOutermostFrame()?this.resourceTreeModel().domModel().requestDocument():null}async highlight(){const e=this.parentFrame(),t=this.resourceTreeModel().target().parentTarget(),n=async e=>{const t=await e.getOwnerNodeForFrame(this.#E);t&&e.overlayModel().highlightInOverlay({deferredNode:t,selectorList:""},"all",!0)};if(e)return n(e.resourceTreeModel().domModel());if(t?.type()===_.Frame){const e=t.model(Pn);if(e)return n(e)}const r=await this.resourceTreeModel().domModel().requestDocument();r&&this.resourceTreeModel().domModel().overlayModel().highlightInOverlay({node:r,selectorList:""},"all",!0)}async getPermissionsPolicyState(){const e=await this.resourceTreeModel().target().pageAgent().invoke_getPermissionsPolicyState({frameId:this.#E});return e.getError()?null:e.states}async getOriginTrials(){const e=await this.resourceTreeModel().target().pageAgent().invoke_getOriginTrials({frameId:this.#E});return e.getError()?[]:e.originTrials}setCreationStackTrace(e){this.#Li=e.creationStackTrace,this.#Ei=e.creationStackTraceTarget}setBackForwardCacheDetails(e){this.backForwardCacheDetails.restoredFromCache=!1,this.backForwardCacheDetails.explanations=e.notRestoredExplanations,this.backForwardCacheDetails.explanationsTree=e.notRestoredExplanationsTree}getResourcesMap(){return this.resourcesMap}setPrerenderFinalStatus(e){this.prerenderFinalStatus=e}setPrerenderDisallowedApiMethod(e){this.prerenderDisallowedApiMethod=e}}class Vn{#Er;constructor(e){this.#Er=e}backForwardCacheNotUsed(e){this.#Er.onBackForwardCacheNotUsed(e)}domContentEventFired({timestamp:e}){this.#Er.dispatchEventToListeners(_n.DOMContentLoaded,e)}loadEventFired({timestamp:e}){this.#Er.dispatchEventToListeners(_n.Load,{resourceTreeModel:this.#Er,loadTime:e})}lifecycleEvent({frameId:e,name:t}){this.#Er.dispatchEventToListeners(_n.LifecycleEvent,{frameId:e,name:t})}frameAttached({frameId:e,parentFrameId:t,stack:n}){this.#Er.frameAttached(e,t,n)}frameNavigated({frame:e,type:t}){this.#Er.frameNavigated(e,t)}documentOpened({frame:e}){this.#Er.documentOpened(e)}frameDetached({frameId:e,reason:t}){this.#Er.frameDetached(e,"swap"===t)}frameStartedLoading({}){}frameStoppedLoading({}){}frameRequestedNavigation({}){}frameScheduledNavigation({}){}frameClearedScheduledNavigation({}){}navigatedWithinDocument({}){}frameResized(){this.#Er.dispatchEventToListeners(_n.FrameResized)}javascriptDialogOpening(e){this.#Er.dispatchEventToListeners(_n.JavaScriptDialogOpening,e),e.hasBrowserHandler||this.#Er.agent.invoke_handleJavaScriptDialog({accept:!1})}javascriptDialogClosed({}){}screencastFrame({}){}screencastVisibilityChanged({}){}interstitialShown(){this.#Er.isInterstitialShowing=!0,this.#Er.dispatchEventToListeners(_n.InterstitialShown)}interstitialHidden(){this.#Er.isInterstitialShowing=!1,this.#Er.dispatchEventToListeners(_n.InterstitialHidden)}windowOpen({}){}compilationCacheProduced({}){}fileChooserOpened({}){}downloadWillBegin({}){}downloadProgress(){}}class Gn{#Er;constructor(e){this.#Er=e}ruleSetUpdated(e){}ruleSetRemoved(e){}prerenderAttemptCompleted(e){this.#Er.onPrerenderAttemptCompleted(e)}prefetchStatusUpdated(e){}prerenderStatusUpdated(e){}preloadEnabledStateUpdated(e){}preloadingAttemptSourcesUpdated(){}}c.register(jn,{capabilities:z.DOM,autostart:!0,early:!0});var Kn=Object.freeze({__proto__:null,ResourceTreeModel:jn,get Events(){return _n},ResourceTreeFrame:Wn,PageDispatcher:Vn});const $n={scriptRemovedOrDeleted:"Script removed or deleted.",unableToFetchScriptSource:"Unable to fetch script source."},Qn=s.i18n.registerUIStrings("core/sdk/Script.ts",$n),Xn=s.i18n.getLocalizedString.bind(void 0,Qn);let Jn=null;class Yn{debuggerModel;scriptId;sourceURL;lineOffset;columnOffset;endLine;endColumn;executionContextId;hash;#Oi;#Ni;sourceMapURL;debugSymbols;hasSourceURL;contentLength;originStackTrace;#Fi;#Bi;#Di;#Ui;isModule;constructor(e,t,n,r,s,i,a,o,l,d,c,h,u,g,p,m,f,b,y,v){this.debuggerModel=e,this.scriptId=t,this.sourceURL=n,this.lineOffset=r,this.columnOffset=s,this.endLine=i,this.endColumn=a,this.isModule=p,this.executionContextId=o,this.hash=l,this.#Oi=d,this.#Ni=c,this.sourceMapURL=h,this.debugSymbols=y,this.hasSourceURL=u,this.contentLength=g,this.originStackTrace=m,this.#Fi=f,this.#Bi=b,this.#Di=null,this.#Ui=v}embedderName(){return this.#Ui}target(){return this.debuggerModel.target()}static trimSourceURLComment(e){let t=e.lastIndexOf("//# sourceURL=");if(-1===t&&(t=e.lastIndexOf("//@ sourceURL="),-1===t))return e;const n=e.lastIndexOf("\n",t);if(-1===n)return e;return e.substr(n+1).match(er)?e.substr(0,n):e}isContentScript(){return this.#Oi}codeOffset(){return this.#Fi}isJavaScript(){return"JavaScript"===this.#Bi}isWasm(){return"WebAssembly"===this.#Bi}scriptLanguage(){return this.#Bi}executionContext(){return this.debuggerModel.runtimeModel().executionContext(this.executionContextId)}isLiveEdit(){return this.#Ni}contentURL(){return this.sourceURL}contentType(){return e.ResourceType.resourceTypes.Script}async loadTextContent(){const e=await this.debuggerModel.target().debuggerAgent().invoke_getScriptSource({scriptId:this.scriptId});if(e.getError())throw new Error(e.getError());const{scriptSource:t,bytecode:n}=e;if(n)return{content:n,isEncoded:!0};let r=t||"";return this.hasSourceURL&&this.sourceURL.startsWith("snippet://")&&(r=Yn.trimSourceURLComment(r)),{content:r,isEncoded:!1}}async loadWasmContent(){if(!this.isWasm())throw new Error("Not a wasm script");const t=await this.debuggerModel.target().debuggerAgent().invoke_disassembleWasmModule({scriptId:this.scriptId});if(t.getError())return this.loadTextContent();const{streamId:n,functionBodyOffsets:r,chunk:{lines:s,bytecodeOffsets:i}}=t,a=[],o=[];let l=s.reduce(((e,t)=>e+t.length+1),0);const d="",c=1e9-d.length;if(n)for(;;){const e=await this.debuggerModel.target().debuggerAgent().invoke_nextWasmDisassemblyChunk({streamId:n});if(e.getError())throw new Error(e.getError());const{chunk:{lines:t,bytecodeOffsets:r}}=e;if(l+=t.reduce(((e,t)=>e+t.length+1),0),0===t.length)break;if(l>=c){a.push([d]),o.push([0]);break}a.push(t),o.push(r)}const h=[];for(let e=0;ee){Jn||(Jn={cache:new Map,registry:new FinalizationRegistry((e=>Jn?.cache.delete(e)))});const e=[this.#Bi,this.contentLength,this.lineOffset,this.columnOffset,this.endLine,this.endColumn,this.#Fi,this.hash].join(":"),t=Jn.cache.get(e)?.deref();t?this.#Di=t:(this.#Di=this.requestContentInternal(),Jn.cache.set(e,new WeakRef(this.#Di)),Jn.registry.register(this.#Di,e))}else this.#Di=this.requestContentInternal()}return this.#Di}async requestContentInternal(){if(!this.scriptId)return{content:null,error:Xn($n.scriptRemovedOrDeleted),isEncoded:!1};try{return this.isWasm()?await this.loadWasmContent():await this.loadTextContent()}catch(e){return{content:null,error:Xn($n.unableToFetchScriptSource),isEncoded:!1}}}async getWasmBytecode(){const e=await this.debuggerModel.target().debuggerAgent().invoke_getWasmBytecode({scriptId:this.scriptId});return(await fetch(`data:application/wasm;base64,${e.bytecode}`)).arrayBuffer()}originalContentProvider(){return new r.StaticContentProvider.StaticContentProvider(this.contentURL(),this.contentType(),(()=>this.requestContent()))}async searchInContent(e,t,n){if(!this.scriptId)return[];return((await this.debuggerModel.target().debuggerAgent().invoke_searchInContent({scriptId:this.scriptId,query:e,caseSensitive:t,isRegex:n})).result||[]).map((e=>new r.ContentProvider.SearchMatch(e.lineNumber,e.lineContent)))}appendSourceURLCommentIfNeeded(e){return this.hasSourceURL?e+"\n //# sourceURL="+this.sourceURL:e}async editSource(e){e=Yn.trimSourceURLComment(e),e=this.appendSourceURLCommentIfNeeded(e);const{content:t}=await this.requestContent();if(t===e)return{changed:!1,status:"Ok"};const n=await this.debuggerModel.target().debuggerAgent().invoke_setScriptSource({scriptId:this.scriptId,scriptSource:e,allowTopFrameEditing:!0});if(n.getError())throw new Error(`Script#editSource failed for script with id ${this.scriptId}: ${n.getError()}`);return n.getError()||"Ok"!==n.status||(this.#Di=Promise.resolve({content:e,isEncoded:!1})),this.debuggerModel.dispatchEventToListeners(cr.ScriptSourceWasEdited,{script:this,status:n.status}),{changed:!0,status:n.status,exceptionDetails:n.exceptionDetails}}rawLocation(e,t){return this.containsLocation(e,t)?new ur(this.debuggerModel,this.scriptId,e,t):null}isInlineScript(){const e=!this.lineOffset&&!this.columnOffset;return!this.isWasm()&&Boolean(this.sourceURL)&&!e}isAnonymousScript(){return!this.sourceURL}async setBlackboxedRanges(e){return!(await this.debuggerModel.target().debuggerAgent().invoke_setBlackboxedRanges({scriptId:this.scriptId,positions:e})).getError()}containsLocation(e,t){const n=e===this.lineOffset&&t>=this.columnOffset||e>this.lineOffset,r=e=0:!(r>0)||t(e.start,n.end)<=0}if(0===e.length)return[];e.sort(((e,n)=>e.scriptIdn.scriptId?1:t(e.start,n.start)||t(e.end,n.end)));let r=e[0];const s=[];for(let i=1;ithis.#Hi.setEnabled(e.data)));const n=t.model(jn);n&&n.addEventListener(_n.FrameNavigated,this.onFrameNavigated,this)}sourceMapManager(){return this.#Hi}runtimeModel(){return this.runtimeModelInternal}debuggerEnabled(){return Boolean(this.#Vi)}debuggerId(){return this.#Gi}async enableDebugger(){if(this.#Vi)return;this.#Vi=!0;const t=o.Runtime.Runtime.queryParam("remoteFrontend")||o.Runtime.Runtime.queryParam("ws")?1e7:1e8,n=this.agent.invoke_enable({maxScriptsCacheSize:t});let r;o.Runtime.experiments.isEnabled(o.Runtime.ExperimentName.INSTRUMENTATION_BREAKPOINTS)&&(r=this.agent.invoke_setInstrumentationBreakpoint({instrumentation:"beforeScriptExecution"})),this.pauseOnExceptionStateChanged(),this.asyncStackTracesStateChanged(),e.Settings.Settings.instance().moduleSetting("breakpointsActive").get()||this.breakpointsActiveChanged(),this.dispatchEventToListeners(cr.DebuggerWasEnabled,this);const[s]=await Promise.all([n,r]);this.registerDebugger(s)}async syncDebuggerId(){const e=o.Runtime.Runtime.queryParam("remoteFrontend")||o.Runtime.Runtime.queryParam("ws")?1e7:1e8,t=this.agent.invoke_enable({maxScriptsCacheSize:e});return t.then(this.registerDebugger.bind(this)),t}onFrameNavigated(){or.shouldResyncDebuggerId||(or.shouldResyncDebuggerId=!0)}registerDebugger(e){if(e.getError())return;const{debuggerId:t}=e;lr.set(t,this),this.#Gi=t,this.dispatchEventToListeners(cr.DebuggerIsReadyToPause,this)}isReadyToPause(){return Boolean(this.#Gi)}static async modelForDebuggerId(e){return or.shouldResyncDebuggerId&&(await or.resyncDebuggerIdForModels(),or.shouldResyncDebuggerId=!1),lr.get(e)||null}static async resyncDebuggerIdForModels(){const e=lr.values();for(const t of e)t.debuggerEnabled()&&await t.syncDebuggerId()}async disableDebugger(){this.#Vi&&(this.#Vi=!1,await this.asyncStackTracesStateChanged(),await this.agent.invoke_disable(),this.#ea=!1,this.globalObjectCleared(),this.dispatchEventToListeners(cr.DebuggerWasDisabled,this),"string"==typeof this.#Gi&&lr.delete(this.#Gi),this.#Gi=null)}skipAllPauses(e){this.#Ki&&(clearTimeout(this.#Ki),this.#Ki=0),this.agent.invoke_setSkipAllPauses({skip:e})}skipAllPausesUntilReloadOrTimeout(e){this.#Ki&&clearTimeout(this.#Ki),this.agent.invoke_setSkipAllPauses({skip:!0}),this.#Ki=window.setTimeout(this.skipAllPauses.bind(this,!1),e)}pauseOnExceptionStateChanged(){const t=e.Settings.Settings.instance().moduleSetting("pauseOnCaughtException").get();let n;const r=e.Settings.Settings.instance().moduleSetting("pauseOnUncaughtException").get();n=t&&r?"all":t?"caught":r?"uncaught":"none",this.agent.invoke_setPauseOnExceptions({state:n})}asyncStackTracesStateChanged(){const t=!e.Settings.Settings.instance().moduleSetting("disableAsyncStackTraces").get()&&this.#Vi?32:0;return this.agent.invoke_setAsyncCallStackDepth({maxDepth:t})}breakpointsActiveChanged(){this.agent.invoke_setBreakpointsActive({active:e.Settings.Settings.instance().moduleSetting("breakpointsActive").get()})}setComputeAutoStepRangesCallback(e){this.#Qi=e}async computeAutoStepSkipList(e){let t=[];if(this.#Qi&&this.#qi&&this.#qi.callFrames.length>0){const[n]=this.#qi.callFrames;t=await this.#Qi.call(null,e,n)}return ir(t.map((({start:e,end:t})=>({scriptId:e.scriptId,start:{lineNumber:e.lineNumber,columnNumber:e.columnNumber},end:{lineNumber:t.lineNumber,columnNumber:t.columnNumber}}))))}async stepInto(){const e=await this.computeAutoStepSkipList(ar.StepInto);this.agent.invoke_stepInto({breakOnAsyncCall:!1,skipList:e})}async stepOver(){this.#Zi=this.#qi?.callFrames[0]?.functionLocation()??null;const e=await this.computeAutoStepSkipList(ar.StepOver);this.agent.invoke_stepOver({skipList:e})}async stepOut(){const e=await this.computeAutoStepSkipList(ar.StepOut);0!==e.length?this.agent.invoke_stepOver({skipList:e}):this.agent.invoke_stepOut()}scheduleStepIntoAsync(){this.computeAutoStepSkipList(ar.StepInto).then((e=>{this.agent.invoke_stepInto({breakOnAsyncCall:!0,skipList:e})}))}resume(){this.agent.invoke_resume({terminateOnResume:!1}),this.#ea=!1}pause(){this.#ea=!0,this.skipAllPauses(!1),this.agent.invoke_pause()}async setBreakpointByURL(n,r,s,a){let o;if(this.target().type()===_.Node&&n.startsWith("file://")){const r=e.ParsedURL.ParsedURL.urlToRawPathString(n,i.Platform.isWin());o=`${t.StringUtilities.escapeForRegExp(r)}|${t.StringUtilities.escapeForRegExp(n)}`,i.Platform.isWin()&&r.match(/^.:\\/)&&(o=`[${r[0].toUpperCase()}${r[0].toLowerCase()}]`+o.substr(1))}let l=0;const d=this.#zi.get(n)||[];for(let e=0,t=d.length;eur.fromPayload(this,e)))),{locations:h,breakpointId:c.breakpointId}}async setBreakpointInAnonymousScript(e,t,n,r){const s=await this.agent.invoke_setBreakpointByUrl({lineNumber:t,scriptHash:e,columnNumber:n,condition:r});if(s.getError())return{locations:[],breakpointId:null};let i=[];return s.locations&&(i=s.locations.map((e=>ur.fromPayload(this,e)))),{locations:i,breakpointId:s.breakpointId}}async removeBreakpoint(e){await this.agent.invoke_removeBreakpoint({breakpointId:e})}async getPossibleBreakpoints(e,t,n){const r=await this.agent.invoke_getPossibleBreakpoints({start:e.payload(),end:t?t.payload():void 0,restrictToFunction:n});return r.getError()||!r.locations?[]:r.locations.map((e=>gr.fromPayload(this,e)))}async fetchAsyncStackTrace(e){const t=await this.agent.invoke_getStackTrace({stackTraceId:e});return t.getError()?null:t.stackTrace}breakpointResolved(e,t){this.#Yi.dispatchEventToListeners(e,ur.fromPayload(this,t))}globalObjectCleared(){this.resetDebuggerPausedDetails(),this.reset(),this.dispatchEventToListeners(cr.GlobalObjectCleared,this)}reset(){for(const e of this.#_i.values())this.#Hi.detachSourceMap(e);this.#_i.clear(),this.#zi.clear(),this.#ji=[],this.#Zi=null}scripts(){return Array.from(this.#_i.values())}scriptForId(e){return this.#_i.get(e)||null}scriptsForSourceURL(e){return this.#zi.get(e)||[]}scriptsForExecutionContext(e){const t=[];for(const n of this.#_i.values())n.executionContextId===e.id&&t.push(n);return t}get callFrames(){return this.#qi?this.#qi.callFrames:null}debuggerPausedDetails(){return this.#qi}async setDebuggerPausedDetails(e){return this.#ea=!1,this.#qi=e,!(this.#$i&&!await this.#$i.call(null,e,this.#Zi))&&(this.#Zi=null,this.dispatchEventToListeners(cr.DebuggerPaused,this),this.setSelectedCallFrame(e.callFrames[0]),!0)}resetDebuggerPausedDetails(){this.#ea=!1,this.#qi=null,this.setSelectedCallFrame(null)}setBeforePausedCallback(e){this.#$i=e}setExpandCallFramesCallback(e){this.#Xi=e}setEvaluateOnCallFrameCallback(e){this.evaluateOnCallFrameCallback=e}setSynchronizeBreakpointsCallback(e){this.#Ji=e}async pausedScript(t,n,r,s,i,a){if("instrumentation"===n){const e=this.scriptForId(r.scriptId);return this.#Ji&&e&&await this.#Ji(e),void this.resume()}const o=new fr(this,t,n,r,s,i,a);if(this.#Xi&&(o.callFrames=await this.#Xi.call(null,o.callFrames)),this.continueToLocationCallback){const e=this.continueToLocationCallback;if(this.continueToLocationCallback=null,e(o))return}await this.setDebuggerPausedDetails(o)?e.EventTarget.fireEvent("DevTools.DebuggerPaused"):this.#Zi?this.stepOver():this.stepInto()}resumedScript(){this.resetDebuggerPausedDetails(),this.dispatchEventToListeners(cr.DebuggerResumed,this)}parsedScriptSource(e,t,n,r,s,a,o,l,d,c,h,u,g,p,m,f,b,y,v,I){const k=this.#_i.get(e);if(k)return k;let S=!1;d&&"isDefault"in d&&(S=!d.isDefault);const w=new Yn(this,e,t,n,r,s,a,o,l,S,c,h,u,p,m,f,b,y,v,I);this.registerScript(w),this.dispatchEventToListeners(cr.ParsedScriptSource,w),w.isInlineScript()&&!w.hasSourceURL&&(w.isModule?i.userMetrics.inlineScriptParsed(0):i.userMetrics.inlineScriptParsed(1)),w.sourceMapURL&&!g&&this.#Hi.attachSourceMap(w,w.sourceURL,w.sourceMapURL);return g&&w.isAnonymousScript()&&(this.#ji.push(w),this.collectDiscardedScripts()),w}setSourceMapURL(e,t){this.#Hi.detachSourceMap(e),e.sourceMapURL=t,this.#Hi.attachSourceMap(e,e.sourceURL,e.sourceMapURL)}async setDebugInfoURL(e,t){this.#Xi&&this.#qi&&(this.#qi.callFrames=await this.#Xi.call(null,this.#qi.callFrames)),this.dispatchEventToListeners(cr.DebugInfoAttached,e)}executionContextDestroyed(e){for(const t of this.#_i.values())t.executionContextId===e.id&&this.#Hi.detachSourceMap(t)}registerScript(e){if(this.#_i.set(e.scriptId,e),e.isAnonymousScript())return;let t=this.#zi.get(e.sourceURL);t||(t=[],this.#zi.set(e.sourceURL,t)),t.unshift(e)}unregisterScript(e){console.assert(e.isAnonymousScript()),this.#_i.delete(e.scriptId)}collectDiscardedScripts(){if(this.#ji.length<1e3)return;const e=this.#ji.splice(0,100);for(const t of e)this.unregisterScript(t),this.dispatchEventToListeners(cr.DiscardedAnonymousScriptSource,t)}createRawLocation(e,t,n,r){return this.createRawLocationByScriptId(e.scriptId,t,n,r)}createRawLocationByURL(e,t,n,r){for(const s of this.#zi.get(e)||[])if(!(s.lineOffset>t||s.lineOffset===t&&void 0!==n&&s.columnOffset>n||s.endLinenull===this.#Ta.axNodeForId(e)))}hasUnloadedChildren(){return!(!this.#Na||!this.#Na.length)&&this.#Na.some((e=>null===this.#Ta.axNodeForId(e)))}getFrameId(){return this.#Oa||this.parentNode()?.getFrameId()||null}}(Lr||(Lr={})).TreeUpdated="TreeUpdated";class Or extends c{agent;#Fa;#Ba;#Da;#Ua;#Ha;constructor(e){super(e),e.registerAccessibilityDispatcher(this),this.agent=e.accessibilityAgent(),this.resumeModel(),this.#Fa=new Map,this.#Ba=new Map,this.#Da=new Map,this.#Ua=new Map,this.#Ha=null}clear(){this.#Ha=null,this.#Fa.clear(),this.#Ba.clear(),this.#Da.clear()}async resumeModel(){await this.agent.invoke_enable()}async suspendModel(){await this.agent.invoke_disable()}async requestPartialAXTree(e){const{nodes:t}=await this.agent.invoke_getPartialAXTree({nodeId:e.id,fetchRelatives:!0});if(!t)return;const n=[];for(const e of t)n.push(new Ar(this,e))}loadComplete({root:e}){this.clear(),this.#Ha=new Ar(this,e),this.dispatchEventToListeners(Lr.TreeUpdated,{root:this.#Ha})}nodesUpdated({nodes:e}){this.createNodesFromPayload(e),this.dispatchEventToListeners(Lr.TreeUpdated,{})}createNodesFromPayload(e){return e.map((e=>new Ar(this,e)))}async requestRootNode(e){if(e&&this.#Da.has(e))return this.#Da.get(e);if(!e&&this.#Ha)return this.#Ha;const{node:t}=await this.agent.invoke_getRootAXNode({frameId:e});return t?this.createNodesFromPayload([t])[0]:void 0}async requestAXChildren(e,t){const n=this.#Fa.get(e);if(!n)throw Error("Cannot request children before parent");if(!n.hasUnloadedChildren())return n.children();const r=this.#Ua.get(e);if(r)await r;else{const n=this.agent.invoke_getChildAXNodes({id:e,frameId:t});this.#Ua.set(e,n);const r=await n;r.getError()||(this.createNodesFromPayload(r.nodes),this.#Ua.delete(e))}return n.children()}async requestAndLoadSubTreeToNode(e){const t=[];let n=this.axNodeForDOMNode(e);for(;n;){t.push(n);const e=n.parentNode();if(!e)return t;n=e}const{nodes:r}=await this.agent.invoke_getAXNodeAndAncestors({backendNodeId:e.backendNodeId()});if(!r)return null;return this.createNodesFromPayload(r)}axNodeForId(e){return this.#Fa.get(e)||null}setRootAXNodeForFrameId(e,t){this.#Da.set(e,t)}axNodeForFrameId(e){return this.#Da.get(e)??null}setAXNodeForAXId(e,t){this.#Fa.set(e,t)}axNodeForDOMNode(e){return e?this.#Ba.get(e.backendNodeId())??null:null}setAXNodeForBackendDOMNodeId(e,t){this.#Ba.set(e,t)}getAgent(){return this.agent}}c.register(Or,{capabilities:z.DOM,autostart:!1});var Nr=Object.freeze({__proto__:null,get CoreAxPropertyName(){return Pr},AccessibilityNode:Ar,get Events(){return Lr},AccessibilityModel:Or});class Fr{#qa;titleInternal;enabledInternal;constructor(e,t){this.#qa=e,this.titleInternal=t,this.enabledInternal=!1}category(){return this.#qa}enabled(){return this.enabledInternal}setEnabled(e){this.enabledInternal=e}title(){return this.titleInternal}setTitle(e){this.titleInternal=e}}var Br=Object.freeze({__proto__:null,CategorizedBreakpoint:Fr});class Dr{onMessage;#_a;#za;#ja;#ar;constructor(){this.onMessage=null,this.#_a=null,this.#za="",this.#ja=0,this.#ar=[i.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(i.InspectorFrontendHostAPI.Events.DispatchMessage,this.dispatchMessage,this),i.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(i.InspectorFrontendHostAPI.Events.DispatchMessageChunk,this.dispatchMessageChunk,this)]}setOnMessage(e){this.onMessage=e}setOnDisconnect(e){this.#_a=e}sendRawMessage(e){this.onMessage&&i.InspectorFrontendHost.InspectorFrontendHostInstance.sendMessageToBackend(e)}dispatchMessage(e){this.onMessage&&this.onMessage.call(null,e.data)}dispatchMessageChunk(e){const{messageChunk:t,messageSize:n}=e.data;n&&(this.#za="",this.#ja=n),this.#za+=t,this.#za.length===this.#ja&&this.onMessage&&(this.onMessage.call(null,this.#za),this.#za="",this.#ja=0)}async disconnect(){const t=this.#_a;e.EventTarget.removeEventListeners(this.#ar),this.#_a=null,this.onMessage=null,t&&t.call(null,"force disconnect")}}class Ur{#Wa;onMessage;#_a;#Va;#Ga;#Ka;constructor(e,t){this.#Wa=new WebSocket(e),this.#Wa.onerror=this.onError.bind(this),this.#Wa.onopen=this.onOpen.bind(this),this.#Wa.onmessage=e=>{this.onMessage&&this.onMessage.call(null,e.data)},this.#Wa.onclose=this.onClose.bind(this),this.onMessage=null,this.#_a=null,this.#Va=t,this.#Ga=!1,this.#Ka=[]}setOnMessage(e){this.onMessage=e}setOnDisconnect(e){this.#_a=e}onError(){this.#Va&&this.#Va.call(null),this.#_a&&this.#_a.call(null,"connection failed"),this.close()}onOpen(){if(this.#Ga=!0,this.#Wa){this.#Wa.onerror=console.error;for(const e of this.#Ka)this.#Wa.send(e)}this.#Ka=[]}onClose(){this.#Va&&this.#Va.call(null),this.#_a&&this.#_a.call(null,"websocket closed"),this.close()}close(e){this.#Wa&&(this.#Wa.onerror=null,this.#Wa.onopen=null,this.#Wa.onclose=e||null,this.#Wa.onmessage=null,this.#Wa.close(),this.#Wa=null),this.#Va=null}sendRawMessage(e){this.#Ga&&this.#Wa?this.#Wa.send(e):this.#Ka.push(e)}disconnect(){return new Promise((e=>{this.close((()=>{this.#_a&&this.#_a.call(null,"force disconnect"),e()}))}))}}class Hr{onMessage;#_a;constructor(){this.onMessage=null,this.#_a=null}setOnMessage(e){this.onMessage=e}setOnDisconnect(e){this.#_a=e}sendRawMessage(e){window.setTimeout(this.respondWithError.bind(this,e),0)}respondWithError(e){const t=JSON.parse(e),n={message:"This is a stub connection, can't dispatch message.",code:a.InspectorBackend.DevToolsStubErrorCode,data:t};this.onMessage&&this.onMessage.call(null,{id:t.id,error:n})}async disconnect(){this.#_a&&this.#_a.call(null,"force disconnect"),this.#_a=null,this.onMessage=null}}class qr{#$a;#Qa;onMessage;#_a;constructor(e,t){this.#$a=e,this.#Qa=t,this.onMessage=null,this.#_a=null}setOnMessage(e){this.onMessage=e}setOnDisconnect(e){this.#_a=e}getOnDisconnect(){return this.#_a}sendRawMessage(e){const t=JSON.parse(e);t.sessionId||(t.sessionId=this.#Qa),this.#$a.sendRawMessage(JSON.stringify(t))}getSessionId(){return this.#Qa}async disconnect(){this.#_a&&this.#_a.call(null,"force disconnect"),this.#_a=null,this.onMessage=null}}function _r(e){const t=o.Runtime.Runtime.queryParam("ws"),n=o.Runtime.Runtime.queryParam("wss");if(t||n){return new Ur(t?`ws://${t}`:`wss://${n}`,e)}return i.InspectorFrontendHost.InspectorFrontendHostInstance.isHostedMode()?new Hr:new Dr}var zr,jr=Object.freeze({__proto__:null,MainConnection:Dr,WebSocketConnection:Ur,StubConnection:Hr,ParallelConnection:qr,initMainConnection:async function(e,t){a.InspectorBackend.Connection.setFactory(_r.bind(null,t)),await e(),i.InspectorFrontendHost.InspectorFrontendHostInstance.connectionReady(),i.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(i.InspectorFrontendHostAPI.Events.ReattachRootTarget,(()=>{const t=K.instance().rootTarget();if(t){const e=t.router();e&&e.connection().disconnect()}e()}))}});class Wr extends c{#Xa;#Ja;#Ya;#Za=new Map;#eo=new Map;#to=new Map;#no=new Map;#ro=null;constructor(e){super(e),this.#Xa=e.targetManager(),this.#Ja=e,this.#Ya=e.targetAgent(),e.registerTargetDispatcher(this);const t=this.#Xa.browserTarget();t?t!==e&&t.targetAgent().invoke_autoAttachRelated({targetId:e.id(),waitForDebuggerOnStart:!0}):this.#Ya.invoke_setAutoAttach({autoAttach:!0,waitForDebuggerOnStart:!0,flatten:!0}),e.parentTarget()?.type()===_.Frame||i.InspectorFrontendHost.isUnderTest()||(this.#Ya.invoke_setDiscoverTargets({discover:!0}),this.#Ya.invoke_setRemoteLocations({locations:[{host:"localhost",port:9229}]}))}static install(e){Wr.attachCallback=e,c.register(Wr,{capabilities:z.Target,autostart:!0})}childTargets(){return Array.from(this.#eo.values())}async suspendModel(){await this.#Ya.invoke_setAutoAttach({autoAttach:!0,waitForDebuggerOnStart:!1,flatten:!0})}async resumeModel(){await this.#Ya.invoke_setAutoAttach({autoAttach:!0,waitForDebuggerOnStart:!0,flatten:!0})}dispose(){for(const e of this.#eo.keys())this.detachedFromTarget({sessionId:e,targetId:void 0})}targetCreated({targetInfo:e}){this.#Za.set(e.targetId,e),this.fireAvailableTargetsChanged(),this.dispatchEventToListeners(zr.TargetCreated,e)}targetInfoChanged({targetInfo:e}){this.#Za.set(e.targetId,e);const t=this.#to.get(e.targetId);if(t)if("prerender"!==t.targetInfo()?.subtype||e.subtype)t.updateTargetInfo(e);else{const n=t.model(jn);t.updateTargetInfo(e),n&&n.mainFrame&&n.primaryPageChanged(n.mainFrame,"Activation")}this.fireAvailableTargetsChanged(),this.dispatchEventToListeners(zr.TargetInfoChanged,e)}targetDestroyed({targetId:e}){this.#Za.delete(e),this.fireAvailableTargetsChanged(),this.dispatchEventToListeners(zr.TargetDestroyed,e)}targetCrashed({targetId:e,status:t,errorCode:n}){}fireAvailableTargetsChanged(){K.instance().dispatchEventToListeners($.AvailableTargetsChanged,[...this.#Za.values()])}async getParentTargetId(){return this.#ro||(this.#ro=(await this.#Ja.targetAgent().invoke_getTargetInfo({})).targetInfo.targetId),this.#ro}async attachedToTarget({sessionId:t,targetInfo:n,waitingForDebugger:r}){if(this.#ro===n.targetId)return;let s=_.Browser,i="";if("worker"===n.type&&n.title&&n.title!==n.url)i=n.title;else if(!["page","iframe","webview"].includes(n.type))if("chrome://print/"===n.url||n.url.startsWith("chrome://")&&n.url.endsWith(".top-chrome/"))s=_.Frame;else{const t=e.ParsedURL.ParsedURL.fromString(n.url);i=t?t.lastPathComponentWithFragment():"#"+ ++Wr.lastAnonymousTargetId,"devtools"===t?.scheme&&"other"===n.type&&(s=_.Frame)}"iframe"===n.type||"webview"===n.type||"background_page"===n.type||"app"===n.type||"popup_page"===n.type||"page"===n.type?s=_.Frame:"worker"===n.type?s=_.Worker:"shared_worker"===n.type?s=_.SharedWorker:"service_worker"===n.type?s=_.ServiceWorker:"auction_worklet"===n.type&&(s=_.AuctionWorklet);const a=this.#Xa.createTarget(n.targetId,i,s,this.#Ja,t,void 0,void 0,n);this.#eo.set(t,a),this.#to.set(a.id(),a),Wr.attachCallback&&await Wr.attachCallback({target:a,waitingForDebugger:r}),r&&a.runtimeAgent().invoke_runIfWaitingForDebugger()}detachedFromTarget({sessionId:e}){if(this.#no.has(e))this.#no.delete(e);else{const t=this.#eo.get(e);t&&(t.dispose("target terminated"),this.#eo.delete(e),this.#to.delete(t.id()))}}receivedMessageFromTarget({}){}async createParallelConnection(e){const t=await this.getParentTargetId(),{connection:n,sessionId:r}=await this.createParallelConnectionAndSessionForTarget(this.#Ja,t);return n.setOnMessage(e),this.#no.set(r,n),{connection:n,sessionId:r}}async createParallelConnectionAndSessionForTarget(e,t){const n=e.targetAgent(),r=e.router(),s=(await n.invoke_attachToTarget({targetId:t,flatten:!0})).sessionId,i=new qr(r.connection(),s);return r.registerSession(e,s,i),i.setOnDisconnect((()=>{r.unregisterSession(s),n.invoke_detachFromTarget({sessionId:s})})),{connection:i,sessionId:s}}targetInfos(){return Array.from(this.#Za.values())}static lastAnonymousTargetId=0;static attachCallback}!function(e){e.TargetCreated="TargetCreated",e.TargetDestroyed="TargetDestroyed",e.TargetInfoChanged="TargetInfoChanged"}(zr||(zr={}));var Vr=Object.freeze({__proto__:null,ChildTargetManager:Wr,get Events(){return zr}});const Gr={couldNotLoadContentForSS:"Could not load content for {PH1} ({PH2})"},Kr=s.i18n.registerUIStrings("core/sdk/CompilerSourceMappingContentProvider.ts",Gr),$r=s.i18n.getLocalizedString.bind(void 0,Kr);var Qr,Xr,Jr=Object.freeze({__proto__:null,CompilerSourceMappingContentProvider:class{#so;#io;#ao;constructor(e,t,n){this.#so=e,this.#io=t,this.#ao=n}contentURL(){return this.#so}contentType(){return this.#io}async requestContent(){try{const{content:e}=await Ht.instance().loadResource(this.#so,this.#ao);return{content:e,isEncoded:!1}}catch(e){const t=$r(Gr.couldNotLoadContentForSS,{PH1:this.#so,PH2:e.message});return console.error(t),{content:null,error:t,isEncoded:!1}}}async searchInContent(e,t,n){const{content:s}=await this.requestContent();return"string"!=typeof s?[]:r.TextUtils.performSearchInContent(s,e,t,n)}}});!function(e){e.Result="result",e.Command="command",e.System="system",e.QueryObjectResult="queryObjectResult"}(Qr||(Qr={})),function(e){e.CSS="css",e.ConsoleAPI="console-api"}(Xr||(Xr={}));const Yr={profileD:"Profile {PH1}"},Zr=s.i18n.registerUIStrings("core/sdk/CPUProfilerModel.ts",Yr),es=s.i18n.getLocalizedString.bind(void 0,Zr);class ts extends c{#oo;#lo;#do;#co;#ho;#uo;registeredConsoleProfileMessages=[];constructor(e){super(e),this.#oo=!1,this.#lo=1,this.#do=new Map,this.#co=e.profilerAgent(),this.#ho=null,e.registerProfilerDispatcher(this),this.#co.invoke_enable(),this.#uo=e.model(or)}runtimeModel(){return this.#uo.runtimeModel()}debuggerModel(){return this.#uo}consoleProfileStarted({id:e,location:t,title:n}){n||(n=es(Yr.profileD,{PH1:this.#lo++}),this.#do.set(e,n));const r=this.createEventDataFrom(e,t,n);this.dispatchEventToListeners(ns.ConsoleProfileStarted,r)}consoleProfileFinished({id:e,location:t,profile:n,title:r}){r||(r=this.#do.get(e),this.#do.delete(e));const s={...this.createEventDataFrom(e,t,r),cpuProfile:n};this.registeredConsoleProfileMessages.push(s),this.dispatchEventToListeners(ns.ConsoleProfileFinished,s)}createEventDataFrom(e,t,n){const r=ur.fromPayload(this.#uo,t);return{id:this.target().id()+"."+e,scriptLocation:r,title:n||"",cpuProfilerModel:this}}isRecordingProfile(){return this.#oo}startRecording(){this.#oo=!0;return this.#co.invoke_setSamplingInterval({interval:100}),this.#co.invoke_start()}stopRecording(){return this.#oo=!1,this.#co.invoke_stop().then((e=>e.profile||null))}startPreciseCoverage(e,t){this.#ho=t;return this.#co.invoke_startPreciseCoverage({callCount:!1,detailed:e,allowTriggeredUpdates:!0})}async takePreciseCoverage(){const e=await this.#co.invoke_takePreciseCoverage();return{timestamp:e&&e.timestamp||0,coverage:e&&e.result||[]}}stopPreciseCoverage(){return this.#ho=null,this.#co.invoke_stopPreciseCoverage()}preciseCoverageDeltaUpdate({timestamp:e,occasion:t,result:n}){this.#ho&&this.#ho(e,t,n)}}var ns;!function(e){e.ConsoleProfileStarted="ConsoleProfileStarted",e.ConsoleProfileFinished="ConsoleProfileFinished"}(ns||(ns={})),c.register(ts,{capabilities:z.JS,autostart:!0});var rs,ss=Object.freeze({__proto__:null,CPUProfilerModel:ts,get Events(){return ns}});class is extends c{#go;constructor(e){super(e),e.registerLogDispatcher(this),this.#go=e.logAgent(),this.#go.invoke_enable(),i.InspectorFrontendHost.isUnderTest()||this.#go.invoke_startViolationsReport({config:[{name:"longTask",threshold:200},{name:"longLayout",threshold:30},{name:"blockedEvent",threshold:100},{name:"blockedParser",threshold:-1},{name:"handler",threshold:150},{name:"recurringHandler",threshold:50},{name:"discouragedAPIUse",threshold:-1}]})}entryAdded({entry:e}){this.dispatchEventToListeners(rs.EntryAdded,{logModel:this,entry:e})}requestClear(){this.#go.invoke_clear()}}(rs||(rs={})).EntryAdded="EntryAdded",c.register(is,{capabilities:z.Log,autostart:!0});var as=Object.freeze({__proto__:null,LogModel:is,get Events(){return rs}});const os={navigatedToS:"Navigated to {PH1}",bfcacheNavigation:"Navigation to {PH1} was restored from back/forward cache (see https://web.dev/bfcache/)",profileSStarted:"Profile ''{PH1}'' started.",profileSFinished:"Profile ''{PH1}'' finished.",failedToSaveToTempVariable:"Failed to save to temp variable."},ls=s.i18n.registerUIStrings("core/sdk/ConsoleModel.ts",os),ds=s.i18n.getLocalizedString.bind(void 0,ls);class cs extends c{#po;#mo;#fo;#bo;#yo;#vo;#Io;#ko;constructor(n){super(n),this.#po=[],this.#mo=new t.MapUtilities.Multimap,this.#fo=new Map,this.#bo=0,this.#yo=0,this.#vo=0,this.#Io=0,this.#ko=new WeakMap;const r=n.model(jn);if(!r||r.cachedResourcesLoaded())return void this.initTarget(n);const s=r.addEventListener(_n.CachedResourcesLoaded,(()=>{e.EventTarget.removeEventListeners([s]),this.initTarget(n)}))}initTarget(e){const t=[],n=e.model(ts);n&&(t.push(n.addEventListener(ns.ConsoleProfileStarted,this.consoleProfileStarted.bind(this,n))),t.push(n.addEventListener(ns.ConsoleProfileFinished,this.consoleProfileFinished.bind(this,n))));const r=e.model(jn);r&&e.parentTarget()?.type()!==_.Frame&&t.push(r.addEventListener(_n.PrimaryPageChanged,this.primaryPageChanged,this));const s=e.model(Cr);s&&(t.push(s.addEventListener(Rr.ExceptionThrown,this.exceptionThrown.bind(this,s))),t.push(s.addEventListener(Rr.ExceptionRevoked,this.exceptionRevoked.bind(this,s))),t.push(s.addEventListener(Rr.ConsoleAPICalled,this.consoleAPICalled.bind(this,s))),e.parentTarget()?.type()!==_.Frame&&t.push(s.debuggerModel().addEventListener(cr.GlobalObjectCleared,this.clearIfNecessary,this)),t.push(s.addEventListener(Rr.QueryObjectRequested,this.queryObjectRequested.bind(this,s)))),this.#ko.set(e,t)}targetRemoved(t){const n=t.model(Cr);n&&this.#fo.delete(n),e.EventTarget.removeEventListeners(this.#ko.get(t)||[])}async evaluateCommandInConsole(t,n,r,s){const a=await t.evaluate({expression:r,objectGroup:"console",includeCommandLineAPI:s,silent:!1,returnByValue:!1,generatePreview:!0,replMode:!0,allowUnsafeEvalBlockedByCSP:!1},e.Settings.Settings.instance().moduleSetting("consoleUserActivationEval").get(),!1);i.userMetrics.actionTaken(i.UserMetrics.Action.ConsoleEvaluated),"error"in a||(await e.Console.Console.instance().showPromise(),this.dispatchEventToListeners(hs.CommandEvaluated,{result:a.object,commandMessage:n,exceptionDetails:a.exceptionDetails}))}addCommandMessage(e,t){const n=new gs(e.runtimeModel,"javascript",null,t,{type:Qr.Command});return n.setExecutionContextId(e.id),this.addMessage(n),n}addMessage(e){e.setPageLoadSequenceNumber(this.#Io),e.source===Xr.ConsoleAPI&&"clear"===e.type&&this.clearIfNecessary(),this.#po.push(e),this.#mo.set(e.timestamp,e);const t=e.runtimeModel(),n=e.getExceptionId();if(n&&t){let r=this.#fo.get(t);r||(r=new Map,this.#fo.set(t,r)),r.set(n,e)}this.incrementErrorWarningCount(e),this.dispatchEventToListeners(hs.MessageAdded,e)}exceptionThrown(e,t){const n=t.data,r=function(e){if(!e)return;return{requestId:e.requestId||void 0,issueId:e.issueId||void 0}}(n.details.exceptionMetaData),s=gs.fromException(e,n.details,void 0,n.timestamp,void 0,r);s.setExceptionId(n.details.exceptionId),this.addMessage(s)}exceptionRevoked(e,t){const n=t.data,r=this.#fo.get(e),s=r?r.get(n):null;s&&(this.#yo--,s.level="verbose",this.dispatchEventToListeners(hs.MessageUpdated,s))}consoleAPICalled(e,t){const n=t.data;let r="info";"debug"===n.type?r="verbose":"error"===n.type||"assert"===n.type?r="error":"warning"===n.type?r="warning":"info"!==n.type&&"log"!==n.type||(r="info");let s="";n.args.length&&n.args[0].unserializableValue?s=n.args[0].unserializableValue:!n.args.length||"object"==typeof n.args[0].value&&null!==n.args[0].value?n.args.length&&n.args[0].description&&(s=n.args[0].description):s=String(n.args[0].value);const i=n.stackTrace&&n.stackTrace.callFrames.length?n.stackTrace.callFrames[0]:null,a={type:n.type,url:i?.url,line:i?.lineNumber,column:i?.columnNumber,parameters:n.args,stackTrace:n.stackTrace,timestamp:n.timestamp,executionContextId:n.executionContextId,context:n.context},o=new gs(e,Xr.ConsoleAPI,r,s,a);for(const e of this.#mo.get(o.timestamp).values())if(o.isEqual(e))return;this.addMessage(o)}queryObjectRequested(e,t){const{objects:n,executionContextId:r}=t.data,s={type:Qr.QueryObjectResult,parameters:[n],executionContextId:r},i=new gs(e,Xr.ConsoleAPI,"info","",s);this.addMessage(i)}clearIfNecessary(){e.Settings.Settings.instance().moduleSetting("preserveConsoleLog").get()||this.clear(),++this.#Io}primaryPageChanged(t){if(e.Settings.Settings.instance().moduleSetting("preserveConsoleLog").get()){const{frame:n}=t.data;n.backForwardCacheDetails.restoredFromCache?e.Console.Console.instance().log(ds(os.bfcacheNavigation,{PH1:n.url})):e.Console.Console.instance().log(ds(os.navigatedToS,{PH1:n.url}))}}consoleProfileStarted(e,t){const{data:n}=t;this.addConsoleProfileMessage(e,"profile",n.scriptLocation,ds(os.profileSStarted,{PH1:n.title}))}consoleProfileFinished(e,t){const{data:n}=t;this.addConsoleProfileMessage(e,"profileEnd",n.scriptLocation,ds(os.profileSFinished,{PH1:n.title}))}addConsoleProfileMessage(e,t,n,r){const s=n.script(),i=[{functionName:"",scriptId:n.scriptId,url:s?s.contentURL():"",lineNumber:n.lineNumber,columnNumber:n.columnNumber||0}];this.addMessage(new gs(e.runtimeModel(),Xr.ConsoleAPI,"info",r,{type:t,stackTrace:{callFrames:i}}))}incrementErrorWarningCount(e){if("violation"!==e.source)switch(e.level){case"warning":this.#bo++;break;case"error":this.#yo++}else this.#vo++}messages(){return this.#po}static allMessagesUnordered(){const e=[];for(const t of K.instance().targets()){const n=t.model(cs)?.messages()||[];e.push(...n)}return e}static requestClearMessages(){for(const e of K.instance().models(is))e.requestClear();for(const e of K.instance().models(Cr))e.discardConsoleEntries();for(const e of K.instance().targets())e.model(cs)?.clear()}clear(){this.#po=[],this.#mo.clear(),this.#fo.clear(),this.#yo=0,this.#bo=0,this.#vo=0,this.dispatchEventToListeners(hs.ConsoleCleared)}errors(){return this.#yo}static allErrors(){let e=0;for(const t of K.instance().targets())e+=t.model(cs)?.errors()||0;return e}warnings(){return this.#bo}static allWarnings(){let e=0;for(const t of K.instance().targets())e+=t.model(cs)?.warnings()||0;return e}violations(){return this.#vo}static allViolations(){let e=0;for(const t of K.instance().targets())e+=t.model(cs)?.violations()||0;return e}async saveToTempVariable(t,n){if(!n||!t)return void o(null);const r=t,s=await r.globalObject("",!1);if("error"in s||Boolean(s.exceptionDetails)||!s.object)return void o("object"in s&&s.object||null);const i=s.object,a=await i.callFunction((function(e){const t="temp";let n=1;for(;t+n in this;)++n;const r=t+n;return this[r]=e,r}),[Le.toCallArgument(n)]);if(i.release(),a.wasThrown||!a.object||"string"!==a.object.type)o(a.object||null);else{const e=a.object.value,t=this.addCommandMessage(r,e);this.evaluateCommandInConsole(r,t,e,!1)}function o(t){let n=ds(os.failedToSaveToTempVariable);t&&(n=n+" "+t.description),e.Console.Console.instance().error(n)}a.object&&a.object.release()}}var hs;function us(e,t){if(!e!=!t)return!1;if(!e||!t)return!0;const n=e.callFrames,r=t.callFrames;if(n.length!==r.length)return!1;for(let e=0,t=n.length;et.includes(e)));if(-1===n||n===e.length-1)return{callFrame:null,type:null};const r=e[n].url===br?"LOGPOINT":"CONDITIONAL_BREAKPOINT";return{callFrame:e[n+1],type:r}}}c.register(cs,{capabilities:z.JS,autostart:!0});const ps=new Map([["xml","xml"],["javascript","javascript"],["network","network"],[Xr.ConsoleAPI,"console-api"],["storage","storage"],["appcache","appcache"],["rendering","rendering"],[Xr.CSS,"css"],["security","security"],["deprecation","deprecation"],["worker","worker"],["violation","violation"],["intervention","intervention"],["recommendation","recommendation"],["other","other"]]);var ms=Object.freeze({__proto__:null,ConsoleModel:cs,get Events(){return hs},ConsoleMessage:gs,MessageSourceDisplayName:ps,get FrontendMessageSource(){return Xr},get FrontendMessageType(){return Qr}});class fs extends c{#Mo;#Po;constructor(e){super(e),this.#Mo=new Map,this.#Po=new Map}addBlockedCookie(e,t){const n=e.key(),r=this.#Mo.get(n);this.#Mo.set(n,e),t?this.#Po.set(e,t):this.#Po.delete(e),r&&this.#Po.delete(r)}getCookieToBlockedReasonsMap(){return this.#Po}async getCookies(e){const t=await this.target().networkAgent().invoke_getCookies({urls:e});if(t.getError())return[];return t.cookies.map(F.fromProtocolCookie).concat(Array.from(this.#Mo.values()))}async deleteCookie(e){await this.deleteCookies([e])}async clear(e,t){const n=await this.getCookiesForDomain(e||null);if(t){const e=n.filter((e=>e.matchesSecurityOrigin(t)));await this.deleteCookies(e)}else await this.deleteCookies(n)}async saveCookie(e){let t,n=e.domain();n.startsWith(".")||(n=""),e.expires()&&(t=Math.floor(Date.parse(`${e.expires()}`)/1e3));const r=o.Runtime.experiments.isEnabled("experimentalCookieFeatures"),s={name:e.name(),value:e.value(),url:e.url()||void 0,domain:n,path:e.path(),secure:e.secure(),httpOnly:e.httpOnly(),sameSite:e.sameSite(),expires:t,priority:e.priority(),partitionKey:e.partitionKey(),sourceScheme:r?e.sourceScheme():(i=e.sourceScheme(),"Unset"===i?i:void 0),sourcePort:r?e.sourcePort():void 0};var i;const a=await this.target().networkAgent().invoke_setCookie(s);return!(a.getError()||!a.success)&&a.success}getCookiesForDomain(t){const n=[];const r=this.target().model(jn);return r&&(r.mainFrame&&r.mainFrame.unreachableUrl()&&n.push(r.mainFrame.unreachableUrl()),r.forAllResources((function(r){const s=e.ParsedURL.ParsedURL.fromString(r.documentURL);return!s||t&&s.securityOrigin()!==t||n.push(r.url),!1}))),this.getCookies(n)}async deleteCookies(e){const t=this.target().networkAgent();this.#Mo.clear(),this.#Po.clear(),await Promise.all(e.map((e=>t.invoke_deleteCookies({name:e.name(),url:void 0,domain:e.domain(),path:e.path()}))))}}c.register(fs,{capabilities:z.Network,autostart:!1});var bs=Object.freeze({__proto__:null,CookieModel:fs});class ys extends A{id;self;positionTicks;deoptReason;constructor(e,t,n){super(e.callFrame||{functionName:e.functionName,scriptId:e.scriptId,url:e.url,lineNumber:e.lineNumber-1,columnNumber:e.columnNumber-1},n),this.id=e.id,this.self=(e.hitCount||0)*t,this.positionTicks=e.positionTicks,this.deoptReason=e.deoptReason&&"no reason"!==e.deoptReason?e.deoptReason:null}}var vs=Object.freeze({__proto__:null,CPUProfileNode:ys,CPUProfileDataModel:class extends O{profileStartTime;profileEndTime;timestamps;samples;lines;totalHitCount;profileHead;#Lo;gcNode;programNode;idleNode;#Eo;#Ao;constructor(e,t){super(t);Boolean(e.head)?(this.profileStartTime=1e3*e.startTime,this.profileEndTime=1e3*e.endTime,this.timestamps=e.timestamps,this.compatibilityConversionHeadToNodes(e)):(this.profileStartTime=e.startTime/1e3,this.profileEndTime=e.endTime/1e3,this.timestamps=this.convertTimeDeltas(e)),this.samples=e.samples,this.lines=e.lines,this.totalHitCount=0,this.profileHead=this.translateProfileTree(e.nodes),this.initialize(this.profileHead),this.extractMetaNodes(),this.samples&&(this.sortSamples(),this.normalizeTimestamps(),this.fixMissingSamples())}compatibilityConversionHeadToNodes(e){if(!e.head||e.nodes)return;const t=[];!function e(n){return t.push(n),n.children=n.children.map(e),n.id}(e.head),e.nodes=t,delete e.head}convertTimeDeltas(e){if(!e.timeDeltas)return[];let t=e.startTime;const n=new Array(e.timeDeltas.length);for(let r=0;re+(t.hitCount||0)),0);const r=(this.profileEndTime-this.profileStartTime)/this.totalHitCount,s=Boolean(e.Settings.Settings.instance().moduleSetting("showNativeFunctionsInJSProfile").get()),i=t[0],a=new Map([[i.id,i.id]]);this.#Lo=new Map;const o=new ys(i,r,this.target());if(this.#Lo.set(i.id,o),!i.children)throw new Error("Missing children for root");const l=i.children.map((()=>o)),d=i.children.map((e=>n.get(e)));for(;d.length;){let e=l.pop();const t=d.pop();if(!t||!e)continue;t.children||(t.children=[]);const i=new ys(t,r,this.target());s||!((c=t).callFrame?Boolean(c.callFrame.url)&&c.callFrame.url.startsWith("native "):Boolean(c.url)&&c.url.startsWith("native "))?(e.children.push(i),e=i):e.self+=i.self,a.set(t.id,e.id),l.push.apply(l,t.children.map((()=>e))),d.push.apply(d,t.children.map((e=>n.get(e)))),this.#Lo.set(t.id,i)}var c;return this.samples&&(this.samples=this.samples.map((e=>a.get(e)))),o}sortSamples(){if(!this.timestamps||!this.samples)return;const e=this.timestamps,t=this.samples,n=e.map(((e,t)=>t));n.sort(((t,n)=>e[t]-e[n])),this.timestamps=[],this.samples=[];for(let r=0;r=s));I++){const t=i[I];if(t===p)continue;v=o.get(t);let r=o.get(p);if(v!==l){if(r===l&&m){const e=b[h],t=g-e;y[h-1]+=t,n(m.depth+1,l,e,t,t-y[h]),--h,r=m,p=r.id,m=null}for(;v&&v.depth>r.depth;)u.push(v),v=v.parent;for(;r!==v;){const e=b[h],t=g-e;y[h-1]+=t,n(r.depth,r,e,t,t-y[h]),--h,v&&v.depth===r.depth&&(u.push(v),v=v.parent),r=r.parent}for(;u.length;){const t=u.pop();v=t,e(t.depth,t,g),b[++h]=g,y[h]=0}p=t}else m=r,e(m.depth+1,l,g),b[++h]=g,y[h]=0,p=t}if(g=a[I]||this.profileEndTime,m&&o.get(p)===l){const e=b[h],t=g-e;y[h-1]+=t,n(m.depth+1,v,e,t,t-y[h]),--h,p=m.id}for(let e=o.get(p);e&&e.parent;e=e.parent){const t=b[h],r=g-t;y[h-1]+=r,n(e.depth,e,t,r,r-y[h]),--h}}nodeByIndex(e){return this.samples&&this.#Lo.get(this.samples[e])||null}nodes(){return this.#Lo?[...this.#Lo.values()]:null}}});class Is extends c{#Oo;#No;#jr;#Fo;#Bo;#Do;#Uo;#Ho;#qo;#_o;constructor(t){super(t),this.#Oo=t.emulationAgent(),this.#No=t.deviceOrientationAgent(),this.#jr=t.model(en),this.#Fo=t.model(vn),this.#Fo&&this.#Fo.addEventListener(In.InspectModeWillBeToggled,(()=>{this.updateTouch()}),this);const n=e.Settings.Settings.instance().moduleSetting("javaScriptDisabled");n.addChangeListener((async()=>await this.#Oo.invoke_setScriptExecutionDisabled({value:n.get()}))),n.get()&&this.#Oo.invoke_setScriptExecutionDisabled({value:!0});const r=e.Settings.Settings.instance().moduleSetting("emulation.touch");r.addChangeListener((()=>{const e=r.get();this.overrideEmulateTouch("force"===e)}));const s=e.Settings.Settings.instance().moduleSetting("emulation.idleDetection");s.addChangeListener((async()=>{const e=s.get();if("none"===e)return void await this.clearIdleOverride();const t=JSON.parse(e);await this.setIdleOverride(t)}));const i=e.Settings.Settings.instance().moduleSetting("emulatedCSSMedia"),a=e.Settings.Settings.instance().moduleSetting("emulatedCSSMediaFeatureColorGamut"),o=e.Settings.Settings.instance().moduleSetting("emulatedCSSMediaFeaturePrefersColorScheme"),l=e.Settings.Settings.instance().moduleSetting("emulatedCSSMediaFeatureForcedColors"),d=e.Settings.Settings.instance().moduleSetting("emulatedCSSMediaFeaturePrefersContrast"),c=e.Settings.Settings.instance().moduleSetting("emulatedCSSMediaFeaturePrefersReducedData"),h=e.Settings.Settings.instance().moduleSetting("emulatedCSSMediaFeaturePrefersReducedMotion");this.#Bo=new Map([["type",i.get()],["color-gamut",a.get()],["prefers-color-scheme",o.get()],["forced-colors",l.get()],["prefers-contrast",d.get()],["prefers-reduced-data",c.get()],["prefers-reduced-motion",h.get()]]),i.addChangeListener((()=>{this.#Bo.set("type",i.get()),this.updateCssMedia()})),a.addChangeListener((()=>{this.#Bo.set("color-gamut",a.get()),this.updateCssMedia()})),o.addChangeListener((()=>{this.#Bo.set("prefers-color-scheme",o.get()),this.updateCssMedia()})),l.addChangeListener((()=>{this.#Bo.set("forced-colors",l.get()),this.updateCssMedia()})),d.addChangeListener((()=>{this.#Bo.set("prefers-contrast",d.get()),this.updateCssMedia()})),c.addChangeListener((()=>{this.#Bo.set("prefers-reduced-data",c.get()),this.updateCssMedia()})),h.addChangeListener((()=>{this.#Bo.set("prefers-reduced-motion",h.get()),this.updateCssMedia()})),this.updateCssMedia();const u=e.Settings.Settings.instance().moduleSetting("emulateAutoDarkMode");u.addChangeListener((()=>{const e=u.get();o.setDisabled(e),o.set(e?"dark":""),this.emulateAutoDarkMode(e)})),u.get()&&(o.setDisabled(!0),o.set("dark"),this.emulateAutoDarkMode(!0));const g=e.Settings.Settings.instance().moduleSetting("emulatedVisionDeficiency");g.addChangeListener((()=>this.emulateVisionDeficiency(g.get()))),g.get()&&this.emulateVisionDeficiency(g.get());const p=e.Settings.Settings.instance().moduleSetting("localFontsDisabled");p.addChangeListener((()=>this.setLocalFontsDisabled(p.get()))),p.get()&&this.setLocalFontsDisabled(p.get());const m=e.Settings.Settings.instance().moduleSetting("avifFormatDisabled"),f=e.Settings.Settings.instance().moduleSetting("webpFormatDisabled"),b=()=>{const e=[];m.get()&&e.push("avif"),f.get()&&e.push("webp"),this.setDisabledImageTypes(e)};m.addChangeListener(b),f.addChangeListener(b),(m.get()||f.get())&&b(),this.#Ho=!0,this.#Do=!1,this.#Uo=!1,this.#qo=!1,this.#_o={enabled:!1,configuration:"mobile"}}setTouchEmulationAllowed(e){this.#Ho=e}supportsDeviceEmulation(){return this.target().hasAllCapabilities(z.DeviceEmulation)}async resetPageScaleFactor(){await this.#Oo.invoke_resetPageScaleFactor()}async emulateDevice(e){e?await this.#Oo.invoke_setDeviceMetricsOverride(e):await this.#Oo.invoke_clearDeviceMetricsOverride()}overlayModel(){return this.#Fo}async emulateLocation(e){if(!e||e.error)await Promise.all([this.#Oo.invoke_clearGeolocationOverride(),this.#Oo.invoke_setTimezoneOverride({timezoneId:""}),this.#Oo.invoke_setLocaleOverride({locale:""}),this.#Oo.invoke_setUserAgentOverride({userAgent:ue.instance().currentUserAgent()})]);else{function t(e,t){const n=t.getError();return n?Promise.reject({type:e,message:n}):Promise.resolve()}await Promise.all([this.#Oo.invoke_setGeolocationOverride({latitude:e.latitude,longitude:e.longitude,accuracy:ks.defaultGeoMockAccuracy}).then((e=>t("emulation-set-location",e))),this.#Oo.invoke_setTimezoneOverride({timezoneId:e.timezoneId}).then((e=>t("emulation-set-timezone",e))),this.#Oo.invoke_setLocaleOverride({locale:e.locale}).then((e=>t("emulation-set-locale",e))),this.#Oo.invoke_setUserAgentOverride({userAgent:ue.instance().currentUserAgent(),acceptLanguage:e.locale}).then((e=>t("emulation-set-user-agent",e)))])}}async emulateDeviceOrientation(e){e?await this.#No.invoke_setDeviceOrientationOverride({alpha:e.alpha,beta:e.beta,gamma:e.gamma}):await this.#No.invoke_clearDeviceOrientationOverride()}async setIdleOverride(e){await this.#Oo.invoke_setIdleOverride(e)}async clearIdleOverride(){await this.#Oo.invoke_clearIdleOverride()}async emulateCSSMedia(e,t){await this.#Oo.invoke_setEmulatedMedia({media:e,features:t}),this.#jr&&this.#jr.mediaQueryResultChanged()}async emulateAutoDarkMode(e){e&&(this.#Bo.set("prefers-color-scheme","dark"),await this.updateCssMedia()),await this.#Oo.invoke_setAutoDarkModeOverride({enabled:e||void 0})}async emulateVisionDeficiency(e){await this.#Oo.invoke_setEmulatedVisionDeficiency({type:e})}setLocalFontsDisabled(e){this.#jr&&this.#jr.setLocalFontsEnabled(!e)}setDisabledImageTypes(e){this.#Oo.invoke_setDisabledImageTypes({imageTypes:e})}async setCPUThrottlingRate(e){await this.#Oo.invoke_setCPUThrottlingRate({rate:e})}async setHardwareConcurrency(e){if(e<1)throw new Error("hardwareConcurrency must be a positive value");await this.#Oo.invoke_setHardwareConcurrencyOverride({hardwareConcurrency:e})}async emulateTouch(e,t){this.#Do=e&&this.#Ho,this.#Uo=t&&this.#Ho,await this.updateTouch()}async overrideEmulateTouch(e){this.#qo=e&&this.#Ho,await this.updateTouch()}async updateTouch(){let e={enabled:this.#Do,configuration:this.#Uo?"mobile":"desktop"};this.#qo&&(e={enabled:!0,configuration:"mobile"}),this.#Fo&&this.#Fo.inspectModeEnabled()&&(e={enabled:!1,configuration:"mobile"}),(this.#_o.enabled||e.enabled)&&(this.#_o.enabled&&e.enabled&&this.#_o.configuration===e.configuration||(this.#_o=e,await this.#Oo.invoke_setTouchEmulationEnabled({enabled:e.enabled,maxTouchPoints:1}),await this.#Oo.invoke_setEmitTouchEventsForMouse({enabled:e.enabled,configuration:e.configuration})))}async updateCssMedia(){const e=this.#Bo.get("type")??"",t=[{name:"color-gamut",value:this.#Bo.get("color-gamut")??""},{name:"prefers-color-scheme",value:this.#Bo.get("prefers-color-scheme")??""},{name:"forced-colors",value:this.#Bo.get("forced-colors")??""},{name:"prefers-contrast",value:this.#Bo.get("prefers-contrast")??""},{name:"prefers-reduced-data",value:this.#Bo.get("prefers-reduced-data")??""},{name:"prefers-reduced-motion",value:this.#Bo.get("prefers-reduced-motion")??""}];return this.emulateCSSMedia(e,t)}}class ks{latitude;longitude;timezoneId;locale;error;constructor(e,t,n,r,s){this.latitude=e,this.longitude=t,this.timezoneId=n,this.locale=r,this.error=s}static parseSetting(e){if(e){const[t,n,r,s]=e.split(":"),[i,a]=t.split("@");return new ks(parseFloat(i),parseFloat(a),n,r,Boolean(s))}return new ks(0,0,"","",!1)}static parseUserInput(e,t,n,r){if(!e&&!t)return null;const{valid:s}=ks.latitudeValidator(e),{valid:i}=ks.longitudeValidator(t);if(!s&&!i)return null;const a=s?parseFloat(e):-1,o=i?parseFloat(t):-1;return new ks(a,o,n,r,!1)}static latitudeValidator(e){const t=parseFloat(e);return{valid:/^([+-]?[\d]+(\.\d+)?|[+-]?\.\d+)$/.test(e)&&t>=-90&&t<=90,errorMessage:void 0}}static longitudeValidator(e){const t=parseFloat(e);return{valid:/^([+-]?[\d]+(\.\d+)?|[+-]?\.\d+)$/.test(e)&&t>=-180&&t<=180,errorMessage:void 0}}static timezoneIdValidator(e){return{valid:""===e||/[a-zA-Z]/.test(e),errorMessage:void 0}}static localeValidator(e){return{valid:""===e||/[a-zA-Z]{2}/.test(e),errorMessage:void 0}}toSetting(){return`${this.latitude}@${this.longitude}:${this.timezoneId}:${this.locale}:${this.error||""}`}static defaultGeoMockAccuracy=150}class Ss{alpha;beta;gamma;constructor(e,t,n){this.alpha=e,this.beta=t,this.gamma=n}static parseSetting(e){if(e){const t=JSON.parse(e);return new Ss(t.alpha,t.beta,t.gamma)}return new Ss(0,0,0)}static parseUserInput(e,t,n){if(!e&&!t&&!n)return null;const{valid:r}=Ss.alphaAngleValidator(e),{valid:s}=Ss.betaAngleValidator(t),{valid:i}=Ss.gammaAngleValidator(n);if(!r&&!s&&!i)return null;const a=r?parseFloat(e):-1,o=s?parseFloat(t):-1,l=i?parseFloat(n):-1;return new Ss(a,o,l)}static angleRangeValidator(e,t){const n=parseFloat(e);return{valid:/^([+-]?[\d]+(\.\d+)?|[+-]?\.\d+)$/.test(e)&&n>=t.minimum&&n{this.#Wo=n=>{e(n),t(n)}}:e=>{this.#Wo=e});const n=await e.runtimeAgent().invoke_evaluate({expression:"navigator.hardwareConcurrency",returnByValue:!0,silent:!0,throwOnSideEffect:!0}),r=n.getError();if(r)throw new Error(r);const{result:s,exceptionDetails:i}=n;if(i)throw new Error(i.text);return s.value}modelAdded(e){if(this.#zo!==xs.NoThrottling&&e.setCPUThrottlingRate(this.#zo),void 0!==this.#jo&&e.setHardwareConcurrency(this.#jo),this.#Wo){const e=this.#Wo;this.#Wo=void 0,this.getHardwareConcurrency().then(e)}}modelRemoved(e){}}var Rs,xs;!function(e){e.RateChanged="RateChanged",e.HardwareConcurrencyChanged="HardwareConcurrencyChanged"}(Rs||(Rs={})),function(e){e[e.NoThrottling=1]="NoThrottling",e[e.MidTierMobile=4]="MidTierMobile",e[e.LowEndMobile=6]="LowEndMobile"}(xs||(xs={}));var Ms=Object.freeze({__proto__:null,CPUThrottlingManager:Ts,get Events(){return Rs},throttlingManager:function(){return Ts.instance()},get CPUThrottlingRates(){return xs}});const Ps=new Set(["inherit","initial","unset"]),Ls=/[\x20-\x7E]{4}/,Es=new RegExp(`(?:'(${Ls.source})')|(?:"(${Ls.source})")\\s+(${/[+-]?(?:\d*\.)?\d+(?:[eE]\d+)?/.source})`);const As=/^"(.+)"|'(.+)'$/;function Os(e){return e.split(",").map((e=>e.trim()))}function Ns(e){return e.replaceAll(/(\/\*(?:.|\s)*?\*\/)/g,"")}var Fs=Object.freeze({__proto__:null,parseFontVariationSettings:function(e){if(Ps.has(e.trim())||"normal"===e.trim())return[];const t=[];for(const n of Os(Ns(e))){const e=n.match(Es);e&&t.push({tag:e[1]||e[2],value:parseFloat(e[3])})}return t},parseFontFamily:function(e){if(Ps.has(e.trim()))return[];const t=[];for(const n of Os(Ns(e))){const e=n.match(As);e?t.push(e[1]||e[2]):t.push(n)}return t},splitByComma:Os,stripComments:Ns});const Bs={trustedTypeViolations:"Trusted Type Violations",sinkViolations:"Sink Violations",policyViolations:"Policy Violations",animation:"Animation",canvas:"Canvas",geolocation:"Geolocation",notification:"Notification",parse:"Parse",script:"Script",timer:"Timer",window:"Window",webaudio:"WebAudio",media:"Media",pictureinpicture:"Picture-in-Picture",clipboard:"Clipboard",control:"Control",device:"Device",domMutation:"DOM Mutation",dragDrop:"Drag / drop",keyboard:"Keyboard",load:"Load",mouse:"Mouse",pointer:"Pointer",touch:"Touch",xhr:"XHR",setTimeoutOrIntervalFired:"{PH1} fired",scriptFirstStatement:"Script First Statement",scriptBlockedByContentSecurity:"Script Blocked by Content Security Policy",requestAnimationFrame:"Request Animation Frame",cancelAnimationFrame:"Cancel Animation Frame",animationFrameFired:"Animation Frame Fired",webglErrorFired:"WebGL Error Fired",webglWarningFired:"WebGL Warning Fired",setInnerhtml:"Set `innerHTML`",createCanvasContext:"Create canvas context",createAudiocontext:"Create `AudioContext`",closeAudiocontext:"Close `AudioContext`",resumeAudiocontext:"Resume `AudioContext`",suspendAudiocontext:"Suspend `AudioContext`",webglErrorFiredS:"WebGL Error Fired ({PH1})",scriptBlockedDueToContent:"Script blocked due to Content Security Policy directive: {PH1}",worker:"Worker"},Ds=s.i18n.registerUIStrings("core/sdk/DOMDebuggerModel.ts",Bs),Us=s.i18n.getLocalizedString.bind(void 0,Ds);class Hs extends c{agent;#ba;#Mr;#Vo;#Go;suspended=!1;constructor(t){super(t),this.agent=t.domdebuggerAgent(),this.#ba=t.model(Cr),this.#Mr=t.model(Pn),this.#Mr.addEventListener(wn.DocumentUpdated,this.documentUpdated,this),this.#Mr.addEventListener(wn.NodeRemoved,this.nodeRemoved,this),this.#Vo=[],this.#Go=e.Settings.Settings.instance().createLocalSetting("domBreakpoints",[]),this.#Mr.existingDocument()&&this.documentUpdated()}runtimeModel(){return this.#ba}async suspendModel(){this.suspended=!0}async resumeModel(){this.suspended=!1}async eventListeners(e){if(console.assert(e.runtimeModel()===this.#ba),!e.objectId)return[];const t=await this.agent.invoke_getEventListeners({objectId:e.objectId}),n=[];for(const r of t.listeners||[]){const t=this.#ba.debuggerModel().createRawLocationByScriptId(r.scriptId,r.lineNumber,r.columnNumber);t&&n.push(new js(this,e,r.type,r.useCapture,r.passive,r.once,r.handler?this.#ba.createRemoteObject(r.handler):null,r.originalHandler?this.#ba.createRemoteObject(r.originalHandler):null,t,null))}return n}retrieveDOMBreakpoints(){this.#Mr.requestDocument()}domBreakpoints(){return this.#Vo.slice()}hasDOMBreakpoint(e,t){return this.#Vo.some((n=>n.node===e&&n.type===t))}setDOMBreakpoint(e,t){for(const n of this.#Vo)if(n.node===e&&n.type===t)return this.toggleDOMBreakpoint(n,!0),n;const n=new zs(this,e,t,!0);return this.#Vo.push(n),this.saveDOMBreakpoints(),this.enableDOMBreakpoint(n),this.dispatchEventToListeners(qs.DOMBreakpointAdded,n),n}removeDOMBreakpoint(e,t){this.removeDOMBreakpoints((n=>n.node===e&&n.type===t))}removeAllDOMBreakpoints(){this.removeDOMBreakpoints((e=>!0))}toggleDOMBreakpoint(e,t){t!==e.enabled&&(e.enabled=t,t?this.enableDOMBreakpoint(e):this.disableDOMBreakpoint(e),this.dispatchEventToListeners(qs.DOMBreakpointToggled,e))}enableDOMBreakpoint(e){e.node.id&&(this.agent.invoke_setDOMBreakpoint({nodeId:e.node.id,type:e.type}),e.node.setMarker(_s,!0))}disableDOMBreakpoint(e){e.node.id&&(this.agent.invoke_removeDOMBreakpoint({nodeId:e.node.id,type:e.type}),e.node.setMarker(_s,!!this.nodeHasBreakpoints(e.node)||null))}nodeHasBreakpoints(e){for(const t of this.#Vo)if(t.node===e&&t.enabled)return!0;return!1}resolveDOMBreakpointData(e){const t=e.type,n=this.#Mr.nodeForId(e.nodeId);if(!t||!n)return null;let r=null,s=!1;return"subtree-modified"===t&&(s=e.insertion||!1,r=this.#Mr.nodeForId(e.targetNodeId)),{type:t,node:n,targetNode:r,insertion:s}}currentURL(){const e=this.#Mr.existingDocument();return e?e.documentURL:t.DevToolsPath.EmptyUrlString}async documentUpdated(){if(this.suspended)return;const e=this.#Vo;this.#Vo=[],this.dispatchEventToListeners(qs.DOMBreakpointsRemoved,e);const n=await this.#Mr.requestDocument(),r=n?n.documentURL:t.DevToolsPath.EmptyUrlString;for(const e of this.#Go.get())e.url===r&&this.#Mr.pushNodeByPathToFrontend(e.path).then(s.bind(this,e));function s(e,t){const n=t?this.#Mr.nodeForId(t):null;if(!n)return;const r=new zs(this,n,e.type,e.enabled);this.#Vo.push(r),e.enabled&&this.enableDOMBreakpoint(r),this.dispatchEventToListeners(qs.DOMBreakpointAdded,r)}}removeDOMBreakpoints(e){const t=[],n=[];for(const r of this.#Vo)e(r)?(t.push(r),r.enabled&&(r.enabled=!1,this.disableDOMBreakpoint(r))):n.push(r);t.length&&(this.#Vo=n,this.saveDOMBreakpoints(),this.dispatchEventToListeners(qs.DOMBreakpointsRemoved,t))}nodeRemoved(e){if(this.suspended)return;const{node:t}=e.data,n=t.children()||[];this.removeDOMBreakpoints((e=>e.node===t||-1!==n.indexOf(e.node)))}saveDOMBreakpoints(){const e=this.currentURL(),t=this.#Go.get().filter((t=>t.url!==e));for(const n of this.#Vo)t.push({url:e,path:n.node.path(),type:n.type,enabled:n.enabled});this.#Go.set(t)}}var qs;!function(e){e.DOMBreakpointAdded="DOMBreakpointAdded",e.DOMBreakpointToggled="DOMBreakpointToggled",e.DOMBreakpointsRemoved="DOMBreakpointsRemoved"}(qs||(qs={}));const _s="breakpoint-marker";class zs{domDebuggerModel;node;type;enabled;constructor(e,t,n,r){this.domDebuggerModel=e,this.node=t,this.type=n,this.enabled=r}}class js{#Ko;#$o;#p;#Qo;#Xo;#Jo;#Yo;#Zo;#na;#el;#tl;#nl;constructor(e,n,r,s,i,a,o,l,d,c,h){this.#Ko=e,this.#$o=n,this.#p=r,this.#Qo=s,this.#Xo=i,this.#Jo=a,this.#Yo=o,this.#Zo=l||o,this.#na=d;const u=d.script();this.#el=u?u.contentURL():t.DevToolsPath.EmptyUrlString,this.#tl=c,this.#nl=h||js.Origin.Raw}domDebuggerModel(){return this.#Ko}type(){return this.#p}useCapture(){return this.#Qo}passive(){return this.#Xo}once(){return this.#Jo}handler(){return this.#Yo}location(){return this.#na}sourceURL(){return this.#el}originalHandler(){return this.#Zo}canRemove(){return Boolean(this.#tl)||this.#nl!==js.Origin.FrameworkUser}remove(){if(!this.canRemove())return Promise.resolve(void 0);if(this.#nl!==js.Origin.FrameworkUser){function e(e,t,n){this.removeEventListener(e,t,n),this["on"+e]&&(this["on"+e]=void 0)}return this.#$o.callFunction(e,[Le.toCallArgument(this.#p),Le.toCallArgument(this.#Zo),Le.toCallArgument(this.#Qo)]).then((()=>{}))}if(this.#tl){function e(e,t,n,r){this.call(null,e,t,n,r)}return this.#tl.callFunction(e,[Le.toCallArgument(this.#p),Le.toCallArgument(this.#Zo),Le.toCallArgument(this.#Qo),Le.toCallArgument(this.#Xo)]).then((()=>{}))}return Promise.resolve(void 0)}canTogglePassive(){return this.#nl!==js.Origin.FrameworkUser}togglePassive(){return this.#$o.callFunction((function(e,t,n,r){this.removeEventListener(e,t,{capture:n}),this.addEventListener(e,t,{capture:n,passive:!r})}),[Le.toCallArgument(this.#p),Le.toCallArgument(this.#Zo),Le.toCallArgument(this.#Qo),Le.toCallArgument(this.#Xo)]).then((()=>{}))}origin(){return this.#nl}markAsFramework(){this.#nl=js.Origin.Framework}isScrollBlockingType(){return"touchstart"===this.#p||"touchmove"===this.#p||"mousewheel"===this.#p||"wheel"===this.#p}}!function(e){let t;!function(e){e.Raw="Raw",e.Framework="Framework",e.FrameworkUser="FrameworkUser"}(t=e.Origin||(e.Origin={}))}(js||(js={}));class Ws extends Fr{#p;constructor(e,t,n){super(e,t),this.#p=n}type(){return this.#p}}class Vs extends Fr{instrumentationName;eventName;eventTargetNames;constructor(e,t,n,r,s){super(r,s),this.instrumentationName=e,this.eventName=t,this.eventTargetNames=n}setEnabled(e){if(this.enabled()!==e){super.setEnabled(e);for(const e of K.instance().models(Hs))this.updateOnModel(e)}}updateOnModel(e){if(this.instrumentationName)this.enabled()?e.agent.invoke_setInstrumentationBreakpoint({eventName:this.instrumentationName}):e.agent.invoke_removeInstrumentationBreakpoint({eventName:this.instrumentationName});else for(const t of this.eventTargetNames)this.enabled()?e.agent.invoke_setEventListenerBreakpoint({eventName:this.eventName,targetName:t}):e.agent.invoke_removeEventListenerBreakpoint({eventName:this.eventName,targetName:t})}static listener="listener:";static instrumentation="instrumentation:"}let Gs;class Ks{#rl;#sl;#il;#al;constructor(){this.#rl=e.Settings.Settings.instance().createLocalSetting("xhrBreakpoints",[]),this.#sl=new Map;for(const e of this.#rl.get())this.#sl.set(e.url,e.enabled);this.#il=[],this.#il.push(new Ws(Us(Bs.trustedTypeViolations),Us(Bs.sinkViolations),"trustedtype-sink-violation")),this.#il.push(new Ws(Us(Bs.trustedTypeViolations),Us(Bs.policyViolations),"trustedtype-policy-violation")),this.#al=[],this.createInstrumentationBreakpoints(Us(Bs.animation),["requestAnimationFrame","cancelAnimationFrame","requestAnimationFrame.callback"]),this.createInstrumentationBreakpoints(Us(Bs.canvas),["canvasContextCreated","webglErrorFired","webglWarningFired"]),this.createInstrumentationBreakpoints(Us(Bs.geolocation),["Geolocation.getCurrentPosition","Geolocation.watchPosition"]),this.createInstrumentationBreakpoints(Us(Bs.notification),["Notification.requestPermission"]),this.createInstrumentationBreakpoints(Us(Bs.parse),["Element.setInnerHTML","Document.write"]),this.createInstrumentationBreakpoints(Us(Bs.script),["scriptFirstStatement","scriptBlockedByCSP"]),this.createInstrumentationBreakpoints(Us(Bs.timer),["setTimeout","clearTimeout","setInterval","clearInterval","setTimeout.callback","setInterval.callback"]),this.createInstrumentationBreakpoints(Us(Bs.window),["DOMWindow.close"]),this.createInstrumentationBreakpoints(Us(Bs.webaudio),["audioContextCreated","audioContextClosed","audioContextResumed","audioContextSuspended"]),this.createEventListenerBreakpoints(Us(Bs.media),["play","pause","playing","canplay","canplaythrough","seeking","seeked","timeupdate","ended","ratechange","durationchange","volumechange","loadstart","progress","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","waiting"],["audio","video"]),this.createEventListenerBreakpoints(Us(Bs.pictureinpicture),["enterpictureinpicture","leavepictureinpicture"],["video"]),this.createEventListenerBreakpoints(Us(Bs.pictureinpicture),["resize"],["PictureInPictureWindow"]),this.createEventListenerBreakpoints(Us(Bs.pictureinpicture),["enter"],["documentPictureInPicture"]),this.createEventListenerBreakpoints(Us(Bs.clipboard),["copy","cut","paste","beforecopy","beforecut","beforepaste"],["*"]),this.createEventListenerBreakpoints(Us(Bs.control),["resize","scroll","scrollend","zoom","focus","blur","select","change","submit","reset"],["*"]),this.createEventListenerBreakpoints(Us(Bs.device),["deviceorientation","devicemotion"],["*"]),this.createEventListenerBreakpoints(Us(Bs.domMutation),["DOMActivate","DOMFocusIn","DOMFocusOut","DOMAttrModified","DOMCharacterDataModified","DOMNodeInserted","DOMNodeInsertedIntoDocument","DOMNodeRemoved","DOMNodeRemovedFromDocument","DOMSubtreeModified","DOMContentLoaded"],["*"]),this.createEventListenerBreakpoints(Us(Bs.dragDrop),["drag","dragstart","dragend","dragenter","dragover","dragleave","drop"],["*"]),this.createEventListenerBreakpoints(Us(Bs.keyboard),["keydown","keyup","keypress","input"],["*"]),this.createEventListenerBreakpoints(Us(Bs.load),["load","beforeunload","unload","abort","error","hashchange","popstate","navigate","navigatesuccess","navigateerror","currentchange","navigateto","navigatefrom","finish","dispose"],["*"]),this.createEventListenerBreakpoints(Us(Bs.mouse),["auxclick","click","dblclick","mousedown","mouseup","mouseover","mousemove","mouseout","mouseenter","mouseleave","mousewheel","wheel","contextmenu"],["*"]),this.createEventListenerBreakpoints(Us(Bs.pointer),["pointerover","pointerout","pointerenter","pointerleave","pointerdown","pointerup","pointermove","pointercancel","gotpointercapture","lostpointercapture","pointerrawupdate"],["*"]),this.createEventListenerBreakpoints(Us(Bs.touch),["touchstart","touchmove","touchend","touchcancel"],["*"]),this.createEventListenerBreakpoints(Us(Bs.worker),["message","messageerror"],["*"]),this.createEventListenerBreakpoints(Us(Bs.xhr),["readystatechange","load","loadstart","loadend","abort","error","progress","timeout"],["xmlhttprequest","xmlhttprequestupload"]);for(const[e,t]of[["setTimeout.callback",Us(Bs.setTimeoutOrIntervalFired,{PH1:"setTimeout"})],["setInterval.callback",Us(Bs.setTimeoutOrIntervalFired,{PH1:"setInterval"})],["scriptFirstStatement",Us(Bs.scriptFirstStatement)],["scriptBlockedByCSP",Us(Bs.scriptBlockedByContentSecurity)],["requestAnimationFrame",Us(Bs.requestAnimationFrame)],["cancelAnimationFrame",Us(Bs.cancelAnimationFrame)],["requestAnimationFrame.callback",Us(Bs.animationFrameFired)],["webglErrorFired",Us(Bs.webglErrorFired)],["webglWarningFired",Us(Bs.webglWarningFired)],["Element.setInnerHTML",Us(Bs.setInnerhtml)],["canvasContextCreated",Us(Bs.createCanvasContext)],["Geolocation.getCurrentPosition","getCurrentPosition"],["Geolocation.watchPosition","watchPosition"],["Notification.requestPermission","requestPermission"],["DOMWindow.close","window.close"],["Document.write","document.write"],["audioContextCreated",Us(Bs.createAudiocontext)],["audioContextClosed",Us(Bs.closeAudiocontext)],["audioContextResumed",Us(Bs.resumeAudiocontext)],["audioContextSuspended",Us(Bs.suspendAudiocontext)]]){const n=this.resolveEventListenerBreakpointInternal("instrumentation:"+e);n&&n.setTitle(t)}K.instance().observeModels(Hs,this)}static instance(e={forceNew:null}){const{forceNew:t}=e;return Gs&&!t||(Gs=new Ks),Gs}cspViolationBreakpoints(){return this.#il.slice()}createInstrumentationBreakpoints(e,t){for(const n of t)this.#al.push(new Vs(n,"",[],e,n))}createEventListenerBreakpoints(e,t,n){for(const r of t)this.#al.push(new Vs("",r,n,e,r))}resolveEventListenerBreakpointInternal(e,t){const n="instrumentation:",r="listener:";let s="";if(e.startsWith(n))s=e.substring(n.length),e="";else{if(!e.startsWith(r))return null;e=e.substring(r.length)}t=(t||"*").toLowerCase();let i=null;for(const n of this.#al)s&&n.instrumentationName===s&&(i=n),e&&n.eventName===e&&-1!==n.eventTargetNames.indexOf(t)&&(i=n),!i&&e&&n.eventName===e&&-1!==n.eventTargetNames.indexOf("*")&&(i=n);return i}eventListenerBreakpoints(){return this.#al.slice()}resolveEventListenerBreakpointTitle(e){const t=e.eventName;if("instrumentation:webglErrorFired"===t&&e.webglErrorName){let t=e.webglErrorName;return t=t.replace(/^.*(0x[0-9a-f]+).*$/i,"$1"),Us(Bs.webglErrorFiredS,{PH1:t})}if("instrumentation:scriptBlockedByCSP"===t&&e.directiveText)return Us(Bs.scriptBlockedDueToContent,{PH1:e.directiveText});const n=this.resolveEventListenerBreakpointInternal(t,e.targetName);return n?e.targetName?e.targetName+"."+n.title():n.title():""}resolveEventListenerBreakpoint(e){return this.resolveEventListenerBreakpointInternal(e.eventName,e.targetName)}updateCSPViolationBreakpoints(){const e=this.#il.filter((e=>e.enabled())).map((e=>e.type()));for(const t of K.instance().models(Hs))this.updateCSPViolationBreakpointsForModel(t,e)}updateCSPViolationBreakpointsForModel(e,t){e.agent.invoke_setBreakOnCSPViolation({violationTypes:t})}xhrBreakpoints(){return this.#sl}saveXHRBreakpoints(){const e=[];for(const t of this.#sl.keys())e.push({url:t,enabled:this.#sl.get(t)||!1});this.#rl.set(e)}addXHRBreakpoint(e,t){if(this.#sl.set(e,t),t)for(const t of K.instance().models(Hs))t.agent.invoke_setXHRBreakpoint({url:e});this.saveXHRBreakpoints()}removeXHRBreakpoint(e){const t=this.#sl.get(e);if(this.#sl.delete(e),t)for(const t of K.instance().models(Hs))t.agent.invoke_removeXHRBreakpoint({url:e});this.saveXHRBreakpoints()}toggleXHRBreakpoint(e,t){this.#sl.set(e,t);for(const n of K.instance().models(Hs))t?n.agent.invoke_setXHRBreakpoint({url:e}):n.agent.invoke_removeXHRBreakpoint({url:e});this.saveXHRBreakpoints()}modelAdded(e){for(const t of this.#sl.keys())this.#sl.get(t)&&e.agent.invoke_setXHRBreakpoint({url:t});for(const t of this.#al)t.enabled()&&t.updateOnModel(e);const t=this.#il.filter((e=>e.enabled())).map((e=>e.type()));this.updateCSPViolationBreakpointsForModel(e,t)}modelRemoved(e){}}c.register(Hs,{capabilities:z.DOM,autostart:!1});var $s=Object.freeze({__proto__:null,DOMDebuggerModel:Hs,get Events(){return qs},DOMBreakpoint:zs,get EventListener(){return js},CSPViolationBreakpoint:Ws,DOMEventListenerBreakpoint:Vs,DOMDebuggerManager:Ks});const Qs={auctionWorklet:"Ad Auction Worklet",beforeBidderWorkletBiddingStart:"Bidder Bidding Phase Start",beforeBidderWorkletReportingStart:"Bidder Reporting Phase Start",beforeSellerWorkletScoringStart:"Seller Scoring Phase Start",beforeSellerWorkletReportingStart:"Seller Reporting Phase Start"},Xs=s.i18n.registerUIStrings("core/sdk/EventBreakpointsModel.ts",Qs),Js=s.i18n.getLocalizedString.bind(void 0,Xs);class Ys extends c{agent;constructor(e){super(e),this.agent=e.eventBreakpointsAgent()}}class Zs extends Fr{instrumentationName;constructor(e,t){super(t,function(e){switch(e){case"beforeBidderWorkletBiddingStart":return Js(Qs.beforeBidderWorkletBiddingStart);case"beforeBidderWorkletReportingStart":return Js(Qs.beforeBidderWorkletReportingStart);case"beforeSellerWorkletScoringStart":return Js(Qs.beforeSellerWorkletScoringStart);case"beforeSellerWorkletReportingStart":return Js(Qs.beforeSellerWorkletReportingStart)}}(e)),this.instrumentationName=e}setEnabled(e){if(this.enabled()!==e){super.setEnabled(e);for(const e of K.instance().models(Ys))this.updateOnModel(e)}}updateOnModel(e){this.enabled()?e.agent.invoke_setInstrumentationBreakpoint({eventName:this.instrumentationName}):e.agent.invoke_removeInstrumentationBreakpoint({eventName:this.instrumentationName})}static instrumentationPrefix="instrumentation:"}let ei;class ti{#al=[];constructor(){this.createInstrumentationBreakpoints(Js(Qs.auctionWorklet),["beforeBidderWorkletBiddingStart","beforeBidderWorkletReportingStart","beforeSellerWorkletScoringStart","beforeSellerWorkletReportingStart"]),K.instance().observeModels(Ys,this)}static instance(e={forceNew:null}){const{forceNew:t}=e;return ei&&!t||(ei=new ti),ei}createInstrumentationBreakpoints(e,t){for(const n of t)this.#al.push(new Zs(n,e))}eventListenerBreakpoints(){return this.#al.slice()}resolveEventListenerBreakpointTitle(e){const t=this.resolveEventListenerBreakpoint(e);return t?t.title():null}resolveEventListenerBreakpoint(e){const t=e.eventName;if(!t.startsWith(Zs.instrumentationPrefix))return null;const n=t.substring(Zs.instrumentationPrefix.length);return this.#al.find((e=>e.instrumentationName===n))||null}modelAdded(e){for(const t of this.#al)t.enabled()&&t.updateOnModel(e)}modelRemoved(e){}}c.register(Ys,{capabilities:z.EventBreakpoints,autostart:!1});var ni=Object.freeze({__proto__:null,EventBreakpointsModel:Ys,EventBreakpointsManager:ti});class ri{#ol;#ll;#dl;#cl;#hl;#ul;#gl;#pl;#ml;#fl;#bl;#yl;#vl=[];constructor(e){this.#ol=e,this.#ll=new Map,this.#dl=new Map,this.#cl=Number(1/0),this.#hl=Number(-1/0),this.#ul=[],this.#gl=[],this.#pl=new Map,this.#ml=new Map,this.#fl=new Map,this.#bl=new Map,this.#yl=new Map}static isTopLevelEvent(e){return vi(e,li)&&"RunTask"===e.name||vi(e,ai)||vi(e,oi)&&"Program"===e.name}static extractId(e){const t=e.scope||"";if(void 0===e.id2)return t&&e.id?`${t}@${e.id}`:e.id;const n=e.id2;if("object"==typeof n&&"global"in n!="local"in n)return void 0!==n.global?`:${t}:${n.global}`:`:${t}:${e.pid}:${n.local}`;console.error(`Unexpected id2 field at ${e.ts/1e3}, one and only one of 'local' and 'global' should be present.`)}static browserMainThread(t){const n=t.sortedProcesses();if(!n.length)return null;const r="CrBrowserMain",s=[],i=[];for(const e of n)e.name().toLowerCase().endsWith("browser")&&s.push(e),i.push(...e.sortedThreads().filter((e=>e.name()===r)));if(1===i.length)return i[0];if(1===s.length)return s[0].threadByName(r);const a=t.devToolsMetadataEvents().filter((e=>"TracingStartedInBrowser"===e.name));return 1===a.length?a[0].thread:(e.Console.Console.instance().error("Failed to find browser main thread in trace, some timeline features may be unavailable"),null)}allRawEvents(){return this.#vl}devToolsMetadataEvents(){return this.#ul}addEvents(e){for(let t=0;te.#kl!==t.#kl?e.#kl-t.#kl:e.name().localeCompare(t.name())))}setName(e){this.#u=e}name(){return this.#u}id(){return this.idInternal}setSortIndex(e){this.#kl=e}getModel(){return this.model}}class fi extends mi{threads;#Sl;constructor(e,t){super(e,t),this.threads=new Map,this.#Sl=new Map}threadById(e){let t=this.threads.get(e);return t||(t=new bi(this,e),this.threads.set(e,t)),t}threadByName(e){return this.#Sl.get(e)||null}setThreadByName(e,t){this.#Sl.set(e,t)}addEvent(e){return this.threadById(e.tid).addEvent(e)}sortedThreads(){return mi.sort([...this.threads.values()])}}class bi extends mi{#wl;#Cl;#Tl;#Rl;constructor(e,t){super(e.getModel(),t),this.#wl=e,this.#Cl=[],this.#Tl=[],this.#Rl=null}#xl(e,t){return e.phase===t}tracingComplete(){this.#Tl.sort(di.compareStartTime),this.#Cl.sort(di.compareStartTime);const e=[],t=new Set;for(let n=0;n!t.has(n)))}addEvent(e){const t="O"===e.ph?ui.fromPayload(e,this):hi.fromPayload(e,this);if(ri.isTopLevelEvent(t)){const e=this.#Rl;if(e&&(e.endTime||0)>t.startTime)return null;this.#Rl=t}return this.#Cl.push(t),t}addAsyncEvent(e){this.#Tl.push(e)}setName(e){super.setName(e),this.#wl.setThreadByName(e,this)}process(){return this.#wl}events(){return this.#Cl}asyncEvents(){return this.#Tl}removeEventsByName(e){const t=[];return this.#Cl=this.#Cl.filter((n=>!!n&&(n.name!==e||(t.push(n),!1)))),t}}const yi=new Map;function vi(e,t){if(e instanceof di)return e.hasCategory(t);let n=yi.get(e.cat);return n||(n=new Set(e.cat.split(",")||[])),n.has(t)}var Ii=Object.freeze({__proto__:null,TracingModel:ri,eventPhasesOfInterestForTraceBounds:si,MetadataEvent:ii,LegacyTopLevelEventCategory:ai,DevToolsMetadataEventCategory:oi,DevToolsTimelineEventCategory:li,eventHasPayload:function(e){return"rawPayload"in e},Event:di,ConstructedEvent:ci,PayloadEvent:hi,ObjectSnapshot:ui,AsyncEvent:gi,Process:fi,Thread:bi,timesForEventInMilliseconds:function(e){if(e instanceof di)return{startTime:l.Types.Timing.MilliSeconds(e.startTime),endTime:e.endTime?l.Types.Timing.MilliSeconds(e.endTime):void 0,duration:l.Types.Timing.MilliSeconds(e.duration||0),selfTime:l.Types.Timing.MilliSeconds(e.selfTime)};const t=e.dur?l.Helpers.Timing.microSecondsToMilliseconds(e.dur):l.Types.Timing.MilliSeconds(0);return{startTime:l.Helpers.Timing.microSecondsToMilliseconds(e.ts),endTime:l.Helpers.Timing.microSecondsToMilliseconds(l.Types.Timing.MicroSeconds(e.ts+(e.dur||0))),duration:e.dur?l.Helpers.Timing.microSecondsToMilliseconds(e.dur):l.Types.Timing.MilliSeconds(0),selfTime:t}},eventHasCategory:vi,phaseForEvent:function(e){return e instanceof di?e.phase:e.ph},threadIDForEvent:function(e){return e instanceof di?e.thread.idInternal:e.tid},eventIsFromNewEngine:function(e){return null!==e&&!(e instanceof di)}});const ki="disabled-by-default-devtools.screenshot",Si={Screenshot:"Screenshot"};class wi{#Ml;timestamp;index;#Pl;#Ll;constructor(e,t,n){this.#Ml=e,this.timestamp=t,this.index=n,this.#Ll=null,this.#Pl=null}static fromSnapshot(e,t,n){const r=new wi(e,t.startTime,n);return r.#Pl=t,r}static fromTraceEvent(e,t,n){const r=l.Helpers.Timing.microSecondsToMilliseconds(t.ts),s=new wi(e,r,n);return s.#Ll=t,s}model(){return this.#Ml}imageDataPromise(){return this.#Ll?Promise.resolve(this.#Ll.args.snapshot):this.#Pl?Promise.resolve(this.#Pl.getSnapshot()):Promise.resolve(null)}}var Ci=Object.freeze({__proto__:null,FilmStripModel:class{#Ve;#El;#Al;constructor(e,t){this.#Ve=[],this.#El=0,this.#Al=0,this.reset(e,t)}hasFrames(){return this.#Ve.length>0}reset(e,t){this.#El=t||e.minimumRecordTime(),this.#Al=e.maximumRecordTime()-this.#El,this.#Ve=[];const n=ri.browserMainThread(e);if(!n)return;const r=n.events();for(let e=0;et.timestampe.update()))),await new Promise((e=>window.setTimeout(e,Pi)))}}var Mi;(Mi||(Mi={})).MemoryChanged="MemoryChanged";const Pi=2e3;class Li{#E;modelsInternal;#Bl;#Dl;constructor(e){this.#E=e,this.modelsInternal=new Set,this.#Bl=0;const t=12e4/Pi;this.#Dl=new Ei(t)}id(){return this.#E}models(){return this.modelsInternal}runtimeModel(){return this.modelsInternal.values().next().value||null}heapProfilerModel(){const e=this.runtimeModel();return e&&e.heapProfilerModel()}async update(){const e=this.runtimeModel(),t=e&&await e.heapUsage();t&&(this.#Bl=t.usedSize,this.#Dl.add(this.#Bl),xi.instance().dispatchEventToListeners(Mi.MemoryChanged,this))}samplesCount(){return this.#Dl.count()}usedHeapSize(){return this.#Bl}usedHeapSizeGrowRate(){return this.#Dl.fitSlope()}isMainThread(){const e=this.runtimeModel();return!!e&&"main"===e.target().id()}}class Ei{#Ul;#Hl;#Kr;#ql;#_l;#zl;#jl;#Wl;#Vl;constructor(e){this.#Ul=0|e,this.reset()}reset(){this.#Hl=Date.now(),this.#Kr=0,this.#ql=[],this.#_l=[],this.#zl=0,this.#jl=0,this.#Wl=0,this.#Vl=0}count(){return this.#ql.length}add(e,t){const n="number"==typeof t?t:Date.now()-this.#Hl,r=e;if(this.#ql.length===this.#Ul){const e=this.#ql[this.#Kr],t=this.#_l[this.#Kr];this.#zl-=e,this.#jl-=t,this.#Wl-=e*e,this.#Vl-=e*t}this.#zl+=n,this.#jl+=r,this.#Wl+=n*n,this.#Vl+=n*r,this.#ql[this.#Kr]=n,this.#_l[this.#Kr]=r,this.#Kr=(this.#Kr+1)%this.#Ul}fitSlope(){const e=this.count();return e<2?0:(this.#Vl-this.#zl*this.#jl/e)/(this.#Wl-this.#zl*this.#zl/e)}}var Ai=Object.freeze({__proto__:null,IsolateManager:xi,get Events(){return Mi},MemoryTrendWindowMs:12e4,Isolate:Li,MemoryTrend:Ei});class Oi extends c{#Gl=!1;#ma=!1;constructor(e){super(e),this.ensureEnabled()}async ensureEnabled(){if(this.#ma)return;this.#ma=!0,this.target().registerAuditsDispatcher(this);const e=this.target().auditsAgent();await e.invoke_enable()}issueAdded(e){this.dispatchEventToListeners("IssueAdded",{issuesModel:this,inspectorIssue:e.issue})}dispose(){super.dispose(),this.#Gl=!0}getTargetIfNotDisposed(){return this.#Gl?null:this.target()}}c.register(Oi,{capabilities:z.Audits,autostart:!0});var Ni,Fi=Object.freeze({__proto__:null,IssuesModel:Oi});!function(e){let t;!function(e){e.NonFastScrollable="NonFastScrollable",e.TouchEventHandler="TouchEventHandler",e.WheelEventHandler="WheelEventHandler",e.RepaintsOnScroll="RepaintsOnScroll",e.MainThreadScrollingReason="MainThreadScrollingReason"}(t=e.ScrollRectType||(e.ScrollRectType={}))}(Ni||(Ni={}));var Bi=Object.freeze({__proto__:null,get Layer(){return Ni},StickyPositionConstraint:class{#Kl;#$l;#Ql;#Xl;constructor(e,t){this.#Kl=t.stickyBoxRect,this.#$l=t.containingBlockRect,this.#Ql=null,e&&t.nearestLayerShiftingStickyBox&&(this.#Ql=e.layerById(t.nearestLayerShiftingStickyBox)),this.#Xl=null,e&&t.nearestLayerShiftingContainingBlock&&(this.#Xl=e.layerById(t.nearestLayerShiftingContainingBlock))}stickyBoxRect(){return this.#Kl}containingBlockRect(){return this.#$l}nearestLayerShiftingStickyBox(){return this.#Ql}nearestLayerShiftingContainingBlock(){return this.#Xl}},LayerTreeBase:class{#e;#Mr;layersById;#Jl;#Yl;#Zl;#ed;constructor(e){this.#e=e,this.#Mr=e?e.model(Pn):null,this.layersById=new Map,this.#Jl=null,this.#Yl=null,this.#Zl=new Map}target(){return this.#e}root(){return this.#Jl}setRoot(e){this.#Jl=e}contentRoot(){return this.#Yl}setContentRoot(e){this.#Yl=e}forEachLayer(e,t){return!(!t&&!(t=this.root()))&&(e(t)||t.children().some(this.forEachLayer.bind(this,e)))}layerById(e){return this.layersById.get(e)||null}async resolveBackendNodeIds(e){if(!e.size||!this.#Mr)return;const t=await this.#Mr.pushNodesByBackendIdsToFrontend(e);if(t)for(const e of t.keys())this.#Zl.set(e,t.get(e)||null)}backendNodeIdToNode(){return this.#Zl}setViewportSize(e){this.#ed=e}viewportSize(){return this.#ed}nodeForId(e){return this.#Mr?this.#Mr.nodeForId(e):null}}});class Di{id;url;startTime;loadTime;contentLoadTime;mainRequest;constructor(e){this.id=++Di.lastIdentifier,this.url=e.url(),this.startTime=e.startTime,this.mainRequest=e}static forRequest(e){return Ui.get(e)||null}bindRequest(e){Ui.set(e,this)}static lastIdentifier=0}const Ui=new WeakMap;var Hi=Object.freeze({__proto__:null,PageLoad:Di});class qi extends c{layerTreeAgent;constructor(e){super(e),this.layerTreeAgent=e.layerTreeAgent()}async loadSnapshotFromFragments(e){const{snapshotId:t}=await this.layerTreeAgent.invoke_loadSnapshot({tiles:e});return t?new _i(this,t):null}loadSnapshot(e){const t={x:0,y:0,picture:e};return this.loadSnapshotFromFragments([t])}async makeSnapshot(e){const{snapshotId:t}=await this.layerTreeAgent.invoke_makeSnapshot({layerId:e});return t?new _i(this,t):null}}class _i{#td;#nd;#rd;constructor(e,t){this.#td=e,this.#nd=t,this.#rd=1}release(){console.assert(this.#rd>0,"release is already called on the object"),--this.#rd||this.#td.layerTreeAgent.invoke_releaseSnapshot({snapshotId:this.#nd})}addReference(){++this.#rd,console.assert(this.#rd>0,"Referencing a dead object")}async replay(e,t,n){return(await this.#td.layerTreeAgent.invoke_replaySnapshot({snapshotId:this.#nd,fromStep:t,toStep:n,scale:e||1})).dataURL}async profile(e){return(await this.#td.layerTreeAgent.invoke_profileSnapshot({snapshotId:this.#nd,minRepeatCount:5,minDuration:1,clipRect:e||void 0})).timings}async commandLog(){const e=await this.#td.layerTreeAgent.invoke_snapshotCommandLog({snapshotId:this.#nd});return e.commandLog?e.commandLog.map(((e,t)=>new zi(e,t))):null}}class zi{method;params;commandIndex;constructor(e,t){this.method=e.method,this.params=e.params,this.commandIndex=t}}c.register(qi,{capabilities:z.DOM,autostart:!1});var ji=Object.freeze({__proto__:null,PaintProfilerModel:qi,PaintProfilerSnapshot:_i,PaintProfilerLogItem:zi});class Wi extends c{#Ts;#sd;#id;constructor(e){super(e),this.#Ts=e.performanceAgent(),this.#sd=new Map([["TaskDuration","CumulativeTime"],["ScriptDuration","CumulativeTime"],["LayoutDuration","CumulativeTime"],["RecalcStyleDuration","CumulativeTime"],["LayoutCount","CumulativeCount"],["RecalcStyleCount","CumulativeCount"]]),this.#id=new Map}enable(){return this.#Ts.invoke_enable({})}disable(){return this.#Ts.invoke_disable()}async requestMetrics(){const e=await this.#Ts.invoke_getMetrics()||[],n=new Map,r=performance.now();for(const s of e.metrics){let e,i=this.#id.get(s.name);switch(i||(i={lastValue:void 0,lastTimestamp:void 0},this.#id.set(s.name,i)),this.#sd.get(s.name)){case"CumulativeTime":e=i.lastTimestamp&&i.lastValue?t.NumberUtilities.clamp(1e3*(s.value-i.lastValue)/(r-i.lastTimestamp),0,1):0,i.lastValue=s.value,i.lastTimestamp=r;break;case"CumulativeCount":e=i.lastTimestamp&&i.lastValue?Math.max(0,1e3*(s.value-i.lastValue)/(r-i.lastTimestamp)):0,i.lastValue=s.value,i.lastTimestamp=r;break;default:e=s.value}n.set(s.name,e)}return{metrics:n,timestamp:r}}}c.register(Wi,{capabilities:z.DOM,autostart:!1});var Vi,Gi=Object.freeze({__proto__:null,PerformanceMetricsModel:Wi});class Ki extends c{agent;loaderIds=[];targetJustAttached=!0;lastPrimaryPageModel=null;documents=new Map;getFeatureFlagsPromise;constructor(e){super(e),e.registerPreloadDispatcher(new $i(this)),this.agent=e.preloadAgent(),this.agent.invoke_enable(),this.getFeatureFlagsPromise=this.getFeatureFlags();const t=e.targetInfo();void 0!==t&&"prerender"===t.subtype&&(this.lastPrimaryPageModel=K.instance().primaryPageTarget()?.model(Ki)||null),K.instance().addModelListener(jn,_n.PrimaryPageChanged,this.onPrimaryPageChanged,this)}dispose(){super.dispose(),K.instance().removeModelListener(jn,_n.PrimaryPageChanged,this.onPrimaryPageChanged,this),this.agent.invoke_disable()}ensureDocumentPreloadingData(e){void 0===this.documents.get(e)&&this.documents.set(e,new Qi)}currentLoaderId(){if(this.targetJustAttached)return null;if(0===this.loaderIds.length)throw new Error("unreachable");return this.loaderIds[this.loaderIds.length-1]}currentDocument(){const e=this.currentLoaderId();return null===e?null:this.documents.get(e)||null}getRuleSetById(e){return this.currentDocument()?.ruleSets.getById(e)||null}getAllRuleSets(){return this.currentDocument()?.ruleSets.getAll()||[]}getPreloadingAttemptById(e){const t=this.currentDocument();return null===t?null:t.preloadingAttempts.getById(e,t.sources)||null}getPreloadingAttempts(e){const t=this.currentDocument();return null===t?[]:t.preloadingAttempts.getAll(e,t.sources)}getPreloadingAttemptsOfPreviousPage(){if(this.loaderIds.length<=1)return[];const e=this.documents.get(this.loaderIds[this.loaderIds.length-2]);return void 0===e?[]:e.preloadingAttempts.getAll(null,e.sources)}onPrimaryPageChanged(e){const{frame:t,type:n}=e.data;if(null===this.lastPrimaryPageModel&&"Activation"===n)return;if(null!==this.lastPrimaryPageModel&&"Activation"!==n)return;if(null!==this.lastPrimaryPageModel&&"Activation"===n){this.loaderIds=this.lastPrimaryPageModel.loaderIds;for(const[e,t]of this.lastPrimaryPageModel.documents.entries())this.ensureDocumentPreloadingData(e),this.documents.get(e)?.mergePrevious(t)}this.lastPrimaryPageModel=null;const r=t.loaderId;this.loaderIds.push(r),this.loaderIds=this.loaderIds.slice(-2),this.ensureDocumentPreloadingData(r);for(const e of this.documents.keys())this.loaderIds.includes(e)||this.documents.delete(e);this.dispatchEventToListeners(Vi.ModelUpdated)}onRuleSetUpdated(e){const t=e.ruleSet,n=t.loaderId;null===this.currentLoaderId()&&(this.loaderIds=[n],this.targetJustAttached=!1),this.ensureDocumentPreloadingData(n),this.documents.get(n)?.ruleSets.upsert(t),this.dispatchEventToListeners(Vi.ModelUpdated)}onRuleSetRemoved(e){const t=e.id;for(const e of this.documents.values())e.ruleSets.delete(t);this.dispatchEventToListeners(Vi.ModelUpdated)}onPreloadingAttemptSourcesUpdated(e){const t=e.loaderId;this.ensureDocumentPreloadingData(t);const n=this.documents.get(t);void 0!==n&&(n.sources.update(e.preloadingAttemptSources),n.preloadingAttempts.maybeRegisterNotTriggered(n.sources),this.dispatchEventToListeners(Vi.ModelUpdated))}onPrefetchStatusUpdated(e){const t=e.key.loaderId;this.ensureDocumentPreloadingData(t);const n={action:"Prefetch",key:e.key,status:Ji(e.status),prefetchStatus:e.prefetchStatus||null};this.documents.get(t)?.preloadingAttempts.upsert(n),this.dispatchEventToListeners(Vi.ModelUpdated)}onPrerenderStatusUpdated(e){const t=e.key.loaderId;this.ensureDocumentPreloadingData(t);const n={action:"Prerender",key:e.key,status:Ji(e.status),prerenderStatus:e.prerenderStatus||null};this.documents.get(t)?.preloadingAttempts.upsert(n),this.dispatchEventToListeners(Vi.ModelUpdated)}async getFeatureFlags(){const e=this.target().systemInfo().invoke_getFeatureState({featureState:"PreloadingHoldback"}),t=this.target().systemInfo().invoke_getFeatureState({featureState:"PrerenderHoldback"});return{preloadingHoldback:(await e).featureEnabled,prerender2Holdback:(await t).featureEnabled}}async onPreloadEnabledStateUpdated(e){const t=await this.getFeatureFlagsPromise,n={featureFlagPreloadingHoldback:t.preloadingHoldback,featureFlagPrerender2Holdback:t.prerender2Holdback,...e};this.dispatchEventToListeners(Vi.WarningsUpdated,n)}}c.register(Ki,{capabilities:z.DOM,autostart:!1}),function(e){e.ModelUpdated="ModelUpdated",e.WarningsUpdated="WarningsUpdated"}(Vi||(Vi={}));class $i{model;constructor(e){this.model=e}ruleSetUpdated(e){this.model.onRuleSetUpdated(e)}ruleSetRemoved(e){this.model.onRuleSetRemoved(e)}preloadingAttemptSourcesUpdated(e){this.model.onPreloadingAttemptSourcesUpdated(e)}prefetchStatusUpdated(e){this.model.onPrefetchStatusUpdated(e)}prerenderAttemptCompleted(e){}prerenderStatusUpdated(e){this.model.onPrerenderStatusUpdated(e)}preloadEnabledStateUpdated(e){this.model.onPreloadEnabledStateUpdated(e)}}class Qi{ruleSets=new Xi;preloadingAttempts=new Zi;sources=new ea;mergePrevious(e){if(!this.ruleSets.isEmpty()||!this.sources.isEmpty())throw new Error("unreachable");this.ruleSets=e.ruleSets,this.preloadingAttempts.mergePrevious(e.preloadingAttempts),this.sources=e.sources}}class Xi{map=new Map;isEmpty(){return 0===this.map.size}getById(e){return this.map.get(e)||null}getAll(){return Array.from(this.map.entries()).map((([e,t])=>({id:e,value:t})))}upsert(e){this.map.set(e.id,e)}delete(e){this.map.delete(e)}}function Ji(e){switch(e){case"Pending":return"Pending";case"Running":return"Running";case"Ready":return"Ready";case"Success":return"Success";case"Failure":return"Failure";case"NotSupported":return"NotSupported"}throw new Error("unreachable")}function Yi(e){let t,n;switch(e.action){case"Prefetch":t="Prefetch";break;case"Prerender":t="Prerender"}switch(e.targetHint){case void 0:n="undefined";break;case"Blank":n="Blank";break;case"Self":n="Self"}return`${e.loaderId}:${t}:${e.url}:${n}`}class Zi{map=new Map;enrich(e,t){let n=[],r=[];return null!==t&&(n=t.ruleSetIds,r=t.nodeIds),{...e,ruleSetIds:n,nodeIds:r}}getById(e,t){const n=this.map.get(e)||null;return null===n?null:this.enrich(n,t.getById(e))}getAll(e,t){return[...this.map.entries()].map((([e,n])=>({id:e,value:this.enrich(n,t.getById(e))}))).filter((({value:t})=>!e||t.ruleSetIds.includes(e)))}upsert(e){const t=Yi(e.key);this.map.set(t,e)}maybeRegisterNotTriggered(e){for(const[t,{key:n}]of e.entries()){if(void 0!==this.map.get(t))continue;let e;switch(n.action){case"Prefetch":e={action:"Prefetch",key:n,status:"NotTriggered",prefetchStatus:null};break;case"Prerender":e={action:"Prerender",key:n,status:"NotTriggered",prerenderStatus:null}}this.map.set(t,e)}}mergePrevious(e){for(const[t,n]of this.map.entries())e.map.set(t,n);this.map=e.map}}class ea{map=new Map;entries(){return this.map.entries()}isEmpty(){return 0===this.map.size}getById(e){return this.map.get(e)||null}update(e){this.map=new Map(e.map((e=>[Yi(e.key),e])))}}var ta=Object.freeze({__proto__:null,PreloadingModel:Ki,get Events(){return Vi}});class na extends c{#Ts;#ad;#od;constructor(e){super(e),this.#Ts=e.pageAgent(),this.#ad=null,this.#od=null,e.registerPageDispatcher(this)}startScreencast(e,t,n,r,s,i,a){this.#ad=i,this.#od=a,this.#Ts.invoke_startScreencast({format:e,quality:t,maxWidth:n,maxHeight:r,everyNthFrame:s})}stopScreencast(){this.#ad=null,this.#od=null,this.#Ts.invoke_stopScreencast()}async captureScreenshot(e,t,n,r){const s={format:e,quality:t,fromSurface:!0};switch(n){case"fromClip":s.captureBeyondViewport=!0,s.clip=r;break;case"fullpage":s.captureBeyondViewport=!0;break;case"fromViewport":s.captureBeyondViewport=!1;break;default:throw new Error("Unexpected or unspecified screnshotMode")}await vn.muteHighlight();const i=await this.#Ts.invoke_captureScreenshot(s);return await vn.unmuteHighlight(),i.data}async fetchLayoutMetrics(){const e=await this.#Ts.invoke_getLayoutMetrics();return e.getError()?null:{viewportX:e.cssVisualViewport.pageX,viewportY:e.cssVisualViewport.pageY,viewportScale:e.cssVisualViewport.scale,contentWidth:e.cssContentSize.width,contentHeight:e.cssContentSize.height}}screencastFrame({data:e,metadata:t,sessionId:n}){this.#Ts.invoke_screencastFrameAck({sessionId:n}),this.#ad&&this.#ad.call(null,e,t)}screencastVisibilityChanged({visible:e}){this.#od&&this.#od.call(null,e)}backForwardCacheNotUsed(e){}domContentEventFired(e){}loadEventFired(e){}lifecycleEvent(e){}navigatedWithinDocument(e){}frameAttached(e){}frameNavigated(e){}documentOpened(e){}frameDetached(e){}frameStartedLoading(e){}frameStoppedLoading(e){}frameRequestedNavigation(e){}frameScheduledNavigation(e){}frameClearedScheduledNavigation(e){}frameResized(){}javascriptDialogOpening(e){}javascriptDialogClosed(e){}interstitialShown(){}interstitialHidden(){}windowOpen(e){}fileChooserOpened(e){}compilationCacheProduced(e){}downloadWillBegin(e){}downloadProgress(){}prerenderAttemptCompleted(e){}prefetchStatusUpdated(e){}prerenderStatusUpdated(e){}}c.register(na,{capabilities:z.ScreenCapture,autostart:!1});var ra=Object.freeze({__proto__:null,ScreenCaptureModel:na});class sa extends c{enabled=!1;storageAgent;storageKeyManager;bucketsById=new Map;trackedStorageKeys=new Set;constructor(e){super(e),e.registerStorageDispatcher(this),this.storageAgent=e.storageAgent(),this.storageKeyManager=e.model(qn)}getBuckets(){return new Set(this.bucketsById.values())}getBucketsForStorageKey(e){const t=[...this.bucketsById.values()];return new Set(t.filter((({bucket:t})=>t.storageKey===e)))}getDefaultBucketForStorageKey(e){return[...this.bucketsById.values()].find((({bucket:t})=>t.storageKey===e&&void 0===t.name))??null}getBucketById(e){return this.bucketsById.get(e)??null}getBucketByName(e,t){if(!t)return this.getDefaultBucketForStorageKey(e);return[...this.bucketsById.values()].find((({bucket:n})=>n.storageKey===e&&n.name===t))??null}deleteBucket(e){this.storageAgent.invoke_deleteStorageBucket({bucket:e})}enable(){if(!this.enabled){if(this.storageKeyManager){this.storageKeyManager.addEventListener(Un.StorageKeyAdded,this.storageKeyAdded,this),this.storageKeyManager.addEventListener(Un.StorageKeyRemoved,this.storageKeyRemoved,this);for(const e of this.storageKeyManager.storageKeys())this.addStorageKey(e)}this.enabled=!0}}storageKeyAdded(e){this.addStorageKey(e.data)}storageKeyRemoved(e){this.removeStorageKey(e.data)}addStorageKey(e){if(this.trackedStorageKeys.has(e))throw new Error("Can't call addStorageKey for a storage key if it has already been added.");this.trackedStorageKeys.add(e),this.storageAgent.invoke_setStorageBucketTracking({storageKey:e,enable:!0})}removeStorageKey(e){if(!this.trackedStorageKeys.has(e))throw new Error("Can't call removeStorageKey for a storage key if it hasn't already been added.");const t=this.getBucketsForStorageKey(e);for(const e of t)this.bucketRemoved(e);this.trackedStorageKeys.delete(e),this.storageAgent.invoke_setStorageBucketTracking({storageKey:e,enable:!1})}bucketAdded(e){this.bucketsById.set(e.id,e),this.dispatchEventToListeners("BucketAdded",{model:this,bucketInfo:e})}bucketRemoved(e){this.bucketsById.delete(e.id),this.dispatchEventToListeners("BucketRemoved",{model:this,bucketInfo:e})}bucketChanged(e){this.dispatchEventToListeners("BucketChanged",{model:this,bucketInfo:e})}bucketInfosAreEqual(e,t){return e.bucket.storageKey===t.bucket.storageKey&&e.id===t.id&&e.bucket.name===t.bucket.name&&e.expiration===t.expiration&&e.quota===t.quota&&e.persistent===t.persistent&&e.durability===t.durability}storageBucketCreatedOrUpdated({bucketInfo:e}){const t=this.getBucketById(e.id);t?this.bucketInfosAreEqual(t,e)||this.bucketChanged(e):this.bucketAdded(e)}storageBucketDeleted({bucketId:e}){const t=this.getBucketById(e);if(!t)throw new Error(`Received an event that Storage Bucket '${e}' was deleted, but it wasn't in the StorageBucketsModel.`);this.bucketRemoved(t)}interestGroupAccessed(e){}indexedDBListUpdated(e){}indexedDBContentUpdated(e){}cacheStorageListUpdated(e){}cacheStorageContentUpdated(e){}sharedStorageAccessed(e){}}c.register(sa,{capabilities:z.Storage,autostart:!1});var ia=Object.freeze({__proto__:null,StorageBucketsModel:sa});const aa={serviceworkercacheagentError:"`ServiceWorkerCacheAgent` error deleting cache entry {PH1} in cache: {PH2}"},oa=s.i18n.registerUIStrings("core/sdk/ServiceWorkerCacheModel.ts",aa),la=s.i18n.getLocalizedString.bind(void 0,oa);class da extends c{cacheAgent;#ld;#dd;#cd=new Map;#hd=new Set;#ud=new Set;#gd=new e.Throttler.Throttler(2e3);#ma=!1;#pd=!1;constructor(e){super(e),e.registerStorageDispatcher(this),this.cacheAgent=e.cacheStorageAgent(),this.#ld=e.storageAgent(),this.#dd=e.model(sa)}enable(){if(!this.#ma){this.#dd.addEventListener("BucketAdded",this.storageBucketAdded,this),this.#dd.addEventListener("BucketRemoved",this.storageBucketRemoved,this);for(const e of this.#dd.getBuckets())this.addStorageBucket(e.bucket);this.#ma=!0}}clearForStorageKey(e){for(const[t,n]of this.#cd.entries())n.storageKey===e&&(this.#cd.delete(t),this.cacheRemoved(n));for(const t of this.#dd.getBucketsForStorageKey(e))this.loadCacheNames(t.bucket)}refreshCacheNames(){for(const e of this.#cd.values())this.cacheRemoved(e);this.#cd.clear();const e=this.#dd.getBuckets();for(const t of e)this.loadCacheNames(t.bucket)}async deleteCache(e){const t=await this.cacheAgent.invoke_deleteCache({cacheId:e.cacheId});t.getError()?console.error(`ServiceWorkerCacheAgent error deleting cache ${e.toString()}: ${t.getError()}`):(this.#cd.delete(e.cacheId),this.cacheRemoved(e))}async deleteCacheEntry(t,n){const r=await this.cacheAgent.invoke_deleteEntry({cacheId:t.cacheId,request:n});r.getError()&&e.Console.Console.instance().error(la(aa.serviceworkercacheagentError,{PH1:t.toString(),PH2:String(r.getError())}))}loadCacheData(e,t,n,r,s){this.requestEntries(e,t,n,r,s)}loadAllCacheData(e,t,n){this.requestAllEntries(e,t,n)}caches(){const e=new Array;for(const t of this.#cd.values())e.push(t);return e}dispose(){for(const e of this.#cd.values())this.cacheRemoved(e);this.#cd.clear(),this.#ma&&(this.#dd.removeEventListener("BucketAdded",this.storageBucketAdded,this),this.#dd.removeEventListener("BucketRemoved",this.storageBucketRemoved,this))}addStorageBucket(e){this.loadCacheNames(e),this.#hd.has(e.storageKey)||(this.#hd.add(e.storageKey),this.#ld.invoke_trackCacheStorageForStorageKey({storageKey:e.storageKey}))}removeStorageBucket(e){let t=0;for(const[n,r]of this.#cd.entries())e.storageKey===r.storageKey&&t++,r.inBucket(e)&&(t--,this.#cd.delete(n),this.cacheRemoved(r));0===t&&(this.#hd.delete(e.storageKey),this.#ld.invoke_untrackCacheStorageForStorageKey({storageKey:e.storageKey}))}async loadCacheNames(e){const t=await this.cacheAgent.invoke_requestCacheNames({storageBucket:e});t.getError()||this.updateCacheNames(e,t.caches)}updateCacheNames(e,t){const n=new Set,r=new Map,s=new Map;for(const e of t){const t=e.storageBucket??this.#dd.getDefaultBucketForStorageKey(e.storageKey)?.bucket;if(!t)continue;const s=new ha(this,t,e.cacheName,e.cacheId);n.add(s.cacheId),this.#cd.has(s.cacheId)||(r.set(s.cacheId,s),this.#cd.set(s.cacheId,s))}this.#cd.forEach((function(t){t.inBucket(e)&&!n.has(t.cacheId)&&(s.set(t.cacheId,t),this.#cd.delete(t.cacheId))}),this),r.forEach(this.cacheAdded,this),s.forEach(this.cacheRemoved,this)}storageBucketAdded({data:{bucketInfo:{bucket:e}}}){this.addStorageBucket(e)}storageBucketRemoved({data:{bucketInfo:{bucket:e}}}){this.removeStorageBucket(e)}cacheAdded(e){this.dispatchEventToListeners(ca.CacheAdded,{model:this,cache:e})}cacheRemoved(e){this.dispatchEventToListeners(ca.CacheRemoved,{model:this,cache:e})}async requestEntries(e,t,n,r,s){const i=await this.cacheAgent.invoke_requestEntries({cacheId:e.cacheId,skipCount:t,pageSize:n,pathFilter:r});i.getError()?console.error("ServiceWorkerCacheAgent error while requesting entries: ",i.getError()):s(i.cacheDataEntries,i.returnCount)}async requestAllEntries(e,t,n){const r=await this.cacheAgent.invoke_requestEntries({cacheId:e.cacheId,pathFilter:t});r.getError()?console.error("ServiceWorkerCacheAgent error while requesting entries: ",r.getError()):n(r.cacheDataEntries,r.returnCount)}cacheStorageListUpdated({bucketId:e}){const t=this.#dd.getBucketById(e)?.bucket;t&&(this.#ud.add(t),this.#gd.schedule((()=>{const e=Array.from(this.#ud,(e=>this.loadCacheNames(e)));return this.#ud.clear(),Promise.all(e)}),this.#pd))}cacheStorageContentUpdated({bucketId:e,cacheName:t}){const n=this.#dd.getBucketById(e)?.bucket;n&&this.dispatchEventToListeners(ca.CacheStorageContentUpdated,{storageBucket:n,cacheName:t})}indexedDBListUpdated(e){}indexedDBContentUpdated(e){}interestGroupAccessed(e){}sharedStorageAccessed(e){}storageBucketCreatedOrUpdated(e){}storageBucketDeleted(e){}setThrottlerSchedulesAsSoonAsPossibleForTest(){this.#pd=!0}}var ca;!function(e){e.CacheAdded="CacheAdded",e.CacheRemoved="CacheRemoved",e.CacheStorageContentUpdated="CacheStorageContentUpdated"}(ca||(ca={}));class ha{#$r;storageKey;storageBucket;cacheName;cacheId;constructor(e,t,n,r){this.#$r=e,this.storageBucket=t,this.storageKey=t.storageKey,this.cacheName=n,this.cacheId=r}inBucket(e){return this.storageKey===e.storageKey&&this.storageBucket.name===e.name}equals(e){return this.cacheId===e.cacheId}toString(){return this.storageKey+this.cacheName}async requestCachedResponse(e,t){const n=await this.#$r.cacheAgent.invoke_requestCachedResponse({cacheId:this.cacheId,requestURL:e,requestHeaders:t});return n.getError()?null:n.response}}c.register(da,{capabilities:z.Storage,autostart:!1});var ua=Object.freeze({__proto__:null,ServiceWorkerCacheModel:da,get Events(){return ca},Cache:ha});const ga={running:"running",starting:"starting",stopped:"stopped",stopping:"stopping",activated:"activated",activating:"activating",installed:"installed",installing:"installing",new:"new",redundant:"redundant",sSS:"{PH1} #{PH2} ({PH3})"},pa=s.i18n.registerUIStrings("core/sdk/ServiceWorkerManager.ts",ga),ma=s.i18n.getLocalizedString.bind(void 0,pa),fa=s.i18n.getLazilyComputedLocalizedString.bind(void 0,pa);class ba extends c{#Ts;#md;#ma;#fd;serviceWorkerNetworkRequestsPanelStatus;constructor(t){super(t),t.registerServiceWorkerDispatcher(new va(this)),this.#Ts=t.serviceWorkerAgent(),this.#md=new Map,this.#ma=!1,this.enable(),this.#fd=e.Settings.Settings.instance().createSetting("serviceWorkerUpdateOnReload",!1),this.#fd.get()&&this.forceUpdateSettingChanged(),this.#fd.addChangeListener(this.forceUpdateSettingChanged,this),new wa(t,this),this.serviceWorkerNetworkRequestsPanelStatus={isOpen:!1,openedAt:0}}async enable(){this.#ma||(this.#ma=!0,await this.#Ts.invoke_enable())}async disable(){this.#ma&&(this.#ma=!1,this.#md.clear(),await this.#Ts.invoke_enable())}registrations(){return this.#md}hasRegistrationForURLs(e){for(const t of this.#md.values())if(e.filter((e=>e&&e.startsWith(t.scopeURL))).length===e.length)return!0;return!1}findVersion(e){for(const t of this.registrations().values()){const n=t.versions.get(e);if(n)return n}return null}deleteRegistration(e){const t=this.#md.get(e);if(t){if(t.isRedundant())return this.#md.delete(e),void this.dispatchEventToListeners(ya.RegistrationDeleted,t);t.deleting=!0;for(const e of t.versions.values())this.stopWorker(e.id);this.unregister(t.scopeURL)}}async updateRegistration(e){const t=this.#md.get(e);t&&await this.#Ts.invoke_updateRegistration({scopeURL:t.scopeURL})}async deliverPushMessage(t,n){const r=this.#md.get(t);if(!r)return;const s=e.ParsedURL.ParsedURL.extractOrigin(r.scopeURL);await this.#Ts.invoke_deliverPushMessage({origin:s,registrationId:t,data:n})}async dispatchSyncEvent(t,n,r){const s=this.#md.get(t);if(!s)return;const i=e.ParsedURL.ParsedURL.extractOrigin(s.scopeURL);await this.#Ts.invoke_dispatchSyncEvent({origin:i,registrationId:t,tag:n,lastChance:r})}async dispatchPeriodicSyncEvent(t,n){const r=this.#md.get(t);if(!r)return;const s=e.ParsedURL.ParsedURL.extractOrigin(r.scopeURL);await this.#Ts.invoke_dispatchPeriodicSyncEvent({origin:s,registrationId:t,tag:n})}async unregister(e){await this.#Ts.invoke_unregister({scopeURL:e})}async startWorker(e){await this.#Ts.invoke_startWorker({scopeURL:e})}async skipWaiting(e){await this.#Ts.invoke_skipWaiting({scopeURL:e})}async stopWorker(e){await this.#Ts.invoke_stopWorker({versionId:e})}async inspectWorker(e){await this.#Ts.invoke_inspectWorker({versionId:e})}workerRegistrationUpdated(e){for(const t of e){let e=this.#md.get(t.registrationId);e?(e.update(t),e.shouldBeRemoved()?(this.#md.delete(e.id),this.dispatchEventToListeners(ya.RegistrationDeleted,e)):this.dispatchEventToListeners(ya.RegistrationUpdated,e)):(e=new Sa(t),this.#md.set(t.registrationId,e),this.dispatchEventToListeners(ya.RegistrationUpdated,e))}}workerVersionUpdated(e){const t=new Set;for(const n of e){const e=this.#md.get(n.registrationId);e&&(e.updateVersion(n),t.add(e))}for(const e of t)e.shouldBeRemoved()?(this.#md.delete(e.id),this.dispatchEventToListeners(ya.RegistrationDeleted,e)):this.dispatchEventToListeners(ya.RegistrationUpdated,e)}workerErrorReported(e){const t=this.#md.get(e.registrationId);t&&(t.errors.push(e),this.dispatchEventToListeners(ya.RegistrationErrorAdded,{registration:t,error:e}))}forceUpdateOnReloadSetting(){return this.#fd}forceUpdateSettingChanged(){const e=this.#fd.get();this.#Ts.invoke_setForceUpdateOnPageLoad({forceUpdateOnPageLoad:e})}}var ya;!function(e){e.RegistrationUpdated="RegistrationUpdated",e.RegistrationErrorAdded="RegistrationErrorAdded",e.RegistrationDeleted="RegistrationDeleted"}(ya||(ya={}));class va{#$;constructor(e){this.#$=e}workerRegistrationUpdated({registrations:e}){this.#$.workerRegistrationUpdated(e)}workerVersionUpdated({versions:e}){this.#$.workerVersionUpdated(e)}workerErrorReported({errorMessage:e}){this.#$.workerErrorReported(e)}}class Ia{runningStatus;status;last_updated_timestamp;previousState;constructor(e,t,n,r){this.runningStatus=e,this.status=t,this.last_updated_timestamp=r,this.previousState=n}}class ka{id;scriptURL;parsedURL;securityOrigin;scriptLastModified;scriptResponseTime;controlledClients;targetId;currentState;registration;constructor(e,t){this.registration=e,this.update(t)}update(t){this.id=t.versionId,this.scriptURL=t.scriptURL;const n=new e.ParsedURL.ParsedURL(t.scriptURL);this.securityOrigin=n.securityOrigin(),this.currentState=new Ia(t.runningStatus,t.status,this.currentState,Date.now()),this.scriptLastModified=t.scriptLastModified,this.scriptResponseTime=t.scriptResponseTime,t.controlledClients?this.controlledClients=t.controlledClients.slice():this.controlledClients=[],this.targetId=t.targetId||null}isStartable(){return!this.registration.isDeleted&&this.isActivated()&&this.isStopped()}isStoppedAndRedundant(){return"stopped"===this.runningStatus&&"redundant"===this.status}isStopped(){return"stopped"===this.runningStatus}isStarting(){return"starting"===this.runningStatus}isRunning(){return"running"===this.runningStatus}isStopping(){return"stopping"===this.runningStatus}isNew(){return"new"===this.status}isInstalling(){return"installing"===this.status}isInstalled(){return"installed"===this.status}isActivating(){return"activating"===this.status}isActivated(){return"activated"===this.status}isRedundant(){return"redundant"===this.status}get status(){return this.currentState.status}get runningStatus(){return this.currentState.runningStatus}mode(){return this.isNew()||this.isInstalling()?ka.Modes.Installing:this.isInstalled()?ka.Modes.Waiting:this.isActivating()||this.isActivated()?ka.Modes.Active:ka.Modes.Redundant}}!function(e){let t;e.RunningStatus={running:fa(ga.running),starting:fa(ga.starting),stopped:fa(ga.stopped),stopping:fa(ga.stopping)},e.Status={activated:fa(ga.activated),activating:fa(ga.activating),installed:fa(ga.installed),installing:fa(ga.installing),new:fa(ga.new),redundant:fa(ga.redundant)},function(e){e.Installing="installing",e.Waiting="waiting",e.Active="active",e.Redundant="redundant"}(t=e.Modes||(e.Modes={}))}(ka||(ka={}));class Sa{#bd;id;scopeURL;securityOrigin;isDeleted;versions;deleting;errors;constructor(e){this.update(e),this.versions=new Map,this.deleting=!1,this.errors=[]}update(t){this.#bd=Symbol("fingerprint"),this.id=t.registrationId,this.scopeURL=t.scopeURL;const n=new e.ParsedURL.ParsedURL(t.scopeURL);this.securityOrigin=n.securityOrigin(),this.isDeleted=t.isDeleted}fingerprint(){return this.#bd}versionsByMode(){const e=new Map;for(const t of this.versions.values())e.set(t.mode(),t);return e}updateVersion(e){this.#bd=Symbol("fingerprint");let t=this.versions.get(e.versionId);return t?(t.update(e),t):(t=new ka(this,e),this.versions.set(e.versionId,t),t)}isRedundant(){for(const e of this.versions.values())if(!e.isStoppedAndRedundant())return!1;return!0}shouldBeRemoved(){return this.isRedundant()&&(!this.errors.length||this.deleting)}canBeRemoved(){return this.isDeleted||this.deleting}clearErrors(){this.#bd=Symbol("fingerprint"),this.errors=[]}}class wa{#h;#yd;#vd;constructor(e,t){this.#h=e,this.#yd=t,this.#vd=new Map,t.addEventListener(ya.RegistrationUpdated,this.registrationsUpdated,this),t.addEventListener(ya.RegistrationDeleted,this.registrationsUpdated,this),K.instance().addModelListener(Cr,Rr.ExecutionContextCreated,this.executionContextCreated,this)}registrationsUpdated(){this.#vd.clear();const e=this.#yd.registrations().values();for(const t of e)for(const e of t.versions.values())e.targetId&&this.#vd.set(e.targetId,e);this.updateAllContextLabels()}executionContextCreated(e){const t=e.data,n=this.serviceWorkerTargetId(t.target());n&&this.updateContextLabel(t,this.#vd.get(n)||null)}serviceWorkerTargetId(e){return e.parentTarget()!==this.#h||e.type()!==_.ServiceWorker?null:e.id()}updateAllContextLabels(){for(const e of K.instance().targets()){const t=this.serviceWorkerTargetId(e);if(!t)continue;const n=this.#vd.get(t)||null,r=e.model(Cr),s=r?r.executionContexts():[];for(const e of s)this.updateContextLabel(e,n)}}updateContextLabel(t,n){if(!n)return void t.setLabel("");const r=e.ParsedURL.ParsedURL.fromString(t.origin),s=r?r.lastPathComponentWithFragment():t.name,i=ka.Status[n.status];t.setLabel(ma(ga.sSS,{PH1:s,PH2:n.id,PH3:i()}))}}c.register(ba,{capabilities:z.ServiceWorker,autostart:!0});var Ca=Object.freeze({__proto__:null,ServiceWorkerManager:ba,get Events(){return ya},ServiceWorkerVersionState:Ia,get ServiceWorkerVersion(){return ka},ServiceWorkerRegistration:Sa});const Ta=new Map,Ra=new Map;async function xa(e,t){const n=Ta.get(e)?.get(t);if(void 0!==n)return n;const r=K.instance().primaryPageTarget()?.model(Pn);if(!r)return null;const s=(await r.pushNodesByBackendIdsToFrontend(new Set([t])))?.get(t)||null,i=Ta.get(e)||new Map;return i.set(t,s),Ta.set(e,i),s}const Ma=new Map,Pa=new Map;var La=Object.freeze({__proto__:null,_TEST_clearCache:function(){Ta.clear(),Ra.clear(),Ma.clear(),Pa.clear()},domNodeForBackendNodeID:xa,domNodesForMultipleBackendNodeIds:async function(e,t){const n=Ra.get(e)?.get(t);if(n)return n;const r=K.instance().primaryPageTarget()?.model(Pn);if(!r)return new Map;const s=await r.pushNodesByBackendIdsToFrontend(t)||new Map,i=Ra.get(e)||new Map;return i.set(t,s),Ra.set(e,i),s},sourcesForLayoutShift:async function(e,t){const n=Ma.get(e)?.get(t);if(n)return n;const r=t.args.data?.impacted_nodes;if(!r)return[];const s=[];await Promise.all(r.map((async t=>{const n=await xa(e,t.node_id);n&&s.push({previousRect:new DOMRect(t.old_rect[0],t.old_rect[1],t.old_rect[2],t.old_rect[3]),currentRect:new DOMRect(t.new_rect[0],t.new_rect[1],t.new_rect[2],t.new_rect[3]),node:n})})));const i=Ma.get(e)||new Map;return i.set(t,s),Ma.set(e,i),s},normalizedImpactedNodesForLayoutShift:async function(e,t){const n=Pa.get(e)?.get(t);if(n)return n;const r=t.args?.data?.impacted_nodes;if(!r)return[];let s=null;const i=K.instance().primaryPageTarget(),a=await(i?.runtimeAgent().invoke_evaluate({expression:"window.devicePixelRatio"}));if("number"===a?.result.type&&(s=a?.result.value??null),!s)return r;const o=[];for(const e of r){const t={...e};for(let n=0;n{setTimeout((()=>e(void 0)),1e3)}))]):void 0,n=Ts.instance().cpuThrottlingRate(),r=ue.instance().networkConditions(),s="function"==typeof r.title?r.title():r.title;return{source:"DevTools",startTime:e?new Date(e).toJSON():void 0,cpuThrottling:n,networkThrottling:s,hardwareConcurrency:t}}catch{return}}});class Ea extends c{#Id;#kd;#Sd;#wd;#Cd;constructor(e){super(e),this.#Id=e.tracingAgent(),e.registerTracingDispatcher(new Aa(this)),this.#kd=null,this.#Sd=0,this.#wd=0}bufferUsage(e,t,n){this.#Sd=void 0===t?null:t,this.#kd&&this.#kd.tracingBufferUsage(e||n||0)}eventsCollected(e){this.#kd&&(this.#kd.traceEventsCollected(e),this.#wd+=e.length,this.#Sd?(this.#wd>this.#Sd&&(this.#wd=this.#Sd),this.#kd.eventsRetrievalProgress(this.#wd/this.#Sd)):this.#kd.eventsRetrievalProgress(0))}tracingComplete(){this.#Sd=0,this.#wd=0,this.#kd&&(this.#kd.tracingComplete(),this.#kd=null),this.#Cd=!1}async start(e,t,n){if(this.#kd)throw new Error("Tracing is already started");this.#kd=e;const r={bufferUsageReportingInterval:500,categories:t,options:n,transferMode:"ReportEvents"},s=await this.#Id.invoke_start(r);return s.getError()&&(this.#kd=null),s}stop(){if(!this.#kd)throw new Error("Tracing is not started");if(this.#Cd)throw new Error("Tracing is already being stopped");this.#Cd=!0,this.#Id.invoke_end()}}class Aa{#Td;constructor(e){this.#Td=e}bufferUsage({value:e,eventCount:t,percentFull:n}){this.#Td.bufferUsage(e,t,n)}dataCollected({value:e}){this.#Td.eventsCollected(e)}tracingComplete(){this.#Td.tracingComplete()}}c.register(Ea,{capabilities:z.Tracing,autostart:!1});var Oa=Object.freeze({__proto__:null,TracingManager:Ea});class Na extends c{#Ts;constructor(e){super(e),this.#Ts=e.webAuthnAgent(),e.registerWebAuthnDispatcher(new Fa(this))}setVirtualAuthEnvEnabled(e){return e?this.#Ts.invoke_enable({enableUI:!0}):this.#Ts.invoke_disable()}async addAuthenticator(e){return(await this.#Ts.invoke_addVirtualAuthenticator({options:e})).authenticatorId}async removeAuthenticator(e){await this.#Ts.invoke_removeVirtualAuthenticator({authenticatorId:e})}async setAutomaticPresenceSimulation(e,t){await this.#Ts.invoke_setAutomaticPresenceSimulation({authenticatorId:e,enabled:t})}async getCredentials(e){return(await this.#Ts.invoke_getCredentials({authenticatorId:e})).credentials}async removeCredential(e,t){await this.#Ts.invoke_removeCredential({authenticatorId:e,credentialId:t})}credentialAdded(e){this.dispatchEventToListeners("CredentialAdded",e)}credentialAsserted(e){this.dispatchEventToListeners("CredentialAsserted",e)}}class Fa{#$r;constructor(e){this.#$r=e}credentialAdded(e){this.#$r.credentialAdded(e)}credentialAsserted(e){this.#$r.credentialAsserted(e)}}c.register(Na,{capabilities:z.WebAuthn,autostart:!1});var Ba=Object.freeze({__proto__:null,WebAuthnModel:Na});export{Nr as AccessibilityModel,vs as CPUProfileDataModel,ss as CPUProfilerModel,Ms as CPUThrottlingManager,Qe as CSSContainerQuery,ze as CSSFontFace,Je as CSSLayer,wt as CSSMatchedStyles,tt as CSSMedia,E as CSSMetadata,hn as CSSModel,lt as CSSProperty,Fs as CSSPropertyParser,We as CSSQuery,yt as CSSRule,rt as CSSScope,ct as CSSStyleDeclaration,Mt as CSSStyleSheetHeader,it as CSSSupports,Br as CategorizedBreakpoint,Vr as ChildTargetManager,Jr as CompilerSourceMappingContentProvider,jr as Connections,ms as ConsoleModel,U as Cookie,bs as CookieModel,j as CookieParser,$s as DOMDebuggerModel,On as DOMModel,Ir as DebuggerModel,ws as EmulationModel,ni as EventBreakpointsModel,Ci as FilmStripModel,Ti as FrameAssociated,At as FrameManager,wr as HeapProfilerModel,Nt as IOModel,Ai as IsolateManager,Fi as IssuesModel,Bi as LayerTreeBase,as as LogModel,me as NetworkManager,Pe as NetworkRequest,gn as OverlayColorGenerator,Cn as OverlayModel,mn as OverlayPersistentHighlighter,Hi as PageLoad,zt as PageResourceLoader,ji as PaintProfiler,Gi as PerformanceMetricsModel,ta as PreloadingModel,N as ProfileTreeModel,qe as RemoteObject,Bn as Resource,Kn as ResourceTreeModel,Er as RuntimeModel,h as SDKModel,ra as ScreenCaptureModel,tr as Script,Hn as SecurityOriginManager,Ie as ServerTiming,ua as ServiceWorkerCacheModel,Ca as ServiceWorkerManager,Xt as SourceMap,Zt as SourceMapManager,ia as StorageBucketsModel,zn as StorageKeyManager,V as Target,Q as TargetManager,La as TraceSDKServices,Oa as TracingManager,Ii as TracingModel,Ba as WebAuthnModel}; diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/device_mode_emulation_frame.html b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/device_mode_emulation_frame.html deleted file mode 100644 index b601a1db8..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/device_mode_emulation_frame.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - -DevTools (React Native) - - - - - - diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/devtools_app.html b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/devtools_app.html deleted file mode 100644 index d7ba2348c..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/devtools_app.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - -DevTools (React Native) - - - - - - diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/devtools_compatibility.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/devtools_compatibility.js deleted file mode 100644 index 548ccfc85..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/devtools_compatibility.js +++ /dev/null @@ -1,1595 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -/* eslint-disable indent */ -(function(window) { - -// DevToolsAPI ---------------------------------------------------------------- - -/** - * @typedef {{runtimeAllowedHosts: !Array, runtimeBlockedHosts: !Array}} ExtensionHostsPolicy - */ -/** - * @typedef {{startPage: string, name: string, exposeExperimentalAPIs: boolean, hostsPolicy?: ExtensionHostsPolicy}} ExtensionDescriptor - */ -const DevToolsAPIImpl = class { - constructor() { - /** - * @type {number} - */ - this._lastCallId = 0; - - /** - * @type {!Object.} - */ - this._callbacks = {}; - - /** - * @type {!Array.} - */ - this._pendingExtensionDescriptors = []; - - /** - * @type {?function(!ExtensionDescriptor): void} - */ - this._addExtensionCallback = null; - - /** - * @type {!Array} - */ - this._originsForbiddenForExtensions = []; - - /** - * @type {!Promise} - */ - this._initialTargetIdPromise = new Promise(resolve => { - this._setInitialTargetId = resolve; - }); - } - - /** - * @param {number} id - * @param {?Object} arg - */ - embedderMessageAck(id, arg) { - const callback = this._callbacks[id]; - delete this._callbacks[id]; - if (callback) { - callback(arg); - } - } - - /** - * @param {string} method - * @param {!Array.<*>} args - * @param {?function(?Object)} callback - */ - sendMessageToEmbedder(method, args, callback) { - const callId = ++this._lastCallId; - if (callback) { - this._callbacks[callId] = callback; - } - const message = {'id': callId, 'method': method}; - if (args.length) { - message.params = args; - } - DevToolsHost.sendMessageToEmbedder(JSON.stringify(message)); - } - - /** - * @param {string} method - * @param {!Array<*>} args - */ - _dispatchOnInspectorFrontendAPI(method, args) { - const inspectorFrontendAPI = /** @type {!Object} */ (window['InspectorFrontendAPI']); - inspectorFrontendAPI[method].apply(inspectorFrontendAPI, args); - } - - // API methods below this line -------------------------------------------- - - /** - * @param {!Array.} extensions - */ - addExtensions(extensions) { - // Support for legacy front-ends (} forbiddenOrigins - */ - setOriginsForbiddenForExtensions(forbiddenOrigins) { - this._originsForbiddenForExtensions = forbiddenOrigins; - } - - /** - * @return {!Array} - */ - getOriginsForbiddenForExtensions() { - return this._originsForbiddenForExtensions; - } - - /** - * @param {string} url - */ - appendedToURL(url) { - this._dispatchOnInspectorFrontendAPI('appendedToURL', [url]); - } - - /** - * @param {string} url - */ - canceledSaveURL(url) { - this._dispatchOnInspectorFrontendAPI('canceledSaveURL', [url]); - } - - contextMenuCleared() { - this._dispatchOnInspectorFrontendAPI('contextMenuCleared', []); - } - - /** - * @param {string} id - */ - contextMenuItemSelected(id) { - this._dispatchOnInspectorFrontendAPI('contextMenuItemSelected', [id]); - } - - /** - * @param {number} count - */ - deviceCountUpdated(count) { - this._dispatchOnInspectorFrontendAPI('deviceCountUpdated', [count]); - } - - /** - * @param {!Adb.Config} config - */ - devicesDiscoveryConfigChanged(config) { - this._dispatchOnInspectorFrontendAPI('devicesDiscoveryConfigChanged', [config]); - } - - /** - * @param {!Adb.PortForwardingStatus} status - */ - devicesPortForwardingStatusChanged(status) { - this._dispatchOnInspectorFrontendAPI('devicesPortForwardingStatusChanged', [status]); - } - - /** - * @param {!Array.} devices - */ - devicesUpdated(devices) { - this._dispatchOnInspectorFrontendAPI('devicesUpdated', [devices]); - } - - /** - * @param {string} message - */ - dispatchMessage(message) { - this._dispatchOnInspectorFrontendAPI('dispatchMessage', [message]); - } - - /** - * @param {string} messageChunk - * @param {number} messageSize - */ - dispatchMessageChunk(messageChunk, messageSize) { - this._dispatchOnInspectorFrontendAPI('dispatchMessageChunk', [messageChunk, messageSize]); - } - - enterInspectElementMode() { - this._dispatchOnInspectorFrontendAPI('enterInspectElementMode', []); - } - - /** - * @param {!{r: number, g: number, b: number, a: number}} color - */ - eyeDropperPickedColor(color) { - this._dispatchOnInspectorFrontendAPI('eyeDropperPickedColor', [color]); - } - - /** - * @param {!Array.} fileSystems - */ - fileSystemsLoaded(fileSystems) { - this._dispatchOnInspectorFrontendAPI('fileSystemsLoaded', [fileSystems]); - } - - /** - * @param {string} fileSystemPath - */ - fileSystemRemoved(fileSystemPath) { - this._dispatchOnInspectorFrontendAPI('fileSystemRemoved', [fileSystemPath]); - } - - /** - * @param {?string} error - * @param {?{type: string, fileSystemName: string, rootURL: string, fileSystemPath: string}} fileSystem - */ - fileSystemAdded(error, fileSystem) { - this._dispatchOnInspectorFrontendAPI('fileSystemAdded', [error, fileSystem]); - } - - /** - * @param {!Array} changedPaths - * @param {!Array} addedPaths - * @param {!Array} removedPaths - */ - fileSystemFilesChangedAddedRemoved(changedPaths, addedPaths, removedPaths) { - // Support for legacy front-ends (} files - */ - searchCompleted(requestId, fileSystemPath, files) { - this._dispatchOnInspectorFrontendAPI('searchCompleted', [requestId, fileSystemPath, files]); - } - - /** - * @param {string} tabId - */ - setInspectedTabId(tabId) { - this._inspectedTabIdValue = tabId; - - // Support for legacy front-ends ()} callback - */ - getPreferences(callback) { - DevToolsAPI.sendMessageToEmbedder('getPreferences', [], /** @type {function(?Object)} */ (callback)); - } - - /** - * @override - * @param {string} name - * @param {function(string)} callback - */ - getPreference(name, callback) { - DevToolsAPI.sendMessageToEmbedder('getPreference', [name], /** @type {function(string)} */ (callback)); - } - - /** - * @override - * @param {string} name - * @param {string} value - */ - setPreference(name, value) { - DevToolsAPI.sendMessageToEmbedder('setPreference', [name, value], null); - } - - /** - * @override - * @param {string} name - */ - removePreference(name) { - DevToolsAPI.sendMessageToEmbedder('removePreference', [name], null); - } - - /** - * @override - */ - clearPreferences() { - DevToolsAPI.sendMessageToEmbedder('clearPreferences', [], null); - } - - /** - * @override - * @param {!function(!InspectorFrontendHostAPI.SyncInformation):void} callback - */ - getSyncInformation(callback) { - DevToolsAPI.sendMessageToEmbedder('getSyncInformation', [], callback); - } - - /** - * @override - * @param {string} origin - * @param {string} script - */ - setInjectedScriptForOrigin(origin, script) { - DevToolsAPI.sendMessageToEmbedder('registerExtensionsAPI', [origin, script], null); - } - - /** - * @override - * @param {string} url - */ - inspectedURLChanged(url) { - DevToolsAPI.sendMessageToEmbedder('inspectedURLChanged', [url], null); - } - - /** - * @override - * @param {string} text - */ - copyText(text) { - DevToolsHost.copyText(text); - } - - /** - * @override - * @param {string} url - */ - openInNewTab(url) { - DevToolsAPI.sendMessageToEmbedder('openInNewTab', [url], null); - } - - /** - * @override - * @param {string} fileSystemPath - */ - showItemInFolder(fileSystemPath) { - DevToolsAPI.sendMessageToEmbedder('showItemInFolder', [fileSystemPath], null); - } - - /** - * @override - * @param {string} url - * @param {string} content - * @param {boolean} forceSaveAs - */ - save(url, content, forceSaveAs) { - DevToolsAPI.sendMessageToEmbedder('save', [url, content, forceSaveAs], null); - } - - /** - * @override - * @param {string} url - * @param {string} content - */ - append(url, content) { - DevToolsAPI.sendMessageToEmbedder('append', [url, content], null); - } - - /** - * @override - * @param {string} url - */ - close(url) { - } - - /** - * @override - * @param {string} message - */ - sendMessageToBackend(message) { - DevToolsAPI.sendMessageToEmbedder('dispatchProtocolMessage', [message], null); - } - - /** - * @override - * @param {string} histogramName - * @param {number} sample - * @param {number} min - * @param {number} exclusiveMax - * @param {number} bucketSize - */ - recordCountHistogram(histogramName, sample, min, exclusiveMax, bucketSize) { - DevToolsAPI.sendMessageToEmbedder( - 'recordCountHistogram', [histogramName, sample, min, exclusiveMax, bucketSize], null); - } - - /** - * @override - * @param {!InspectorFrontendHostAPI.EnumeratedHistogram} actionName - * @param {number} actionCode - * @param {number} bucketSize - */ - recordEnumeratedHistogram(actionName, actionCode, bucketSize) { - if (!Object.values(EnumeratedHistogram).includes(actionName)) { - return; - } - DevToolsAPI.sendMessageToEmbedder('recordEnumeratedHistogram', [actionName, actionCode, bucketSize], null); - } - - /** - * @override - * @param {string} histogramName - * @param {number} duration - */ - recordPerformanceHistogram(histogramName, duration) { - DevToolsAPI.sendMessageToEmbedder('recordPerformanceHistogram', [histogramName, duration], null); - } - - /** - * @override - * @param {string} umaName - */ - recordUserMetricsAction(umaName) { - DevToolsAPI.sendMessageToEmbedder('recordUserMetricsAction', [umaName], null); - } - - /** - * @override - */ - requestFileSystems() { - DevToolsAPI.sendMessageToEmbedder('requestFileSystems', [], null); - } - - /** - * @override - * @param {string=} type - */ - addFileSystem(type) { - DevToolsAPI.sendMessageToEmbedder('addFileSystem', [type || ''], null); - } - - /** - * @override - * @param {string} fileSystemPath - */ - removeFileSystem(fileSystemPath) { - DevToolsAPI.sendMessageToEmbedder('removeFileSystem', [fileSystemPath], null); - } - - /** - * @override - * @param {string} fileSystemId - * @param {string} registeredName - * @return {?FileSystem} - */ - isolatedFileSystem(fileSystemId, registeredName) { - return DevToolsHost.isolatedFileSystem(fileSystemId, registeredName); - } - - /** - * @override - * @param {!FileSystem} fileSystem - */ - upgradeDraggedFileSystemPermissions(fileSystem) { - DevToolsHost.upgradeDraggedFileSystemPermissions(fileSystem); - } - - /** - * @override - * @param {number} requestId - * @param {string} fileSystemPath - * @param {string} excludedFolders - */ - indexPath(requestId, fileSystemPath, excludedFolders) { - // |excludedFolders| added in M67. For backward compatibility, - // pass empty array. - excludedFolders = excludedFolders || '[]'; - DevToolsAPI.sendMessageToEmbedder('indexPath', [requestId, fileSystemPath, excludedFolders], null); - } - - /** - * @override - * @param {number} requestId - */ - stopIndexing(requestId) { - DevToolsAPI.sendMessageToEmbedder('stopIndexing', [requestId], null); - } - - /** - * @override - * @param {number} requestId - * @param {string} fileSystemPath - * @param {string} query - */ - searchInPath(requestId, fileSystemPath, query) { - DevToolsAPI.sendMessageToEmbedder('searchInPath', [requestId, fileSystemPath, query], null); - } - - /** - * @override - * @return {number} - */ - zoomFactor() { - return DevToolsHost.zoomFactor(); - } - - /** - * @override - */ - zoomIn() { - DevToolsAPI.sendMessageToEmbedder('zoomIn', [], null); - } - - /** - * @override - */ - zoomOut() { - DevToolsAPI.sendMessageToEmbedder('zoomOut', [], null); - } - - /** - * @override - */ - resetZoom() { - DevToolsAPI.sendMessageToEmbedder('resetZoom', [], null); - } - - /** - * @override - * @param {string} shortcuts - */ - setWhitelistedShortcuts(shortcuts) { - DevToolsAPI.sendMessageToEmbedder('setWhitelistedShortcuts', [shortcuts], null); - } - - /** - * @override - * @param {boolean} active - */ - setEyeDropperActive(active) { - DevToolsAPI.sendMessageToEmbedder('setEyeDropperActive', [active], null); - } - - /** - * @override - * @param {!Array} certChain - */ - showCertificateViewer(certChain) { - DevToolsAPI.sendMessageToEmbedder('showCertificateViewer', [JSON.stringify(certChain)], null); - } - - /** - * Only needed to run Lighthouse on old devtools. - * @override - * @param {function()} callback - */ - reattach(callback) { - DevToolsAPI.sendMessageToEmbedder('reattach', [], callback); - } - - /** - * @override - */ - readyForTest() { - DevToolsAPI.sendMessageToEmbedder('readyForTest', [], null); - } - - /** - * @override - */ - connectionReady() { - DevToolsAPI.sendMessageToEmbedder('connectionReady', [], null); - } - - /** - * @override - * @param {boolean} value - */ - setOpenNewWindowForPopups(value) { - DevToolsAPI.sendMessageToEmbedder('setOpenNewWindowForPopups', [value], null); - } - - /** - * @override - * @param {!Adb.Config} config - */ - setDevicesDiscoveryConfig(config) { - DevToolsAPI.sendMessageToEmbedder( - 'setDevicesDiscoveryConfig', - [ - config.discoverUsbDevices, config.portForwardingEnabled, JSON.stringify(config.portForwardingConfig), - config.networkDiscoveryEnabled, JSON.stringify(config.networkDiscoveryConfig) - ], - null); - } - - /** - * @override - * @param {boolean} enabled - */ - setDevicesUpdatesEnabled(enabled) { - DevToolsAPI.sendMessageToEmbedder('setDevicesUpdatesEnabled', [enabled], null); - } - - /** - * @override - * @param {string} pageId - * @param {string} action - */ - performActionOnRemotePage(pageId, action) { - DevToolsAPI.sendMessageToEmbedder('performActionOnRemotePage', [pageId, action], null); - } - - /** - * @override - * @param {string} browserId - * @param {string} url - */ - openRemotePage(browserId, url) { - DevToolsAPI.sendMessageToEmbedder('openRemotePage', [browserId, url], null); - } - - /** - * @override - */ - openNodeFrontend() { - DevToolsAPI.sendMessageToEmbedder('openNodeFrontend', [], null); - } - - /** - * @override - * @param {number} x - * @param {number} y - * @param {!Array.} items - * @param {!Document} document - */ - showContextMenuAtPoint(x, y, items, document) { - DevToolsHost.showContextMenuAtPoint(x, y, items, document); - } - - /** - * @override - * @return {boolean} - */ - isHostedMode() { - return DevToolsHost.isHostedMode(); - } - - /** - * @override - * @param {function(!ExtensionDescriptor)} callback - */ - setAddExtensionCallback(callback) { - DevToolsAPI.setAddExtensionCallback(callback); - } - - // Backward-compatible methods below this line -------------------------------------------- - - /** - * Support for legacy front-ends (} - */ - initialTargetId() { - return DevToolsAPI._initialTargetIdPromise; - } -}; - -window.InspectorFrontendHost = new InspectorFrontendHostImpl(); - -// DevToolsApp --------------------------------------------------------------- - -function installObjectObserve() { - /** @type {!Array} */ - const properties = [ - 'advancedSearchConfig', - 'auditsPanelSplitViewState', - 'auditsSidebarWidth', - 'blockedURLs', - 'breakpoints', - 'cacheDisabled', - 'colorFormat', - 'consoleHistory', - 'consoleTimestampsEnabled', - 'cpuProfilerView', - 'cssSourceMapsEnabled', - 'currentDockState', - 'customColorPalette', - 'customDevicePresets', - 'customEmulatedDeviceList', - 'customFormatters', - 'customUserAgent', - 'databaseTableViewVisibleColumns', - 'dataGrid-cookiesTable', - 'dataGrid-DOMStorageItemsView', - 'debuggerSidebarHidden', - 'disablePausedStateOverlay', - 'domBreakpoints', - 'domWordWrap', - 'elementsPanelSplitViewState', - 'elementsSidebarWidth', - 'emulation.deviceHeight', - 'emulation.deviceModeValue', - 'emulation.deviceOrientationOverride', - 'emulation.deviceScale', - 'emulation.deviceScaleFactor', - 'emulation.deviceUA', - 'emulation.deviceWidth', - 'emulation.locationOverride', - 'emulation.showDeviceMode', - 'emulation.showRulers', - 'enableAsyncStackTraces', - 'enableIgnoreListing', - 'eventListenerBreakpoints', - 'fileMappingEntries', - 'fileSystemMapping', - 'FileSystemViewSidebarWidth', - 'fileSystemViewSplitViewState', - 'filterBar-consoleView', - 'filterBar-networkPanel', - 'filterBar-promisePane', - 'filterBar-timelinePanel', - 'frameViewerHideChromeWindow', - 'heapSnapshotRetainersViewSize', - 'heapSnapshotSplitViewState', - 'hideCollectedPromises', - 'hideNetworkMessages', - 'highlightNodeOnHoverInOverlay', - 'inlineVariableValues', - 'Inspector.drawerSplitView', - 'Inspector.drawerSplitViewState', - 'InspectorView.panelOrder', - 'InspectorView.screencastSplitView', - 'InspectorView.screencastSplitViewState', - 'InspectorView.splitView', - 'InspectorView.splitViewState', - 'javaScriptDisabled', - 'jsSourceMapsEnabled', - 'lastActivePanel', - 'lastDockState', - 'lastSelectedSourcesSidebarPaneTab', - 'lastSnippetEvaluationIndex', - 'layerDetailsSplitView', - 'layerDetailsSplitViewState', - 'layersPanelSplitViewState', - 'layersShowInternalLayers', - 'layersSidebarWidth', - 'messageLevelFilters', - 'messageURLFilters', - 'monitoringXHREnabled', - 'navigatorGroupByAuthored', - 'navigatorGroupByFolder', - 'navigatorHidden', - 'networkColorCodeResourceTypes', - 'networkConditions', - 'networkConditionsCustomProfiles', - 'networkHideDataURL', - 'networkLogColumnsVisibility', - 'networkLogLargeRows', - 'networkLogShowOverview', - 'networkPanelSplitViewState', - 'networkRecordFilmStripSetting', - 'networkResourceTypeFilters', - 'networkShowPrimaryLoadWaterfall', - 'networkSidebarWidth', - 'openLinkHandler', - 'pauseOnUncaughtException', - 'pauseOnCaughtException', - 'pauseOnExceptionEnabled', - 'preserveConsoleLog', - 'prettyPrintInfobarDisabled', - 'previouslyViewedFiles', - 'profilesPanelSplitViewState', - 'profilesSidebarWidth', - 'promiseStatusFilters', - 'recordAllocationStacks', - 'requestHeaderFilterSetting', - 'request-info-formData-category-expanded', - 'request-info-general-category-expanded', - 'request-info-queryString-category-expanded', - 'request-info-requestHeaders-category-expanded', - 'request-info-requestPayload-category-expanded', - 'request-info-responseHeaders-category-expanded', - 'resources', - 'resourcesLastSelectedItem', - 'resourcesPanelSplitViewState', - 'resourcesSidebarWidth', - 'resourceViewTab', - 'savedURLs', - 'screencastEnabled', - 'scriptsPanelNavigatorSidebarWidth', - 'searchInContentScripts', - 'selectedAuditCategories', - 'selectedColorPalette', - 'selectedProfileType', - 'shortcutPanelSwitch', - 'showAdvancedHeapSnapshotProperties', - 'showEventListenersForAncestors', - 'showFrameowkrListeners', - 'showHeaSnapshotObjectsHiddenProperties', - 'showInheritedComputedStyleProperties', - 'showMediaQueryInspector', - 'showNativeFunctionsInJSProfile', - 'showUAShadowDOM', - 'showWhitespacesInEditor', - 'sidebarPosition', - 'skipContentScripts', - 'automaticallyIgnoreListKnownThirdPartyScripts', - 'skipStackFramesPattern', - 'sourceMapInfobarDisabled', - 'sourcesPanelDebuggerSidebarSplitViewState', - 'sourcesPanelNavigatorSplitViewState', - 'sourcesPanelSplitSidebarRatio', - 'sourcesPanelSplitViewState', - 'sourcesSidebarWidth', - 'standardEmulatedDeviceList', - 'StylesPaneSplitRatio', - 'stylesPaneSplitViewState', - 'textEditorAutocompletion', - 'textEditorAutoDetectIndent', - 'textEditorBracketMatching', - 'textEditorIndent', - 'textEditorTabMovesFocus', - 'timelineCaptureFilmStrip', - 'timelineCaptureLayersAndPictures', - 'timelineCaptureMemory', - 'timelineCaptureNetwork', - 'timeline-details', - 'timelineEnableJSSampling', - 'timelineOverviewMode', - 'timelinePanelDetailsSplitViewState', - 'timelinePanelRecorsSplitViewState', - 'timelinePanelTimelineStackSplitViewState', - 'timelinePerspective', - 'timeline-split', - 'timelineTreeGroupBy', - 'timeline-view', - 'timelineViewMode', - 'uiTheme', - 'watchExpressions', - 'WebInspector.Drawer.lastSelectedView', - 'WebInspector.Drawer.showOnLoad', - 'workspaceExcludedFolders', - 'workspaceFolderExcludePattern', - 'workspaceInfobarDisabled', - 'workspaceMappingInfobarDisabled', - 'xhrBreakpoints' - ]; - - /** - * @this {!{_storage: Object, _name: string}} - */ - function settingRemove() { - this._storage[this._name] = undefined; - } - - /** - * @param {!Object} object - * @param {function(!Array)} observer - */ - function objectObserve(object, observer) { - if (window['WebInspector']) { - const settingPrototype = /** @type {!Object} */ (window['WebInspector']['Setting']['prototype']); - if (typeof settingPrototype['remove'] === 'function') { - settingPrototype['remove'] = settingRemove; - } - } - /** @type {!Set} */ - const changedProperties = new Set(); - let scheduled = false; - - function scheduleObserver() { - if (scheduled) { - return; - } - scheduled = true; - queueMicrotask(callObserver); - } - - function callObserver() { - scheduled = false; - const changes = /** @type {!Array} */ ([]); - changedProperties.forEach(function(name) { - changes.push({name: name}); - }); - changedProperties.clear(); - observer.call(null, changes); - } - - /** @type {!Map} */ - const storage = new Map(); - - /** - * @param {string} property - */ - function defineProperty(property) { - if (property in object) { - storage.set(property, object[property]); - delete object[property]; - } - - Object.defineProperty(object, property, { - /** - * @return {*} - */ - get: function() { - return storage.get(property); - }, - - /** - * @param {*} value - */ - set: function(value) { - storage.set(property, value); - changedProperties.add(property); - scheduleObserver(); - } - }); - } - - for (let i = 0; i < properties.length; ++i) { - defineProperty(properties[i]); - } - } - - window.Object.observe = objectObserve; -} - -/** @type {!Map} */ -const staticKeyIdentifiers = new Map([ - [0x12, 'Alt'], - [0x11, 'Control'], - [0x10, 'Shift'], - [0x14, 'CapsLock'], - [0x5b, 'Win'], - [0x5c, 'Win'], - [0x0c, 'Clear'], - [0x28, 'Down'], - [0x23, 'End'], - [0x0a, 'Enter'], - [0x0d, 'Enter'], - [0x2b, 'Execute'], - [0x70, 'F1'], - [0x71, 'F2'], - [0x72, 'F3'], - [0x73, 'F4'], - [0x74, 'F5'], - [0x75, 'F6'], - [0x76, 'F7'], - [0x77, 'F8'], - [0x78, 'F9'], - [0x79, 'F10'], - [0x7a, 'F11'], - [0x7b, 'F12'], - [0x7c, 'F13'], - [0x7d, 'F14'], - [0x7e, 'F15'], - [0x7f, 'F16'], - [0x80, 'F17'], - [0x81, 'F18'], - [0x82, 'F19'], - [0x83, 'F20'], - [0x84, 'F21'], - [0x85, 'F22'], - [0x86, 'F23'], - [0x87, 'F24'], - [0x2f, 'Help'], - [0x24, 'Home'], - [0x2d, 'Insert'], - [0x25, 'Left'], - [0x22, 'PageDown'], - [0x21, 'PageUp'], - [0x13, 'Pause'], - [0x2c, 'PrintScreen'], - [0x27, 'Right'], - [0x91, 'Scroll'], - [0x29, 'Select'], - [0x26, 'Up'], - [0x2e, 'U+007F'], // Standard says that DEL becomes U+007F. - [0xb0, 'MediaNextTrack'], - [0xb1, 'MediaPreviousTrack'], - [0xb2, 'MediaStop'], - [0xb3, 'MediaPlayPause'], - [0xad, 'VolumeMute'], - [0xae, 'VolumeDown'], - [0xaf, 'VolumeUp'], -]); - -/** - * @param {number} keyCode - * @return {string} - */ -function keyCodeToKeyIdentifier(keyCode) { - let result = staticKeyIdentifiers.get(keyCode); - if (result !== undefined) { - return result; - } - result = 'U+'; - const hexString = keyCode.toString(16).toUpperCase(); - for (let i = hexString.length; i < 4; ++i) { - result += '0'; - } - result += hexString; - return result; -} - -function installBackwardsCompatibility() { - const majorVersion = getRemoteMajorVersion(); - if (!majorVersion) { - return; - } - - /** @type {!Array} */ - const styleRules = []; - // Shadow DOM V0 polyfill - if (majorVersion <= 73 && !Element.prototype.createShadowRoot) { - Element.prototype.createShadowRoot = function() { - try { - return this.attachShadow({mode: 'open'}); - } catch (e) { - // some elements we use to add shadow roots can no - // longer have shadow roots. - const fakeShadowHost = document.createElement('span'); - this.appendChild(fakeShadowHost); - fakeShadowHost.className = 'fake-shadow-host'; - return fakeShadowHost.createShadowRoot(); - } - }; - - const origAdd = DOMTokenList.prototype.add; - DOMTokenList.prototype.add = function(...tokens) { - if (tokens[0].startsWith('insertion-point') || tokens[0].startsWith('tabbed-pane-header')) { - this._myElement.slot = '.' + tokens[0]; - } - return origAdd.apply(this, tokens); - }; - - const origCreateElement = Document.prototype.createElement; - Document.prototype.createElement = function(tagName, ...rest) { - if (tagName === 'content') { - tagName = 'slot'; - } - const element = origCreateElement.call(this, tagName, ...rest); - element.classList._myElement = element; - return element; - }; - - Object.defineProperty(HTMLSlotElement.prototype, 'select', { - set(selector) { - this.name = selector; - } - }); - } - - // Custom Elements V0 polyfill - if (majorVersion <= 73 && !Document.prototype.hasOwnProperty('registerElement')) { - const fakeRegistry = new Map(); - Document.prototype.registerElement = function(typeExtension, options) { - const {prototype, extends: localName} = options; - const document = this; - const callback = function() { - const element = document.createElement(localName || typeExtension); - const skip = new Set(['constructor', '__proto__']); - for (const key of Object.keys(Object.getOwnPropertyDescriptors(prototype.__proto__ || {}))) { - if (skip.has(key)) { - continue; - } - element[key] = prototype[key]; - } - element.setAttribute('is', typeExtension); - if (element['createdCallback']) { - element['createdCallback'](); - } - return element; - }; - fakeRegistry.set(typeExtension, callback); - return callback; - }; - - const origCreateElement = Document.prototype.createElement; - Document.prototype.createElement = function(tagName, fakeCustomElementType) { - const fakeConstructor = fakeRegistry.get(fakeCustomElementType); - if (fakeConstructor) { - return fakeConstructor(); - } - return origCreateElement.call(this, tagName, fakeCustomElementType); - }; - - // DevTools front-ends mistakenly assume that - // classList.toggle('a', undefined) works as - // classList.toggle('a', false) rather than as - // classList.toggle('a'); - const originalDOMTokenListToggle = DOMTokenList.prototype.toggle; - DOMTokenList.prototype.toggle = function(token, force) { - if (arguments.length === 1) { - force = !this.contains(token); - } - return originalDOMTokenListToggle.call(this, token, Boolean(force)); - }; - } - - if (majorVersion <= 66) { - /** @type {(!function(number, number):Element|undefined)} */ - ShadowRoot.prototype.__originalShadowRootElementFromPoint; - - if (!ShadowRoot.prototype.__originalShadowRootElementFromPoint) { - ShadowRoot.prototype.__originalShadowRootElementFromPoint = ShadowRoot.prototype.elementFromPoint; - /** - * @param {number} x - * @param {number} y - * @return {Element} - */ - ShadowRoot.prototype.elementFromPoint = function(x, y) { - const originalResult = ShadowRoot.prototype.__originalShadowRootElementFromPoint.apply(this, arguments); - if (this.host && originalResult === this.host) { - return null; - } - return originalResult; - }; - } - } - - if (majorVersion <= 53) { - Object.defineProperty(window.KeyboardEvent.prototype, 'keyIdentifier', { - /** - * @return {string} - * @this {KeyboardEvent} - */ - get: function() { - return keyCodeToKeyIdentifier(this.keyCode); - } - }); - } - - if (majorVersion <= 50) { - installObjectObserve(); - } - - if (majorVersion <= 71) { - styleRules.push( - '.coverage-toolbar-container, .animation-timeline-toolbar-container, .computed-properties { flex-basis: auto; }'); - } - - if (majorVersion <= 50) { - Event.prototype.deepPath = undefined; - } - - if (majorVersion <= 54) { - window.FileError = /** @type {!function (new: FileError) : ?} */ ({ - NOT_FOUND_ERR: DOMException.NOT_FOUND_ERR, - ABORT_ERR: DOMException.ABORT_ERR, - INVALID_MODIFICATION_ERR: DOMException.INVALID_MODIFICATION_ERR, - NOT_READABLE_ERR: 0 // No matching DOMException, so code will be 0. - }); - } - - installExtraStyleRules(styleRules); -} - -/** - * @return {?number} - */ -function getRemoteMajorVersion() { - try { - const remoteVersion = new URLSearchParams(window.location.search).get('remoteVersion'); - if (!remoteVersion) { - return null; - } - const majorVersion = parseInt(remoteVersion.split('.')[0], 10); - return majorVersion; - } catch (e) { - return null; - } -} - -/** - * @param {!Array} styleRules - */ -function installExtraStyleRules(styleRules) { - if (!styleRules.length) { - return; - } - const styleText = styleRules.join('\n'); - document.head.appendChild(createStyleElement(styleText)); - - const origCreateShadowRoot = HTMLElement.prototype.createShadowRoot; - HTMLElement.prototype.createShadowRoot = function(...args) { - const shadowRoot = origCreateShadowRoot.call(this, ...args); - shadowRoot.appendChild(createStyleElement(styleText)); - return shadowRoot; - }; -} - -/** - * @param {string} styleText - * @return {!Element} - */ -function createStyleElement(styleText) { - const style = document.createElement('style'); - style.textContent = styleText; - return style; -} - -installBackwardsCompatibility(); -})(window); diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/MotoG4-landscape.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/MotoG4-landscape.avif deleted file mode 100644 index 79d184723..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/MotoG4-landscape.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/MotoG4-portrait.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/MotoG4-portrait.avif deleted file mode 100644 index 1f0f3f649..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/MotoG4-portrait.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/Nexus5X-landscape.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/Nexus5X-landscape.avif deleted file mode 100644 index c4908722f..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/Nexus5X-landscape.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/Nexus5X-portrait.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/Nexus5X-portrait.avif deleted file mode 100644 index 86ab35cfb..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/Nexus5X-portrait.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/Nexus6P-landscape.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/Nexus6P-landscape.avif deleted file mode 100644 index 531b0ee0a..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/Nexus6P-landscape.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/Nexus6P-portrait.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/Nexus6P-portrait.avif deleted file mode 100644 index f2abf6ce5..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/Nexus6P-portrait.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nest-hub-horizontal.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nest-hub-horizontal.avif deleted file mode 100644 index 9ec462c77..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nest-hub-horizontal.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nest-hub-max-horizontal.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nest-hub-max-horizontal.avif deleted file mode 100644 index e755f5e2e..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nest-hub-max-horizontal.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-default-1x.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-default-1x.avif deleted file mode 100644 index da2715dad..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-default-1x.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-default-2x.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-default-2x.avif deleted file mode 100644 index 99e5d86f3..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-default-2x.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-1x.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-1x.avif deleted file mode 100644 index 74caee35c..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-1x.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-2x.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-2x.avif deleted file mode 100644 index f4a6b130a..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-2x.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-navigation-1x.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-navigation-1x.avif deleted file mode 100644 index 19da3aa68..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-navigation-1x.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-navigation-2x.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-navigation-2x.avif deleted file mode 100644 index fe2829775..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-navigation-2x.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-default-1x.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-default-1x.avif deleted file mode 100644 index ddaf02d3b..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-default-1x.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-default-2x.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-default-2x.avif deleted file mode 100644 index c92254f67..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-default-2x.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-keyboard-1x.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-keyboard-1x.avif deleted file mode 100644 index d3ca640e0..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-keyboard-1x.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-keyboard-2x.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-keyboard-2x.avif deleted file mode 100644 index d16bb443b..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-keyboard-2x.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-navigation-1x.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-navigation-1x.avif deleted file mode 100644 index 038e3cdeb..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-navigation-1x.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-navigation-2x.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-navigation-2x.avif deleted file mode 100644 index faf72a293..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-navigation-2x.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-default-1x.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-default-1x.avif deleted file mode 100644 index 4d6e89189..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-default-1x.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-default-2x.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-default-2x.avif deleted file mode 100644 index c24a15b27..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-default-2x.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-1x.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-1x.avif deleted file mode 100644 index 33ecd9065..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-1x.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-2x.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-2x.avif deleted file mode 100644 index b6258a6ce..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-2x.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-1x.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-1x.avif deleted file mode 100644 index ba57f9e91..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-1x.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-2x.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-2x.avif deleted file mode 100644 index b9ec520ee..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-2x.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-default-1x.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-default-1x.avif deleted file mode 100644 index ea2fee732..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-default-1x.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-default-2x.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-default-2x.avif deleted file mode 100644 index beeba6f10..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-default-2x.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-1x.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-1x.avif deleted file mode 100644 index 515716333..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-1x.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-2x.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-2x.avif deleted file mode 100644 index c0afab11a..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-2x.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-navigation-1x.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-navigation-1x.avif deleted file mode 100644 index 9ee82e567..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-navigation-1x.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-navigation-2x.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-navigation-2x.avif deleted file mode 100644 index ae663552d..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-navigation-2x.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/iPad-landscape.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/iPad-landscape.avif deleted file mode 100644 index 6948cb9dc..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/iPad-landscape.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/iPad-portrait.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/iPad-portrait.avif deleted file mode 100644 index d587af69b..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/iPad-portrait.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/iPhone5-landscape.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/iPhone5-landscape.avif deleted file mode 100644 index 1ea9b3233..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/iPhone5-landscape.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/iPhone5-portrait.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/iPhone5-portrait.avif deleted file mode 100644 index 327395c22..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/iPhone5-portrait.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/iPhone6-landscape.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/iPhone6-landscape.avif deleted file mode 100644 index 57964e539..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/iPhone6-landscape.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/iPhone6-portrait.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/iPhone6-portrait.avif deleted file mode 100644 index b8f7a1b63..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/iPhone6-portrait.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/iPhone6Plus-landscape.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/iPhone6Plus-landscape.avif deleted file mode 100644 index cf57770e2..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/iPhone6Plus-landscape.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/iPhone6Plus-portrait.avif b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/iPhone6Plus-portrait.avif deleted file mode 100644 index a293b5e34..000000000 Binary files a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/emulated_devices/optimized/iPhone6Plus-portrait.avif and /dev/null differ diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/device_mode_emulation_frame/device_mode_emulation_frame.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/device_mode_emulation_frame/device_mode_emulation_frame.js deleted file mode 100644 index 1ada6a728..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/device_mode_emulation_frame/device_mode_emulation_frame.js +++ /dev/null @@ -1 +0,0 @@ -import"../../core/dom_extension/dom_extension.js";import"../../Images/Images.js";if(window.opener){window.opener.Emulation.AdvancedApp.instance().deviceModeEmulationFrameLoaded(document)} diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/devtools_app/devtools_app.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/devtools_app/devtools_app.js deleted file mode 100644 index 2627ff4a0..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/devtools_app/devtools_app.js +++ /dev/null @@ -1 +0,0 @@ -import"../shell/shell.js";import*as e from"../../core/i18n/i18n.js";import*as t from"../../ui/legacy/legacy.js";import*as i from"../../core/common/common.js";import*as o from"../../core/root/root.js";import*as n from"../../core/sdk/sdk.js";import*as a from"../../models/workspace/workspace.js";import*as r from"../../panels/network/forward/forward.js";import*as s from"../../models/issues_manager/issues_manager.js";import*as c from"../main/main.js";const l={cssOverview:"CSS Overview",showCssOverview:"Show CSS Overview"},g=e.i18n.registerUIStrings("panels/css_overview/css_overview-meta.ts",l),d=e.i18n.getLazilyComputedLocalizedString.bind(void 0,g);let m;t.ViewManager.registerViewExtension({location:"panel",id:"cssoverview",commandPrompt:d(l.showCssOverview),title:d(l.cssOverview),order:95,persistence:"closeable",async loadView(){const e=await async function(){return m||(m=await import("../../panels/css_overview/css_overview.js")),m}();return new e.CSSOverviewPanel.CSSOverviewPanel(new e.CSSOverviewController.OverviewController)},isPreviewFeature:!0});const p={showElements:"Show Elements",elements:"Elements",showEventListeners:"Show Event Listeners",eventListeners:"Event Listeners",showProperties:"Show Properties",properties:"Properties",showStackTrace:"Show Stack Trace",stackTrace:"Stack Trace",showLayout:"Show Layout",layout:"Layout",hideElement:"Hide element",editAsHtml:"Edit as HTML",duplicateElement:"Duplicate element",undo:"Undo",redo:"Redo",captureAreaScreenshot:"Capture area screenshot",selectAnElementInThePageTo:"Select an element in the page to inspect it",wordWrap:"Word wrap",enableDomWordWrap:"Enable `DOM` word wrap",disableDomWordWrap:"Disable `DOM` word wrap",showHtmlComments:"Show `HTML` comments",hideHtmlComments:"Hide `HTML` comments",revealDomNodeOnHover:"Reveal `DOM` node on hover",showDetailedInspectTooltip:"Show detailed inspect tooltip",showCSSDocumentationTooltip:"Show CSS documentation tooltip",copyStyles:"Copy styles",showUserAgentShadowDOM:"Show user agent shadow `DOM`",showComputedStyles:"Show Computed Styles",showStyles:"Show Styles",toggleEyeDropper:"Toggle eye dropper"},w=e.i18n.registerUIStrings("panels/elements/elements-meta.ts",p),u=e.i18n.getLazilyComputedLocalizedString.bind(void 0,w);let y,S;async function h(){return y||(y=await import("../../panels/elements/elements.js")),y}function A(e){return void 0===y?[]:e(y)}t.ViewManager.registerViewExtension({location:"panel",id:"elements",commandPrompt:u(p.showElements),title:u(p.elements),order:10,persistence:"permanent",hasToolbar:!1,loadView:async()=>(await h()).ElementsPanel.ElementsPanel.instance()}),t.ActionRegistration.registerActionExtension({actionId:"elements.show-styles",category:t.ActionRegistration.ActionCategory.ELEMENTS,title:u(p.showStyles),loadActionDelegate:async()=>(await h()).ElementsPanel.ElementsActionDelegate.instance()}),t.ActionRegistration.registerActionExtension({actionId:"elements.show-computed",category:t.ActionRegistration.ActionCategory.ELEMENTS,title:u(p.showComputedStyles),loadActionDelegate:async()=>(await h()).ElementsPanel.ElementsActionDelegate.instance()}),t.ViewManager.registerViewExtension({location:"elements-sidebar",id:"elements.eventListeners",commandPrompt:u(p.showEventListeners),title:u(p.eventListeners),order:5,hasToolbar:!0,persistence:"permanent",loadView:async()=>(await h()).EventListenersWidget.EventListenersWidget.instance()}),t.ViewManager.registerViewExtension({location:"elements-sidebar",id:"elements.domProperties",commandPrompt:u(p.showProperties),title:u(p.properties),order:7,persistence:"permanent",loadView:async()=>(await h()).PropertiesWidget.PropertiesWidget.instance()}),t.ViewManager.registerViewExtension({experiment:o.Runtime.ExperimentName.CAPTURE_NODE_CREATION_STACKS,location:"elements-sidebar",id:"elements.domCreation",commandPrompt:u(p.showStackTrace),title:u(p.stackTrace),order:10,persistence:"permanent",loadView:async()=>(await h()).NodeStackTraceWidget.NodeStackTraceWidget.instance()}),t.ViewManager.registerViewExtension({location:"elements-sidebar",id:"elements.layout",commandPrompt:u(p.showLayout),title:u(p.layout),order:4,persistence:"permanent",loadView:async()=>(await async function(){return S||(S=await import("../../panels/elements/components/components.js")),S}()).LayoutPane.LayoutPane.instance().wrapper}),t.ActionRegistration.registerActionExtension({actionId:"elements.hide-element",category:t.ActionRegistration.ActionCategory.ELEMENTS,title:u(p.hideElement),loadActionDelegate:async()=>(await h()).ElementsPanel.ElementsActionDelegate.instance(),contextTypes:()=>A((e=>[e.ElementsPanel.ElementsPanel])),bindings:[{shortcut:"H"}]}),t.ActionRegistration.registerActionExtension({actionId:"elements.toggle-eye-dropper",category:t.ActionRegistration.ActionCategory.ELEMENTS,title:u(p.toggleEyeDropper),loadActionDelegate:async()=>(await h()).ElementsPanel.ElementsActionDelegate.instance(),contextTypes:()=>A((e=>[e.ColorSwatchPopoverIcon.ColorSwatchPopoverIcon])),bindings:[{shortcut:"c"}]}),t.ActionRegistration.registerActionExtension({actionId:"elements.edit-as-html",category:t.ActionRegistration.ActionCategory.ELEMENTS,title:u(p.editAsHtml),loadActionDelegate:async()=>(await h()).ElementsPanel.ElementsActionDelegate.instance(),contextTypes:()=>A((e=>[e.ElementsPanel.ElementsPanel])),bindings:[{shortcut:"F2"}]}),t.ActionRegistration.registerActionExtension({actionId:"elements.duplicate-element",category:t.ActionRegistration.ActionCategory.ELEMENTS,title:u(p.duplicateElement),loadActionDelegate:async()=>(await h()).ElementsPanel.ElementsActionDelegate.instance(),contextTypes:()=>A((e=>[e.ElementsPanel.ElementsPanel])),bindings:[{shortcut:"Shift+Alt+Down"}]}),t.ActionRegistration.registerActionExtension({actionId:"elements.copy-styles",category:t.ActionRegistration.ActionCategory.ELEMENTS,title:u(p.copyStyles),loadActionDelegate:async()=>(await h()).ElementsPanel.ElementsActionDelegate.instance(),contextTypes:()=>A((e=>[e.ElementsPanel.ElementsPanel])),bindings:[{shortcut:"Ctrl+Alt+C",platform:"windows,linux"},{shortcut:"Meta+Alt+C",platform:"mac"}]}),t.ActionRegistration.registerActionExtension({actionId:"elements.undo",category:t.ActionRegistration.ActionCategory.ELEMENTS,title:u(p.undo),loadActionDelegate:async()=>(await h()).ElementsPanel.ElementsActionDelegate.instance(),contextTypes:()=>A((e=>[e.ElementsPanel.ElementsPanel])),bindings:[{shortcut:"Ctrl+Z",platform:"windows,linux"},{shortcut:"Meta+Z",platform:"mac"}]}),t.ActionRegistration.registerActionExtension({actionId:"elements.redo",category:t.ActionRegistration.ActionCategory.ELEMENTS,title:u(p.redo),loadActionDelegate:async()=>(await h()).ElementsPanel.ElementsActionDelegate.instance(),contextTypes:()=>A((e=>[e.ElementsPanel.ElementsPanel])),bindings:[{shortcut:"Ctrl+Y",platform:"windows,linux"},{shortcut:"Meta+Shift+Z",platform:"mac"}]}),t.ActionRegistration.registerActionExtension({actionId:"elements.capture-area-screenshot",loadActionDelegate:async()=>(await h()).InspectElementModeController.ToggleSearchActionDelegate.instance(),condition:o.Runtime.ConditionName.CAN_DOCK,title:u(p.captureAreaScreenshot),category:t.ActionRegistration.ActionCategory.SCREENSHOT}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.ELEMENTS,actionId:"elements.toggle-element-search",toggleable:!0,loadActionDelegate:async()=>(await h()).InspectElementModeController.ToggleSearchActionDelegate.instance(),title:u(p.selectAnElementInThePageTo),iconClass:"select-element",bindings:[{shortcut:"Ctrl+Shift+C",platform:"windows,linux"},{shortcut:"Meta+Shift+C",platform:"mac"}]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.ELEMENTS,storageType:i.Settings.SettingStorageType.Synced,order:1,title:u(p.showUserAgentShadowDOM),settingName:"showUAShadowDOM",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!1}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.ELEMENTS,storageType:i.Settings.SettingStorageType.Synced,order:2,title:u(p.wordWrap),settingName:"domWordWrap",settingType:i.Settings.SettingType.BOOLEAN,options:[{value:!0,title:u(p.enableDomWordWrap)},{value:!1,title:u(p.disableDomWordWrap)}],defaultValue:!0}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.ELEMENTS,storageType:i.Settings.SettingStorageType.Synced,order:3,title:u(p.showHtmlComments),settingName:"showHTMLComments",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!0,options:[{value:!0,title:u(p.showHtmlComments)},{value:!1,title:u(p.hideHtmlComments)}]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.ELEMENTS,storageType:i.Settings.SettingStorageType.Synced,order:4,title:u(p.revealDomNodeOnHover),settingName:"highlightNodeOnHoverInOverlay",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!0}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.ELEMENTS,storageType:i.Settings.SettingStorageType.Synced,order:5,title:u(p.showDetailedInspectTooltip),settingName:"showDetailedInspectTooltip",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!0}),i.Settings.registerSettingExtension({settingName:"showEventListenersForAncestors",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!0}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.ADORNER,storageType:i.Settings.SettingStorageType.Synced,settingName:"adornerSettings",settingType:i.Settings.SettingType.ARRAY,defaultValue:[]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.ELEMENTS,storageType:i.Settings.SettingStorageType.Synced,title:u(p.showCSSDocumentationTooltip),settingName:"showCSSPropertyDocumentationOnHover",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!0}),t.ContextMenu.registerProvider({contextTypes:()=>[n.RemoteObject.RemoteObject,n.DOMModel.DOMNode,n.DOMModel.DeferredDOMNode],loadProvider:async()=>(await h()).ElementsPanel.ContextMenuProvider.instance(),experiment:void 0}),t.ViewManager.registerLocationResolver({name:"elements-sidebar",category:t.ViewManager.ViewLocationCategory.ELEMENTS,loadResolver:async()=>(await h()).ElementsPanel.ElementsPanel.instance()}),i.Revealer.registerRevealer({contextTypes:()=>[n.DOMModel.DOMNode,n.DOMModel.DeferredDOMNode,n.RemoteObject.RemoteObject],destination:i.Revealer.RevealerDestination.ELEMENTS_PANEL,loadRevealer:async()=>(await h()).ElementsPanel.DOMNodeRevealer.instance()}),i.Revealer.registerRevealer({contextTypes:()=>[n.CSSProperty.CSSProperty],destination:i.Revealer.RevealerDestination.STYLES_SIDEBAR,loadRevealer:async()=>(await h()).ElementsPanel.CSSPropertyRevealer.instance()}),t.Toolbar.registerToolbarItem({loadItem:async()=>(await h()).LayersWidget.ButtonProvider.instance(),order:1,location:t.Toolbar.ToolbarItemLocation.STYLES_SIDEBARPANE_TOOLBAR,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),t.Toolbar.registerToolbarItem({loadItem:async()=>(await h()).ElementStatePaneWidget.ButtonProvider.instance(),order:2,location:t.Toolbar.ToolbarItemLocation.STYLES_SIDEBARPANE_TOOLBAR,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),t.Toolbar.registerToolbarItem({loadItem:async()=>(await h()).ClassesPaneWidget.ButtonProvider.instance(),order:3,location:t.Toolbar.ToolbarItemLocation.STYLES_SIDEBARPANE_TOOLBAR,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),t.Toolbar.registerToolbarItem({loadItem:async()=>(await h()).StylesSidebarPane.ButtonProvider.instance(),order:100,location:t.Toolbar.ToolbarItemLocation.STYLES_SIDEBARPANE_TOOLBAR,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),t.Toolbar.registerToolbarItem({actionId:"elements.toggle-element-search",location:t.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_LEFT,order:0,showLabel:void 0,condition:void 0,separator:void 0,loadItem:void 0}),t.UIUtils.registerRenderer({contextTypes:()=>[n.DOMModel.DOMNode,n.DOMModel.DeferredDOMNode],loadRenderer:async()=>(await h()).ElementsTreeOutline.Renderer.instance()}),i.Linkifier.registerLinkifier({contextTypes:()=>[n.DOMModel.DOMNode,n.DOMModel.DeferredDOMNode],loadLinkifier:async()=>(await h()).DOMLinkifier.Linkifier.instance()});const E={showEventListenerBreakpoints:"Show Event Listener Breakpoints",eventListenerBreakpoints:"Event Listener Breakpoints",showCspViolationBreakpoints:"Show CSP Violation Breakpoints",cspViolationBreakpoints:"CSP Violation Breakpoints",showXhrfetchBreakpoints:"Show XHR/fetch Breakpoints",xhrfetchBreakpoints:"XHR/fetch Breakpoints",showDomBreakpoints:"Show DOM Breakpoints",domBreakpoints:"DOM Breakpoints",showGlobalListeners:"Show Global Listeners",globalListeners:"Global Listeners",page:"Page",showPage:"Show Page",overrides:"Overrides",showOverrides:"Show Overrides",contentScripts:"Content scripts",showContentScripts:"Show Content scripts"},R=e.i18n.registerUIStrings("panels/browser_debugger/browser_debugger-meta.ts",E),v=e.i18n.getLazilyComputedLocalizedString.bind(void 0,R);let T,P;async function C(){return T||(T=await import("../../panels/browser_debugger/browser_debugger.js")),T}async function b(){return P||(P=await import("../../panels/sources/sources.js")),P}t.ViewManager.registerViewExtension({loadView:async()=>(await C()).EventListenerBreakpointsSidebarPane.EventListenerBreakpointsSidebarPane.instance(),id:"sources.eventListenerBreakpoints",location:"sources.sidebar-bottom",commandPrompt:v(E.showEventListenerBreakpoints),title:v(E.eventListenerBreakpoints),order:9,persistence:"permanent"}),t.ViewManager.registerViewExtension({loadView:async()=>(await C()).CSPViolationBreakpointsSidebarPane.CSPViolationBreakpointsSidebarPane.instance(),id:"sources.cspViolationBreakpoints",location:"sources.sidebar-bottom",commandPrompt:v(E.showCspViolationBreakpoints),title:v(E.cspViolationBreakpoints),order:10,persistence:"permanent"}),t.ViewManager.registerViewExtension({loadView:async()=>(await C()).XHRBreakpointsSidebarPane.XHRBreakpointsSidebarPane.instance(),id:"sources.xhrBreakpoints",location:"sources.sidebar-bottom",commandPrompt:v(E.showXhrfetchBreakpoints),title:v(E.xhrfetchBreakpoints),order:5,persistence:"permanent",hasToolbar:!0}),t.ViewManager.registerViewExtension({loadView:async()=>(await C()).DOMBreakpointsSidebarPane.DOMBreakpointsSidebarPane.instance(),id:"sources.domBreakpoints",location:"sources.sidebar-bottom",commandPrompt:v(E.showDomBreakpoints),title:v(E.domBreakpoints),order:7,persistence:"permanent"}),t.ViewManager.registerViewExtension({loadView:async()=>(await C()).ObjectEventListenersSidebarPane.ObjectEventListenersSidebarPane.instance(),id:"sources.globalListeners",location:"sources.sidebar-bottom",commandPrompt:v(E.showGlobalListeners),title:v(E.globalListeners),order:8,persistence:"permanent",hasToolbar:!0}),t.ViewManager.registerViewExtension({loadView:async()=>(await C()).DOMBreakpointsSidebarPane.DOMBreakpointsSidebarPane.instance(),id:"elements.domBreakpoints",location:"elements-sidebar",commandPrompt:v(E.showDomBreakpoints),title:v(E.domBreakpoints),order:6,persistence:"permanent"}),t.ViewManager.registerViewExtension({location:"navigator-view",id:"navigator-network",title:v(E.page),commandPrompt:v(E.showPage),order:2,persistence:"permanent",loadView:async()=>(await b()).SourcesNavigator.NetworkNavigatorView.instance()}),t.ViewManager.registerViewExtension({location:"navigator-view",id:"navigator-overrides",title:v(E.overrides),commandPrompt:v(E.showOverrides),order:4,persistence:"permanent",loadView:async()=>(await b()).SourcesNavigator.OverridesNavigatorView.instance()}),t.ViewManager.registerViewExtension({location:"navigator-view",id:"navigator-contentScripts",title:v(E.contentScripts),commandPrompt:v(E.showContentScripts),order:5,persistence:"permanent",loadView:async()=>(await b()).SourcesNavigator.ContentScriptsNavigatorView.instance()}),t.ContextMenu.registerProvider({contextTypes:()=>[n.DOMModel.DOMNode],loadProvider:async()=>(await C()).DOMBreakpointsSidebarPane.ContextMenuProvider.instance(),experiment:void 0}),t.Context.registerListener({contextTypes:()=>[n.DebuggerModel.DebuggerPausedDetails],loadListener:async()=>(await C()).XHRBreakpointsSidebarPane.XHRBreakpointsSidebarPane.instance()}),t.Context.registerListener({contextTypes:()=>[n.DebuggerModel.DebuggerPausedDetails],loadListener:async()=>(await C()).DOMBreakpointsSidebarPane.DOMBreakpointsSidebarPane.instance()});const f={showNetwork:"Show Network",network:"Network",showNetworkRequestBlocking:"Show Network request blocking",networkRequestBlocking:"Network request blocking",showNetworkConditions:"Show Network conditions",networkConditions:"Network conditions",diskCache:"disk cache",networkThrottling:"network throttling",showSearch:"Show Search",search:"Search",recordNetworkLog:"Record network log",stopRecordingNetworkLog:"Stop recording network log",hideRequestDetails:"Hide request details",colorcodeResourceTypes:"Color-code resource types",colorCode:"color code",resourceType:"resource type",colorCodeByResourceType:"Color code by resource type",useDefaultColors:"Use default colors",groupNetworkLogByFrame:"Group network log by frame",netWork:"network",frame:"frame",group:"group",groupNetworkLogItemsByFrame:"Group network log items by frame",dontGroupNetworkLogItemsByFrame:"Don't group network log items by frame",clear:"Clear network log"},L=e.i18n.registerUIStrings("panels/network/network-meta.ts",f),N=e.i18n.getLazilyComputedLocalizedString.bind(void 0,L);let I;async function M(){return I||(I=await import("../../panels/network/network.js")),I}function D(e){return void 0===I?[]:e(I)}t.ViewManager.registerViewExtension({location:"panel",id:"network",commandPrompt:N(f.showNetwork),title:N(f.network),order:40,condition:o.Runtime.ConditionName.REACT_NATIVE_UNSTABLE_NETWORK_PANEL,loadView:async()=>(await M()).NetworkPanel.NetworkPanel.instance()}),t.ViewManager.registerViewExtension({location:"drawer-view",id:"network.blocked-urls",commandPrompt:N(f.showNetworkRequestBlocking),title:N(f.networkRequestBlocking),persistence:"closeable",order:60,loadView:async()=>(await M()).BlockedURLsPane.BlockedURLsPane.instance()}),t.ViewManager.registerViewExtension({location:"drawer-view",id:"network.config",commandPrompt:N(f.showNetworkConditions),title:N(f.networkConditions),persistence:"closeable",order:40,tags:[N(f.diskCache),N(f.networkThrottling),e.i18n.lockedLazyString("useragent"),e.i18n.lockedLazyString("user agent"),e.i18n.lockedLazyString("user-agent")],loadView:async()=>(await M()).NetworkConfigView.NetworkConfigView.instance()}),t.ViewManager.registerViewExtension({location:"network-sidebar",id:"network.search-network-tab",commandPrompt:N(f.showSearch),title:N(f.search),persistence:"permanent",loadView:async()=>(await M()).NetworkPanel.SearchNetworkView.instance()}),t.ActionRegistration.registerActionExtension({actionId:"network.toggle-recording",category:t.ActionRegistration.ActionCategory.NETWORK,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>D((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await M()).NetworkPanel.ActionDelegate.instance(),options:[{value:!0,title:N(f.recordNetworkLog)},{value:!1,title:N(f.stopRecordingNetworkLog)}],bindings:[{shortcut:"Ctrl+E",platform:"windows,linux"},{shortcut:"Meta+E",platform:"mac"}]}),t.ActionRegistration.registerActionExtension({actionId:"network.clear",category:t.ActionRegistration.ActionCategory.NETWORK,title:N(f.clear),iconClass:"clear",loadActionDelegate:async()=>(await M()).NetworkPanel.ActionDelegate.instance(),contextTypes:()=>D((e=>[e.NetworkPanel.NetworkPanel])),bindings:[{shortcut:"Ctrl+L"},{shortcut:"Meta+K",platform:"mac"}]}),t.ActionRegistration.registerActionExtension({actionId:"network.hide-request-details",category:t.ActionRegistration.ActionCategory.NETWORK,title:N(f.hideRequestDetails),contextTypes:()=>D((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await M()).NetworkPanel.ActionDelegate.instance(),bindings:[{shortcut:"Esc"}]}),t.ActionRegistration.registerActionExtension({actionId:"network.search",category:t.ActionRegistration.ActionCategory.NETWORK,title:N(f.search),contextTypes:()=>D((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await M()).NetworkPanel.ActionDelegate.instance(),bindings:[{platform:"mac",shortcut:"Meta+F",keybindSets:["devToolsDefault","vsCode"]},{platform:"windows,linux",shortcut:"Ctrl+F",keybindSets:["devToolsDefault","vsCode"]}]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.NETWORK,storageType:i.Settings.SettingStorageType.Synced,title:N(f.colorcodeResourceTypes),settingName:"networkColorCodeResourceTypes",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!1,tags:[N(f.colorCode),N(f.resourceType)],options:[{value:!0,title:N(f.colorCodeByResourceType)},{value:!1,title:N(f.useDefaultColors)}]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.NETWORK,storageType:i.Settings.SettingStorageType.Synced,title:N(f.groupNetworkLogByFrame),settingName:"network.group-by-frame",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!1,tags:[N(f.netWork),N(f.frame),N(f.group)],options:[{value:!0,title:N(f.groupNetworkLogItemsByFrame)},{value:!1,title:N(f.dontGroupNetworkLogItemsByFrame)}]}),t.ViewManager.registerLocationResolver({name:"network-sidebar",category:t.ViewManager.ViewLocationCategory.NETWORK,loadResolver:async()=>(await M()).NetworkPanel.NetworkPanel.instance()}),t.ContextMenu.registerProvider({contextTypes:()=>[n.NetworkRequest.NetworkRequest,n.Resource.Resource,a.UISourceCode.UISourceCode],loadProvider:async()=>(await M()).NetworkPanel.ContextMenuProvider.instance(),experiment:void 0}),i.Revealer.registerRevealer({contextTypes:()=>[n.NetworkRequest.NetworkRequest],destination:i.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await M()).NetworkPanel.RequestRevealer.instance()}),i.Revealer.registerRevealer({contextTypes:()=>[r.UIRequestLocation.UIRequestLocation],loadRevealer:async()=>(await M()).NetworkPanel.RequestLocationRevealer.instance(),destination:void 0}),i.Revealer.registerRevealer({contextTypes:()=>[r.NetworkRequestId.NetworkRequestId],destination:i.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await M()).NetworkPanel.RequestIdRevealer.instance()}),i.Revealer.registerRevealer({contextTypes:()=>[r.UIFilter.UIRequestFilter],destination:i.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await M()).NetworkPanel.NetworkLogWithFilterRevealer.instance()});const x={security:"Security",showSecurity:"Show Security"},k=e.i18n.registerUIStrings("panels/security/security-meta.ts",x),V=e.i18n.getLazilyComputedLocalizedString.bind(void 0,k);let O;t.ViewManager.registerViewExtension({location:"panel",id:"security",title:V(x.security),commandPrompt:V(x.showSecurity),order:80,persistence:"closeable",loadView:async()=>(await async function(){return O||(O=await import("../../panels/security/security.js")),O}()).SecurityPanel.SecurityPanel.instance()});const B={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"},_=e.i18n.registerUIStrings("panels/emulation/emulation-meta.ts",B),U=e.i18n.getLazilyComputedLocalizedString.bind(void 0,_);let z;async function W(){return z||(z=await import("../../panels/emulation/emulation.js")),z}t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.MOBILE,actionId:"emulation.toggle-device-mode",toggleable:!0,loadActionDelegate:async()=>(await W()).DeviceModeWrapper.ActionDelegate.instance(),condition:o.Runtime.ConditionName.CAN_DOCK,title:U(B.toggleDeviceToolbar),iconClass:"devices",bindings:[{platform:"windows,linux",shortcut:"Shift+Ctrl+M"},{platform:"mac",shortcut:"Shift+Meta+M"}]}),t.ActionRegistration.registerActionExtension({actionId:"emulation.capture-screenshot",category:t.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await W()).DeviceModeWrapper.ActionDelegate.instance(),condition:o.Runtime.ConditionName.CAN_DOCK,title:U(B.captureScreenshot)}),t.ActionRegistration.registerActionExtension({actionId:"emulation.capture-full-height-screenshot",category:t.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await W()).DeviceModeWrapper.ActionDelegate.instance(),condition:o.Runtime.ConditionName.CAN_DOCK,title:U(B.captureFullSizeScreenshot)}),t.ActionRegistration.registerActionExtension({actionId:"emulation.capture-node-screenshot",category:t.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await W()).DeviceModeWrapper.ActionDelegate.instance(),condition:o.Runtime.ConditionName.CAN_DOCK,title:U(B.captureNodeScreenshot)}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.MOBILE,settingName:"showMediaQueryInspector",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:U(B.showMediaQueries)},{value:!1,title:U(B.hideMediaQueries)}],tags:[U(B.device)]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.MOBILE,settingName:"emulation.showRulers",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:U(B.showRulers)},{value:!1,title:U(B.hideRulers)}],tags:[U(B.device)]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.MOBILE,settingName:"emulation.showDeviceOutline",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:U(B.showDeviceFrame)},{value:!1,title:U(B.hideDeviceFrame)}],tags:[U(B.device)]}),t.Toolbar.registerToolbarItem({actionId:"emulation.toggle-device-mode",condition:o.Runtime.ConditionName.CAN_DOCK,location:t.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_LEFT,order:1,showLabel:void 0,loadItem:void 0,separator:void 0}),i.AppProvider.registerAppProvider({loadAppProvider:async()=>(await W()).AdvancedApp.AdvancedAppProvider.instance(),condition:o.Runtime.ConditionName.CAN_DOCK,order:0}),t.ContextMenu.registerItem({location:t.ContextMenu.ItemLocation.DEVICE_MODE_MENU_SAVE,order:12,actionId:"emulation.capture-screenshot"}),t.ContextMenu.registerItem({location:t.ContextMenu.ItemLocation.DEVICE_MODE_MENU_SAVE,order:13,actionId:"emulation.capture-full-height-screenshot"});const F={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"},j=e.i18n.registerUIStrings("panels/sensors/sensors-meta.ts",F),H=e.i18n.getLazilyComputedLocalizedString.bind(void 0,j);let K,q;async function G(){return K||(K=await import("../../panels/sensors/sensors.js")),K}t.ViewManager.registerViewExtension({location:"drawer-view",commandPrompt:H(F.showSensors),title:H(F.sensors),id:"sensors",persistence:"closeable",order:100,loadView:async()=>(await G()).SensorsView.SensorsView.instance(),tags:[H(F.geolocation),H(F.timezones),H(F.locale),H(F.locales),H(F.accelerometer),H(F.deviceOrientation)]}),t.ViewManager.registerViewExtension({location:"settings-view",id:"emulation-locations",commandPrompt:H(F.showLocations),title:H(F.locations),order:40,loadView:async()=>(await G()).LocationsSettingsTab.LocationsSettingsTab.instance(),settings:["emulation.locations"]}),i.Settings.registerSettingExtension({storageType:i.Settings.SettingStorageType.Synced,settingName:"emulation.locations",settingType:i.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"}]}),i.Settings.registerSettingExtension({title:H(F.touch),reloadRequired:!0,settingName:"emulation.touch",settingType:i.Settings.SettingType.ENUM,defaultValue:"none",options:[{value:"none",title:H(F.devicebased),text:H(F.devicebased)},{value:"force",title:H(F.forceEnabled),text:H(F.forceEnabled)}]}),i.Settings.registerSettingExtension({title:H(F.emulateIdleDetectorState),settingName:"emulation.idleDetection",settingType:i.Settings.SettingType.ENUM,defaultValue:"none",options:[{value:"none",title:H(F.noIdleEmulation),text:H(F.noIdleEmulation)},{value:'{"isUserActive":true,"isScreenUnlocked":true}',title:H(F.userActiveScreenUnlocked),text:H(F.userActiveScreenUnlocked)},{value:'{"isUserActive":true,"isScreenUnlocked":false}',title:H(F.userActiveScreenLocked),text:H(F.userActiveScreenLocked)},{value:'{"isUserActive":false,"isScreenUnlocked":true}',title:H(F.userIdleScreenUnlocked),text:H(F.userIdleScreenUnlocked)},{value:'{"isUserActive":false,"isScreenUnlocked":false}',title:H(F.userIdleScreenLocked),text:H(F.userIdleScreenLocked)}]});const Y={accessibility:"Accessibility",shoAccessibility:"Show Accessibility"},J=e.i18n.registerUIStrings("panels/accessibility/accessibility-meta.ts",Y),X=e.i18n.getLazilyComputedLocalizedString.bind(void 0,J);let Q;t.ViewManager.registerViewExtension({location:"elements-sidebar",id:"accessibility.view",title:X(Y.accessibility),commandPrompt:X(Y.shoAccessibility),order:10,persistence:"permanent",loadView:async()=>(await async function(){return q||(q=await import("../../panels/accessibility/accessibility.js")),q}()).AccessibilitySidebarView.AccessibilitySidebarView.instance()});const Z={animations:"Animations",showAnimations:"Show Animations"},$=e.i18n.registerUIStrings("panels/animation/animation-meta.ts",Z),ee=e.i18n.getLazilyComputedLocalizedString.bind(void 0,$);t.ViewManager.registerViewExtension({location:"drawer-view",id:"animations",title:ee(Z.animations),commandPrompt:ee(Z.showAnimations),persistence:"closeable",order:0,loadView:async()=>(await async function(){return Q||(Q=await import("../../panels/animation/animation.js")),Q}()).AnimationTimeline.AnimationTimeline.instance()});const te={developerResources:"Developer Resources",showDeveloperResources:"Show Developer Resources"},ie=e.i18n.registerUIStrings("panels/developer_resources/developer_resources-meta.ts",te),oe=e.i18n.getLazilyComputedLocalizedString.bind(void 0,ie);let ne;t.ViewManager.registerViewExtension({location:"drawer-view",id:"resource-loading-pane",title:oe(te.developerResources),commandPrompt:oe(te.showDeveloperResources),order:100,persistence:"closeable",experiment:o.Runtime.ExperimentName.DEVELOPER_RESOURCES_VIEW,loadView:async()=>new((await async function(){return ne||(ne=await import("../../panels/developer_resources/developer_resources.js")),ne}()).DeveloperResourcesView.DeveloperResourcesView)});const ae={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"},re=e.i18n.registerUIStrings("entrypoints/inspector_main/inspector_main-meta.ts",ae),se=e.i18n.getLazilyComputedLocalizedString.bind(void 0,re);let ce;async function le(){return ce||(ce=await import("../inspector_main/inspector_main.js")),ce}t.ViewManager.registerViewExtension({location:"drawer-view",id:"rendering",title:se(ae.rendering),commandPrompt:se(ae.showRendering),persistence:"closeable",order:50,loadView:async()=>(await le()).RenderingOptions.RenderingOptionsView.instance(),tags:[se(ae.paint),se(ae.layout),se(ae.fps),se(ae.cssMediaType),se(ae.cssMediaFeature),se(ae.visionDeficiency),se(ae.colorVisionDeficiency)]}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.NAVIGATION,actionId:"inspector_main.reload",loadActionDelegate:async()=>(await le()).InspectorMain.ReloadActionDelegate.instance(),iconClass:"refresh",title:se(ae.reloadPage),bindings:[{platform:"windows,linux",shortcut:"Ctrl+R"},{platform:"windows,linux",shortcut:"F5"},{platform:"mac",shortcut:"Meta+R"}]}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.NAVIGATION,actionId:"inspector_main.hard-reload",loadActionDelegate:async()=>(await le()).InspectorMain.ReloadActionDelegate.instance(),title:se(ae.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"}]}),t.ActionRegistration.registerActionExtension({actionId:"rendering.toggle-prefers-color-scheme",category:t.ActionRegistration.ActionCategory.RENDERING,title:se(ae.toggleCssPrefersColorSchemeMedia),loadActionDelegate:async()=>(await le()).RenderingOptions.ReloadActionDelegate.instance()}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.NETWORK,title:se(ae.forceAdBlocking),settingName:"network.adBlockingEnabled",settingType:i.Settings.SettingType.BOOLEAN,storageType:i.Settings.SettingStorageType.Session,defaultValue:!1,options:[{value:!0,title:se(ae.blockAds)},{value:!1,title:se(ae.showAds)}]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.GLOBAL,storageType:i.Settings.SettingStorageType.Synced,title:se(ae.autoOpenDevTools),settingName:"autoAttachToCreatedPages",settingType:i.Settings.SettingType.BOOLEAN,order:2,defaultValue:!1,options:[{value:!0,title:se(ae.autoOpenDevTools)},{value:!1,title:se(ae.doNotAutoOpen)}]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.APPEARANCE,storageType:i.Settings.SettingStorageType.Synced,title:se(ae.disablePaused),settingName:"disablePausedStateOverlay",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!1}),t.Toolbar.registerToolbarItem({loadItem:async()=>(await le()).InspectorMain.NodeIndicator.instance(),order:2,location:t.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_LEFT,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),t.Toolbar.registerToolbarItem({loadItem:async()=>(await le()).OutermostTargetSelector.OutermostTargetSelector.instance(),order:98,location:t.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_RIGHT,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0,experiment:o.Runtime.ExperimentName.OUTERMOST_TARGET_SELECTOR});const ge={application:"Application",showApplication:"Show Application",pwa:"pwa",clearSiteData:"Clear site data",clearSiteDataIncludingThirdparty:"Clear site data (including third-party cookies)",startRecordingEvents:"Start recording events",stopRecordingEvents:"Stop recording events"},de=e.i18n.registerUIStrings("panels/application/application-meta.ts",ge),me=e.i18n.getLazilyComputedLocalizedString.bind(void 0,de);let pe;async function we(){return pe||(pe=await import("../../panels/application/application.js")),pe}t.ViewManager.registerViewExtension({location:"panel",id:"resources",title:me(ge.application),commandPrompt:me(ge.showApplication),order:70,loadView:async()=>(await we()).ResourcesPanel.ResourcesPanel.instance(),tags:[me(ge.pwa)]}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.RESOURCES,actionId:"resources.clear",title:me(ge.clearSiteData),loadActionDelegate:async()=>(await we()).StorageView.ActionDelegate.instance()}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.RESOURCES,actionId:"resources.clear-incl-third-party-cookies",title:me(ge.clearSiteDataIncludingThirdparty),loadActionDelegate:async()=>(await we()).StorageView.ActionDelegate.instance()}),t.ActionRegistration.registerActionExtension({actionId:"background-service.toggle-recording",iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>void 0===pe?[]:(e=>[e.BackgroundServiceView.BackgroundServiceView])(pe),loadActionDelegate:async()=>(await we()).BackgroundServiceView.ActionDelegate.instance(),category:t.ActionRegistration.ActionCategory.BACKGROUND_SERVICES,options:[{value:!0,title:me(ge.startRecordingEvents)},{value:!1,title:me(ge.stopRecordingEvents)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.Revealer.registerRevealer({contextTypes:()=>[n.Resource.Resource],destination:i.Revealer.RevealerDestination.APPLICATION_PANEL,loadRevealer:async()=>(await we()).ResourcesPanel.ResourceRevealer.instance()}),i.Revealer.registerRevealer({contextTypes:()=>[n.ResourceTreeModel.ResourceTreeFrame],destination:i.Revealer.RevealerDestination.APPLICATION_PANEL,loadRevealer:async()=>(await we()).ResourcesPanel.FrameDetailsRevealer.instance()});const ue={issues:"Issues",showIssues:"Show Issues",cspViolations:"CSP Violations",showCspViolations:"Show CSP Violations"},ye=e.i18n.registerUIStrings("panels/issues/issues-meta.ts",ue),Se=e.i18n.getLazilyComputedLocalizedString.bind(void 0,ye);let he;async function Ae(){return he||(he=await import("../../panels/issues/issues.js")),he}t.ViewManager.registerViewExtension({location:"drawer-view",id:"issues-pane",title:Se(ue.issues),commandPrompt:Se(ue.showIssues),order:100,persistence:"closeable",loadView:async()=>(await Ae()).IssuesPane.IssuesPane.instance()}),t.ViewManager.registerViewExtension({location:"drawer-view",id:"csp-violations-pane",title:Se(ue.cspViolations),commandPrompt:Se(ue.showCspViolations),order:100,persistence:"closeable",loadView:async()=>(await Ae()).CSPViolationsView.CSPViolationsView.instance(),experiment:o.Runtime.ExperimentName.CSP_VIOLATIONS_VIEW}),i.Revealer.registerRevealer({contextTypes:()=>[s.Issue.Issue],destination:i.Revealer.RevealerDestination.ISSUES_VIEW,loadRevealer:async()=>(await Ae()).IssueRevealer.IssueRevealer.instance()});const Ee={layers:"Layers",showLayers:"Show Layers"},Re=e.i18n.registerUIStrings("panels/layers/layers-meta.ts",Ee),ve=e.i18n.getLazilyComputedLocalizedString.bind(void 0,Re);let Te;t.ViewManager.registerViewExtension({location:"panel",id:"layers",title:ve(Ee.layers),commandPrompt:ve(Ee.showLayers),order:100,persistence:"closeable",loadView:async()=>(await async function(){return Te||(Te=await import("../../panels/layers/layers.js")),Te}()).LayersPanel.LayersPanel.instance()});const Pe={showLighthouse:"Show `Lighthouse`"},Ce=e.i18n.registerUIStrings("panels/lighthouse/lighthouse-meta.ts",Pe),be=e.i18n.getLazilyComputedLocalizedString.bind(void 0,Ce);let fe;t.ViewManager.registerViewExtension({location:"panel",id:"lighthouse",title:e.i18n.lockedLazyString("Lighthouse"),commandPrompt:be(Pe.showLighthouse),order:90,loadView:async()=>(await async function(){return fe||(fe=await import("../../panels/lighthouse/lighthouse.js")),fe}()).LighthousePanel.LighthousePanel.instance(),tags:[e.i18n.lockedLazyString("lighthouse"),e.i18n.lockedLazyString("pwa")]});const Le={media:"Media",video:"video",showMedia:"Show Media"},Ne=e.i18n.registerUIStrings("panels/media/media-meta.ts",Le),Ie=e.i18n.getLazilyComputedLocalizedString.bind(void 0,Ne);let Me;t.ViewManager.registerViewExtension({location:"panel",id:"medias",title:Ie(Le.media),commandPrompt:Ie(Le.showMedia),persistence:"closeable",order:100,loadView:async()=>(await async function(){return Me||(Me=await import("../../panels/media/media.js")),Me}()).MainView.MainView.instance(),tags:[Ie(Le.media),Ie(Le.video)]});const De={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"},xe=e.i18n.registerUIStrings("panels/mobile_throttling/mobile_throttling-meta.ts",De),ke=e.i18n.getLazilyComputedLocalizedString.bind(void 0,xe);let Ve;async function Oe(){return Ve||(Ve=await import("../../panels/mobile_throttling/mobile_throttling.js")),Ve}t.ViewManager.registerViewExtension({location:"settings-view",id:"throttling-conditions",title:ke(De.throttling),commandPrompt:ke(De.showThrottling),order:35,loadView:async()=>(await Oe()).ThrottlingSettingsTab.ThrottlingSettingsTab.instance(),settings:["customNetworkConditions"]}),t.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-offline",category:t.ActionRegistration.ActionCategory.NETWORK,title:ke(De.goOffline),loadActionDelegate:async()=>(await Oe()).ThrottlingManager.ActionDelegate.instance(),tags:[ke(De.device),ke(De.throttlingTag)]}),t.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-low-end-mobile",category:t.ActionRegistration.ActionCategory.NETWORK,title:ke(De.enableSlowGThrottling),loadActionDelegate:async()=>(await Oe()).ThrottlingManager.ActionDelegate.instance(),tags:[ke(De.device),ke(De.throttlingTag)]}),t.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-mid-tier-mobile",category:t.ActionRegistration.ActionCategory.NETWORK,title:ke(De.enableFastGThrottling),loadActionDelegate:async()=>(await Oe()).ThrottlingManager.ActionDelegate.instance(),tags:[ke(De.device),ke(De.throttlingTag)]}),t.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-online",category:t.ActionRegistration.ActionCategory.NETWORK,title:ke(De.goOnline),loadActionDelegate:async()=>(await Oe()).ThrottlingManager.ActionDelegate.instance(),tags:[ke(De.device),ke(De.throttlingTag)]}),i.Settings.registerSettingExtension({storageType:i.Settings.SettingStorageType.Synced,settingName:"customNetworkConditions",settingType:i.Settings.SettingType.ARRAY,defaultValue:[]});const Be={performanceMonitor:"Performance monitor",performance:"performance",systemMonitor:"system monitor",monitor:"monitor",activity:"activity",metrics:"metrics",showPerformanceMonitor:"Show Performance monitor"},_e=e.i18n.registerUIStrings("panels/performance_monitor/performance_monitor-meta.ts",Be),Ue=e.i18n.getLazilyComputedLocalizedString.bind(void 0,_e);let ze;t.ViewManager.registerViewExtension({location:"drawer-view",id:"performance.monitor",title:Ue(Be.performanceMonitor),commandPrompt:Ue(Be.showPerformanceMonitor),persistence:"closeable",order:100,loadView:async()=>(await async function(){return ze||(ze=await import("../../panels/performance_monitor/performance_monitor.js")),ze}()).PerformanceMonitor.PerformanceMonitorImpl.instance(),tags:[Ue(Be.performance),Ue(Be.systemMonitor),Ue(Be.monitor),Ue(Be.activity),Ue(Be.metrics)]});const We={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"},Fe=e.i18n.registerUIStrings("panels/timeline/timeline-meta.ts",We),je=e.i18n.getLazilyComputedLocalizedString.bind(void 0,Fe);let He,Ke;async function qe(){return He||(He=await import("../../panels/timeline/timeline.js")),He}async function Ge(){return Ke||(Ke=await import("../../panels/profiler/profiler.js")),Ke}function Ye(e){return void 0===He?[]:e(He)}t.ViewManager.registerViewExtension({location:"panel",id:"timeline",title:je(We.performance),commandPrompt:je(We.showPerformance),order:50,loadView:async()=>(await qe()).TimelinePanel.TimelinePanel.instance()}),t.ViewManager.registerViewExtension({location:"panel",id:"js_profiler",title:je(We.javascriptProfiler),commandPrompt:je(We.showJavascriptProfiler),persistence:"closeable",order:65,experiment:o.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,loadView:async()=>(await Ge()).ProfilesPanel.JSProfilerPanel.instance()}),t.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:t.ActionRegistration.ActionCategory.PERFORMANCE,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>Ye((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await qe()).TimelinePanel.ActionDelegate.instance(),options:[{value:!0,title:je(We.record)},{value:!1,title:je(We.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>Ye((e=>[e.TimelinePanel.TimelinePanel])),category:t.ActionRegistration.ActionCategory.PERFORMANCE,title:je(We.startProfilingAndReloadPage),loadActionDelegate:async()=>(await qe()).TimelinePanel.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.PERFORMANCE,actionId:"timeline.save-to-file",contextTypes:()=>Ye((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await qe()).TimelinePanel.ActionDelegate.instance(),title:je(We.saveProfile),bindings:[{platform:"windows,linux",shortcut:"Ctrl+S"},{platform:"mac",shortcut:"Meta+S"}]}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.PERFORMANCE,actionId:"timeline.load-from-file",contextTypes:()=>Ye((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await qe()).TimelinePanel.ActionDelegate.instance(),title:je(We.loadProfile),bindings:[{platform:"windows,linux",shortcut:"Ctrl+O"},{platform:"mac",shortcut:"Meta+O"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.jump-to-previous-frame",category:t.ActionRegistration.ActionCategory.PERFORMANCE,title:je(We.previousFrame),contextTypes:()=>Ye((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await qe()).TimelinePanel.ActionDelegate.instance(),bindings:[{shortcut:"["}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.jump-to-next-frame",category:t.ActionRegistration.ActionCategory.PERFORMANCE,title:je(We.nextFrame),contextTypes:()=>Ye((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await qe()).TimelinePanel.ActionDelegate.instance(),bindings:[{shortcut:"]"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>(await qe()).TimelinePanel.ActionDelegate.instance(),category:t.ActionRegistration.ActionCategory.PERFORMANCE,title:je(We.showRecentTimelineSessions),contextTypes:()=>Ye((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.previous-recording",category:t.ActionRegistration.ActionCategory.PERFORMANCE,loadActionDelegate:async()=>(await qe()).TimelinePanel.ActionDelegate.instance(),title:je(We.previousRecording),contextTypes:()=>Ye((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Alt+Left"},{platform:"mac",shortcut:"Meta+Left"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.next-recording",category:t.ActionRegistration.ActionCategory.PERFORMANCE,loadActionDelegate:async()=>(await qe()).TimelinePanel.ActionDelegate.instance(),title:je(We.nextRecording),contextTypes:()=>Ye((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Alt+Right"},{platform:"mac",shortcut:"Meta+Right"}]}),t.ActionRegistration.registerActionExtension({actionId:"profiler.js-toggle-recording",category:t.ActionRegistration.ActionCategory.JAVASCRIPT_PROFILER,title:je(We.startStopRecording),iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>void 0===Ke?[]:(e=>[e.ProfilesPanel.JSProfilerPanel])(Ke),loadActionDelegate:async()=>(await Ge()).ProfilesPanel.JSProfilerPanel.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.Settings.registerSettingExtension({category:i.Settings.SettingCategory.PERFORMANCE,storageType:i.Settings.SettingStorageType.Synced,title:je(We.hideChromeFrameInLayersView),settingName:"frameViewerHideChromeWindow",settingType:i.Settings.SettingType.BOOLEAN,defaultValue:!1}),i.Linkifier.registerLinkifier({contextTypes:()=>Ye((e=>[e.CLSLinkifier.CLSRect])),loadLinkifier:async()=>(await qe()).CLSLinkifier.Linkifier.instance()}),t.ContextMenu.registerItem({location:t.ContextMenu.ItemLocation.TIMELINE_MENU_OPEN,actionId:"timeline.load-from-file",order:10}),t.ContextMenu.registerItem({location:t.ContextMenu.ItemLocation.TIMELINE_MENU_OPEN,actionId:"timeline.save-to-file",order:15});const Je={webaudio:"WebAudio",audio:"audio",showWebaudio:"Show WebAudio"},Xe=e.i18n.registerUIStrings("panels/web_audio/web_audio-meta.ts",Je),Qe=e.i18n.getLazilyComputedLocalizedString.bind(void 0,Xe);let Ze;t.ViewManager.registerViewExtension({location:"drawer-view",id:"web-audio",title:Qe(Je.webaudio),commandPrompt:Qe(Je.showWebaudio),persistence:"closeable",order:100,loadView:async()=>(await async function(){return Ze||(Ze=await import("../../panels/web_audio/web_audio.js")),Ze}()).WebAudioView.WebAudioView.instance(),tags:[Qe(Je.audio)]});const $e={webauthn:"WebAuthn",showWebauthn:"Show WebAuthn"},et=e.i18n.registerUIStrings("panels/webauthn/webauthn-meta.ts",$e),tt=e.i18n.getLazilyComputedLocalizedString.bind(void 0,et);let it;t.ViewManager.registerViewExtension({location:"drawer-view",id:"webauthn-pane",title:tt($e.webauthn),commandPrompt:tt($e.showWebauthn),order:100,persistence:"closeable",loadView:async()=>(await async function(){return it||(it=await import("../../panels/webauthn/webauthn.js")),it}()).WebauthnPane.WebauthnPaneImpl.instance(),experiment:o.Runtime.ExperimentName.WEBAUTHN_PANE});const ot={resetView:"Reset view",switchToPanMode:"Switch to pan mode",switchToRotateMode:"Switch to rotate mode",zoomIn:"Zoom in",zoomOut:"Zoom out",panOrRotateUp:"Pan or rotate up",panOrRotateDown:"Pan or rotate down",panOrRotateLeft:"Pan or rotate left",panOrRotateRight:"Pan or rotate right"},nt=e.i18n.registerUIStrings("panels/layer_viewer/layer_viewer-meta.ts",ot),at=e.i18n.getLazilyComputedLocalizedString.bind(void 0,nt);t.ActionRegistration.registerActionExtension({actionId:"layers.reset-view",category:t.ActionRegistration.ActionCategory.LAYERS,title:at(ot.resetView),bindings:[{shortcut:"0"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.pan-mode",category:t.ActionRegistration.ActionCategory.LAYERS,title:at(ot.switchToPanMode),bindings:[{shortcut:"x"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.rotate-mode",category:t.ActionRegistration.ActionCategory.LAYERS,title:at(ot.switchToRotateMode),bindings:[{shortcut:"v"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.zoom-in",category:t.ActionRegistration.ActionCategory.LAYERS,title:at(ot.zoomIn),bindings:[{shortcut:"Shift+Plus"},{shortcut:"NumpadPlus"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.zoom-out",category:t.ActionRegistration.ActionCategory.LAYERS,title:at(ot.zoomOut),bindings:[{shortcut:"Shift+Minus"},{shortcut:"NumpadMinus"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.up",category:t.ActionRegistration.ActionCategory.LAYERS,title:at(ot.panOrRotateUp),bindings:[{shortcut:"Up"},{shortcut:"w"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.down",category:t.ActionRegistration.ActionCategory.LAYERS,title:at(ot.panOrRotateDown),bindings:[{shortcut:"Down"},{shortcut:"s"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.left",category:t.ActionRegistration.ActionCategory.LAYERS,title:at(ot.panOrRotateLeft),bindings:[{shortcut:"Left"},{shortcut:"a"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.right",category:t.ActionRegistration.ActionCategory.LAYERS,title:at(ot.panOrRotateRight),bindings:[{shortcut:"Right"},{shortcut:"d"}]});const rt={recorder:"Recorder",showRecorder:"Show Recorder",startStopRecording:"Start/Stop recording",createRecording:"Create a new recording",replayRecording:"Replay recording",toggleCode:"Toggle code view"},st=e.i18n.registerUIStrings("panels/recorder/recorder-meta.ts",rt),ct=e.i18n.getLazilyComputedLocalizedString.bind(void 0,st);let lt;async function gt(){return lt||(lt=await import("../../panels/recorder/recorder.js")),lt}function dt(e,t){return void 0===lt?[]:t&<.RecorderPanel.RecorderPanel.instance().isActionPossible(t)?e(lt):[]}t.ViewManager.defaultOptionsForTabs.chrome_recorder=!0,t.ViewManager.registerViewExtension({location:"panel",id:"chrome_recorder",commandPrompt:ct(rt.showRecorder),title:ct(rt.recorder),order:90,persistence:"closeable",isPreviewFeature:!0,loadView:async()=>(await gt()).RecorderPanel.RecorderPanel.instance()}),t.ActionRegistration.registerActionExtension({category:"Recorder",actionId:"chrome_recorder.create-recording",title:ct(rt.createRecording),loadActionDelegate:async()=>(await gt()).RecorderPanel.ActionDelegate.instance()}),t.ActionRegistration.registerActionExtension({category:"Recorder",actionId:"chrome_recorder.start-recording",title:ct(rt.startStopRecording),contextTypes:()=>dt((e=>[e.RecorderPanel.RecorderPanel]),"chrome_recorder.start-recording"),loadActionDelegate:async()=>(await gt()).RecorderPanel.ActionDelegate.instance(),bindings:[{shortcut:"Ctrl+E",platform:"windows,linux"},{shortcut:"Meta+E",platform:"mac"}]}),t.ActionRegistration.registerActionExtension({category:"Recorder",actionId:"chrome_recorder.replay-recording",title:ct(rt.replayRecording),contextTypes:()=>dt((e=>[e.RecorderPanel.RecorderPanel]),"chrome_recorder.replay-recording"),loadActionDelegate:async()=>(await gt()).RecorderPanel.ActionDelegate.instance(),bindings:[{shortcut:"Ctrl+Enter",platform:"windows,linux"},{shortcut:"Meta+Enter",platform:"mac"}]}),t.ActionRegistration.registerActionExtension({category:"Recorder",actionId:"chrome_recorder.toggle-code-view",title:ct(rt.toggleCode),contextTypes:()=>dt((e=>[e.RecorderPanel.RecorderPanel]),"chrome_recorder.toggle-code-view"),loadActionDelegate:async()=>(await gt()).RecorderPanel.ActionDelegate.instance(),bindings:[{shortcut:"Ctrl+B",platform:"windows,linux"},{shortcut:"Meta+B",platform:"mac"}]}),self.runtime=o.Runtime.Runtime.instance({forceNew:!0}),new c.MainImpl.MainImpl; diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/formatter_worker/FormatterActions.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/formatter_worker/FormatterActions.js deleted file mode 100644 index b133932ce..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/formatter_worker/FormatterActions.js +++ /dev/null @@ -1 +0,0 @@ -const t=["application/javascript","application/json","application/manifest+json","text/css","text/html","text/javascript","text/x-scss"];export{t as FORMATTABLE_MEDIA_TYPES}; diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.js deleted file mode 100644 index be212aed7..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.js +++ /dev/null @@ -1 +0,0 @@ -import*as e from"../../core/platform/platform.js";import*as t from"./formatter_worker.js";self.onmessage=function(a){const s=a.data.method,r=a.data.params;if(s)switch(s){case"format":self.postMessage(t.FormatterWorker.format(r.mimeType,r.content,r.indentString));break;case"parseCSS":t.CSSRuleParser.parseCSS(r.content,self.postMessage);break;case"javaScriptSubstitute":{const e=new Map(r.mapping);self.postMessage(t.Substitute.substituteExpression(r.content,e));break}case"javaScriptScopeTree":self.postMessage(t.ScopeParser.parseScopes(r.content)?.export());break;case"evaluatableJavaScriptSubstring":self.postMessage(t.FormatterWorker.evaluatableJavaScriptSubstring(r.content));break;default:e.assertNever(s,`Unsupport method name: ${s}`)}},self.postMessage("workerReady"); diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/formatter_worker/formatter_worker.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/formatter_worker/formatter_worker.js deleted file mode 100644 index c56117741..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/formatter_worker/formatter_worker.js +++ /dev/null @@ -1 +0,0 @@ -import*as e from"../../core/platform/platform.js";import*as t from"../../core/root/root.js";import*as r from"../../third_party/acorn/acorn.js";import*as n from"../../models/text_utils/text_utils.js";var i;!function(){function e(e,t,r){for(var n in t||(t={}),e)!e.hasOwnProperty(n)||!1===r&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function t(e,t,r,n,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=n||0,a=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return a+(t-o);a+=s-o,a+=r-a%r,o=s+1}}function r(){}var n=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};n.prototype.eol=function(){return this.pos>=this.string.length},n.prototype.sol=function(){return this.pos==this.lineStart},n.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},n.prototype.next=function(){if(this.post},n.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},n.prototype.skipToEnd=function(){this.pos=this.string.length},n.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},n.prototype.backUp=function(e){this.pos-=e},n.prototype.column=function(){return this.lastColumnPos0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},n.prototype.current=function(){return this.string.slice(this.start,this.pos)},n.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},n.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},n.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var i={},o={};function a(t){if("string"==typeof t&&o.hasOwnProperty(t))t=o[t];else if(t&&"string"==typeof t.name&&o.hasOwnProperty(t.name)){var n=o[t.name];"string"==typeof n&&(n={name:n}),i=n,s=t,Object.create?l=Object.create(i):(r.prototype=i,l=new r),s&&e(s,l),(t=l).name=n.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return a("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return a("application/json")}var i,s,l;return"string"==typeof t?{name:t}:t||{name:"null"}}var s={};var l,c={__proto__:null,modes:i,mimeModes:o,defineMode:function(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),i[e]=t},defineMIME:function(e,t){o[e]=t},resolveMode:a,getMode:function e(t,r){r=a(r);var n=i[r.name];if(!n)return e(t,"text/plain");var o=n(t,r);if(s.hasOwnProperty(r.name)){var l=s[r.name];for(var c in l)l.hasOwnProperty(c)&&(o.hasOwnProperty(c)&&(o["_"+c]=o[c]),o[c]=l[c])}if(o.name=r.name,r.helperType&&(o.helperType=r.helperType),r.modeProps)for(var d in r.modeProps)o[d]=r.modeProps[d];return o},modeExtensions:s,extendMode:function(t,r){e(r,s.hasOwnProperty(t)?s[t]:s[t]={})},copyState:function(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r},innerMode:function(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}},startState:function(e,t,r){return!e.startState||e.startState(t,r)}},d="undefined"!=typeof globalThis?globalThis:window;for(var u in d.CodeMirror={},CodeMirror.StringStream=n,c)CodeMirror[u]=c[u];CodeMirror.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),CodeMirror.defineMIME("text/plain","null"),CodeMirror.registerHelper=CodeMirror.registerGlobalHelper=Math.min,CodeMirror.splitLines=function(e){return e.split(/\r?\n|\r/)},CodeMirror.countColumn=t,CodeMirror.defaults={indentUnit:2},l=function(e){e.runMode=function(t,r,n,i){var o=e.getMode(e.defaults,r),a=i&&i.tabSize||e.defaults.tabSize;if(n.appendChild){var s=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<9),l=n,c=0;l.innerHTML="",n=function(e,t){if("\n"==e)return l.appendChild(document.createTextNode(s?"\r":e)),void(c=0);for(var r="",n=0;;){var i=e.indexOf("\t",n);if(-1==i){r+=e.slice(n),c+=e.length-n;break}c+=i-n,r+=e.slice(n,i);var o=a-c%a;c+=o;for(var d=0;d*\/]/.test(r)?x(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?x("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?x(null,r):e.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(t.tokenize=N),x("variable callee","variable")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),x("property","word")):x(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),x("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?x("variable-2","variable-definition"):x("variable-2","variable")):e.match(/^\w+-/)?x("meta","meta"):void 0}function T(e){return function(t,r){for(var n,i=!1;null!=(n=t.next());){if(n==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==n}return(n==e||!i&&")"!=e)&&(r.tokenize=null),x("string","string")}}function N(e,t){return e.next(),e.match(/^\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=T(")"),x(null,"(")}function C(e,t,r){this.type=e,this.indent=t,this.prev=r}function E(e,t,r,n){return e.context=new C(r,t.indentation()+(!1===n?0:a),e.context),r}function O(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function z(e,t,r){return P[r.context.type](e,t,r)}function L(e,t,r,n){for(var i=n||1;i>0;i--)r.context=r.context.prev;return z(e,t,r)}function I(e){var t=e.current().toLowerCase();o=g.hasOwnProperty(t)?"atom":b.hasOwnProperty(t)?"keyword":"variable"}var P={top:function(e,t,r){if("{"==e)return E(r,t,"block");if("}"==e&&r.context.prev)return O(r);if(w&&/@component/i.test(e))return E(r,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return E(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return E(r,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return E(r,t,"at");if("hash"==e)o="builtin";else if("word"==e)o="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return E(r,t,"interpolation");if(":"==e)return"pseudo";if(y&&"("==e)return E(r,t,"parens")}return r.context.type},block:function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return p.hasOwnProperty(n)?(o="property","maybeprop"):f.hasOwnProperty(n)?(o=v?"string-2":"property","maybeprop"):y?(o=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(o+=" error","maybeprop")}return"meta"==e?"block":y||"hash"!=e&&"qualifier"!=e?P.top(e,t,r):(o="error","block")},maybeprop:function(e,t,r){return":"==e?E(r,t,"prop"):z(e,t,r)},prop:function(e,t,r){if(";"==e)return O(r);if("{"==e&&y)return E(r,t,"propBlock");if("}"==e||"{"==e)return L(e,t,r);if("("==e)return E(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)I(t);else if("interpolation"==e)return E(r,t,"interpolation")}else o+=" error";return"prop"},propBlock:function(e,t,r){return"}"==e?O(r):"word"==e?(o="property","maybeprop"):r.context.type},parens:function(e,t,r){return"{"==e||"}"==e?L(e,t,r):")"==e?O(r):"("==e?E(r,t,"parens"):"interpolation"==e?E(r,t,"interpolation"):("word"==e&&I(t),"parens")},pseudo:function(e,t,r){return"meta"==e?"pseudo":"word"==e?(o="variable-3",r.context.type):z(e,t,r)},documentTypes:function(e,t,r){return"word"==e&&l.hasOwnProperty(t.current())?(o="tag",r.context.type):P.atBlock(e,t,r)},atBlock:function(e,t,r){if("("==e)return E(r,t,"atBlock_parens");if("}"==e||";"==e)return L(e,t,r);if("{"==e)return O(r)&&E(r,t,y?"block":"top");if("interpolation"==e)return E(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();o="only"==n||"not"==n||"and"==n||"or"==n?"keyword":c.hasOwnProperty(n)?"attribute":d.hasOwnProperty(n)?"property":u.hasOwnProperty(n)?"keyword":p.hasOwnProperty(n)?"property":f.hasOwnProperty(n)?v?"string-2":"property":g.hasOwnProperty(n)?"atom":b.hasOwnProperty(n)?"keyword":"error"}return r.context.type},atComponentBlock:function(e,t,r){return"}"==e?L(e,t,r):"{"==e?O(r)&&E(r,t,y?"block":"top",!1):("word"==e&&(o="error"),r.context.type)},atBlock_parens:function(e,t,r){return")"==e?O(r):"{"==e||"}"==e?L(e,t,r,2):P.atBlock(e,t,r)},restricted_atBlock_before:function(e,t,r){return"{"==e?E(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(o="variable","restricted_atBlock_before"):z(e,t,r)},restricted_atBlock:function(e,t,r){return"}"==e?(r.stateArg=null,O(r)):"word"==e?(o="@font-face"==r.stateArg&&!h.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!m.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,r){return"word"==e?(o="variable","keyframes"):"{"==e?E(r,t,"top"):z(e,t,r)},at:function(e,t,r){return";"==e?O(r):"{"==e||"}"==e?L(e,t,r):("word"==e?o="tag":"hash"==e&&(o="builtin"),"at")},interpolation:function(e,t,r){return"}"==e?O(r):"{"==e||";"==e?L(e,t,r):("word"==e?o="variable":"variable"!=e&&"("!=e&&")"!=e&&(o="error"),"interpolation")}};return{startState:function(e){return{tokenize:null,state:n?"block":"top",stateArg:null,context:new C(n?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||S)(e,t);return r&&"object"==typeof r&&(i=r[1],r=r[0]),o=r,"comment"!=i&&(t.state=P[t.state](i,e,t)),o},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),i=r.indent;return"prop"!=r.type||"}"!=n&&")"!=n||(r=r.prev),r.prev&&("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=n||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"atBlock"!=r.type)||(i=Math.max(0,r.indent-a)):i=(r=r.prev).indent),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:k,fold:"brace"}}));var r=["domain","regexp","url","url-prefix"],n=t(r),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],o=t(i),a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme"],s=t(a),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light"],c=t(l),d=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],u=t(d),p=["border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],f=t(p),h=t(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),m=t(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),b=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],g=t(b),y=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],k=t(y),w=r.concat(i).concat(a).concat(l).concat(d).concat(p).concat(b).concat(y);function v(e,t){for(var r,n=!1;null!=(r=e.next());){if(n&&"/"==r){t.tokenize=null;break}n="*"==r}return["comment","comment"]}e.registerHelper("hintWords","css",w),e.defineMIME("text/css",{documentTypes:n,mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:u,nonStandardPropertyKeywords:f,fontProperties:h,counterDescriptors:m,colorKeywords:g,valueKeywords:k,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=v,v(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:u,nonStandardPropertyKeywords:f,colorKeywords:g,valueKeywords:k,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=v,v(e,t)):["operator","operator"]},":":function(e){return!!e.match(/^\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:u,nonStandardPropertyKeywords:f,colorKeywords:g,valueKeywords:k,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=v,v(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:n,mediaTypes:o,mediaFeatures:s,propertyKeywords:u,nonStandardPropertyKeywords:f,fontProperties:h,counterDescriptors:m,colorKeywords:g,valueKeywords:k,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=v,v(e,t))}},name:"css",helperType:"gss"})},"object"==typeof exports&&"object"==typeof module?i(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(n,i){var o,a,s=n.indentUnit,l={},c=i.htmlMode?t:r;for(var d in c)l[d]=c[d];for(var d in i)l[d]=i[d];function u(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();return"<"==n?e.eat("!")?e.eat("[")?e.match("CDATA[")?r(f("atom","]]>")):null:e.match("--")?r(f("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(h(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=f("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=p,"tag bracket"):"&"==n?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function p(e,t){var r,n,i=e.next();if(">"==i||"/"==i&&e.eat(">"))return t.tokenize=u,o=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return o="equals",null;if("<"==i){t.tokenize=u,t.state=y,t.tagName=t.tagStart=null;var a=t.tokenize(e,t);return a?a+" tag error":"tag error"}return/[\'\"]/.test(i)?(t.tokenize=(r=i,n=function(e,t){for(;!e.eol();)if(e.next()==r){t.tokenize=p;break}return"string"},n.isInAttribute=!0,n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=u;break}r.next()}return e}}function h(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=h(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=u;break}return r.tokenize=h(e-1),r.tokenize(t,r)}}return"meta"}}function m(e,t,r){this.prev=e.context,this.tagName=t||"",this.indent=e.indented,this.startOfLine=r,(l.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function b(e){e.context&&(e.context=e.context.prev)}function g(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!l.contextGrabbers.hasOwnProperty(r)||!l.contextGrabbers[r].hasOwnProperty(t))return;b(e)}}function y(e,t,r){return"openTag"==e?(r.tagStart=t.column(),k):"closeTag"==e?w:y}function k(e,t,r){return"word"==e?(r.tagName=t.current(),a="tag",S):l.allowMissingTagName&&"endTag"==e?(a="tag bracket",S(e,t,r)):(a="error",k)}function w(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&l.implicitlyClosed.hasOwnProperty(r.context.tagName)&&b(r),r.context&&r.context.tagName==n||!1===l.matchClosing?(a="tag",v):(a="tag error",x)}return l.allowMissingTagName&&"endTag"==e?(a="tag bracket",v(e,t,r)):(a="error",x)}function v(e,t,r){return"endTag"!=e?(a="error",v):(b(r),y)}function x(e,t,r){return a="error",v(e,0,r)}function S(e,t,r){if("word"==e)return a="attribute",T;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(n)?g(r,n):(g(r,n),r.context=new m(r,n,i==r.indented)),y}return a="error",S}function T(e,t,r){return"equals"==e?N:(l.allowMissing||(a="error"),S(e,0,r))}function N(e,t,r){return"string"==e?C:"word"==e&&l.allowUnquoted?(a="string",S):(a="error",S(e,0,r))}function C(e,t,r){return"string"==e?C:S(e,0,r)}return u.isInText=!0,{startState:function(e){var t={tokenize:u,state:y,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;o=null;var r=t.tokenize(e,t);return(r||o)&&"comment"!=r&&(a=null,t.state=t.state(o||r,e,t),a&&(r="error"==a?r+" error":a)),r},indent:function(t,r,n){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+s;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=p&&t.tokenize!=u)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==l.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(e){e.state==N&&(e.state=S)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],r=e.context;r;r=r.prev)t.push(r.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){e.defineMode("javascript",(function(t,r){var n,i,o=t.indentUnit,a=r.statementIndent,s=r.jsonld,l=r.json||s,c=!1!==r.trackScope,d=r.typescript,u=r.wordCharacters||/[\w$\xa1-\uffff]/,p=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),i=e("keyword d"),o=e("operator"),a={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:i,break:i,continue:i,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:o,typeof:o,instanceof:o,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),f=/[+\-*&%=<>!?|~^@]/,h=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function m(e,t,r){return n=e,i=r,t}function b(e,t){var r,n=e.next();if('"'==n||"'"==n)return t.tokenize=(r=n,function(e,t){var n,i=!1;if(s&&"@"==e.peek()&&e.match(h))return t.tokenize=b,m("jsonld-keyword","meta");for(;null!=(n=e.next())&&(n!=r||i);)i=!i&&"\\"==n;return i||(t.tokenize=b),m("string","string")}),t.tokenize(e,t);if("."==n&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return m("number","number");if("."==n&&e.match(".."))return m("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return m(n);if("="==n&&e.eat(">"))return m("=>","operator");if("0"==n&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return m("number","number");if(/\d/.test(n))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),m("number","number");if("/"==n)return e.eat("*")?(t.tokenize=g,g(e,t)):e.eat("/")?(e.skipToEnd(),m("comment","comment")):Ge(e,t,1)?(function(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),m("regexp","string-2")):(e.eat("="),m("operator","operator",e.current()));if("`"==n)return t.tokenize=y,y(e,t);if("#"==n&&"!"==e.peek())return e.skipToEnd(),m("meta","meta");if("#"==n&&e.eatWhile(u))return m("variable","property");if("<"==n&&e.match("!--")||"-"==n&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),m("comment","comment");if(f.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=n&&"="!=n||e.eat("="):/[<>*+\-|&?]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),"?"==n&&e.eat(".")?m("."):m("operator","operator",e.current());if(u.test(n)){e.eatWhile(u);var i=e.current();if("."!=t.lastType){if(p.propertyIsEnumerable(i)){var o=p[i];return m(o.type,o.style,i)}if("async"==i&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return m("async","keyword",i)}return m("variable","variable",i)}}function g(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=b;break}n="*"==r}return m("comment","comment")}function y(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=b;break}n=!n&&"\\"==r}return m("quasi","string-2",e.current())}function k(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(d){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var i=0,o=!1,a=r-1;a>=0;--a){var s=e.string.charAt(a),l="([{}])".indexOf(s);if(l>=0&&l<3){if(!i){++a;break}if(0==--i){"("==s&&(o=!0);break}}else if(l>=3&&l<6)++i;else if(u.test(s))o=!0;else if(/["'\/`]/.test(s))for(;;--a){if(0==a)return;if(e.string.charAt(a-1)==s&&"\\"!=e.string.charAt(a-2)){a--;break}}else if(o&&!i){++a;break}}o&&!i&&(t.fatArrowAt=a)}}var w={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function v(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.prev=i,this.info=o,null!=n&&(this.align=n)}function x(e,t){if(!c)return!1;for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}var S={state:null,column:null,marked:null,cc:null};function T(){for(var e=arguments.length-1;e>=0;e--)S.cc.push(arguments[e])}function N(){return T.apply(null,arguments),!0}function C(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function E(e){var t=S.state;if(S.marked="def",c){if(t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=O(e,t.context);if(null!=n)return void(t.context=n)}else if(!C(e,t.localVars))return void(t.localVars=new I(e,t.localVars));r.globalVars&&!C(e,t.globalVars)&&(t.globalVars=new I(e,t.globalVars))}}function O(e,t){if(t){if(t.block){var r=O(e,t.prev);return r?r==t.prev?t:new L(r,t.vars,!0):null}return C(e,t.vars)?t:new L(t.prev,new I(e,t.vars),!1)}return null}function z(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function L(e,t,r){this.prev=e,this.vars=t,this.block=r}function I(e,t){this.name=e,this.next=t}var P=new I("this",new I("arguments",null));function M(){S.state.context=new L(S.state.context,S.state.localVars,!1),S.state.localVars=P}function A(){S.state.context=new L(S.state.context,S.state.localVars,!0),S.state.localVars=null}function j(){S.state.localVars=S.state.context.vars,S.state.context=S.state.context.prev}function V(e,t){var r=function(){var r=S.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var i=r.lexical;i&&")"==i.type&&i.align;i=i.prev)n=i.indented;r.lexical=new v(n,S.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function _(){var e=S.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function D(e){return function t(r){return r==e?N():";"==e||"}"==r||")"==r||"]"==r?T():N(t)}}function B(e,t){return"var"==e?N(V("vardef",t),ve,D(";"),_):"keyword a"==e?N(V("form"),K,B,_):"keyword b"==e?N(V("form"),B,_):"keyword d"==e?S.stream.match(/^\s*$/,!1)?N():N(V("stat"),$,D(";"),_):"debugger"==e?N(D(";")):"{"==e?N(V("}"),A,se,_,j):";"==e?N():"if"==e?("else"==S.state.lexical.info&&S.state.cc[S.state.cc.length-1]==_&&S.state.cc.pop()(),N(V("form"),K,B,_,Ee)):"function"==e?N(Ie):"for"==e?N(V("form"),A,Oe,B,j,_):"class"==e||d&&"interface"==t?(S.marked="keyword",N(V("form","class"==e?e:t),Ve,_)):"variable"==e?d&&"declare"==t?(S.marked="keyword",N(B)):d&&("module"==t||"enum"==t||"type"==t)&&S.stream.match(/^\s*\w/,!1)?(S.marked="keyword","enum"==t?N(Je):"type"==t?N(Me,D("operator"),pe,D(";")):N(V("form"),xe,D("{"),V("}"),se,_,_)):d&&"namespace"==t?(S.marked="keyword",N(V("form"),q,B,_)):d&&"abstract"==t?(S.marked="keyword",N(B)):N(V("stat"),ee):"switch"==e?N(V("form"),K,D("{"),V("}","switch"),A,se,_,_,j):"case"==e?N(q,D(":")):"default"==e?N(D(":")):"catch"==e?N(V("form"),M,F,B,_,j):"export"==e?N(V("stat"),Fe,_):"import"==e?N(V("stat"),We,_):"async"==e?N(B):"@"==t?N(q,B):T(V("stat"),q,D(";"),_)}function F(e){if("("==e)return N(Ae,D(")"))}function q(e,t){return R(e,t,!1)}function W(e,t){return R(e,t,!0)}function K(e){return"("!=e?T():N(V(")"),$,D(")"),_)}function R(e,t,r){if(S.state.fatArrowAt==S.stream.start){var n=r?X:G;if("("==e)return N(M,V(")"),oe(Ae,")"),_,D("=>"),n,j);if("variable"==e)return T(M,xe,D("=>"),n,j)}var i=r?H:U;return w.hasOwnProperty(e)?N(i):"function"==e?N(Ie,i):"class"==e||d&&"interface"==t?(S.marked="keyword",N(V("form"),je,_)):"keyword c"==e||"async"==e?N(r?W:q):"("==e?N(V(")"),$,D(")"),_,i):"operator"==e||"spread"==e?N(r?W:q):"["==e?N(V("]"),He,_,i):"{"==e?ae(re,"}",null,i):"quasi"==e?T(J,i):"new"==e?N(function(e){return function(t){return"."==t?N(e?Q:Z):"variable"==t&&d?N(ye,e?H:U):T(e?W:q)}}(r)):N()}function $(e){return e.match(/[;\}\)\],]/)?T():T(q)}function U(e,t){return","==e?N($):H(e,t,!1)}function H(e,t,r){var n=0==r?U:H,i=0==r?q:W;return"=>"==e?N(M,r?X:G,j):"operator"==e?/\+\+|--/.test(t)||d&&"!"==t?N(n):d&&"<"==t&&S.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?N(V(">"),oe(pe,">"),_,n):"?"==t?N(q,D(":"),i):N(i):"quasi"==e?T(J,n):";"!=e?"("==e?ae(W,")","call",n):"."==e?N(te,n):"["==e?N(V("]"),$,D("]"),_,n):d&&"as"==t?(S.marked="keyword",N(pe,n)):"regexp"==e?(S.state.lastType=S.marked="operator",S.stream.backUp(S.stream.pos-S.stream.start-1),N(i)):void 0:void 0}function J(e,t){return"quasi"!=e?T():"${"!=t.slice(t.length-2)?N(J):N(q,Y)}function Y(e){if("}"==e)return S.marked="string-2",S.state.tokenize=y,N(J)}function G(e){return k(S.stream,S.state),T("{"==e?B:q)}function X(e){return k(S.stream,S.state),T("{"==e?B:W)}function Z(e,t){if("target"==t)return S.marked="keyword",N(U)}function Q(e,t){if("target"==t)return S.marked="keyword",N(H)}function ee(e){return":"==e?N(_,B):T(U,D(";"),_)}function te(e){if("variable"==e)return S.marked="property",N()}function re(e,t){return"async"==e?(S.marked="property",N(re)):"variable"==e||"keyword"==S.style?(S.marked="property","get"==t||"set"==t?N(ne):(d&&S.state.fatArrowAt==S.stream.start&&(r=S.stream.match(/^\s*:\s*/,!1))&&(S.state.fatArrowAt=S.stream.pos+r[0].length),N(ie))):"number"==e||"string"==e?(S.marked=s?"property":S.style+" property",N(ie)):"jsonld-keyword"==e?N(ie):d&&z(t)?(S.marked="keyword",N(re)):"["==e?N(q,le,D("]"),ie):"spread"==e?N(W,ie):"*"==t?(S.marked="keyword",N(re)):":"==e?T(ie):void 0;var r}function ne(e){return"variable"!=e?T(ie):(S.marked="property",N(Ie))}function ie(e){return":"==e?N(W):"("==e?T(Ie):void 0}function oe(e,t,r){function n(i,o){if(r?r.indexOf(i)>-1:","==i){var a=S.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),N((function(r,n){return r==t||n==t?T():T(e)}),n)}return i==t||o==t?N():r&&r.indexOf(";")>-1?T(e):N(D(t))}return function(r,i){return r==t||i==t?N():T(e,n)}}function ae(e,t,r){for(var n=3;n"),pe):void 0}function fe(e){if("=>"==e)return N(pe)}function he(e){return e.match(/[\}\)\]]/)?N():","==e||";"==e?N(he):T(me,he)}function me(e,t){return"variable"==e||"keyword"==S.style?(S.marked="property",N(me)):"?"==t||"number"==e||"string"==e?N(me):":"==e?N(pe):"["==e?N(D("variable"),ce,D("]"),me):"("==e?T(Pe,me):e.match(/[;\}\)\],]/)?void 0:N()}function be(e,t){return"variable"==e&&S.stream.match(/^\s*[?:]/,!1)||"?"==t?N(be):":"==e?N(pe):"spread"==e?N(be):T(pe)}function ge(e,t){return"<"==t?N(V(">"),oe(pe,">"),_,ge):"|"==t||"."==e||"&"==t?N(pe):"["==e?N(pe,D("]"),ge):"extends"==t||"implements"==t?(S.marked="keyword",N(pe)):"?"==t?N(pe,D(":"),pe):void 0}function ye(e,t){if("<"==t)return N(V(">"),oe(pe,">"),_,ge)}function ke(){return T(pe,we)}function we(e,t){if("="==t)return N(pe)}function ve(e,t){return"enum"==t?(S.marked="keyword",N(Je)):T(xe,le,Ne,Ce)}function xe(e,t){return d&&z(t)?(S.marked="keyword",N(xe)):"variable"==e?(E(t),N()):"spread"==e?N(xe):"["==e?ae(Te,"]"):"{"==e?ae(Se,"}"):void 0}function Se(e,t){return"variable"!=e||S.stream.match(/^\s*:/,!1)?("variable"==e&&(S.marked="property"),"spread"==e?N(xe):"}"==e?T():"["==e?N(q,D("]"),D(":"),Se):N(D(":"),xe,Ne)):(E(t),N(Ne))}function Te(){return T(xe,Ne)}function Ne(e,t){if("="==t)return N(W)}function Ce(e){if(","==e)return N(ve)}function Ee(e,t){if("keyword b"==e&&"else"==t)return N(V("form","else"),B,_)}function Oe(e,t){return"await"==t?N(Oe):"("==e?N(V(")"),ze,_):void 0}function ze(e){return"var"==e?N(ve,Le):"variable"==e?N(Le):T(Le)}function Le(e,t){return")"==e?N():";"==e?N(Le):"in"==t||"of"==t?(S.marked="keyword",N(q,Le)):T(q,Le)}function Ie(e,t){return"*"==t?(S.marked="keyword",N(Ie)):"variable"==e?(E(t),N(Ie)):"("==e?N(M,V(")"),oe(Ae,")"),_,de,B,j):d&&"<"==t?N(V(">"),oe(ke,">"),_,Ie):void 0}function Pe(e,t){return"*"==t?(S.marked="keyword",N(Pe)):"variable"==e?(E(t),N(Pe)):"("==e?N(M,V(")"),oe(Ae,")"),_,de,j):d&&"<"==t?N(V(">"),oe(ke,">"),_,Pe):void 0}function Me(e,t){return"keyword"==e||"variable"==e?(S.marked="type",N(Me)):"<"==t?N(V(">"),oe(ke,">"),_):void 0}function Ae(e,t){return"@"==t&&N(q,Ae),"spread"==e?N(Ae):d&&z(t)?(S.marked="keyword",N(Ae)):d&&"this"==e?N(le,Ne):T(xe,le,Ne)}function je(e,t){return"variable"==e?Ve(e,t):_e(e,t)}function Ve(e,t){if("variable"==e)return E(t),N(_e)}function _e(e,t){return"<"==t?N(V(">"),oe(ke,">"),_,_e):"extends"==t||"implements"==t||d&&","==e?("implements"==t&&(S.marked="keyword"),N(d?pe:q,_e)):"{"==e?N(V("}"),De,_):void 0}function De(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||d&&z(t))&&S.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(S.marked="keyword",N(De)):"variable"==e||"keyword"==S.style?(S.marked="property",N(Be,De)):"number"==e||"string"==e?N(Be,De):"["==e?N(q,le,D("]"),Be,De):"*"==t?(S.marked="keyword",N(De)):d&&"("==e?T(Pe,De):";"==e||","==e?N(De):"}"==e?N():"@"==t?N(q,De):void 0}function Be(e,t){if("?"==t)return N(Be);if(":"==e)return N(pe,Ne);if("="==t)return N(W);var r=S.state.lexical.prev;return T(r&&"interface"==r.info?Pe:Ie)}function Fe(e,t){return"*"==t?(S.marked="keyword",N(Ue,D(";"))):"default"==t?(S.marked="keyword",N(q,D(";"))):"{"==e?N(oe(qe,"}"),Ue,D(";")):T(B)}function qe(e,t){return"as"==t?(S.marked="keyword",N(D("variable"))):"variable"==e?T(W,qe):void 0}function We(e){return"string"==e?N():"("==e?T(q):"."==e?T(U):T(Ke,Re,Ue)}function Ke(e,t){return"{"==e?ae(Ke,"}"):("variable"==e&&E(t),"*"==t&&(S.marked="keyword"),N($e))}function Re(e){if(","==e)return N(Ke,Re)}function $e(e,t){if("as"==t)return S.marked="keyword",N(Ke)}function Ue(e,t){if("from"==t)return S.marked="keyword",N(q)}function He(e){return"]"==e?N():T(oe(W,"]"))}function Je(){return T(V("form"),xe,D("{"),V("}"),oe(Ye,"}"),_,_)}function Ye(){return T(xe,Ne)}function Ge(e,t,r){return t.tokenize==b&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}return j.lex=!0,_.lex=!0,{startState:function(e){var t={tokenize:b,lastType:"sof",cc:[],lexical:new v((e||0)-o,0,"block",!1),localVars:r.localVars,context:r.localVars&&new L(null,null,!1),indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),k(e,t)),t.tokenize!=g&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==n?r:(t.lastType="operator"!=n||"++"!=i&&"--"!=i?n:"incdec",function(e,t,r,n,i){var o=e.cc;for(S.state=e,S.stream=i,S.marked=null,S.cc=o,S.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():l?q:B)(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return S.marked?S.marked:"variable"==r&&x(e,n)?"variable-2":t}}(t,r,n,i,e))},indent:function(t,n){if(t.tokenize==g||t.tokenize==y)return e.Pass;if(t.tokenize!=b)return 0;var i,s=n&&n.charAt(0),l=t.lexical;if(!/^\s*else\b/.test(n))for(var c=t.cc.length-1;c>=0;--c){var d=t.cc[c];if(d==_)l=l.prev;else if(d!=Ee&&d!=j)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(i=t.cc[t.cc.length-1])&&(i==U||i==H)&&!/^[,\.=+\-*:?[\(]/.test(n));)l=l.prev;a&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var u=l.type,p=s==u;return"vardef"==u?l.indented+("operator"==t.lastType||","==t.lastType?l.info.length+1:0):"form"==u&&"{"==s?l.indented:"form"==u?l.indented+o:"stat"==u?l.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||f.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,n)?a||o:0):"switch"!=l.info||p||0==r.doubleIndentSwitch?l.align?l.column+(p?0:1):l.indented+(p?0:o):l.indented+(/^(?:case|default)\b/.test(n)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:s,jsonMode:l,expressionAllowed:Ge,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=q&&t!=W||e.cc.pop()}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}));class o{#e;#t;#r;#n;#i;#o;#a;#s;constructor(t){this.#e=t,this.#t=[],this.#r=r.tokenizer(this.#e,{onComment:this.#t,ecmaVersion:a,allowHashBang:!0});const i=e.StringUtilities.findLineEndingIndexes(this.#e);this.#n=new n.TextCursor.TextCursor(i),this.#i=0,this.#o=0,this.#a=0,0===this.#t.length&&this.#l()}static punctuator(e,t){return e.type!==r.tokTypes.num&&e.type!==r.tokTypes.regexp&&e.type!==r.tokTypes.string&&e.type!==r.tokTypes.name&&!e.type.keyword&&(!t||1===e.type.label.length&&-1!==t.indexOf(e.type.label))}static keyword(e,t){return Boolean(e.type.keyword)&&e.type!==r.tokTypes._true&&e.type!==r.tokTypes._false&&e.type!==r.tokTypes._null&&(!t||e.type.keyword===t)}static identifier(e,t){return e.type===r.tokTypes.name&&(!t||e.value===t)}static lineComment(e){return"Line"===e.type}static blockComment(e){return"Block"===e.type}#l(){if(this.#t.length){const e=this.#t.shift();return this.#s||0!==this.#t.length||(this.#s=this.#r.getToken()),e}const e=this.#s;return this.#s=this.#r.getToken(),e}nextToken(){const e=this.#l();return e&&e.type!==r.tokTypes.eof?(this.#n.advance(e.start),this.#i=this.#n.lineNumber(),this.#a=this.#n.columnNumber(),this.#n.advance(e.end),this.#o=this.#n.lineNumber(),e):null}peekToken(){return this.#t.length?this.#t[0]:this.#s&&this.#s.type!==r.tokTypes.eof?this.#s:null}tokenLineStart(){return this.#i}tokenLineEnd(){return this.#o}tokenColumnStart(){return this.#a}}const a=2022;class s{indentString;#c=0;#d=[];#u=0;#p=0;#f=0;#h=0;#m=!0;#b=!1;#g=0;#y=new Map;#k=/[$\u200C\u200D\p{ID_Continue}]/u;mapping={original:[0],formatted:[0]};constructor(e){this.indentString=e}setEnforceSpaceBetweenWords(e){const t=this.#m;return this.#m=e,t}addToken(e,t){const r=this.#d.at(-1)?.at(-1)??"";this.#m&&this.#k.test(r)&&this.#k.test(e)&&this.addSoftSpace(),this.#w(),this.#v(t),this.#x(e)}addSoftSpace(){this.#g||(this.#b=!0)}addHardSpace(){this.#b=!1,++this.#g}addNewLine(e){this.#u&&(e?++this.#h:this.#h=this.#h||1)}increaseNestingLevel(){this.#f+=1}decreaseNestingLevel(){this.#f>0&&(this.#f-=1)}content(){return this.#d.join("")+(this.#h?"\n":"")}#w(){if(this.#h){for(let e=0;e"===t[r]?this.#z.increaseNestingLevel():"<"===t[r]?this.#z.decreaseNestingLevel():"t"===t[r]&&(this.#r.tokenLineStart()-this.#I>1&&this.#z.addNewLine(!0),this.#I=this.#r.tokenLineEnd(),e&&this.#z.addToken(this.#e.substring(e.start,e.end),this.#L+e.start))}#T(e){if(!e.parent)return;let t;for(;(t=this.#r.peekToken())&&t.start"}else if("SwitchStatement"===e.type){if(r.punctuator(n,"{"))return"tn>";if(r.punctuator(n,"}"))return"n"}else if("VariableDeclaration"===e.type){if(r.punctuator(n,",")){let t=!0;const r=e.declarations;for(let e=0;e":"t";if(r.punctuator(n,"}"))return e.body.length?"n";if(r.punctuator(n,"}"))return"n";if(r.keyword(n,"else")){const t=e.consequent&&"BlockStatement"===e.consequent.type?"st":"n"}else if("WhileStatement"===e.type){if(r.punctuator(n,")"))return e.body&&"BlockStatement"===e.body.type?"ts":"tn>"}else if("DoWhileStatement"===e.type){const t=e.body&&"BlockStatement"===e.body.type;if(r.keyword(n,"do"))return t?"ts":"tn>";if(r.keyword(n,"while"))return t?"sts":"n":r.punctuator(n,"}")?"{this.#Z.push(e),this.#se(e);const t=this.#X[this.#X.length-1];if(t&&("script"===t.name||"style"===t.name)&&t.openTag&&t.openTag.endOffset===n)return P},s=(e,t,i,s)=>{i+=r,n=s+=r;const l=t?new Set(t.split(" ")):new Set,c=new k(e,l,i,s);if(o){if("/"===e&&"attribute"===t)c.startOffset=o.startOffset,c.value=`${o.value}${e}`,c.type=o.type;else if(a(o)===P)return P;o=null}else if("string"===t)return void(o=c);return a(c)};for(;r=n,t(e.substring(n),s),o&&(a(o),o=null),!(n>=e.length);){const t=this.#X[this.#X.length-1];if(!t)break;if(n=i.indexOf("1;){const t=this.#X[this.#X.length-1];if(!t)break;this.#le(new w(t.name,e.length,e.length,new Map,!1,!1))}}#se(e){const t=e.value,r=e.type;switch(this.#Y){case"Initial":return void(!m(r,"bracket")||"<"!==t&&""!==t&&"/>"!==t||(this.#de(e),this.#Y="Initial"));case"AttributeName":return void(r.size||"="!==t?!m(r,"bracket")||">"!==t&&"/>"!==t||(this.#de(e),this.#Y="Initial"):this.#Y="AttributeValue");case"AttributeValue":return void(m(r,"string")?(this.#ee.set(this.#te,t),this.#Y="Tag"):!m(r,"bracket")||">"!==t&&"/>"!==t||(this.#de(e),this.#Y="Initial"))}}#ce(e){this.#re="",this.#ie=e.startOffset,this.#oe=null,this.#ee=new Map,this.#te="",this.#ne="<"===e.value}#de(e){this.#oe=e.endOffset;const t="/>"===e.value||g.has(this.#re),r=new w(this.#re,this.#ie||0,this.#oe,this.#ee,this.#ne,t);this.#ue(r)}#ue(e){if(e.isOpenTag){const t=this.#X[this.#X.length-1];if(t){const n=y.get(t.name);t!==this.#G&&t.openTag&&t.openTag.selfClosingTag?this.#le(r(t,t.openTag.endOffset)):n&&n.has(e.name)&&this.#le(r(t,e.startOffset)),this.#pe(e)}return}let t=this.#X[this.#X.length-1];for(;this.#X.length>1&&t&&t.name!==e.name;)this.#le(r(t,e.startOffset)),t=this.#X[this.#X.length-1];function r(e,t){return new w(e.name,t,t,new Map,!1,!1)}1!==this.#X.length&&this.#le(e)}#le(e){const t=this.#X.pop();t&&(t.closeTag=e)}#pe(e){const t=this.#X[this.#X.length-1],r=new v(e.name);t&&(r.parent=t,t.children.push(r)),r.openTag=e,this.#X.push(r)}peekToken(){return this.#Qe.export()));return{start:this.start,end:this.end,variables:e,children:t}}addVariable(e,t,r,n){const i=this.variables.get(e),o={offset:t,scope:this,isShorthandAssignmentProperty:n};i?(0===i.definitionKind&&(i.definitionKind=r),i.uses.push(o)):this.variables.set(e,{definitionKind:r,uses:[o]})}findBinders(e){const t=[];let r=this;for(;null!==r;){const n=r.variables.get(e);n&&0!==n.definitionKind&&t.push(n),r=r.parent}return t}#fe(e,t){const r=this.variables.get(e);r?(r.uses.push(...t.uses),2===t.definitionKind?(console.assert(1!==r.definitionKind),0===r.definitionKind&&(r.definitionKind=t.definitionKind)):console.assert(0===t.definitionKind)):this.variables.set(e,t)}finalizeToParent(e){if(!this.parent)throw console.error("Internal error: wrong nesting in scope analysis."),new Error("Internal error");const t=[];for(const[r,n]of this.variables.entries())(0===n.definitionKind||2===n.definitionKind&&!e)&&(this.parent.#fe(r,n),t.push(r));t.forEach((e=>this.variables.delete(e)))}}class E{#he;#me=new Set;#be;#ge;constructor(e){this.#ge=e,this.#he=new C(e.start,e.end,null),this.#be=this.#he}run(){return this.#ye(this.#ge),this.#he}#ye(e){if(null!==e)switch(e.type){case"AwaitExpression":case"SpreadElement":case"ThrowStatement":case"UnaryExpression":case"UpdateExpression":this.#ye(e.argument);break;case"ArrayExpression":case"ArrayPattern":e.elements.forEach((e=>this.#ye(e)));break;case"ExpressionStatement":case"ChainExpression":this.#ye(e.expression);break;case"Program":console.assert(this.#be===this.#he),e.body.forEach((e=>this.#ye(e))),console.assert(this.#be===this.#he);break;case"ArrowFunctionExpression":this.#ke(e.start,e.end),e.params.forEach(this.#we.bind(this,2,!1)),"BlockStatement"===e.body.type?e.body.body.forEach(this.#ye.bind(this)):this.#ye(e.body),this.#ve(!0);break;case"AssignmentExpression":case"AssignmentPattern":case"BinaryExpression":case"LogicalExpression":this.#ye(e.left),this.#ye(e.right);break;case"BlockStatement":this.#ke(e.start,e.end),e.body.forEach(this.#ye.bind(this)),this.#ve(!1);break;case"CallExpression":case"NewExpression":this.#ye(e.callee),e.arguments.forEach(this.#ye.bind(this));break;case"VariableDeclaration":{const t="var"===e.kind?2:1;e.declarations.forEach(this.#xe.bind(this,t));break}case"CatchClause":this.#ke(e.start,e.end),this.#we(1,!1,e.param),this.#ye(e.body),this.#ve(!1);break;case"ClassBody":e.body.forEach(this.#ye.bind(this));break;case"ClassDeclaration":this.#we(1,!1,e.id),this.#ye(e.superClass??null),this.#ye(e.body);break;case"ClassExpression":this.#ye(e.superClass??null),this.#ye(e.body);break;case"ConditionalExpression":this.#ye(e.test),this.#ye(e.consequent),this.#ye(e.alternate);break;case"DoWhileStatement":this.#ye(e.body),this.#ye(e.test);break;case"ForInStatement":case"ForOfStatement":this.#ke(e.start,e.end),this.#ye(e.left),this.#ye(e.right),this.#ye(e.body),this.#ve(!1);break;case"ForStatement":this.#ke(e.start,e.end),this.#ye(e.init??null),this.#ye(e.test??null),this.#ye(e.update??null),this.#ye(e.body),this.#ve(!1);break;case"FunctionDeclaration":this.#we(2,!1,e.id),this.#ke(e.id?.end??e.start,e.end),this.#Se("this",e.start,3),this.#Se("arguments",e.start,3),e.params.forEach(this.#we.bind(this,1,!1)),e.body.body.forEach(this.#ye.bind(this)),this.#ve(!0);break;case"FunctionExpression":this.#ke(e.id?.end??e.start,e.end),this.#Se("this",e.start,3),this.#Se("arguments",e.start,3),e.params.forEach(this.#we.bind(this,1,!1)),e.body.body.forEach(this.#ye.bind(this)),this.#ve(!0);break;case"Identifier":this.#Se(e.name,e.start);break;case"IfStatement":this.#ye(e.test),this.#ye(e.consequent),this.#ye(e.alternate??null);break;case"LabeledStatement":this.#ye(e.body);break;case"MetaProperty":case"PrivateIdentifier":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"EmptyStatement":case"Literal":case"Super":case"TemplateElement":case"ImportDeclaration":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":case"ImportExpression":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportSpecifier":break;case"MethodDefinition":e.computed&&this.#ye(e.key),this.#ye(e.value);break;case"MemberExpression":this.#ye(e.object),e.computed&&this.#ye(e.property);break;case"ObjectExpression":case"ObjectPattern":e.properties.forEach(this.#ye.bind(this));break;case"PropertyDefinition":e.computed&&this.#ye(e.key),this.#ye(e.value??null);break;case"Property":e.shorthand?(console.assert("Identifier"===e.value.type),console.assert("Identifier"===e.key.type),console.assert(e.value.name===e.key.name),this.#Se(e.value.name,e.value.start,0,!0)):(e.computed&&this.#ye(e.key),this.#ye(e.value));break;case"RestElement":this.#we(1,!1,e.argument);break;case"ReturnStatement":case"YieldExpression":this.#ye(e.argument??null);break;case"SequenceExpression":case"TemplateLiteral":e.expressions.forEach(this.#ye.bind(this));break;case"SwitchCase":this.#ye(e.test??null),e.consequent.forEach(this.#ye.bind(this));break;case"SwitchStatement":this.#ye(e.discriminant),e.cases.forEach(this.#ye.bind(this));break;case"TaggedTemplateExpression":this.#ye(e.tag),this.#ye(e.quasi);break;case"ThisExpression":this.#Se("this",e.start);break;case"TryStatement":this.#ye(e.block),this.#ye(e.handler??null),this.#ye(e.finalizer??null);break;case"WithStatement":this.#ye(e.object),this.#ye(e.body);break;case"WhileStatement":this.#ye(e.test),this.#ye(e.body);break;case"VariableDeclarator":console.error("Should not encounter VariableDeclarator in general traversal.")}}getFreeVariables(){const e=new Map;for(const[t,r]of this.#he.variables)0===r.definitionKind&&e.set(t,r.uses);return e}getAllNames(){return this.#me}#ke(e,t){this.#be=new C(e,t,this.#be)}#ve(e){if(null===this.#be.parent)throw console.error("Internal error: wrong nesting in scope analysis."),new Error("Internal error");this.#be.finalizeToParent(e),this.#be=this.#be.parent}#Se(e,t,r=0,n=!1){this.#me.add(e),this.#be.addVariable(e,t,r,n)}#we(e,t,r){if(null!==r)switch(r.type){case"ArrayPattern":r.elements.forEach(this.#we.bind(this,e,!1));break;case"AssignmentPattern":this.#we(e,t,r.left),this.#ye(r.right);break;case"Identifier":this.#Se(r.name,r.start,e,t);break;case"MemberExpression":this.#ye(r.object),r.computed&&this.#ye(r.property);break;case"ObjectPattern":r.properties.forEach(this.#we.bind(this,e,!1));break;case"Property":r.computed&&this.#ye(r.key),this.#we(e,r.shorthand,r.value);break;case"RestElement":this.#we(e,!1,r.argument)}}#xe(e,t){this.#we(e,!1,t.id),this.#ye(t.init??null)}}var O=Object.freeze({__proto__:null,parseScopes:function(e){let t=null;try{t=r.parse(e,{ecmaVersion:a,allowAwaitOutsideFunction:!0,ranges:!1})}catch{return null}return new E(t).run()},Scope:C,ScopeVariableAnalysis:E});function z(e,t){const n=function(e,t){const n=r.parse(e,{ecmaVersion:a,allowAwaitOutsideFunction:!0,ranges:!1}),i=new E(n);i.run();const o=i.getFreeVariables(),s=[],l=i.getAllNames();for(const e of t.values())l.add(e);function c(e){let t=1;for(;l.has(`${e}_${t}`);)t++;const r=`${e}_${t}`;return l.add(r),r}for(const[e,r]of t.entries()){const t=o.get(e);if(!t)continue;const n=[];for(const i of t)s.push({from:e,to:r,offset:i.offset,isShorthandAssignmentProperty:i.isShorthandAssignmentProperty}),n.push(...i.scope.findBinders(r));for(const e of n){if(3===e.definitionKind)throw new Error(`Cannot avoid capture of '${r}'`);const t=c(r);for(const n of e.uses)s.push({from:r,to:t,offset:n.offset,isShorthandAssignmentProperty:n.isShorthandAssignmentProperty})}}return s.sort(((e,t)=>e.offset-t.offset)),s}(e,t);return function(e,t){const r=[];let n=0;for(const i of t){r.push(e.slice(n,i.offset));let t=i.to;i.isShorthandAssignmentProperty&&(t=`${i.from}: ${i.to}`),r.push(t),n=i.offset+i.from.length}return r.push(e.slice(n)),r.join("")}(e,n)}var L=Object.freeze({__proto__:null,substituteExpression:z});function I(e){const t=CodeMirror.getMode({indentUnit:2},e),r=CodeMirror.startState(t);if(!t||"null"===t.name)throw new Error(`Could not find CodeMirror mode for MimeType: ${e}`);if(!t.token)throw new Error(`Could not find CodeMirror mode with token method: ${e}`);return(e,n)=>{const i=new CodeMirror.StringStream(e);for(;!i.eol();){const e=t.token(i,r),o=i.current();if(n(o,e,i.start,i.start+o.length)===P)return;i.start=i.pos}}}const P={};t.Runtime.Runtime.queryParam("test")&&(console.error=()=>{});var M=Object.freeze({__proto__:null,createTokenizer:I,AbortTokenization:P,evaluatableJavaScriptSubstring:function(e){try{const t=r.tokenizer(e,{ecmaVersion:a});let n=t.getToken();for(;o.punctuator(n);)n=t.getToken();const i=n.start;let s=n.end;for(;n.type!==r.tokTypes.eof;){const e=n.type===r.tokTypes.name||n.type===r.tokTypes.privateId,i=o.keyword(n,"this"),a=n.type===r.tokTypes.string;if(!i&&!e&&!a)break;for(s=n.end,n=t.getToken();o.punctuator(n,"[");){let e=0;do{if(o.punctuator(n,"[")&&++e,n=t.getToken(),o.punctuator(n,"]")&&0==--e){s=n.end,n=t.getToken();break}}while(n.type!==r.tokTypes.eof)}if(!o.punctuator(n,"."))break;n=t.getToken()}return e.substring(i,s)}catch(e){return console.error(e),""}},format:function(t,r,n){let i;const o=new s(n=n||" "),a=e.StringUtilities.findLineEndingIndexes(r);try{switch(t){case"text/html":new h(o).format(r,a);break;case"text/css":case"text/x-scss":new A(o).format(r,a,0,r.length);break;case"application/javascript":case"text/javascript":new p(o).format(r,a,0,r.length);break;case"application/json":case"application/manifest+json":new T(o).format(r,a,0,r.length);break;default:new S(o).format(r,a,0,r.length)}i={mapping:o.mapping,content:o.content()}}catch(e){console.error(e),i={mapping:{original:[0],formatted:[0]},content:r}}return i},substituteExpression:z});class A{#z;#P;#L;#F;#Te;#Y;constructor(e){this.#z=e,this.#Te=-1,this.#Y={eatWhitespace:void 0,seenProperty:void 0,inPropertyValue:void 0,afterClosingBrace:void 0}}format(e,t,r,n){this.#F=t,this.#L=r,this.#P=n,this.#Y={eatWhitespace:void 0,seenProperty:void 0,inPropertyValue:void 0,afterClosingBrace:void 0},this.#Te=-1;const i=I("text/css"),o=this.#z.setEnforceSpaceBetweenWords(!1);i(e.substring(this.#L,this.#P),this.#Ne.bind(this)),this.#z.setEnforceSpaceBetweenWords(o)}#Ne(t,r,n){n+=this.#L;const i=e.ArrayUtilities.lowerBound(this.#F,n,e.ArrayUtilities.DEFAULT_COMPARATOR);i!==this.#Te&&(this.#Y.eatWhitespace=!0),r&&(/^property/.test(r)||/^variable-2/.test(r))&&!this.#Y.inPropertyValue&&(this.#Y.seenProperty=!0),this.#Te=i;if(/^(?:\r?\n|[\t\f\r ])+$/.test(t))this.#Y.eatWhitespace||this.#z.addSoftSpace();else if(this.#Y.eatWhitespace=!1,"\n"!==t){if("}"!==t&&(this.#Y.afterClosingBrace&&this.#z.addNewLine(!0),this.#Y.afterClosingBrace=!1),"}"===t)this.#Y.inPropertyValue&&this.#z.addNewLine(),this.#z.decreaseNestingLevel(),this.#Y.afterClosingBrace=!0,this.#Y.inPropertyValue=!1;else{if(":"===t&&!this.#Y.inPropertyValue&&this.#Y.seenProperty)return this.#z.addToken(t,n),this.#z.addSoftSpace(),this.#Y.eatWhitespace=!0,this.#Y.inPropertyValue=!0,void(this.#Y.seenProperty=!1);if("{"===t)return this.#z.addSoftSpace(),this.#z.addToken(t,n),this.#z.addNewLine(),void this.#z.increaseNestingLevel()}this.#z.addToken(t.replace(/(?:\r?\n|[\t\f\r ])+$/g,""),n),"comment"!==r||this.#Y.inPropertyValue||this.#Y.seenProperty||this.#z.addNewLine(),";"===t&&this.#Y.inPropertyValue?(this.#Y.inPropertyValue=!1,this.#z.addNewLine()):"}"===t&&this.#z.addNewLine()}}}var j=Object.freeze({__proto__:null,CSSFormatter:A});const V={Initial:"Initial",Selector:"Selector",Style:"Style",PropertyName:"PropertyName",PropertyValue:"PropertyValue",AtRule:"AtRule"};var _=Object.freeze({__proto__:null,CSSParserStates:V,parseCSS:function e(t,r){const n=t.split("\n");let i,o,a=[],s=0,l=V.Initial;const c=new Set;let d=[];function u(e){d=d.concat(e.chunk)}function p(e){return e.replace(/^(?:\r?\n|[\t\f\r ])+|(?:\r?\n|[\t\f\r ])+$/g,"")}function f(t,n,f,h){const g=n?new Set(n.split(" ")):c;switch(l){case V.Initial:g.has("qualifier")||g.has("builtin")||g.has("tag")?(i={selectorText:t,lineNumber:m,columnNumber:f,properties:[]},l=V.Selector):g.has("def")&&(i={atRule:t,lineNumber:m,columnNumber:f},l=V.AtRule);break;case V.Selector:"{"===t&&g===c?(i.selectorText=p(i.selectorText),i.styleRange=b(m,h),l=V.Style):i.selectorText+=t;break;case V.AtRule:";"!==t&&"{"!==t||g!==c?i.atRule+=t:(i.atRule=p(i.atRule),a.push(i),l=V.Initial);break;case V.Style:if(g.has("meta")||g.has("property")||g.has("variable-2"))o={name:t,value:"",range:b(m,f),nameRange:b(m,f)},l=V.PropertyName;else if("}"===t&&g===c)i.styleRange.endLine=m,i.styleRange.endColumn=f,a.push(i),l=V.Initial;else if(g.has("comment")){if("/*"!==t.substring(0,2)||"*/"!==t.substring(t.length-2))break;const r=t.substring(2,t.length-2);if(d=[],e("a{\n"+r+"}",u),1===d.length&&1===d[0].properties.length){const e=d[0].properties[0];e.disabled=!0,e.range=b(m,f),e.range.endColumn=h;const t=m-1,r=f+2;e.nameRange.startLine+=t,e.nameRange.startColumn+=r,e.nameRange.endLine+=t,e.nameRange.endColumn+=r,e.valueRange.startLine+=t,e.valueRange.startColumn+=r,e.valueRange.endLine+=t,e.valueRange.endColumn+=r,i.properties.push(e)}}break;case V.PropertyName:":"===t&&g===c?(o.name=o.name,o.nameRange.endLine=m,o.nameRange.endColumn=f,o.valueRange=b(m,h),l=V.PropertyValue):g.has("property")&&(o.name+=t);break;case V.PropertyValue:";"!==t&&"}"!==t||g!==c?g.has("comment")||(o.value+=t):(o.value=o.value,o.valueRange.endLine=m,o.valueRange.endColumn=f,o.range.endLine=m,o.range.endColumn=";"===t?h:f,i.properties.push(o),"}"===t?(i.styleRange.endLine=m,i.styleRange.endColumn=f,a.push(i),l=V.Initial):l=V.Style);break;default:console.assert(!1,"Unknown CSS parser state.")}s+=h-f,s>1e5&&(r({chunk:a,isLastChunk:!1}),a=[],s=0)}const h=I("text/css");let m;for(m=0;mself.postMessage(e)));var r;r=a.dispatchMessage.bind(a),s.addEventListener("message",r,!1),self.postMessage("workerReady"); diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/heap_snapshot_worker/heap_snapshot_worker-legacy.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/heap_snapshot_worker/heap_snapshot_worker-legacy.js deleted file mode 100644 index 4c4474de8..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/heap_snapshot_worker/heap_snapshot_worker-legacy.js +++ /dev/null @@ -1 +0,0 @@ -import*as e from"../../models/heap_snapshot_model/heap_snapshot_model.js";import*as a from"./heap_snapshot_worker.js";self.HeapSnapshotModel=self.HeapSnapshotModel||{},HeapSnapshotModel=HeapSnapshotModel||{},HeapSnapshotModel.HeapSnapshotProgressEvent=e.HeapSnapshotModel.HeapSnapshotProgressEvent,HeapSnapshotModel.baseSystemDistance=e.HeapSnapshotModel.baseSystemDistance,HeapSnapshotModel.AllocationNodeCallers=e.HeapSnapshotModel.AllocationNodeCallers,HeapSnapshotModel.SerializedAllocationNode=e.HeapSnapshotModel.SerializedAllocationNode,HeapSnapshotModel.AllocationStackFrame=e.HeapSnapshotModel.AllocationStackFrame,HeapSnapshotModel.Node=e.HeapSnapshotModel.Node,HeapSnapshotModel.Edge=e.HeapSnapshotModel.Edge,HeapSnapshotModel.Aggregate=e.HeapSnapshotModel.Aggregate,HeapSnapshotModel.AggregateForDiff=e.HeapSnapshotModel.AggregateForDiff,HeapSnapshotModel.Diff=e.HeapSnapshotModel.Diff,HeapSnapshotModel.DiffForClass=e.HeapSnapshotModel.DiffForClass,HeapSnapshotModel.ComparatorConfig=e.HeapSnapshotModel.ComparatorConfig,HeapSnapshotModel.WorkerCommand=e.HeapSnapshotModel.WorkerCommand,HeapSnapshotModel.ItemsRange=e.HeapSnapshotModel.ItemsRange,HeapSnapshotModel.StaticData=e.HeapSnapshotModel.StaticData,HeapSnapshotModel.Statistics=e.HeapSnapshotModel.Statistics,HeapSnapshotModel.NodeFilter=e.HeapSnapshotModel.NodeFilter,HeapSnapshotModel.SearchConfig=e.HeapSnapshotModel.SearchConfig,HeapSnapshotModel.Samples=e.HeapSnapshotModel.Samples,HeapSnapshotModel.Location=e.HeapSnapshotModel.Location;const o=self,p=new a.HeapSnapshotWorkerDispatcher.HeapSnapshotWorkerDispatcher(o,(e=>self.postMessage(e)));var t;t=p.dispatchMessage.bind(p),o.addEventListener("message",t,!1),self.postMessage("workerReady"),self.HeapSnapshotWorker=self.HeapSnapshotWorker||{},HeapSnapshotWorker=HeapSnapshotWorker||{},HeapSnapshotWorker.AllocationProfile=a.AllocationProfile.AllocationProfile,HeapSnapshotWorker.TopDownAllocationNode=a.AllocationProfile.TopDownAllocationNode,HeapSnapshotWorker.BottomUpAllocationNode=a.AllocationProfile.BottomUpAllocationNode,HeapSnapshotWorker.FunctionAllocationInfo=a.AllocationProfile.FunctionAllocationInfo,HeapSnapshotWorker.HeapSnapshotItem=a.HeapSnapshot.HeapSnapshotItem,HeapSnapshotWorker.HeapSnapshotEdge=a.HeapSnapshot.HeapSnapshotEdge,HeapSnapshotWorker.HeapSnapshotItemIterator=a.HeapSnapshot.HeapSnapshotItemIterator,HeapSnapshotWorker.HeapSnapshotItemIndexProvider=a.HeapSnapshot.HeapSnapshotItemIndexProvider,HeapSnapshotWorker.HeapSnapshotNodeIndexProvider=a.HeapSnapshot.HeapSnapshotNodeIndexProvider,HeapSnapshotWorker.HeapSnapshotEdgeIndexProvider=a.HeapSnapshot.HeapSnapshotEdgeIndexProvider,HeapSnapshotWorker.HeapSnapshotRetainerEdgeIndexProvider=a.HeapSnapshot.HeapSnapshotRetainerEdgeIndexProvider,HeapSnapshotWorker.HeapSnapshotEdgeIterator=a.HeapSnapshot.HeapSnapshotEdgeIterator,HeapSnapshotWorker.HeapSnapshotRetainerEdge=a.HeapSnapshot.HeapSnapshotRetainerEdge,HeapSnapshotWorker.HeapSnapshotRetainerEdgeIterator=a.HeapSnapshot.HeapSnapshotRetainerEdgeIterator,HeapSnapshotWorker.HeapSnapshotNode=a.HeapSnapshot.HeapSnapshotNode,HeapSnapshotWorker.HeapSnapshotNodeIterator=a.HeapSnapshot.HeapSnapshotNodeIterator,HeapSnapshotWorker.HeapSnapshotIndexRangeIterator=a.HeapSnapshot.HeapSnapshotIndexRangeIterator,HeapSnapshotWorker.HeapSnapshotFilteredIterator=a.HeapSnapshot.HeapSnapshotFilteredIterator,HeapSnapshotWorker.HeapSnapshotProgress=a.HeapSnapshot.HeapSnapshotProgress,HeapSnapshotWorker.HeapSnapshotProblemReport=a.HeapSnapshot.HeapSnapshotProblemReport,HeapSnapshotWorker.HeapSnapshot=a.HeapSnapshot.HeapSnapshot,HeapSnapshotWorker.HeapSnapshotHeader=a.HeapSnapshot.HeapSnapshotHeader,HeapSnapshotWorker.HeapSnapshotItemProvider=a.HeapSnapshot.HeapSnapshotItemProvider,HeapSnapshotWorker.HeapSnapshotEdgesProvider=a.HeapSnapshot.HeapSnapshotEdgesProvider,HeapSnapshotWorker.HeapSnapshotNodesProvider=a.HeapSnapshot.HeapSnapshotNodesProvider,HeapSnapshotWorker.JSHeapSnapshot=a.HeapSnapshot.JSHeapSnapshot,HeapSnapshotWorker.JSHeapSnapshotNode=a.HeapSnapshot.JSHeapSnapshotNode,HeapSnapshotWorker.JSHeapSnapshotEdge=a.HeapSnapshot.JSHeapSnapshotEdge,HeapSnapshotWorker.JSHeapSnapshotRetainerEdge=a.HeapSnapshot.JSHeapSnapshotRetainerEdge,HeapSnapshotWorker.HeapSnapshotLoader=a.HeapSnapshotLoader.HeapSnapshotLoader,HeapSnapshotWorker.HeapSnapshotWorkerDispatcher=a.HeapSnapshotWorkerDispatcher.HeapSnapshotWorkerDispatcher; diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/heap_snapshot_worker/heap_snapshot_worker.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/heap_snapshot_worker/heap_snapshot_worker.js deleted file mode 100644 index 79067ffa0..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/heap_snapshot_worker/heap_snapshot_worker.js +++ /dev/null @@ -1 +0,0 @@ -import*as e from"../../models/heap_snapshot_model/heap_snapshot_model.js";import*as t from"../../core/i18n/i18n.js";import*as s from"../../core/platform/platform.js";import*as n from"../../models/text_utils/text_utils.js";class i{#e;#t;#s;#n;#i;#o;#r;constructor(e,t){this.#e=e.strings,this.#t=1,this.#s=[],this.#n={},this.#i={},this.#o={},this.#r=null,this.#a(e),this.#d(e,t)}#a(e){const t=this.#e,s=e.snapshot.meta.trace_function_info_fields,n=s.indexOf("name"),i=s.indexOf("script_name"),o=s.indexOf("script_id"),r=s.indexOf("line"),d=s.indexOf("column"),h=s.length,l=e.trace_function_infos,c=l.length,p=this.#s=new Array(c/h);let u=0;for(let e=0;e0}}class a{functionName;scriptName;scriptId;line;column;totalCount;totalSize;totalLiveCount;totalLiveSize;#r;#u;constructor(e,t,s,n,i){this.functionName=e,this.scriptName=t,this.scriptId=s,this.line=n,this.column=i,this.totalCount=0,this.totalSize=0,this.totalLiveCount=0,this.totalLiveSize=0,this.#r=[]}addTraceTopNode(e){0!==e.allocationCount&&(this.#r.push(e),this.totalCount+=e.allocationCount,this.totalSize+=e.allocationSize,this.totalLiveCount+=e.liveCount,this.totalLiveSize+=e.liveSize)}bottomUpRoot(){return this.#r.length?(this.#u||this.#f(),this.#u):null}#f(){this.#u=new r(this);for(let e=0;e100||this.#A.push(e)}toString(){return this.#A.join("\n ")}}class T{nodes;containmentEdges;#D;#k;#j;strings;#H;#R;#P;rootNodeIndexInternal;#U;#M;#L;#B;#W;nodeTypeOffset;nodeNameOffset;nodeIdOffset;nodeSelfSizeOffset;#J;nodeTraceNodeIdOffset;nodeFieldCount;nodeTypes;nodeArrayType;nodeHiddenType;nodeObjectType;nodeNativeType;nodeConsStringType;nodeSlicedStringType;nodeCodeType;nodeSyntheticType;edgeFieldsCount;edgeTypeOffset;edgeNameOffset;edgeToNodeOffset;edgeTypes;edgeElementType;edgeHiddenType;edgeInternalType;edgeShortcutType;edgeWeakType;edgeInvisibleType;#Q;#$;#q;#G;#K;nodeCount;#V;retainedSizes;firstEdgeIndexes;retainingNodes;retainingEdges;firstRetainerIndex;nodeDistances;firstDominatedNodeIndex;dominatedNodes;dominatorsTree;#X;#Y;#Z;lazyStringCache;constructor(e,t){this.nodes=e.nodes,this.containmentEdges=e.edges,this.#D=e.snapshot.meta,this.#k=e.samples,this.#j=null,this.strings=e.strings,this.#H=e.locations,this.#R=t,this.#P=-5,this.rootNodeIndexInternal=0,e.snapshot.root_index&&(this.rootNodeIndexInternal=e.snapshot.root_index),this.#U={},this.#L={},this.#B={},this.#W=e}initialize(){const e=this.#D;this.nodeTypeOffset=e.node_fields.indexOf("type"),this.nodeNameOffset=e.node_fields.indexOf("name"),this.nodeIdOffset=e.node_fields.indexOf("id"),this.nodeSelfSizeOffset=e.node_fields.indexOf("self_size"),this.#J=e.node_fields.indexOf("edge_count"),this.nodeTraceNodeIdOffset=e.node_fields.indexOf("trace_node_id"),this.#Y=e.node_fields.indexOf("detachedness"),this.nodeFieldCount=e.node_fields.length,this.nodeTypes=e.node_types[this.nodeTypeOffset],this.nodeArrayType=this.nodeTypes.indexOf("array"),this.nodeHiddenType=this.nodeTypes.indexOf("hidden"),this.nodeObjectType=this.nodeTypes.indexOf("object"),this.nodeNativeType=this.nodeTypes.indexOf("native"),this.nodeConsStringType=this.nodeTypes.indexOf("concatenated string"),this.nodeSlicedStringType=this.nodeTypes.indexOf("sliced string"),this.nodeCodeType=this.nodeTypes.indexOf("code"),this.nodeSyntheticType=this.nodeTypes.indexOf("synthetic"),this.edgeFieldsCount=e.edge_fields.length,this.edgeTypeOffset=e.edge_fields.indexOf("type"),this.edgeNameOffset=e.edge_fields.indexOf("name_or_index"),this.edgeToNodeOffset=e.edge_fields.indexOf("to_node"),this.edgeTypes=e.edge_types[this.edgeTypeOffset],this.edgeTypes.push("invisible"),this.edgeElementType=this.edgeTypes.indexOf("element"),this.edgeHiddenType=this.edgeTypes.indexOf("hidden"),this.edgeInternalType=this.edgeTypes.indexOf("internal"),this.edgeShortcutType=this.edgeTypes.indexOf("shortcut"),this.edgeWeakType=this.edgeTypes.indexOf("weak"),this.edgeInvisibleType=this.edgeTypes.indexOf("invisible");const t=e.location_fields||[];this.#Q=t.indexOf("object_index"),this.#$=t.indexOf("script_id"),this.#q=t.indexOf("line"),this.#G=t.indexOf("column"),this.#K=t.length,this.nodeCount=this.nodes.length/this.nodeFieldCount,this.#V=this.containmentEdges.length/this.edgeFieldsCount,this.retainedSizes=new Float64Array(this.nodeCount),this.firstEdgeIndexes=new Uint32Array(this.nodeCount+1),this.retainingNodes=new Uint32Array(this.#V),this.retainingEdges=new Uint32Array(this.#V),this.firstRetainerIndex=new Uint32Array(this.nodeCount+1),this.nodeDistances=new Int32Array(this.nodeCount),this.firstDominatedNodeIndex=new Uint32Array(this.nodeCount+1),this.dominatedNodes=new Uint32Array(this.nodeCount-1),this.#R.updateStatus("Building edge indexes…"),this.buildEdgeIndexes(),this.#R.updateStatus("Building retainers…"),this.buildRetainers(),this.#R.updateStatus("Propagating DOM state…"),this.propagateDOMState(),this.#R.updateStatus("Calculating node flags…"),this.calculateFlags(),this.#R.updateStatus("Calculating distances…"),this.calculateDistances(),this.#R.updateStatus("Building postorder index…");const s=this.buildPostOrderIndex();if(this.#R.updateStatus("Building dominator tree…"),this.dominatorsTree=this.buildDominatorTree(s.postOrderIndex2NodeOrdinal,s.nodeOrdinal2PostOrderIndex),this.#R.updateStatus("Calculating retained sizes…"),this.calculateRetainedSizes(s.postOrderIndex2NodeOrdinal),this.#R.updateStatus("Building dominated nodes…"),this.buildDominatedNodes(),this.#R.updateStatus("Calculating statistics…"),this.calculateStatistics(),this.#R.updateStatus("Calculating samples…"),this.buildSamples(),this.#R.updateStatus("Building locations…"),this.buildLocationMap(),this.#R.updateStatus("Finished processing."),this.#W.snapshot.trace_function_count){this.#R.updateStatus("Building allocation statistics…");const e=this.nodes.length,t=this.nodeFieldCount,s=this.rootNode(),n={};for(let i=0;ie&&n<=t}}createAllocationStackFilter(e){if(!this.#X)throw new Error("No Allocation Profile provided");const t=this.#X.traceIds(e);if(!t.length)return;const s={};for(let e=0;e0?e.HeapSnapshotModel.baseSystemDistance:0,o[0]=this.rootNode().nodeIndex,r=1,this.bfs(o,r,n,t)}bfs(e,t,s,n){const i=this.edgeFieldsCount,o=this.nodeFieldCount,r=this.containmentEdges,a=this.firstEdgeIndexes,d=this.edgeToNodeOffset,h=this.edgeTypeOffset,l=this.nodeCount,c=this.edgeWeakType,p=this.#P;let u=0;const f=this.createEdge(0),g=this.createNode(0);for(;ul)throw new Error("BFS failed. Nodes to visit ("+t+") is more than nodes count ("+l+")")}buildAggregates(e){const t={},s={},n=[],i=this.nodes,o=i.length,r=this.nodeNativeType,a=this.nodeFieldCount,d=this.nodeSelfSizeOffset,h=this.nodeTypeOffset,l=this.rootNode(),c=this.nodeDistances;for(let p=0;p(t.nodeIndex=e,s.nodeIndex=n,t.id()=0;){const t=c[m],d=p[m];if(d1)break;const d=new y(`Heap snapshot: ${t-I} nodes are unreachable from the root. Following nodes have only weak retainers:`),N=this.rootNode();--I,m=0,c[0]=s,p[0]=r[s+1];for(let s=0;s=0;--p){if(0===N[p])continue;if(N[p]=0,x[p]===I)continue;S=e[p];const g=!u||u[S]&f;let T=m;const O=n[S],w=n[S+1];let C=!0;for(let e=O;e![e.edgeHiddenType,e.edgeInvisibleType,e.edgeWeakType].includes(t)),(t=>i(e,t,s)))};for(let e=0;ep.id()?(c.addedIndexes.push(r[d]),c.addedCount++,c.addedSize+=p.selfSize(),p.nodeIndex=r[++d]):(++a,p.nodeIndex=r[++d])}for(;as)throw new Error("Start position > end position: "+t+" > "+s);if(!this.iterationOrder)throw new Error("Iteration order undefined");if(s>this.iterationOrder.length&&(s=this.iterationOrder.length),this.#se=this.iterationOrder.length-this.#ne&&(this.#ne=this.iterationOrder.length-t)}let n=t;const i=s-t,o=new Array(i);for(let e=0;ec.name()?1:0:l.hasStringName()?-1:1;return e?n:-n}function g(e,t,s,n){l.edgeIndex=s,p.nodeIndex=l.nodeIndex();const i=p[e]();c.edgeIndex=n,u.nodeIndex=c.nodeIndex();const o=u[e](),r=io?1:0;return t?r:-r}if(!this.iterationOrder)throw new Error("Iteration order not defined");"!edgeName"===r?s.ArrayUtilities.sortRange(this.iterationOrder,(function(e,t){let s=f(d,e,t);return 0===s&&(s=g(a,h,e,t)),0===s?e-t:s}),t,n,i,o):"!edgeName"===a?s.ArrayUtilities.sortRange(this.iterationOrder,(function(e,t){let s=g(r,d,e,t);return 0===s&&(s=f(h,e,t)),0===s?e-t:s}),t,n,i,o):s.ArrayUtilities.sortRange(this.iterationOrder,(function(e,t){let s=g(r,d,e,t);return 0===s&&(s=g(a,h,e,t)),0===s?e-t:s}),t,n,i,o)}}class E extends w{snapshot;constructor(e,t){const s=new l(e);super(new x(s,t),s),this.snapshot=e}nodePosition(e){this.createIterationOrder();const t=this.snapshot.createNode();let s=0;if(!this.iterationOrder)throw new Error("Iteration order not defined");for(;so?n:0}return function(e,d){t.nodeIndex=e,s.nodeIndex=d;let h=a(n,o);return 0===h&&(h=a(i,r)),h||e-d}}sort(e,t,n,i,o){if(!this.iterationOrder)throw new Error("Iteration order not defined");s.ArrayUtilities.sortRange(this.iterationOrder,this.buildCompareFunction(e),t,n,i,o)}}class F extends T{nodeFlags;lazyStringCache;flags;#ie;constructor(e,t){super(e,t),this.nodeFlags={canBeQueried:1,detachedDOMTreeNode:2,pageObject:4},this.lazyStringCache={},this.initialize()}createNode(e){return new b(this,void 0===e?-1:e)}createEdge(e){return new z(this,e)}createRetainingEdge(e){return new _(this,e)}containmentEdgesFilter(){return e=>!e.isInvisible()}retainingEdgesFilter(){const e=this.containmentEdgesFilter();return function(t){return e(t)&&!t.node().isRoot()&&!t.isWeak()}}calculateFlags(){this.flags=new Uint32Array(this.nodeCount),this.markDetachedDOMTreeNodes(),this.markQueriableHeapObjects(),this.markPageOwnedNodes()}calculateDistances(){super.calculateDistances((function(e,t){if(e.isHidden())return"sloppy_function_map"!==t.name()||"system / NativeContext"!==e.rawName();if(e.isArray()){if("(map descriptors)"!==e.rawName())return!0;const s=parseInt(t.name(),10);return s<2||s%3!=1}return!0}))}isUserRoot(e){return e.isUserRoot()||e.isDocumentDOMTreesRoot()}userObjectsMapAndFlag(){return{map:this.flags,flag:this.nodeFlags.pageObject}}flagsOfNode(e){return this.flags[e.nodeIndex/this.nodeFieldCount]}markDetachedDOMTreeNodes(){const e=this.nodes,t=e.length,s=this.nodeFieldCount,n=this.nodeNativeType,i=this.nodeTypeOffset,o=this.nodeFlags.detachedDOMTreeNode,r=this.rootNode();for(let a=0,d=0;a=e.HeapSnapshotModel.baseSystemDistance){g+=n;continue}const x=s[m+i];I.nodeIndex=m,x===r?c+=n:x===a?p+=n:x===d||x===h||"string"===I.type()?u+=n:"Array"===I.name()&&(f+=this.calculateArraySize(I))}this.#ie=new e.HeapSnapshotModel.Statistics,this.#ie.total=this.totalSize,this.#ie.v8heap=this.totalSize-c,this.#ie.native=c,this.#ie.code=p,this.#ie.jsArrays=f,this.#ie.strings=u,this.#ie.system=g}calculateArraySize(e){let t=e.selfSize();const s=e.edgeIndexesStart(),n=e.edgeIndexesEnd(),i=this.containmentEdges,o=this.strings,r=this.edgeToNodeOffset,a=this.edgeTypeOffset,d=this.edgeNameOffset,h=this.edgeFieldsCount,l=this.edgeInternalType;for(let c=s;c"+e;case"element":return"["+e+"]";case"weak":return"[["+e+"]]";case"property":return-1===e.indexOf(" ")?"."+e:'["'+e+'"]';case"shortcut":return"string"==typeof e?-1===e.indexOf(" ")?"."+e:'["'+e+'"]':"["+e+"]";case"internal":case"hidden":case"invisible":return"{"+e+"}"}return"?"+e+"?"}hasStringNameInternal(){const e=this.rawType(),t=this.snapshot;return e!==t.edgeElementType&&e!==t.edgeHiddenType}nameInternal(){return this.hasStringNameInternal()?this.snapshot.strings[this.nameOrIndex()]:this.nameOrIndex()}nameOrIndex(){return this.edges[this.edgeIndex+this.snapshot.edgeNameOffset]}rawType(){return this.edges[this.edgeIndex+this.snapshot.edgeTypeOffset]}}class _ extends f{constructor(e,t){super(e,t)}clone(){const e=this.snapshot;return new _(e,this.retainerIndex())}isHidden(){return this.edge().isHidden()}isInternal(){return this.edge().isInternal()}isInvisible(){return this.edge().isInvisible()}isShortcut(){return this.edge().isShortcut()}isWeak(){return this.edge().isWeak()}}var v=Object.freeze({__proto__:null,HeapSnapshotEdge:h,HeapSnapshotNodeIndexProvider:l,HeapSnapshotEdgeIndexProvider:c,HeapSnapshotRetainerEdgeIndexProvider:p,HeapSnapshotEdgeIterator:u,HeapSnapshotRetainerEdge:f,HeapSnapshotRetainerEdgeIterator:g,HeapSnapshotNode:I,HeapSnapshotNodeIterator:m,HeapSnapshotIndexRangeIterator:x,HeapSnapshotFilteredIterator:N,HeapSnapshotProgress:S,HeapSnapshotProblemReport:y,HeapSnapshot:T,HeapSnapshotHeader:class{title;meta;node_count;edge_count;trace_function_count;root_index;constructor(){this.title="",this.meta=new O,this.node_count=0,this.edge_count=0,this.trace_function_count=0,this.root_index=0}},HeapSnapshotItemProvider:w,HeapSnapshotEdgesProvider:C,HeapSnapshotNodesProvider:E,JSHeapSnapshot:F,JSHeapSnapshotNode:b,JSHeapSnapshotEdge:z,JSHeapSnapshotRetainerEdge:_});var A=Object.freeze({__proto__:null,HeapSnapshotLoader:class{#R;#oe;#re;#ae;#de;#he;#le;#ce;#pe;constructor(e){this.#ue(),this.#R=new S(e),this.#oe="",this.#re=null,this.#ae=!1,this.#fe()}dispose(){this.#ue()}#ue(){this.#ce="",this.#de=void 0}close(){this.#ae=!0,this.#re&&this.#re("")}buildSnapshot(){this.#de=this.#de||{},this.#R.updateStatus("Processing snapshot…");const e=new F(this.#de,this.#R);return this.#ue(),e}#ge(){let e=0;const t="0".charCodeAt(0),s="9".charCodeAt(0),n="]".charCodeAt(0),i=this.#ce.length;for(;;){for(;en||n>s)break;o*=10,o+=n-t,++e}if(e===i)return this.#ce=this.#ce.slice(r),!0;if(!this.#he)throw new Error("Array not instantiated");this.#he[this.#le++]=o}}#Ie(){this.#R.updateStatus("Parsing strings…");const e=this.#ce.lastIndexOf("]");if(-1===e)throw new Error("Incomplete JSON");if(this.#ce=this.#ce.slice(0,e+1),!this.#de)throw new Error("No snapshot in parseStringsArray");this.#de.strings=JSON.parse(this.#ce)}write(e){this.#oe+=e,this.#re&&(this.#re(this.#oe),this.#re=null,this.#oe="")}#me(){return this.#ae?Promise.resolve(this.#oe):new Promise((e=>{this.#re=e}))}async#xe(e,t){for(;;){const s=this.#ce.indexOf(e,t||0);if(-1!==s)return s;t=this.#ce.length-e.length+1,this.#ce+=await this.#me()}}async#Ne(e,t,s){const n=await this.#xe(e),i=await this.#xe("[",n);for(this.#ce=this.#ce.slice(i+1),this.#he=s?new Uint32Array(s):[],this.#le=0;this.#ge();)s?this.#R.updateProgress(t,this.#le,this.#he.length):this.#R.updateStatus(t),this.#ce+=await this.#me();const o=this.#he;return this.#he=null,o}async#fe(){const e='"snapshot"',t=await this.#xe(e);if(-1===t)throw new Error("Snapshot token not found");this.#R.updateStatus("Loading snapshot info…");const s=this.#ce.slice(t+e.length+1);for(this.#pe=new n.TextUtils.BalancedJSONTokenizer((e=>{this.#ce=this.#pe.remainder(),this.#pe=null,this.#de=this.#de||{},this.#de.snapshot=JSON.parse(e)})),this.#pe.write(s);this.#pe;)this.#pe.write(await this.#me());this.#de=this.#de||{};const i=await this.#Ne('"nodes"',"Loading nodes… {PH1}%",this.#de.snapshot.meta.node_fields.length*this.#de.snapshot.node_count);this.#de.nodes=i;const o=await this.#Ne('"edges"',"Loading edges… {PH1}%",this.#de.snapshot.meta.edge_fields.length*this.#de.snapshot.edge_count);if(this.#de.edges=o,this.#de.snapshot.trace_function_count){const e=await this.#Ne('"trace_function_infos"',"Loading allocation traces… {PH1}%",this.#de.snapshot.meta.trace_function_info_fields.length*this.#de.snapshot.trace_function_count);this.#de.trace_function_infos=e;const t=await this.#xe(":"),s=await this.#xe('"',t),n=this.#ce.indexOf("["),i=this.#ce.lastIndexOf("]",s);this.#de.trace_tree=JSON.parse(this.#ce.substring(n,i+1)),this.#ce=this.#ce.slice(i+1)}if(this.#de.snapshot.meta.sample_fields){const e=await this.#Ne('"samples"',"Loading samples…");this.#de.samples=e}if(this.#de.snapshot.meta.location_fields){const e=await this.#Ne('"locations"',"Loading locations…");this.#de.locations=e}else this.#de.locations=[];this.#R.updateStatus("Loading strings…");const r=await this.#xe('"strings"'),a=await this.#xe("[",r);for(this.#ce=this.#ce.slice(a);!this.#ae;)this.#ce+=await this.#me();this.#Ie()}}});var D=Object.freeze({__proto__:null,HeapSnapshotWorkerDispatcher:class{#Se;#ye;#Te;constructor(e,t){this.#Se=[],this.#ye=e,this.#Te=t}#Oe(e){const t=e.split(".");let s=this.#ye;for(let e=0;e(await t()).ScreencastApp.ToolbarButtonProvider.instance(),order:1,location:e.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_LEFT,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),o.AppProvider.registerAppProvider({loadAppProvider:async()=>(await t()).ScreencastApp.ScreencastAppProvider.instance(),order:1,condition:void 0}),e.ContextMenu.registerItem({location:e.ContextMenu.ItemLocation.MAIN_MENU,order:10,actionId:"components.request-app-banner"}); diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/inspector_main/inspector_main-meta.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/inspector_main/inspector_main-meta.js deleted file mode 100644 index d41508b97..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/inspector_main/inspector_main-meta.js +++ /dev/null @@ -1 +0,0 @@ -import*as e from"../../core/common/common.js";import*as t from"../../core/i18n/i18n.js";import*as o from"../../core/root/root.js";import*as i from"../../ui/legacy/legacy.js";const n={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"},a=t.i18n.registerUIStrings("entrypoints/inspector_main/inspector_main-meta.ts",n),r=t.i18n.getLazilyComputedLocalizedString.bind(void 0,a);let s;async function c(){return s||(s=await import("./inspector_main.js")),s}i.ViewManager.registerViewExtension({location:"drawer-view",id:"rendering",title:r(n.rendering),commandPrompt:r(n.showRendering),persistence:"closeable",order:50,loadView:async()=>(await c()).RenderingOptions.RenderingOptionsView.instance(),tags:[r(n.paint),r(n.layout),r(n.fps),r(n.cssMediaType),r(n.cssMediaFeature),r(n.visionDeficiency),r(n.colorVisionDeficiency)]}),i.ActionRegistration.registerActionExtension({category:i.ActionRegistration.ActionCategory.NAVIGATION,actionId:"inspector_main.reload",loadActionDelegate:async()=>(await c()).InspectorMain.ReloadActionDelegate.instance(),iconClass:"refresh",title:r(n.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 c()).InspectorMain.ReloadActionDelegate.instance(),title:r(n.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:r(n.toggleCssPrefersColorSchemeMedia),loadActionDelegate:async()=>(await c()).RenderingOptions.ReloadActionDelegate.instance()}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.NETWORK,title:r(n.forceAdBlocking),settingName:"network.adBlockingEnabled",settingType:e.Settings.SettingType.BOOLEAN,storageType:e.Settings.SettingStorageType.Session,defaultValue:!1,options:[{value:!0,title:r(n.blockAds)},{value:!1,title:r(n.showAds)}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.GLOBAL,storageType:e.Settings.SettingStorageType.Synced,title:r(n.autoOpenDevTools),settingName:"autoAttachToCreatedPages",settingType:e.Settings.SettingType.BOOLEAN,order:2,defaultValue:!1,options:[{value:!0,title:r(n.autoOpenDevTools)},{value:!1,title:r(n.doNotAutoOpen)}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.APPEARANCE,storageType:e.Settings.SettingStorageType.Synced,title:r(n.disablePaused),settingName:"disablePausedStateOverlay",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1}),i.Toolbar.registerToolbarItem({loadItem:async()=>(await c()).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 c()).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:o.Runtime.ExperimentName.OUTERMOST_TARGET_SELECTOR}); diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/inspector_main/inspector_main.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/inspector_main/inspector_main.js deleted file mode 100644 index 698c37987..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/inspector_main/inspector_main.js +++ /dev/null @@ -1 +0,0 @@ -import*as e from"../../core/common/common.js";import*as t from"../../core/i18n/i18n.js";import*as a from"../../ui/legacy/legacy.js";import*as n from"../../core/host/host.js";import*as s from"../../core/root/root.js";import*as o from"../../core/sdk/sdk.js";import*as r from"../../panels/mobile_throttling/mobile_throttling.js";import*as i from"../../ui/components/icon_button/icon_button.js";import*as l from"../../ui/legacy/components/utils/utils.js";import*as c from"../../core/platform/platform.js";import*as d from"../../models/bindings/bindings.js";const g=new CSSStyleSheet;g.replaceSync(':host{padding:12px}[is="dt-checkbox"]{margin:0 0 10px;flex:none}.panel-section-separator{height:1px;margin-bottom:10px;background:var(--color-details-hairline);flex:none}.panel-section-separator:last-child{background:transparent}.chrome-select-label{margin-bottom:16px}\n/*# sourceURL=renderingOptions.css */\n');const h={paintFlashing:"Paint flashing",highlightsAreasOfThePageGreen:"Highlights areas of the page (green) that need to be repainted. May not be suitable for people prone to photosensitive epilepsy.",layoutShiftRegions:"Layout Shift Regions",highlightsAreasOfThePageBlueThat:"Highlights areas of the page (blue) that were shifted. May not be suitable for people prone to photosensitive epilepsy.",layerBorders:"Layer borders",showsLayerBordersOrangeoliveAnd:"Shows layer borders (orange/olive) and tiles (cyan).",frameRenderingStats:"Frame Rendering Stats",plotsFrameThroughputDropped:"Plots frame throughput, dropped frames distribution, and GPU memory.",scrollingPerformanceIssues:"Scrolling performance issues",highlightsElementsTealThatCan:"Highlights elements (teal) that can slow down scrolling, including touch & wheel event handlers and other main-thread scrolling situations.",highlightAdFrames:"Highlight ad frames",highlightsFramesRedDetectedToBe:"Highlights frames (red) detected to be ads.",coreWebVitals:"Core Web Vitals",showsAnOverlayWithCoreWebVitals:"Shows an overlay with Core Web Vitals.",disableLocalFonts:"Disable local fonts",disablesLocalSourcesInFontface:"Disables `local()` sources in `@font-face` rules. Requires a page reload to apply.",emulateAFocusedPage:"Emulate a focused page",emulatesAFocusedPage:"Emulates a focused page.",emulateAutoDarkMode:"Enable automatic dark mode",emulatesAutoDarkMode:"Enables automatic dark mode and sets `prefers-color-scheme` to `dark`.",forcesMediaTypeForTestingPrint:"Forces media type for testing print and screen styles",forcesCssPreferscolorschemeMedia:"Forces CSS `prefers-color-scheme` media feature",forcesCssPrefersreducedmotion:"Forces CSS `prefers-reduced-motion` media feature",forcesCssPreferscontrastMedia:"Forces CSS `prefers-contrast` media feature",forcesCssPrefersreduceddataMedia:"Forces CSS `prefers-reduced-data` media feature",forcesCssColorgamutMediaFeature:"Forces CSS `color-gamut` media feature",forcesVisionDeficiencyEmulation:"Forces vision deficiency emulation",disableAvifImageFormat:"Disable `AVIF` image format",requiresAPageReloadToApplyAnd:"Requires a page reload to apply and disables caching for image requests.",disableWebpImageFormat:"Disable `WebP` image format",forcesCssForcedColors:"Forces CSS forced-colors media feature"},u=t.i18n.registerUIStrings("entrypoints/inspector_main/RenderingOptions.ts",h),p=t.i18n.getLocalizedString.bind(void 0,u);let m,S;class f extends a.Widget.VBox{constructor(){super(!0),this.#e(p(h.paintFlashing),p(h.highlightsAreasOfThePageGreen),e.Settings.Settings.instance().moduleSetting("showPaintRects")),this.#e(p(h.layoutShiftRegions),p(h.highlightsAreasOfThePageBlueThat),e.Settings.Settings.instance().moduleSetting("showLayoutShiftRegions")),this.#e(p(h.layerBorders),p(h.showsLayerBordersOrangeoliveAnd),e.Settings.Settings.instance().moduleSetting("showDebugBorders")),this.#e(p(h.frameRenderingStats),p(h.plotsFrameThroughputDropped),e.Settings.Settings.instance().moduleSetting("showFPSCounter")),this.#e(p(h.scrollingPerformanceIssues),p(h.highlightsElementsTealThatCan),e.Settings.Settings.instance().moduleSetting("showScrollBottleneckRects")),this.#e(p(h.highlightAdFrames),p(h.highlightsFramesRedDetectedToBe),e.Settings.Settings.instance().moduleSetting("showAdHighlights")),this.#e(p(h.coreWebVitals),p(h.showsAnOverlayWithCoreWebVitals),e.Settings.Settings.instance().moduleSetting("showWebVitals")),this.#e(p(h.disableLocalFonts),p(h.disablesLocalSourcesInFontface),e.Settings.Settings.instance().moduleSetting("localFontsDisabled")),this.#e(p(h.emulateAFocusedPage),p(h.emulatesAFocusedPage),e.Settings.Settings.instance().moduleSetting("emulatePageFocus")),this.#e(p(h.emulateAutoDarkMode),p(h.emulatesAutoDarkMode),e.Settings.Settings.instance().moduleSetting("emulateAutoDarkMode")),this.contentElement.createChild("div").classList.add("panel-section-separator"),this.#t(p(h.forcesCssPreferscolorschemeMedia),e.Settings.Settings.instance().moduleSetting("emulatedCSSMediaFeaturePrefersColorScheme")),this.#t(p(h.forcesMediaTypeForTestingPrint),e.Settings.Settings.instance().moduleSetting("emulatedCSSMedia")),this.#t(p(h.forcesCssForcedColors),e.Settings.Settings.instance().moduleSetting("emulatedCSSMediaFeatureForcedColors")),(()=>{const e="(prefers-contrast)";return window.matchMedia(e).media===e})()&&this.#t(p(h.forcesCssPreferscontrastMedia),e.Settings.Settings.instance().moduleSetting("emulatedCSSMediaFeaturePrefersContrast")),this.#t(p(h.forcesCssPrefersreducedmotion),e.Settings.Settings.instance().moduleSetting("emulatedCSSMediaFeaturePrefersReducedMotion")),(()=>{const e="(prefers-reduced-data)";return window.matchMedia(e).media===e})()&&this.#t(p(h.forcesCssPrefersreduceddataMedia),e.Settings.Settings.instance().moduleSetting("emulatedCSSMediaFeaturePrefersReducedData")),this.#t(p(h.forcesCssColorgamutMediaFeature),e.Settings.Settings.instance().moduleSetting("emulatedCSSMediaFeatureColorGamut")),this.contentElement.createChild("div").classList.add("panel-section-separator"),this.#t(p(h.forcesVisionDeficiencyEmulation),e.Settings.Settings.instance().moduleSetting("emulatedVisionDeficiency")),this.contentElement.createChild("div").classList.add("panel-section-separator"),this.#e(p(h.disableAvifImageFormat),p(h.requiresAPageReloadToApplyAnd),e.Settings.Settings.instance().moduleSetting("avifFormatDisabled")),this.#e(p(h.disableWebpImageFormat),p(h.requiresAPageReloadToApplyAnd),e.Settings.Settings.instance().moduleSetting("webpFormatDisabled")),this.contentElement.createChild("div").classList.add("panel-section-separator")}static instance(e={forceNew:null}){const{forceNew:t}=e;return m&&!t||(m=new f),m}#a(e,t,n){const s=a.UIUtils.CheckboxLabel.create(e,!1,t);return a.SettingsUI.bindCheckbox(s.checkboxElement,n),s}#e(e,t,a){const n=this.#a(e,t,a);return this.contentElement.appendChild(n),n}#t(e,t){const n=a.SettingsUI.createControlForSetting(t,e);n&&this.contentElement.appendChild(n)}wasShown(){super.wasShown(),this.registerCSSFiles([g])}}class b{static instance(e={forceNew:null}){const{forceNew:t}=e;return S&&!t||(S=new b),S}handleAction(t,a){const n=e.Settings.Settings.instance().moduleSetting("emulatedCSSMediaFeaturePrefersColorScheme");if("rendering.toggle-prefers-color-scheme"===a){const e=["","light","dark"],t=e.findIndex((e=>e===n.get()||""));return n.set(e[(t+1)%3]),!0}return!1}}var T=Object.freeze({__proto__:null,RenderingOptionsView:f,ReloadActionDelegate:b});const C=new CSSStyleSheet;C.replaceSync(".node-icon{width:28px;height:26px;background-image:var(--image-file-nodeIcon);background-size:17px 17px;background-repeat:no-repeat;background-position:center;opacity:80%;cursor:auto}.node-icon:hover{opacity:100%}.node-icon.inactive{filter:grayscale(100%)}\n/*# sourceURL=nodeIcon.css */\n");const w={main:"Main",tab:"Tab",javascriptIsDisabled:"JavaScript is disabled",openDedicatedTools:"Open dedicated DevTools for `Node.js`"},F=t.i18n.registerUIStrings("entrypoints/inspector_main/InspectorMain.ts",w),y=t.i18n.getLocalizedString.bind(void 0,F);let I,v,M,P;class x{static instance(e={forceNew:null}){const{forceNew:t}=e;return I&&!t||(I=new x),I}async run(){let e=!0;await o.Connections.initMainConnection((async()=>{const t=s.Runtime.Runtime.queryParam("v8only")?o.Target.Type.Node:"tab"===s.Runtime.Runtime.queryParam("targetType")?o.Target.Type.Tab:o.Target.Type.Frame,a=t===o.Target.Type.Frame&&"sources"===s.Runtime.Runtime.queryParam("panel"),n=t===o.Target.Type.Frame?y(w.main):y(w.tab),r=o.TargetManager.TargetManager.instance().createTarget("main",n,t,null,void 0,a),i=o.TargetManager.TargetManager.instance();if(i.observeTargets({targetAdded:e=>{e===i.primaryPageTarget()&&e.setName(y(w.main))},targetRemoved:e=>{}}),e){if(e=!1,a){const e=r.model(o.DebuggerModel.DebuggerModel);e&&(e.isReadyToPause()||await e.once(o.DebuggerModel.Events.DebuggerIsReadyToPause),e.pause())}t!==o.Target.Type.Tab&&r.runtimeAgent().invoke_runIfWaitingForDebugger()}}),l.TargetDetachedDialog.TargetDetachedDialog.webSocketConnectionLost),new D,new L,new r.NetworkPanelIndicator.NetworkPanelIndicator,n.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(n.InspectorFrontendHostAPI.Events.ReloadInspectedPage,(({data:e})=>{o.ResourceTreeModel.ResourceTreeModel.reloadAllPages(e)}))}}e.Runnable.registerEarlyInitializationRunnable(x.instance);class A{static instance(e={forceNew:null}){const{forceNew:t}=e;return v&&!t||(v=new A),v}handleAction(e,t){switch(t){case"inspector_main.reload":return o.ResourceTreeModel.ResourceTreeModel.reloadAllPages(!1),!0;case"inspector_main.hard-reload":return o.ResourceTreeModel.ResourceTreeModel.reloadAllPages(!0),!0}return!1}}class k{static instance(e={forceNew:null}){const{forceNew:t}=e;return M&&!t||(M=new k),M}handleAction(e,t){const a=o.TargetManager.TargetManager.instance().primaryPageTarget();return!!a&&(a.pageAgent().invoke_bringToFront(),!0)}}class R{#n;#s;constructor(){const e=document.createElement("div"),t=a.Utils.createShadowRootWithCoreStyles(e,{cssFile:[C],delegatesFocus:void 0});this.#n=t.createChild("div","node-icon"),e.addEventListener("click",(()=>n.InspectorFrontendHost.InspectorFrontendHostInstance.openNodeFrontend()),!1),this.#s=new a.Toolbar.ToolbarItem(e),this.#s.setTitle(y(w.openDedicatedTools)),o.TargetManager.TargetManager.instance().addEventListener(o.TargetManager.Events.AvailableTargetsChanged,(e=>this.#o(e.data))),this.#s.setVisible(!1),this.#o([])}static instance(e={forceNew:null}){const{forceNew:t}=e;return P&&!t||(P=new R),P}#o(e){const t=Boolean(e.find((e=>"node"===e.type&&!e.attached)));this.#n.classList.toggle("inactive",!t),t&&this.#s.setVisible(!0)}item(){return this.#s}}class D{constructor(){function t(){let t=null;e.Settings.Settings.instance().moduleSetting("javaScriptDisabled").get()&&(t=new i.Icon.Icon,t.data={iconName:"warning-filled",color:"var(--icon-warning)",width:"14px",height:"14px"},a.Tooltip.Tooltip.install(t,y(w.javascriptIsDisabled))),a.InspectorView.InspectorView.instance().setPanelIcon("sources",t)}e.Settings.Settings.instance().moduleSetting("javaScriptDisabled").addChangeListener(t),t()}}class L{#r;#i;#l;constructor(){this.#r=e.Settings.Settings.instance().moduleSetting("autoAttachToCreatedPages"),this.#r.addChangeListener(this.#c,this),this.#c(),this.#i=e.Settings.Settings.instance().moduleSetting("network.adBlockingEnabled"),this.#i.addChangeListener(this.#o,this),this.#l=e.Settings.Settings.instance().moduleSetting("emulatePageFocus"),this.#l.addChangeListener(this.#o,this),o.TargetManager.TargetManager.instance().observeTargets(this)}#d(e){e.type()===o.Target.Type.Frame&&e.parentTarget()?.type()!==o.Target.Type.Frame&&(e.pageAgent().invoke_setAdBlockingEnabled({enabled:this.#i.get()}),e.emulationAgent().invoke_setFocusEmulationEnabled({enabled:this.#l.get()}))}#c(){n.InspectorFrontendHost.InspectorFrontendHostInstance.setOpenNewWindowForPopups(this.#r.get())}#o(){for(const e of o.TargetManager.TargetManager.instance().targets())this.#d(e)}targetAdded(e){this.#d(e)}targetRemoved(e){}}o.ChildTargetManager.ChildTargetManager.install();var E=Object.freeze({__proto__:null,InspectorMainImpl:x,ReloadActionDelegate:A,FocusDebuggeeActionDelegate:k,NodeIndicator:R,SourcesPanelIndicator:D,BackendSettingsSync:L});const N=new CSSStyleSheet;N.replaceSync(":host{padding:2px 1px 2px 2px;white-space:nowrap;display:flex;flex-direction:column;height:36px;justify-content:center;overflow-y:auto}.title{overflow:hidden;padding-left:8px;text-overflow:ellipsis;flex-grow:0}.subtitle{color:var(--color-text-secondary);margin-right:3px;overflow:hidden;padding-left:8px;text-overflow:ellipsis;flex-grow:0}:host(.highlighted) .subtitle{color:inherit}\n/*# sourceURL=outermostTargetSelector.css */\n");const _={targetNotSelected:"Page: Not selected",targetS:"Page: {PH1}"},U=t.i18n.registerUIStrings("entrypoints/inspector_main/OutermostTargetSelector.ts",_),j=t.i18n.getLocalizedString.bind(void 0,U);let B;class O{listItems;#g;#h;constructor(){this.listItems=new a.ListModel.ListModel,this.#g=new a.SoftDropDown.SoftDropDown(this.listItems,this),this.#g.setRowHeight(36),this.#h=new a.Toolbar.ToolbarItem(this.#g.element),this.#h.setTitle(j(_.targetNotSelected)),this.listItems.addEventListener(a.ListModel.Events.ItemsReplaced,(()=>this.#h.setEnabled(Boolean(this.listItems.length)))),this.#h.element.classList.add("toolbar-has-dropdown");const e=o.TargetManager.TargetManager.instance();e.addModelListener(o.ChildTargetManager.ChildTargetManager,o.ChildTargetManager.Events.TargetInfoChanged,this.#u,this),e.observeTargets(this),a.Context.Context.instance().addFlavorChangeListener(o.Target.Target,this.#p,this)}static instance(e={forceNew:null}){const{forceNew:t}=e;return B&&!t||(B=new O),B}item(){return this.#h}highlightedItemChanged(e,t,a,n){a&&a.classList.remove("highlighted"),n&&n.classList.add("highlighted")}titleFor(t){if(t===o.TargetManager.TargetManager.instance().primaryPageTarget())return"Main";const a=t.targetInfo()?.url;if(!a)return"";const n=e.ParsedURL.ParsedURL.fromString(a);return n?n.lastPathComponentWithFragment():""}targetAdded(e){e.outermostTarget()===e&&(this.listItems.insertWithComparator(e,this.#m()),this.#h.setVisible(this.listItems.length>1),e===a.Context.Context.instance().flavor(o.Target.Target)&&this.#g.selectItem(e))}targetRemoved(e){const t=this.listItems.indexOf(e);-1!==t&&(this.listItems.remove(t),this.#h.setVisible(this.listItems.length>1))}#m(){return(e,t)=>{const a=e.targetInfo(),n=t.targetInfo();return a&&n?!a.subtype?.length&&n.subtype?.length?-1:a.subtype?.length&&!n.subtype?.length?1:a.url.localeCompare(n.url):0}}#u(e){const t=o.TargetManager.TargetManager.instance().targetById(e.data.targetId);t&&t.outermostTarget()===t&&(this.targetRemoved(t),this.targetAdded(t))}#p({data:e}){this.#g.selectItem(e?.outermostTarget()||null)}createElementForItem(e){const t=document.createElement("div");t.classList.add("target");const n=a.Utils.createShadowRootWithCoreStyles(t,{cssFile:[N],delegatesFocus:void 0}),s=n.createChild("div","title");a.UIUtils.createTextChild(s,c.StringUtilities.trimEndWithMaxLength(this.titleFor(e),100));const o=n.createChild("div","subtitle");return a.UIUtils.createTextChild(o,this.#S(e)),t}#S(e){const t=e.targetInfo();if(!t)return"";const a=[],n=d.ResourceUtils.displayNameForURL(t.url);return n&&a.push(n),t.subtype&&a.push(t.subtype),a.join(" ")}isItemSelectable(e){return!0}itemSelected(e){const t=e?j(_.targetS,{PH1:this.titleFor(e)}):j(_.targetNotSelected);this.#h.setTitle(t),e&&e!==a.Context.Context.instance().flavor(o.Target.Target)?.outermostTarget()&&a.Context.Context.instance().setFlavor(o.Target.Target,e)}}var W=Object.freeze({__proto__:null,OutermostTargetSelector:O});export{E as InspectorMain,W as OutermostTargetSelector,T as RenderingOptions}; diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/js_app/js_app.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/js_app/js_app.js deleted file mode 100644 index 3dbc4de78..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/js_app/js_app.js +++ /dev/null @@ -1 +0,0 @@ -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}; diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/lighthouse_worker/lighthouse_worker.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/lighthouse_worker/lighthouse_worker.js deleted file mode 100644 index b50bb8a5b..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/lighthouse_worker/lighthouse_worker.js +++ /dev/null @@ -1 +0,0 @@ -import*as e from"../../core/root/root.js";import*as s from"../../services/puppeteer/puppeteer.js";import"../../third_party/lighthouse/lighthouse-dt-bundle.js";class t{sessionId;onMessage;onDisconnect;constructor(e){this.sessionId=e,this.onMessage=null,this.onDisconnect=null}setOnMessage(e){this.onMessage=e}setOnDisconnect(e){this.onDisconnect=e}getOnDisconnect(){return this.onDisconnect}getSessionId(){return this.sessionId}sendRawMessage(e){r("sendProtocolMessage",{message:e})}async disconnect(){this.onDisconnect?.("force disconnect"),this.onDisconnect=null,this.onMessage=null}}const n=new class{onMessage;onClose;on(e,s){"message"===e?this.onMessage=s:"close"===e&&(this.onClose=s)}send(e){r("sendProtocolMessage",{message:e})}close(){}};let o,a;async function i(i,c){let l;e.Runtime.Runtime.queryParam("isUnderTest")&&(console.log=()=>{},c.flags.maxWaitForLoad=2e3),self.listenForStatus((e=>{r("statusUpdate",{message:e[1]})}));try{if("endTimespan"===i){if(!a)throw new Error("Cannot end a timespan before starting one");const e=await a();return a=void 0,e}const r=await async function(s){const t=self.lookupLocale(s);if("en-US"===t||"en"===t)return;try{const s=e.Runtime.getRemoteBase();let n;n=s&&s.base?`${s.base}third_party/lighthouse/locales/${t}.json`:new URL(`../../third_party/lighthouse/locales/${t}.json`,import.meta.url).toString();const o=new Promise(((e,s)=>setTimeout((()=>s(new Error("timed out fetching locale"))),5e3))),a=await Promise.race([o,fetch(n).then((e=>e.json()))]);return self.registerLocaleData(t,a),t}catch(e){console.error(e)}return}(c.locales),g=c.flags;g.logLevel=g.logLevel||"info",g.channel="devtools",g.locale=r,"startTimespan"!==i&&"snapshot"!==i||(c.categoryIDs=c.categoryIDs.filter((e=>"lighthouse-plugin-publisher-ads"!==e)));const u=c.config||self.createConfig(c.categoryIDs,g.formFactor),f=c.url;if("navigation"===i&&g.legacyNavigation){const e=self.setUpWorkerConnection(n);return await self.runLighthouse(f,g,u,e)}const{mainFrameId:p,mainTargetId:h,mainSessionId:m,targetInfos:d}=c;o=new t(m),l=await s.PuppeteerConnection.PuppeteerConnectionHelper.connectPuppeteerToConnection({connection:o,mainFrameId:p,targetInfos:d,targetFilterCallback:e=>!e.url.startsWith("https://i0.devtools-frontend")&&!e.url.startsWith("devtools://")&&(e.targetId===h||e.openerId===h||"iframe"===e.type),isPageTargetCallback:e=>"page"===e.type});const{page:b}=l,w={logLevel:g.logLevel,settingsOverrides:g};if("snapshot"===i)return await self.runLighthouseSnapshot({config:u,page:b,configContext:w,flags:g});if("startTimespan"===i){const e=await self.startLighthouseTimespan({config:u,page:b,configContext:w,flags:g});return void(a=e.endTimespan)}return await self.runLighthouseNavigation(f,{config:u,page:b,configContext:w,flags:g})}catch(e){return{fatal:!0,message:e.message,stack:e.stack}}finally{"startTimespan"!==i&&l?.browser.disconnect()}}function r(e,s){self.postMessage({action:e,args:s})}self.onmessage=async function(e){const s=e.data;switch(s.action){case"startTimespan":case"endTimespan":case"snapshot":case"navigation":{const e=await i(s.action,s.args);e&&"object"==typeof e&&("report"in e&&delete e.report,"artifacts"in e&&(e.artifacts.Timing=JSON.parse(JSON.stringify(e.artifacts.Timing)))),self.postMessage({id:s.id,result:e});break}case"dispatchProtocolMessage":o?.onMessage?.(s.args.message),n.onMessage?.(JSON.stringify(s.args.message));break;default:throw new Error(`Unknown event: ${e.data}`)}},globalThis.global=self,globalThis.global.isVinn=!0,globalThis.global.document={},globalThis.global.document.documentElement={},globalThis.global.document.documentElement.style={WebkitAppearance:"WebkitAppearance"},self.postMessage("workerReady"); diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/main/main-legacy.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/main/main-legacy.js deleted file mode 100644 index 66d00482c..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/main/main-legacy.js +++ /dev/null @@ -1 +0,0 @@ -import*as e from"./main.js";self.Main=self.Main||{},Main=Main||{},Main.ExecutionContextSelector=e.ExecutionContextSelector.ExecutionContextSelector,Main.Main=e.MainImpl.MainImpl,Main.Main.ZoomActionDelegate=e.MainImpl.ZoomActionDelegate,Main.Main.SearchActionDelegate=e.MainImpl.SearchActionDelegate,Main.Main.MainMenuItem=e.MainImpl.MainMenuItem,Main.Main.SettingsButtonProvider=e.MainImpl.SettingsButtonProvider,Main.ReloadActionDelegate=e.MainImpl.ReloadActionDelegate,Main.SimpleApp=e.SimpleApp.SimpleApp,Main.SimpleAppProvider=e.SimpleApp.SimpleAppProvider; diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/main/main-meta.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/main/main-meta.js deleted file mode 100644 index 7d77ebde8..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/main/main-meta.js +++ /dev/null @@ -1 +0,0 @@ -import*as t from"../../core/common/common.js";import*as e from"../../core/root/root.js";import*as o from"../../core/sdk/sdk.js";import*as i from"../../models/workspace/workspace.js";import*as a from"../../ui/legacy/components/utils/utils.js";import*as n from"../../ui/legacy/legacy.js";import*as r from"../../core/i18n/i18n.js";const s={focusDebuggee:"Focus debuggee",toggleDrawer:"Toggle drawer",nextPanel:"Next panel",previousPanel:"Previous panel",reloadDevtools:"Reload DevTools",restoreLastDockPosition:"Restore last dock position",zoomIn:"Zoom in",zoomOut:"Zoom out",resetZoomLevel:"Reset zoom level",searchInPanel:"Search in panel",cancelSearch:"Cancel search",findNextResult:"Find next result",findPreviousResult:"Find previous result",theme:"Theme:",switchToSystemPreferredColor:"Switch to system preferred color theme",systemPreference:"System preference",switchToLightTheme:"Switch to light theme",lightCapital:"Light",switchToDarkTheme:"Switch to dark theme",darkCapital:"Dark",darkLower:"dark",lightLower:"light",panelLayout:"Panel layout:",useHorizontalPanelLayout:"Use horizontal panel layout",horizontal:"horizontal",useVerticalPanelLayout:"Use vertical panel layout",vertical:"vertical",useAutomaticPanelLayout:"Use automatic panel layout",auto:"auto",colorFormat:"Color format:",setColorFormatAsAuthored:"Set color format as authored",asAuthored:"As authored",setColorFormatToHex:"Set color format to HEX",setColorFormatToRgb:"Set color format to RGB",setColorFormatToHsl:"Set color format to HSL",enableCtrlShortcutToSwitchPanels:"Enable Ctrl + 1-9 shortcut to switch panels",enableShortcutToSwitchPanels:"Enable ⌘ + 1-9 shortcut to switch panels",right:"Right",dockToRight:"Dock to right",bottom:"Bottom",dockToBottom:"Dock to bottom",left:"Left",dockToLeft:"Dock to left",undocked:"Undocked",undockIntoSeparateWindow:"Undock into separate window",devtoolsDefault:"DevTools (Default)",language:"Language:",browserLanguage:"Browser UI language",enableSync:"Enable settings sync",colorFormatSettingDisabled:"This setting is deprecated because it is incompatible with modern color spaces. To re-enable it, disable the corresponding experiment.",searchAsYouTypeSetting:"Search as you type",searchAsYouTypeCommand:"Enable search as you type",searchOnEnterCommand:"Disable search as you type (press Enter to search)"},l=r.i18n.registerUIStrings("entrypoints/main/main-meta.ts",s),c=r.i18n.getLazilyComputedLocalizedString.bind(void 0,l);let g,d;async function u(){return g||(g=await import("./main.js")),g}function m(t){return()=>r.i18n.getLocalizedLanguageRegion(t,r.DevToolsLocale.DevToolsLocale.instance())}n.ActionRegistration.registerActionExtension({category:n.ActionRegistration.ActionCategory.DRAWER,actionId:"inspector_main.focus-debuggee",loadActionDelegate:async()=>(await async function(){return d||(d=await import("../inspector_main/inspector_main.js")),d}()).InspectorMain.FocusDebuggeeActionDelegate.instance(),order:100,title:c(s.focusDebuggee)}),n.ActionRegistration.registerActionExtension({category:n.ActionRegistration.ActionCategory.DRAWER,actionId:"main.toggle-drawer",loadActionDelegate:async()=>n.InspectorView.ActionDelegate.instance(),order:101,title:c(s.toggleDrawer),bindings:[{shortcut:"Esc"}]}),n.ActionRegistration.registerActionExtension({actionId:"main.next-tab",category:n.ActionRegistration.ActionCategory.GLOBAL,title:c(s.nextPanel),loadActionDelegate:async()=>n.InspectorView.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+]"},{platform:"mac",shortcut:"Meta+]"}]}),n.ActionRegistration.registerActionExtension({actionId:"main.previous-tab",category:n.ActionRegistration.ActionCategory.GLOBAL,title:c(s.previousPanel),loadActionDelegate:async()=>n.InspectorView.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+["},{platform:"mac",shortcut:"Meta+["}]}),n.ActionRegistration.registerActionExtension({actionId:"main.debug-reload",category:n.ActionRegistration.ActionCategory.GLOBAL,title:c(s.reloadDevtools),loadActionDelegate:async()=>(await u()).MainImpl.ReloadActionDelegate.instance(),bindings:[{shortcut:"Alt+R"}]}),n.ActionRegistration.registerActionExtension({category:n.ActionRegistration.ActionCategory.GLOBAL,title:c(s.restoreLastDockPosition),actionId:"main.toggle-dock",loadActionDelegate:async()=>n.DockController.ToggleDockActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+D"},{platform:"mac",shortcut:"Meta+Shift+D"}]}),n.ActionRegistration.registerActionExtension({actionId:"main.zoom-in",category:n.ActionRegistration.ActionCategory.GLOBAL,title:c(s.zoomIn),loadActionDelegate:async()=>(await u()).MainImpl.ZoomActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Plus",keybindSets:["devToolsDefault","vsCode"]},{platform:"windows,linux",shortcut:"Ctrl+Shift+Plus"},{platform:"windows,linux",shortcut:"Ctrl+NumpadPlus"},{platform:"windows,linux",shortcut:"Ctrl+Shift+NumpadPlus"},{platform:"mac",shortcut:"Meta+Plus",keybindSets:["devToolsDefault","vsCode"]},{platform:"mac",shortcut:"Meta+Shift+Plus"},{platform:"mac",shortcut:"Meta+NumpadPlus"},{platform:"mac",shortcut:"Meta+Shift+NumpadPlus"}]}),n.ActionRegistration.registerActionExtension({actionId:"main.zoom-out",category:n.ActionRegistration.ActionCategory.GLOBAL,title:c(s.zoomOut),loadActionDelegate:async()=>(await u()).MainImpl.ZoomActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Minus",keybindSets:["devToolsDefault","vsCode"]},{platform:"windows,linux",shortcut:"Ctrl+Shift+Minus"},{platform:"windows,linux",shortcut:"Ctrl+NumpadMinus"},{platform:"windows,linux",shortcut:"Ctrl+Shift+NumpadMinus"},{platform:"mac",shortcut:"Meta+Minus",keybindSets:["devToolsDefault","vsCode"]},{platform:"mac",shortcut:"Meta+Shift+Minus"},{platform:"mac",shortcut:"Meta+NumpadMinus"},{platform:"mac",shortcut:"Meta+Shift+NumpadMinus"}]}),n.ActionRegistration.registerActionExtension({actionId:"main.zoom-reset",category:n.ActionRegistration.ActionCategory.GLOBAL,title:c(s.resetZoomLevel),loadActionDelegate:async()=>(await u()).MainImpl.ZoomActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+0"},{platform:"windows,linux",shortcut:"Ctrl+Numpad0"},{platform:"mac",shortcut:"Meta+Numpad0"},{platform:"mac",shortcut:"Meta+0"}]}),n.ActionRegistration.registerActionExtension({actionId:"main.search-in-panel.find",category:n.ActionRegistration.ActionCategory.GLOBAL,title:c(s.searchInPanel),loadActionDelegate:async()=>(await u()).MainImpl.SearchActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+F",keybindSets:["devToolsDefault","vsCode"]},{platform:"mac",shortcut:"Meta+F",keybindSets:["devToolsDefault","vsCode"]},{platform:"mac",shortcut:"F3"}]}),n.ActionRegistration.registerActionExtension({actionId:"main.search-in-panel.cancel",category:n.ActionRegistration.ActionCategory.GLOBAL,title:c(s.cancelSearch),loadActionDelegate:async()=>(await u()).MainImpl.SearchActionDelegate.instance(),order:10,bindings:[{shortcut:"Esc"}]}),n.ActionRegistration.registerActionExtension({actionId:"main.search-in-panel.find-next",category:n.ActionRegistration.ActionCategory.GLOBAL,title:c(s.findNextResult),loadActionDelegate:async()=>(await u()).MainImpl.SearchActionDelegate.instance(),bindings:[{platform:"mac",shortcut:"Meta+G",keybindSets:["devToolsDefault","vsCode"]},{platform:"windows,linux",shortcut:"Ctrl+G"},{platform:"windows,linux",shortcut:"F3",keybindSets:["devToolsDefault","vsCode"]}]}),n.ActionRegistration.registerActionExtension({actionId:"main.search-in-panel.find-previous",category:n.ActionRegistration.ActionCategory.GLOBAL,title:c(s.findPreviousResult),loadActionDelegate:async()=>(await u()).MainImpl.SearchActionDelegate.instance(),bindings:[{platform:"mac",shortcut:"Meta+Shift+G",keybindSets:["devToolsDefault","vsCode"]},{platform:"windows,linux",shortcut:"Ctrl+Shift+G"},{platform:"windows,linux",shortcut:"Shift+F3",keybindSets:["devToolsDefault","vsCode"]}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.APPEARANCE,storageType:t.Settings.SettingStorageType.Synced,title:c(s.theme),settingName:"uiTheme",settingType:t.Settings.SettingType.ENUM,defaultValue:"systemPreferred",reloadRequired:!1,options:[{title:c(s.switchToSystemPreferredColor),text:c(s.systemPreference),value:"systemPreferred"},{title:c(s.switchToLightTheme),text:c(s.lightCapital),value:"default"},{title:c(s.switchToDarkTheme),text:c(s.darkCapital),value:"dark"}],tags:[c(s.darkLower),c(s.lightLower)]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.APPEARANCE,storageType:t.Settings.SettingStorageType.Synced,title:c(s.panelLayout),settingName:"sidebarPosition",settingType:t.Settings.SettingType.ENUM,defaultValue:"auto",options:[{title:c(s.useHorizontalPanelLayout),text:c(s.horizontal),value:"bottom"},{title:c(s.useVerticalPanelLayout),text:c(s.vertical),value:"right"},{title:c(s.useAutomaticPanelLayout),text:c(s.auto),value:"auto"}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.APPEARANCE,storageType:t.Settings.SettingStorageType.Synced,title:c(s.colorFormat),settingName:"colorFormat",settingType:t.Settings.SettingType.ENUM,defaultValue:"original",options:[{title:c(s.setColorFormatAsAuthored),text:c(s.asAuthored),value:"original"},{title:c(s.setColorFormatToHex),text:"HEX: #dac0de",value:"hex",raw:!0},{title:c(s.setColorFormatToRgb),text:"RGB: rgb(128 255 255)",value:"rgb",raw:!0},{title:c(s.setColorFormatToHsl),text:"HSL: hsl(300deg 80% 90%)",value:"hsl",raw:!0}],deprecationNotice:{disabled:!0,warning:c(s.colorFormatSettingDisabled),experiment:e.Runtime.ExperimentName.DISABLE_COLOR_FORMAT_SETTING}}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.APPEARANCE,storageType:t.Settings.SettingStorageType.Synced,settingName:"language",settingType:t.Settings.SettingType.ENUM,title:c(s.language),defaultValue:"en-US",options:[{value:"browserLanguage",title:c(s.browserLanguage),text:c(s.browserLanguage)},...r.i18n.getAllSupportedDevToolsLocales().sort().map((t=>{return{value:e=t,title:m(e),text:m(e)};var e}))],reloadRequired:!0}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.APPEARANCE,storageType:t.Settings.SettingStorageType.Synced,title:c(s.enableCtrlShortcutToSwitchPanels),titleMac:c(s.enableShortcutToSwitchPanels),settingName:"shortcutPanelSwitch",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!1}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.GLOBAL,settingName:"currentDockState",settingType:t.Settings.SettingType.ENUM,defaultValue:"right",options:[{value:"right",text:c(s.right),title:c(s.dockToRight)},{value:"bottom",text:c(s.bottom),title:c(s.dockToBottom)},{value:"left",text:c(s.left),title:c(s.dockToLeft)},{value:"undocked",text:c(s.undocked),title:c(s.undockIntoSeparateWindow)}]}),t.Settings.registerSettingExtension({storageType:t.Settings.SettingStorageType.Synced,settingName:"activeKeybindSet",settingType:t.Settings.SettingType.ENUM,defaultValue:"devToolsDefault",options:[{value:"devToolsDefault",title:c(s.devtoolsDefault),text:c(s.devtoolsDefault)},{value:"vsCode",title:r.i18n.lockedLazyString("Visual Studio Code"),text:r.i18n.lockedLazyString("Visual Studio Code")}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.SYNC,settingName:"sync_preferences",settingType:t.Settings.SettingType.BOOLEAN,title:c(s.enableSync),defaultValue:!1,reloadRequired:!0}),t.Settings.registerSettingExtension({storageType:t.Settings.SettingStorageType.Synced,settingName:"userShortcuts",settingType:t.Settings.SettingType.ARRAY,defaultValue:[]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.GLOBAL,storageType:t.Settings.SettingStorageType.Local,title:c(s.searchAsYouTypeSetting),settingName:"searchAsYouType",settingType:t.Settings.SettingType.BOOLEAN,order:3,defaultValue:!0,options:[{value:!0,title:c(s.searchAsYouTypeCommand)},{value:!1,title:c(s.searchOnEnterCommand)}]}),n.ViewManager.registerLocationResolver({name:"drawer-view",category:n.ViewManager.ViewLocationCategory.DRAWER,loadResolver:async()=>n.InspectorView.InspectorView.instance()}),n.ViewManager.registerLocationResolver({name:"drawer-sidebar",category:n.ViewManager.ViewLocationCategory.DRAWER_SIDEBAR,loadResolver:async()=>n.InspectorView.InspectorView.instance()}),n.ViewManager.registerLocationResolver({name:"panel",category:n.ViewManager.ViewLocationCategory.PANEL,loadResolver:async()=>n.InspectorView.InspectorView.instance()}),n.ContextMenu.registerProvider({contextTypes:()=>[i.UISourceCode.UISourceCode,o.Resource.Resource,o.NetworkRequest.NetworkRequest],loadProvider:async()=>a.Linkifier.ContentProviderContextMenuProvider.instance(),experiment:void 0}),n.ContextMenu.registerProvider({contextTypes:()=>[Node],loadProvider:async()=>n.XLink.ContextMenuProvider.instance(),experiment:void 0}),n.ContextMenu.registerProvider({contextTypes:()=>[Node],loadProvider:async()=>a.Linkifier.LinkContextMenuProvider.instance(),experiment:void 0}),n.Toolbar.registerToolbarItem({separator:!0,location:n.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_LEFT,order:100,showLabel:void 0,actionId:void 0,condition:void 0,loadItem:void 0}),n.Toolbar.registerToolbarItem({separator:!0,order:97,location:n.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_RIGHT,showLabel:void 0,actionId:void 0,condition:void 0,loadItem:void 0}),n.Toolbar.registerToolbarItem({loadItem:async()=>(await u()).MainImpl.SettingsButtonProvider.instance(),order:99,location:n.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_RIGHT,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),n.Toolbar.registerToolbarItem({loadItem:async()=>(await u()).MainImpl.MainMenuItem.instance(),order:100,location:n.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_RIGHT,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),n.Toolbar.registerToolbarItem({loadItem:async()=>n.DockController.CloseButtonProvider.instance(),order:101,location:n.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_RIGHT,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),t.AppProvider.registerAppProvider({loadAppProvider:async()=>(await u()).SimpleApp.SimpleAppProvider.instance(),order:10,condition:void 0}); diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/main/main.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/main/main.js deleted file mode 100644 index f2ee82b87..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/main/main.js +++ /dev/null @@ -1 +0,0 @@ -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{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 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}; diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/ndb_app/ndb_app.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/ndb_app/ndb_app.js deleted file mode 100644 index 627d0af79..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/ndb_app/ndb_app.js +++ /dev/null @@ -1 +0,0 @@ -import"../shell/shell.js";import*as m from"../main/main.js";new m.MainImpl.MainImpl; diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/node_app/node_app.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/node_app/node_app.js deleted file mode 100644 index 6e78a03e4..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/node_app/node_app.js +++ /dev/null @@ -1 +0,0 @@ -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; diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/rn_inspector/rn_inspector.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/rn_inspector/rn_inspector.js deleted file mode 100644 index bb0bb42f6..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/rn_inspector/rn_inspector.js +++ /dev/null @@ -1 +0,0 @@ -import"../shell/shell.js";import*as e from"../../core/common/common.js";import*as t from"../../core/root/root.js";import*as o from"../../ui/legacy/legacy.js";import*as i from"../../core/i18n/i18n.js";import*as n from"../../models/issues_manager/issues_manager.js";import*as a from"../../core/sdk/sdk.js";import*as r from"../../models/workspace/workspace.js";import*as s from"../../panels/network/forward/forward.js";import*as l from"../main/main.js";const c={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"},g=i.i18n.registerUIStrings("panels/emulation/emulation-meta.ts",c),d=i.i18n.getLazilyComputedLocalizedString.bind(void 0,g);let u;async function m(){return u||(u=await import("../../panels/emulation/emulation.js")),u}o.ActionRegistration.registerActionExtension({category:o.ActionRegistration.ActionCategory.MOBILE,actionId:"emulation.toggle-device-mode",toggleable:!0,loadActionDelegate:async()=>(await m()).DeviceModeWrapper.ActionDelegate.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,title:d(c.toggleDeviceToolbar),iconClass:"devices",bindings:[{platform:"windows,linux",shortcut:"Shift+Ctrl+M"},{platform:"mac",shortcut:"Shift+Meta+M"}]}),o.ActionRegistration.registerActionExtension({actionId:"emulation.capture-screenshot",category:o.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await m()).DeviceModeWrapper.ActionDelegate.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,title:d(c.captureScreenshot)}),o.ActionRegistration.registerActionExtension({actionId:"emulation.capture-full-height-screenshot",category:o.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await m()).DeviceModeWrapper.ActionDelegate.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,title:d(c.captureFullSizeScreenshot)}),o.ActionRegistration.registerActionExtension({actionId:"emulation.capture-node-screenshot",category:o.ActionRegistration.ActionCategory.SCREENSHOT,loadActionDelegate:async()=>(await m()).DeviceModeWrapper.ActionDelegate.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,title:d(c.captureNodeScreenshot)}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.MOBILE,settingName:"showMediaQueryInspector",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:d(c.showMediaQueries)},{value:!1,title:d(c.hideMediaQueries)}],tags:[d(c.device)]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.MOBILE,settingName:"emulation.showRulers",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:d(c.showRulers)},{value:!1,title:d(c.hideRulers)}],tags:[d(c.device)]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.MOBILE,settingName:"emulation.showDeviceOutline",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:d(c.showDeviceFrame)},{value:!1,title:d(c.hideDeviceFrame)}],tags:[d(c.device)]}),o.Toolbar.registerToolbarItem({actionId:"emulation.toggle-device-mode",condition:t.Runtime.ConditionName.CAN_DOCK,location:o.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_LEFT,order:1,showLabel:void 0,loadItem:void 0,separator:void 0}),e.AppProvider.registerAppProvider({loadAppProvider:async()=>(await m()).AdvancedApp.AdvancedAppProvider.instance(),condition:t.Runtime.ConditionName.CAN_DOCK,order:0}),o.ContextMenu.registerItem({location:o.ContextMenu.ItemLocation.DEVICE_MODE_MENU_SAVE,order:12,actionId:"emulation.capture-screenshot"}),o.ContextMenu.registerItem({location:o.ContextMenu.ItemLocation.DEVICE_MODE_MENU_SAVE,order:13,actionId:"emulation.capture-full-height-screenshot"});const p={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"},w=i.i18n.registerUIStrings("panels/sensors/sensors-meta.ts",p),S=i.i18n.getLazilyComputedLocalizedString.bind(void 0,w);let y;async function R(){return y||(y=await import("../../panels/sensors/sensors.js")),y}o.ViewManager.registerViewExtension({location:"drawer-view",commandPrompt:S(p.showSensors),title:S(p.sensors),id:"sensors",persistence:"closeable",order:100,loadView:async()=>(await R()).SensorsView.SensorsView.instance(),tags:[S(p.geolocation),S(p.timezones),S(p.locale),S(p.locales),S(p.accelerometer),S(p.deviceOrientation)]}),o.ViewManager.registerViewExtension({location:"settings-view",id:"emulation-locations",commandPrompt:S(p.showLocations),title:S(p.locations),order:40,loadView:async()=>(await R()).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:S(p.touch),reloadRequired:!0,settingName:"emulation.touch",settingType:e.Settings.SettingType.ENUM,defaultValue:"none",options:[{value:"none",title:S(p.devicebased),text:S(p.devicebased)},{value:"force",title:S(p.forceEnabled),text:S(p.forceEnabled)}]}),e.Settings.registerSettingExtension({title:S(p.emulateIdleDetectorState),settingName:"emulation.idleDetection",settingType:e.Settings.SettingType.ENUM,defaultValue:"none",options:[{value:"none",title:S(p.noIdleEmulation),text:S(p.noIdleEmulation)},{value:'{"isUserActive":true,"isScreenUnlocked":true}',title:S(p.userActiveScreenUnlocked),text:S(p.userActiveScreenUnlocked)},{value:'{"isUserActive":true,"isScreenUnlocked":false}',title:S(p.userActiveScreenLocked),text:S(p.userActiveScreenLocked)},{value:'{"isUserActive":false,"isScreenUnlocked":true}',title:S(p.userIdleScreenUnlocked),text:S(p.userIdleScreenUnlocked)},{value:'{"isUserActive":false,"isScreenUnlocked":false}',title:S(p.userIdleScreenLocked),text:S(p.userIdleScreenLocked)}]});const A={developerResources:"Developer Resources",showDeveloperResources:"Show Developer Resources"},h=i.i18n.registerUIStrings("panels/developer_resources/developer_resources-meta.ts",A),v=i.i18n.getLazilyComputedLocalizedString.bind(void 0,h);let E;o.ViewManager.registerViewExtension({location:"drawer-view",id:"resource-loading-pane",title:v(A.developerResources),commandPrompt:v(A.showDeveloperResources),order:100,persistence:"closeable",experiment:t.Runtime.ExperimentName.DEVELOPER_RESOURCES_VIEW,loadView:async()=>new((await async function(){return E||(E=await import("../../panels/developer_resources/developer_resources.js")),E}()).DeveloperResourcesView.DeveloperResourcesView)});const T={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"},N=i.i18n.registerUIStrings("entrypoints/inspector_main/inspector_main-meta.ts",T),f=i.i18n.getLazilyComputedLocalizedString.bind(void 0,N);let C;async function k(){return C||(C=await import("../inspector_main/inspector_main.js")),C}o.ViewManager.registerViewExtension({location:"drawer-view",id:"rendering",title:f(T.rendering),commandPrompt:f(T.showRendering),persistence:"closeable",order:50,loadView:async()=>(await k()).RenderingOptions.RenderingOptionsView.instance(),tags:[f(T.paint),f(T.layout),f(T.fps),f(T.cssMediaType),f(T.cssMediaFeature),f(T.visionDeficiency),f(T.colorVisionDeficiency)]}),o.ActionRegistration.registerActionExtension({category:o.ActionRegistration.ActionCategory.NAVIGATION,actionId:"inspector_main.reload",loadActionDelegate:async()=>(await k()).InspectorMain.ReloadActionDelegate.instance(),iconClass:"refresh",title:f(T.reloadPage),bindings:[{platform:"windows,linux",shortcut:"Ctrl+R"},{platform:"windows,linux",shortcut:"F5"},{platform:"mac",shortcut:"Meta+R"}]}),o.ActionRegistration.registerActionExtension({category:o.ActionRegistration.ActionCategory.NAVIGATION,actionId:"inspector_main.hard-reload",loadActionDelegate:async()=>(await k()).InspectorMain.ReloadActionDelegate.instance(),title:f(T.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"}]}),o.ActionRegistration.registerActionExtension({actionId:"rendering.toggle-prefers-color-scheme",category:o.ActionRegistration.ActionCategory.RENDERING,title:f(T.toggleCssPrefersColorSchemeMedia),loadActionDelegate:async()=>(await k()).RenderingOptions.ReloadActionDelegate.instance()}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.NETWORK,title:f(T.forceAdBlocking),settingName:"network.adBlockingEnabled",settingType:e.Settings.SettingType.BOOLEAN,storageType:e.Settings.SettingStorageType.Session,defaultValue:!1,options:[{value:!0,title:f(T.blockAds)},{value:!1,title:f(T.showAds)}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.GLOBAL,storageType:e.Settings.SettingStorageType.Synced,title:f(T.autoOpenDevTools),settingName:"autoAttachToCreatedPages",settingType:e.Settings.SettingType.BOOLEAN,order:2,defaultValue:!1,options:[{value:!0,title:f(T.autoOpenDevTools)},{value:!1,title:f(T.doNotAutoOpen)}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.APPEARANCE,storageType:e.Settings.SettingStorageType.Synced,title:f(T.disablePaused),settingName:"disablePausedStateOverlay",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1}),o.Toolbar.registerToolbarItem({loadItem:async()=>(await k()).InspectorMain.NodeIndicator.instance(),order:2,location:o.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_LEFT,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),o.Toolbar.registerToolbarItem({loadItem:async()=>(await k()).OutermostTargetSelector.OutermostTargetSelector.instance(),order:98,location:o.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"},P=i.i18n.registerUIStrings("panels/issues/issues-meta.ts",I),x=i.i18n.getLazilyComputedLocalizedString.bind(void 0,P);let b;async function L(){return b||(b=await import("../../panels/issues/issues.js")),b}o.ViewManager.registerViewExtension({location:"drawer-view",id:"issues-pane",title:x(I.issues),commandPrompt:x(I.showIssues),order:100,persistence:"closeable",loadView:async()=>(await L()).IssuesPane.IssuesPane.instance()}),o.ViewManager.registerViewExtension({location:"drawer-view",id:"csp-violations-pane",title:x(I.cspViolations),commandPrompt:x(I.showCspViolations),order:100,persistence:"closeable",loadView:async()=>(await L()).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 L()).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"},V=i.i18n.registerUIStrings("panels/mobile_throttling/mobile_throttling-meta.ts",D),O=i.i18n.getLazilyComputedLocalizedString.bind(void 0,V);let M;async function _(){return M||(M=await import("../../panels/mobile_throttling/mobile_throttling.js")),M}o.ViewManager.registerViewExtension({location:"settings-view",id:"throttling-conditions",title:O(D.throttling),commandPrompt:O(D.showThrottling),order:35,loadView:async()=>(await _()).ThrottlingSettingsTab.ThrottlingSettingsTab.instance(),settings:["customNetworkConditions"]}),o.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-offline",category:o.ActionRegistration.ActionCategory.NETWORK,title:O(D.goOffline),loadActionDelegate:async()=>(await _()).ThrottlingManager.ActionDelegate.instance(),tags:[O(D.device),O(D.throttlingTag)]}),o.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-low-end-mobile",category:o.ActionRegistration.ActionCategory.NETWORK,title:O(D.enableSlowGThrottling),loadActionDelegate:async()=>(await _()).ThrottlingManager.ActionDelegate.instance(),tags:[O(D.device),O(D.throttlingTag)]}),o.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-mid-tier-mobile",category:o.ActionRegistration.ActionCategory.NETWORK,title:O(D.enableFastGThrottling),loadActionDelegate:async()=>(await _()).ThrottlingManager.ActionDelegate.instance(),tags:[O(D.device),O(D.throttlingTag)]}),o.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-online",category:o.ActionRegistration.ActionCategory.NETWORK,title:O(D.goOnline),loadActionDelegate:async()=>(await _()).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 U={showNetwork:"Show Network",network:"Network",showNetworkRequestBlocking:"Show Network request blocking",networkRequestBlocking:"Network request blocking",showNetworkConditions:"Show Network conditions",networkConditions:"Network conditions",diskCache:"disk cache",networkThrottling:"network throttling",showSearch:"Show Search",search:"Search",recordNetworkLog:"Record network log",stopRecordingNetworkLog:"Stop recording network log",hideRequestDetails:"Hide request details",colorcodeResourceTypes:"Color-code resource types",colorCode:"color code",resourceType:"resource type",colorCodeByResourceType:"Color code by resource type",useDefaultColors:"Use default colors",groupNetworkLogByFrame:"Group network log by frame",netWork:"network",frame:"frame",group:"group",groupNetworkLogItemsByFrame:"Group network log items by frame",dontGroupNetworkLogItemsByFrame:"Don't group network log items by frame",clear:"Clear network log"},B=i.i18n.registerUIStrings("panels/network/network-meta.ts",U),F=i.i18n.getLazilyComputedLocalizedString.bind(void 0,B);let z;async function W(){return z||(z=await import("../../panels/network/network.js")),z}function j(e){return void 0===z?[]:e(z)}o.ViewManager.registerViewExtension({location:"panel",id:"network",commandPrompt:F(U.showNetwork),title:F(U.network),order:40,condition:t.Runtime.ConditionName.REACT_NATIVE_UNSTABLE_NETWORK_PANEL,loadView:async()=>(await W()).NetworkPanel.NetworkPanel.instance()}),o.ViewManager.registerViewExtension({location:"drawer-view",id:"network.blocked-urls",commandPrompt:F(U.showNetworkRequestBlocking),title:F(U.networkRequestBlocking),persistence:"closeable",order:60,loadView:async()=>(await W()).BlockedURLsPane.BlockedURLsPane.instance()}),o.ViewManager.registerViewExtension({location:"drawer-view",id:"network.config",commandPrompt:F(U.showNetworkConditions),title:F(U.networkConditions),persistence:"closeable",order:40,tags:[F(U.diskCache),F(U.networkThrottling),i.i18n.lockedLazyString("useragent"),i.i18n.lockedLazyString("user agent"),i.i18n.lockedLazyString("user-agent")],loadView:async()=>(await W()).NetworkConfigView.NetworkConfigView.instance()}),o.ViewManager.registerViewExtension({location:"network-sidebar",id:"network.search-network-tab",commandPrompt:F(U.showSearch),title:F(U.search),persistence:"permanent",loadView:async()=>(await W()).NetworkPanel.SearchNetworkView.instance()}),o.ActionRegistration.registerActionExtension({actionId:"network.toggle-recording",category:o.ActionRegistration.ActionCategory.NETWORK,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>j((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await W()).NetworkPanel.ActionDelegate.instance(),options:[{value:!0,title:F(U.recordNetworkLog)},{value:!1,title:F(U.stopRecordingNetworkLog)}],bindings:[{shortcut:"Ctrl+E",platform:"windows,linux"},{shortcut:"Meta+E",platform:"mac"}]}),o.ActionRegistration.registerActionExtension({actionId:"network.clear",category:o.ActionRegistration.ActionCategory.NETWORK,title:F(U.clear),iconClass:"clear",loadActionDelegate:async()=>(await W()).NetworkPanel.ActionDelegate.instance(),contextTypes:()=>j((e=>[e.NetworkPanel.NetworkPanel])),bindings:[{shortcut:"Ctrl+L"},{shortcut:"Meta+K",platform:"mac"}]}),o.ActionRegistration.registerActionExtension({actionId:"network.hide-request-details",category:o.ActionRegistration.ActionCategory.NETWORK,title:F(U.hideRequestDetails),contextTypes:()=>j((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await W()).NetworkPanel.ActionDelegate.instance(),bindings:[{shortcut:"Esc"}]}),o.ActionRegistration.registerActionExtension({actionId:"network.search",category:o.ActionRegistration.ActionCategory.NETWORK,title:F(U.search),contextTypes:()=>j((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await W()).NetworkPanel.ActionDelegate.instance(),bindings:[{platform:"mac",shortcut:"Meta+F",keybindSets:["devToolsDefault","vsCode"]},{platform:"windows,linux",shortcut:"Ctrl+F",keybindSets:["devToolsDefault","vsCode"]}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.NETWORK,storageType:e.Settings.SettingStorageType.Synced,title:F(U.colorcodeResourceTypes),settingName:"networkColorCodeResourceTypes",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,tags:[F(U.colorCode),F(U.resourceType)],options:[{value:!0,title:F(U.colorCodeByResourceType)},{value:!1,title:F(U.useDefaultColors)}]}),e.Settings.registerSettingExtension({category:e.Settings.SettingCategory.NETWORK,storageType:e.Settings.SettingStorageType.Synced,title:F(U.groupNetworkLogByFrame),settingName:"network.group-by-frame",settingType:e.Settings.SettingType.BOOLEAN,defaultValue:!1,tags:[F(U.netWork),F(U.frame),F(U.group)],options:[{value:!0,title:F(U.groupNetworkLogItemsByFrame)},{value:!1,title:F(U.dontGroupNetworkLogItemsByFrame)}]}),o.ViewManager.registerLocationResolver({name:"network-sidebar",category:o.ViewManager.ViewLocationCategory.NETWORK,loadResolver:async()=>(await W()).NetworkPanel.NetworkPanel.instance()}),o.ContextMenu.registerProvider({contextTypes:()=>[a.NetworkRequest.NetworkRequest,a.Resource.Resource,r.UISourceCode.UISourceCode],loadProvider:async()=>(await W()).NetworkPanel.ContextMenuProvider.instance(),experiment:void 0}),e.Revealer.registerRevealer({contextTypes:()=>[a.NetworkRequest.NetworkRequest],destination:e.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await W()).NetworkPanel.RequestRevealer.instance()}),e.Revealer.registerRevealer({contextTypes:()=>[s.UIRequestLocation.UIRequestLocation],loadRevealer:async()=>(await W()).NetworkPanel.RequestLocationRevealer.instance(),destination:void 0}),e.Revealer.registerRevealer({contextTypes:()=>[s.NetworkRequestId.NetworkRequestId],destination:e.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await W()).NetworkPanel.RequestIdRevealer.instance()}),e.Revealer.registerRevealer({contextTypes:()=>[s.UIFilter.UIRequestFilter],destination:e.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await W()).NetworkPanel.NetworkLogWithFilterRevealer.instance()});const q={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"},K=i.i18n.registerUIStrings("panels/js_profiler/js_profiler-meta.ts",q),G=i.i18n.getLazilyComputedLocalizedString.bind(void 0,K);let H,J;async function Q(){return J||(J=await import("../../panels/profiler/profiler.js")),J}async function Y(){return H||(H=await import("../../panels/timeline/timeline.js")),H}function X(e){return void 0===H?[]:e(H)}o.ViewManager.registerViewExtension({location:"panel",id:"js_profiler",title:G(q.profiler),commandPrompt:G(q.showProfiler),order:65,persistence:"permanent",experiment:t.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,loadView:async()=>(await Q()).ProfilesPanel.JSProfilerPanel.instance()}),o.ActionRegistration.registerActionExtension({actionId:"profiler.js-toggle-recording",category:o.ActionRegistration.ActionCategory.JAVASCRIPT_PROFILER,title:G(q.startStopRecording),iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>void 0===J?[]:(e=>[e.ProfilesPanel.JSProfilerPanel])(J),loadActionDelegate:async()=>(await Q()).ProfilesPanel.JSProfilerPanel.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),o.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>(await Y()).TimelinePanel.ActionDelegate.instance(),category:o.ActionRegistration.ActionCategory.PERFORMANCE,title:G(q.showRecentTimelineSessions),contextTypes:()=>X((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),o.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:o.ActionRegistration.ActionCategory.PERFORMANCE,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>X((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await Y()).TimelinePanel.ActionDelegate.instance(),options:[{value:!0,title:G(q.record)},{value:!1,title:G(q.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),o.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>X((e=>[e.TimelinePanel.TimelinePanel])),category:o.ActionRegistration.ActionCategory.PERFORMANCE,title:G(q.startProfilingAndReloadPage),loadActionDelegate:async()=>(await Y()).TimelinePanel.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]});const Z={rnWelcome:"⚛️ Welcome",showRnWelcome:"Show React Native Welcome panel"},$=i.i18n.registerUIStrings("panels/rn_welcome/rn_welcome-meta.ts",Z),ee=i.i18n.getLazilyComputedLocalizedString.bind(void 0,$);let te;o.ViewManager.registerViewExtension({location:"panel",id:"rn-welcome",title:ee(Z.rnWelcome),commandPrompt:ee(Z.showRnWelcome),order:-10,persistence:"permanent",loadView:async()=>(await async function(){return te||(te=await import("../../panels/rn_welcome/rn_welcome.js")),te}()).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 l.MainImpl.MainImpl; diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/shell/shell.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/shell/shell.js deleted file mode 100644 index 2b82a18b6..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/shell/shell.js +++ /dev/null @@ -1 +0,0 @@ -import"../../Images/Images.js";import*as e from"../../core/root/root.js";import"../../core/dom_extension/dom_extension.js";import*as t from"../../core/common/common.js";import*as o from"../../core/host/host.js";import*as i from"../../core/i18n/i18n.js";import*as n from"../../core/sdk/sdk.js";import*as a from"../../models/breakpoints/breakpoints.js";import*as s from"../../models/workspace/workspace.js";import*as r from"../../ui/legacy/components/object_ui/object_ui.js";import*as l from"../../ui/legacy/components/quick_open/quick_open.js";import*as c from"../../ui/legacy/legacy.js";import*as g from"../../models/workspace_diff/workspace_diff.js";import*as d from"../../ui/legacy/components/utils/utils.js";import"../main/main.js";self.Root=self.Root||{},Root=Root||{},Root.Runtime=e.Runtime.Runtime,Root.Runtime.experiments=e.Runtime.experiments,Root.Runtime.queryParam=e.Runtime.Runtime.queryParam,Root.runtime,Root.Runtime.Extension=e.Runtime.Extension,Root.Runtime.Module=e.Runtime.Module;const u={showSources:"Show Sources",sources:"Sources",showFilesystem:"Show Filesystem",filesystem:"Filesystem",showSnippets:"Show Snippets",snippets:"Snippets",showSearch:"Show Search",search:"Search",showQuickSource:"Show Quick source",quickSource:"Quick source",showThreads:"Show Threads",threads:"Threads",showScope:"Show Scope",scope:"Scope",showWatch:"Show Watch",watch:"Watch",showBreakpoints:"Show Breakpoints",breakpoints:"Breakpoints",pauseScriptExecution:"Pause script execution",resumeScriptExecution:"Resume script execution",stepOverNextFunctionCall:"Step over next function call",stepIntoNextFunctionCall:"Step into next function call",step:"Step",stepOutOfCurrentFunction:"Step out of current function",runSnippet:"Run snippet",deactivateBreakpoints:"Deactivate breakpoints",activateBreakpoints:"Activate breakpoints",addSelectedTextToWatches:"Add selected text to watches",evaluateSelectedTextInConsole:"Evaluate selected text in console",switchFile:"Switch file",rename:"Rename",closeAll:"Close All",jumpToPreviousEditingLocation:"Jump to previous editing location",jumpToNextEditingLocation:"Jump to next editing location",closeTheActiveTab:"Close the active tab",goToLine:"Go to line",goToAFunctionDeclarationruleSet:"Go to a function declaration/rule set",toggleBreakpoint:"Toggle breakpoint",toggleBreakpointEnabled:"Toggle breakpoint enabled",toggleBreakpointInputWindow:"Toggle breakpoint input window",save:"Save",saveAll:"Save all",createNewSnippet:"Create new snippet",addFolderToWorkspace:"Add folder to workspace",previousCallFrame:"Previous call frame",nextCallFrame:"Next call frame",incrementCssUnitBy:"Increment CSS unit by {PH1}",decrementCssUnitBy:"Decrement CSS unit by {PH1}",searchInAnonymousAndContent:"Search in anonymous and content scripts",doNotSearchInAnonymousAndContent:"Do not search in anonymous and content scripts",automaticallyRevealFilesIn:"Automatically reveal files in sidebar",doNotAutomaticallyRevealFilesIn:"Do not automatically reveal files in sidebar",enableJavascriptSourceMaps:"Enable JavaScript source maps",disableJavascriptSourceMaps:"Disable JavaScript source maps",enableTabMovesFocus:"Enable tab moves focus",disableTabMovesFocus:"Disable tab moves focus",detectIndentation:"Detect indentation",doNotDetectIndentation:"Do not detect indentation",autocompletion:"Autocompletion",enableAutocompletion:"Enable autocompletion",disableAutocompletion:"Disable autocompletion",bracketMatching:"Bracket matching",enableBracketMatching:"Enable bracket matching",disableBracketMatching:"Disable bracket matching",codeFolding:"Code folding",enableCodeFolding:"Enable code folding",disableCodeFolding:"Disable code folding",showWhitespaceCharacters:"Show whitespace characters:",doNotShowWhitespaceCharacters:"Do not show whitespace characters",none:"None",showAllWhitespaceCharacters:"Show all whitespace characters",all:"All",showTrailingWhitespaceCharacters:"Show trailing whitespace characters",trailing:"Trailing",displayVariableValuesInlineWhile:"Display variable values inline while debugging",doNotDisplayVariableValuesInline:"Do not display variable values inline while debugging",enableCssSourceMaps:"Enable CSS source maps",disableCssSourceMaps:"Disable CSS source maps",allowScrollingPastEndOfFile:"Allow scrolling past end of file",disallowScrollingPastEndOfFile:"Disallow scrolling past end of file",wasmAutoStepping:"When debugging wasm with debug information, do not pause on wasm bytecode if possible",enableWasmAutoStepping:"Enable wasm auto-stepping",disableWasmAutoStepping:"Disable wasm auto-stepping",goTo:"Go to",line:"Line",symbol:"Symbol",open:"Open",file:"File",disableAutoFocusOnDebuggerPaused:"Do not focus Sources panel when triggering a breakpoint",enableAutoFocusOnDebuggerPaused:"Focus Sources panel when triggering a breakpoint",toggleNavigatorSidebar:"Toggle navigator sidebar",toggleDebuggerSidebar:"Toggle debugger sidebar",nextEditorTab:"Next editor",previousEditorTab:"Previous editor"},S=i.i18n.registerUIStrings("panels/sources/sources-meta.ts",u),p=i.i18n.getLazilyComputedLocalizedString.bind(void 0,S);let m,y,w;async function h(){return m||(m=await import("../../panels/sources/sources.js")),m}async function v(){return y||(y=await import("../../panels/sources/components/components.js")),y}function A(e){return void 0===m?[]:e(m)}c.ViewManager.registerViewExtension({location:"panel",id:"sources",commandPrompt:p(u.showSources),title:p(u.sources),order:30,loadView:async()=>(await h()).SourcesPanel.SourcesPanel.instance()}),c.ViewManager.registerViewExtension({location:"navigator-view",id:"navigator-files",commandPrompt:p(u.showFilesystem),title:p(u.filesystem),order:3,persistence:"permanent",loadView:async()=>(await h()).SourcesNavigator.FilesNavigatorView.instance(),condition:e.Runtime.ConditionName.NOT_SOURCES_HIDE_ADD_FOLDER}),c.ViewManager.registerViewExtension({location:"navigator-view",id:"navigator-snippets",commandPrompt:p(u.showSnippets),title:p(u.snippets),order:6,persistence:"permanent",loadView:async()=>(await h()).SourcesNavigator.SnippetsNavigatorView.instance()}),c.ViewManager.registerViewExtension({location:"drawer-view",id:"sources.search-sources-tab",commandPrompt:p(u.showSearch),title:p(u.search),order:7,persistence:"closeable",loadView:async()=>(await h()).SearchSourcesView.SearchSourcesView.instance()}),c.ViewManager.registerViewExtension({location:"drawer-view",id:"sources.quick",commandPrompt:p(u.showQuickSource),title:p(u.quickSource),persistence:"closeable",order:1e3,loadView:async()=>(await h()).SourcesPanel.WrapperView.instance()}),c.ViewManager.registerViewExtension({id:"sources.threads",commandPrompt:p(u.showThreads),title:p(u.threads),persistence:"permanent",condition:e.Runtime.ConditionName.NOT_SOURCES_HIDE_ADD_FOLDER,loadView:async()=>(await h()).ThreadsSidebarPane.ThreadsSidebarPane.instance()}),c.ViewManager.registerViewExtension({id:"sources.scopeChain",commandPrompt:p(u.showScope),title:p(u.scope),persistence:"permanent",loadView:async()=>(await h()).ScopeChainSidebarPane.ScopeChainSidebarPane.instance()}),c.ViewManager.registerViewExtension({id:"sources.watch",commandPrompt:p(u.showWatch),title:p(u.watch),persistence:"permanent",loadView:async()=>(await h()).WatchExpressionsSidebarPane.WatchExpressionsSidebarPane.instance(),hasToolbar:!0}),c.ViewManager.registerViewExtension({id:"sources.jsBreakpoints",commandPrompt:p(u.showBreakpoints),title:p(u.breakpoints),persistence:"permanent",loadView:async()=>(await v()).BreakpointsView.BreakpointsView.instance().wrapper}),c.ActionRegistration.registerActionExtension({category:c.ActionRegistration.ActionCategory.DEBUGGER,actionId:"debugger.toggle-pause",iconClass:"pause",toggleable:!0,toggledIconClass:"resume",loadActionDelegate:async()=>(await h()).SourcesPanel.RevealingActionDelegate.instance(),contextTypes:()=>A((e=>[e.SourcesView.SourcesView,c.ShortcutRegistry.ForwardedShortcut])),options:[{value:!0,title:p(u.pauseScriptExecution)},{value:!1,title:p(u.resumeScriptExecution)}],bindings:[{shortcut:"F8",keybindSets:["devToolsDefault"]},{platform:"windows,linux",shortcut:"Ctrl+\\"},{shortcut:"F5",keybindSets:["vsCode"]},{shortcut:"Shift+F5",keybindSets:["vsCode"]},{platform:"mac",shortcut:"Meta+\\"}]}),c.ActionRegistration.registerActionExtension({category:c.ActionRegistration.ActionCategory.DEBUGGER,actionId:"debugger.step-over",loadActionDelegate:async()=>(await h()).SourcesPanel.ActionDelegate.instance(),title:p(u.stepOverNextFunctionCall),iconClass:"step-over",contextTypes:()=>[n.DebuggerModel.DebuggerPausedDetails],bindings:[{shortcut:"F10",keybindSets:["devToolsDefault","vsCode"]},{platform:"windows,linux",shortcut:"Ctrl+'"},{platform:"mac",shortcut:"Meta+'"}]}),c.ActionRegistration.registerActionExtension({category:c.ActionRegistration.ActionCategory.DEBUGGER,actionId:"debugger.step-into",loadActionDelegate:async()=>(await h()).SourcesPanel.ActionDelegate.instance(),title:p(u.stepIntoNextFunctionCall),iconClass:"step-into",contextTypes:()=>[n.DebuggerModel.DebuggerPausedDetails],bindings:[{shortcut:"F11",keybindSets:["devToolsDefault","vsCode"]},{platform:"windows,linux",shortcut:"Ctrl+;"},{platform:"mac",shortcut:"Meta+;"}]}),c.ActionRegistration.registerActionExtension({category:c.ActionRegistration.ActionCategory.DEBUGGER,actionId:"debugger.step",loadActionDelegate:async()=>(await h()).SourcesPanel.ActionDelegate.instance(),title:p(u.step),iconClass:"step",contextTypes:()=>[n.DebuggerModel.DebuggerPausedDetails],bindings:[{shortcut:"F9",keybindSets:["devToolsDefault"]}]}),c.ActionRegistration.registerActionExtension({category:c.ActionRegistration.ActionCategory.DEBUGGER,actionId:"debugger.step-out",loadActionDelegate:async()=>(await h()).SourcesPanel.ActionDelegate.instance(),title:p(u.stepOutOfCurrentFunction),iconClass:"step-out",contextTypes:()=>[n.DebuggerModel.DebuggerPausedDetails],bindings:[{shortcut:"Shift+F11",keybindSets:["devToolsDefault","vsCode"]},{platform:"windows,linux",shortcut:"Shift+Ctrl+;"},{platform:"mac",shortcut:"Shift+Meta+;"}]}),c.ActionRegistration.registerActionExtension({actionId:"debugger.run-snippet",category:c.ActionRegistration.ActionCategory.DEBUGGER,loadActionDelegate:async()=>(await h()).SourcesPanel.ActionDelegate.instance(),title:p(u.runSnippet),iconClass:"play",contextTypes:()=>A((e=>[e.SourcesView.SourcesView])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Enter"},{platform:"mac",shortcut:"Meta+Enter"}]}),c.ActionRegistration.registerActionExtension({category:c.ActionRegistration.ActionCategory.DEBUGGER,actionId:"debugger.toggle-breakpoints-active",iconClass:"breakpoint-crossed",toggledIconClass:"breakpoint-crossed-filled",toggleable:!0,loadActionDelegate:async()=>(await h()).SourcesPanel.ActionDelegate.instance(),contextTypes:()=>A((e=>[e.SourcesView.SourcesView])),options:[{value:!0,title:p(u.deactivateBreakpoints)},{value:!1,title:p(u.activateBreakpoints)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+F8"},{platform:"mac",shortcut:"Meta+F8"}]}),c.ActionRegistration.registerActionExtension({actionId:"sources.add-to-watch",loadActionDelegate:async()=>(await h()).WatchExpressionsSidebarPane.WatchExpressionsSidebarPane.instance(),category:c.ActionRegistration.ActionCategory.DEBUGGER,title:p(u.addSelectedTextToWatches),contextTypes:()=>A((e=>[e.UISourceCodeFrame.UISourceCodeFrame])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+A"},{platform:"mac",shortcut:"Meta+Shift+A"}]}),c.ActionRegistration.registerActionExtension({actionId:"debugger.evaluate-selection",category:c.ActionRegistration.ActionCategory.DEBUGGER,loadActionDelegate:async()=>(await h()).SourcesPanel.ActionDelegate.instance(),title:p(u.evaluateSelectedTextInConsole),contextTypes:()=>A((e=>[e.UISourceCodeFrame.UISourceCodeFrame])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]}),c.ActionRegistration.registerActionExtension({actionId:"sources.switch-file",category:c.ActionRegistration.ActionCategory.SOURCES,title:p(u.switchFile),loadActionDelegate:async()=>(await h()).SourcesView.SwitchFileActionDelegate.instance(),contextTypes:()=>A((e=>[e.SourcesView.SourcesView])),bindings:[{shortcut:"Alt+O"}]}),c.ActionRegistration.registerActionExtension({actionId:"sources.rename",category:c.ActionRegistration.ActionCategory.SOURCES,title:p(u.rename),bindings:[{platform:"windows,linux",shortcut:"F2"},{platform:"mac",shortcut:"Enter"}]}),c.ActionRegistration.registerActionExtension({category:c.ActionRegistration.ActionCategory.SOURCES,actionId:"sources.close-all",loadActionDelegate:async()=>(await h()).SourcesView.ActionDelegate.instance(),title:p(u.closeAll)}),c.ActionRegistration.registerActionExtension({actionId:"sources.jump-to-previous-location",category:c.ActionRegistration.ActionCategory.SOURCES,title:p(u.jumpToPreviousEditingLocation),loadActionDelegate:async()=>(await h()).SourcesView.ActionDelegate.instance(),contextTypes:()=>A((e=>[e.SourcesView.SourcesView])),bindings:[{shortcut:"Alt+Minus"}]}),c.ActionRegistration.registerActionExtension({actionId:"sources.jump-to-next-location",category:c.ActionRegistration.ActionCategory.SOURCES,title:p(u.jumpToNextEditingLocation),loadActionDelegate:async()=>(await h()).SourcesView.ActionDelegate.instance(),contextTypes:()=>A((e=>[e.SourcesView.SourcesView])),bindings:[{shortcut:"Alt+Plus"}]}),c.ActionRegistration.registerActionExtension({actionId:"sources.close-editor-tab",category:c.ActionRegistration.ActionCategory.SOURCES,title:p(u.closeTheActiveTab),loadActionDelegate:async()=>(await h()).SourcesView.ActionDelegate.instance(),contextTypes:()=>A((e=>[e.SourcesView.SourcesView])),bindings:[{shortcut:"Alt+w"},{shortcut:"Ctrl+W",keybindSets:["vsCode"]},{platform:"windows",shortcut:"Ctrl+F4",keybindSets:["vsCode"]}]}),c.ActionRegistration.registerActionExtension({actionId:"sources.next-editor-tab",category:c.ActionRegistration.ActionCategory.SOURCES,title:p(u.nextEditorTab),loadActionDelegate:async()=>(await h()).SourcesView.ActionDelegate.instance(),contextTypes:()=>A((e=>[e.SourcesView.SourcesView])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+PageDown",keybindSets:["devToolsDefault","vsCode"]},{platform:"mac",shortcut:"Meta+PageDown",keybindSets:["devToolsDefault","vsCode"]}]}),c.ActionRegistration.registerActionExtension({actionId:"sources.previous-editor-tab",category:c.ActionRegistration.ActionCategory.SOURCES,title:p(u.previousEditorTab),loadActionDelegate:async()=>(await h()).SourcesView.ActionDelegate.instance(),contextTypes:()=>A((e=>[e.SourcesView.SourcesView])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+PageUp",keybindSets:["devToolsDefault","vsCode"]},{platform:"mac",shortcut:"Meta+PageUp",keybindSets:["devToolsDefault","vsCode"]}]}),c.ActionRegistration.registerActionExtension({actionId:"sources.go-to-line",category:c.ActionRegistration.ActionCategory.SOURCES,title:p(u.goToLine),loadActionDelegate:async()=>(await h()).SourcesView.ActionDelegate.instance(),contextTypes:()=>A((e=>[e.SourcesView.SourcesView])),bindings:[{shortcut:"Ctrl+g",keybindSets:["devToolsDefault","vsCode"]}]}),c.ActionRegistration.registerActionExtension({actionId:"sources.go-to-member",category:c.ActionRegistration.ActionCategory.SOURCES,title:p(u.goToAFunctionDeclarationruleSet),loadActionDelegate:async()=>(await h()).SourcesView.ActionDelegate.instance(),contextTypes:()=>A((e=>[e.SourcesView.SourcesView])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+o",keybindSets:["devToolsDefault","vsCode"]},{platform:"mac",shortcut:"Meta+Shift+o",keybindSets:["devToolsDefault","vsCode"]},{platform:"mac",shortcut:"Meta+T",keybindSets:["vsCode"]},{platform:"windows,linux",shortcut:"Ctrl+T",keybindSets:["vsCode"]},{shortcut:"F12",keybindSets:["vsCode"]}]}),c.ActionRegistration.registerActionExtension({actionId:"debugger.toggle-breakpoint",category:c.ActionRegistration.ActionCategory.DEBUGGER,title:p(u.toggleBreakpoint),bindings:[{platform:"windows,linux",shortcut:"Ctrl+b",keybindSets:["devToolsDefault"]},{platform:"mac",shortcut:"Meta+b",keybindSets:["devToolsDefault"]},{shortcut:"F9",keybindSets:["vsCode"]}]}),c.ActionRegistration.registerActionExtension({actionId:"debugger.toggle-breakpoint-enabled",category:c.ActionRegistration.ActionCategory.DEBUGGER,title:p(u.toggleBreakpointEnabled),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+b"},{platform:"mac",shortcut:"Meta+Shift+b"}]}),c.ActionRegistration.registerActionExtension({actionId:"debugger.breakpoint-input-window",category:c.ActionRegistration.ActionCategory.DEBUGGER,title:p(u.toggleBreakpointInputWindow),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Alt+b"},{platform:"mac",shortcut:"Meta+Alt+b"}]}),c.ActionRegistration.registerActionExtension({actionId:"sources.save",category:c.ActionRegistration.ActionCategory.SOURCES,title:p(u.save),loadActionDelegate:async()=>(await h()).SourcesView.ActionDelegate.instance(),contextTypes:()=>A((e=>[e.SourcesView.SourcesView])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+s",keybindSets:["devToolsDefault","vsCode"]},{platform:"mac",shortcut:"Meta+s",keybindSets:["devToolsDefault","vsCode"]}]}),c.ActionRegistration.registerActionExtension({actionId:"sources.save-all",category:c.ActionRegistration.ActionCategory.SOURCES,title:p(u.saveAll),loadActionDelegate:async()=>(await h()).SourcesView.ActionDelegate.instance(),contextTypes:()=>A((e=>[e.SourcesView.SourcesView])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+s"},{platform:"mac",shortcut:"Meta+Alt+s"},{platform:"windows,linux",shortcut:"Ctrl+K S",keybindSets:["vsCode"]},{platform:"mac",shortcut:"Meta+Alt+S",keybindSets:["vsCode"]}]}),c.ActionRegistration.registerActionExtension({category:c.ActionRegistration.ActionCategory.SOURCES,actionId:"sources.create-snippet",loadActionDelegate:async()=>(await h()).SourcesNavigator.ActionDelegate.instance(),title:p(u.createNewSnippet)}),o.InspectorFrontendHost.InspectorFrontendHostInstance.isHostedMode()||c.ActionRegistration.registerActionExtension({category:c.ActionRegistration.ActionCategory.SOURCES,actionId:"sources.add-folder-to-workspace",loadActionDelegate:async()=>(await h()).SourcesNavigator.ActionDelegate.instance(),iconClass:"plus",title:p(u.addFolderToWorkspace),condition:e.Runtime.ConditionName.NOT_SOURCES_HIDE_ADD_FOLDER}),c.ActionRegistration.registerActionExtension({category:c.ActionRegistration.ActionCategory.DEBUGGER,actionId:"debugger.previous-call-frame",loadActionDelegate:async()=>(await h()).CallStackSidebarPane.ActionDelegate.instance(),title:p(u.previousCallFrame),contextTypes:()=>[n.DebuggerModel.DebuggerPausedDetails],bindings:[{shortcut:"Ctrl+,"}]}),c.ActionRegistration.registerActionExtension({category:c.ActionRegistration.ActionCategory.DEBUGGER,actionId:"debugger.next-call-frame",loadActionDelegate:async()=>(await h()).CallStackSidebarPane.ActionDelegate.instance(),title:p(u.nextCallFrame),contextTypes:()=>[n.DebuggerModel.DebuggerPausedDetails],bindings:[{shortcut:"Ctrl+."}]}),c.ActionRegistration.registerActionExtension({actionId:"sources.search",title:p(u.search),loadActionDelegate:async()=>(await h()).SearchSourcesView.ActionDelegate.instance(),category:c.ActionRegistration.ActionCategory.SOURCES,bindings:[{platform:"mac",shortcut:"Meta+Alt+F",keybindSets:["devToolsDefault"]},{platform:"windows,linux",shortcut:"Ctrl+Shift+F",keybindSets:["devToolsDefault","vsCode"]},{platform:"windows,linux",shortcut:"Ctrl+Shift+J",keybindSets:["vsCode"]},{platform:"mac",shortcut:"Meta+Shift+F",keybindSets:["vsCode"]},{platform:"mac",shortcut:"Meta+Shift+J",keybindSets:["vsCode"]}]}),c.ActionRegistration.registerActionExtension({actionId:"sources.increment-css",category:c.ActionRegistration.ActionCategory.SOURCES,title:p(u.incrementCssUnitBy,{PH1:1}),bindings:[{shortcut:"Alt+Up"}]}),c.ActionRegistration.registerActionExtension({actionId:"sources.increment-css-by-ten",title:p(u.incrementCssUnitBy,{PH1:10}),category:c.ActionRegistration.ActionCategory.SOURCES,bindings:[{shortcut:"Alt+PageUp"}]}),c.ActionRegistration.registerActionExtension({actionId:"sources.decrement-css",category:c.ActionRegistration.ActionCategory.SOURCES,title:p(u.decrementCssUnitBy,{PH1:1}),bindings:[{shortcut:"Alt+Down"}]}),c.ActionRegistration.registerActionExtension({actionId:"sources.decrement-css-by-ten",category:c.ActionRegistration.ActionCategory.SOURCES,title:p(u.decrementCssUnitBy,{PH1:10}),bindings:[{shortcut:"Alt+PageDown"}]}),c.ActionRegistration.registerActionExtension({actionId:"sources.toggle-navigator-sidebar",category:c.ActionRegistration.ActionCategory.SOURCES,title:p(u.toggleNavigatorSidebar),loadActionDelegate:async()=>(await h()).SourcesPanel.ActionDelegate.instance(),contextTypes:()=>A((e=>[e.SourcesView.SourcesView])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+y",keybindSets:["devToolsDefault"]},{platform:"mac",shortcut:"Meta+Shift+y",keybindSets:["devToolsDefault"]},{platform:"windows,linux",shortcut:"Ctrl+b",keybindSets:["vsCode"]},{platform:"windows,linux",shortcut:"Meta+b",keybindSets:["vsCode"]}]}),c.ActionRegistration.registerActionExtension({actionId:"sources.toggle-debugger-sidebar",category:c.ActionRegistration.ActionCategory.SOURCES,title:p(u.toggleDebuggerSidebar),loadActionDelegate:async()=>(await h()).SourcesPanel.ActionDelegate.instance(),contextTypes:()=>A((e=>[e.SourcesView.SourcesView])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+h"},{platform:"mac",shortcut:"Meta+Shift+h"}]}),t.Settings.registerSettingExtension({settingName:"navigatorGroupByFolder",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!0}),t.Settings.registerSettingExtension({settingName:"navigatorGroupByAuthored",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!1}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.SOURCES,storageType:t.Settings.SettingStorageType.Synced,title:p(u.searchInAnonymousAndContent),settingName:"searchInAnonymousAndContentScripts",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:p(u.searchInAnonymousAndContent)},{value:!1,title:p(u.doNotSearchInAnonymousAndContent)}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.SOURCES,storageType:t.Settings.SettingStorageType.Synced,title:p(u.automaticallyRevealFilesIn),settingName:"autoRevealInNavigator",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:p(u.automaticallyRevealFilesIn)},{value:!1,title:p(u.doNotAutomaticallyRevealFilesIn)}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.SOURCES,storageType:t.Settings.SettingStorageType.Synced,title:p(u.enableJavascriptSourceMaps),settingName:"jsSourceMapsEnabled",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!0,options:[{value:!0,title:p(u.enableJavascriptSourceMaps)},{value:!1,title:p(u.disableJavascriptSourceMaps)}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.SOURCES,storageType:t.Settings.SettingStorageType.Synced,title:p(u.enableTabMovesFocus),settingName:"textEditorTabMovesFocus",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:p(u.enableTabMovesFocus)},{value:!1,title:p(u.disableTabMovesFocus)}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.SOURCES,storageType:t.Settings.SettingStorageType.Synced,title:p(u.detectIndentation),settingName:"textEditorAutoDetectIndent",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!0,options:[{value:!0,title:p(u.detectIndentation)},{value:!1,title:p(u.doNotDetectIndentation)}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.SOURCES,storageType:t.Settings.SettingStorageType.Synced,title:p(u.autocompletion),settingName:"textEditorAutocompletion",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!0,options:[{value:!0,title:p(u.enableAutocompletion)},{value:!1,title:p(u.disableAutocompletion)}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.SOURCES,title:p(u.bracketMatching),settingName:"textEditorBracketMatching",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!0,options:[{value:!0,title:p(u.enableBracketMatching)},{value:!1,title:p(u.disableBracketMatching)}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.SOURCES,storageType:t.Settings.SettingStorageType.Synced,title:p(u.codeFolding),settingName:"textEditorCodeFolding",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:p(u.enableCodeFolding)},{value:!1,title:p(u.disableCodeFolding)}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.SOURCES,storageType:t.Settings.SettingStorageType.Synced,title:p(u.showWhitespaceCharacters),settingName:"showWhitespacesInEditor",settingType:t.Settings.SettingType.ENUM,defaultValue:"original",options:[{title:p(u.doNotShowWhitespaceCharacters),text:p(u.none),value:"none"},{title:p(u.showAllWhitespaceCharacters),text:p(u.all),value:"all"},{title:p(u.showTrailingWhitespaceCharacters),text:p(u.trailing),value:"trailing"}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.SOURCES,storageType:t.Settings.SettingStorageType.Synced,title:p(u.displayVariableValuesInlineWhile),settingName:"inlineVariableValues",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!0,options:[{value:!0,title:p(u.displayVariableValuesInlineWhile)},{value:!1,title:p(u.doNotDisplayVariableValuesInline)}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.SOURCES,storageType:t.Settings.SettingStorageType.Synced,title:p(u.enableAutoFocusOnDebuggerPaused),settingName:"autoFocusOnDebuggerPausedEnabled",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!0,options:[{value:!0,title:p(u.enableAutoFocusOnDebuggerPaused)},{value:!1,title:p(u.disableAutoFocusOnDebuggerPaused)}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.SOURCES,storageType:t.Settings.SettingStorageType.Synced,title:p(u.enableCssSourceMaps),settingName:"cssSourceMapsEnabled",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!0,options:[{value:!0,title:p(u.enableCssSourceMaps)},{value:!1,title:p(u.disableCssSourceMaps)}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.SOURCES,storageType:t.Settings.SettingStorageType.Synced,title:p(u.allowScrollingPastEndOfFile),settingName:"allowScrollPastEof",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!0,options:[{value:!0,title:p(u.allowScrollingPastEndOfFile)},{value:!1,title:p(u.disallowScrollingPastEndOfFile)}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.SOURCES,storageType:t.Settings.SettingStorageType.Local,title:p(u.wasmAutoStepping),settingName:"wasmAutoStepping",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!0,options:[{value:!0,title:p(u.enableWasmAutoStepping)},{value:!1,title:p(u.disableWasmAutoStepping)}]}),c.ViewManager.registerLocationResolver({name:"navigator-view",category:c.ViewManager.ViewLocationCategory.SOURCES,loadResolver:async()=>(await h()).SourcesPanel.SourcesPanel.instance()}),c.ViewManager.registerLocationResolver({name:"sources.sidebar-top",category:c.ViewManager.ViewLocationCategory.SOURCES,loadResolver:async()=>(await h()).SourcesPanel.SourcesPanel.instance()}),c.ViewManager.registerLocationResolver({name:"sources.sidebar-bottom",category:c.ViewManager.ViewLocationCategory.SOURCES,loadResolver:async()=>(await h()).SourcesPanel.SourcesPanel.instance()}),c.ViewManager.registerLocationResolver({name:"sources.sidebar-tabs",category:c.ViewManager.ViewLocationCategory.SOURCES,loadResolver:async()=>(await h()).SourcesPanel.SourcesPanel.instance()}),c.ContextMenu.registerProvider({contextTypes:()=>[s.UISourceCode.UISourceCode,s.UISourceCode.UILocation,n.RemoteObject.RemoteObject,n.NetworkRequest.NetworkRequest,...A((e=>[e.UISourceCodeFrame.UISourceCodeFrame]))],loadProvider:async()=>(await h()).SourcesPanel.SourcesPanel.instance(),experiment:void 0}),c.ContextMenu.registerProvider({loadProvider:async()=>(await h()).WatchExpressionsSidebarPane.WatchExpressionsSidebarPane.instance(),contextTypes:()=>[r.ObjectPropertiesSection.ObjectPropertyTreeElement],experiment:void 0}),c.ContextMenu.registerProvider({contextTypes:()=>A((e=>[e.UISourceCodeFrame.UISourceCodeFrame])),loadProvider:async()=>(await h()).WatchExpressionsSidebarPane.WatchExpressionsSidebarPane.instance(),experiment:void 0}),c.ContextMenu.registerProvider({loadProvider:async()=>(await h()).ScopeChainSidebarPane.OpenLinearMemoryInspector.instance(),experiment:void 0,contextTypes:()=>[r.ObjectPropertiesSection.ObjectPropertyTreeElement]}),t.Revealer.registerRevealer({contextTypes:()=>[s.UISourceCode.UILocation],destination:t.Revealer.RevealerDestination.SOURCES_PANEL,loadRevealer:async()=>(await h()).SourcesPanel.UILocationRevealer.instance()}),t.Revealer.registerRevealer({contextTypes:()=>[n.DebuggerModel.Location],destination:t.Revealer.RevealerDestination.SOURCES_PANEL,loadRevealer:async()=>(await h()).SourcesPanel.DebuggerLocationRevealer.instance()}),t.Revealer.registerRevealer({contextTypes:()=>[s.UISourceCode.UISourceCode],destination:t.Revealer.RevealerDestination.SOURCES_PANEL,loadRevealer:async()=>(await h()).SourcesPanel.UISourceCodeRevealer.instance()}),t.Revealer.registerRevealer({contextTypes:()=>[n.DebuggerModel.DebuggerPausedDetails],destination:t.Revealer.RevealerDestination.SOURCES_PANEL,loadRevealer:async()=>(await h()).SourcesPanel.DebuggerPausedDetailsRevealer.instance()}),t.Revealer.registerRevealer({contextTypes:()=>[a.BreakpointManager.BreakpointLocation],destination:t.Revealer.RevealerDestination.SOURCES_PANEL,loadRevealer:async()=>(await h()).DebuggerPlugin.BreakpointLocationRevealer.instance()}),c.Toolbar.registerToolbarItem({actionId:"sources.add-folder-to-workspace",location:c.Toolbar.ToolbarItemLocation.FILES_NAVIGATION_TOOLBAR,showLabel:!0,condition:e.Runtime.ConditionName.NOT_SOURCES_HIDE_ADD_FOLDER,loadItem:void 0,order:void 0,separator:void 0}),c.Context.registerListener({contextTypes:()=>[n.DebuggerModel.DebuggerPausedDetails],loadListener:async()=>(await v()).BreakpointsView.BreakpointsSidebarController.instance()}),c.Context.registerListener({contextTypes:()=>[n.DebuggerModel.DebuggerPausedDetails],loadListener:async()=>(await h()).CallStackSidebarPane.CallStackSidebarPane.instance()}),c.Context.registerListener({contextTypes:()=>[n.DebuggerModel.CallFrame],loadListener:async()=>(await h()).ScopeChainSidebarPane.ScopeChainSidebarPane.instance()}),c.ContextMenu.registerItem({location:c.ContextMenu.ItemLocation.NAVIGATOR_MENU_DEFAULT,actionId:"quickOpen.show",order:void 0}),c.ContextMenu.registerItem({location:c.ContextMenu.ItemLocation.MAIN_MENU_DEFAULT,actionId:"sources.search",order:void 0}),l.FilteredListWidget.registerProvider({prefix:"@",iconName:"symbol",iconWidth:"16px",provider:async()=>new((await h()).OutlineQuickOpen.OutlineQuickOpen),titlePrefix:p(u.goTo),titleSuggestion:p(u.symbol)}),l.FilteredListWidget.registerProvider({prefix:":",iconName:"colon",iconWidth:"20px",provider:async()=>new((await h()).GoToLineQuickOpen.GoToLineQuickOpen),titlePrefix:p(u.goTo),titleSuggestion:p(u.line)}),l.FilteredListWidget.registerProvider({prefix:"",iconName:"document",iconWidth:"16px",provider:async()=>new((await h()).OpenFileQuickOpen.OpenFileQuickOpen),titlePrefix:p(u.open),titleSuggestion:p(u.file)});const C={memory:"Memory",liveHeapProfile:"Live Heap Profile",startRecordingHeapAllocations:"Start recording heap allocations",stopRecordingHeapAllocations:"Stop recording heap allocations",startRecordingHeapAllocationsAndReload:"Start recording heap allocations and reload the page",startStopRecording:"Start/stop recording",showNativeFunctions:"Show native functions in JS Profile",showMemory:"Show Memory",showLiveHeapProfile:"Show Live Heap Profile"},E=i.i18n.registerUIStrings("panels/profiler/profiler-meta.ts",C),T=i.i18n.getLazilyComputedLocalizedString.bind(void 0,E);async function b(){return w||(w=await import("../../panels/profiler/profiler.js")),w}c.ViewManager.registerViewExtension({location:"panel",id:"heap_profiler",commandPrompt:T(C.showMemory),title:T(C.memory),order:60,loadView:async()=>(await b()).HeapProfilerPanel.HeapProfilerPanel.instance()}),c.ViewManager.registerViewExtension({location:"drawer-view",id:"live_heap_profile",commandPrompt:T(C.showLiveHeapProfile),title:T(C.liveHeapProfile),persistence:"closeable",order:100,loadView:async()=>(await b()).LiveHeapProfileView.LiveHeapProfileView.instance(),experiment:e.Runtime.ExperimentName.LIVE_HEAP_PROFILE}),c.ActionRegistration.registerActionExtension({actionId:"live-heap-profile.toggle-recording",iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,loadActionDelegate:async()=>(await b()).LiveHeapProfileView.ActionDelegate.instance(),category:c.ActionRegistration.ActionCategory.MEMORY,experiment:e.Runtime.ExperimentName.LIVE_HEAP_PROFILE,options:[{value:!0,title:T(C.startRecordingHeapAllocations)},{value:!1,title:T(C.stopRecordingHeapAllocations)}]}),c.ActionRegistration.registerActionExtension({actionId:"live-heap-profile.start-with-reload",iconClass:"refresh",loadActionDelegate:async()=>(await b()).LiveHeapProfileView.ActionDelegate.instance(),category:c.ActionRegistration.ActionCategory.MEMORY,experiment:e.Runtime.ExperimentName.LIVE_HEAP_PROFILE,title:T(C.startRecordingHeapAllocationsAndReload)}),c.ActionRegistration.registerActionExtension({actionId:"profiler.heap-toggle-recording",category:c.ActionRegistration.ActionCategory.MEMORY,iconClass:"record-start",title:T(C.startStopRecording),toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>void 0===w?[]:(e=>[e.HeapProfilerPanel.HeapProfilerPanel])(w),loadActionDelegate:async()=>(await b()).HeapProfilerPanel.HeapProfilerPanel.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.PERFORMANCE,storageType:t.Settings.SettingStorageType.Synced,title:T(C.showNativeFunctions),settingName:"showNativeFunctionsInJSProfile",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!0}),c.ContextMenu.registerProvider({contextTypes:()=>[n.RemoteObject.RemoteObject],loadProvider:async()=>(await b()).HeapProfilerPanel.HeapProfilerPanel.instance(),experiment:void 0});const f={console:"Console",showConsole:"Show Console",clearConsole:"Clear console",clearConsoleHistory:"Clear console history",createLiveExpression:"Create live expression",hideNetworkMessages:"Hide network messages",showNetworkMessages:"Show network messages",selectedContextOnly:"Selected context only",onlyShowMessagesFromTheCurrent:"Only show messages from the current context (`top`, `iframe`, `worker`, extension)",showMessagesFromAllContexts:"Show messages from all contexts",logXmlhttprequests:"Log XMLHttpRequests",showTimestamps:"Show timestamps",hideTimestamps:"Hide timestamps",autocompleteFromHistory:"Autocomplete from history",doNotAutocompleteFromHistory:"Do not autocomplete from history",autocompleteOnEnter:"Accept autocomplete suggestion on Enter",doNotAutocompleteOnEnter:"Do not accept autocomplete suggestion on Enter",groupSimilarMessagesInConsole:"Group similar messages in console",doNotGroupSimilarMessagesIn:"Do not group similar messages in console",showCorsErrorsInConsole:"Show `CORS` errors in console",doNotShowCorsErrorsIn:"Do not show `CORS` errors in console",eagerEvaluation:"Eager evaluation",eagerlyEvaluateConsolePromptText:"Eagerly evaluate console prompt text",doNotEagerlyEvaluateConsole:"Do not eagerly evaluate console prompt text",evaluateTriggersUserActivation:"Treat code evaluation as user action",treatEvaluationAsUserActivation:"Treat evaluation as user activation",doNotTreatEvaluationAsUser:"Do not treat evaluation as user activation",expandConsoleTraceMessagesByDefault:"Automatically expand `console.trace()` messages",collapseConsoleTraceMessagesByDefault:"Do not automatically expand `console.trace()` messages"},R=i.i18n.registerUIStrings("panels/console/console-meta.ts",f),x=i.i18n.getLazilyComputedLocalizedString.bind(void 0,R);let N;async function D(){return N||(N=await import("../../panels/console/console.js")),N}c.ViewManager.registerViewExtension({location:"panel",id:"console",title:x(f.console),commandPrompt:x(f.showConsole),order:20,loadView:async()=>(await D()).ConsolePanel.ConsolePanel.instance()}),c.ViewManager.registerViewExtension({location:"drawer-view",id:"console-view",title:x(f.console),commandPrompt:x(f.showConsole),persistence:"permanent",order:0,loadView:async()=>(await D()).ConsolePanel.WrapperView.instance()}),c.ActionRegistration.registerActionExtension({actionId:"console.show",category:c.ActionRegistration.ActionCategory.CONSOLE,title:x(f.showConsole),loadActionDelegate:async()=>(await D()).ConsoleView.ActionDelegate.instance(),bindings:[{shortcut:"Ctrl+`",keybindSets:["devToolsDefault","vsCode"]}]}),c.ActionRegistration.registerActionExtension({actionId:"console.clear",category:c.ActionRegistration.ActionCategory.CONSOLE,title:x(f.clearConsole),iconClass:"clear",loadActionDelegate:async()=>(await D()).ConsoleView.ActionDelegate.instance(),contextTypes:()=>void 0===N?[]:(e=>[e.ConsoleView.ConsoleView])(N),bindings:[{shortcut:"Ctrl+L"},{shortcut:"Meta+K",platform:"mac"}]}),c.ActionRegistration.registerActionExtension({actionId:"console.clear.history",category:c.ActionRegistration.ActionCategory.CONSOLE,title:x(f.clearConsoleHistory),loadActionDelegate:async()=>(await D()).ConsoleView.ActionDelegate.instance()}),c.ActionRegistration.registerActionExtension({actionId:"console.create-pin",category:c.ActionRegistration.ActionCategory.CONSOLE,title:x(f.createLiveExpression),iconClass:"eye",loadActionDelegate:async()=>(await D()).ConsoleView.ActionDelegate.instance()}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.CONSOLE,storageType:t.Settings.SettingStorageType.Synced,title:x(f.hideNetworkMessages),settingName:"hideNetworkMessages",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:x(f.hideNetworkMessages)},{value:!1,title:x(f.showNetworkMessages)}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.CONSOLE,storageType:t.Settings.SettingStorageType.Synced,title:x(f.selectedContextOnly),settingName:"selectedContextFilterEnabled",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:x(f.onlyShowMessagesFromTheCurrent)},{value:!1,title:x(f.showMessagesFromAllContexts)}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.CONSOLE,storageType:t.Settings.SettingStorageType.Synced,title:x(f.logXmlhttprequests),settingName:"monitoringXHREnabled",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!1}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.CONSOLE,storageType:t.Settings.SettingStorageType.Synced,title:x(f.showTimestamps),settingName:"consoleTimestampsEnabled",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:x(f.showTimestamps)},{value:!1,title:x(f.hideTimestamps)}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.CONSOLE,title:x(f.autocompleteFromHistory),settingName:"consoleHistoryAutocomplete",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!0,options:[{value:!0,title:x(f.autocompleteFromHistory)},{value:!1,title:x(f.doNotAutocompleteFromHistory)}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.CONSOLE,storageType:t.Settings.SettingStorageType.Synced,title:x(f.autocompleteOnEnter),settingName:"consoleAutocompleteOnEnter",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:x(f.autocompleteOnEnter)},{value:!1,title:x(f.doNotAutocompleteOnEnter)}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.CONSOLE,storageType:t.Settings.SettingStorageType.Synced,title:x(f.groupSimilarMessagesInConsole),settingName:"consoleGroupSimilar",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!0,options:[{value:!0,title:x(f.groupSimilarMessagesInConsole)},{value:!1,title:x(f.doNotGroupSimilarMessagesIn)}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.CONSOLE,title:x(f.showCorsErrorsInConsole),settingName:"consoleShowsCorsErrors",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!0,options:[{value:!0,title:x(f.showCorsErrorsInConsole)},{value:!1,title:x(f.doNotShowCorsErrorsIn)}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.CONSOLE,storageType:t.Settings.SettingStorageType.Synced,title:x(f.eagerEvaluation),settingName:"consoleEagerEval",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!0,options:[{value:!0,title:x(f.eagerlyEvaluateConsolePromptText)},{value:!1,title:x(f.doNotEagerlyEvaluateConsole)}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.CONSOLE,storageType:t.Settings.SettingStorageType.Synced,title:x(f.evaluateTriggersUserActivation),settingName:"consoleUserActivationEval",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!0,options:[{value:!0,title:x(f.treatEvaluationAsUserActivation)},{value:!1,title:x(f.doNotTreatEvaluationAsUser)}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.CONSOLE,storageType:t.Settings.SettingStorageType.Synced,title:x(f.expandConsoleTraceMessagesByDefault),settingName:"consoleTraceExpand",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!0,options:[{value:!0,title:x(f.expandConsoleTraceMessagesByDefault)},{value:!1,title:x(f.collapseConsoleTraceMessagesByDefault)}]}),t.Revealer.registerRevealer({contextTypes:()=>[t.Console.Console],loadRevealer:async()=>(await D()).ConsolePanel.ConsoleRevealer.instance(),destination:void 0});const L={coverage:"Coverage",showCoverage:"Show Coverage",instrumentCoverage:"Instrument coverage",stopInstrumentingCoverageAndShow:"Stop instrumenting coverage and show results",startInstrumentingCoverageAnd:"Start instrumenting coverage and reload page",reloadPage:"Reload page"},O=i.i18n.registerUIStrings("panels/coverage/coverage-meta.ts",L),P=i.i18n.getLazilyComputedLocalizedString.bind(void 0,O);let I,M;async function k(){return I||(I=await import("../../panels/coverage/coverage.js")),I}c.ViewManager.registerViewExtension({location:"drawer-view",id:"coverage",title:P(L.coverage),commandPrompt:P(L.showCoverage),persistence:"closeable",order:100,loadView:async()=>(await k()).CoverageView.CoverageView.instance()}),c.ActionRegistration.registerActionExtension({actionId:"coverage.toggle-recording",iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,loadActionDelegate:async()=>(await k()).CoverageView.ActionDelegate.instance(),category:c.ActionRegistration.ActionCategory.PERFORMANCE,options:[{value:!0,title:P(L.instrumentCoverage)},{value:!1,title:P(L.stopInstrumentingCoverageAndShow)}]}),c.ActionRegistration.registerActionExtension({actionId:"coverage.start-with-reload",iconClass:"refresh",loadActionDelegate:async()=>(await k()).CoverageView.ActionDelegate.instance(),category:c.ActionRegistration.ActionCategory.PERFORMANCE,title:P(L.startInstrumentingCoverageAnd)}),c.ActionRegistration.registerActionExtension({actionId:"coverage.reload",iconClass:"refresh",loadActionDelegate:async()=>(await k()).CoverageView.ActionDelegate.instance(),category:c.ActionRegistration.ActionCategory.PERFORMANCE,title:P(L.reloadPage)});const V={changes:"Changes",showChanges:"Show Changes"},F=i.i18n.registerUIStrings("panels/changes/changes-meta.ts",V),B=i.i18n.getLazilyComputedLocalizedString.bind(void 0,F);async function U(){return M||(M=await import("../../panels/changes/changes.js")),M}c.ViewManager.registerViewExtension({location:"drawer-view",id:"changes.changes",title:B(V.changes),commandPrompt:B(V.showChanges),persistence:"closeable",loadView:async()=>(await U()).ChangesView.ChangesView.instance()}),t.Revealer.registerRevealer({contextTypes:()=>[g.WorkspaceDiff.DiffUILocation],destination:t.Revealer.RevealerDestination.CHANGES_DRAWER,loadRevealer:async()=>(await U()).ChangesView.DiffUILocationRevealer.instance()});const G={memoryInspector:"Memory Inspector",showMemoryInspector:"Show Memory Inspector"},H=i.i18n.registerUIStrings("ui/components/linear_memory_inspector/linear_memory_inspector-meta.ts",G),_=i.i18n.getLazilyComputedLocalizedString.bind(void 0,H);let W;c.ViewManager.registerViewExtension({location:"drawer-view",id:"linear-memory-inspector",title:_(G.memoryInspector),commandPrompt:_(G.showMemoryInspector),order:100,persistence:"closeable",loadView:async()=>(await async function(){return W||(W=await import("../../ui/components/linear_memory_inspector/linear_memory_inspector.js")),W}()).LinearMemoryInspectorPane.Wrapper.instance()});const z={devices:"Devices",showDevices:"Show Devices"},j=i.i18n.registerUIStrings("panels/settings/emulation/emulation-meta.ts",z),q=i.i18n.getLazilyComputedLocalizedString.bind(void 0,j);let J;c.ViewManager.registerViewExtension({location:"settings-view",commandPrompt:q(z.showDevices),title:q(z.devices),order:30,loadView:async()=>(await async function(){return J||(J=await import("../../panels/settings/emulation/emulation.js")),J}()).DevicesSettingsTab.DevicesSettingsTab.instance(),id:"devices",settings:["standardEmulatedDeviceList","customEmulatedDeviceList"]});const K={shortcuts:"Shortcuts",preferences:"Preferences",experiments:"Experiments",ignoreList:"Ignore List",showShortcuts:"Show Shortcuts",showPreferences:"Show Preferences",showExperiments:"Show Experiments",showIgnoreList:"Show Ignore List",settings:"Settings",documentation:"Documentation"},Q=i.i18n.registerUIStrings("panels/settings/settings-meta.ts",K),Y=i.i18n.getLazilyComputedLocalizedString.bind(void 0,Q);let X;async function Z(){return X||(X=await import("../../panels/settings/settings.js")),X}c.ViewManager.registerViewExtension({location:"settings-view",id:"preferences",title:Y(K.preferences),commandPrompt:Y(K.showPreferences),order:0,loadView:async()=>(await Z()).SettingsScreen.GenericSettingsTab.instance()}),c.ViewManager.registerViewExtension({location:"settings-view",id:"experiments",title:Y(K.experiments),commandPrompt:Y(K.showExperiments),order:3,experiment:e.Runtime.ExperimentName.ALL,loadView:async()=>(await Z()).SettingsScreen.ExperimentsSettingsTab.instance()}),c.ViewManager.registerViewExtension({location:"settings-view",id:"blackbox",title:Y(K.ignoreList),commandPrompt:Y(K.showIgnoreList),order:4,loadView:async()=>(await Z()).FrameworkIgnoreListSettingsTab.FrameworkIgnoreListSettingsTab.instance()}),c.ViewManager.registerViewExtension({location:"settings-view",id:"keybinds",title:Y(K.shortcuts),commandPrompt:Y(K.showShortcuts),order:100,loadView:async()=>(await Z()).KeybindsSettingsTab.KeybindsSettingsTab.instance()}),c.ActionRegistration.registerActionExtension({category:c.ActionRegistration.ActionCategory.SETTINGS,actionId:"settings.show",title:Y(K.settings),loadActionDelegate:async()=>(await Z()).SettingsScreen.ActionDelegate.instance(),iconClass:"gear",bindings:[{shortcut:"F1",keybindSets:["devToolsDefault"]},{shortcut:"Shift+?"},{platform:"windows,linux",shortcut:"Ctrl+,",keybindSets:["vsCode"]},{platform:"mac",shortcut:"Meta+,",keybindSets:["vsCode"]}]}),c.ActionRegistration.registerActionExtension({category:c.ActionRegistration.ActionCategory.SETTINGS,actionId:"settings.documentation",title:Y(K.documentation),loadActionDelegate:async()=>(await Z()).SettingsScreen.ActionDelegate.instance()}),c.ActionRegistration.registerActionExtension({category:c.ActionRegistration.ActionCategory.SETTINGS,actionId:"settings.shortcuts",title:Y(K.shortcuts),loadActionDelegate:async()=>(await Z()).SettingsScreen.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+K Ctrl+S",keybindSets:["vsCode"]},{platform:"mac",shortcut:"Meta+K Meta+S",keybindSets:["vsCode"]}]}),c.ViewManager.registerLocationResolver({name:"settings-view",category:c.ViewManager.ViewLocationCategory.SETTINGS,loadResolver:async()=>(await Z()).SettingsScreen.SettingsScreen.instance()}),t.Revealer.registerRevealer({contextTypes:()=>[t.Settings.Setting,e.Runtime.Experiment],loadRevealer:async()=>(await Z()).SettingsScreen.Revealer.instance(),destination:void 0}),c.ContextMenu.registerItem({location:c.ContextMenu.ItemLocation.MAIN_MENU_FOOTER,actionId:"settings.shortcuts",order:void 0}),c.ContextMenu.registerItem({location:c.ContextMenu.ItemLocation.MAIN_MENU_HELP_DEFAULT,actionId:"settings.documentation",order:void 0});const $={protocolMonitor:"Protocol monitor",showProtocolMonitor:"Show Protocol monitor"},ee=i.i18n.registerUIStrings("panels/protocol_monitor/protocol_monitor-meta.ts",$),te=i.i18n.getLazilyComputedLocalizedString.bind(void 0,ee);let oe;c.ViewManager.registerViewExtension({location:"drawer-view",id:"protocol-monitor",title:te($.protocolMonitor),commandPrompt:te($.showProtocolMonitor),order:100,persistence:"closeable",loadView:async()=>(await async function(){return oe||(oe=await import("../../panels/protocol_monitor/protocol_monitor.js")),oe}()).ProtocolMonitor.ProtocolMonitorImpl.instance(),experiment:e.Runtime.ExperimentName.PROTOCOL_MONITOR});const ie={workspace:"Workspace",showWorkspace:"Show Workspace",enableLocalOverrides:"Enable Local Overrides",interception:"interception",override:"override",network:"network",rewrite:"rewrite",request:"request",enableOverrideNetworkRequests:"Enable override network requests",disableOverrideNetworkRequests:"Disable override network requests"},ne=i.i18n.registerUIStrings("models/persistence/persistence-meta.ts",ie),ae=i.i18n.getLazilyComputedLocalizedString.bind(void 0,ne);let se;async function re(){return se||(se=await import("../../models/persistence/persistence.js")),se}c.ViewManager.registerViewExtension({location:"settings-view",id:"workspace",title:ae(ie.workspace),commandPrompt:ae(ie.showWorkspace),order:1,loadView:async()=>(await re()).WorkspaceSettingsTab.WorkspaceSettingsTab.instance()}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.PERSISTENCE,title:ae(ie.enableLocalOverrides),settingName:"persistenceNetworkOverridesEnabled",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!1,tags:[ae(ie.interception),ae(ie.override),ae(ie.network),ae(ie.rewrite),ae(ie.request)],options:[{value:!0,title:ae(ie.enableOverrideNetworkRequests)},{value:!1,title:ae(ie.disableOverrideNetworkRequests)}]}),c.ContextMenu.registerProvider({contextTypes:()=>[s.UISourceCode.UISourceCode,n.Resource.Resource,n.NetworkRequest.NetworkRequest],loadProvider:async()=>(await re()).PersistenceActions.ContextMenuProvider.instance(),experiment:void 0});const le={preserveLog:"Preserve log",preserve:"preserve",clear:"clear",reset:"reset",preserveLogOnPageReload:"Preserve log on page reload / navigation",doNotPreserveLogOnPageReload:"Do not preserve log on page reload / navigation",recordNetworkLog:"Record network log"},ce=i.i18n.registerUIStrings("models/logs/logs-meta.ts",le),ge=i.i18n.getLazilyComputedLocalizedString.bind(void 0,ce);t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.NETWORK,title:ge(le.preserveLog),settingName:"network_log.preserve-log",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!1,tags:[ge(le.preserve),ge(le.clear),ge(le.reset)],options:[{value:!0,title:ge(le.preserveLogOnPageReload)},{value:!1,title:ge(le.doNotPreserveLogOnPageReload)}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.NETWORK,title:ge(le.recordNetworkLog),settingName:"network_log.record-log",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!0,storageType:t.Settings.SettingStorageType.Session});const de={focusDebuggee:"Focus debuggee",toggleDrawer:"Toggle drawer",nextPanel:"Next panel",previousPanel:"Previous panel",reloadDevtools:"Reload DevTools",restoreLastDockPosition:"Restore last dock position",zoomIn:"Zoom in",zoomOut:"Zoom out",resetZoomLevel:"Reset zoom level",searchInPanel:"Search in panel",cancelSearch:"Cancel search",findNextResult:"Find next result",findPreviousResult:"Find previous result",theme:"Theme:",switchToSystemPreferredColor:"Switch to system preferred color theme",systemPreference:"System preference",switchToLightTheme:"Switch to light theme",lightCapital:"Light",switchToDarkTheme:"Switch to dark theme",darkCapital:"Dark",darkLower:"dark",lightLower:"light",panelLayout:"Panel layout:",useHorizontalPanelLayout:"Use horizontal panel layout",horizontal:"horizontal",useVerticalPanelLayout:"Use vertical panel layout",vertical:"vertical",useAutomaticPanelLayout:"Use automatic panel layout",auto:"auto",colorFormat:"Color format:",setColorFormatAsAuthored:"Set color format as authored",asAuthored:"As authored",setColorFormatToHex:"Set color format to HEX",setColorFormatToRgb:"Set color format to RGB",setColorFormatToHsl:"Set color format to HSL",enableCtrlShortcutToSwitchPanels:"Enable Ctrl + 1-9 shortcut to switch panels",enableShortcutToSwitchPanels:"Enable ⌘ + 1-9 shortcut to switch panels",right:"Right",dockToRight:"Dock to right",bottom:"Bottom",dockToBottom:"Dock to bottom",left:"Left",dockToLeft:"Dock to left",undocked:"Undocked",undockIntoSeparateWindow:"Undock into separate window",devtoolsDefault:"DevTools (Default)",language:"Language:",browserLanguage:"Browser UI language",enableSync:"Enable settings sync",colorFormatSettingDisabled:"This setting is deprecated because it is incompatible with modern color spaces. To re-enable it, disable the corresponding experiment.",searchAsYouTypeSetting:"Search as you type",searchAsYouTypeCommand:"Enable search as you type",searchOnEnterCommand:"Disable search as you type (press Enter to search)"},ue=i.i18n.registerUIStrings("entrypoints/main/main-meta.ts",de),Se=i.i18n.getLazilyComputedLocalizedString.bind(void 0,ue);let pe,me;async function ye(){return pe||(pe=await import("../main/main.js")),pe}function we(e){return()=>i.i18n.getLocalizedLanguageRegion(e,i.DevToolsLocale.DevToolsLocale.instance())}c.ActionRegistration.registerActionExtension({category:c.ActionRegistration.ActionCategory.DRAWER,actionId:"inspector_main.focus-debuggee",loadActionDelegate:async()=>(await async function(){return me||(me=await import("../inspector_main/inspector_main.js")),me}()).InspectorMain.FocusDebuggeeActionDelegate.instance(),order:100,title:Se(de.focusDebuggee)}),c.ActionRegistration.registerActionExtension({category:c.ActionRegistration.ActionCategory.DRAWER,actionId:"main.toggle-drawer",loadActionDelegate:async()=>c.InspectorView.ActionDelegate.instance(),order:101,title:Se(de.toggleDrawer),bindings:[{shortcut:"Esc"}]}),c.ActionRegistration.registerActionExtension({actionId:"main.next-tab",category:c.ActionRegistration.ActionCategory.GLOBAL,title:Se(de.nextPanel),loadActionDelegate:async()=>c.InspectorView.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+]"},{platform:"mac",shortcut:"Meta+]"}]}),c.ActionRegistration.registerActionExtension({actionId:"main.previous-tab",category:c.ActionRegistration.ActionCategory.GLOBAL,title:Se(de.previousPanel),loadActionDelegate:async()=>c.InspectorView.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+["},{platform:"mac",shortcut:"Meta+["}]}),c.ActionRegistration.registerActionExtension({actionId:"main.debug-reload",category:c.ActionRegistration.ActionCategory.GLOBAL,title:Se(de.reloadDevtools),loadActionDelegate:async()=>(await ye()).MainImpl.ReloadActionDelegate.instance(),bindings:[{shortcut:"Alt+R"}]}),c.ActionRegistration.registerActionExtension({category:c.ActionRegistration.ActionCategory.GLOBAL,title:Se(de.restoreLastDockPosition),actionId:"main.toggle-dock",loadActionDelegate:async()=>c.DockController.ToggleDockActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+D"},{platform:"mac",shortcut:"Meta+Shift+D"}]}),c.ActionRegistration.registerActionExtension({actionId:"main.zoom-in",category:c.ActionRegistration.ActionCategory.GLOBAL,title:Se(de.zoomIn),loadActionDelegate:async()=>(await ye()).MainImpl.ZoomActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Plus",keybindSets:["devToolsDefault","vsCode"]},{platform:"windows,linux",shortcut:"Ctrl+Shift+Plus"},{platform:"windows,linux",shortcut:"Ctrl+NumpadPlus"},{platform:"windows,linux",shortcut:"Ctrl+Shift+NumpadPlus"},{platform:"mac",shortcut:"Meta+Plus",keybindSets:["devToolsDefault","vsCode"]},{platform:"mac",shortcut:"Meta+Shift+Plus"},{platform:"mac",shortcut:"Meta+NumpadPlus"},{platform:"mac",shortcut:"Meta+Shift+NumpadPlus"}]}),c.ActionRegistration.registerActionExtension({actionId:"main.zoom-out",category:c.ActionRegistration.ActionCategory.GLOBAL,title:Se(de.zoomOut),loadActionDelegate:async()=>(await ye()).MainImpl.ZoomActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Minus",keybindSets:["devToolsDefault","vsCode"]},{platform:"windows,linux",shortcut:"Ctrl+Shift+Minus"},{platform:"windows,linux",shortcut:"Ctrl+NumpadMinus"},{platform:"windows,linux",shortcut:"Ctrl+Shift+NumpadMinus"},{platform:"mac",shortcut:"Meta+Minus",keybindSets:["devToolsDefault","vsCode"]},{platform:"mac",shortcut:"Meta+Shift+Minus"},{platform:"mac",shortcut:"Meta+NumpadMinus"},{platform:"mac",shortcut:"Meta+Shift+NumpadMinus"}]}),c.ActionRegistration.registerActionExtension({actionId:"main.zoom-reset",category:c.ActionRegistration.ActionCategory.GLOBAL,title:Se(de.resetZoomLevel),loadActionDelegate:async()=>(await ye()).MainImpl.ZoomActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+0"},{platform:"windows,linux",shortcut:"Ctrl+Numpad0"},{platform:"mac",shortcut:"Meta+Numpad0"},{platform:"mac",shortcut:"Meta+0"}]}),c.ActionRegistration.registerActionExtension({actionId:"main.search-in-panel.find",category:c.ActionRegistration.ActionCategory.GLOBAL,title:Se(de.searchInPanel),loadActionDelegate:async()=>(await ye()).MainImpl.SearchActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+F",keybindSets:["devToolsDefault","vsCode"]},{platform:"mac",shortcut:"Meta+F",keybindSets:["devToolsDefault","vsCode"]},{platform:"mac",shortcut:"F3"}]}),c.ActionRegistration.registerActionExtension({actionId:"main.search-in-panel.cancel",category:c.ActionRegistration.ActionCategory.GLOBAL,title:Se(de.cancelSearch),loadActionDelegate:async()=>(await ye()).MainImpl.SearchActionDelegate.instance(),order:10,bindings:[{shortcut:"Esc"}]}),c.ActionRegistration.registerActionExtension({actionId:"main.search-in-panel.find-next",category:c.ActionRegistration.ActionCategory.GLOBAL,title:Se(de.findNextResult),loadActionDelegate:async()=>(await ye()).MainImpl.SearchActionDelegate.instance(),bindings:[{platform:"mac",shortcut:"Meta+G",keybindSets:["devToolsDefault","vsCode"]},{platform:"windows,linux",shortcut:"Ctrl+G"},{platform:"windows,linux",shortcut:"F3",keybindSets:["devToolsDefault","vsCode"]}]}),c.ActionRegistration.registerActionExtension({actionId:"main.search-in-panel.find-previous",category:c.ActionRegistration.ActionCategory.GLOBAL,title:Se(de.findPreviousResult),loadActionDelegate:async()=>(await ye()).MainImpl.SearchActionDelegate.instance(),bindings:[{platform:"mac",shortcut:"Meta+Shift+G",keybindSets:["devToolsDefault","vsCode"]},{platform:"windows,linux",shortcut:"Ctrl+Shift+G"},{platform:"windows,linux",shortcut:"Shift+F3",keybindSets:["devToolsDefault","vsCode"]}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.APPEARANCE,storageType:t.Settings.SettingStorageType.Synced,title:Se(de.theme),settingName:"uiTheme",settingType:t.Settings.SettingType.ENUM,defaultValue:"systemPreferred",reloadRequired:!1,options:[{title:Se(de.switchToSystemPreferredColor),text:Se(de.systemPreference),value:"systemPreferred"},{title:Se(de.switchToLightTheme),text:Se(de.lightCapital),value:"default"},{title:Se(de.switchToDarkTheme),text:Se(de.darkCapital),value:"dark"}],tags:[Se(de.darkLower),Se(de.lightLower)]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.APPEARANCE,storageType:t.Settings.SettingStorageType.Synced,title:Se(de.panelLayout),settingName:"sidebarPosition",settingType:t.Settings.SettingType.ENUM,defaultValue:"auto",options:[{title:Se(de.useHorizontalPanelLayout),text:Se(de.horizontal),value:"bottom"},{title:Se(de.useVerticalPanelLayout),text:Se(de.vertical),value:"right"},{title:Se(de.useAutomaticPanelLayout),text:Se(de.auto),value:"auto"}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.APPEARANCE,storageType:t.Settings.SettingStorageType.Synced,title:Se(de.colorFormat),settingName:"colorFormat",settingType:t.Settings.SettingType.ENUM,defaultValue:"original",options:[{title:Se(de.setColorFormatAsAuthored),text:Se(de.asAuthored),value:"original"},{title:Se(de.setColorFormatToHex),text:"HEX: #dac0de",value:"hex",raw:!0},{title:Se(de.setColorFormatToRgb),text:"RGB: rgb(128 255 255)",value:"rgb",raw:!0},{title:Se(de.setColorFormatToHsl),text:"HSL: hsl(300deg 80% 90%)",value:"hsl",raw:!0}],deprecationNotice:{disabled:!0,warning:Se(de.colorFormatSettingDisabled),experiment:e.Runtime.ExperimentName.DISABLE_COLOR_FORMAT_SETTING}}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.APPEARANCE,storageType:t.Settings.SettingStorageType.Synced,settingName:"language",settingType:t.Settings.SettingType.ENUM,title:Se(de.language),defaultValue:"en-US",options:[{value:"browserLanguage",title:Se(de.browserLanguage),text:Se(de.browserLanguage)},...i.i18n.getAllSupportedDevToolsLocales().sort().map((e=>{return{value:t=e,title:we(t),text:we(t)};var t}))],reloadRequired:!0}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.APPEARANCE,storageType:t.Settings.SettingStorageType.Synced,title:Se(de.enableCtrlShortcutToSwitchPanels),titleMac:Se(de.enableShortcutToSwitchPanels),settingName:"shortcutPanelSwitch",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!1}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.GLOBAL,settingName:"currentDockState",settingType:t.Settings.SettingType.ENUM,defaultValue:"right",options:[{value:"right",text:Se(de.right),title:Se(de.dockToRight)},{value:"bottom",text:Se(de.bottom),title:Se(de.dockToBottom)},{value:"left",text:Se(de.left),title:Se(de.dockToLeft)},{value:"undocked",text:Se(de.undocked),title:Se(de.undockIntoSeparateWindow)}]}),t.Settings.registerSettingExtension({storageType:t.Settings.SettingStorageType.Synced,settingName:"activeKeybindSet",settingType:t.Settings.SettingType.ENUM,defaultValue:"devToolsDefault",options:[{value:"devToolsDefault",title:Se(de.devtoolsDefault),text:Se(de.devtoolsDefault)},{value:"vsCode",title:i.i18n.lockedLazyString("Visual Studio Code"),text:i.i18n.lockedLazyString("Visual Studio Code")}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.SYNC,settingName:"sync_preferences",settingType:t.Settings.SettingType.BOOLEAN,title:Se(de.enableSync),defaultValue:!1,reloadRequired:!0}),t.Settings.registerSettingExtension({storageType:t.Settings.SettingStorageType.Synced,settingName:"userShortcuts",settingType:t.Settings.SettingType.ARRAY,defaultValue:[]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.GLOBAL,storageType:t.Settings.SettingStorageType.Local,title:Se(de.searchAsYouTypeSetting),settingName:"searchAsYouType",settingType:t.Settings.SettingType.BOOLEAN,order:3,defaultValue:!0,options:[{value:!0,title:Se(de.searchAsYouTypeCommand)},{value:!1,title:Se(de.searchOnEnterCommand)}]}),c.ViewManager.registerLocationResolver({name:"drawer-view",category:c.ViewManager.ViewLocationCategory.DRAWER,loadResolver:async()=>c.InspectorView.InspectorView.instance()}),c.ViewManager.registerLocationResolver({name:"drawer-sidebar",category:c.ViewManager.ViewLocationCategory.DRAWER_SIDEBAR,loadResolver:async()=>c.InspectorView.InspectorView.instance()}),c.ViewManager.registerLocationResolver({name:"panel",category:c.ViewManager.ViewLocationCategory.PANEL,loadResolver:async()=>c.InspectorView.InspectorView.instance()}),c.ContextMenu.registerProvider({contextTypes:()=>[s.UISourceCode.UISourceCode,n.Resource.Resource,n.NetworkRequest.NetworkRequest],loadProvider:async()=>d.Linkifier.ContentProviderContextMenuProvider.instance(),experiment:void 0}),c.ContextMenu.registerProvider({contextTypes:()=>[Node],loadProvider:async()=>c.XLink.ContextMenuProvider.instance(),experiment:void 0}),c.ContextMenu.registerProvider({contextTypes:()=>[Node],loadProvider:async()=>d.Linkifier.LinkContextMenuProvider.instance(),experiment:void 0}),c.Toolbar.registerToolbarItem({separator:!0,location:c.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_LEFT,order:100,showLabel:void 0,actionId:void 0,condition:void 0,loadItem:void 0}),c.Toolbar.registerToolbarItem({separator:!0,order:97,location:c.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_RIGHT,showLabel:void 0,actionId:void 0,condition:void 0,loadItem:void 0}),c.Toolbar.registerToolbarItem({loadItem:async()=>(await ye()).MainImpl.SettingsButtonProvider.instance(),order:99,location:c.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_RIGHT,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),c.Toolbar.registerToolbarItem({loadItem:async()=>(await ye()).MainImpl.MainMenuItem.instance(),order:100,location:c.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_RIGHT,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),c.Toolbar.registerToolbarItem({loadItem:async()=>c.DockController.CloseButtonProvider.instance(),order:101,location:c.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_RIGHT,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),t.AppProvider.registerAppProvider({loadAppProvider:async()=>(await ye()).SimpleApp.SimpleAppProvider.instance(),order:10,condition:void 0});const he={flamechartMouseWheelAction:"Flamechart mouse wheel action:",scroll:"Scroll",zoom:"Zoom",liveMemoryAllocationAnnotations:"Live memory allocation annotations",showLiveMemoryAllocation:"Show live memory allocation annotations",hideLiveMemoryAllocation:"Hide live memory allocation annotations",collectGarbage:"Collect garbage"},ve=i.i18n.registerUIStrings("ui/legacy/components/perf_ui/perf_ui-meta.ts",he),Ae=i.i18n.getLazilyComputedLocalizedString.bind(void 0,ve);let Ce;c.ActionRegistration.registerActionExtension({actionId:"components.collect-garbage",category:c.ActionRegistration.ActionCategory.PERFORMANCE,title:Ae(he.collectGarbage),iconClass:"bin",loadActionDelegate:async()=>(await async function(){return Ce||(Ce=await import("../../ui/legacy/components/perf_ui/perf_ui.js")),Ce}()).GCActionDelegate.GCActionDelegate.instance()}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.PERFORMANCE,storageType:t.Settings.SettingStorageType.Synced,title:Ae(he.flamechartMouseWheelAction),settingName:"flamechartMouseWheelAction",settingType:t.Settings.SettingType.ENUM,defaultValue:"zoom",options:[{title:Ae(he.scroll),text:Ae(he.scroll),value:"scroll"},{title:Ae(he.zoom),text:Ae(he.zoom),value:"zoom"}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.MEMORY,experiment:e.Runtime.ExperimentName.LIVE_HEAP_PROFILE,title:Ae(he.liveMemoryAllocationAnnotations),settingName:"memoryLiveHeapProfile",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:Ae(he.showLiveMemoryAllocation)},{value:!1,title:Ae(he.hideLiveMemoryAllocation)}]});const Ee={openFile:"Open file",runCommand:"Run command"},Te=i.i18n.registerUIStrings("ui/legacy/components/quick_open/quick_open-meta.ts",Ee),be=i.i18n.getLazilyComputedLocalizedString.bind(void 0,Te);let fe;async function Re(){return fe||(fe=await import("../../ui/legacy/components/quick_open/quick_open.js")),fe}c.ActionRegistration.registerActionExtension({actionId:"commandMenu.show",category:c.ActionRegistration.ActionCategory.GLOBAL,title:be(Ee.runCommand),loadActionDelegate:async()=>(await Re()).CommandMenu.ShowActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+P",keybindSets:["devToolsDefault","vsCode"]},{platform:"mac",shortcut:"Meta+Shift+P",keybindSets:["devToolsDefault","vsCode"]},{shortcut:"F1",keybindSets:["vsCode"]}]}),c.ActionRegistration.registerActionExtension({actionId:"quickOpen.show",category:c.ActionRegistration.ActionCategory.GLOBAL,title:be(Ee.openFile),loadActionDelegate:async()=>(await Re()).QuickOpen.ShowActionDelegate.instance(),order:100,bindings:[{platform:"mac",shortcut:"Meta+P",keybindSets:["devToolsDefault","vsCode"]},{platform:"mac",shortcut:"Meta+O",keybindSets:["devToolsDefault","vsCode"]},{platform:"windows,linux",shortcut:"Ctrl+P",keybindSets:["devToolsDefault","vsCode"]},{platform:"windows,linux",shortcut:"Ctrl+O",keybindSets:["devToolsDefault","vsCode"]}]}),c.ContextMenu.registerItem({location:c.ContextMenu.ItemLocation.MAIN_MENU_DEFAULT,actionId:"commandMenu.show",order:void 0}),c.ContextMenu.registerItem({location:c.ContextMenu.ItemLocation.MAIN_MENU_DEFAULT,actionId:"quickOpen.show",order:void 0});const xe={preserveLogUponNavigation:"Preserve log upon navigation",doNotPreserveLogUponNavigation:"Do not preserve log upon navigation",pauseOnExceptions:"Pause on exceptions",doNotPauseOnExceptions:"Do not pause on exceptions",disableJavascript:"Disable JavaScript",enableJavascript:"Enable JavaScript",disableAsyncStackTraces:"Disable async stack traces",doNotCaptureAsyncStackTraces:"Do not capture async stack traces",captureAsyncStackTraces:"Capture async stack traces",showRulersOnHover:"Show rulers on hover",doNotShowRulersOnHover:"Do not show rulers on hover",showAreaNames:"Show area names",showGridNamedAreas:"Show grid named areas",doNotShowGridNamedAreas:"Do not show grid named areas",showTrackSizes:"Show track sizes",showGridTrackSizes:"Show grid track sizes",doNotShowGridTrackSizes:"Do not show grid track sizes",extendGridLines:"Extend grid lines",doNotExtendGridLines:"Do not extend grid lines",showLineLabels:"Show line labels",hideLineLabels:"Hide line labels",showLineNumbers:"Show line numbers",showLineNames:"Show line names",showPaintFlashingRectangles:"Show paint flashing rectangles",hidePaintFlashingRectangles:"Hide paint flashing rectangles",showLayoutShiftRegions:"Show layout shift regions",hideLayoutShiftRegions:"Hide layout shift regions",highlightAdFrames:"Highlight ad frames",doNotHighlightAdFrames:"Do not highlight ad frames",showLayerBorders:"Show layer borders",hideLayerBorders:"Hide layer borders",showCoreWebVitalsOverlay:"Show Core Web Vitals overlay",hideCoreWebVitalsOverlay:"Hide Core Web Vitals overlay",showFramesPerSecondFpsMeter:"Show frames per second (FPS) meter",hideFramesPerSecondFpsMeter:"Hide frames per second (FPS) meter",showScrollPerformanceBottlenecks:"Show scroll performance bottlenecks",hideScrollPerformanceBottlenecks:"Hide scroll performance bottlenecks",emulateAFocusedPage:"Emulate a focused page",doNotEmulateAFocusedPage:"Do not emulate a focused page",doNotEmulateCssMediaType:"Do not emulate CSS media type",noEmulation:"No emulation",emulateCssPrintMediaType:"Emulate CSS print media type",print:"print",emulateCssScreenMediaType:"Emulate CSS screen media type",screen:"screen",query:"query",emulateCssMediaType:"Emulate CSS media type",doNotEmulateCss:"Do not emulate CSS {PH1}",emulateCss:"Emulate CSS {PH1}",emulateCssMediaFeature:"Emulate CSS media feature {PH1}",doNotEmulateAnyVisionDeficiency:"Do not emulate any vision deficiency",emulateBlurredVision:"Emulate blurred vision",emulateReducedContrast:"Emulate reduced contrast",blurredVision:"Blurred vision",reducedContrast:"Reduced contrast",emulateProtanopia:"Emulate protanopia (no red)",protanopia:"Protanopia (no red)",emulateDeuteranopia:"Emulate deuteranopia (no green)",deuteranopia:"Deuteranopia (no green)",emulateTritanopia:"Emulate tritanopia (no blue)",tritanopia:"Tritanopia (no blue)",emulateAchromatopsia:"Emulate achromatopsia (no color)",achromatopsia:"Achromatopsia (no color)",emulateVisionDeficiencies:"Emulate vision deficiencies",disableLocalFonts:"Disable local fonts",enableLocalFonts:"Enable local fonts",disableAvifFormat:"Disable `AVIF` format",enableAvifFormat:"Enable `AVIF` format",disableWebpFormat:"Disable `WebP` format",enableWebpFormat:"Enable `WebP` format",enableCustomFormatters:"Enable custom formatters",enableNetworkRequestBlocking:"Enable network request blocking",disableNetworkRequestBlocking:"Disable network request blocking",enableCache:"Enable cache",disableCache:"Disable cache (while DevTools is open)",emulateAutoDarkMode:"Emulate auto dark mode",enableRemoteFileLoading:"Allow `DevTools` to load resources, such as source maps, from remote file paths. Disabled by default for security reasons."},Ne=i.i18n.registerUIStrings("core/sdk/sdk-meta.ts",xe),De=i.i18n.getLazilyComputedLocalizedString.bind(void 0,Ne);t.Settings.registerSettingExtension({storageType:t.Settings.SettingStorageType.Synced,settingName:"skipStackFramesPattern",settingType:t.Settings.SettingType.REGEX,defaultValue:""}),t.Settings.registerSettingExtension({storageType:t.Settings.SettingStorageType.Synced,settingName:"skipContentScripts",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!0}),t.Settings.registerSettingExtension({storageType:t.Settings.SettingStorageType.Synced,settingName:"automaticallyIgnoreListKnownThirdPartyScripts",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!0}),t.Settings.registerSettingExtension({storageType:t.Settings.SettingStorageType.Synced,settingName:"enableIgnoreListing",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!0}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.CONSOLE,storageType:t.Settings.SettingStorageType.Synced,title:De(xe.preserveLogUponNavigation),settingName:"preserveConsoleLog",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:De(xe.preserveLogUponNavigation)},{value:!1,title:De(xe.doNotPreserveLogUponNavigation)}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.DEBUGGER,settingName:"pauseOnExceptionEnabled",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!1,options:[{value:!0,title:De(xe.pauseOnExceptions)},{value:!1,title:De(xe.doNotPauseOnExceptions)}]}),t.Settings.registerSettingExtension({settingName:"pauseOnCaughtException",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!1}),t.Settings.registerSettingExtension({settingName:"pauseOnUncaughtException",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!1}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.DEBUGGER,title:De(xe.disableJavascript),settingName:"javaScriptDisabled",settingType:t.Settings.SettingType.BOOLEAN,storageType:t.Settings.SettingStorageType.Session,order:1,defaultValue:!1,options:[{value:!0,title:De(xe.disableJavascript)},{value:!1,title:De(xe.enableJavascript)}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.DEBUGGER,title:De(xe.disableAsyncStackTraces),settingName:"disableAsyncStackTraces",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!1,order:2,options:[{value:!0,title:De(xe.doNotCaptureAsyncStackTraces)},{value:!1,title:De(xe.captureAsyncStackTraces)}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.DEBUGGER,settingName:"breakpointsActive",settingType:t.Settings.SettingType.BOOLEAN,storageType:t.Settings.SettingStorageType.Session,defaultValue:!0}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.ELEMENTS,storageType:t.Settings.SettingStorageType.Synced,title:De(xe.showRulersOnHover),settingName:"showMetricsRulers",settingType:t.Settings.SettingType.BOOLEAN,options:[{value:!0,title:De(xe.showRulersOnHover)},{value:!1,title:De(xe.doNotShowRulersOnHover)}],defaultValue:!1}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.GRID,storageType:t.Settings.SettingStorageType.Synced,title:De(xe.showAreaNames),settingName:"showGridAreas",settingType:t.Settings.SettingType.BOOLEAN,options:[{value:!0,title:De(xe.showGridNamedAreas)},{value:!1,title:De(xe.doNotShowGridNamedAreas)}],defaultValue:!1}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.GRID,storageType:t.Settings.SettingStorageType.Synced,title:De(xe.showTrackSizes),settingName:"showGridTrackSizes",settingType:t.Settings.SettingType.BOOLEAN,options:[{value:!0,title:De(xe.showGridTrackSizes)},{value:!1,title:De(xe.doNotShowGridTrackSizes)}],defaultValue:!1}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.GRID,storageType:t.Settings.SettingStorageType.Synced,title:De(xe.extendGridLines),settingName:"extendGridLines",settingType:t.Settings.SettingType.BOOLEAN,options:[{value:!0,title:De(xe.extendGridLines)},{value:!1,title:De(xe.doNotExtendGridLines)}],defaultValue:!1}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.GRID,storageType:t.Settings.SettingStorageType.Synced,title:De(xe.showLineLabels),settingName:"showGridLineLabels",settingType:t.Settings.SettingType.ENUM,options:[{title:De(xe.hideLineLabels),text:De(xe.hideLineLabels),value:"none"},{title:De(xe.showLineNumbers),text:De(xe.showLineNumbers),value:"lineNumbers"},{title:De(xe.showLineNames),text:De(xe.showLineNames),value:"lineNames"}],defaultValue:"lineNumbers"}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.RENDERING,settingName:"showPaintRects",settingType:t.Settings.SettingType.BOOLEAN,storageType:t.Settings.SettingStorageType.Session,options:[{value:!0,title:De(xe.showPaintFlashingRectangles)},{value:!1,title:De(xe.hidePaintFlashingRectangles)}],defaultValue:!1}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.RENDERING,settingName:"showLayoutShiftRegions",settingType:t.Settings.SettingType.BOOLEAN,storageType:t.Settings.SettingStorageType.Session,options:[{value:!0,title:De(xe.showLayoutShiftRegions)},{value:!1,title:De(xe.hideLayoutShiftRegions)}],defaultValue:!1}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.RENDERING,settingName:"showAdHighlights",settingType:t.Settings.SettingType.BOOLEAN,storageType:t.Settings.SettingStorageType.Session,options:[{value:!0,title:De(xe.highlightAdFrames)},{value:!1,title:De(xe.doNotHighlightAdFrames)}],defaultValue:!1}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.RENDERING,settingName:"showDebugBorders",settingType:t.Settings.SettingType.BOOLEAN,storageType:t.Settings.SettingStorageType.Session,options:[{value:!0,title:De(xe.showLayerBorders)},{value:!1,title:De(xe.hideLayerBorders)}],defaultValue:!1}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.RENDERING,settingName:"showWebVitals",settingType:t.Settings.SettingType.BOOLEAN,storageType:t.Settings.SettingStorageType.Session,options:[{value:!0,title:De(xe.showCoreWebVitalsOverlay)},{value:!1,title:De(xe.hideCoreWebVitalsOverlay)}],defaultValue:!1}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.RENDERING,settingName:"showFPSCounter",settingType:t.Settings.SettingType.BOOLEAN,storageType:t.Settings.SettingStorageType.Session,options:[{value:!0,title:De(xe.showFramesPerSecondFpsMeter)},{value:!1,title:De(xe.hideFramesPerSecondFpsMeter)}],defaultValue:!1}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.RENDERING,settingName:"showScrollBottleneckRects",settingType:t.Settings.SettingType.BOOLEAN,storageType:t.Settings.SettingStorageType.Session,options:[{value:!0,title:De(xe.showScrollPerformanceBottlenecks)},{value:!1,title:De(xe.hideScrollPerformanceBottlenecks)}],defaultValue:!1}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.RENDERING,title:De(xe.emulateAFocusedPage),settingName:"emulatePageFocus",settingType:t.Settings.SettingType.BOOLEAN,storageType:t.Settings.SettingStorageType.Session,defaultValue:!1,options:[{value:!0,title:De(xe.emulateAFocusedPage)},{value:!1,title:De(xe.doNotEmulateAFocusedPage)}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.RENDERING,settingName:"emulatedCSSMedia",settingType:t.Settings.SettingType.ENUM,storageType:t.Settings.SettingStorageType.Session,defaultValue:"",options:[{title:De(xe.doNotEmulateCssMediaType),text:De(xe.noEmulation),value:""},{title:De(xe.emulateCssPrintMediaType),text:De(xe.print),value:"print"},{title:De(xe.emulateCssScreenMediaType),text:De(xe.screen),value:"screen"}],tags:[De(xe.query)],title:De(xe.emulateCssMediaType)}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.RENDERING,settingName:"emulatedCSSMediaFeaturePrefersColorScheme",settingType:t.Settings.SettingType.ENUM,storageType:t.Settings.SettingStorageType.Session,defaultValue:"",options:[{title:De(xe.doNotEmulateCss,{PH1:"prefers-color-scheme"}),text:De(xe.noEmulation),value:""},{title:De(xe.emulateCss,{PH1:"prefers-color-scheme: light"}),text:i.i18n.lockedLazyString("prefers-color-scheme: light"),value:"light"},{title:De(xe.emulateCss,{PH1:"prefers-color-scheme: dark"}),text:i.i18n.lockedLazyString("prefers-color-scheme: dark"),value:"dark"}],tags:[De(xe.query)],title:De(xe.emulateCssMediaFeature,{PH1:"prefers-color-scheme"})}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.RENDERING,settingName:"emulatedCSSMediaFeatureForcedColors",settingType:t.Settings.SettingType.ENUM,storageType:t.Settings.SettingStorageType.Session,defaultValue:"",options:[{title:De(xe.doNotEmulateCss,{PH1:"forced-colors"}),text:De(xe.noEmulation),value:""},{title:De(xe.emulateCss,{PH1:"forced-colors: active"}),text:i.i18n.lockedLazyString("forced-colors: active"),value:"active"},{title:De(xe.emulateCss,{PH1:"forced-colors: none"}),text:i.i18n.lockedLazyString("forced-colors: none"),value:"none"}],tags:[De(xe.query)],title:De(xe.emulateCssMediaFeature,{PH1:"forced-colors"})}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.RENDERING,settingName:"emulatedCSSMediaFeaturePrefersReducedMotion",settingType:t.Settings.SettingType.ENUM,storageType:t.Settings.SettingStorageType.Session,defaultValue:"",options:[{title:De(xe.doNotEmulateCss,{PH1:"prefers-reduced-motion"}),text:De(xe.noEmulation),value:""},{title:De(xe.emulateCss,{PH1:"prefers-reduced-motion: reduce"}),text:i.i18n.lockedLazyString("prefers-reduced-motion: reduce"),value:"reduce"}],tags:[De(xe.query)],title:De(xe.emulateCssMediaFeature,{PH1:"prefers-reduced-motion"})}),t.Settings.registerSettingExtension({settingName:"emulatedCSSMediaFeaturePrefersContrast",settingType:t.Settings.SettingType.ENUM,storageType:t.Settings.SettingStorageType.Session,defaultValue:"",options:[{title:De(xe.doNotEmulateCss,{PH1:"prefers-contrast"}),text:De(xe.noEmulation),value:""},{title:De(xe.emulateCss,{PH1:"prefers-contrast: more"}),text:i.i18n.lockedLazyString("prefers-contrast: more"),value:"more"},{title:De(xe.emulateCss,{PH1:"prefers-contrast: less"}),text:i.i18n.lockedLazyString("prefers-contrast: less"),value:"less"},{title:De(xe.emulateCss,{PH1:"prefers-contrast: custom"}),text:i.i18n.lockedLazyString("prefers-contrast: custom"),value:"custom"}],tags:[De(xe.query)],title:De(xe.emulateCssMediaFeature,{PH1:"prefers-contrast"})}),t.Settings.registerSettingExtension({settingName:"emulatedCSSMediaFeaturePrefersReducedData",settingType:t.Settings.SettingType.ENUM,storageType:t.Settings.SettingStorageType.Session,defaultValue:"",options:[{title:De(xe.doNotEmulateCss,{PH1:"prefers-reduced-data"}),text:De(xe.noEmulation),value:""},{title:De(xe.emulateCss,{PH1:"prefers-reduced-data: reduce"}),text:i.i18n.lockedLazyString("prefers-reduced-data: reduce"),value:"reduce"}],title:De(xe.emulateCssMediaFeature,{PH1:"prefers-reduced-data"})}),t.Settings.registerSettingExtension({settingName:"emulatedCSSMediaFeatureColorGamut",settingType:t.Settings.SettingType.ENUM,storageType:t.Settings.SettingStorageType.Session,defaultValue:"",options:[{title:De(xe.doNotEmulateCss,{PH1:"color-gamut"}),text:De(xe.noEmulation),value:""},{title:De(xe.emulateCss,{PH1:"color-gamut: srgb"}),text:i.i18n.lockedLazyString("color-gamut: srgb"),value:"srgb"},{title:De(xe.emulateCss,{PH1:"color-gamut: p3"}),text:i.i18n.lockedLazyString("color-gamut: p3"),value:"p3"},{title:De(xe.emulateCss,{PH1:"color-gamut: rec2020"}),text:i.i18n.lockedLazyString("color-gamut: rec2020"),value:"rec2020"}],title:De(xe.emulateCssMediaFeature,{PH1:"color-gamut"})}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.RENDERING,settingName:"emulatedVisionDeficiency",settingType:t.Settings.SettingType.ENUM,storageType:t.Settings.SettingStorageType.Session,defaultValue:"none",options:[{title:De(xe.doNotEmulateAnyVisionDeficiency),text:De(xe.noEmulation),value:"none"},{title:De(xe.emulateBlurredVision),text:De(xe.blurredVision),value:"blurredVision"},{title:De(xe.emulateReducedContrast),text:De(xe.reducedContrast),value:"reducedContrast"},{title:De(xe.emulateProtanopia),text:De(xe.protanopia),value:"protanopia"},{title:De(xe.emulateDeuteranopia),text:De(xe.deuteranopia),value:"deuteranopia"},{title:De(xe.emulateTritanopia),text:De(xe.tritanopia),value:"tritanopia"},{title:De(xe.emulateAchromatopsia),text:De(xe.achromatopsia),value:"achromatopsia"}],tags:[De(xe.query)],title:De(xe.emulateVisionDeficiencies)}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.RENDERING,settingName:"localFontsDisabled",settingType:t.Settings.SettingType.BOOLEAN,storageType:t.Settings.SettingStorageType.Session,options:[{value:!0,title:De(xe.disableLocalFonts)},{value:!1,title:De(xe.enableLocalFonts)}],defaultValue:!1}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.RENDERING,settingName:"avifFormatDisabled",settingType:t.Settings.SettingType.BOOLEAN,storageType:t.Settings.SettingStorageType.Session,options:[{value:!0,title:De(xe.disableAvifFormat)},{value:!1,title:De(xe.enableAvifFormat)}],defaultValue:!1}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.RENDERING,settingName:"webpFormatDisabled",settingType:t.Settings.SettingType.BOOLEAN,storageType:t.Settings.SettingStorageType.Session,options:[{value:!0,title:De(xe.disableWebpFormat)},{value:!1,title:De(xe.enableWebpFormat)}],defaultValue:!1}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.CONSOLE,title:De(xe.enableCustomFormatters),settingName:"customFormatters",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!1}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.NETWORK,title:De(xe.enableNetworkRequestBlocking),settingName:"requestBlockingEnabled",settingType:t.Settings.SettingType.BOOLEAN,storageType:t.Settings.SettingStorageType.Session,defaultValue:!1,options:[{value:!0,title:De(xe.enableNetworkRequestBlocking)},{value:!1,title:De(xe.disableNetworkRequestBlocking)}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.NETWORK,title:De(xe.disableCache),settingName:"cacheDisabled",settingType:t.Settings.SettingType.BOOLEAN,order:0,defaultValue:!1,userActionCondition:"hasOtherClients",options:[{value:!0,title:De(xe.disableCache)},{value:!1,title:De(xe.enableCache)}]}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.RENDERING,title:De(xe.emulateAutoDarkMode),settingName:"emulateAutoDarkMode",settingType:t.Settings.SettingType.BOOLEAN,storageType:t.Settings.SettingStorageType.Session,defaultValue:!1}),t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.SOURCES,storageType:t.Settings.SettingStorageType.Synced,title:De(xe.enableRemoteFileLoading),settingName:"network.enable-remote-file-loading",settingType:t.Settings.SettingType.BOOLEAN,defaultValue:!1});const Le={defaultIndentation:"Default indentation:",setIndentationToSpaces:"Set indentation to 2 spaces",Spaces:"2 spaces",setIndentationToFSpaces:"Set indentation to 4 spaces",fSpaces:"4 spaces",setIndentationToESpaces:"Set indentation to 8 spaces",eSpaces:"8 spaces",setIndentationToTabCharacter:"Set indentation to tab character",tabCharacter:"Tab character"},Oe=i.i18n.registerUIStrings("ui/legacy/components/source_frame/source_frame-meta.ts",Le),Pe=i.i18n.getLazilyComputedLocalizedString.bind(void 0,Oe);let Ie,Me;t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.SOURCES,storageType:t.Settings.SettingStorageType.Synced,title:Pe(Le.defaultIndentation),settingName:"textEditorIndent",settingType:t.Settings.SettingType.ENUM,defaultValue:" ",options:[{title:Pe(Le.setIndentationToSpaces),text:Pe(Le.Spaces),value:" "},{title:Pe(Le.setIndentationToFSpaces),text:Pe(Le.fSpaces),value:" "},{title:Pe(Le.setIndentationToESpaces),text:Pe(Le.eSpaces),value:" "},{title:Pe(Le.setIndentationToTabCharacter),text:Pe(Le.tabCharacter),value:"\t"}]}),c.Toolbar.registerToolbarItem({loadItem:async()=>(await async function(){return Ie||(Ie=await import("../../panels/console_counters/console_counters.js")),Ie}()).WarningErrorCounter.WarningErrorCounter.instance(),order:1,location:c.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_RIGHT,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0}),c.UIUtils.registerRenderer({contextTypes:()=>[n.RemoteObject.RemoteObject],loadRenderer:async()=>(await async function(){return Me||(Me=await import("../../ui/legacy/components/object_ui/object_ui.js")),Me}()).ObjectPropertiesSection.Renderer.instance()}); diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/wasmparser_worker/wasmparser_worker-entrypoint.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/wasmparser_worker/wasmparser_worker-entrypoint.js deleted file mode 100644 index 729543256..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/wasmparser_worker/wasmparser_worker-entrypoint.js +++ /dev/null @@ -1 +0,0 @@ -import*as s from"./wasmparser_worker.js";self.onmessage=e=>{"disassemble"===e.data.method&&self.postMessage(s.WasmParserWorker.dissambleWASM(e.data.params,(s=>{self.postMessage(s)})))},self.postMessage("workerReady"); diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/wasmparser_worker/wasmparser_worker.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/wasmparser_worker/wasmparser_worker.js deleted file mode 100644 index 84121cd81..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/entrypoints/wasmparser_worker/wasmparser_worker.js +++ /dev/null @@ -1 +0,0 @@ -import*as e from"../../core/common/common.js";import*as s from"../../third_party/wasmparser/wasmparser.js";var t=Object.freeze({__proto__:null,dissambleWASM:function(t,o){try{const r=e.Base64.decode(t.content);let n=new s.WasmParser.BinaryReader;n.setData(r,0,r.byteLength);const a=new s.WasmDis.DevToolsNameGenerator;a.read(n);const f=new Uint8Array(r);n=new s.WasmParser.BinaryReader;const i=new s.WasmDis.WasmDisassembler;i.addOffsets=!0,i.exportMetadata=a.getExportMetadata(),i.nameResolver=a.getNameResolver();const m=[],c=[],l=[];let p=131072,d=new Uint8Array(p),h=0,g=0;for(let e=0;ef.length-e&&(p=f.length-e);const s=h+p;if(d.byteLength(await R()).EventListenerBreakpointsSidebarPane.EventListenerBreakpointsSidebarPane.instance(),id:"sources.eventListenerBreakpoints",location:"sources.sidebar-bottom",commandPrompt:p(d.showEventListenerBreakpoints),title:p(d.eventListenerBreakpoints),order:9,persistence:"permanent"}),t.ViewManager.registerViewExtension({loadView:async()=>(await R()).CSPViolationBreakpointsSidebarPane.CSPViolationBreakpointsSidebarPane.instance(),id:"sources.cspViolationBreakpoints",location:"sources.sidebar-bottom",commandPrompt:p(d.showCspViolationBreakpoints),title:p(d.cspViolationBreakpoints),order:10,persistence:"permanent"}),t.ViewManager.registerViewExtension({loadView:async()=>(await R()).XHRBreakpointsSidebarPane.XHRBreakpointsSidebarPane.instance(),id:"sources.xhrBreakpoints",location:"sources.sidebar-bottom",commandPrompt:p(d.showXhrfetchBreakpoints),title:p(d.xhrfetchBreakpoints),order:5,persistence:"permanent",hasToolbar:!0}),t.ViewManager.registerViewExtension({loadView:async()=>(await R()).DOMBreakpointsSidebarPane.DOMBreakpointsSidebarPane.instance(),id:"sources.domBreakpoints",location:"sources.sidebar-bottom",commandPrompt:p(d.showDomBreakpoints),title:p(d.domBreakpoints),order:7,persistence:"permanent"}),t.ViewManager.registerViewExtension({loadView:async()=>(await R()).ObjectEventListenersSidebarPane.ObjectEventListenersSidebarPane.instance(),id:"sources.globalListeners",location:"sources.sidebar-bottom",commandPrompt:p(d.showGlobalListeners),title:p(d.globalListeners),order:8,persistence:"permanent",hasToolbar:!0}),t.ViewManager.registerViewExtension({loadView:async()=>(await R()).DOMBreakpointsSidebarPane.DOMBreakpointsSidebarPane.instance(),id:"elements.domBreakpoints",location:"elements-sidebar",commandPrompt:p(d.showDomBreakpoints),title:p(d.domBreakpoints),order:6,persistence:"permanent"}),t.ViewManager.registerViewExtension({location:"navigator-view",id:"navigator-network",title:p(d.page),commandPrompt:p(d.showPage),order:2,persistence:"permanent",loadView:async()=>(await y()).SourcesNavigator.NetworkNavigatorView.instance()}),t.ViewManager.registerViewExtension({location:"navigator-view",id:"navigator-overrides",title:p(d.overrides),commandPrompt:p(d.showOverrides),order:4,persistence:"permanent",loadView:async()=>(await y()).SourcesNavigator.OverridesNavigatorView.instance()}),t.ViewManager.registerViewExtension({location:"navigator-view",id:"navigator-contentScripts",title:p(d.contentScripts),commandPrompt:p(d.showContentScripts),order:5,persistence:"permanent",loadView:async()=>(await y()).SourcesNavigator.ContentScriptsNavigatorView.instance()}),t.ContextMenu.registerProvider({contextTypes:()=>[e.DOMModel.DOMNode],loadProvider:async()=>(await R()).DOMBreakpointsSidebarPane.ContextMenuProvider.instance(),experiment:void 0}),t.Context.registerListener({contextTypes:()=>[e.DebuggerModel.DebuggerPausedDetails],loadListener:async()=>(await R()).XHRBreakpointsSidebarPane.XHRBreakpointsSidebarPane.instance()}),t.Context.registerListener({contextTypes:()=>[e.DebuggerModel.DebuggerPausedDetails],loadListener:async()=>(await R()).DOMBreakpointsSidebarPane.DOMBreakpointsSidebarPane.instance()});const A={developerResources:"Developer Resources",showDeveloperResources:"Show Developer Resources"},h=i.i18n.registerUIStrings("panels/developer_resources/developer_resources-meta.ts",A),S=i.i18n.getLazilyComputedLocalizedString.bind(void 0,h);let k;t.ViewManager.registerViewExtension({location:"drawer-view",id:"resource-loading-pane",title:S(A.developerResources),commandPrompt:S(A.showDeveloperResources),order:100,persistence:"closeable",experiment:o.Runtime.ExperimentName.DEVELOPER_RESOURCES_VIEW,loadView:async()=>new((await async function(){return k||(k=await import("../../panels/developer_resources/developer_resources.js")),k}()).DeveloperResourcesView.DeveloperResourcesView)});const P={issues:"Issues",showIssues:"Show Issues",cspViolations:"CSP Violations",showCspViolations:"Show CSP Violations"},v=i.i18n.registerUIStrings("panels/issues/issues-meta.ts",P),E=i.i18n.getLazilyComputedLocalizedString.bind(void 0,v);let T;async function C(){return T||(T=await import("../../panels/issues/issues.js")),T}t.ViewManager.registerViewExtension({location:"drawer-view",id:"issues-pane",title:E(P.issues),commandPrompt:E(P.showIssues),order:100,persistence:"closeable",loadView:async()=>(await C()).IssuesPane.IssuesPane.instance()}),t.ViewManager.registerViewExtension({location:"drawer-view",id:"csp-violations-pane",title:E(P.cspViolations),commandPrompt:E(P.showCspViolations),order:100,persistence:"closeable",loadView:async()=>(await C()).CSPViolationsView.CSPViolationsView.instance(),experiment:o.Runtime.ExperimentName.CSP_VIOLATIONS_VIEW}),n.Revealer.registerRevealer({contextTypes:()=>[r.Issue.Issue],destination:n.Revealer.RevealerDestination.ISSUES_VIEW,loadRevealer:async()=>(await C()).IssueRevealer.IssueRevealer.instance()});const f={resetView:"Reset view",switchToPanMode:"Switch to pan mode",switchToRotateMode:"Switch to rotate mode",zoomIn:"Zoom in",zoomOut:"Zoom out",panOrRotateUp:"Pan or rotate up",panOrRotateDown:"Pan or rotate down",panOrRotateLeft:"Pan or rotate left",panOrRotateRight:"Pan or rotate right"},b=i.i18n.registerUIStrings("panels/layer_viewer/layer_viewer-meta.ts",f),N=i.i18n.getLazilyComputedLocalizedString.bind(void 0,b);t.ActionRegistration.registerActionExtension({actionId:"layers.reset-view",category:t.ActionRegistration.ActionCategory.LAYERS,title:N(f.resetView),bindings:[{shortcut:"0"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.pan-mode",category:t.ActionRegistration.ActionCategory.LAYERS,title:N(f.switchToPanMode),bindings:[{shortcut:"x"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.rotate-mode",category:t.ActionRegistration.ActionCategory.LAYERS,title:N(f.switchToRotateMode),bindings:[{shortcut:"v"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.zoom-in",category:t.ActionRegistration.ActionCategory.LAYERS,title:N(f.zoomIn),bindings:[{shortcut:"Shift+Plus"},{shortcut:"NumpadPlus"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.zoom-out",category:t.ActionRegistration.ActionCategory.LAYERS,title:N(f.zoomOut),bindings:[{shortcut:"Shift+Minus"},{shortcut:"NumpadMinus"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.up",category:t.ActionRegistration.ActionCategory.LAYERS,title:N(f.panOrRotateUp),bindings:[{shortcut:"Up"},{shortcut:"w"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.down",category:t.ActionRegistration.ActionCategory.LAYERS,title:N(f.panOrRotateDown),bindings:[{shortcut:"Down"},{shortcut:"s"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.left",category:t.ActionRegistration.ActionCategory.LAYERS,title:N(f.panOrRotateLeft),bindings:[{shortcut:"Left"},{shortcut:"a"}]}),t.ActionRegistration.registerActionExtension({actionId:"layers.right",category:t.ActionRegistration.ActionCategory.LAYERS,title:N(f.panOrRotateRight),bindings:[{shortcut:"Right"},{shortcut:"d"}]});const x={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"},V=i.i18n.registerUIStrings("panels/mobile_throttling/mobile_throttling-meta.ts",x),L=i.i18n.getLazilyComputedLocalizedString.bind(void 0,V);let I;async function D(){return I||(I=await import("../../panels/mobile_throttling/mobile_throttling.js")),I}t.ViewManager.registerViewExtension({location:"settings-view",id:"throttling-conditions",title:L(x.throttling),commandPrompt:L(x.showThrottling),order:35,loadView:async()=>(await D()).ThrottlingSettingsTab.ThrottlingSettingsTab.instance(),settings:["customNetworkConditions"]}),t.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-offline",category:t.ActionRegistration.ActionCategory.NETWORK,title:L(x.goOffline),loadActionDelegate:async()=>(await D()).ThrottlingManager.ActionDelegate.instance(),tags:[L(x.device),L(x.throttlingTag)]}),t.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-low-end-mobile",category:t.ActionRegistration.ActionCategory.NETWORK,title:L(x.enableSlowGThrottling),loadActionDelegate:async()=>(await D()).ThrottlingManager.ActionDelegate.instance(),tags:[L(x.device),L(x.throttlingTag)]}),t.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-mid-tier-mobile",category:t.ActionRegistration.ActionCategory.NETWORK,title:L(x.enableFastGThrottling),loadActionDelegate:async()=>(await D()).ThrottlingManager.ActionDelegate.instance(),tags:[L(x.device),L(x.throttlingTag)]}),t.ActionRegistration.registerActionExtension({actionId:"network-conditions.network-online",category:t.ActionRegistration.ActionCategory.NETWORK,title:L(x.goOnline),loadActionDelegate:async()=>(await D()).ThrottlingManager.ActionDelegate.instance(),tags:[L(x.device),L(x.throttlingTag)]}),n.Settings.registerSettingExtension({storageType:n.Settings.SettingStorageType.Synced,settingName:"customNetworkConditions",settingType:n.Settings.SettingType.ARRAY,defaultValue:[]});const M={showNetwork:"Show Network",network:"Network",showNetworkRequestBlocking:"Show Network request blocking",networkRequestBlocking:"Network request blocking",showNetworkConditions:"Show Network conditions",networkConditions:"Network conditions",diskCache:"disk cache",networkThrottling:"network throttling",showSearch:"Show Search",search:"Search",recordNetworkLog:"Record network log",stopRecordingNetworkLog:"Stop recording network log",hideRequestDetails:"Hide request details",colorcodeResourceTypes:"Color-code resource types",colorCode:"color code",resourceType:"resource type",colorCodeByResourceType:"Color code by resource type",useDefaultColors:"Use default colors",groupNetworkLogByFrame:"Group network log by frame",netWork:"network",frame:"frame",group:"group",groupNetworkLogItemsByFrame:"Group network log items by frame",dontGroupNetworkLogItemsByFrame:"Don't group network log items by frame",clear:"Clear network log"},O=i.i18n.registerUIStrings("panels/network/network-meta.ts",M),B=i.i18n.getLazilyComputedLocalizedString.bind(void 0,O);let _;async function F(){return _||(_=await import("../../panels/network/network.js")),_}function j(e){return void 0===_?[]:e(_)}t.ViewManager.registerViewExtension({location:"panel",id:"network",commandPrompt:B(M.showNetwork),title:B(M.network),order:40,condition:o.Runtime.ConditionName.REACT_NATIVE_UNSTABLE_NETWORK_PANEL,loadView:async()=>(await F()).NetworkPanel.NetworkPanel.instance()}),t.ViewManager.registerViewExtension({location:"drawer-view",id:"network.blocked-urls",commandPrompt:B(M.showNetworkRequestBlocking),title:B(M.networkRequestBlocking),persistence:"closeable",order:60,loadView:async()=>(await F()).BlockedURLsPane.BlockedURLsPane.instance()}),t.ViewManager.registerViewExtension({location:"drawer-view",id:"network.config",commandPrompt:B(M.showNetworkConditions),title:B(M.networkConditions),persistence:"closeable",order:40,tags:[B(M.diskCache),B(M.networkThrottling),i.i18n.lockedLazyString("useragent"),i.i18n.lockedLazyString("user agent"),i.i18n.lockedLazyString("user-agent")],loadView:async()=>(await F()).NetworkConfigView.NetworkConfigView.instance()}),t.ViewManager.registerViewExtension({location:"network-sidebar",id:"network.search-network-tab",commandPrompt:B(M.showSearch),title:B(M.search),persistence:"permanent",loadView:async()=>(await F()).NetworkPanel.SearchNetworkView.instance()}),t.ActionRegistration.registerActionExtension({actionId:"network.toggle-recording",category:t.ActionRegistration.ActionCategory.NETWORK,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>j((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await F()).NetworkPanel.ActionDelegate.instance(),options:[{value:!0,title:B(M.recordNetworkLog)},{value:!1,title:B(M.stopRecordingNetworkLog)}],bindings:[{shortcut:"Ctrl+E",platform:"windows,linux"},{shortcut:"Meta+E",platform:"mac"}]}),t.ActionRegistration.registerActionExtension({actionId:"network.clear",category:t.ActionRegistration.ActionCategory.NETWORK,title:B(M.clear),iconClass:"clear",loadActionDelegate:async()=>(await F()).NetworkPanel.ActionDelegate.instance(),contextTypes:()=>j((e=>[e.NetworkPanel.NetworkPanel])),bindings:[{shortcut:"Ctrl+L"},{shortcut:"Meta+K",platform:"mac"}]}),t.ActionRegistration.registerActionExtension({actionId:"network.hide-request-details",category:t.ActionRegistration.ActionCategory.NETWORK,title:B(M.hideRequestDetails),contextTypes:()=>j((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await F()).NetworkPanel.ActionDelegate.instance(),bindings:[{shortcut:"Esc"}]}),t.ActionRegistration.registerActionExtension({actionId:"network.search",category:t.ActionRegistration.ActionCategory.NETWORK,title:B(M.search),contextTypes:()=>j((e=>[e.NetworkPanel.NetworkPanel])),loadActionDelegate:async()=>(await F()).NetworkPanel.ActionDelegate.instance(),bindings:[{platform:"mac",shortcut:"Meta+F",keybindSets:["devToolsDefault","vsCode"]},{platform:"windows,linux",shortcut:"Ctrl+F",keybindSets:["devToolsDefault","vsCode"]}]}),n.Settings.registerSettingExtension({category:n.Settings.SettingCategory.NETWORK,storageType:n.Settings.SettingStorageType.Synced,title:B(M.colorcodeResourceTypes),settingName:"networkColorCodeResourceTypes",settingType:n.Settings.SettingType.BOOLEAN,defaultValue:!1,tags:[B(M.colorCode),B(M.resourceType)],options:[{value:!0,title:B(M.colorCodeByResourceType)},{value:!1,title:B(M.useDefaultColors)}]}),n.Settings.registerSettingExtension({category:n.Settings.SettingCategory.NETWORK,storageType:n.Settings.SettingStorageType.Synced,title:B(M.groupNetworkLogByFrame),settingName:"network.group-by-frame",settingType:n.Settings.SettingType.BOOLEAN,defaultValue:!1,tags:[B(M.netWork),B(M.frame),B(M.group)],options:[{value:!0,title:B(M.groupNetworkLogItemsByFrame)},{value:!1,title:B(M.dontGroupNetworkLogItemsByFrame)}]}),t.ViewManager.registerLocationResolver({name:"network-sidebar",category:t.ViewManager.ViewLocationCategory.NETWORK,loadResolver:async()=>(await F()).NetworkPanel.NetworkPanel.instance()}),t.ContextMenu.registerProvider({contextTypes:()=>[e.NetworkRequest.NetworkRequest,e.Resource.Resource,a.UISourceCode.UISourceCode],loadProvider:async()=>(await F()).NetworkPanel.ContextMenuProvider.instance(),experiment:void 0}),n.Revealer.registerRevealer({contextTypes:()=>[e.NetworkRequest.NetworkRequest],destination:n.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await F()).NetworkPanel.RequestRevealer.instance()}),n.Revealer.registerRevealer({contextTypes:()=>[s.UIRequestLocation.UIRequestLocation],loadRevealer:async()=>(await F()).NetworkPanel.RequestLocationRevealer.instance(),destination:void 0}),n.Revealer.registerRevealer({contextTypes:()=>[s.NetworkRequestId.NetworkRequestId],destination:n.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await F()).NetworkPanel.RequestIdRevealer.instance()}),n.Revealer.registerRevealer({contextTypes:()=>[s.UIFilter.UIRequestFilter],destination:n.Revealer.RevealerDestination.NETWORK_PANEL,loadRevealer:async()=>(await F()).NetworkPanel.NetworkLogWithFilterRevealer.instance()});const U={application:"Application",showApplication:"Show Application",pwa:"pwa",clearSiteData:"Clear site data",clearSiteDataIncludingThirdparty:"Clear site data (including third-party cookies)",startRecordingEvents:"Start recording events",stopRecordingEvents:"Stop recording events"},W=i.i18n.registerUIStrings("panels/application/application-meta.ts",U),z=i.i18n.getLazilyComputedLocalizedString.bind(void 0,W);let q;async function G(){return q||(q=await import("../../panels/application/application.js")),q}t.ViewManager.registerViewExtension({location:"panel",id:"resources",title:z(U.application),commandPrompt:z(U.showApplication),order:70,loadView:async()=>(await G()).ResourcesPanel.ResourcesPanel.instance(),tags:[z(U.pwa)]}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.RESOURCES,actionId:"resources.clear",title:z(U.clearSiteData),loadActionDelegate:async()=>(await G()).StorageView.ActionDelegate.instance()}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.RESOURCES,actionId:"resources.clear-incl-third-party-cookies",title:z(U.clearSiteDataIncludingThirdparty),loadActionDelegate:async()=>(await G()).StorageView.ActionDelegate.instance()}),t.ActionRegistration.registerActionExtension({actionId:"background-service.toggle-recording",iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>void 0===q?[]:(e=>[e.BackgroundServiceView.BackgroundServiceView])(q),loadActionDelegate:async()=>(await G()).BackgroundServiceView.ActionDelegate.instance(),category:t.ActionRegistration.ActionCategory.BACKGROUND_SERVICES,options:[{value:!0,title:z(U.startRecordingEvents)},{value:!1,title:z(U.stopRecordingEvents)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),n.Revealer.registerRevealer({contextTypes:()=>[e.Resource.Resource],destination:n.Revealer.RevealerDestination.APPLICATION_PANEL,loadRevealer:async()=>(await G()).ResourcesPanel.ResourceRevealer.instance()}),n.Revealer.registerRevealer({contextTypes:()=>[e.ResourceTreeModel.ResourceTreeFrame],destination:n.Revealer.RevealerDestination.APPLICATION_PANEL,loadRevealer:async()=>(await G()).ResourcesPanel.FrameDetailsRevealer.instance()});const K={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"},Y=i.i18n.registerUIStrings("panels/timeline/timeline-meta.ts",K),H=i.i18n.getLazilyComputedLocalizedString.bind(void 0,Y);let J,X;async function Z(){return J||(J=await import("../../panels/timeline/timeline.js")),J}async function Q(){return X||(X=await import("../../panels/profiler/profiler.js")),X}function $(e){return void 0===J?[]:e(J)}t.ViewManager.registerViewExtension({location:"panel",id:"timeline",title:H(K.performance),commandPrompt:H(K.showPerformance),order:50,loadView:async()=>(await Z()).TimelinePanel.TimelinePanel.instance()}),t.ViewManager.registerViewExtension({location:"panel",id:"js_profiler",title:H(K.javascriptProfiler),commandPrompt:H(K.showJavascriptProfiler),persistence:"closeable",order:65,experiment:o.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,loadView:async()=>(await Q()).ProfilesPanel.JSProfilerPanel.instance()}),t.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:t.ActionRegistration.ActionCategory.PERFORMANCE,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>$((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await Z()).TimelinePanel.ActionDelegate.instance(),options:[{value:!0,title:H(K.record)},{value:!1,title:H(K.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>$((e=>[e.TimelinePanel.TimelinePanel])),category:t.ActionRegistration.ActionCategory.PERFORMANCE,title:H(K.startProfilingAndReloadPage),loadActionDelegate:async()=>(await Z()).TimelinePanel.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.PERFORMANCE,actionId:"timeline.save-to-file",contextTypes:()=>$((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await Z()).TimelinePanel.ActionDelegate.instance(),title:H(K.saveProfile),bindings:[{platform:"windows,linux",shortcut:"Ctrl+S"},{platform:"mac",shortcut:"Meta+S"}]}),t.ActionRegistration.registerActionExtension({category:t.ActionRegistration.ActionCategory.PERFORMANCE,actionId:"timeline.load-from-file",contextTypes:()=>$((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await Z()).TimelinePanel.ActionDelegate.instance(),title:H(K.loadProfile),bindings:[{platform:"windows,linux",shortcut:"Ctrl+O"},{platform:"mac",shortcut:"Meta+O"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.jump-to-previous-frame",category:t.ActionRegistration.ActionCategory.PERFORMANCE,title:H(K.previousFrame),contextTypes:()=>$((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await Z()).TimelinePanel.ActionDelegate.instance(),bindings:[{shortcut:"["}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.jump-to-next-frame",category:t.ActionRegistration.ActionCategory.PERFORMANCE,title:H(K.nextFrame),contextTypes:()=>$((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await Z()).TimelinePanel.ActionDelegate.instance(),bindings:[{shortcut:"]"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>(await Z()).TimelinePanel.ActionDelegate.instance(),category:t.ActionRegistration.ActionCategory.PERFORMANCE,title:H(K.showRecentTimelineSessions),contextTypes:()=>$((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.previous-recording",category:t.ActionRegistration.ActionCategory.PERFORMANCE,loadActionDelegate:async()=>(await Z()).TimelinePanel.ActionDelegate.instance(),title:H(K.previousRecording),contextTypes:()=>$((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Alt+Left"},{platform:"mac",shortcut:"Meta+Left"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.next-recording",category:t.ActionRegistration.ActionCategory.PERFORMANCE,loadActionDelegate:async()=>(await Z()).TimelinePanel.ActionDelegate.instance(),title:H(K.nextRecording),contextTypes:()=>$((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Alt+Right"},{platform:"mac",shortcut:"Meta+Right"}]}),t.ActionRegistration.registerActionExtension({actionId:"profiler.js-toggle-recording",category:t.ActionRegistration.ActionCategory.JAVASCRIPT_PROFILER,title:H(K.startStopRecording),iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>void 0===X?[]:(e=>[e.ProfilesPanel.JSProfilerPanel])(X),loadActionDelegate:async()=>(await Q()).ProfilesPanel.JSProfilerPanel.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),n.Settings.registerSettingExtension({category:n.Settings.SettingCategory.PERFORMANCE,storageType:n.Settings.SettingStorageType.Synced,title:H(K.hideChromeFrameInLayersView),settingName:"frameViewerHideChromeWindow",settingType:n.Settings.SettingType.BOOLEAN,defaultValue:!1}),n.Linkifier.registerLinkifier({contextTypes:()=>$((e=>[e.CLSLinkifier.CLSRect])),loadLinkifier:async()=>(await Z()).CLSLinkifier.Linkifier.instance()}),t.ContextMenu.registerItem({location:t.ContextMenu.ItemLocation.TIMELINE_MENU_OPEN,actionId:"timeline.load-from-file",order:10}),t.ContextMenu.registerItem({location:t.ContextMenu.ItemLocation.TIMELINE_MENU_OPEN,actionId:"timeline.save-to-file",order:15});const ee={main:"Main"},te=i.i18n.registerUIStrings("entrypoints/worker_app/WorkerMain.ts",ee),ie=i.i18n.getLocalizedString.bind(void 0,te);let oe;class ne{static instance(e={forceNew:null}){const{forceNew:t}=e;return oe&&!t||(oe=new ne),oe}async run(){e.Connections.initMainConnection((async()=>{await e.TargetManager.TargetManager.instance().maybeAttachInitialTarget()||e.TargetManager.TargetManager.instance().createTarget("main",ie(ee.main),e.Target.Type.ServiceWorker,null)}),l.TargetDetachedDialog.TargetDetachedDialog.webSocketConnectionLost),new c.NetworkPanelIndicator.NetworkPanelIndicator}}n.Runnable.registerEarlyInitializationRunnable(ne.instance),e.ChildTargetManager.ChildTargetManager.install((async({target:t,waitingForDebugger:i})=>{if(t.parentTarget()||t.type()!==e.Target.Type.ServiceWorker||!i)return;const o=t.model(e.DebuggerModel.DebuggerModel);o&&(o.isReadyToPause()||await o.once(e.DebuggerModel.Events.DebuggerIsReadyToPause),o.pause())})),self.runtime=o.Runtime.Runtime.instance({forceNew:!0}),new g.MainImpl.MainImpl; diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/inspector.html b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/inspector.html deleted file mode 100644 index 3484b3280..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/inspector.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - -DevTools (React Native) - - - - - - diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/integration_test_runner.html b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/integration_test_runner.html deleted file mode 100644 index 43fd26d68..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/integration_test_runner.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/js_app.html b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/js_app.html deleted file mode 100644 index b55821f5a..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/js_app.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - -DevTools (React Native) - - - - - - diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/legacy_test_runner/legacy_test_runner.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/legacy_test_runner/legacy_test_runner.js deleted file mode 100644 index 55b6c39ff..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/legacy_test_runner/legacy_test_runner.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -import '../core/common/common-legacy.js'; -import '../models/text_utils/text_utils-legacy.js'; -import '../core/host/host-legacy.js'; -import '../core/protocol_client/protocol_client-legacy.js'; -import '../ui/legacy/legacy-legacy.js'; -import '../models/workspace/workspace-legacy.js'; -import '../models/bindings/bindings-legacy.js'; -import '../ui/legacy/components/utils/utils-legacy.js'; -import '../models/persistence/persistence-legacy.js'; -import '../models/extensions/extensions-legacy.js'; -import '../entrypoints/devtools_app/devtools_app.js'; -import '../panels/accessibility/accessibility-legacy.js'; -import '../panels/animation/animation-legacy.js'; -import '../models/bindings/bindings-legacy.js'; -import '../models/breakpoints/breakpoints-legacy.js'; -import '../ui/legacy/components/color_picker/color_picker-legacy.js'; -import '../core/common/common-legacy.js'; -import '../ui/legacy/components/data_grid/data_grid-legacy.js'; -import '../third_party/diff/diff-legacy.js'; -import '../models/extensions/extensions-legacy.js'; -import '../models/formatter/formatter-legacy.js'; -import '../ui/legacy/components/inline_editor/inline_editor-legacy.js'; -import '../core/root/root-legacy.js'; -import '../core/sdk/sdk-legacy.js'; -import './test_runner/test_runner.js'; -// @ts-ignore -if (self.testRunner) { - // @ts-ignore - testRunner.dumpAsText(); - // @ts-ignore - testRunner.waitUntilDone(); -} -//# sourceMappingURL=legacy_test_runner.js.map \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/legacy_test_runner/test_runner/test_runner.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/legacy_test_runner/test_runner/test_runner.js deleted file mode 100644 index 2555e114e..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/legacy_test_runner/test_runner/test_runner.js +++ /dev/null @@ -1 +0,0 @@ -import*as e from"../../core/platform/platform.js";import"../../core/common/common.js";import*as n from"../../core/protocol_client/protocol_client.js";import*as t from"../../core/root/root.js";import*as r from"../../models/bindings/bindings.js";import*as o from"../../models/workspace/workspace.js";import*as s from"../../ui/components/code_highlighter/code_highlighter.js";import*as i from"../../ui/legacy/legacy.js";function a(){return!self.testRunner||Boolean(t.Runtime.Runtime.queryParam("debugFrontend"))}self.Platform=self.Platform||{},self.Platform.StringUtilities=e.StringUtilities,self.Platform.MapUtilities=e.MapUtilities,self.Platform.ArrayUtilities=e.ArrayUtilities,self.Platform.DOMUtilities=e.DOMUtilities,self.createPlainTextSearchRegex=e.StringUtilities.createPlainTextSearchRegex,String.sprintf=e.StringUtilities.sprintf,String.regexSpecialCharacters=e.StringUtilities.regexSpecialCharacters,String.caseInsensetiveComparator=e.StringUtilities.caseInsensetiveComparator,self.onerror=(e,n,t,r,o)=>{l("TEST ENDED IN ERROR: "+o.stack),p()},self.addEventListener("unhandledrejection",(e=>{l(`PROMISE FAILURE: ${e.reason.stack}`),p()})),a()||(console.log=(...e)=>{l(`log: ${e}`)},console.error=(...e)=>{l(`error: ${e}`)},console.info=(...e)=>{l(`info: ${e}`)},console.assert=(e,...n)=>{e||l(`ASSERTION FAILURE: ${n.join(" ")}`)});let u=[],c=e=>{u.push(String(e))};function l(e){c(e)}let d=!1,f=()=>{d||(d=!0,function(){Array.prototype.forEach.call(document.documentElement.childNodes,(e=>e.remove()));const e=document.createElement("div");e.style&&(e.style.whiteSpace="pre",e.style.height="10px",e.style.overflow="hidden");document.documentElement.appendChild(e);for(let n=0;nn.includes(o)?n:e),r[r.length-2]).trim().split("/"),i=s[s.length-1].slice(0,-1).split(":"),a=i[0],u=`test://evaluations/${y++}/`+a,c=parseInt(i[1],10);-1===(e="\n".repeat(c-1)+e).indexOf("sourceURL=")&&(e+=`//# sourceURL=${u}`);const d=await TestRunner.RuntimeAgent.invoke_evaluate({expression:e,objectGroup:"console"}),f=d[n.InspectorBackend.ProtocolError];return f?(l("Error: "+f),void p()):d}async function w(e,t){const r=await TestRunner.RuntimeAgent.invoke_evaluate({expression:e,objectGroup:"console",userGesture:t});if(!r[n.InspectorBackend.ProtocolError])return r.result.value;l("Error: "+(r.exceptionDetails&&r.exceptionDetails.text||"exception from evaluateInPageAnonymously.")),p()}async function S(e){const t=await TestRunner.RuntimeAgent.invoke_evaluate({expression:e,objectGroup:"console",includeCommandLineAPI:!1,awaitPromise:!0}),r=t[n.InspectorBackend.ProtocolError];if(!r&&!t.exceptionDetails)return t.result.value;let o="Error: ";r?o+=r:t.exceptionDetails&&(o+=t.exceptionDetails.text,t.exceptionDetails.exception&&(o+=" "+t.exceptionDetails.exception.description)),l(o),p()}function E(e){if(!e.includes(")/i,t=``;e=e.match(n)?e.replace(n,"$1"+t):t+e}return w(`document.write(\`${e=e.replace(/'/g,"\\'").replace(/\n/g,"\\n")}\`);document.close();`)}const x={formatAsTypeName:e=>"<"+typeof e+">",formatAsTypeNameOrNull:e=>null===e?"null":x.formatAsTypeName(e),formatAsRecentTime(e){if("object"!=typeof e||!(e instanceof Date))return x.formatAsTypeName(e);const n=Date.now()-e;return 0<=n&&n<18e5?"":e},formatAsURL(e){if(!e)return e;const n=e.lastIndexOf("devtools/");return n<0?e:".../"+e.substr(n)},formatAsDescription:e=>e?'"'+e.replace(/^function [gs]et /,"function ")+'"':e};function P(e,n,t,r){t=t||"",l((r=r||t)+"{");const o=Object.keys(e);o.sort();for(let r=0;r80?l(r+"was skipped due to prefix length limit"):null===e?l(r+"null"):e&&e.constructor&&"Array"===e.constructor.name?A(e,n,t,r):"object"==typeof e?P(e,n,t,r):l("string"==typeof e?r+'"'+e+'"':r+e)}function M(e,n,t){return t=t||function(){return!0},new Promise((r=>{n.addEventListener(e,(function o(s){if(!t(s.data))return;n.removeEventListener(e,o),r(s.data)}))}))}function b(e){return e.executionContexts().length?Promise.resolve(e.executionContexts()[0]):e.once(SDK.RuntimeModel.Events.ExecutionContextCreated)}let k;function N(e,n){k=g(n),TestRunner.resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.Load,L),w("window.location.replace('"+e+"')")}function L(){TestRunner.resourceTreeModel.removeEventListener(SDK.ResourceTreeModel.Events.Load,L),_()}function C(e){I(!1,void 0,e)}function I(e,n,t){k=g(t),TestRunner.resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.Load,O),TestRunner.resourceTreeModel.reloadPage(e,n)}function O(){TestRunner.resourceTreeModel.removeEventListener(SDK.ResourceTreeModel.Events.Load,O),l("Page reloaded."),_()}async function _(){if(await b(TestRunner.runtimeModel),k){const e=k;k=void 0,e()}}function K(e,n,t){if(e===n)return;let r;throw r=t?"Failure ("+t+"):":"Failure:",new Error(r+" expected <"+e+"> found <"+n+">")}function j(e=""){const n=t.Runtime.Runtime.queryParam("inspected_test")||t.Runtime.Runtime.queryParam("test");return new URL(e,n+"/../").href}async function U(){const e=Root.Runtime.queryParam("test");if(a())return n=console.log,c=n,f=()=>console.log("Test completed"),void(self.test=async function(){await import(e)});var n;try{await import(e)}catch(e){l("TEST ENDED EARLY DUE TO UNCAUGHT ERROR:"),l(e&&e.stack||e),l("=== DO NOT COMMIT THIS INTO -expected.txt ==="),p()}}self.testRunner,TestRunner.StringOutputStream=class{constructor(e){this.callback=e,this.buffer=""}async open(e){return!0}async write(e){this.buffer+=e}async close(){this.callback(this.buffer)}},TestRunner.MockSetting=class{constructor(e){this.value=e}get(){return this.value}set(e){this.value=e}},TestRunner.formatters=x,TestRunner.completeTest=p,TestRunner.addResult=l,TestRunner.addResults=function(e){if(e)for(let n=0,t=e.length;nh(e,n)))},TestRunner.callFunctionInPageAsync=function(e,n){return S(e+"("+(n=n||[]).map((e=>JSON.stringify(e))).join(",")+")")},TestRunner.evaluateInPageWithTimeout=function(e,n){w("setTimeout(unescape('"+escape(e)+"'), 1)",n)},TestRunner.evaluateFunctionInOverlay=function(e,n){const t='internals.evaluateInInspectorOverlay("(" + '+e+' + ")()")';TestRunner.runtimeModel.executionContexts()[0].evaluate({expression:t,objectGroup:"",includeCommandLineAPI:!1,silent:!1,returnByValue:!0,generatePreview:!1},!1,!1).then((e=>{n(e.object.value)}))},TestRunner.check=function(e,n){e||l("FAIL: "+n)},TestRunner.deprecatedRunAfterPendingDispatches=function(e){ProtocolClient.test.deprecatedRunAfterPendingDispatches(e)},TestRunner.loadHTML=E,TestRunner.addScriptTag=function(e){return S(`\n (function(){\n let script = document.createElement('script');\n script.src = '${e}';\n document.head.append(script);\n return new Promise(f => script.onload = f);\n })();\n `)},TestRunner.addStylesheetTag=function(e){return S(`\n (function(){\n const link = document.createElement('link');\n link.rel = 'stylesheet';\n link.href = '${e}';\n link.onload = onload;\n document.head.append(link);\n let resolve;\n const promise = new Promise(r => resolve = r);\n function onload() {\n // TODO(chenwilliam): It shouldn't be necessary to force\n // style recalc here but some tests rely on it.\n window.getComputedStyle(document.body).color;\n resolve();\n }\n return promise;\n })();\n `)},TestRunner.addIframe=function(e,n={}){return n.id=n.id||"",n.name=n.name||"",S(`\n (function(){\n const iframe = document.createElement('iframe');\n iframe.src = '${e}';\n iframe.id = '${n.id}';\n iframe.name = '${n.name}';\n document.body.appendChild(iframe);\n return new Promise(f => iframe.onload = f);\n })();\n `)},TestRunner.markStep=function(e){l("\nRunning: "+e)},TestRunner.startDumpingProtocolMessages=function(){ProtocolClient.test.dumpProtocol=self.testRunner.logToStderr.bind(self.testRunner)},TestRunner.addScriptForFrame=function(e,n,t){n+="\n//# sourceURL="+e;const r=TestRunner.runtimeModel.executionContexts().find((e=>e.frameId===t.id));TestRunner.RuntimeAgent.evaluate(n,"console",!1,!1,r.id)},TestRunner.addObject=P,TestRunner.addArray=A,TestRunner.dumpDeepInnerHTML=function(e){!function e(n,t){const r=[];if(t.nodeType===Node.TEXT_NODE)return void(t.parentElement&&"STYLE"===t.parentElement.nodeName||l(t.nodeValue));r.push("<"+t.nodeName);const o=t.attributes;for(let e=0;o&&e"),l(n+r.join(" "));for(let r=t.firstChild;r;r=r.nextSibling)e(n+" ",r);t.shadowRoot&&e(n+" ",t.shadowRoot),l(n+"")}("",e)},TestRunner.deepTextContent=function e(n){if(!n)return"";if(n.nodeType===Node.TEXT_NODE&&n.nodeValue)return n.parentElement&&"STYLE"===n.parentElement.nodeName?"":n.nodeValue;let t="";const r=n.childNodes;for(let n=0;n!0);for(const n of self.SDK.targetManager.targets())if(e(n))return Promise.resolve(n);return new Promise((n=>{const t={targetAdded:function(r){e(r)&&(self.SDK.targetManager.unobserveTargets(t),n(r))},targetRemoved:function(){}};self.SDK.targetManager.observeTargets(t)}))},TestRunner.waitForTargetRemoved=function(e){return new Promise((n=>{const t={targetRemoved:function(r){r===e&&(self.SDK.targetManager.unobserveTargets(t),n(r))},targetAdded:function(){}};self.SDK.targetManager.observeTargets(t)}))},TestRunner.waitForExecutionContext=b,TestRunner.waitForExecutionContextDestroyed=function(e){const n=e.runtimeModel;return-1===n.executionContexts().indexOf(e)?Promise.resolve():M(SDK.RuntimeModel.Events.ExecutionContextDestroyed,n,(n=>n===e))},TestRunner.assertGreaterOrEqual=function(e,n,t){eN(e,n)))},TestRunner.hardReloadPage=function(e){I(!0,void 0,e)},TestRunner.reloadPage=C,TestRunner.reloadPageWithInjectedScript=function(e,n){I(!1,e,n)},TestRunner.reloadPagePromise=function(){return new Promise((e=>C(e)))},TestRunner.pageLoaded=O,TestRunner.waitForPageLoad=function(e){TestRunner.resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.Load,(function n(){TestRunner.resourceTreeModel.removeEventListener(SDK.ResourceTreeModel.Events.Load,n),e()}))},TestRunner.runWhenPageLoads=function(e){const n=k;k=g((function(){n&&n(),e()}))},TestRunner.runTestSuite=function(e){const n=e.slice();!function e(){if(!n.length)return void p();const t=n.shift();l(""),l("Running: "+/function\s([^(]*)/.exec(t)[1]),g(t)(e)}()},TestRunner.assertEquals=K,TestRunner.assertTrue=function(e,n){K(!0,Boolean(e),n)},TestRunner.override=function(e,n,t,r){t=g(t);const o=e[n];if("function"!=typeof o)throw new Error("Cannot find method to override: "+n);return e[n]=function(s){try{return t.apply(this,arguments)}catch(e){throw new Error("Exception in overriden method '"+n+"': "+e)}finally{r||(e[n]=o)}},o},TestRunner.clearSpecificInfoFromStackFrames=function(e){let n=e.replace(/\(file:\/\/\/(?:[^)]+\)|[\w\/:-]+)/g,"(...)");return n=n.replace(/\(http:\/\/(?:[^)]+\)|[\w\/:-]+)/g,"(...)"),n=n.replace(/\(test:\/\/(?:[^)]+\)|[\w\/:-]+)/g,"(...)"),n=n.replace(/\(:[^)]+\)/g,"(...)"),n=n.replace(/VM\d+/g,"VM"),n.replace(/\s*at[^()]+\(native\)/g,"")},TestRunner.hideInspectorView=function(){i.InspectorView.InspectorView.instance().element.setAttribute("style","display:none !important")},TestRunner.mainFrame=function(){return TestRunner.resourceTreeModel.mainFrame},TestRunner.waitForUISourceCode=function(e,n){function t(t){return(!n||t.project().type()===n)&&(!(!n&&t.project().type()===o.Workspace.projectTypes.Service)&&!(e&&!t.url().endsWith(e)))}for(const n of self.Workspace.workspace.uiSourceCodes())if(e&&t(n))return Promise.resolve(n);return M(o.Workspace.Events.UISourceCodeAdded,self.Workspace.workspace,t)},TestRunner.waitForUISourceCodeRemoved=function(e){self.Workspace.workspace.once(o.Workspace.Events.UISourceCodeRemoved).then(e)},TestRunner.url=j,TestRunner.dumpSyntaxHighlight=function(e,n){const t=document.createElement("span");return t.textContent=e,s.CodeHighlighter.highlightNode(t,n).then((function(){const n=[];for(let e=0;e\n \n \n \n \n `).then((()=>U()))}}targetRemoved(e){}}SDK.targetManager.observeTargets(new W);const B=self.TestRunner;export{B as TestRunner,W as _TestObserver,U as _executeTestScript}; diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/bindings/bindings-legacy.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/bindings/bindings-legacy.js deleted file mode 100644 index 657dc97bb..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/bindings/bindings-legacy.js +++ /dev/null @@ -1 +0,0 @@ -import*as e from"./bindings.js";self.Bindings=self.Bindings||{},Bindings=Bindings||{},Bindings.IgnoreListManager=e.IgnoreListManager.IgnoreListManager,Bindings.CSSWorkspaceBinding=e.CSSWorkspaceBinding.CSSWorkspaceBinding,Bindings.CSSWorkspaceBinding.SourceMapping=e.CSSWorkspaceBinding.SourceMapping,Bindings.CSSWorkspaceBinding.ModelInfo=e.CSSWorkspaceBinding.ModelInfo,Bindings.CompilerScriptMapping=e.CompilerScriptMapping.CompilerScriptMapping,Bindings.ContentProviderBasedProject=e.ContentProviderBasedProject.ContentProviderBasedProject,Bindings.DebuggerWorkspaceBinding=e.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding,Bindings.DebuggerSourceMapping=e.DebuggerWorkspaceBinding.DebuggerSourceMapping,Bindings.DefaultScriptMapping=e.DefaultScriptMapping.DefaultScriptMapping,Bindings.ChunkedReader=e.FileUtils.ChunkedReader,Bindings.ChunkedFileReader=e.FileUtils.ChunkedFileReader,Bindings.FileOutputStream=e.FileUtils.FileOutputStream,Bindings.LiveLocation=e.LiveLocation.LiveLocation,Bindings.LiveLocationPool=e.LiveLocation.LiveLocationPool,Bindings.NetworkProjectManager=e.NetworkProject.NetworkProjectManager,Bindings.NetworkProjectManager.Events=e.NetworkProject.Events,Bindings.NetworkProject=e.NetworkProject.NetworkProject,Bindings.PresentationConsoleMessageManager=e.PresentationConsoleMessageHelper.PresentationConsoleMessageManager,Bindings.PresentationConsoleMessage=e.PresentationConsoleMessageHelper.PresentationConsoleMessage,Bindings.ResourceMapping=e.ResourceMapping.ResourceMapping,Bindings.ResourceScriptFile=e.ResourceScriptMapping.ResourceScriptFile,Bindings.resourceForURL=e.ResourceUtils.resourceForURL,Bindings.displayNameForURL=e.ResourceUtils.displayNameForURL,Bindings.SASSSourceMapping=e.SASSSourceMapping.SASSSourceMapping,Bindings.StylesSourceMapping=e.StylesSourceMapping.StylesSourceMapping,Bindings.StyleFile=e.StylesSourceMapping.StyleFile,Bindings.TempFile=e.TempFile.TempFile; diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/bindings/bindings.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/bindings/bindings.js deleted file mode 100644 index 1725cac97..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/bindings/bindings.js +++ /dev/null @@ -1 +0,0 @@ -import*as e from"../../core/common/common.js";import*as t from"../../core/platform/platform.js";import{assertNotNullOrUndefined as o}from"../../core/platform/platform.js";import*as r from"../../core/sdk/sdk.js";import*as s from"../text_utils/text_utils.js";import*as i from"../workspace/workspace.js";import*as n from"../../core/i18n/i18n.js";import*as a from"../../core/root/root.js";const c={unknownErrorLoadingFile:"Unknown error loading file"},u=n.i18n.registerUIStrings("models/bindings/ContentProviderBasedProject.ts",c),l=n.i18n.getLocalizedString.bind(void 0,u);class d extends i.Workspace.ProjectStore{#e;#t;constructor(e,t,o,r,s){super(e,t,o,r),this.#e=s,this.#t=new WeakMap,e.addProject(this)}async requestFileContent(e){const{contentProvider:t}=this.#t.get(e);try{const e=await t.requestContent();if("error"in e)return{error:e.error,isEncoded:e.isEncoded,content:null};const o="wasmDisassemblyInfo"in e?e.wasmDisassemblyInfo:void 0;return o&&!1===e.isEncoded?{content:"",wasmDisassemblyInfo:o,isEncoded:!1}:{content:e.content,isEncoded:e.isEncoded}}catch(e){return{content:null,isEncoded:!1,error:e?String(e):l(c.unknownErrorLoadingFile)}}}isServiceProject(){return this.#e}async requestMetadata(e){const{metadata:t}=this.#t.get(e);return t}canSetFileContent(){return!1}async setFileContent(e,t,o){}fullDisplayName(e){let t=e.parentURL().replace(/^(?:https?|file)\:\/\//,"");try{t=decodeURI(t)}catch(e){}return t+"/"+e.displayName(!0)}mimeType(e){const{mimeType:t}=this.#t.get(e);return t}canRename(){return!1}rename(e,t,o){const r=e.url();this.performRename(r,t,((t,r)=>{t&&r&&this.renameUISourceCode(e,r),o(t,r)}))}excludeFolder(e){}canExcludeFolder(e){return!1}async createFile(e,t,o,r){return null}canCreateFile(){return!1}deleteFile(e){}remove(){}performRename(e,t,o){o(!1)}searchInFileContent(e,t,o,r){const{contentProvider:s}=this.#t.get(e);return s.searchInContent(t,o,r)}async findFilesMatchingSearchRequest(e,t,o){const r=[];return o.setTotalWork(t.length),await Promise.all(t.map(async function(t){const s=this.uiSourceCodeForURL(t);if(s){let o=!0;for(const t of e.queries().slice()){if(!(await this.searchInFileContent(s,t,!e.ignoreCase(),e.isRegex())).length){o=!1;break}}o&&r.push(t)}o.incrementWorked(1)}.bind(this))),o.done(),r}indexContent(e){queueMicrotask(e.done.bind(e))}addUISourceCodeWithProvider(e,t,o,r){this.#t.set(e,{mimeType:r,metadata:o,contentProvider:t}),this.addUISourceCode(e)}addContentProvider(e,t,o){const r=this.createUISourceCode(e,t.contentType());return this.addUISourceCodeWithProvider(r,t,null,o),r}reset(){this.removeProject(),this.workspace().addProject(this)}dispose(){this.removeProject()}}var g=Object.freeze({__proto__:null,ContentProviderBasedProject:d});const p={removeFromIgnoreList:"Remove from ignore list",addScriptToIgnoreList:"Add script to ignore list",addDirectoryToIgnoreList:"Add directory to ignore list",addAllContentScriptsToIgnoreList:"Add all extension scripts to ignore list",addAllThirdPartyScriptsToIgnoreList:"Add all third-party scripts to ignore list"},h=n.i18n.registerUIStrings("models/bindings/IgnoreListManager.ts",p),m=n.i18n.getLocalizedString.bind(void 0,h);let S;class L{#o;#r;#s;constructor(t){this.#o=t,r.TargetManager.TargetManager.instance().addModelListener(r.DebuggerModel.DebuggerModel,r.DebuggerModel.Events.GlobalObjectCleared,this.clearCacheIfNeeded.bind(this),this),e.Settings.Settings.instance().moduleSetting("skipStackFramesPattern").addChangeListener(this.patternChanged.bind(this)),e.Settings.Settings.instance().moduleSetting("skipContentScripts").addChangeListener(this.patternChanged.bind(this)),e.Settings.Settings.instance().moduleSetting("automaticallyIgnoreListKnownThirdPartyScripts").addChangeListener(this.patternChanged.bind(this)),e.Settings.Settings.instance().moduleSetting("enableIgnoreListing").addChangeListener(this.patternChanged.bind(this)),this.#r=new Set,this.#s=new Map,r.TargetManager.TargetManager.instance().observeModels(r.DebuggerModel.DebuggerModel,this)}static instance(e={forceNew:null,debuggerWorkspaceBinding:null}){const{forceNew:t,debuggerWorkspaceBinding:o}=e;if(!S||t){if(!o)throw new Error(`Unable to create settings: debuggerWorkspaceBinding must be provided: ${(new Error).stack}`);S=new L(o)}return S}static removeInstance(){S=void 0}addChangeListener(e){this.#r.add(e)}removeChangeListener(e){this.#r.delete(e)}modelAdded(e){this.setIgnoreListPatterns(e);const t=e.sourceMapManager();t.addEventListener(r.SourceMapManager.Events.SourceMapAttached,this.sourceMapAttached,this),t.addEventListener(r.SourceMapManager.Events.SourceMapDetached,this.sourceMapDetached,this)}modelRemoved(e){this.clearCacheIfNeeded();const t=e.sourceMapManager();t.removeEventListener(r.SourceMapManager.Events.SourceMapAttached,this.sourceMapAttached,this),t.removeEventListener(r.SourceMapManager.Events.SourceMapDetached,this.sourceMapDetached,this)}clearCacheIfNeeded(){this.#s.size>1024&&this.#s.clear()}getSkipStackFramesPatternSetting(){return e.Settings.Settings.instance().moduleSetting("skipStackFramesPattern")}setIgnoreListPatterns(e){const t=this.enableIgnoreListing?this.getSkipStackFramesPatternSetting().getAsArray():[],o=[];for(const e of t)!e.disabled&&e.pattern&&o.push(e.pattern);return e.setBlackboxPatterns(o)}isUserOrSourceMapIgnoreListedUISourceCode(e){const t=e.project().type()===i.Workspace.projectTypes.ContentScripts;if(this.skipContentScripts&&t)return!0;if(e.isUnconditionallyIgnoreListed())return!0;const o=this.uiSourceCodeURL(e);return!!o&&this.isUserOrSourceMapIgnoreListedURL(o,e.isKnownThirdParty())}isUserOrSourceMapIgnoreListedURL(e,t){return!!this.isUserIgnoreListedURL(e)||!(!this.automaticallyIgnoreListKnownThirdPartyScripts||!t)}isUserIgnoreListedURL(e,t){if(!this.enableIgnoreListing)return!1;if(this.#s.has(e))return Boolean(this.#s.get(e));if(t&&this.skipContentScripts)return!0;const o=this.getSkipStackFramesPatternSetting().asRegExp(),r=o&&o.test(e)||!1;return this.#s.set(e,r),r}sourceMapAttached(e){const t=e.data.client,o=e.data.sourceMap;this.updateScriptRanges(t,o)}sourceMapDetached(e){const t=e.data.client;this.updateScriptRanges(t,void 0)}async updateScriptRanges(e,t){let o=!1;if(L.instance().isUserIgnoreListedURL(e.sourceURL,e.isContentScript())||(o=t?.sourceURLs().some((e=>this.isUserOrSourceMapIgnoreListedURL(e,t.hasIgnoreListHint(e))))??!1),!o)return M.get(e)&&await e.setBlackboxedRanges([])&&M.delete(e),void await this.#o.updateLocations(e);if(!t)return;const r=t.findRanges((e=>this.isUserOrSourceMapIgnoreListedURL(e,t.hasIgnoreListHint(e))),{isStartMatching:!0}).flatMap((e=>[e.start,e.end]));!function(e,t){if(e.length!==t.length)return!1;for(let o=0;o!(t&&o.disabled)&&o.pattern===e))}async patternChanged(){this.#s.clear();const e=[];for(const t of r.TargetManager.TargetManager.instance().models(r.DebuggerModel.DebuggerModel)){e.push(this.setIgnoreListPatterns(t));const o=t.sourceMapManager();for(const r of t.scripts())e.push(this.updateScriptRanges(r,o.sourceMapForClient(r)))}await Promise.all(e);const t=Array.from(this.#r);for(const e of t)e();this.patternChangeFinishedForTests()}patternChangeFinishedForTests(){}urlToRegExpString(o){const r=new e.ParsedURL.ParsedURL(o);if(r.isAboutBlank()||r.isDataURL())return"";if(!r.isValid)return"^"+t.StringUtilities.escapeForRegExp(o)+"$";let s=r.lastPathComponent;if(s?s="/"+s:r.folderPathComponents&&(s=r.folderPathComponents+"/"),s||(s=r.host),!s)return"";const i=r.scheme;let n="";return i&&"http"!==i&&"https"!==i&&(n="^"+i+"://","chrome-extension"===i&&(n+=r.host+"\\b"),n+=".*"),n+t.StringUtilities.escapeForRegExp(s)+(o.endsWith(s)?"$":"\\b")}getIgnoreListURLContextMenuItems(e){if(e.project().type()===i.Workspace.projectTypes.FileSystem)return[];const t=[],o=this.canIgnoreListUISourceCode(e),r=this.isUserOrSourceMapIgnoreListedUISourceCode(e),s=e.project().type()===i.Workspace.projectTypes.ContentScripts,n=e.isKnownThirdParty();return r?(o||s||n)&&t.push({text:m(p.removeFromIgnoreList),callback:this.unIgnoreListUISourceCode.bind(this,e)}):(o&&t.push({text:m(p.addScriptToIgnoreList),callback:this.ignoreListUISourceCode.bind(this,e)}),s&&t.push({text:m(p.addAllContentScriptsToIgnoreList),callback:this.ignoreListContentScripts.bind(this)}),n&&t.push({text:m(p.addAllThirdPartyScriptsToIgnoreList),callback:this.ignoreListThirdParty.bind(this)})),t}getIgnoreListFolderContextMenuItems(e){const o=[],r="^"+t.StringUtilities.escapeForRegExp(e)+"/";return this.ignoreListHasPattern(r,!0)?o.push({text:m(p.removeFromIgnoreList),callback:this.removeIgnoreListPattern.bind(this,r)}):o.push({text:m(p.addDirectoryToIgnoreList),callback:this.ignoreListRegex.bind(this,r)}),o}}const M=new WeakMap;var f=Object.freeze({__proto__:null,IgnoreListManager:L});const b=new WeakMap,C=new WeakMap;let I;class v extends e.ObjectWrapper.ObjectWrapper{constructor(){super()}static instance({forceNew:e}={forceNew:!1}){return I&&!e||(I=new v),I}}var w;!function(e){e.FrameAttributionAdded="FrameAttributionAdded",e.FrameAttributionRemoved="FrameAttributionRemoved"}(w||(w={}));class T{static resolveFrame(e,t){const o=T.targetForUISourceCode(e),s=o&&o.model(r.ResourceTreeModel.ResourceTreeModel);return s?s.frameForId(t):null}static setInitialFrameAttribution(e,t){if(!t)return;const o=T.resolveFrame(e,t);if(!o)return;const r=new Map;r.set(t,{frame:o,count:1}),b.set(e,r)}static cloneInitialFrameAttribution(e,t){const o=b.get(e);if(!o)return;const r=new Map;for(const e of o.keys()){const t=o.get(e);void 0!==t&&r.set(e,{frame:t.frame,count:t.count})}b.set(t,r)}static addFrameAttribution(e,t){const o=T.resolveFrame(e,t);if(!o)return;const r=b.get(e);if(!r)return;const s=r.get(t)||{frame:o,count:0};if(s.count+=1,r.set(t,s),1!==s.count)return;const i={uiSourceCode:e,frame:o};v.instance().dispatchEventToListeners(w.FrameAttributionAdded,i)}static removeFrameAttribution(e,t){const o=b.get(e);if(!o)return;const r=o.get(t);if(console.assert(Boolean(r),"Failed to remove frame attribution for url: "+e.url()),!r)return;if(r.count-=1,r.count>0)return;o.delete(t);const s={uiSourceCode:e,frame:r.frame};v.instance().dispatchEventToListeners(w.FrameAttributionRemoved,s)}static targetForUISourceCode(e){return C.get(e.project())||null}static setTargetForProject(e,t){C.set(e,t)}static getTargetForProject(e){return C.get(e)||null}static framesForUISourceCode(e){const t=T.targetForUISourceCode(e),o=t&&t.model(r.ResourceTreeModel.ResourceTreeModel),s=b.get(e);if(!o||!s)return[];return Array.from(s.keys()).map((e=>o.frameForId(e))).filter((e=>Boolean(e)))}}var R=Object.freeze({__proto__:null,NetworkProjectManager:v,get Events(){return w},NetworkProject:T});class y{#i;#o;#n=new Map;#a;#c;#u=new Map;#l=new Map;#d=new t.MapUtilities.Multimap;constructor(e,t,o){this.#i=e.sourceMapManager(),this.#o=o,this.#a=new d(t,"jsSourceMaps:stub:"+e.target().id(),i.Workspace.projectTypes.Service,"",!0),this.#c=[this.#i.addEventListener(r.SourceMapManager.Events.SourceMapWillAttach,this.sourceMapWillAttach,this),this.#i.addEventListener(r.SourceMapManager.Events.SourceMapFailedToAttach,this.sourceMapFailedToAttach,this),this.#i.addEventListener(r.SourceMapManager.Events.SourceMapAttached,this.sourceMapAttached,this),this.#i.addEventListener(r.SourceMapManager.Events.SourceMapDetached,this.sourceMapDetached,this)]}addStubUISourceCode(t){const o=this.#a.addContentProvider(e.ParsedURL.ParsedURL.concatenate(t.sourceURL,":sourcemap"),s.StaticContentProvider.StaticContentProvider.fromString(t.sourceURL,e.ResourceType.resourceTypes.Script,"\n\n\n\n\n// Please wait a bit.\n// Compiled script is not shown while source map is being loaded!"),"text/javascript");this.#n.set(t,o)}removeStubUISourceCode(e){const t=this.#n.get(e);this.#n.delete(e),t&&this.#a.removeUISourceCode(t.url())}getLocationRangesForSameSourceLocation(e){const t=e.debuggerModel,o=e.script();if(!o)return[];const r=this.#i.sourceMapForClient(o);if(!r)return[];const{lineNumber:s,columnNumber:i}=o.rawLocationToRelativeLocation(e),n=r.findEntry(s,i);if(!n||!n.sourceURL)return[];const a=this.#l.get(r);if(!a)return[];const c=a.uiSourceCodeForURL(n.sourceURL);if(!c)return[];if(!this.#d.hasValue(c,r))return[];return r.findReverseRanges(n.sourceURL,n.sourceLineNumber,n.sourceColumnNumber).map((({startLine:e,startColumn:r,endLine:s,endColumn:i})=>{const n=o.relativeLocationToRawLocation({lineNumber:e,columnNumber:r}),a=o.relativeLocationToRawLocation({lineNumber:s,columnNumber:i});return{start:t.createRawLocation(o,n.lineNumber,n.columnNumber),end:t.createRawLocation(o,a.lineNumber,a.columnNumber)}}))}uiSourceCodeForURL(e,t){const o=t?i.Workspace.projectTypes.ContentScripts:i.Workspace.projectTypes.Network;for(const t of this.#u.values()){if(t.type()!==o)continue;const r=t.uiSourceCodeForURL(e);if(r)return r}return null}rawLocationToUILocation(e){const t=e.script();if(!t)return null;const{lineNumber:o,columnNumber:r}=t.rawLocationToRelativeLocation(e),s=this.#n.get(t);if(s)return new i.UISourceCode.UILocation(s,o,r);const n=this.#i.sourceMapForClient(t);if(!n)return null;const a=this.#l.get(n);if(!a)return null;const c=n.findEntry(o,r);if(!c||!c.sourceURL)return null;const u=a.uiSourceCodeForURL(c.sourceURL);return u&&this.#d.hasValue(u,n)?u.uiLocation(c.sourceLineNumber,c.sourceColumnNumber):null}uiLocationToRawLocations(e,t,o){const r=[];for(const s of this.#d.get(e)){const i=s.sourceLineMapping(e.url(),t,o);if(!i)continue;const n=this.#i.clientForSourceMap(s);if(!n)continue;const a=n.relativeLocationToRawLocation(i);r.push(n.debuggerModel.createRawLocation(n,a.lineNumber,a.columnNumber))}return r}uiLocationRangeToRawLocationRanges(e,t){if(!this.#d.has(e))return null;const o=[];for(const r of this.#d.get(e)){const s=this.#i.clientForSourceMap(r);if(s)for(const i of r.reverseMapTextRanges(e.url(),t)){const e=s.relativeLocationToRawLocation(i.start),t=s.relativeLocationToRawLocation(i.end),r=s.debuggerModel.createRawLocation(s,e.lineNumber,e.columnNumber),n=s.debuggerModel.createRawLocation(s,t.lineNumber,t.columnNumber);o.push({start:r,end:n})}}return o}getMappedLines(e){if(!this.#d.has(e))return null;const t=new Set;for(const o of this.#d.get(e))for(const r of o.mappings())r.sourceURL===e.url()&&t.add(r.sourceLineNumber);return t}sourceMapWillAttach(e){const{client:t}=e.data;this.addStubUISourceCode(t),this.#o.updateLocations(t)}sourceMapFailedToAttach(e){const{client:t}=e.data;this.removeStubUISourceCode(t),this.#o.updateLocations(t)}sourceMapAttached(t){const{client:o,sourceMap:n}=t.data,a=new Set([o]);if(this.removeStubUISourceCode(o),!L.instance().isUserIgnoreListedURL(o.sourceURL,o.isContentScript())){const t=o.target(),c=`jsSourceMaps:${o.isContentScript()?"extensions":""}:${t.id()}`;let u=this.#u.get(c);if(!u){const e=o.isContentScript()?i.Workspace.projectTypes.ContentScripts:i.Workspace.projectTypes.Network;u=new d(this.#a.workspace(),c,e,"",!1),T.setTargetForProject(u,t),this.#u.set(c,u)}this.#l.set(n,u);for(const t of n.sourceURLs()){const c=e.ResourceType.resourceTypes.SourceMapScript,l=u.createUISourceCode(t,c);n.hasIgnoreListHint(t)&&l.markKnownThirdParty();const d=n.embeddedContentByURL(t),g=null!==d?s.StaticContentProvider.StaticContentProvider.fromString(t,c,d):new r.CompilerSourceMappingContentProvider.CompilerSourceMappingContentProvider(t,c,o.createPageResourceLoadInitiator());let p=null;if(null!==d){const e=new TextEncoder;p=new i.UISourceCode.UISourceCodeMetadata(null,e.encode(d).length)}const h=e.ResourceType.ResourceType.mimeFromURL(t)??c.canonicalMimeType();this.#d.set(l,n),T.setInitialFrameAttribution(l,o.frameId);const m=u.uiSourceCodeForURL(t);if(null!==m){for(const e of this.#d.get(m)){this.#d.delete(m,e);const o=this.#i.clientForSourceMap(e);o&&(T.removeFrameAttribution(m,o.frameId),n.compatibleForURL(t,e)&&(this.#d.set(l,e),T.addFrameAttribution(l,o.frameId)),a.add(o))}u.removeUISourceCode(t)}u.addUISourceCodeWithProvider(l,g,p,h)}}Promise.all([...a].map((e=>this.#o.updateLocations(e)))).then((()=>this.sourceMapAttachedForTest(n)))}sourceMapDetached(e){const{client:t,sourceMap:o}=e.data,r=this.#l.get(o);if(r){for(const e of r.uiSourceCodes())this.#d.delete(e,o)&&(T.removeFrameAttribution(e,t.frameId),this.#d.has(e)||r.removeUISourceCode(e.url()));this.#l.delete(o),this.#o.updateLocations(t)}}scriptsForUISourceCode(e){const t=[];for(const o of this.#d.get(e)){const e=this.#i.clientForSourceMap(o);e&&t.push(e)}return t}sourceMapAttachedForTest(e){}dispose(){e.EventTarget.removeEventListeners(this.#c);for(const e of this.#u.values())e.dispose();this.#a.dispose()}}var F=Object.freeze({__proto__:null,CompilerScriptMapping:y});class U{#g;#p;#h;constructor(e,t){this.#g=e,this.#p=t,this.#p.add(this),this.#h=null}async update(){this.#g&&(this.#h?await this.#h.then((()=>this.update())):(this.#h=this.#g(this),await this.#h,this.#h=null))}async uiLocation(){throw"Not implemented"}dispose(){this.#p.delete(this),this.#g=null}isDisposed(){return!this.#p.has(this)}async isIgnoreListed(){throw"Not implemented"}}class P{#m;constructor(){this.#m=new Set}add(e){this.#m.add(e)}delete(e){this.#m.delete(e)}has(e){return this.#m.has(e)}disposeAll(){for(const e of this.#m)e.dispose()}}var k=Object.freeze({__proto__:null,LiveLocationWithPool:U,LiveLocationPool:P});class j{#i;#S;#c;#L;constructor(e,t,o){this.#i=t,this.#S=new d(o,"cssSourceMaps:"+e.id(),i.Workspace.projectTypes.Network,"",!1),T.setTargetForProject(this.#S,e),this.#L=new Map,this.#c=[this.#i.addEventListener(r.SourceMapManager.Events.SourceMapAttached,this.sourceMapAttached,this),this.#i.addEventListener(r.SourceMapManager.Events.SourceMapDetached,this.sourceMapDetached,this)]}sourceMapAttachedForTest(e){}async sourceMapAttached(e){const t=e.data.client,o=e.data.sourceMap,r=this.#S,s=this.#L;for(const e of o.sourceURLs()){let i=s.get(e);i||(i=new E(r,e,t.createPageResourceLoadInitiator()),s.set(e,i)),i.addSourceMap(o,t.frameId)}await q.instance().updateLocations(t),this.sourceMapAttachedForTest(o)}async sourceMapDetached(e){const t=e.data.client,o=e.data.sourceMap,r=this.#L;for(const e of o.sourceURLs()){const s=r.get(e);s&&(s.removeSourceMap(o,t.frameId),s.getUiSourceCode()||r.delete(e))}await q.instance().updateLocations(t)}rawLocationToUILocation(e){const t=e.header();if(!t)return null;const o=this.#i.sourceMapForClient(t);if(!o)return null;let{lineNumber:r,columnNumber:s}=e;o.mapsOrigin()&&t.isInline&&(r-=t.startLine,0===r&&(s-=t.startColumn));const i=o.findEntry(r,s);if(!i||!i.sourceURL)return null;const n=this.#S.uiSourceCodeForURL(i.sourceURL);return n?n.uiLocation(i.sourceLineNumber,i.sourceColumnNumber):null}uiLocationToRawLocations(e){const{uiSourceCode:t,lineNumber:o,columnNumber:s=0}=e,i=D.get(t);if(!i)return[];const n=[];for(const e of i.getReferringSourceMaps()){const i=e.findReverseEntries(t.url(),o,s),a=this.#i.clientForSourceMap(e);a&&n.push(...i.map((e=>new r.CSSModel.CSSLocation(a,e.lineNumber,e.columnNumber))))}return n}static uiSourceOrigin(e){const t=D.get(e);return t?t.getReferringSourceMaps().map((e=>e.compiledURL())):[]}dispose(){e.EventTarget.removeEventListeners(this.#c),this.#S.dispose()}}const D=new WeakMap;class E{#S;#M;#f;referringSourceMaps;uiSourceCode;constructor(e,t,o){this.#S=e,this.#M=t,this.#f=o,this.referringSourceMaps=[],this.uiSourceCode=null}recreateUISourceCodeIfNeeded(t){const o=this.referringSourceMaps[this.referringSourceMaps.length-1],n=e.ResourceType.resourceTypes.SourceMapStyleSheet,a=o.embeddedContentByURL(this.#M),c=null!==a?s.StaticContentProvider.StaticContentProvider.fromString(this.#M,n,a):new r.CompilerSourceMappingContentProvider.CompilerSourceMappingContentProvider(this.#M,n,this.#f),u=this.#S.createUISourceCode(this.#M,n);D.set(u,this);const l=e.ResourceType.ResourceType.mimeFromURL(this.#M)||n.canonicalMimeType(),d="string"==typeof a?new i.UISourceCode.UISourceCodeMetadata(null,a.length):null;this.uiSourceCode?(T.cloneInitialFrameAttribution(this.uiSourceCode,u),this.#S.removeUISourceCode(this.uiSourceCode.url())):T.setInitialFrameAttribution(u,t),this.uiSourceCode=u,this.#S.addUISourceCodeWithProvider(this.uiSourceCode,c,d,l)}addSourceMap(e,t){this.uiSourceCode&&T.addFrameAttribution(this.uiSourceCode,t),this.referringSourceMaps.push(e),this.recreateUISourceCodeIfNeeded(t)}removeSourceMap(e,t){const o=this.uiSourceCode;T.removeFrameAttribution(o,t);const r=this.referringSourceMaps.lastIndexOf(e);-1!==r&&this.referringSourceMaps.splice(r,1),this.referringSourceMaps.length?this.recreateUISourceCodeIfNeeded(t):(this.#S.removeUISourceCode(o.url()),this.uiSourceCode=null)}getReferringSourceMaps(){return this.referringSourceMaps}getUiSourceCode(){return this.uiSourceCode}}var N=Object.freeze({__proto__:null,SASSSourceMapping:j});function A(e){for(const t of r.TargetManager.TargetManager.instance().models(r.ResourceTreeModel.ResourceTreeModel)){const o=t.resourceForURL(e);if(o)return o}return null}function x(e,t,o){const s=e.model(r.ResourceTreeModel.ResourceTreeModel);if(!s)return null;const i=s.frameForId(t);return i?O(i.resourceForURL(o)):null}function O(e){return!e||"number"!=typeof e.contentSize()&&!e.lastModified()?null:new i.UISourceCode.UISourceCodeMetadata(e.lastModified(),e.contentSize())}var W=Object.freeze({__proto__:null,resourceForURL:A,displayNameForURL:function(o){if(!o)return"";const s=A(o);if(s)return s.displayName;const n=i.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(o);if(n)return n.displayName();const a=r.TargetManager.TargetManager.instance().inspectedURL();if(!a)return t.StringUtilities.trimURL(o,"");const c=e.ParsedURL.ParsedURL.fromString(a);if(!c)return o;const u=c.lastPathComponent,l=a.indexOf(u);if(-1!==l&&l+u.length===a.length){const e=a.substring(0,l);if(o.startsWith(e))return o.substring(l)}const d=t.StringUtilities.trimURL(o,c.host);return"/"===d?c.host+"/":d},metadataForURL:x,resourceMetadata:O});const B=new WeakMap;class H{#b;#S;#C;#c;constructor(e,t){this.#b=e;const o=this.#b.target();this.#S=new d(t,"css:"+o.id(),i.Workspace.projectTypes.Network,"",!1),T.setTargetForProject(this.#S,o),this.#C=new Map,this.#c=[this.#b.addEventListener(r.CSSModel.Events.StyleSheetAdded,this.styleSheetAdded,this),this.#b.addEventListener(r.CSSModel.Events.StyleSheetRemoved,this.styleSheetRemoved,this),this.#b.addEventListener(r.CSSModel.Events.StyleSheetChanged,this.styleSheetChanged,this)]}rawLocationToUILocation(e){const t=e.header();if(!t||!this.acceptsHeader(t))return null;const o=this.#C.get(t.resourceURL());if(!o)return null;let r=e.lineNumber,s=e.columnNumber;if(t.isInline&&t.hasSourceURL){r-=t.lineNumberInSource(0);const e=t.columnNumberInSource(r,0);void 0===e?s=e:s-=e}return o.getUiSourceCode().uiLocation(r,s)}uiLocationToRawLocations(e){const t=B.get(e.uiSourceCode);if(!t)return[];const o=[];for(const s of t.getHeaders()){let t=e.lineNumber,i=e.columnNumber;s.isInline&&s.hasSourceURL&&(i=s.columnNumberInSource(t,e.columnNumber||0),t=s.lineNumberInSource(t)),o.push(new r.CSSModel.CSSLocation(s,t,i))}return o}acceptsHeader(e){return!e.isConstructedByNew()&&(!(e.isInline&&!e.hasSourceURL&&"inspector"!==e.origin)&&!!e.resourceURL())}styleSheetAdded(e){const t=e.data;if(!this.acceptsHeader(t))return;const o=t.resourceURL();let r=this.#C.get(o);r?r.addHeader(t):(r=new _(this.#b,this.#S,t),this.#C.set(o,r))}styleSheetRemoved(e){const t=e.data;if(!this.acceptsHeader(t))return;const o=t.resourceURL(),r=this.#C.get(o);r&&(1===r.getHeaders().size?(r.dispose(),this.#C.delete(o)):r.removeHeader(t))}styleSheetChanged(e){const t=this.#b.styleSheetHeaderForId(e.data.styleSheetId);if(!t||!this.acceptsHeader(t))return;const o=this.#C.get(t.resourceURL());o&&o.styleSheetChanged(t)}dispose(){for(const e of this.#C.values())e.dispose();this.#C.clear(),e.EventTarget.removeEventListeners(this.#c),this.#S.removeProject()}}class _{#b;#S;headers;uiSourceCode;#c;#I;#v;#w;#T;constructor(t,o,r){this.#b=t,this.#S=o,this.headers=new Set([r]);const s=t.target(),n=r.resourceURL(),a=x(s,r.frameId,n);this.uiSourceCode=this.#S.createUISourceCode(n,r.contentType()),B.set(this.uiSourceCode,this),T.setInitialFrameAttribution(this.uiSourceCode,r.frameId),this.#S.addUISourceCodeWithProvider(this.uiSourceCode,this,a,"text/css"),this.#c=[this.uiSourceCode.addEventListener(i.UISourceCode.Events.WorkingCopyChanged,this.workingCopyChanged,this),this.uiSourceCode.addEventListener(i.UISourceCode.Events.WorkingCopyCommitted,this.workingCopyCommitted,this)],this.#I=new e.Throttler.Throttler(_.updateTimeout),this.#v=!1}addHeader(e){this.headers.add(e),T.addFrameAttribution(this.uiSourceCode,e.frameId)}removeHeader(e){this.headers.delete(e),T.removeFrameAttribution(this.uiSourceCode,e.frameId)}styleSheetChanged(e){if(console.assert(this.headers.has(e)),this.#T||!this.headers.has(e))return;const t=this.mirrorContent.bind(this,e,!0);this.#I.schedule(t,!1)}workingCopyCommitted(){if(this.#w)return;const e=this.mirrorContent.bind(this,this.uiSourceCode,!0);this.#I.schedule(e,!0)}workingCopyChanged(){if(this.#w)return;const e=this.mirrorContent.bind(this,this.uiSourceCode,!1);this.#I.schedule(e,!1)}async mirrorContent(e,t){if(this.#v)return void this.styleFileSyncedForTest();let o=null;if(e===this.uiSourceCode)o=this.uiSourceCode.workingCopy();else{o=(await e.requestContent()).content}if(null===o||this.#v)return void this.styleFileSyncedForTest();e!==this.uiSourceCode&&(this.#w=!0,this.uiSourceCode.addRevision(o),this.#w=!1),this.#T=!0;const r=[];for(const s of this.headers)s!==e&&r.push(this.#b.setStyleSheetText(s.id,o,t));await Promise.all(r),this.#T=!1,this.styleFileSyncedForTest()}styleFileSyncedForTest(){}dispose(){this.#v||(this.#v=!0,this.#S.removeUISourceCode(this.uiSourceCode.url()),e.EventTarget.removeEventListeners(this.#c))}contentURL(){return console.assert(this.headers.size>0),this.headers.values().next().value.originalContentProvider().contentURL()}contentType(){return console.assert(this.headers.size>0),this.headers.values().next().value.originalContentProvider().contentType()}requestContent(){return console.assert(this.headers.size>0),this.headers.values().next().value.originalContentProvider().requestContent()}searchInContent(e,t,o){return console.assert(this.headers.size>0),this.headers.values().next().value.originalContentProvider().searchInContent(e,t,o)}static updateTimeout=200;getHeaders(){return this.headers}getUiSourceCode(){return this.uiSourceCode}}var z=Object.freeze({__proto__:null,StylesSourceMapping:H,StyleFile:_});let V;class q{#R;#y;#F;constructor(e,t){this.#R=e,this.#y=new Map,t.observeModels(r.CSSModel.CSSModel,this),this.#F=new Set}static instance(e={forceNew:null,resourceMapping:null,targetManager:null}){const{forceNew:t,resourceMapping:o,targetManager:r}=e;if(!V||t){if(!o||!r)throw new Error(`Unable to create CSSWorkspaceBinding: resourceMapping and targetManager must be provided: ${(new Error).stack}`);V=new q(o,r)}return V}static removeInstance(){V=void 0}get modelToInfo(){return this.#y}getCSSModelInfo(e){return this.#y.get(e)}modelAdded(e){this.#y.set(e,new J(e,this.#R))}modelRemoved(e){this.getCSSModelInfo(e).dispose(),this.#y.delete(e)}async pendingLiveLocationChangesPromise(){await Promise.all(this.#F)}recordLiveLocationChange(e){e.then((()=>{this.#F.delete(e)})),this.#F.add(e)}async updateLocations(e){const t=this.getCSSModelInfo(e.cssModel()).updateLocations(e);this.recordLiveLocationChange(t),await t}createLiveLocation(e,t,o){const r=this.getCSSModelInfo(e.cssModel()).createLiveLocation(e,t,o);return this.recordLiveLocationChange(r),r}propertyRawLocation(e,t){const o=e.ownerStyle;if(!o||o.type!==r.CSSStyleDeclaration.Type.Regular||!o.styleSheetId)return null;const s=o.cssModel().styleSheetHeaderForId(o.styleSheetId);if(!s)return null;const i=t?e.nameRange():e.valueRange();if(!i)return null;const n=i.startLine,a=i.startColumn;return new r.CSSModel.CSSLocation(s,s.lineNumberInSource(n),s.columnNumberInSource(n,a))}propertyUILocation(e,t){const o=this.propertyRawLocation(e,t);return o?this.rawLocationToUILocation(o):null}rawLocationToUILocation(e){return this.getCSSModelInfo(e.cssModel()).rawLocationToUILocation(e)}uiLocationToRawLocations(e){const t=[];for(const o of this.#y.values())t.push(...o.uiLocationToRawLocations(e));return t}}class J{#c;#R;#U;#P;#m;#k;constructor(e,o){this.#c=[e.addEventListener(r.CSSModel.Events.StyleSheetAdded,(e=>{this.styleSheetAdded(e)}),this),e.addEventListener(r.CSSModel.Events.StyleSheetRemoved,(e=>{this.styleSheetRemoved(e)}),this)],this.#R=o,this.#U=new H(e,o.workspace);const s=e.sourceMapManager();this.#P=new j(e.target(),s,o.workspace),this.#m=new t.MapUtilities.Multimap,this.#k=new t.MapUtilities.Multimap}get locations(){return this.#m}async createLiveLocation(e,t,o){const r=new K(e,this,t,o),s=e.header();return s?(r.setHeader(s),this.#m.set(s,r),await r.update()):this.#k.set(e.url,r),r}disposeLocation(e){const t=e.header();t?this.#m.delete(t,e):this.#k.delete(e.url,e)}updateLocations(e){const t=[];for(const o of this.#m.get(e))t.push(o.update());return Promise.all(t)}async styleSheetAdded(e){const t=e.data;if(!t.sourceURL)return;const o=[];for(const e of this.#k.get(t.sourceURL))e.setHeader(t),this.#m.set(t,e),o.push(e.update());await Promise.all(o),this.#k.deleteAll(t.sourceURL)}async styleSheetRemoved(e){const t=e.data,o=[];for(const e of this.#m.get(t))e.setHeader(t),this.#k.set(e.url,e),o.push(e.update());await Promise.all(o),this.#m.deleteAll(t)}rawLocationToUILocation(e){let t=null;return t=t||this.#P.rawLocationToUILocation(e),t=t||this.#U.rawLocationToUILocation(e),t=t||this.#R.cssLocationToUILocation(e),t}uiLocationToRawLocations(e){let t=this.#P.uiLocationToRawLocations(e);return t.length?t:(t=this.#U.uiLocationToRawLocations(e),t.length?t:this.#R.uiLocationToCSSLocations(e))}dispose(){e.EventTarget.removeEventListeners(this.#c),this.#U.dispose(),this.#P.dispose()}}class K extends U{url;#j;#D;#E;headerInternal;constructor(e,t,o,r){super(o,r),this.url=e.url,this.#j=e.lineNumber,this.#D=e.columnNumber,this.#E=t,this.headerInternal=null}header(){return this.headerInternal}setHeader(e){this.headerInternal=e}async uiLocation(){if(!this.headerInternal)return null;const e=new r.CSSModel.CSSLocation(this.headerInternal,this.#j,this.#D);return q.instance().rawLocationToUILocation(e)}dispose(){super.dispose(),this.#E.disposeLocation(this)}async isIgnoreListed(){return!1}}var G=Object.freeze({__proto__:null,CSSWorkspaceBinding:q,ModelInfo:J,LiveLocation:K});const $={errorInDebuggerLanguagePlugin:"Error in debugger language plugin: {PH1}",loadingDebugSymbolsForVia:"[{PH1}] Loading debug symbols for {PH2} (via {PH3})...",loadingDebugSymbolsFor:"[{PH1}] Loading debug symbols for {PH2}...",loadedDebugSymbolsForButDidnt:"[{PH1}] Loaded debug symbols for {PH2}, but didn't find any source files",loadedDebugSymbolsForFound:"[{PH1}] Loaded debug symbols for {PH2}, found {PH3} source file(s)",failedToLoadDebugSymbolsFor:"[{PH1}] Failed to load debug symbols for {PH2} ({PH3})",failedToLoadDebugSymbolsForFunction:'No debug information for function "{PH1}"',debugSymbolsIncomplete:"The debug information for function {PH1} is incomplete"},Q=n.i18n.registerUIStrings("models/bindings/DebuggerLanguagePlugins.ts",$),X=n.i18n.getLocalizedString.bind(void 0,Q);function Y(e){return`${e.sourceURL}@${e.hash}`}function Z(e){const{script:t}=e;return{rawModuleId:Y(t),codeOffset:e.location().columnNumber-(t.codeOffset()||0),inlineFrameIndex:e.inlineFrameIndex}}class ee extends Error{exception;exceptionDetails;constructor(e,t){const{description:o}=t.exception||{};super(o||t.text),this.exception=e,this.exceptionDetails=t}static makeLocal(e,t){const o={type:"object",subtype:"error",description:t},r={text:"Uncaught",exceptionId:-1,columnNumber:0,lineNumber:0,exception:o},s=e.debuggerModel.runtimeModel().createRemoteObject(o);return new ee(s,r)}}class te extends r.RemoteObject.LocalJSONObject{constructor(e){super(e)}get description(){return this.type}get type(){return"namespace"}}class oe extends r.RemoteObject.RemoteObjectImpl{variables;#N;#A;stopId;constructor(e,t,o){super(e.debuggerModel.runtimeModel(),void 0,"object",void 0,null),this.variables=[],this.#N=e,this.#A=o,this.stopId=t}async doGetProperties(e,t,o){if(t)return{properties:[],internalProperties:[]};const s=[],i={};function n(e,t){return new r.RemoteObject.RemoteObjectProperty(e,t,!1,!1,!0,!1)}for(const e of this.variables){let t;try{const o=await this.#A.evaluate(e.name,Z(this.#N),this.stopId);t=o?new se(this.#N,o,this.#A):new r.RemoteObject.LocalJSONObject(void 0)}catch(e){console.warn(e),t=new r.RemoteObject.LocalJSONObject(void 0)}if(e.nestedName&&e.nestedName.length>1){let o=i;for(let t=0;tnew r.RemoteObject.RemoteObjectProperty(e.name,new se(this.callFrame,e.value,this.plugin)))),internalProperties:null}}return{properties:null,internalProperties:null}}release(){const{objectId:e}=this.extensionObject;e&&(o(this.plugin.releaseObject),this.plugin.releaseObject(e))}debuggerModel(){return this.callFrame.debuggerModel}runtimeModel(){return this.callFrame.debuggerModel.runtimeModel()}}class ie{#V;#o;#q;#J;#K;callFrameByStopId=new Map;stopIdByCallFrame=new Map;nextStopId=0n;constructor(e,t,o){this.#V=t,this.#o=o,this.#q=[],this.#J=new Map,e.observeModels(r.DebuggerModel.DebuggerModel,this),this.#K=new Map}async evaluateOnCallFrame(e,t){const{script:o}=e,{expression:s,returnByValue:i,throwOnSideEffect:n}=t,{plugin:a}=await this.rawModuleIdAndPluginForScript(o);if(!a)return null;const c=Z(e);if(0===(await a.rawLocationToSourceLocation(c)).length)return null;if(i)return{error:"Cannot return by value"};if(n)return{error:"Cannot guarantee side-effect freedom"};try{const t=await a.evaluate(s,c,this.stopIdForCallFrame(e));return t?{object:new se(e,t,a),exceptionDetails:void 0}:{object:new r.RemoteObject.LocalJSONObject(void 0),exceptionDetails:void 0}}catch(t){if(t instanceof ee){const{exception:e,exceptionDetails:o}=t;return{object:e,exceptionDetails:o}}const{exception:o,exceptionDetails:r}=ee.makeLocal(e,t.message);return{object:o,exceptionDetails:r}}}stopIdForCallFrame(e){let t=this.stopIdByCallFrame.get(e);return void 0!==t||(t=this.nextStopId++,this.stopIdByCallFrame.set(e,t),this.callFrameByStopId.set(t,e)),t}callFrameForStopId(e){return this.callFrameByStopId.get(e)}expandCallFrames(e){return Promise.all(e.map((async e=>{const t=await this.getFunctionInfo(e.script,e.location());if(t){if("frames"in t&&t.frames.length)return t.frames.map((({name:t},o)=>e.createVirtualCallFrame(o,t)));if("missingSymbolFiles"in t&&t.missingSymbolFiles.length){const o=t.missingSymbolFiles,r=X($.debugSymbolsIncomplete,{PH1:e.functionName});e.setMissingDebugInfoDetails({details:r,resources:o})}else e.setMissingDebugInfoDetails({resources:[],details:X($.failedToLoadDebugSymbolsForFunction,{PH1:e.functionName})})}return e}))).then((e=>e.flat()))}modelAdded(e){this.#J.set(e,new ne(e,this.#V)),e.addEventListener(r.DebuggerModel.Events.GlobalObjectCleared,this.globalObjectCleared,this),e.addEventListener(r.DebuggerModel.Events.ParsedScriptSource,this.parsedScriptSource,this),e.addEventListener(r.DebuggerModel.Events.DebuggerResumed,this.debuggerResumed,this),e.setEvaluateOnCallFrameCallback(this.evaluateOnCallFrame.bind(this)),e.setExpandCallFramesCallback(this.expandCallFrames.bind(this))}modelRemoved(t){t.removeEventListener(r.DebuggerModel.Events.GlobalObjectCleared,this.globalObjectCleared,this),t.removeEventListener(r.DebuggerModel.Events.ParsedScriptSource,this.parsedScriptSource,this),t.removeEventListener(r.DebuggerModel.Events.DebuggerResumed,this.debuggerResumed,this),t.setEvaluateOnCallFrameCallback(null),t.setExpandCallFramesCallback(null);const o=this.#J.get(t);o&&(o.dispose(),this.#J.delete(t)),this.#K.forEach(((o,r)=>{const s=o.scripts.filter((e=>e.debuggerModel!==t));0===s.length?(o.plugin.removeRawModule(r).catch((t=>{e.Console.Console.instance().error(X($.errorInDebuggerLanguagePlugin,{PH1:t.message}))})),this.#K.delete(r)):o.scripts=s}))}globalObjectCleared(e){const t=e.data;this.modelRemoved(t),this.modelAdded(t)}addPlugin(e){this.#q.push(e);for(const e of this.#J.keys())for(const t of e.scripts())this.hasPluginForScript(t)||this.parsedScriptSource({data:t})}removePlugin(e){this.#q=this.#q.filter((t=>t!==e));const t=new Set;this.#K.forEach(((o,r)=>{o.plugin===e&&(o.scripts.forEach((e=>t.add(e))),this.#K.delete(r))}));for(const e of t){this.#J.get(e.debuggerModel).removeScript(e),this.parsedScriptSource({data:e})}}hasPluginForScript(e){const t=Y(e),o=this.#K.get(t);return void 0!==o&&o.scripts.includes(e)}async rawModuleIdAndPluginForScript(e){const t=Y(e),o=this.#K.get(t);return o&&(await o.addRawModulePromise,o===this.#K.get(t))?{rawModuleId:t,plugin:o.plugin}:{rawModuleId:t,plugin:null}}uiSourceCodeForURL(e,t){const o=this.#J.get(e);return o?o.getProject().uiSourceCodeForURL(t):null}async rawLocationToUILocation(t){const o=t.script();if(!o)return null;const{rawModuleId:r,plugin:s}=await this.rawModuleIdAndPluginForScript(o);if(!s)return null;const i={rawModuleId:r,codeOffset:t.columnNumber-(o.codeOffset()||0),inlineFrameIndex:t.inlineFrameIndex};try{const e=await s.rawLocationToSourceLocation(i);for(const t of e){const e=this.uiSourceCodeForURL(o.debuggerModel,t.sourceFileURL);if(e)return e.uiLocation(t.lineNumber,t.columnNumber>=0?t.columnNumber:void 0)}}catch(t){e.Console.Console.instance().error(X($.errorInDebuggerLanguagePlugin,{PH1:t.message}))}return null}uiLocationToRawLocationRanges(t,o,s=-1){const i=[];return this.scriptsForUISourceCode(t).forEach((e=>{const n=Y(e),a=this.#K.get(n);if(!a)return;const{plugin:c}=a;i.push(async function(e,i,n){const a={rawModuleId:e,sourceFileURL:t.url(),lineNumber:o,columnNumber:s},c=await i.sourceLocationToRawLocation(a);if(!c)return[];return c.map((e=>({start:new r.DebuggerModel.Location(n.debuggerModel,n.scriptId,0,Number(e.startOffset)+(n.codeOffset()||0)),end:new r.DebuggerModel.Location(n.debuggerModel,n.scriptId,0,Number(e.endOffset)+(n.codeOffset()||0))})))}(n,c,e))})),0===i.length?Promise.resolve(null):Promise.all(i).then((e=>e.flat())).catch((t=>(e.Console.Console.instance().error(X($.errorInDebuggerLanguagePlugin,{PH1:t.message})),null)))}async uiLocationToRawLocations(e,t,o){const r=await this.uiLocationToRawLocationRanges(e,t,o);return r?r.map((({start:e})=>e)):null}async uiLocationRangeToRawLocationRanges(e,t){const o=[];for(let r=t.startLine;r<=t.endLine;++r)o.push(this.uiLocationToRawLocationRanges(e,r));const r=[];for(const e of await Promise.all(o)){if(null===e)return null;for(const o of e){const[e,i]=await Promise.all([this.rawLocationToUILocation(o.start),this.rawLocationToUILocation(o.end)]);if(null===e||null===i)continue;t.intersection(new s.TextRange.TextRange(e.lineNumber,e.columnNumber??0,i.lineNumber,i.columnNumber??1/0)).isEmpty()||r.push(o)}}return r}scriptsForUISourceCode(e){for(const t of this.#J.values()){const o=t.uiSourceCodeToScripts.get(e);if(o)return o}return[]}setDebugInfoURL(e,t){this.hasPluginForScript(e)||(e.debugSymbols={type:"ExternalDWARF",externalURL:t},this.parsedScriptSource({data:e}),e.debuggerModel.setDebugInfoURL(e,t))}parsedScriptSource(t){const o=t.data;if(o.sourceURL)for(const t of this.#q){if(!t.handleScript(o))continue;const r=Y(o);let s=this.#K.get(r);if(s)s.scripts.push(o);else{const i=(async()=>{const i=e.Console.Console.instance(),n=o.sourceURL,a=o.debugSymbols&&o.debugSymbols.externalURL||"";a?i.log(X($.loadingDebugSymbolsForVia,{PH1:t.name,PH2:n,PH3:a})):i.log(X($.loadingDebugSymbolsFor,{PH1:t.name,PH2:n}));try{const e=!a&&n.startsWith("wasm://")?await o.getWasmBytecode():void 0,c=await t.addRawModule(r,a,{url:n,code:e});if(s!==this.#K.get(r))return[];if("missingSymbolFiles"in c)return{missingSymbolFiles:c.missingSymbolFiles};const u=c;return 0===u.length?i.warn(X($.loadedDebugSymbolsForButDidnt,{PH1:t.name,PH2:n})):i.log(X($.loadedDebugSymbolsForFound,{PH1:t.name,PH2:n,PH3:u.length})),u}catch(e){return i.error(X($.failedToLoadDebugSymbolsFor,{PH1:t.name,PH2:n,PH3:e.message})),this.#K.delete(r),[]}})();s={rawModuleId:r,plugin:t,scripts:[o],addRawModulePromise:i},this.#K.set(r,s)}return void s.addRawModulePromise.then((e=>{if(!("missingSymbolFiles"in e)&&o.debuggerModel.scriptForId(o.scriptId)===o){const t=this.#J.get(o.debuggerModel);t&&(t.addSourceFiles(o,e),this.#o.updateLocations(o))}}))}}debuggerResumed(e){const t=Array.from(this.callFrameByStopId.values()).filter((t=>t.debuggerModel===e.data));for(const e of t){const t=this.stopIdByCallFrame.get(e);o(t),this.stopIdByCallFrame.delete(e),this.callFrameByStopId.delete(t)}}getSourcesForScript(e){const t=Y(e),o=this.#K.get(t);return o?o.addRawModulePromise:Promise.resolve(void 0)}async resolveScopeChain(t){const o=t.script,{rawModuleId:r,plugin:s}=await this.rawModuleIdAndPluginForScript(o);if(!s)return null;const i={rawModuleId:r,codeOffset:t.location().columnNumber-(o.codeOffset()||0),inlineFrameIndex:t.inlineFrameIndex},n=this.stopIdForCallFrame(t);try{if(0===(await s.rawLocationToSourceLocation(i)).length)return null;const e=new Map,o=await s.listVariablesInScope(i);for(const r of o||[]){let o=e.get(r.scope);if(!o){const{type:i,typeName:a,icon:c}=await s.getScopeInfo(r.scope);o=new re(t,n,i,a,c,s),e.set(r.scope,o)}o.object().variables.push(r)}return Array.from(e.values())}catch(t){return e.Console.Console.instance().error(X($.errorInDebuggerLanguagePlugin,{PH1:t.message})),null}}async getFunctionInfo(t,o){const{rawModuleId:r,plugin:s}=await this.rawModuleIdAndPluginForScript(t);if(!s)return null;const i={rawModuleId:r,codeOffset:o.columnNumber-(t.codeOffset()||0),inlineFrameIndex:0};try{return await s.getFunctionInfo(i)}catch(t){return e.Console.Console.instance().warn(X($.errorInDebuggerLanguagePlugin,{PH1:t.message})),{frames:[]}}}async getInlinedFunctionRanges(t){const o=t.script();if(!o)return[];const{rawModuleId:s,plugin:i}=await this.rawModuleIdAndPluginForScript(o);if(!i)return[];const n={rawModuleId:s,codeOffset:t.columnNumber-(o.codeOffset()||0)};try{return(await i.getInlinedFunctionRanges(n)).map((e=>({start:new r.DebuggerModel.Location(o.debuggerModel,o.scriptId,0,Number(e.startOffset)+(o.codeOffset()||0)),end:new r.DebuggerModel.Location(o.debuggerModel,o.scriptId,0,Number(e.endOffset)+(o.codeOffset()||0))})))}catch(t){return e.Console.Console.instance().warn(X($.errorInDebuggerLanguagePlugin,{PH1:t.message})),[]}}async getInlinedCalleesRanges(t){const o=t.script();if(!o)return[];const{rawModuleId:s,plugin:i}=await this.rawModuleIdAndPluginForScript(o);if(!i)return[];const n={rawModuleId:s,codeOffset:t.columnNumber-(o.codeOffset()||0)};try{return(await i.getInlinedCalleesRanges(n)).map((e=>({start:new r.DebuggerModel.Location(o.debuggerModel,o.scriptId,0,Number(e.startOffset)+(o.codeOffset()||0)),end:new r.DebuggerModel.Location(o.debuggerModel,o.scriptId,0,Number(e.endOffset)+(o.codeOffset()||0))})))}catch(t){return e.Console.Console.instance().warn(X($.errorInDebuggerLanguagePlugin,{PH1:t.message})),[]}}async getMappedLines(e){const t=await Promise.all(this.scriptsForUISourceCode(e).map((e=>this.rawModuleIdAndPluginForScript(e))));let o=null;for(const{rawModuleId:r,plugin:s}of t){if(!s)continue;const t=await s.getMappedLines(r,e.url());void 0!==t&&(null===o?o=new Set(t):t.forEach((e=>o.add(e))))}return o}}class ne{project;uiSourceCodeToScripts;constructor(e,t){this.project=new d(t,"language_plugins::"+e.target().id(),i.Workspace.projectTypes.Network,"",!1),T.setTargetForProject(this.project,e.target()),this.uiSourceCodeToScripts=new Map}addSourceFiles(t,o){const s=t.createPageResourceLoadInitiator();for(const i of o){let o=this.project.uiSourceCodeForURL(i);if(o){const e=this.uiSourceCodeToScripts.get(o);e.includes(t)||e.push(t)}else{o=this.project.createUISourceCode(i,e.ResourceType.resourceTypes.SourceMapScript),T.setInitialFrameAttribution(o,t.frameId),this.uiSourceCodeToScripts.set(o,[t]);const n=new r.CompilerSourceMappingContentProvider.CompilerSourceMappingContentProvider(i,e.ResourceType.resourceTypes.SourceMapScript,s),a=e.ResourceType.ResourceType.mimeFromURL(i)||"text/javascript";this.project.addUISourceCodeWithProvider(o,n,null,a)}}}removeScript(e){this.uiSourceCodeToScripts.forEach(((t,o)=>{0===(t=t.filter((t=>t!==e))).length?(this.uiSourceCodeToScripts.delete(o),this.project.removeUISourceCode(o.url())):this.uiSourceCodeToScripts.set(o,t)}))}dispose(){this.project.dispose()}getProject(){return this.project}}var ae=Object.freeze({__proto__:null,SourceScope:re,ExtensionRemoteObject:se,DebuggerLanguagePluginManager:ie});class ce{#o;#S;#c;#G;#$;constructor(e,t,o){ue.add(this),this.#o=o,this.#S=new d(t,"debugger:"+e.target().id(),i.Workspace.projectTypes.Debugger,"",!0),this.#c=[e.addEventListener(r.DebuggerModel.Events.GlobalObjectCleared,this.globalObjectCleared,this),e.addEventListener(r.DebuggerModel.Events.ParsedScriptSource,this.parsedScriptSource,this),e.addEventListener(r.DebuggerModel.Events.DiscardedAnonymousScriptSource,this.discardedScriptSource,this)],this.#G=new Map,this.#$=new Map}static createV8ScriptURL(t){const o=e.ParsedURL.ParsedURL.extractName(t.sourceURL);return"debugger:///VM"+t.scriptId+(o?" "+o:"")}static scriptForUISourceCode(e){for(const t of ue){const o=t.#G.get(e);if(void 0!==o)return o}return null}uiSourceCodeForScript(e){return this.#$.get(e)??null}rawLocationToUILocation(e){const t=e.script();if(!t)return null;const o=this.#$.get(t);if(!o)return null;const{lineNumber:r,columnNumber:s}=t.rawLocationToRelativeLocation(e);return o.uiLocation(r,s)}uiLocationToRawLocations(e,t,o){const r=this.#G.get(e);return r?(({lineNumber:t,columnNumber:o}=r.relativeLocationToRawLocation({lineNumber:t,columnNumber:o})),[r.debuggerModel.createRawLocation(r,t,o??0)]):[]}uiLocationRangeToRawLocationRanges(e,{startLine:t,startColumn:o,endLine:r,endColumn:s}){const i=this.#G.get(e);if(!i)return[];({lineNumber:t,columnNumber:o}=i.relativeLocationToRawLocation({lineNumber:t,columnNumber:o})),({lineNumber:r,columnNumber:s}=i.relativeLocationToRawLocation({lineNumber:r,columnNumber:s}));return[{start:i.debuggerModel.createRawLocation(i,t,o),end:i.debuggerModel.createRawLocation(i,r,s)}]}parsedScriptSource(t){const o=t.data,r=ce.createV8ScriptURL(o),s=this.#S.createUISourceCode(r,e.ResourceType.resourceTypes.Script);o.isBreakpointCondition&&s.markAsUnconditionallyIgnoreListed(),this.#G.set(s,o),this.#$.set(o,s),this.#S.addUISourceCodeWithProvider(s,o,null,"text/javascript"),this.#o.updateLocations(o)}discardedScriptSource(e){const t=e.data,o=this.#$.get(t);void 0!==o&&(this.#$.delete(t),this.#G.delete(o),this.#S.removeUISourceCode(o.url()))}globalObjectCleared(){this.#$.clear(),this.#G.clear(),this.#S.reset()}dispose(){ue.delete(this),e.EventTarget.removeEventListeners(this.#c),this.globalObjectCleared(),this.#S.dispose()}}const ue=new Set;var le=Object.freeze({__proto__:null,DefaultScriptMapping:ce});const de={liveEditFailed:"`LiveEdit` failed: {PH1}",liveEditCompileFailed:"`LiveEdit` compile failed: {PH1}"},ge=n.i18n.registerUIStrings("models/bindings/ResourceScriptMapping.ts",de),pe=n.i18n.getLocalizedString.bind(void 0,ge);class he{debuggerModel;#V;debuggerWorkspaceBinding;#Q;#u;#$;#c;constructor(e,t,o){this.debuggerModel=e,this.#V=t,this.debuggerWorkspaceBinding=o,this.#Q=new Map,this.#u=new Map,this.#$=new Map;const s=e.runtimeModel();this.#c=[this.debuggerModel.addEventListener(r.DebuggerModel.Events.ParsedScriptSource,(e=>this.addScript(e.data)),this),this.debuggerModel.addEventListener(r.DebuggerModel.Events.GlobalObjectCleared,this.globalObjectCleared,this),s.addEventListener(r.RuntimeModel.Events.ExecutionContextDestroyed,this.executionContextDestroyed,this),s.target().targetManager().addEventListener(r.TargetManager.Events.InspectedURLChanged,this.inspectedURLChanged,this)]}project(e){const t=(e.isContentScript()?"js:extensions:":"js::")+this.debuggerModel.target().id()+":"+e.frameId;let o=this.#u.get(t);if(!o){const r=e.isContentScript()?i.Workspace.projectTypes.ContentScripts:i.Workspace.projectTypes.Network;o=new d(this.#V,t,r,"",!1),T.setTargetForProject(o,this.debuggerModel.target()),this.#u.set(t,o)}return o}uiSourceCodeForScript(e){return this.#$.get(e)??null}rawLocationToUILocation(e){const t=e.script();if(!t)return null;const o=this.#$.get(t);if(!o)return null;const r=this.#Q.get(o);if(!r)return null;if(r.hasDivergedFromVM()&&!r.isMergingToVM()||r.isDivergingFromVM())return null;if(r.script!==t)return null;const{lineNumber:s,columnNumber:i=0}=e;return o.uiLocation(s,i)}uiLocationToRawLocations(e,t,o){const r=this.#Q.get(e);if(!r)return[];const{script:s}=r;return s?[this.debuggerModel.createRawLocation(s,t,o)]:[]}uiLocationRangeToRawLocationRanges(e,{startLine:t,startColumn:o,endLine:r,endColumn:s}){const i=this.#Q.get(e);if(!i)return null;const{script:n}=i;if(!n)return null;return[{start:this.debuggerModel.createRawLocation(n,t,o),end:this.debuggerModel.createRawLocation(n,r,s)}]}inspectedURLChanged(e){for(let t=this.debuggerModel.target();t!==e.data;t=t.parentTarget())if(null===t)return;for(const e of Array.from(this.#$.keys()))this.removeScripts([e]),this.addScript(e)}addScript(t){if(t.isLiveEdit()||t.isBreakpointCondition)return;let o=t.sourceURL;if(!o)return;if(t.hasSourceURL)o=r.SourceMapManager.SourceMapManager.resolveRelativeSourceURL(t.debuggerModel.target(),o);else{if(t.isInlineScript())return;if(t.isContentScript()){if(!new e.ParsedURL.ParsedURL(o).isValid)return}}const s=this.project(t),i=s.uiSourceCodeForURL(o);if(i){const e=this.#Q.get(i);e&&e.script&&this.removeScripts([e.script])}const n=t.originalContentProvider(),a=s.createUISourceCode(o,n.contentType());T.setInitialFrameAttribution(a,t.frameId);const c=x(this.debuggerModel.target(),t.frameId,o),u=new me(this,a,t);this.#Q.set(a,u),this.#$.set(t,a);const l=t.isWasm()?"application/wasm":"text/javascript";s.addUISourceCodeWithProvider(a,n,c,l),this.debuggerWorkspaceBinding.updateLocations(t)}scriptFile(e){return this.#Q.get(e)||null}removeScripts(e){const o=new t.MapUtilities.Multimap;for(const t of e){const e=this.#$.get(t);if(!e)continue;const r=this.#Q.get(e);r&&r.dispose(),this.#Q.delete(e),this.#$.delete(t),o.set(e.project(),e),this.debuggerWorkspaceBinding.updateLocations(t)}for(const e of o.keysArray()){const t=o.get(e);let r=!0;for(const o of e.uiSourceCodes())if(!t.has(o)){r=!1;break}r?(this.#u.delete(e.id()),e.removeProject()):t.forEach((t=>e.removeUISourceCode(t.url())))}}executionContextDestroyed(e){const t=e.data;this.removeScripts(this.debuggerModel.scriptsForExecutionContext(t))}globalObjectCleared(){const e=Array.from(this.#$.keys());this.removeScripts(e)}resetForTest(){this.globalObjectCleared()}dispose(){e.EventTarget.removeEventListeners(this.#c),this.globalObjectCleared()}}class me extends e.ObjectWrapper.ObjectWrapper{#X;#Y;#Z;#ee;#te;#oe;#re;#se=new e.Mutex.Mutex;constructor(e,t,o){super(),this.#X=e,this.#Y=t,this.#Y.contentType().isScript()&&(this.#Z=o),this.#Y.addEventListener(i.UISourceCode.Events.WorkingCopyChanged,this.workingCopyChanged,this),this.#Y.addEventListener(i.UISourceCode.Events.WorkingCopyCommitted,this.workingCopyCommitted,this)}isDiverged(){if(this.#Y.isDirty())return!0;if(!this.#Z)return!1;if(void 0===this.#ee||null===this.#ee)return!1;const e=this.#Y.workingCopy();if(!e)return!1;if(!e.startsWith(this.#ee.trimEnd()))return!0;const t=this.#Y.workingCopy().substr(this.#ee.length);return Boolean(t.length)&&!t.match(r.Script.sourceURLRegex)}workingCopyChanged(){this.update()}workingCopyCommitted(){if(this.#Y.project().canSetFileContent())return;if(!this.#Z)return;const e=this.#Y.workingCopy();this.#Z.editSource(e).then((({status:t,exceptionDetails:o})=>{this.scriptSourceWasSet(e,t,o)}))}async scriptSourceWasSet(t,o,r){if("Ok"===o&&(this.#ee=t),await this.update(),"Ok"===o)return;if(!r)return void e.Console.Console.instance().addMessage(pe(de.liveEditFailed,{PH1:function(e){switch(e){case"BlockedByActiveFunction":return"Functions that are on the stack (currently being executed) can not be edited";case"BlockedByActiveGenerator":return"Async functions/generators that are active can not be edited";case"BlockedByTopLevelEsModuleChange":return"The top-level of ES modules can not be edited";case"CompileError":case"Ok":throw new Error("Compile errors and Ok status must not be reported on the console")}}(o)}),e.Console.MessageLevel.Warning);const s=pe(de.liveEditCompileFailed,{PH1:r.text});this.#Y.addLineMessage(i.UISourceCode.Message.Level.Error,s,r.lineNumber,r.columnNumber)}async update(){const e=await this.#se.acquire();this.isDiverged()&&!this.#oe?await this.divergeFromVM():!this.isDiverged()&&this.#oe&&await this.mergeToVM(),e()}async divergeFromVM(){this.#Z&&(this.#te=!0,await this.#X.debuggerWorkspaceBinding.updateLocations(this.#Z),this.#te=void 0,this.#oe=!0,this.dispatchEventToListeners("DidDivergeFromVM"))}async mergeToVM(){this.#Z&&(this.#oe=void 0,this.#re=!0,await this.#X.debuggerWorkspaceBinding.updateLocations(this.#Z),this.#re=void 0,this.dispatchEventToListeners("DidMergeToVM"))}hasDivergedFromVM(){return Boolean(this.#oe)}isDivergingFromVM(){return Boolean(this.#te)}isMergingToVM(){return Boolean(this.#re)}checkMapping(){this.#Z&&void 0===this.#ee?this.#Z.requestContent().then((e=>{this.#ee=e.content,this.update().then((()=>this.mappingCheckedForTest()))})):this.mappingCheckedForTest()}mappingCheckedForTest(){}dispose(){this.#Y.removeEventListener(i.UISourceCode.Events.WorkingCopyChanged,this.workingCopyChanged,this),this.#Y.removeEventListener(i.UISourceCode.Events.WorkingCopyCommitted,this.workingCopyCommitted,this)}addSourceMapURL(e){this.#Z&&this.#Z.debuggerModel.setSourceMapURL(this.#Z,e)}addDebugInfoURL(e){if(!this.#Z)return;const{pluginManager:t}=Me.instance();t&&t.setDebugInfoURL(this.#Z,e)}hasSourceMapURL(){return void 0!==this.#Z&&Boolean(this.#Z.sourceMapURL)}async missingSymbolFiles(){if(!this.#Z)return null;const{pluginManager:e}=this.#X.debuggerWorkspaceBinding;if(!e)return null;const t=await e.getSourcesForScript(this.#Z);return t&&"missingSymbolFiles"in t?t.missingSymbolFiles:null}get script(){return this.#Z||null}get uiSourceCode(){return this.#Y}}var Se=Object.freeze({__proto__:null,ResourceScriptMapping:he,ResourceScriptFile:me});let Le;class Me{resourceMapping;#ie;#J;#F;pluginManager;#ne;constructor(e,t){this.resourceMapping=e,this.#ie=[],this.#J=new Map,t.addModelListener(r.DebuggerModel.DebuggerModel,r.DebuggerModel.Events.GlobalObjectCleared,this.globalObjectCleared,this),t.addModelListener(r.DebuggerModel.DebuggerModel,r.DebuggerModel.Events.DebuggerResumed,this.debuggerResumed,this),t.observeModels(r.DebuggerModel.DebuggerModel,this),this.#ne=t,this.#F=new Set,this.pluginManager=a.Runtime.experiments.isEnabled("wasmDWARFDebugging")?new ie(t,e.workspace,this):null}initPluginManagerForTest(){return a.Runtime.experiments.isEnabled("wasmDWARFDebugging")?this.pluginManager||(this.pluginManager=new ie(this.#ne,this.resourceMapping.workspace,this)):this.pluginManager=null,this.pluginManager}static instance(e={forceNew:null,resourceMapping:null,targetManager:null}){const{forceNew:t,resourceMapping:o,targetManager:r}=e;if(!Le||t){if(!o||!r)throw new Error(`Unable to create DebuggerWorkspaceBinding: resourceMapping and targetManager must be provided: ${(new Error).stack}`);Le=new Me(o,r)}return Le}static removeInstance(){Le=void 0}addSourceMapping(e){this.#ie.push(e)}removeSourceMapping(e){const t=this.#ie.indexOf(e);-1!==t&&this.#ie.splice(t,1)}async computeAutoStepRanges(e,t){function o(e,t){const{start:o,end:r}=t;return o.scriptId===e.scriptId&&(!(e.lineNumberr.lineNumber)&&(!(e.lineNumber===o.lineNumber&&e.columnNumber=r.columnNumber)))}const s=t.location();if(!s)return[];const i=this.pluginManager;let n=[];if(i){if(e===r.DebuggerModel.StepMode.StepOut)return await i.getInlinedFunctionRanges(s);const t=await i.rawLocationToUILocation(s);if(t)return n=await i.uiLocationToRawLocationRanges(t.uiSourceCode,t.lineNumber,t.columnNumber)||[],n=n.filter((e=>o(s,e))),e===r.DebuggerModel.StepMode.StepOver&&(n=n.concat(await i.getInlinedCalleesRanges(s))),n}const a=this.#J.get(s.debuggerModel)?.compilerMapping;return a?e===r.DebuggerModel.StepMode.StepOut?[]:(n=a.getLocationRangesForSameSourceLocation(s),n=n.filter((e=>o(s,e))),n):[]}modelAdded(e){e.setBeforePausedCallback(this.shouldPause.bind(this)),this.#J.set(e,new fe(e,this)),e.setComputeAutoStepRangesCallback(this.computeAutoStepRanges.bind(this))}modelRemoved(e){e.setComputeAutoStepRangesCallback(null);const t=this.#J.get(e);t&&(t.dispose(),this.#J.delete(e))}async pendingLiveLocationChangesPromise(){await Promise.all(this.#F)}recordLiveLocationChange(e){e.then((()=>{this.#F.delete(e)})),this.#F.add(e)}async updateLocations(e){const t=this.#J.get(e.debuggerModel);if(t){const o=t.updateLocations(e);this.recordLiveLocationChange(o),await o}}async createLiveLocation(e,t,o){const r=this.#J.get(e.debuggerModel);if(!r)return null;const s=r.createLiveLocation(e,t,o);return this.recordLiveLocationChange(s),s}async createStackTraceTopFrameLiveLocation(e,t,o){console.assert(e.length>0);const r=Ce.createStackTraceTopFrameLocation(e,this,t,o);return this.recordLiveLocationChange(r),r}async createCallFrameLiveLocation(e,t,o){if(!e.script())return null;const r=e.debuggerModel,s=this.createLiveLocation(e,t,o);this.recordLiveLocationChange(s);const i=await s;return i?(this.registerCallFrameLiveLocation(r,i),i):null}async rawLocationToUILocation(e){for(const t of this.#ie){const o=t.rawLocationToUILocation(e);if(o)return o}if(this.pluginManager){const t=await this.pluginManager.rawLocationToUILocation(e);if(t)return t}const t=this.#J.get(e.debuggerModel);return t?t.rawLocationToUILocation(e):null}uiSourceCodeForSourceMapSourceURL(e,t,o){const r=this.#J.get(e);return r?r.compilerMapping.uiSourceCodeForURL(t,o):null}async uiSourceCodeForSourceMapSourceURLPromise(e,t,o){return this.uiSourceCodeForSourceMapSourceURL(e,t,o)||this.waitForUISourceCodeAdded(t,e.target())}async uiSourceCodeForDebuggerLanguagePluginSourceURLPromise(e,t){if(this.pluginManager){return this.pluginManager.uiSourceCodeForURL(e,t)||this.waitForUISourceCodeAdded(t,e.target())}return null}uiSourceCodeForScript(e){const t=this.#J.get(e.debuggerModel);return t?t.uiSourceCodeForScript(e):null}waitForUISourceCodeAdded(e,t){return new Promise((o=>{const r=i.Workspace.WorkspaceImpl.instance(),s=r.addEventListener(i.Workspace.Events.UISourceCodeAdded,(n=>{const a=n.data;a.url()===e&&T.targetForUISourceCode(a)===t&&(r.removeEventListener(i.Workspace.Events.UISourceCodeAdded,s.listener),o(a))}))}))}async uiLocationToRawLocations(e,t,o){for(const r of this.#ie){const s=r.uiLocationToRawLocations(e,t,o);if(s.length)return s}const r=await(this.pluginManager?.uiLocationToRawLocations(e,t,o));if(r)return r;for(const r of this.#J.values()){const s=r.uiLocationToRawLocations(e,t,o);if(s.length)return s}return[]}async uiLocationRangeToRawLocationRanges(e,t){for(const o of this.#ie){const r=o.uiLocationRangeToRawLocationRanges(e,t);if(r)return r}if(null!==this.pluginManager){const o=await this.pluginManager.uiLocationRangeToRawLocationRanges(e,t);if(o)return o}for(const o of this.#J.values()){const r=o.uiLocationRangeToRawLocationRanges(e,t);if(r)return r}return[]}uiLocationToRawLocationsForUnformattedJavaScript(e,t,o){console.assert(e.contentType().isScript());const r=[];for(const s of this.#J.values())r.push(...s.uiLocationToRawLocations(e,t,o));return r}async normalizeUILocation(e){const t=await this.uiLocationToRawLocations(e.uiSourceCode,e.lineNumber,e.columnNumber);for(const e of t){const t=await this.rawLocationToUILocation(e);if(t)return t}return e}async getMappedLines(e){for(const t of this.#J.values()){const o=t.getMappedLines(e);if(null!==o)return o}const{pluginManager:t}=this;return t?await t.getMappedLines(e):null}scriptFile(e,t){const o=this.#J.get(t);return o?o.getResourceScriptMapping().scriptFile(e):null}scriptsForUISourceCode(e){const t=new Set;this.pluginManager&&this.pluginManager.scriptsForUISourceCode(e).forEach((e=>t.add(e)));for(const o of this.#J.values()){const r=o.getResourceScriptMapping().scriptFile(e);r&&r.script&&t.add(r.script),o.compilerMapping.scriptsForUISourceCode(e).forEach((e=>t.add(e)))}return[...t]}supportsConditionalBreakpoints(e){if(!this.pluginManager)return!0;return this.pluginManager.scriptsForUISourceCode(e).every((e=>e.isJavaScript()))}globalObjectCleared(e){this.reset(e.data)}reset(e){const t=this.#J.get(e);if(t){for(const e of t.callFrameLocations.values())this.removeLiveLocation(e);t.callFrameLocations.clear()}}resetForTest(e){const t=e.model(r.DebuggerModel.DebuggerModel),o=this.#J.get(t);o&&o.getResourceScriptMapping().resetForTest()}registerCallFrameLiveLocation(e,t){const o=this.#J.get(e);if(o){o.callFrameLocations.add(t)}}removeLiveLocation(e){const t=this.#J.get(e.rawLocation.debuggerModel);t&&t.disposeLocation(e)}debuggerResumed(e){this.reset(e.data)}async shouldPause(t,o){const{callFrames:[r]}=t;if(!r)return!1;const s=r.functionLocation();if(!(o&&"step"===t.reason&&s&&this.pluginManager&&r.script.isWasm()&&e.Settings.moduleSetting("wasmAutoStepping").get()&&this.pluginManager.hasPluginForScript(r.script)))return!0;return!!await this.pluginManager.rawLocationToUILocation(r.location())||(o.script()!==s.script()||o.columnNumber!==s.columnNumber||o.lineNumber!==s.lineNumber)}}class fe{#ae;#o;callFrameLocations;#ce;#R;#X;compilerMapping;#m;constructor(e,o){this.#ae=e,this.#o=o,this.callFrameLocations=new Set;const{workspace:r}=o.resourceMapping;this.#ce=new ce(e,r,o),this.#R=o.resourceMapping,this.#X=new he(e,r,o),this.compilerMapping=new y(e,r,o),this.#m=new t.MapUtilities.Multimap}async createLiveLocation(e,t,o){console.assert(""!==e.scriptId);const r=e.scriptId,s=new be(r,e,this.#o,t,o);return this.#m.set(r,s),await s.update(),s}disposeLocation(e){this.#m.delete(e.scriptId,e)}async updateLocations(e){const t=[];for(const o of this.#m.get(e.scriptId))t.push(o.update());await Promise.all(t)}rawLocationToUILocation(e){let t=this.compilerMapping.rawLocationToUILocation(e);return t=t||this.#X.rawLocationToUILocation(e),t=t||this.#R.jsLocationToUILocation(e),t=t||this.#ce.rawLocationToUILocation(e),t}uiSourceCodeForScript(e){let t=null;return t=t||this.#X.uiSourceCodeForScript(e),t=t||this.#R.uiSourceCodeForScript(e),t=t||this.#ce.uiSourceCodeForScript(e),t}uiLocationToRawLocations(e,t,o=0){let r=this.compilerMapping.uiLocationToRawLocations(e,t,o);return r=r.length?r:this.#X.uiLocationToRawLocations(e,t,o),r=r.length?r:this.#R.uiLocationToJSLocations(e,t,o),r=r.length?r:this.#ce.uiLocationToRawLocations(e,t,o),r}uiLocationRangeToRawLocationRanges(e,t){let o=this.compilerMapping.uiLocationRangeToRawLocationRanges(e,t);return o??=this.#X.uiLocationRangeToRawLocationRanges(e,t),o??=this.#R.uiLocationRangeToJSLocationRanges(e,t),o??=this.#ce.uiLocationRangeToRawLocationRanges(e,t),o}getMappedLines(e){return this.compilerMapping.getMappedLines(e)}dispose(){this.#ae.setBeforePausedCallback(null),this.compilerMapping.dispose(),this.#X.dispose(),this.#ce.dispose()}getResourceScriptMapping(){return this.#X}}class be extends U{scriptId;rawLocation;#ue;constructor(e,t,o,r,s){super(r,s),this.scriptId=e,this.rawLocation=t,this.#ue=o}async uiLocation(){const e=this.rawLocation;return this.#ue.rawLocationToUILocation(e)}dispose(){super.dispose(),this.#ue.removeLiveLocation(this)}async isIgnoreListed(){const e=await this.uiLocation();return!!e&&L.instance().isUserOrSourceMapIgnoreListedUISourceCode(e.uiSourceCode)}}class Ce extends U{#le;#de;#m;constructor(e,t){super(e,t),this.#le=!0,this.#de=null,this.#m=null}static async createStackTraceTopFrameLocation(e,t,o,r){const s=new Ce(o,r),i=e.map((e=>t.createLiveLocation(e,s.scheduleUpdate.bind(s),r)));return s.#m=(await Promise.all(i)).filter((e=>Boolean(e))),await s.updateLocation(),s}async uiLocation(){return this.#de?this.#de.uiLocation():null}async isIgnoreListed(){return!!this.#de&&this.#de.isIgnoreListed()}dispose(){if(super.dispose(),this.#m)for(const e of this.#m)e.dispose();this.#m=null,this.#de=null}async scheduleUpdate(){this.#le||(this.#le=!0,queueMicrotask((()=>{this.updateLocation()})))}async updateLocation(){if(this.#le=!1,this.#m&&0!==this.#m.length){this.#de=this.#m[0];for(const e of this.#m)if(!await e.isIgnoreListed()){this.#de=e;break}this.update()}}}var Ie=Object.freeze({__proto__:null,DebuggerWorkspaceBinding:Me,Location:be});class ve{#ge;#pe;#he;#me;#Se;#Le;#Me;#fe;#be;#Ce;#Ie;#ve;constructor(e,t,o){this.#ge=e,this.#pe=e.size,this.#he=0,this.#Se=t,this.#Le=o,this.#Me=new TextDecoder,this.#fe=!1,this.#be=null,this.#me=null}async read(e){if(this.#Le&&this.#Le(this),this.#ge?.type.endsWith("gzip")){const e=this.#ge.stream(),t=this.decompressStream(e);this.#me=t.getReader()}else this.#ve=new FileReader,this.#ve.onload=this.onChunkLoaded.bind(this),this.#ve.onerror=this.onError.bind(this);return this.#Ie=e,this.loadChunk(),new Promise((e=>{this.#Ce=e}))}cancel(){this.#fe=!0}loadedSize(){return this.#he}fileSize(){return this.#pe}fileName(){return this.#ge?this.#ge.name:""}error(){return this.#be}decompressStream(e){const t=new DecompressionStream("gzip");return e.pipeThrough(t)}onChunkLoaded(e){if(this.#fe)return;if(e.target.readyState!==FileReader.DONE)return;if(!this.#ve)return;const t=this.#ve.result;this.#he+=t.byteLength;const o=this.#he===this.#pe;this.decodeChunkBuffer(t,o)}async decodeChunkBuffer(e,t){if(!this.#Ie)return;const o=this.#Me.decode(e,{stream:!t});await this.#Ie.write(o),this.#fe||(this.#Le&&this.#Le(this),t?this.finishRead():this.loadChunk())}async finishRead(){this.#Ie&&(this.#ge=null,this.#ve=null,await this.#Ie.close(),this.#Ce(!this.#be))}async loadChunk(){if(this.#Ie&&this.#ge){if(this.#me){const{value:e,done:t}=await this.#me.read();if(t||!e)return this.finishRead();this.decodeChunkBuffer(e.buffer,!1)}if(this.#ve){const e=this.#he,t=Math.min(this.#pe,e+this.#Se),o=this.#ge.slice(e,t);this.#ve.readAsArrayBuffer(o)}}}onError(e){const t=e.target;this.#be=t.error,this.#Ce(!1)}}var we=Object.freeze({__proto__:null,ChunkedFileReader:ve,FileOutputStream:class{#we;#Te;#Re;constructor(){this.#we=[]}async open(e){this.#Re=!1,this.#we=[],this.#Te=e;const t=await i.FileManager.FileManager.instance().save(this.#Te,"",!0);return t&&i.FileManager.FileManager.instance().addEventListener(i.FileManager.Events.AppendedToURL,this.onAppendDone,this),Boolean(t)}write(e){return new Promise((t=>{this.#we.push(t),i.FileManager.FileManager.instance().append(this.#Te,e)}))}async close(){this.#Re=!0,this.#we.length||(i.FileManager.FileManager.instance().removeEventListener(i.FileManager.Events.AppendedToURL,this.onAppendDone,this),i.FileManager.FileManager.instance().close(this.#Te))}onAppendDone(e){if(e.data!==this.#Te)return;const t=this.#we.shift();t&&t(),this.#we.length||this.#Re&&(i.FileManager.FileManager.instance().removeEventListener(i.FileManager.Events.AppendedToURL,this.onAppendDone,this),i.FileManager.FileManager.instance().close(this.#Te))}}});class Te{#ye=new WeakMap;constructor(){r.TargetManager.TargetManager.instance().observeModels(r.DebuggerModel.DebuggerModel,this),r.TargetManager.TargetManager.instance().observeModels(r.CSSModel.CSSModel,this)}modelAdded(e){const t=e.target(),o=this.#ye.get(t)??new Re;e instanceof r.DebuggerModel.DebuggerModel?o.setDebuggerModel(e):o.setCSSModel(e),this.#ye.set(t,o)}modelRemoved(e){const t=e.target();this.#ye.get(t)?.clear()}addMessage(e,t,o){this.#ye.get(o)?.addMessage(e,t)}clear(){for(const e of r.TargetManager.TargetManager.instance().targets()){this.#ye.get(e)?.clear()}}}class Re{#ae;#b;#Fe=new Map;#p;constructor(){this.#p=new P,i.Workspace.WorkspaceImpl.instance().addEventListener(i.Workspace.Events.UISourceCodeAdded,this.#Ue.bind(this))}setDebuggerModel(e){if(this.#ae)throw new Error("Cannot set DebuggerModel twice");this.#ae=e,e.addEventListener(r.DebuggerModel.Events.ParsedScriptSource,(e=>{queueMicrotask((()=>{this.#Pe(e)}))})),e.addEventListener(r.DebuggerModel.Events.GlobalObjectCleared,this.#ke,this)}setCSSModel(e){if(this.#b)throw new Error("Cannot set CSSModel twice");this.#b=e,e.addEventListener(r.CSSModel.Events.StyleSheetAdded,(e=>queueMicrotask((()=>this.#je(e)))))}async addMessage(e,t){const o=new Fe(e,this.#p),r=this.#De(t)??this.#Ee(t)??this.#Ne(t);if(r&&await o.updateLocationSource(r),t.url){let e=this.#Fe.get(t.url);e||(e=[],this.#Fe.set(t.url,e)),e.push({source:t,presentation:o})}}#Ne(e){if(!e.url)return null;const t=i.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(e.url);return t?new i.UISourceCode.UILocation(t,e.line,e.column):null}#Ee(e){if(!this.#b||!e.url)return null;return this.#b.createRawLocationsByURL(e.url,e.line,e.column)[0]??null}#De(e){if(!this.#ae)return null;if(e.scriptId)return this.#ae.createRawLocationByScriptId(e.scriptId,e.line,e.column);const t=e.stackTrace&&e.stackTrace.callFrames?e.stackTrace.callFrames[0]:null;return t?this.#ae.createRawLocationByScriptId(t.scriptId,t.lineNumber,t.columnNumber):e.url?this.#ae.createRawLocationByURL(e.url,e.line,e.column):null}#Pe(e){const t=e.data,o=this.#Fe.get(t.sourceURL),r=[];for(const{presentation:e,source:s}of o??[]){const o=this.#De(s);o&&t.scriptId===o.scriptId&&r.push(e.updateLocationSource(o))}Promise.all(r).then(this.parsedScriptSourceForTest.bind(this))}parsedScriptSourceForTest(){}#Ue(e){const t=e.data,o=this.#Fe.get(t.url()),r=[];for(const{presentation:e,source:s}of o??[])r.push(e.updateLocationSource(new i.UISourceCode.UILocation(t,s.line,s.column)));Promise.all(r).then(this.uiSourceCodeAddedForTest.bind(this))}uiSourceCodeAddedForTest(){}#je(e){const t=e.data,o=this.#Fe.get(t.sourceURL),s=[];for(const{source:e,presentation:i}of o??[])t.containsLocation(e.line,e.column)&&s.push(i.updateLocationSource(new r.CSSModel.CSSLocation(t,e.line,e.column)));Promise.all(s).then(this.styleSheetAddedForTest.bind(this))}styleSheetAddedForTest(){}clear(){this.#ke()}#ke(){const e=Array.from(this.#Fe.values()).flat();for(const{presentation:t}of e)t.dispose();this.#Fe.clear(),this.#p.disposeAll()}}class ye extends U{#Ne;constructor(e,t,o){super(t,o),this.#Ne=e}async isIgnoreListed(){return!1}async uiLocation(){return this.#Ne}}class Fe{#Ae;#xe;#p;#Oe;constructor(e,t){this.#Oe=e,this.#p=t}async updateLocationSource(e){e instanceof r.DebuggerModel.Location?await Me.instance().createLiveLocation(e,this.#We.bind(this),this.#p):e instanceof r.CSSModel.CSSLocation?await q.instance().createLiveLocation(e,this.#We.bind(this),this.#p):e instanceof i.UISourceCode.UILocation&&(this.#xe||(this.#xe=new ye(e,this.#We.bind(this),this.#p),await this.#xe.update()))}async#We(e){this.#Ae&&this.#Ae.removeMessage(this.#Oe),e!==this.#xe&&(this.#Ae?.removeMessage(this.#Oe),this.#xe?.dispose(),this.#xe=e);const t=await e.uiLocation();t&&(this.#Oe.range=s.TextRange.TextRange.createFromLocation(t.lineNumber,t.columnNumber||0),this.#Ae=t.uiSourceCode,this.#Ae.addMessage(this.#Oe))}dispose(){this.#Ae?.removeMessage(this.#Oe),this.#xe?.dispose()}}var Ue=Object.freeze({__proto__:null,PresentationSourceFrameMessageManager:Te,PresentationConsoleMessageManager:class{#Be=new Te;constructor(){r.TargetManager.TargetManager.instance().addModelListener(r.ConsoleModel.ConsoleModel,r.ConsoleModel.Events.MessageAdded,(e=>this.consoleMessageAdded(e.data))),r.ConsoleModel.ConsoleModel.allMessagesUnordered().forEach(this.consoleMessageAdded,this),r.TargetManager.TargetManager.instance().addModelListener(r.ConsoleModel.ConsoleModel,r.ConsoleModel.Events.ConsoleCleared,(()=>this.#Be.clear()))}consoleMessageAdded(e){const t=e.runtimeModel();if(!e.isErrorOrWarning()||!e.runtimeModel()||"violation"===e.source||!t)return;const o="error"===e.level?i.UISourceCode.Message.Level.Error:i.UISourceCode.Message.Level.Warning;this.#Be.addMessage(new i.UISourceCode.Message(o,e.messageText),e,t.target())}},PresentationSourceFrameMessageHelper:Re,PresentationSourceFrameMessage:Fe});const Pe=new WeakMap,ke=new WeakMap,je=new WeakSet;function De(e){return new s.TextRange.TextRange(e.lineOffset,e.columnOffset,e.endLine,e.endColumn)}function Ee(e){return new s.TextRange.TextRange(e.startLine,e.startColumn,e.endLine,e.endColumn)}class Ne{project;#L;#b;#c;constructor(e,t){const o=t.target();this.project=new d(e,"resources:"+o.id(),i.Workspace.projectTypes.Network,"",!1),T.setTargetForProject(this.project,o),this.#L=new Map;const s=o.model(r.CSSModel.CSSModel);console.assert(Boolean(s)),this.#b=s;for(const e of t.frames())for(const t of e.getResourcesMap().values())this.addResource(t);this.#c=[t.addEventListener(r.ResourceTreeModel.Events.ResourceAdded,this.resourceAdded,this),t.addEventListener(r.ResourceTreeModel.Events.FrameWillNavigate,this.frameWillNavigate,this),t.addEventListener(r.ResourceTreeModel.Events.FrameDetached,this.frameDetached,this),this.#b.addEventListener(r.CSSModel.Events.StyleSheetChanged,(e=>{this.styleSheetChanged(e)}),this)]}async styleSheetChanged(e){const t=this.#b.styleSheetHeaderForId(e.data.styleSheetId);if(!t||!t.isInline||t.isInline&&t.isMutable)return;const o=this.#L.get(t.resourceURL());o&&await o.styleSheetChanged(t,e.data.edit||null)}acceptsResource(t){const o=t.resourceType();return(o===e.ResourceType.resourceTypes.Image||o===e.ResourceType.resourceTypes.Font||o===e.ResourceType.resourceTypes.Document||o===e.ResourceType.resourceTypes.Manifest)&&(!(o===e.ResourceType.resourceTypes.Image&&t.mimeType&&!t.mimeType.startsWith("image"))&&(!(o===e.ResourceType.resourceTypes.Font&&t.mimeType&&!t.mimeType.includes("font"))&&(o!==e.ResourceType.resourceTypes.Image&&o!==e.ResourceType.resourceTypes.Font||!t.contentURL().startsWith("data:"))))}resourceAdded(e){this.addResource(e.data)}addResource(e){if(!this.acceptsResource(e))return;let t=this.#L.get(e.url);t?t.addResource(e):(t=new Ae(this.project,e),this.#L.set(e.url,t))}removeFrameResources(e){for(const t of e.resources()){if(!this.acceptsResource(t))continue;const e=this.#L.get(t.url);e&&(1===e.resources.size?(e.dispose(),this.#L.delete(t.url)):e.removeResource(t))}}frameWillNavigate(e){this.removeFrameResources(e.data)}frameDetached(e){this.removeFrameResources(e.data.frame)}resetForTest(){for(const e of this.#L.values())e.dispose();this.#L.clear()}dispose(){e.EventTarget.removeEventListeners(this.#c);for(const e of this.#L.values())e.dispose();this.#L.clear(),this.project.removeProject()}getProject(){return this.project}}class Ae{resources;#S;#Ae;#He;constructor(e,t){this.resources=new Set([t]),this.#S=e,this.#Ae=this.#S.createUISourceCode(t.url,t.contentType()),je.add(this.#Ae),t.frameId&&T.setInitialFrameAttribution(this.#Ae,t.frameId),this.#S.addUISourceCodeWithProvider(this.#Ae,this,O(t),t.mimeType),this.#He=[],Promise.all([...this.inlineScripts().map((e=>Me.instance().updateLocations(e))),...this.inlineStyles().map((e=>q.instance().updateLocations(e)))])}inlineStyles(){const e=T.targetForUISourceCode(this.#Ae),t=[];if(!e)return t;const o=e.model(r.CSSModel.CSSModel);if(o)for(const e of o.getStyleSheetIdsForURL(this.#Ae.url())){const r=o.styleSheetHeaderForId(e);r&&t.push(r)}return t}inlineScripts(){const e=T.targetForUISourceCode(this.#Ae);if(!e)return[];const t=e.model(r.DebuggerModel.DebuggerModel);return t?t.scripts().filter((e=>e.embedderName()===this.#Ae.url())):[]}async styleSheetChanged(e,t){if(this.#He.push({stylesheet:e,edit:t}),this.#He.length>1)return;const{content:o}=await this.#Ae.requestContent();null!==o&&await this.innerStyleSheetChanged(o),this.#He=[]}async innerStyleSheetChanged(e){const t=this.inlineScripts(),o=this.inlineStyles();let r=new s.Text.Text(e);for(const e of this.#He){const i=e.edit;if(!i)continue;const n=e.stylesheet,a=Pe.get(n)??Ee(n),c=i.oldRange.relativeFrom(a.startLine,a.startColumn),u=i.newRange.relativeFrom(a.startLine,a.startColumn);r=new s.Text.Text(r.replaceRange(c,i.newText));const l=[];for(const e of t){const t=ke.get(e)??De(e);t.follows(c)&&(ke.set(e,t.rebaseAfterTextEdit(c,u)),l.push(Me.instance().updateLocations(e)))}for(const e of o){const t=Pe.get(e)??Ee(e);t.follows(c)&&(Pe.set(e,t.rebaseAfterTextEdit(c,u)),l.push(q.instance().updateLocations(e)))}await Promise.all(l)}this.#Ae.addRevision(r.value())}addResource(e){this.resources.add(e),e.frameId&&T.addFrameAttribution(this.#Ae,e.frameId)}removeResource(e){this.resources.delete(e),e.frameId&&T.removeFrameAttribution(this.#Ae,e.frameId)}dispose(){this.#S.removeUISourceCode(this.#Ae.url()),Promise.all([...this.inlineScripts().map((e=>Me.instance().updateLocations(e))),...this.inlineStyles().map((e=>q.instance().updateLocations(e)))])}firstResource(){return console.assert(this.resources.size>0),this.resources.values().next().value}contentURL(){return this.firstResource().contentURL()}contentType(){return this.firstResource().contentType()}requestContent(){return this.firstResource().requestContent()}searchInContent(e,t,o){return this.firstResource().searchInContent(e,t,o)}}var xe=Object.freeze({__proto__:null,ResourceMapping:class{workspace;#y;constructor(e,t){this.workspace=t,this.#y=new Map,e.observeModels(r.ResourceTreeModel.ResourceTreeModel,this)}modelAdded(e){const t=new Ne(this.workspace,e);this.#y.set(e,t)}modelRemoved(e){const t=this.#y.get(e);t&&(t.dispose(),this.#y.delete(e))}infoForTarget(e){const t=e.model(r.ResourceTreeModel.ResourceTreeModel);return t&&this.#y.get(t)||null}uiSourceCodeForScript(e){const t=this.infoForTarget(e.debuggerModel.target());if(!t)return null;return t.getProject().uiSourceCodeForURL(e.sourceURL)}cssLocationToUILocation(e){const t=e.header();if(!t)return null;const o=this.infoForTarget(e.cssModel().target());if(!o)return null;const r=o.getProject().uiSourceCodeForURL(e.url);if(!r)return null;const s=Pe.get(t)??Ee(t),i=e.lineNumber+s.startLine-t.startLine;let n=e.columnNumber;return e.lineNumber===t.startLine&&(n+=s.startColumn-t.startColumn),r.uiLocation(i,n)}jsLocationToUILocation(e){const t=e.script();if(!t)return null;const o=this.infoForTarget(e.debuggerModel.target());if(!o)return null;const r=t.embedderName();if(!r)return null;const s=o.getProject().uiSourceCodeForURL(r);if(!s)return null;const{startLine:i,startColumn:n}=ke.get(t)??De(t);let{lineNumber:a,columnNumber:c}=e;return a===t.lineOffset&&(c+=n-t.columnOffset),a+=i-t.lineOffset,t.hasSourceURL&&(0===a&&(c+=t.columnOffset),a+=t.lineOffset),s.uiLocation(a,c)}uiLocationToJSLocations(e,t,o){if(!je.has(e))return[];const s=T.targetForUISourceCode(e);if(!s)return[];const i=s.model(r.DebuggerModel.DebuggerModel);if(!i)return[];const n=[];for(const r of i.scripts()){if(r.embedderName()!==e.url())continue;const s=ke.get(r)??De(r);if(!s.containsLocation(t,o))continue;let a=t,c=o;r.hasSourceURL&&(a-=s.startLine,0===a&&(c-=s.startColumn)),n.push(i.createRawLocation(r,a,c))}return n}uiLocationRangeToJSLocationRanges(e,t){if(!je.has(e))return null;const o=T.targetForUISourceCode(e);if(!o)return null;const s=o.model(r.DebuggerModel.DebuggerModel);if(!s)return null;const i=[];for(const o of s.scripts()){if(o.embedderName()!==e.url())continue;const r=(ke.get(o)??De(o)).intersection(t);if(r.isEmpty())continue;let{startLine:n,startColumn:a,endLine:c,endColumn:u}=r;o.hasSourceURL&&(n-=r.startLine,0===n&&(a-=r.startColumn),c-=r.startLine,0===c&&(u-=r.startColumn));const l=s.createRawLocation(o,n,a),d=s.createRawLocation(o,c,u);i.push({start:l,end:d})}return i}getMappedLines(e){if(!je.has(e))return null;const t=T.targetForUISourceCode(e);if(!t)return null;const o=t.model(r.DebuggerModel.DebuggerModel);if(!o)return null;const s=new Set;for(const t of o.scripts()){if(t.embedderName()!==e.url())continue;const{startLine:o,endLine:r}=ke.get(t)??De(t);for(let e=o;e<=r;++e)s.add(e)}return s}uiLocationToCSSLocations(e){if(!je.has(e.uiSourceCode))return[];const t=T.targetForUISourceCode(e.uiSourceCode);if(!t)return[];const o=t.model(r.CSSModel.CSSModel);return o?o.createRawLocationsByURL(e.uiSourceCode.url(),e.lineNumber,e.columnNumber):[]}resetForTest(e){const t=e.model(r.ResourceTreeModel.ResourceTreeModel),o=t?this.#y.get(t):null;o&&o.resetForTest()}}});var Oe=Object.freeze({__proto__:null,TempFile:class{#_e;constructor(){this.#_e=null}write(e){this.#_e&&e.unshift(this.#_e),this.#_e=new Blob(e,{type:"text/plain"})}read(){return this.readRange()}size(){return this.#_e?this.#_e.size:0}async readRange(t,o){if(!this.#_e)return e.Console.Console.instance().error("Attempt to read a temp file that was never written"),"";const r="number"==typeof t||"number"==typeof o?this.#_e.slice(t,o):this.#_e,s=new FileReader;try{await new Promise(((e,t)=>{s.onloadend=e,s.onerror=t,s.readAsText(r)}))}catch(t){e.Console.Console.instance().error("Failed to read from temp file: "+t.message)}return s.result}async copyToOutputStream(e,t){if(!this.#_e)return e.close(),null;const o=new ve(this.#_e,1e7,t);return o.read(e).then((e=>e?null:o.error()))}remove(){this.#_e=null}}});export{G as CSSWorkspaceBinding,F as CompilerScriptMapping,g as ContentProviderBasedProject,ae as DebuggerLanguagePlugins,Ie as DebuggerWorkspaceBinding,le as DefaultScriptMapping,we as FileUtils,f as IgnoreListManager,k as LiveLocation,R as NetworkProject,Ue as PresentationConsoleMessageHelper,xe as ResourceMapping,Se as ResourceScriptMapping,W as ResourceUtils,N as SASSSourceMapping,z as StylesSourceMapping,Oe as TempFile}; diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/breakpoints/breakpoints-legacy.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/breakpoints/breakpoints-legacy.js deleted file mode 100644 index 990553da3..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/breakpoints/breakpoints-legacy.js +++ /dev/null @@ -1 +0,0 @@ -import*as n from"./breakpoints.js";self.Bindings=self.Bindings||{},Bindings=Bindings||{},Bindings.BreakpointManager=n.BreakpointManager.BreakpointManager,Bindings.BreakpointManager.Events=n.BreakpointManager.Events,Bindings.BreakpointManager.Breakpoint=n.BreakpointManager.Breakpoint,Bindings.BreakpointManager.ModelBreakpoint=n.BreakpointManager.ModelBreakpoint; diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/breakpoints/breakpoints.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/breakpoints/breakpoints.js deleted file mode 100644 index e0d5ad692..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/breakpoints/breakpoints.js +++ /dev/null @@ -1 +0,0 @@ -import*as e from"../../core/common/common.js";import*as t from"../../core/host/host.js";import*as o from"../../core/platform/platform.js";import{assertNotNullOrUndefined as i}from"../../core/platform/platform.js";import*as r from"../../core/root/root.js";import*as s from"../../core/sdk/sdk.js";import*as n from"../bindings/bindings.js";import*as a from"../workspace/workspace.js";let u;class d extends e.ObjectWrapper.ObjectWrapper{storage=new h;#e;targetManager;debuggerWorkspaceBinding;#t=new Map;#o=new Map;#i=new Map;#r=[];constructor(e,t,o){super(),this.#e=t,this.targetManager=e,this.debuggerWorkspaceBinding=o,r.Runtime.experiments.isEnabled(r.Runtime.ExperimentName.SET_ALL_BREAKPOINTS_EAGERLY)&&(this.storage.mute(),this.#s(),this.storage.unmute()),this.#e.addEventListener(a.Workspace.Events.UISourceCodeAdded,this.uiSourceCodeAdded,this),this.#e.addEventListener(a.Workspace.Events.UISourceCodeRemoved,this.uiSourceCodeRemoved,this),this.#e.addEventListener(a.Workspace.Events.ProjectRemoved,this.projectRemoved,this),this.targetManager.observeModels(s.DebuggerModel.DebuggerModel,this)}#s(){for(const e of this.storage.breakpoints.values()){const t=h.computeId(e),o=new l(this,null,e,"RESTORED");this.#i.set(t,o)}}static instance(e={forceNew:null,targetManager:null,workspace:null,debuggerWorkspaceBinding:null}){const{forceNew:t,targetManager:o,workspace:i,debuggerWorkspaceBinding:r}=e;if(!u||t){if(!o||!i||!r)throw new Error(`Unable to create settings: targetManager, workspace, and debuggerWorkspaceBinding must be provided: ${(new Error).stack}`);u=new d(o,i,r)}return u}modelAdded(e){r.Runtime.experiments.isEnabled(r.Runtime.ExperimentName.INSTRUMENTATION_BREAKPOINTS)&&e.setSynchronizeBreakpointsCallback(this.restoreBreakpointsForScript.bind(this))}modelRemoved(e){e.setSynchronizeBreakpointsCallback(null)}addUpdateBindingsCallback(e){this.#r.push(e)}async copyBreakpoints(e,t){const o=t.project().uiSourceCodeForURL(t.url())!==t||this.#e.project(t.project().id())!==t.project(),i=this.storage.breakpointItems(e.url(),e.contentType().name());for(const e of i)o?this.storage.updateBreakpoint({...e,url:t.url(),resourceTypeName:t.contentType().name()}):await this.setBreakpoint(t,e.lineNumber,e.columnNumber,e.condition,e.enabled,e.isLogpoint,"RESTORED")}async restoreBreakpointsForScript(e){if(!r.Runtime.experiments.isEnabled(r.Runtime.ExperimentName.INSTRUMENTATION_BREAKPOINTS))return;if(!e.sourceURL)return;const t=await this.getUISourceCodeWithUpdatedBreakpointInfo(e);this.#n(e.sourceURL)&&await this.#a(t);const o=e.debuggerModel,s=await o.sourceMapManager().sourceMapForClientPromise(e);if(s)for(const t of s.sourceURLs())if(this.#n(t)){const i=await this.debuggerWorkspaceBinding.uiSourceCodeForSourceMapSourceURLPromise(o,t,e.isContentScript());await this.#a(i)}const{pluginManager:n}=this.debuggerWorkspaceBinding;if(n){const t=await n.getSourcesForScript(e);if(Array.isArray(t))for(const e of t)if(this.#n(e)){const t=await this.debuggerWorkspaceBinding.uiSourceCodeForDebuggerLanguagePluginSourceURLPromise(o,e);i(t),await this.#a(t)}}}async getUISourceCodeWithUpdatedBreakpointInfo(e){const t=this.debuggerWorkspaceBinding.uiSourceCodeForScript(e);return i(t),await this.#u(t),t}async#u(e){if(this.#r.length>0){const t=[];for(const o of this.#r)t.push(o(e));await Promise.all(t)}}async#a(e){this.restoreBreakpoints(e);const t=this.#i.values(),o=Array.from(t).filter((t=>t.uiSourceCodes.has(e)));await Promise.all(o.map((e=>e.updateBreakpoint())))}#n(e){return this.storage.breakpointItems(e).length>0}static getScriptForInlineUiSourceCode(e){const t=n.DefaultScriptMapping.DefaultScriptMapping.scriptForUISourceCode(e);return t&&t.isInlineScript()&&!t.hasSourceURL?t:null}static breakpointLocationFromUiLocation(e){const t=e.uiSourceCode,o=d.getScriptForInlineUiSourceCode(t),{lineNumber:i,columnNumber:r}=o?o.relativeLocationToRawLocation(e):e;return{lineNumber:i,columnNumber:r}}static uiLocationFromBreakpointLocation(e,t,o){const i=d.getScriptForInlineUiSourceCode(e);return i&&({lineNumber:t,columnNumber:o}=i.rawLocationToRelativeLocation({lineNumber:t,columnNumber:o})),e.uiLocation(t,o)}static isValidPositionInScript(e,t,o){return!o||!(eo.endLine)&&(!(e===o.lineOffset&&t&&t=o.endColumn)))}restoreBreakpoints(e){const t=d.getScriptForInlineUiSourceCode(e),o=t?.sourceURL??e.url();if(!o)return;const i=e.contentType();this.storage.mute();const r=this.storage.breakpointItems(o,i.name());for(const o of r){const{lineNumber:i,columnNumber:r}=o;d.isValidPositionInScript(i,r,t)&&this.innerSetBreakpoint(e,i,r,o.condition,o.enabled,o.isLogpoint,"RESTORED")}this.storage.unmute()}uiSourceCodeAdded(e){const t=e.data;this.restoreBreakpoints(t)}uiSourceCodeRemoved(e){const t=e.data;this.removeUISourceCode(t)}projectRemoved(e){const t=e.data;for(const e of t.uiSourceCodes())this.removeUISourceCode(e)}removeUISourceCode(e){this.#d(e).forEach((t=>t.removeUISourceCode(e)))}async setBreakpoint(t,o,i,r,s,n,u){const c=this.#e.findCompatibleUISourceCodes(t);let l;for(const p of c){const c=new a.UISourceCode.UILocation(p,o,i),h=await this.debuggerWorkspaceBinding.normalizeUILocation(c),g=d.breakpointLocationFromUiLocation(h),b=this.innerSetBreakpoint(h.uiSourceCode,g.lineNumber,g.columnNumber,r,s,n,u);t===p&&(h.id()!==c.id()&&e.Revealer.reveal(h),l=b)}return console.assert(void 0!==l,"The passed uiSourceCode is expected to be a valid uiSourceCode"),l}innerSetBreakpoint(e,t,o,i,r,s,n){const a={url:d.getScriptForInlineUiSourceCode(e)?.sourceURL??e.url(),resourceTypeName:e.contentType().name(),lineNumber:t,columnNumber:o,condition:i,enabled:r,isLogpoint:s},u=h.computeId(a);let c=this.#i.get(u);return c?(c.updateState(a),c.addUISourceCode(e),c.updateBreakpoint(),c):(c=new l(this,e,a,n),this.#i.set(u,c),c)}findBreakpoint(e){const t=this.#o.get(e.uiSourceCode);return t&&t.get(e.id())||null}addHomeUISourceCode(e,t){let o=this.#t.get(e);o||(o=new Set,this.#t.set(e,o)),o.add(t)}removeHomeUISourceCode(e,t){const o=this.#t.get(e);o&&(o.delete(t),0===o.size&&this.#t.delete(e))}async possibleBreakpoints(e,t){const o=await this.debuggerWorkspaceBinding.uiLocationRangeToRawLocationRanges(e,t),i=(await Promise.all(o.map((({start:e,end:t})=>e.debuggerModel.getPossibleBreakpoints(e,t,!1))))).flat(),r=new Map;return await Promise.all(i.map((async o=>{const i=await this.debuggerWorkspaceBinding.rawLocationToUILocation(o);null!==i&&i.uiSourceCode===e&&t.containsLocation(i.lineNumber,i.columnNumber??0)&&r.set(i.id(),i)}))),[...r.values()]}breakpointLocationsForUISourceCode(e){const t=this.#o.get(e);return t?Array.from(t.values()):[]}#d(e){return this.breakpointLocationsForUISourceCode(e).map((e=>e.breakpoint)).concat(Array.from(this.#t.get(e)??[]))}allBreakpointLocations(){const e=[];for(const t of this.#o.values())e.push(...t.values());return e}removeBreakpoint(e,t){const o=e.breakpointStorageId();t&&this.storage.removeBreakpoint(o),this.#i.delete(o)}uiLocationAdded(e,t){let o=this.#o.get(t.uiSourceCode);o||(o=new Map,this.#o.set(t.uiSourceCode,o));const i=new g(e,t);o.set(t.id(),i),this.dispatchEventToListeners(c.BreakpointAdded,i)}uiLocationRemoved(e,t){const o=this.#o.get(t.uiSourceCode);if(!o)return;const i=o.get(t.id())||null;i&&(o.delete(t.id()),0===o.size&&this.#o.delete(t.uiSourceCode),this.dispatchEventToListeners(c.BreakpointRemoved,i))}supportsConditionalBreakpoints(e){return this.debuggerWorkspaceBinding.supportsConditionalBreakpoints(e)}}var c;!function(e){e.BreakpointAdded="breakpoint-added",e.BreakpointRemoved="breakpoint-removed"}(c||(c={}));class l{breakpointManager;#c=new Set;uiSourceCodes=new Set;#l;#p;isRemoved=!1;#h=null;#g=new Map;constructor(e,t,o,i){this.breakpointManager=e,this.#p=i,this.updateState(o),t?(console.assert(t.contentType().name()===o.resourceTypeName),this.addUISourceCode(t)):this.#b(o),this.breakpointManager.targetManager.observeModels(s.DebuggerModel.DebuggerModel,this)}#b(t){t.resolvedState?this.#h=t.resolvedState.map((e=>({...e,scriptHash:""}))):t.resourceTypeName===e.ResourceType.resourceTypes.Script.name()&&(this.#h=[{url:t.url,lineNumber:t.lineNumber,columnNumber:t.columnNumber,scriptHash:"",condition:this.backendCondition()}])}getLastResolvedState(){return this.#h}updateLastResolvedState(e){if(this.#h=e,!r.Runtime.experiments.isEnabled(r.Runtime.ExperimentName.SET_ALL_BREAKPOINTS_EAGERLY))return;let t;e&&(t=e.map((e=>({url:e.url,lineNumber:e.lineNumber,columnNumber:e.columnNumber,condition:e.condition})))),function(e,t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let o=0;o(await e.resetBreakpoint(),this.#m(e)))))}}modelAdded(e){const t=this.breakpointManager.debuggerWorkspaceBinding,o=new p(e,this,t);this.#g.set(e,o),this.#m(o),e.addEventListener(s.DebuggerModel.Events.DebuggerWasEnabled,this.#k,this),e.addEventListener(s.DebuggerModel.Events.DebuggerWasDisabled,this.#S,this),e.addEventListener(s.DebuggerModel.Events.ScriptSourceWasEdited,this.#f,this)}modelRemoved(e){this.#g.get(e)?.cleanUpAfterDebuggerIsGone(),this.#g.delete(e),this.#L(e)}#L(e){e.removeEventListener(s.DebuggerModel.Events.DebuggerWasEnabled,this.#k,this),e.removeEventListener(s.DebuggerModel.Events.DebuggerWasDisabled,this.#S,this),e.removeEventListener(s.DebuggerModel.Events.ScriptSourceWasEdited,this.#f,this)}#k(e){const t=e.data,o=this.#g.get(t);o&&this.#m(o)}#S(e){const t=e.data;this.#g.get(t)?.cleanUpAfterDebuggerIsGone()}async#f(e){const{source:t,data:{script:o,status:i}}=e;if("Ok"!==i)return;console.assert(t instanceof s.DebuggerModel.DebuggerModel);const r=this.#g.get(t);r?.wasSetIn(o.scriptId)&&(await r.resetBreakpoint(),this.#m(r))}modelBreakpoint(e){return this.#g.get(e)}addUISourceCode(e){this.uiSourceCodes.has(e)||(this.uiSourceCodes.add(e),this.breakpointManager.addHomeUISourceCode(e,this),this.bound()||this.breakpointManager.uiLocationAdded(this,this.defaultUILocation(e)))}clearUISourceCodes(){this.bound()||this.removeAllUnboundLocations();for(const e of this.uiSourceCodes)this.removeUISourceCode(e)}removeUISourceCode(e){if(this.uiSourceCodes.has(e)&&(this.uiSourceCodes.delete(e),this.breakpointManager.removeHomeUISourceCode(e,this),this.bound()||this.breakpointManager.uiLocationRemoved(this,this.defaultUILocation(e))),this.bound()){for(const t of this.#c)t.uiSourceCode===e&&(this.#c.delete(t),this.breakpointManager.uiLocationRemoved(this,t));this.bound()||this.isRemoved||this.addAllUnboundLocations()}}url(){return this.#l.url}lineNumber(){return this.#l.lineNumber}columnNumber(){return this.#l.columnNumber}uiLocationAdded(e){this.isRemoved||(this.bound()||this.removeAllUnboundLocations(),this.#c.add(e),this.breakpointManager.uiLocationAdded(this,e))}uiLocationRemoved(e){this.#c.has(e)&&(this.#c.delete(e),this.breakpointManager.uiLocationRemoved(this,e),this.bound()||this.isRemoved||this.addAllUnboundLocations())}enabled(){return this.#l.enabled}bound(){return 0!==this.#c.size}hasBoundScript(){for(const e of this.uiSourceCodes)if(e.project().type()===a.Workspace.projectTypes.Network)return!0;return!1}setEnabled(e){this.updateState({...this.#l,enabled:e})}condition(){return this.#l.condition}backendCondition(){let e=this.condition();if(""===e)return"";let t=s.DebuggerModel.COND_BREAKPOINT_SOURCE_URL;return this.isLogpoint()&&(e=`${b}${e}${m}`,t=s.DebuggerModel.LOGPOINT_SOURCE_URL),`${e}\n\n//# sourceURL=${t}`}setCondition(e,t){this.updateState({...this.#l,condition:e,isLogpoint:t})}isLogpoint(){return this.#l.isLogpoint}get storageState(){return this.#l}updateState(e){this.#l?.enabled===e.enabled&&this.#l?.condition===e.condition&&this.#l?.isLogpoint===e.isLogpoint||(this.#l=e,this.breakpointManager.storage.updateBreakpoint(this.#l),this.updateBreakpoint())}async updateBreakpoint(){return this.bound()||(this.removeAllUnboundLocations(),this.isRemoved||this.addAllUnboundLocations()),this.#v()}async remove(e){if(this.getIsRemoved())return;this.isRemoved=!0;const t=!e;for(const e of this.#g.keys())this.#L(e);await this.#v(),this.breakpointManager.removeBreakpoint(this,t),this.breakpointManager.targetManager.unobserveModels(s.DebuggerModel.DebuggerModel,this),this.clearUISourceCodes()}breakpointStorageId(){return h.computeId(this.#l)}defaultUILocation(e){return d.uiLocationFromBreakpointLocation(e,this.#l.lineNumber,this.#l.columnNumber)}removeAllUnboundLocations(){for(const e of this.uiSourceCodes)this.breakpointManager.uiLocationRemoved(this,this.defaultUILocation(e))}addAllUnboundLocations(){for(const e of this.uiSourceCodes)this.breakpointManager.uiLocationAdded(this,this.defaultUILocation(e))}getUiSourceCodes(){return this.uiSourceCodes}getIsRemoved(){return this.isRemoved}async#v(){await Promise.all(Array.from(this.#g.values()).map((e=>this.#m(e))))}async#m(e){const t=await e.scheduleUpdateInDebugger();"ERROR_BACKEND"===t?await this.remove(!0):"ERROR_BREAKPOINT_CLASH"===t&&await this.remove(!1)}}class p{#I;#B;#R;#C=new n.LiveLocation.LiveLocationPool;#c=new Map;#U=new e.Mutex.Mutex;#N=!1;#M=null;#E=[];#w=new Set;constructor(e,t,o){this.#I=e,this.#B=t,this.#R=o}get currentState(){return this.#M}resetLocations(){for(const e of this.#c.values())this.#B.uiLocationRemoved(e);this.#c.clear(),this.#C.disposeAll(),this.#w.clear()}async scheduleUpdateInDebugger(){if(!this.#I.debuggerEnabled())return"OK";const e=await this.#U.acquire();let t="PENDING";for(;"PENDING"===t;)t=await this.#D();return e(),t}scriptDiverged(){for(const e of this.#B.getUiSourceCodes()){const t=this.#R.scriptFile(e,this.#I);if(t&&t.hasDivergedFromVM())return!0}return!1}async#D(){if(this.#I.target().isDisposed())return this.cleanUpAfterDebuggerIsGone(),"OK";const e=this.#B.lineNumber(),t=this.#B.columnNumber(),o=this.#B.backendCondition();let i=null;if(!this.#B.getIsRemoved()&&this.#B.enabled()&&!this.scriptDiverged()){let s=[];for(const o of this.#B.getUiSourceCodes()){const{lineNumber:i,columnNumber:r}=d.uiLocationFromBreakpointLocation(o,e,t);if(s=(await n.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().uiLocationToRawLocations(o,i,r)).filter((e=>e.debuggerModel===this.#I)),s.length)break}if(s.length&&s.every((e=>e.script()))){i=s.map((e=>{const t=e.script();return{url:t.sourceURL,scriptHash:t.hash,lineNumber:e.lineNumber,columnNumber:e.columnNumber,condition:o}})).slice(0)}else if(!r.Runtime.experiments.isEnabled(r.Runtime.ExperimentName.INSTRUMENTATION_BREAKPOINTS)){const r=this.#B.getLastResolvedState();if(r)i=r.map((e=>({...e,condition:o})));else{i=[{url:this.#B.url(),scriptHash:"",lineNumber:e,columnNumber:t,condition:o}]}}}const s=this.#E.length;if(s&&l.State.equals(i,this.#M))return"OK";if(this.#B.updateLastResolvedState(i),s)return await this.resetBreakpoint(),"PENDING";if(!i)return"OK";const{breakpointIds:a,locations:u,serverError:c}=await this.#y(i),p=c&&this.#I.debuggerEnabled()&&!this.#I.isReadyToPause();if(!a.length&&p)return"PENDING";if(this.#M=i,this.#N)return this.#N=!1,"OK";if(!a.length)return"ERROR_BACKEND";this.#E=a,this.#E.forEach((e=>this.#I.addBreakpointListener(e,this.breakpointResolved,this)));return(await Promise.all(u.map((e=>this.addResolvedLocation(e))))).includes("ERROR")?"ERROR_BREAKPOINT_CLASH":"OK"}async#y(e){const t=await Promise.all(e.map((e=>e.url?this.#I.setBreakpointByURL(e.url,e.lineNumber,e.columnNumber,e.condition):this.#I.setBreakpointInAnonymousScript(e.scriptHash,e.lineNumber,e.columnNumber,e.condition)))),o=[];let i=[],r=!1;for(const e of t)e.breakpointId?(o.push(e.breakpointId),i=i.concat(e.locations)):r=!0;return{breakpointIds:o,locations:i,serverError:r}}async resetBreakpoint(){this.#E.length&&(this.resetLocations(),await Promise.all(this.#E.map((e=>this.#I.removeBreakpoint(e)))),this.didRemoveFromDebugger(),this.#M=null)}didRemoveFromDebugger(){this.#N?this.#N=!1:(this.resetLocations(),this.#E.forEach((e=>this.#I.removeBreakpointListener(e,this.breakpointResolved,this))),this.#E=[])}async breakpointResolved({data:e}){"ERROR"===await this.addResolvedLocation(e)&&await this.#B.remove(!1)}async locationUpdated(e){const t=this.#c.get(e),o=await e.uiLocation();t&&this.#B.uiLocationRemoved(t),o?(this.#c.set(e,o),this.#B.uiLocationAdded(o)):this.#c.delete(e)}async addResolvedLocation(e){this.#w.add(e.scriptId);const t=await this.#R.rawLocationToUILocation(e);if(!t)return"OK";const o=this.#B.breakpointManager.findBreakpoint(t);return o&&o.breakpoint!==this.#B?"ERROR":(await this.#R.createLiveLocation(e,this.locationUpdated.bind(this),this.#C),"OK")}cleanUpAfterDebuggerIsGone(){this.#N=!0,this.resetLocations(),this.#M=null,this.#E.length&&this.didRemoveFromDebugger()}wasSetIn(e){return this.#w.has(e)}}!function(e){let t;!function(e){e.equals=function(e,t){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let o=0;onew URL(`../../emulated_devices/${t}`,import.meta.url).toString()))}class d{title;type;order;vertical;horizontal;deviceScaleFactor;capabilities;userAgent;userAgentMetadata;modes;isDualScreen;verticalSpanned;horizontalSpanned;#e;#t;constructor(){this.title="",this.type=m.Unknown,this.vertical={width:0,height:0,outlineInsets:null,outlineImage:null,hinge:null},this.horizontal={width:0,height:0,outlineInsets:null,outlineImage:null,hinge:null},this.deviceScaleFactor=1,this.capabilities=[b.Touch,b.Mobile],this.userAgent="",this.userAgentMetadata=null,this.modes=[],this.isDualScreen=!1,this.verticalSpanned={width:0,height:0,outlineInsets:null,outlineImage:null,hinge:null},this.horizontalSpanned={width:0,height:0,outlineInsets:null,outlineImage:null,hinge:null},this.#e=f.Default,this.#t=!0}static fromJSONV1(e){try{function t(e,t,i,o){if("object"!=typeof e||null===e||!e.hasOwnProperty(t)){if(void 0!==o)return o;throw new Error("Emulated device is missing required property '"+t+"'")}const a=e[t];if(typeof a!==i||null===a)throw new Error("Emulated device property '"+t+"' has wrong type '"+typeof a+"'");return a}function i(e,i){const o=t(e,i,"number");if(o!==Math.abs(o))throw new Error("Emulated device value '"+i+"' must be integer");return o}function o(e){return new k(i(e,"left"),i(e,"top"),i(e,"right"),i(e,"bottom"))}function n(e){const o={};if(o.r=i(e,"r"),o.r<0||o.r>255)throw new Error("color has wrong r value: "+o.r);if(o.g=i(e,"g"),o.g<0||o.g>255)throw new Error("color has wrong g value: "+o.g);if(o.b=i(e,"b"),o.b<0||o.b>255)throw new Error("color has wrong b value: "+o.b);if(o.a=t(e,"a","number"),o.a<0||o.a>1)throw new Error("color has wrong a value: "+o.a);return o}function l(e){const t={};if(t.width=i(e,"width"),t.width<0||t.width>N)throw new Error("Emulated device has wrong hinge width: "+t.width);if(t.height=i(e,"height"),t.height<0||t.height>N)throw new Error("Emulated device has wrong hinge height: "+t.height);if(t.x=i(e,"x"),t.x<0||t.x>N)throw new Error("Emulated device has wrong x offset: "+t.height);if(t.y=i(e,"y"),t.x<0||t.x>N)throw new Error("Emulated device has wrong y offset: "+t.height);return e.contentColor&&(t.contentColor=n(e.contentColor)),e.outlineColor&&(t.outlineColor=n(e.outlineColor)),t}function r(e){const a={};if(a.width=i(e,"width"),a.width<0||a.width>N||a.widthN||a.height100)throw new Error("Emulated device has wrong deviceScaleFactor: "+h.deviceScaleFactor);if(h.vertical=r(t(e.screen,"vertical","object")),h.horizontal=r(t(e.screen,"horizontal","object")),h.isDualScreen=t(e,"dual-screen","boolean",!1),h.isDualScreen&&(h.verticalSpanned=r(t(e.screen,"vertical-spanned","object",null)),h.horizontalSpanned=r(t(e.screen,"horizontal-spanned","object",null))),h.isDualScreen&&(!h.verticalSpanned||!h.horizontalSpanned))throw new Error("Emulated device '"+h.title+"'has dual screen without spanned orientations");const b=t(e,"modes","object",[{title:"default",orientation:"vertical"},{title:"default",orientation:"horizontal"}]);if(!Array.isArray(b))throw new Error("Emulated device modes must be an array");h.modes=[];for(let e=0;ea.height||i.insets.left+i.insets.right>a.width)throw new Error("Emulated device mode '"+i.title+"'has wrong mode insets");i.image=t(b[e],"image","string",null),h.modes.push(i)}return h.#t=t(e,"show-by-default","boolean",void 0),h.#e=t(e,"show","string",f.Default),h}catch(e){return null}}static deviceComparator(e,t){const i=e.order||0,o=t.order||0;return i>o?1:o>i||e.titlet.title?1:0}modesForOrientation(e){const t=[];for(let i=0;ie.push(t.toJSON()))),this.#a.set(e),this.dispatchEventToListeners("CustomDevicesUpdated")}saveStandardDevices(){const e=[];this.#o.forEach((t=>e.push(t.toJSON()))),this.#i.set(e),this.dispatchEventToListeners("StandardDevicesUpdated")}copyShowValues(e,t){const i=new Map;for(const t of e)i.set(t.title,t);for(const e of t){const t=i.get(e.title);t&&e.copyShowFrom(t)}}}const w=[{order:10,"show-by-default":!0,title:"iPhone SE",screen:{horizontal:{width:667,height:375},"device-pixel-ratio":2,vertical:{width:375,height:667}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1",type:"phone"},{order:12,"show-by-default":!0,title:"iPhone XR",screen:{horizontal:{width:896,height:414},"device-pixel-ratio":2,vertical:{width:414,height:896}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1",type:"phone"},{order:14,"show-by-default":!0,title:"iPhone 12 Pro",screen:{horizontal:{width:844,height:390},"device-pixel-ratio":3,vertical:{width:390,height:844}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1",type:"phone"},{order:16,"show-by-default":!1,title:"Pixel 3 XL",screen:{horizontal:{width:786,height:393},"device-pixel-ratio":2.75,vertical:{width:393,height:786}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 11; Pixel 3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.181 Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"11",architecture:"",model:"Pixel 3",mobile:!0},type:"phone"},{order:18,"show-by-default":!0,title:"Pixel 5",screen:{horizontal:{width:851,height:393},"device-pixel-ratio":2.75,vertical:{width:393,height:851}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.91 Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"11",architecture:"",model:"Pixel 5",mobile:!0},type:"phone"},{order:20,"show-by-default":!0,title:"Samsung Galaxy S8+",screen:{horizontal:{width:740,height:360},"device-pixel-ratio":4,vertical:{width:360,height:740}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 8.0.0; SM-G955U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"8.0.0",architecture:"",model:"SM-G955U",mobile:!0},type:"phone"},{order:24,"show-by-default":!0,title:"Samsung Galaxy S20 Ultra",screen:{horizontal:{width:915,height:412},"device-pixel-ratio":3.5,vertical:{width:412,height:915}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 10; SM-G981B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"10",architecture:"",model:"SM-G981B",mobile:!0},type:"phone"},{order:26,"show-by-default":!0,title:"iPad Air",screen:{horizontal:{width:1180,height:820},"device-pixel-ratio":2,vertical:{width:820,height:1180}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (iPad; CPU OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/87.0.4280.77 Mobile/15E148 Safari/604.1",type:"tablet"},{order:28,"show-by-default":!0,title:"iPad Mini",screen:{horizontal:{width:1024,height:768},"device-pixel-ratio":2,vertical:{width:768,height:1024}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (iPad; CPU OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/87.0.4280.77 Mobile/15E148 Safari/604.1",type:"tablet"},{order:30,"show-by-default":!0,title:"Surface Pro 7",screen:{horizontal:{width:1368,height:912},"device-pixel-ratio":2,vertical:{width:912,height:1368}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.82 Safari/537.36",type:"tablet"},{order:32,"show-by-default":!0,"dual-screen":!0,title:"Surface Duo",screen:{horizontal:{width:720,height:540},"device-pixel-ratio":2.5,vertical:{width:540,height:720},"vertical-spanned":{width:1114,height:720,hinge:{width:34,height:720,x:540,y:0,contentColor:{r:38,g:38,b:38,a:1}}},"horizontal-spanned":{width:720,height:1114,hinge:{width:720,height:34,x:0,y:540,contentColor:{r:38,g:38,b:38,a:1}}}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 11.0; Surface Duo) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"11.0",architecture:"",model:"Surface Duo",mobile:!0},type:"phone",modes:[{title:"default",orientation:"vertical",insets:{left:0,top:0,right:0,bottom:0}},{title:"default",orientation:"horizontal",insets:{left:0,top:0,right:0,bottom:0}},{title:"spanned",orientation:"vertical-spanned",insets:{left:0,top:0,right:0,bottom:0}},{title:"spanned",orientation:"horizontal-spanned",insets:{left:0,top:0,right:0,bottom:0}}]},{order:34,"show-by-default":!0,"dual-screen":!0,title:"Galaxy Fold",screen:{horizontal:{width:653,height:280},"device-pixel-ratio":3,vertical:{width:280,height:653},"vertical-spanned":{width:717,height:512},"horizontal-spanned":{width:512,height:717}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 9.0; SAMSUNG SM-F900U Build/PPR1.180610.011) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"9.0",architecture:"",model:"SM-F900U",mobile:!0},type:"phone",modes:[{title:"default",orientation:"vertical",insets:{left:0,top:0,right:0,bottom:0}},{title:"default",orientation:"horizontal",insets:{left:0,top:0,right:0,bottom:0}},{title:"spanned",orientation:"vertical-spanned",insets:{left:0,top:0,right:0,bottom:0}},{title:"spanned",orientation:"horizontal-spanned",insets:{left:0,top:0,right:0,bottom:0}}]},{order:36,"show-by-default":!0,title:"Samsung Galaxy A51/71",screen:{horizontal:{width:914,height:412},"device-pixel-ratio":2.625,vertical:{width:412,height:914}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 8.0.0; SM-G955U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"8.0.0",architecture:"",model:"SM-G955U",mobile:!0},type:"phone"},{order:52,"show-by-default":!0,title:"Nest Hub Max",screen:{horizontal:{outline:{image:"@url(optimized/google-nest-hub-max-horizontal.avif)",insets:{left:92,top:96,right:91,bottom:248}},width:1280,height:800},"device-pixel-ratio":2,vertical:{width:1280,height:800}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (X11; Linux aarch64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.188 Safari/537.36 CrKey/1.54.250320",type:"tablet",modes:[{title:"default",orientation:"horizontal"}]},{order:50,"show-by-default":!0,title:"Nest Hub",screen:{horizontal:{outline:{image:"@url(optimized/google-nest-hub-horizontal.avif)",insets:{left:82,top:74,right:83,bottom:222}},width:1024,height:600},"device-pixel-ratio":2,vertical:{width:1024,height:600}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.109 Safari/537.36 CrKey/1.54.248666","user-agent-metadata":{platform:"Android",platformVersion:"",architecture:"",model:"",mobile:!1},type:"tablet",modes:[{title:"default",orientation:"horizontal"}]},{"show-by-default":!1,title:"iPhone 4",screen:{horizontal:{width:480,height:320},"device-pixel-ratio":2,vertical:{width:320,height:480}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_2 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53",type:"phone"},{order:130,"show-by-default":!1,title:"iPhone 5/SE",screen:{horizontal:{outline:{image:"@url(optimized/iPhone5-landscape.avif)",insets:{left:115,top:25,right:115,bottom:28}},width:568,height:320},"device-pixel-ratio":2,vertical:{outline:{image:"@url(optimized/iPhone5-portrait.avif)",insets:{left:29,top:105,right:25,bottom:111}},width:320,height:568}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1",type:"phone"},{order:131,"show-by-default":!1,title:"iPhone 6/7/8",screen:{horizontal:{outline:{image:"@url(optimized/iPhone6-landscape.avif)",insets:{left:106,top:28,right:106,bottom:28}},width:667,height:375},"device-pixel-ratio":2,vertical:{outline:{image:"@url(optimized/iPhone6-portrait.avif)",insets:{left:28,top:105,right:28,bottom:105}},width:375,height:667}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1",type:"phone"},{order:132,"show-by-default":!1,title:"iPhone 6/7/8 Plus",screen:{horizontal:{outline:{image:"@url(optimized/iPhone6Plus-landscape.avif)",insets:{left:109,top:29,right:109,bottom:27}},width:736,height:414},"device-pixel-ratio":3,vertical:{outline:{image:"@url(optimized/iPhone6Plus-portrait.avif)",insets:{left:26,top:107,right:30,bottom:111}},width:414,height:736}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1",type:"phone"},{order:133,"show-by-default":!1,title:"iPhone X",screen:{horizontal:{width:812,height:375},"device-pixel-ratio":3,vertical:{width:375,height:812}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1",type:"phone"},{"show-by-default":!1,title:"BlackBerry Z30",screen:{horizontal:{width:640,height:360},"device-pixel-ratio":2,vertical:{width:360,height:640}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.0.9.2372 Mobile Safari/537.10+",type:"phone"},{"show-by-default":!1,title:"Nexus 4",screen:{horizontal:{width:640,height:384},"device-pixel-ratio":2,vertical:{width:384,height:640}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"4.4.2",architecture:"",model:"Nexus 4",mobile:!0},type:"phone"},{title:"Nexus 5",type:"phone","user-agent":"Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"6.0",architecture:"",model:"Nexus 5",mobile:!0},capabilities:["touch","mobile"],"show-by-default":!1,screen:{"device-pixel-ratio":3,vertical:{width:360,height:640},horizontal:{width:640,height:360}},modes:[{title:"default",orientation:"vertical",insets:{left:0,top:25,right:0,bottom:48},image:"@url(optimized/google-nexus-5-vertical-default-1x.avif) 1x, @url(optimized/google-nexus-5-vertical-default-2x.avif) 2x"},{title:"navigation bar",orientation:"vertical",insets:{left:0,top:80,right:0,bottom:48},image:"@url(optimized/google-nexus-5-vertical-navigation-1x.avif) 1x, @url(optimized/google-nexus-5-vertical-navigation-2x.avif) 2x"},{title:"keyboard",orientation:"vertical",insets:{left:0,top:80,right:0,bottom:312},image:"@url(optimized/google-nexus-5-vertical-keyboard-1x.avif) 1x, @url(optimized/google-nexus-5-vertical-keyboard-2x.avif) 2x"},{title:"default",orientation:"horizontal",insets:{left:0,top:25,right:42,bottom:0},image:"@url(optimized/google-nexus-5-horizontal-default-1x.avif) 1x, @url(optimized/google-nexus-5-horizontal-default-2x.avif) 2x"},{title:"navigation bar",orientation:"horizontal",insets:{left:0,top:80,right:42,bottom:0},image:"@url(optimized/google-nexus-5-horizontal-navigation-1x.avif) 1x, @url(optimized/google-nexus-5-horizontal-navigation-2x.avif) 2x"},{title:"keyboard",orientation:"horizontal",insets:{left:0,top:80,right:42,bottom:202},image:"@url(optimized/google-nexus-5-horizontal-keyboard-1x.avif) 1x, @url(optimized/google-nexus-5-horizontal-keyboard-2x.avif) 2x"}]},{title:"Nexus 5X",type:"phone","user-agent":"Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"8.0.0",architecture:"",model:"Nexus 5X",mobile:!0},capabilities:["touch","mobile"],"show-by-default":!1,screen:{"device-pixel-ratio":2.625,vertical:{outline:{image:"@url(optimized/Nexus5X-portrait.avif)",insets:{left:18,top:88,right:22,bottom:98}},width:412,height:732},horizontal:{outline:{image:"@url(optimized/Nexus5X-landscape.avif)",insets:{left:88,top:21,right:98,bottom:19}},width:732,height:412}},modes:[{title:"default",orientation:"vertical",insets:{left:0,top:24,right:0,bottom:48},image:"@url(optimized/google-nexus-5x-vertical-default-1x.avif) 1x, @url(optimized/google-nexus-5x-vertical-default-2x.avif) 2x"},{title:"navigation bar",orientation:"vertical",insets:{left:0,top:80,right:0,bottom:48},image:"@url(optimized/google-nexus-5x-vertical-navigation-1x.avif) 1x, @url(optimized/google-nexus-5x-vertical-navigation-2x.avif) 2x"},{title:"keyboard",orientation:"vertical",insets:{left:0,top:80,right:0,bottom:342},image:"@url(optimized/google-nexus-5x-vertical-keyboard-1x.avif) 1x, @url(optimized/google-nexus-5x-vertical-keyboard-2x.avif) 2x"},{title:"default",orientation:"horizontal",insets:{left:0,top:24,right:48,bottom:0},image:"@url(optimized/google-nexus-5x-horizontal-default-1x.avif) 1x, @url(optimized/google-nexus-5x-horizontal-default-2x.avif) 2x"},{title:"navigation bar",orientation:"horizontal",insets:{left:0,top:80,right:48,bottom:0},image:"@url(optimized/google-nexus-5x-horizontal-navigation-1x.avif) 1x, @url(optimized/google-nexus-5x-horizontal-navigation-2x.avif) 2x"},{title:"keyboard",orientation:"horizontal",insets:{left:0,top:80,right:48,bottom:222},image:"@url(optimized/google-nexus-5x-horizontal-keyboard-1x.avif) 1x, @url(optimized/google-nexus-5x-horizontal-keyboard-2x.avif) 2x"}]},{"show-by-default":!1,title:"Nexus 6",screen:{horizontal:{width:732,height:412},"device-pixel-ratio":3.5,vertical:{width:412,height:732}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"7.1.1",architecture:"",model:"Nexus 6",mobile:!0},type:"phone"},{"show-by-default":!1,title:"Nexus 6P",screen:{horizontal:{outline:{image:"@url(optimized/Nexus6P-landscape.avif)",insets:{left:94,top:17,right:88,bottom:17}},width:732,height:412},"device-pixel-ratio":3.5,vertical:{outline:{image:"@url(optimized/Nexus6P-portrait.avif)",insets:{left:16,top:94,right:16,bottom:88}},width:412,height:732}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"8.0.0",architecture:"",model:"Nexus 6P",mobile:!0},type:"phone"},{order:120,"show-by-default":!1,title:"Pixel 2",screen:{horizontal:{width:731,height:411},"device-pixel-ratio":2.625,vertical:{width:411,height:731}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"8.0",architecture:"",model:"Pixel 2",mobile:!0},type:"phone"},{order:121,"show-by-default":!1,title:"Pixel 2 XL",screen:{horizontal:{width:823,height:411},"device-pixel-ratio":3.5,vertical:{width:411,height:823}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"8.0.0",architecture:"",model:"Pixel 2 XL",mobile:!0},type:"phone"},{"show-by-default":!1,title:"Pixel 3",screen:{horizontal:{width:786,height:393},"device-pixel-ratio":2.75,vertical:{width:393,height:786}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 9; Pixel 3 Build/PQ1A.181105.017.A1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.158 Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"9",architecture:"",model:"Pixel 3",mobile:!0},type:"phone"},{"show-by-default":!1,title:"Pixel 4",screen:{horizontal:{width:745,height:353},"device-pixel-ratio":3,vertical:{width:353,height:745}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"10",architecture:"",model:"Pixel 4",mobile:!0},type:"phone"},{"show-by-default":!1,title:"LG Optimus L70",screen:{horizontal:{width:640,height:384},"device-pixel-ratio":1.25,vertical:{width:384,height:640}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/%s Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"4.4.2",architecture:"",model:"LGMS323",mobile:!0},type:"phone"},{"show-by-default":!1,title:"Nokia N9",screen:{horizontal:{width:854,height:480},"device-pixel-ratio":1,vertical:{width:480,height:854}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13",type:"phone"},{"show-by-default":!1,title:"Nokia Lumia 520",screen:{horizontal:{width:533,height:320},"device-pixel-ratio":1.5,vertical:{width:320,height:533}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 520)",type:"phone"},{"show-by-default":!1,title:"Microsoft Lumia 550",screen:{horizontal:{width:640,height:360},"device-pixel-ratio":2,vertical:{width:640,height:360}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 550) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/14.14263","user-agent-metadata":{platform:"Android",platformVersion:"4.2.1",architecture:"",model:"Lumia 550",mobile:!0},type:"phone"},{"show-by-default":!1,title:"Microsoft Lumia 950",screen:{horizontal:{width:640,height:360},"device-pixel-ratio":4,vertical:{width:360,height:640}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/14.14263","user-agent-metadata":{platform:"Android",platformVersion:"4.2.1",architecture:"",model:"Lumia 950",mobile:!0},type:"phone"},{"show-by-default":!1,title:"Galaxy S III",screen:{horizontal:{width:640,height:360},"device-pixel-ratio":2,vertical:{width:360,height:640}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; U; Android 4.0; en-us; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30","user-agent-metadata":{platform:"Android",platformVersion:"4.0",architecture:"",model:"GT-I9300",mobile:!0},type:"phone"},{order:110,"show-by-default":!1,title:"Galaxy S5",screen:{horizontal:{width:640,height:360},"device-pixel-ratio":3,vertical:{width:360,height:640}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"5.0",architecture:"",model:"SM-G900P",mobile:!0},type:"phone"},{"show-by-default":!1,title:"Galaxy S8",screen:{horizontal:{width:740,height:360},"device-pixel-ratio":3,vertical:{width:360,height:740}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 7.0; SM-G950U Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"7.0",architecture:"",model:"SM-G950U",mobile:!0},type:"phone"},{"show-by-default":!1,title:"Galaxy S9+",screen:{horizontal:{width:658,height:320},"device-pixel-ratio":4.5,vertical:{width:320,height:658}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 8.0.0; SM-G965U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.111 Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"8.0.0",architecture:"",model:"SM-G965U",mobile:!0},type:"phone"},{"show-by-default":!1,title:"Galaxy Tab S4",screen:{horizontal:{width:1138,height:712},"device-pixel-ratio":2.25,vertical:{width:712,height:1138}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 8.1.0; SM-T837A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.80 Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"8.1.0",architecture:"",model:"SM-T837A",mobile:!1},type:"phone"},{order:1,"show-by-default":!1,title:"JioPhone 2",screen:{horizontal:{width:320,height:240},"device-pixel-ratio":1,vertical:{width:240,height:320}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Mobile; LYF/F300B/LYF-F300B-001-01-15-130718-i;Android; rv:48.0) Gecko/48.0 Firefox/48.0 KAIOS/2.5","user-agent-metadata":{platform:"Android",platformVersion:"",architecture:"",model:"LYF/F300B/LYF-F300B-001-01-15-130718-i",mobile:!0},type:"phone"},{"show-by-default":!1,title:"Kindle Fire HDX",screen:{horizontal:{width:1280,height:800},"device-pixel-ratio":2,vertical:{width:800,height:1280}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; U; en-us; KFAPWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true",type:"tablet"},{order:140,"show-by-default":!1,title:"iPad",screen:{horizontal:{outline:{image:"@url(optimized/iPad-landscape.avif)",insets:{left:112,top:56,right:116,bottom:52}},width:1024,height:768},"device-pixel-ratio":2,vertical:{outline:{image:"@url(optimized/iPad-portrait.avif)",insets:{left:52,top:114,right:55,bottom:114}},width:768,height:1024}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1",type:"tablet"},{order:141,"show-by-default":!1,title:"iPad Pro",screen:{horizontal:{width:1366,height:1024},"device-pixel-ratio":2,vertical:{width:1024,height:1366}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1",type:"tablet"},{"show-by-default":!1,title:"Blackberry PlayBook",screen:{horizontal:{width:1024,height:600},"device-pixel-ratio":1,vertical:{width:600,height:1024}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML like Gecko) Version/7.2.1.0 Safari/536.2+",type:"tablet"},{"show-by-default":!1,title:"Nexus 10",screen:{horizontal:{width:1280,height:800},"device-pixel-ratio":2,vertical:{width:800,height:1280}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"6.0.1",architecture:"",model:"Nexus 10",mobile:!1},type:"tablet"},{"show-by-default":!1,title:"Nexus 7",screen:{horizontal:{width:960,height:600},"device-pixel-ratio":2,vertical:{width:600,height:960}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"6.0.1",architecture:"",model:"Nexus 7",mobile:!1},type:"tablet"},{"show-by-default":!1,title:"Galaxy Note 3",screen:{horizontal:{width:640,height:360},"device-pixel-ratio":3,vertical:{width:360,height:640}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; U; Android 4.3; en-us; SM-N900T Build/JSS15J) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30","user-agent-metadata":{platform:"Android",platformVersion:"4.3",architecture:"",model:"SM-N900T",mobile:!0},type:"phone"},{"show-by-default":!1,title:"Galaxy Note II",screen:{horizontal:{width:640,height:360},"device-pixel-ratio":2,vertical:{width:360,height:640}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; U; Android 4.1; en-us; GT-N7100 Build/JRO03C) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30","user-agent-metadata":{platform:"Android",platformVersion:"4.1",architecture:"",model:"GT-N7100",mobile:!0},type:"phone"},{"show-by-default":!1,title:h(l.laptopWithTouch),screen:{horizontal:{width:1280,height:950},"device-pixel-ratio":1,vertical:{width:950,height:1280}},capabilities:["touch"],"user-agent":"",type:"notebook",modes:[{title:"default",orientation:"horizontal"}]},{"show-by-default":!1,title:h(l.laptopWithHiDPIScreen),screen:{horizontal:{width:1440,height:900},"device-pixel-ratio":2,vertical:{width:900,height:1440}},capabilities:[],"user-agent":"",type:"notebook",modes:[{title:"default",orientation:"horizontal"}]},{"show-by-default":!1,title:h(l.laptopWithMDPIScreen),screen:{horizontal:{width:1280,height:800},"device-pixel-ratio":1,vertical:{width:800,height:1280}},capabilities:[],"user-agent":"",type:"notebook",modes:[{title:"default",orientation:"horizontal"}]},{"show-by-default":!1,title:"Moto G4",screen:{horizontal:{outline:{image:"@url(optimized/MotoG4-landscape.avif)",insets:{left:91,top:30,right:74,bottom:30}},width:640,height:360},"device-pixel-ratio":3,vertical:{outline:{image:"@url(optimized/MotoG4-portrait.avif)",insets:{left:30,top:91,right:30,bottom:74}},width:360,height:640}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 6.0.1; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"6.0.1",architecture:"",model:"Moto G (4)",mobile:!0},type:"phone"},{"show-by-default":!1,title:"Moto G Power",screen:{"device-pixel-ratio":1.75,horizontal:{width:823,height:412},vertical:{width:412,height:823}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 11; moto g power (2022)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"11",architecture:"",model:"moto g power (2022)",mobile:!0},type:"phone"},{order:200,"show-by-default":!0,title:"Facebook for Android v407 on Pixel 6",screen:{horizontal:{width:892,height:412},"device-pixel-ratio":3.5,vertical:{width:412,height:892}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 12; Pixel 6 Build/SQ3A.220705.004; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/%s Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/407.0.0.0.65;]","user-agent-metadata":{platform:"Android",platformVersion:"12",architecture:"",model:"Pixel 6",mobile:!0},type:"phone"}];var M=Object.freeze({__proto__:null,computeRelativeImageURL:s,EmulatedDevice:d,Horizontal:c,Vertical:u,HorizontalSpanned:g,VerticalSpanned:p,Type:m,Capability:b,_Show:f,EmulatedDevicesList:S});const x={widthMustBeANumber:"Width must be a number.",widthMustBeLessThanOrEqualToS:"Width must be less than or equal to {PH1}.",widthMustBeGreaterThanOrEqualToS:"Width must be greater than or equal to {PH1}.",heightMustBeANumber:"Height must be a number.",heightMustBeLessThanOrEqualToS:"Height must be less than or equal to {PH1}.",heightMustBeGreaterThanOrEqualTo:"Height must be greater than or equal to {PH1}.",devicePixelRatioMustBeANumberOr:"Device pixel ratio must be a number or blank.",devicePixelRatioMustBeLessThanOr:"Device pixel ratio must be less than or equal to {PH1}.",devicePixelRatioMustBeGreater:"Device pixel ratio must be greater than or equal to {PH1}."},y=i.i18n.registerUIStrings("models/emulation/DeviceModeModel.ts",x),z=i.i18n.getLocalizedString.bind(void 0,y);let I;class A extends e.ObjectWrapper.ObjectWrapper{#l;#r;#h;#s;#d;#c;#u;#g;#p;#m;#b;#f;#v;#S;#w;#M;#x;#y;#z;#I;#A;#k;#P;#T;#L;#E;#N;constructor(){super(),this.#l=new P(0,0,1,1),this.#r=new P(0,0,1,1),this.#h=new n.Geometry.Size(1,1),this.#s=new n.Geometry.Size(1,1),this.#d=!1,this.#c=new n.Geometry.Size(1,1),this.#u=window.devicePixelRatio,this.#g=L.Desktop,this.#p=o.Runtime.experiments.isEnabled("dualScreenSupport"),this.#m=!!window.visualViewport&&"segments"in window.visualViewport,this.#b=e.Settings.Settings.instance().createSetting("emulation.deviceScale",1),this.#b.get()||this.#b.set(1),this.#b.addChangeListener(this.scaleSettingChanged,this),this.#f=1,this.#v=e.Settings.Settings.instance().createSetting("emulation.deviceWidth",400),this.#v.get()N&&this.#v.set(N),this.#v.addChangeListener(this.widthSettingChanged,this),this.#S=e.Settings.Settings.instance().createSetting("emulation.deviceHeight",0),this.#S.get()&&this.#S.get()N&&this.#S.set(N),this.#S.addChangeListener(this.heightSettingChanged,this),this.#w=e.Settings.Settings.instance().createSetting("emulation.deviceUA",L.Mobile),this.#w.addChangeListener(this.uaSettingChanged,this),this.#M=e.Settings.Settings.instance().createSetting("emulation.deviceScaleFactor",0),this.#M.addChangeListener(this.deviceScaleFactorSettingChanged,this),this.#x=e.Settings.Settings.instance().moduleSetting("emulation.showDeviceOutline"),this.#x.addChangeListener(this.deviceOutlineSettingChanged,this),this.#y=e.Settings.Settings.instance().createSetting("emulation.toolbarControlsEnabled",!0,e.Settings.SettingStorageType.Session),this.#z=T.None,this.#I=null,this.#A=null,this.#k=1,this.#P=!1,this.#T=!1,this.#L=null,this.#E=null,a.TargetManager.TargetManager.instance().observeModels(a.EmulationModel.EmulationModel,this)}static instance(e){return I&&!e?.forceNew||(I=new A),I}static widthValidator(e){let t,i=!1;return/^[\d]+$/.test(e)?Number(e)>N?t=z(x.widthMustBeLessThanOrEqualToS,{PH1:N}):Number(e)N?t=z(x.heightMustBeLessThanOrEqualToS,{PH1:N}):Number(e)D?t=z(x.devicePixelRatioMustBeLessThanOr,{PH1:D}):Number(e)this.preferredScaledWidth())&&(i=this.preferredScaledWidth());let o=this.#S.get();(!o||o>this.preferredScaledHeight())&&(o=this.preferredScaledHeight());const a=t?G:0;this.#k=this.calculateFitScale(this.#v.get(),this.#S.get()),this.#g=this.#w.get(),this.applyDeviceMetrics(new n.Geometry.Size(i,o),new k(0,0,0,0),new k(0,0,0,0),this.#b.get(),this.#M.get()||a,t,o>=i?"portraitPrimary":"landscapePrimary",e),this.applyUserAgent(t?K:"",t?O:null),this.applyTouch(this.#w.get()===L.DesktopTouch||this.#w.get()===L.Mobile,this.#w.get()===L.Mobile)}i&&i.setShowViewportSizeOnResize(this.#z===T.None),this.dispatchEventToListeners("Updated")}calculateFitScale(e,t,i,o){const a=i?i.left+i.right:0,n=i?i.top+i.bottom:0,l=o?o.left+o.right:0,r=o?o.top+o.bottom:0;let h=Math.min(e?this.#s.width/(e+a):1,t?this.#s.height/(t+n):1);h=Math.min(Math.floor(100*h),100);let s=h;for(;s>.7*h;){let i=!0;if(e&&(i=i&&Number.isInteger((e-l)*s/100)),t&&(i=i&&Number.isInteger((t-r)*s/100)),i)return s/100;s-=1}return h/100}setSizeAndScaleToFit(e,t){this.#b.set(this.calculateFitScale(e,t)),this.setWidth(e),this.setHeight(t)}applyUserAgent(e,t){a.NetworkManager.MultitargetNetworkManager.instance().setUserAgentOverride(e,t)}applyDeviceMetrics(e,t,i,o,a,n,l,r,h=!1){e.width=Math.max(1,Math.floor(e.width)),e.height=Math.max(1,Math.floor(e.height));let s=e.width-t.left-t.right,d=e.height-t.top-t.bottom;const c=t.left,u=t.top,g="landscapePrimary"===l?90:0;if(this.#c=e,this.#u=a||window.devicePixelRatio,this.#l=new P(Math.max(0,(this.#h.width-e.width*o)/2),i.top*o,e.width*o,e.height*o),this.#N=new P(this.#l.left-i.left*o,0,(i.left+e.width+i.right)*o,(i.top+e.height+i.bottom)*o),this.#r=new P(c*o,u*o,Math.min(s*o,this.#h.width-this.#l.left-c*o),Math.min(d*o,this.#h.height-this.#l.top-u*o)),this.#f=o,h||(1===o&&this.#h.width>=e.width&&this.#h.height>=e.height&&(s=0,d=0),this.#r.width===s*o&&this.#r.height===d*o&&Number.isInteger(s*o)&&Number.isInteger(d*o)&&(s=0,d=0)),this.#L)if(r&&this.#L.resetPageScaleFactor(),s||d||n||a||1!==o||l||h){const t={width:s,height:d,deviceScaleFactor:a,mobile:n,scale:o,screenWidth:e.width,screenHeight:e.height,positionX:c,positionY:u,dontSetVisibleSize:!0,displayFeature:void 0,screenOrientation:void 0},i=this.getDisplayFeature();i&&(t.displayFeature=i),l&&(t.screenOrientation={type:l,angle:g}),this.#L.emulateDevice(t)}else this.#L.emulateDevice(null)}exitHingeMode(){const e=this.#L?this.#L.overlayModel():null;e&&e.showHingeForDualScreen(null)}webPlatformExperimentalFeaturesEnabled(){return this.#m}shouldReportDisplayFeature(){return this.#m&&this.#p}async captureScreenshot(e,t){const i=this.#L?this.#L.target().model(a.ScreenCaptureModel.ScreenCaptureModel):null;if(!i)return null;let o;o=t?"fromClip":e?"fullpage":"fromViewport";const n=this.#L?this.#L.overlayModel():null;n&&n.setShowViewportSizeOnResize(!1);const l=await i.captureScreenshot("png",100,o,t),r={width:0,height:0,deviceScaleFactor:0,mobile:!1};if(e&&this.#L){if(this.#I&&this.#A){const e=this.#I.orientationByName(this.#A.orientation);r.width=e.width,r.height=e.height;const t=this.getDisplayFeature();t&&(r.displayFeature=t)}else r.width=0,r.height=0;await this.#L.emulateDevice(r)}return this.calculateAndEmulate(!1),l}applyTouch(e,t){this.#P=e,this.#T=t;for(const i of a.TargetManager.TargetManager.instance().models(a.EmulationModel.EmulationModel))i.emulateTouch(e,t)}showHingeIfApplicable(e){const t=this.#I&&this.#A?this.#I.orientationByName(this.#A.orientation):null;this.#p&&t&&t.hinge?e.showHingeForDualScreen(t.hinge):e.showHingeForDualScreen(null)}getDisplayFeatureOrientation(){if(!this.#A)throw new Error("Mode required to get display feature orientation.");switch(this.#A.orientation){case p:case u:return"vertical";default:return"horizontal"}}getDisplayFeature(){if(!this.shouldReportDisplayFeature())return null;if(!this.#I||!this.#A||this.#A.orientation!==p&&this.#A.orientation!==g)return null;const e=this.#I.orientationByName(this.#A.orientation);if(!e||!e.hinge)return null;const t=e.hinge;return{orientation:this.getDisplayFeatureOrientation(),offset:this.#A.orientation===p?t.x:t.y,maskLength:this.#A.orientation===p?t.width:t.height}}}class k{left;top;right;bottom;constructor(e,t,i,o){this.left=e,this.top=t,this.right=i,this.bottom=o}isEqual(e){return null!==e&&this.left===e.left&&this.top===e.top&&this.right===e.right&&this.bottom===e.bottom}}class P{left;top;width;height;constructor(e,t,i,o){this.left=e,this.top=t,this.width=i,this.height=o}isEqual(e){return null!==e&&this.left===e.left&&this.top===e.top&&this.width===e.width&&this.height===e.height}scale(e){return new P(this.left*e,this.top*e,this.width*e,this.height*e)}relativeTo(e){return new P(this.left-e.left,this.top-e.top,this.width,this.height)}rebaseTo(e){return new P(this.left+e.left,this.top+e.top,this.width,this.height)}}var T,L;!function(e){e.None="None",e.Responsive="Responsive",e.Device="Device"}(T||(T={})),function(e){e.Mobile="Mobile",e.MobileNoTouch="Mobile (no touch)",e.Desktop="Desktop",e.DesktopTouch="Desktop (touch)"}(L||(L={}));const E=50,N=9999,C=0,D=10,K=a.NetworkManager.MultitargetNetworkManager.patchUserAgentWithChromeVersion("Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36"),O={platform:"Android",platformVersion:"6.0",architecture:"",model:"Nexus 5",mobile:!0},G=2;var F=Object.freeze({__proto__:null,DeviceModeModel:A,Insets:k,Rect:P,get Type(){return T},get UA(){return L},MinDeviceSize:E,MaxDeviceSize:N,MinDeviceScaleFactor:C,MaxDeviceScaleFactor:D,MaxDeviceNameLength:50,defaultMobileScaleFactor:G});export{F as DeviceModeModel,M as EmulatedDevices}; diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/extensions/extensions-legacy.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/extensions/extensions-legacy.js deleted file mode 100644 index bffacccca..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/extensions/extensions-legacy.js +++ /dev/null @@ -1 +0,0 @@ -import*as n from"./extensions.js";self.Extensions=self.Extensions||{},Extensions=Extensions||{},Extensions.ExtensionSidebarPane=n.ExtensionPanel.ExtensionSidebarPane,Extensions.ExtensionServer=n.ExtensionServer.ExtensionServer,Extensions.ExtensionServer.Events=n.ExtensionServer.Events,Extensions.ExtensionStatus=n.ExtensionServer.ExtensionStatus; diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/extensions/extensions.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/extensions/extensions.js deleted file mode 100644 index 1ce4d9987..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/extensions/extensions.js +++ /dev/null @@ -1 +0,0 @@ -import*as e from"../../core/platform/platform.js";import*as t from"../../core/sdk/sdk.js";import*as n from"../../ui/legacy/legacy.js";import*as s from"../../core/common/common.js";import*as i from"../../core/host/host.js";import*as r from"../../core/i18n/i18n.js";import*as o from"../../core/root/root.js";import*as a from"../logs/logs.js";import*as c from"../../ui/legacy/components/utils/utils.js";import*as d from"../../ui/legacy/theme_support/theme_support.js";import*as u from"../bindings/bindings.js";import*as l from"../har/har.js";import*as h from"../workspace/workspace.js";self.injectedExtensionAPI=function(t,n,s,i,r,o,a){const c=new Set(i),d=window.chrome||{};if(Object.getOwnPropertyDescriptor(d,"devtools"))return;let u=!1,l=!1;function h(e,t){this._type=e,this._listeners=[],this._customDispatch=t}function p(){this.onRequestFinished=new S("network-request-finished",(function(e){const t=e.arguments[1];t.__proto__=new L(e.arguments[0]),this._fire(t)})),y(this,"network","onFinished","onRequestFinished"),this.onNavigated=new S("inspected-url-changed")}function m(e){this._id=e}function g(){const e={elements:new q,sources:new k};function t(t){return e[t]}for(const n in e)Object.defineProperty(this,n,{get:t.bind(null,n),enumerable:!0});this.applyStyleSheet=function(e){Y.sendRequest({command:"applyStyleSheet",styleSheet:e})}}function f(e){this._id=e,e&&(this.onShown=new S("view-shown-"+e,(function(e){const t=e.arguments[0];"number"==typeof t?this._fire(window.parent.frames[t]):this._fire()})),this.onHidden=new S("view-hidden,"+e))}function b(e){f.call(this,null),this._hostPanelName=e,this.onSelectionChanged=new S("panel-objectSelected-"+e)}function w(){this._plugins=new Map}function R(){this._plugins=new Map}function E(e){return function(...t){const n={__proto__:e.prototype};e.apply(n,t),function(e,t){for(const n in t){if("_"===n.charAt(0))continue;let s=null;for(let e=t;e&&!s;e=e.__proto__)s=Object.getOwnPropertyDescriptor(e,n);s&&("function"==typeof s.value?e[n]=s.value.bind(t):"function"==typeof s.get?e.__defineGetter__(n,s.get.bind(t)):Object.defineProperty(e,n,s))}}(this,n)}}function y(e,t,n,s){let i=!1;e.__defineGetter__(n,(function(){return i||(console.warn(t+"."+n+" is deprecated. Use "+t+"."+s+" instead"),i=!0),e[s]}))}function x(e){const t=e[e.length-1];return"function"==typeof t?t:void 0}h.prototype={addListener:function(e){if("function"!=typeof e)throw"addListener: callback is not a function";0===this._listeners.length&&Y.sendRequest({command:"subscribe",type:this._type}),this._listeners.push(e),Y.registerHandler("notify-"+this._type,this._dispatch.bind(this))},removeListener:function(e){const t=this._listeners;for(let n=0;ns.call(this,new P(i))))},setOpenResourceHandler:function(e){const t=Y.hasHandler("open-resource");e?Y.registerHandler("open-resource",(function(t){u=!0;try{const{resource:n,lineNumber:s}=t;F(n)&&e.call(null,new C(n),s)}finally{u=!1}})):Y.unregisterHandler("open-resource"),t===!e&&Y.sendRequest({command:"setOpenResourceHandler",handlerPresent:Boolean(e)})},setThemeChangeHandler:function(e){const t=Y.hasHandler("host-theme-change");e?Y.registerHandler("host-theme-change",(function(t){const{themeName:n}=t;d.devtools.panels.themeName=n,e.call(null,n)})):Y.unregisterHandler("host-theme-change"),t===!e&&Y.sendRequest({command:"setThemeChangeHandler",handlerPresent:Boolean(e)})},openResource:function(e,t,n,s){const i=x(arguments),r="number"==typeof n?n:0;Y.sendRequest({command:"openResource",url:e,lineNumber:t,columnNumber:r},i)},get SearchAction(){return{CancelSearch:"cancelSearch",PerformSearch:"performSearch",NextSearchResult:"nextSearchResult",PreviousSearchResult:"previousSearchResult"}}},b.prototype={createSidebarPane:function(e,t){const n="extension-sidebar-"+Y.nextObjectId();Y.sendRequest({command:"createSidebarPane",panel:this._hostPanelName,id:n,title:e},t&&function(){t&&t(new O(n))})},__proto__:f.prototype},w.prototype={registerRecorderExtensionPlugin:async function(e,t,n){if(this._plugins.has(e))throw new Error(`Tried to register plugin '${t}' twice`);const s=new MessageChannel,i=s.port1;this._plugins.set(e,i),i.onmessage=({data:t})=>{const{requestId:n}=t;(async function(t){switch(t.method){case"stringify":return e.stringify(t.parameters.recording);case"stringifyStep":return e.stringifyStep(t.parameters.step);case"replay":try{return u=!0,l=!0,e.replay(t.parameters.recording)}finally{u=!1,l=!1}default:throw new Error(`'${t.method}' is not recognized`)}})(t).then((e=>i.postMessage({requestId:n,result:e}))).catch((e=>i.postMessage({requestId:n,error:{message:e.message}})))};const r=[];"stringify"in e&&"stringifyStep"in e&&r.push("export"),"replay"in e&&r.push("replay"),await new Promise((e=>{Y.sendRequest({command:"registerRecorderExtensionPlugin",pluginName:t,mediaType:n,capabilities:r,port:s.port2},(()=>e()),[s.port2])}))},unregisterRecorderExtensionPlugin:async function(e){const t=this._plugins.get(e);if(!t)throw new Error("Tried to unregister a plugin that was not previously registered");this._plugins.delete(e),t.postMessage({event:"unregisteredRecorderExtensionPlugin"}),t.close()},createView:async function(e,t){const n="recorder-extension-view-"+Y.nextObjectId();return await new Promise((s=>{Y.sendRequest({command:"createRecorderView",id:n,title:e,pagePath:t},s)})),new A(n)}},R.prototype={registerLanguageExtensionPlugin:async function(e,t,n){if(this._plugins.has(e))throw new Error(`Tried to register plugin '${t}' twice`);const s=new MessageChannel,i=s.port1;this._plugins.set(e,i),i.onmessage=({data:t})=>{const{requestId:n}=t;console.time(`${n}: ${t.method}`),function(t){switch(t.method){case"addRawModule":return e.addRawModule(t.parameters.rawModuleId,t.parameters.symbolsURL,t.parameters.rawModule);case"removeRawModule":return e.removeRawModule(t.parameters.rawModuleId);case"sourceLocationToRawLocation":return e.sourceLocationToRawLocation(t.parameters.sourceLocation);case"rawLocationToSourceLocation":return e.rawLocationToSourceLocation(t.parameters.rawLocation);case"getScopeInfo":return e.getScopeInfo(t.parameters.type);case"listVariablesInScope":return e.listVariablesInScope(t.parameters.rawLocation);case"getFunctionInfo":return e.getFunctionInfo(t.parameters.rawLocation);case"getInlinedFunctionRanges":return e.getInlinedFunctionRanges(t.parameters.rawLocation);case"getInlinedCalleesRanges":return e.getInlinedCalleesRanges(t.parameters.rawLocation);case"getMappedLines":return"getMappedLines"in e?e.getMappedLines(t.parameters.rawModuleId,t.parameters.sourceFileURL):Promise.resolve(void 0);case"formatValue":return"evaluate"in e&&e.evaluate?e.evaluate(t.parameters.expression,t.parameters.context,t.parameters.stopId):Promise.resolve(void 0);case"getProperties":if("getProperties"in e&&e.getProperties)return e.getProperties(t.parameters.objectId);if(!("evaluate"in e)||!e.evaluate)return Promise.resolve(void 0);break;case"releaseObject":if("releaseObject"in e&&e.releaseObject)return e.releaseObject(t.parameters.objectId)}throw new Error(`Unknown language plugin method ${t.method}`)}(t).then((e=>i.postMessage({requestId:n,result:e}))).catch((e=>i.postMessage({requestId:n,error:{message:e.message}}))).finally((()=>console.timeEnd(`${n}: ${t.method}`)))},await new Promise((e=>{Y.sendRequest({command:"registerLanguageExtensionPlugin",pluginName:t,port:s.port2,supportedScriptTypes:n},(()=>e()),[s.port2])}))},unregisterLanguageExtensionPlugin:async function(e){const t=this._plugins.get(e);if(!t)throw new Error("Tried to unregister a plugin that was not previously registered");this._plugins.delete(e),t.postMessage({event:"unregisteredLanguageExtensionPlugin"}),t.close()},getWasmLinearMemory:async function(e,t,n){const s=await new Promise((s=>Y.sendRequest({command:"getWasmLinearMemory",offset:e,length:t,stopId:n},s)));return Array.isArray(s)?new Uint8Array(s).buffer:new ArrayBuffer(0)},getWasmLocal:async function(e,t){return new Promise((n=>Y.sendRequest({command:"getWasmLocal",local:e,stopId:t},n)))},getWasmGlobal:async function(e,t){return new Promise((n=>Y.sendRequest({command:"getWasmGlobal",global:e,stopId:t},n)))},getWasmOp:async function(e,t){return new Promise((n=>Y.sendRequest({command:"getWasmOp",op:e,stopId:t},n)))}};const v=E(R),_=E(w),I=E(N),S=E(h),P=E(M),A=E(j),O=E(D),T=E(b),L=E(m),C=E(G),H=E(B);class q extends T{constructor(){super("elements")}}class k extends T{constructor(){super("sources")}}function M(e){f.call(this,e),this.onSearch=new S("panel-search-"+e)}function j(e){f.call(this,e)}function D(e){f.call(this,e)}function N(e){this._id=e,this.onClicked=new S("button-clicked-"+e)}function W(){}function B(e){this._id=e}function U(e){this.onRecordingStarted=new S("trace-recording-started-"+e,(function(e){const t=e.arguments[0];this._fire(new H(t))})),this.onRecordingStopped=new S("trace-recording-stopped-"+e)}function F(e){try{return t.allowFileAccess||"file:"!==new URL(e.url).protocol}catch(e){return!1}}function V(){this.onResourceAdded=new S("resource-added",(function(e){const t=e.arguments[0];F(t)&&this._fire(new C(t))})),this.onResourceContentCommitted=new S("resource-content-committed",(function(e){const t=e.arguments[0];F(t)&&this._fire(new C(t),e.arguments[1])}))}function G(e){if(!F)throw new Error("Resource access not allowed");this._url=e.url,this._type=e.type}M.prototype={createStatusBarButton:function(e,t,n){const s="button-"+Y.nextObjectId();return Y.sendRequest({command:"createToolbarButton",panel:this._id,id:s,icon:e,tooltip:t,disabled:Boolean(n)}),new I(s)},show:function(){u&&Y.sendRequest({command:"showPanel",id:this._id})},__proto__:f.prototype},j.prototype={show:function(){u&&l&&Y.sendRequest({command:"showRecorderView",id:this._id})},__proto__:f.prototype},D.prototype={setHeight:function(e){Y.sendRequest({command:"setSidebarHeight",id:this._id,height:e})},setExpression:function(e,t,n,s){Y.sendRequest({command:"setSidebarContent",id:this._id,expression:e,rootTitle:t,evaluateOnPage:!0,evaluateOptions:"object"==typeof n?n:{}},x(arguments))},setObject:function(e,t,n){Y.sendRequest({command:"setSidebarContent",id:this._id,expression:e,rootTitle:t},n)},setPage:function(e){Y.sendRequest({command:"setSidebarPage",id:this._id,page:e})},__proto__:f.prototype},N.prototype={update:function(e,t,n){Y.sendRequest({command:"updateButton",id:this._id,icon:e,tooltip:t,disabled:Boolean(n)})}},W.prototype={addTraceProvider:function(e,t){const n="extension-trace-provider-"+Y.nextObjectId();return Y.sendRequest({command:"addTraceProvider",id:n,categoryName:e,categoryTooltip:t}),new U(n)}},B.prototype={complete:function(t,n){Y.sendRequest({command:"completeTra.eSession",id:this._id,url:t||e.DevToolsPath.EmptyUrlString,timeOffset:n||0})}},V.prototype={reload:function(e){let t=null;"object"==typeof e?t=e:"string"==typeof e&&(t={userAgent:e},console.warn("Passing userAgent as string parameter to inspectedWindow.reload() is deprecated. Use inspectedWindow.reload({ userAgent: value}) instead.")),Y.sendRequest({command:"Reload",options:t})},eval:function(e,t){const n=x(arguments);function s(e){const{isError:t,isException:s,value:i}=e;t||s?n&&n(void 0,e):n&&n(i)}return Y.sendRequest({command:"evaluateOnInspectedPage",expression:e,evaluateOptions:"object"==typeof t?t:void 0},n&&s),null},getResources:function(e){function t(e){return new C(e)}Y.sendRequest({command:"getPageResources"},e&&function(n){e&&e(n.map(t).filter(F))})}},G.prototype={get url(){return this._url},get type(){return this._type},getContent:function(e){Y.sendRequest({command:"getResourceContent",url:this._url},e&&function(t){const{content:n,encoding:s}=t;e&&e(n,s)})},setContent:function(e,t,n){Y.sendRequest({command:"setResourceContent",url:this._url,content:e,commit:t},n)}};let K=[],$=null;function z(){$=null,Y.sendRequest({command:"_forwardKeyboardEvent",entries:K}),K=[]}function X(e){this._callbacks={},this._handlers={},this._lastRequestId=0,this._lastObjectId=0,this.registerHandler("callback",this._onCallback.bind(this));const t=new MessageChannel;this._port=t.port1,this._port.addEventListener("message",this._onMessage.bind(this),!1),this._port.start(),e.postMessage("registerExtension","*",[t.port2])}document.addEventListener("keydown",(function(e){const t=document.activeElement;if(t){if(("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName||t.isContentEditable)&&!(e.ctrlKey||e.altKey||e.metaKey))return}let n=0;e.shiftKey&&(n|=1),e.ctrlKey&&(n|=2),e.altKey&&(n|=4),e.metaKey&&(n|=8);const s=255&e.keyCode|n<<8;if(!c.has(s))return;e.preventDefault();const i={eventType:e.type,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey,shiftKey:e.shiftKey,keyIdentifier:e.keyIdentifier,key:e.key,code:e.code,location:e.location,keyCode:e.keyCode};K.push(i),$||($=window.setTimeout(z,0))}),!1),X.prototype={sendRequest:function(e,t,n){"function"==typeof t&&(e.requestId=this._registerCallback(t)),this._port.postMessage(e,n)},hasHandler:function(e){return Boolean(this._handlers[e])},registerHandler:function(e,t){this._handlers[e]=t},unregisterHandler:function(e){delete this._handlers[e]},nextObjectId:function(){return o.toString()+"_"+ ++this._lastObjectId},_registerCallback:function(e){const t=++this._lastRequestId;return this._callbacks[t]=e,t},_onCallback:function(e){if(e.requestId in this._callbacks){const t=this._callbacks[e.requestId];delete this._callbacks[e.requestId],t(e.result)}},_onMessage:function(e){const t=e.data,n=this._handlers[t.command];n&&n.call(this,t)}};const Y=new X(a||window.parent),J=new function(){this.inspectedWindow=new V,this.panels=new g,this.network=new p,this.timeline=new W,this.languageServices=new v,this.recorder=new _,y(this,"webInspector","resources","network")};if(Object.defineProperty(d,"devtools",{value:{},enumerable:!0}),d.devtools.inspectedWindow={},Object.defineProperty(d.devtools.inspectedWindow,"tabId",{get:function(){return n}}),d.devtools.inspectedWindow.__proto__=J.inspectedWindow,d.devtools.network=J.network,d.devtools.panels=J.panels,d.devtools.panels.themeName=s,d.devtools.languageServices=J.languageServices,d.devtools.recorder=J.recorder,!1!==t.exposeExperimentalAPIs){d.experimental=d.experimental||{},d.experimental.devtools=d.experimental.devtools||{};const e=Object.getOwnPropertyNames(J);for(let t=0;tJSON.stringify(e))).join(",");return i||(i=()=>{}),"(function(injectedScriptId){ ("+self.injectedExtensionAPI.toString()+")("+r+","+i+", injectedScriptId);})"};var p=Object.freeze({__proto__:null});class m extends n.Widget.Widget{server;id;iframe;frameIndex;constructor(e,t,n,s){super(),this.setHideOnDetach(),this.element.className="vbox flex-auto",this.element.tabIndex=-1,this.server=e,this.id=t,this.iframe=document.createElement("iframe"),this.iframe.addEventListener("load",this.onLoad.bind(this),!1),this.iframe.src=n,this.iframe.className=s,this.setDefaultFocusedElement(this.element),this.element.appendChild(this.iframe)}wasShown(){super.wasShown(),"number"==typeof this.frameIndex&&this.server.notifyViewShown(this.id,this.frameIndex)}willHide(){"number"==typeof this.frameIndex&&this.server.notifyViewHidden(this.id)}onLoad(){const e=window.frames;this.frameIndex=Array.prototype.indexOf.call(e,this.iframe.contentWindow),this.isShowing()&&this.server.notifyViewShown(this.id,this.frameIndex)}}class g extends n.Widget.VBox{server;id;constructor(e,t){super(),this.server=e,this.id=t}wasShown(){this.server.notifyViewShown(this.id)}willHide(){this.server.notifyViewHidden(this.id)}}var f=Object.freeze({__proto__:null,ExtensionView:m,ExtensionNotifierView:g});class b extends n.Panel.Panel{server;id;panelToolbar;searchableViewInternal;constructor(e,t,s,i){super(t),this.server=e,this.id=s,this.setHideOnDetach(),this.panelToolbar=new n.Toolbar.Toolbar("hidden",this.element),this.searchableViewInternal=new n.SearchableView.SearchableView(this,null),this.searchableViewInternal.show(this.element);new m(e,this.id,i,"extension").show(this.searchableViewInternal.element)}addToolbarItem(e){this.panelToolbar.element.classList.remove("hidden"),this.panelToolbar.appendToolbarItem(e)}onSearchCanceled(){this.server.notifySearchAction(this.id,"cancelSearch"),this.searchableViewInternal.updateSearchMatchesCount(0)}searchableView(){return this.searchableViewInternal}performSearch(e,t,n){const s=e.query;this.server.notifySearchAction(this.id,"performSearch",s)}jumpToNextSearchResult(){this.server.notifySearchAction(this.id,"nextSearchResult")}jumpToPreviousSearchResult(){this.server.notifySearchAction(this.id,"previousSearchResult")}supportsCaseSensitiveSearch(){return!1}supportsRegexSearch(){return!1}}class w{id;toolbarButtonInternal;constructor(e,t,s,i,r){this.id=t,this.toolbarButtonInternal=new n.Toolbar.ToolbarButton("",""),this.toolbarButtonInternal.addEventListener(n.Toolbar.ToolbarButton.Events.Click,e.notifyButtonClicked.bind(e,this.id)),this.update(s,i,r)}update(e,t,n){"string"==typeof e&&this.toolbarButtonInternal.setBackgroundImage(e),"string"==typeof t&&this.toolbarButtonInternal.setTitle(t),"boolean"==typeof n&&this.toolbarButtonInternal.setEnabled(!n)}toolbarButton(){return this.toolbarButtonInternal}}class R extends n.View.SimpleView{panelNameInternal;server;idInternal;extensionView;objectPropertiesView;constructor(e,t,n,s){super(n),this.element.classList.add("fill"),this.panelNameInternal=t,this.server=e,this.idInternal=s}id(){return this.idInternal}panelName(){return this.panelNameInternal}setObject(e,n,s){this.createObjectPropertiesView(),this.setObjectInternal(t.RemoteObject.RemoteObject.fromLocalObject(e),n,s)}setExpression(e,t,n,s,i){this.createObjectPropertiesView(),this.server.evaluate(e,!0,!1,n,s,this.onEvaluate.bind(this,t,i))}setPage(e){this.objectPropertiesView&&(this.objectPropertiesView.detach(),delete this.objectPropertiesView),this.extensionView&&this.extensionView.detach(!0),this.extensionView=new m(this.server,this.idInternal,e,"extension fill"),this.extensionView.show(this.element),this.element.style.height||this.setHeight("150px")}setHeight(e){this.element.style.height=e}onEvaluate(e,t,n,s,i){n?t(n.toString()):s?this.setObjectInternal(s,e,t):t()}createObjectPropertiesView(){this.objectPropertiesView||(this.extensionView&&(this.extensionView.detach(!0),delete this.extensionView),this.objectPropertiesView=new g(this.server,this.idInternal),this.objectPropertiesView.show(this.element))}setObjectInternal(e,t,s){const i=this.objectPropertiesView;i?(i.element.removeChildren(),n.UIUtils.Renderer.render(e,{title:t,editable:!1}).then((e=>{if(!e)return void s();const t=e.tree&&e.tree.firstChild();t&&t.expand(),i.element.appendChild(e.node),s()}))):s("operation cancelled")}}var E=Object.freeze({__proto__:null,ExtensionPanel:b,ExtensionButton:w,ExtensionSidebarPane:R});function y(e){switch(e){case"http":return"80";case"https":return"443";case"ftp":return"25"}}class x{pattern;static parse(e){if(""===e)return new x({matchesAll:!0});const t=function(e){const t=e.indexOf("://");if(t<0)return;const n=e.substr(0,t).toLowerCase();return["*","http","https","ftp","chrome","chrome-extension"].includes(n)?{scheme:n,hostPattern:e.substr(t+"://".length)}:void 0}(e);if(!t)return;const{scheme:n,hostPattern:s}=t,i=function(e,t){const n=e.indexOf("/");if(n>=0){const t=e.substr(n);if("/*"!==t&&"/"!==t)return;e=e.substr(0,n)}if(e.endsWith(":*")&&(e=e.substr(0,e.length-":*".length)),e.endsWith(":"))return;let s;try{s=new URL(e.startsWith("*.")?`http://${e.substr("*.".length)}`:`http://${e}`)}catch{return}if("/"!==s.pathname)return;if(s.hostname.endsWith(".")&&(s.hostname=s.hostname.substr(0,s.hostname.length-1)),"%2A"!==s.hostname&&s.hostname.includes("%2A"))return;const i=y("http");if(!i)return;const r=e.endsWith(`:${i}`)?i:""===s.port?"*":s.port;if("*"!==r&&!["http","https","ftp"].includes(t))return;return{host:"%2A"!==s.hostname?e.startsWith("*.")?`*.${s.hostname}`:s.hostname:"*",port:r}}(s,n);if(!i)return;const{host:r,port:o}=i;return new x({scheme:n,host:r,port:o,matchesAll:!1})}constructor(e){this.pattern=e}get scheme(){return this.pattern.matchesAll?"*":this.pattern.scheme}get host(){return this.pattern.matchesAll?"*":this.pattern.host}get port(){return this.pattern.matchesAll?"*":this.pattern.port}matchesAllUrls(){return this.pattern.matchesAll}matchesUrl(e){let t;try{t=new URL(e)}catch{return!1}if(this.matchesAllUrls())return!0;const n=t.protocol.substr(0,t.protocol.length-1),s=t.port||y(n);return this.matchesScheme(n)&&this.matchesHost(t.hostname)&&(!s||this.matchesPort(s))}matchesScheme(e){return!!this.pattern.matchesAll||("*"===this.pattern.scheme?"http"===e||"https"===e:this.pattern.scheme===e)}matchesHost(e){if(this.pattern.matchesAll)return!0;if("*"===this.pattern.host)return!0;let t=new URL(`http://${e}`).hostname;return t.endsWith(".")&&(t=t.substr(0,t.length-1)),this.pattern.host.startsWith("*.")?t===this.pattern.host.substr(2)||t.endsWith(this.pattern.host.substr(1)):this.pattern.host===t}matchesPort(e){return!!this.pattern.matchesAll||("*"===this.pattern.port||this.pattern.port===e)}}var v=Object.freeze({__proto__:null,HostUrlPattern:x});class _{port;nextRequestId=0;pendingRequests;constructor(e){this.port=e,this.port.onmessage=this.onResponse.bind(this),this.pendingRequests=new Map}sendRequest(e,t){return new Promise(((n,s)=>{const i=this.nextRequestId++;this.pendingRequests.set(i,{resolve:n,reject:s}),this.port.postMessage({requestId:i,method:e,parameters:t})}))}disconnect(){for(const{reject:e}of this.pendingRequests.values())e(new Error("Extension endpoint disconnected"));this.pendingRequests.clear(),this.port.close()}onResponse({data:e}){if("event"in e)return void this.handleEvent(e);const{requestId:t,result:n,error:s}=e,i=this.pendingRequests.get(t);i?(this.pendingRequests.delete(t),s?i.reject(new Error(s.message)):i.resolve(n)):console.error(`No pending request ${t}`)}handleEvent(e){throw new Error("handleEvent is not implemented")}}class I extends _{plugin;constructor(e,t){super(t),this.plugin=e}handleEvent({event:e}){switch(e){case"unregisteredLanguageExtensionPlugin":{this.disconnect();const{pluginManager:e}=u.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance();e&&e.removePlugin(this.plugin);break}}}}class S{supportedScriptTypes;endpoint;name;constructor(e,t,n){this.name=e,this.supportedScriptTypes=t,this.endpoint=new I(this,n)}handleScript(e){const t=e.scriptLanguage();return null!==t&&null!==e.debugSymbols&&t===this.supportedScriptTypes.language&&this.supportedScriptTypes.symbol_types.includes(e.debugSymbols.type)}addRawModule(e,t,n){return this.endpoint.sendRequest("addRawModule",{rawModuleId:e,symbolsURL:t,rawModule:n})}removeRawModule(e){return this.endpoint.sendRequest("removeRawModule",{rawModuleId:e})}sourceLocationToRawLocation(e){return this.endpoint.sendRequest("sourceLocationToRawLocation",{sourceLocation:e})}rawLocationToSourceLocation(e){return this.endpoint.sendRequest("rawLocationToSourceLocation",{rawLocation:e})}getScopeInfo(e){return this.endpoint.sendRequest("getScopeInfo",{type:e})}listVariablesInScope(e){return this.endpoint.sendRequest("listVariablesInScope",{rawLocation:e})}getFunctionInfo(e){return this.endpoint.sendRequest("getFunctionInfo",{rawLocation:e})}getInlinedFunctionRanges(e){return this.endpoint.sendRequest("getInlinedFunctionRanges",{rawLocation:e})}getInlinedCalleesRanges(e){return this.endpoint.sendRequest("getInlinedCalleesRanges",{rawLocation:e})}async getMappedLines(e,t){return this.endpoint.sendRequest("getMappedLines",{rawModuleId:e,sourceFileURL:t})}async evaluate(e,t,n){return this.endpoint.sendRequest("formatValue",{expression:e,context:t,stopId:n})}getProperties(e){return this.endpoint.sendRequest("getProperties",{objectId:e})}releaseObject(e){return this.endpoint.sendRequest("releaseObject",{objectId:e})}}let P=null;class A extends s.ObjectWrapper.ObjectWrapper{#e=new Set;#t=new Map;static instance(){return P||(P=new A),P}addPlugin(e){this.#e.add(e),this.dispatchEventToListeners(O.PluginAdded,e)}removePlugin(e){this.#e.delete(e),this.dispatchEventToListeners(O.PluginRemoved,e)}plugins(){return Array.from(this.#e.values())}registerView(e){this.#t.set(e.id,e),this.dispatchEventToListeners(O.ViewRegistered,e)}views(){return Array.from(this.#t.values())}getViewDescriptor(e){return this.#t.get(e)}showView(e){const t=this.#t.get(e);if(!t)throw new Error(`View with id ${e} is not found.`);this.dispatchEventToListeners(O.ShowViewRequested,t)}}var O;!function(e){e.PluginAdded="pluginAdded",e.PluginRemoved="pluginRemoved",e.ViewRegistered="viewRegistered",e.ShowViewRequested="showViewRequested"}(O||(O={}));var T=Object.freeze({__proto__:null,RecorderPluginManager:A,get Events(){return O}});class L extends _{name;mediaType;capabilities;constructor(e,t,n,s){super(t),this.name=e,this.mediaType=s,this.capabilities=n}getName(){return this.name}getCapabilities(){return this.capabilities}getMediaType(){return this.mediaType}handleEvent({event:e}){if("unregisteredRecorderExtensionPlugin"!==e)throw new Error(`Unrecognized Recorder extension endpoint event: ${e}`);this.disconnect(),A.instance().removePlugin(this)}stringify(e){return this.sendRequest("stringify",{recording:e})}stringifyStep(e){return this.sendRequest("stringifyStep",{step:e})}replay(e){return this.sendRequest("replay",{recording:e})}}var C=Object.freeze({__proto__:null,RecorderExtensionEndpoint:L});const H=new WeakMap,q=[].map((e=>new URL(e).origin));let k;class M{runtimeAllowedHosts;runtimeBlockedHosts;static create(e){const t=[],n=[];if(e){for(const n of e.runtimeAllowedHosts){const e=x.parse(n);if(!e)return null;t.push(e)}for(const t of e.runtimeBlockedHosts){const e=x.parse(t);if(!e)return null;n.push(e)}}return new M(t,n)}constructor(e,t){this.runtimeAllowedHosts=e,this.runtimeBlockedHosts=t}isAllowedOnURL(e){return e?!(this.runtimeBlockedHosts.some((t=>t.matchesUrl(e)))&&!this.runtimeAllowedHosts.some((t=>t.matchesUrl(e)))):0===this.runtimeBlockedHosts.length}}class j{name;hostsPolicy;allowFileAccess;constructor(e,t,n){this.name=e,this.hostsPolicy=t,this.allowFileAccess=n}isAllowedOnTarget(e){if(e||(e=t.TargetManager.TargetManager.instance().primaryPageTarget()?.inspectedURL()),!e)return!1;if(!D.canInspectURL(e))return!1;if(!this.hostsPolicy.isAllowedOnURL(e))return!1;if(!this.allowFileAccess){let t;try{t=new URL(e)}catch(e){return!1}return"file:"!==t.protocol}return!0}}class D extends s.ObjectWrapper.ObjectWrapper{clientObjects;handlers;subscribers;subscriptionStartHandlers;subscriptionStopHandlers;extraHeaders;requests;requestIds;lastRequestId;registeredExtensions;status;sidebarPanesInternal;extensionsEnabled;inspectedTabId;extensionAPITestHook;themeChangeHandlers=new Map;#n=[];constructor(){super(),this.clientObjects=new Map,this.handlers=new Map,this.subscribers=new Map,this.subscriptionStartHandlers=new Map,this.subscriptionStopHandlers=new Map,this.extraHeaders=new Map,this.requests=new Map,this.requestIds=new Map,this.lastRequestId=0,this.registeredExtensions=new Map,this.status=new B,this.sidebarPanesInternal=[],this.extensionsEnabled=!0,this.registerHandler("addRequestHeaders",this.onAddRequestHeaders.bind(this)),this.registerHandler("applyStyleSheet",this.onApplyStyleSheet.bind(this)),this.registerHandler("createPanel",this.onCreatePanel.bind(this)),this.registerHandler("createSidebarPane",this.onCreateSidebarPane.bind(this)),this.registerHandler("createToolbarButton",this.onCreateToolbarButton.bind(this)),this.registerHandler("evaluateOnInspectedPage",this.onEvaluateOnInspectedPage.bind(this)),this.registerHandler("_forwardKeyboardEvent",this.onForwardKeyboardEvent.bind(this)),this.registerHandler("getHAR",this.onGetHAR.bind(this)),this.registerHandler("getPageResources",this.onGetPageResources.bind(this)),this.registerHandler("getRequestContent",this.onGetRequestContent.bind(this)),this.registerHandler("getResourceContent",this.onGetResourceContent.bind(this)),this.registerHandler("Reload",this.onReload.bind(this)),this.registerHandler("setOpenResourceHandler",this.onSetOpenResourceHandler.bind(this)),this.registerHandler("setThemeChangeHandler",this.onSetThemeChangeHandler.bind(this)),this.registerHandler("setResourceContent",this.onSetResourceContent.bind(this)),this.registerHandler("setSidebarHeight",this.onSetSidebarHeight.bind(this)),this.registerHandler("setSidebarContent",this.onSetSidebarContent.bind(this)),this.registerHandler("setSidebarPage",this.onSetSidebarPage.bind(this)),this.registerHandler("showPanel",this.onShowPanel.bind(this)),this.registerHandler("subscribe",this.onSubscribe.bind(this)),this.registerHandler("openResource",this.onOpenResource.bind(this)),this.registerHandler("unsubscribe",this.onUnsubscribe.bind(this)),this.registerHandler("updateButton",this.onUpdateButton.bind(this)),this.registerHandler("registerLanguageExtensionPlugin",this.registerLanguageExtensionEndpoint.bind(this)),this.registerHandler("getWasmLinearMemory",this.onGetWasmLinearMemory.bind(this)),this.registerHandler("getWasmGlobal",this.onGetWasmGlobal.bind(this)),this.registerHandler("getWasmLocal",this.onGetWasmLocal.bind(this)),this.registerHandler("getWasmOp",this.onGetWasmOp.bind(this)),this.registerHandler("registerRecorderExtensionPlugin",this.registerRecorderExtensionEndpoint.bind(this)),this.registerHandler("createRecorderView",this.onCreateRecorderView.bind(this)),this.registerHandler("showRecorderView",this.onShowRecorderView.bind(this)),window.addEventListener("message",this.onWindowMessage,!1);const e=window.DevToolsAPI&&window.DevToolsAPI.getInspectedTabId&&window.DevToolsAPI.getInspectedTabId();e&&this.setInspectedTabId({data:e}),i.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(i.InspectorFrontendHostAPI.Events.SetInspectedTabId,this.setInspectedTabId,this),this.initExtensions(),d.ThemeSupport.instance().addEventListener(d.ThemeChangeEvent.eventName,this.#s)}dispose(){d.ThemeSupport.instance().removeEventListener(d.ThemeChangeEvent.eventName,this.#s),t.TargetManager.TargetManager.instance().removeEventListener(t.TargetManager.Events.InspectedURLChanged,this.inspectedURLChanged,this),i.InspectorFrontendHost.InspectorFrontendHostInstance.events.removeEventListener(i.InspectorFrontendHostAPI.Events.SetInspectedTabId,this.setInspectedTabId,this),window.removeEventListener("message",this.onWindowMessage,!1)}#s=()=>{const e=d.ThemeSupport.instance().themeName();for(const t of this.themeChangeHandlers.values())t.postMessage({command:"host-theme-change",themeName:e})};static instance(e={forceNew:null}){const{forceNew:t}=e;return k&&!t||(k?.dispose(),k=new D),k}initializeExtensions(){null!==this.inspectedTabId&&i.InspectorFrontendHost.InspectorFrontendHostInstance.setAddExtensionCallback(this.addExtension.bind(this))}hasExtensions(){return Boolean(this.registeredExtensions.size)}notifySearchAction(e,t,n){this.postNotification("panel-search-"+e,t,n)}notifyViewShown(e,t){this.postNotification("view-shown-"+e,t)}notifyViewHidden(e){this.postNotification("view-hidden,"+e)}notifyButtonClicked(e){this.postNotification("button-clicked-"+e)}registerLanguageExtensionEndpoint(e,t){if("registerLanguageExtensionPlugin"!==e.command)return this.status.E_BADARG("command","expected registerLanguageExtensionPlugin");const{pluginManager:n}=u.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance();if(!n)return this.status.E_FAILED("WebAssembly DWARF support needs to be enabled to use this extension");const{pluginName:s,port:i,supportedScriptTypes:{language:r,symbol_types:o}}=e,a=Array.isArray(o)&&o.every((e=>"string"==typeof e))?o:[],c=new S(s,{language:r,symbol_types:a},i);return n.addPlugin(c),this.status.OK()}async loadWasmValue(e,t){const{pluginManager:n}=u.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance();if(!n)return this.status.E_FAILED("WebAssembly DWARF support needs to be enabled to use this extension");const s=n.callFrameForStopId(t);if(!s)return this.status.E_BADARG("stopId","Unknown stop id");const i=await s.debuggerModel.agent.invoke_evaluateOnCallFrame({callFrameId:s.id,expression:e,silent:!0,returnByValue:!0,throwOnSideEffect:!0});return i.exceptionDetails||i.getError()?this.status.E_FAILED("Failed"):i.result.value}async onGetWasmLinearMemory(e){return"getWasmLinearMemory"!==e.command?this.status.E_BADARG("command","expected getWasmLinearMemory"):await this.loadWasmValue(`[].slice.call(new Uint8Array(memories[0].buffer, ${Number(e.offset)}, ${Number(e.length)}))`,e.stopId)}async onGetWasmGlobal(e){return"getWasmGlobal"!==e.command?this.status.E_BADARG("command","expected getWasmGlobal"):this.loadWasmValue(`globals[${Number(e.global)}]`,e.stopId)}async onGetWasmLocal(e){return"getWasmLocal"!==e.command?this.status.E_BADARG("command","expected getWasmLocal"):this.loadWasmValue(`locals[${Number(e.local)}]`,e.stopId)}async onGetWasmOp(e){return"getWasmOp"!==e.command?this.status.E_BADARG("command","expected getWasmOp"):this.loadWasmValue(`stack[${Number(e.op)}]`,e.stopId)}registerRecorderExtensionEndpoint(e,t){if("registerRecorderExtensionPlugin"!==e.command)return this.status.E_BADARG("command","expected registerRecorderExtensionPlugin");const{pluginName:n,mediaType:s,port:i,capabilities:r}=e;return A.instance().addPlugin(new L(n,i,r,s)),this.status.OK()}onShowRecorderView(e){if("showRecorderView"!==e.command)return this.status.E_BADARG("command","expected showRecorderView");A.instance().showView(e.id)}onCreateRecorderView(e,t){if("createRecorderView"!==e.command)return this.status.E_BADARG("command","expected createRecorderView");const n=e.id;if(this.clientObjects.has(n))return this.status.E_EXISTS(n);const s=D.expandResourcePath(this.getExtensionOrigin(t),e.pagePath);if(void 0===s)return this.status.E_BADARG("pagePath","Resources paths cannot point to non-extension resources");return A.instance().registerView({id:n,pagePath:s,title:e.title,onShown:()=>this.notifyViewShown(n),onHidden:()=>this.notifyViewHidden(n)}),this.status.OK()}inspectedURLChanged(e){if(!D.canInspectURL(e.data.inspectedURL()))return void this.disableExtensions();if(e.data!==t.TargetManager.TargetManager.instance().primaryPageTarget())return;this.requests=new Map;const n=e.data.inspectedURL();this.postNotification("inspected-url-changed",n),this.#n.forEach((e=>this.addExtension(e))),this.#n.splice(0)}hasSubscribers(e){return this.subscribers.has(e)}postNotification(e,...t){if(!this.extensionsEnabled)return;const n=this.subscribers.get(e);if(!n)return;const s={command:"notify-"+e,arguments:Array.prototype.slice.call(arguments,1)};for(const e of n)this.extensionEnabled(e)&&e.postMessage(s)}onSubscribe(e,t){if("subscribe"!==e.command)return this.status.E_BADARG("command","expected subscribe");const n=this.subscribers.get(e.type);if(n)n.add(t);else{this.subscribers.set(e.type,new Set([t]));const n=this.subscriptionStartHandlers.get(e.type);n&&n()}}onUnsubscribe(e,t){if("unsubscribe"!==e.command)return this.status.E_BADARG("command","expected unsubscribe");const n=this.subscribers.get(e.type);if(n&&(n.delete(t),!n.size)){this.subscribers.delete(e.type);const t=this.subscriptionStopHandlers.get(e.type);t&&t()}}onAddRequestHeaders(e){if("addRequestHeaders"!==e.command)return this.status.E_BADARG("command","expected addRequestHeaders");const n=e.extensionId;if("string"!=typeof n)return this.status.E_BADARGTYPE("extensionId",typeof n,"string");let s=this.extraHeaders.get(n);s||(s=new Map,this.extraHeaders.set(n,s));for(const t in e.headers)s.set(t,e.headers[t]);const i={};for(const e of this.extraHeaders.values())for(const[t,n]of e)"__proto__"!==t&&"string"==typeof n&&(i[t]=n);t.NetworkManager.MultitargetNetworkManager.instance().setExtraHTTPHeaders(i)}onApplyStyleSheet(e){if("applyStyleSheet"!==e.command)return this.status.E_BADARG("command","expected applyStyleSheet");if(!o.Runtime.experiments.isEnabled("applyCustomStylesheet"))return;const t=document.createElement("style");t.textContent=e.styleSheet,document.head.appendChild(t),d.ThemeSupport.instance().addCustomStylesheet(e.styleSheet);for(let e=document.body;e;e=e.traverseNextNode(document.body))e instanceof ShadowRoot&&d.ThemeSupport.instance().injectCustomStyleSheets(e)}getExtensionOrigin(e){const t=H.get(e);if(!t)throw new Error("Received a message from an unregistered extension");return t}onCreatePanel(e,t){if("createPanel"!==e.command)return this.status.E_BADARG("command","expected createPanel");const s=e.id;if(this.clientObjects.has(s)||n.InspectorView.InspectorView.instance().hasPanel(s))return this.status.E_EXISTS(s);const i=D.expandResourcePath(this.getExtensionOrigin(t),e.page);if(void 0===i)return this.status.E_BADARG("page","Resources paths cannot point to non-extension resources");let o=this.getExtensionOrigin(t)+e.title;o=o.replace(/\s/g,"");const a=new W(o,r.i18n.lockedString(e.title),new b(this,o,s,i));return this.clientObjects.set(s,a),n.InspectorView.InspectorView.instance().addPanel(a),this.status.OK()}onShowPanel(e){if("showPanel"!==e.command)return this.status.E_BADARG("command","expected showPanel");let t=e.id;const s=this.clientObjects.get(e.id);s&&s instanceof W&&(t=s.viewId()),n.InspectorView.InspectorView.instance().showPanel(t)}onCreateToolbarButton(e,t){if("createToolbarButton"!==e.command)return this.status.E_BADARG("command","expected createToolbarButton");const n=this.clientObjects.get(e.panel);if(!(n&&n instanceof W))return this.status.E_NOTFOUND(e.panel);const s=D.expandResourcePath(this.getExtensionOrigin(t),e.icon);if(void 0===s)return this.status.E_BADARG("icon","Resources paths cannot point to non-extension resources");const i=new w(this,e.id,s,e.tooltip,e.disabled);return this.clientObjects.set(e.id,i),n.widget().then((function(e){e.addToolbarItem(i.toolbarButton())})),this.status.OK()}onUpdateButton(e,t){if("updateButton"!==e.command)return this.status.E_BADARG("command","expected updateButton");const n=this.clientObjects.get(e.id);if(!(n&&n instanceof w))return this.status.E_NOTFOUND(e.id);const s=e.icon&&D.expandResourcePath(this.getExtensionOrigin(t),e.icon);return e.icon&&void 0===s?this.status.E_BADARG("icon","Resources paths cannot point to non-extension resources"):(n.update(s,e.tooltip,e.disabled),this.status.OK())}onCreateSidebarPane(e){if("createSidebarPane"!==e.command)return this.status.E_BADARG("command","expected createSidebarPane");const t=e.id,n=new R(this,e.panel,r.i18n.lockedString(e.title),t);return this.sidebarPanesInternal.push(n),this.clientObjects.set(t,n),this.dispatchEventToListeners(N.SidebarPaneAdded,n),this.status.OK()}sidebarPanes(){return this.sidebarPanesInternal}onSetSidebarHeight(e){if("setSidebarHeight"!==e.command)return this.status.E_BADARG("command","expected setSidebarHeight");const t=this.clientObjects.get(e.id);return t&&t instanceof R?(t.setHeight(e.height),this.status.OK()):this.status.E_NOTFOUND(e.id)}onSetSidebarContent(e,t){if("setSidebarContent"!==e.command)return this.status.E_BADARG("command","expected setSidebarContent");const{requestId:n,id:s,rootTitle:i,expression:r,evaluateOptions:o,evaluateOnPage:a}=e,c=this.clientObjects.get(s);if(!(c&&c instanceof R))return this.status.E_NOTFOUND(e.id);function d(e){const s=e?this.status.E_FAILED(e):this.status.OK();this.dispatchCallback(n,t,s)}a?c.setExpression(r,i,o,this.getExtensionOrigin(t),d.bind(this)):c.setObject(e.expression,e.rootTitle,d.bind(this))}onSetSidebarPage(e,t){if("setSidebarPage"!==e.command)return this.status.E_BADARG("command","expected setSidebarPage");const n=this.clientObjects.get(e.id);if(!(n&&n instanceof R))return this.status.E_NOTFOUND(e.id);const s=D.expandResourcePath(this.getExtensionOrigin(t),e.page);if(void 0===s)return this.status.E_BADARG("page","Resources paths cannot point to non-extension resources");n.setPage(s)}onOpenResource(e){if("openResource"!==e.command)return this.status.E_BADARG("command","expected openResource");const t=h.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(e.url);if(t)return s.Revealer.reveal(t.uiLocation(e.lineNumber,e.columnNumber)),this.status.OK();const n=u.ResourceUtils.resourceForURL(e.url);if(n)return s.Revealer.reveal(n),this.status.OK();const i=a.NetworkLog.NetworkLog.instance().requestForURL(e.url);return i?(s.Revealer.reveal(i),this.status.OK()):this.status.E_NOTFOUND(e.url)}onSetOpenResourceHandler(e,t){if("setOpenResourceHandler"!==e.command)return this.status.E_BADARG("command","expected setOpenResourceHandler");const n=this.registeredExtensions.get(this.getExtensionOrigin(t));if(!n)throw new Error("Received a message from an unregistered extension");const{name:s}=n;e.handlerPresent?c.Linkifier.Linkifier.registerLinkHandler(s,this.handleOpenURL.bind(this,t)):c.Linkifier.Linkifier.unregisterLinkHandler(s)}onSetThemeChangeHandler(e,t){if("setThemeChangeHandler"!==e.command)return this.status.E_BADARG("command","expected setThemeChangeHandler");const n=this.getExtensionOrigin(t);if(!this.registeredExtensions.get(n))throw new Error("Received a message from an unregistered extension");e.handlerPresent?this.themeChangeHandlers.set(n,t):this.themeChangeHandlers.delete(n)}handleOpenURL(e,t,n){e.postMessage({command:"open-resource",resource:this.makeResource(t),lineNumber:n+1})}onReload(e){if("Reload"!==e.command)return this.status.E_BADARG("command","expected Reload");const n=e.options||{};let s;return t.NetworkManager.MultitargetNetworkManager.instance().setUserAgentOverride("string"==typeof n.userAgent?n.userAgent:"",null),n.injectedScript&&(s="(function(){"+n.injectedScript+"})()"),t.ResourceTreeModel.ResourceTreeModel.reloadAllPages(Boolean(n.ignoreCache),s),this.status.OK()}onEvaluateOnInspectedPage(e,t){if("evaluateOnInspectedPage"!==e.command)return this.status.E_BADARG("command","expected evaluateOnInspectedPage");const{requestId:n,expression:s,evaluateOptions:i}=e;return this.evaluate(s,!0,!0,i,this.getExtensionOrigin(t),function(e,s,i){let r;r=e||!s?this.status.E_PROTOCOLERROR(e?.toString()):i?{isException:!0,value:s.description}:{value:s.value},this.dispatchCallback(n,t,r)}.bind(this))}async onGetHAR(e){if("getHAR"!==e.command)return this.status.E_BADARG("command","expected getHAR");const t=a.NetworkLog.NetworkLog.instance().requests(),n=await l.Log.Log.build(t);for(let e=0;e{"registerExtension"===e.data&&this.registerExtension(e.origin,e.ports[0])};extensionEnabled(e){if(!this.extensionsEnabled)return!1;const t=H.get(e);if(!t)return!1;const n=this.registeredExtensions.get(t);return!!n&&n.isAllowedOnTarget()}async onmessage(e){const t=e.data;let n;const s=e.currentTarget,i=this.handlers.get(t.command);n=i?this.extensionEnabled(s)?await i(t,e.target):this.status.E_FAILED("Permission denied"):this.status.E_NOTSUPPORTED(t.command),n&&t.requestId&&this.dispatchCallback(t.requestId,e.target,n)}registerHandler(e,t){console.assert(Boolean(e)),this.handlers.set(e,t)}registerSubscriptionHandler(e,t,n){this.subscriptionStartHandlers.set(e,t),this.subscriptionStopHandlers.set(e,n)}registerAutosubscriptionHandler(e,t,n,s){this.registerSubscriptionHandler(e,(()=>t.addEventListener(n,s,this)),(()=>t.removeEventListener(n,s,this)))}registerAutosubscriptionTargetManagerHandler(e,n,s,i){this.registerSubscriptionHandler(e,(()=>t.TargetManager.TargetManager.instance().addModelListener(n,s,i,this)),(()=>t.TargetManager.TargetManager.instance().removeModelListener(n,s,i,this)))}registerResourceContentCommittedHandler(e){this.registerSubscriptionHandler("resource-content-committed",function(){h.Workspace.WorkspaceImpl.instance().addEventListener(h.Workspace.Events.WorkingCopyCommittedByUser,e,this),h.Workspace.WorkspaceImpl.instance().setHasResourceContentTrackingExtensions(!0)}.bind(this),function(){h.Workspace.WorkspaceImpl.instance().setHasResourceContentTrackingExtensions(!1),h.Workspace.WorkspaceImpl.instance().removeEventListener(h.Workspace.Events.WorkingCopyCommittedByUser,e,this)}.bind(this))}static expandResourcePath(e,t){const n=new URL(e).origin,i=new URL(s.ParsedURL.normalizePath(t),n);if(i.origin===n)return i.href}evaluate(e,n,s,i,r,o){let a,c;if((i=i||{}).frameURL)c=function(e){let n=null;return t.ResourceTreeModel.ResourceTreeModel.frames().some((function(t){return n=t.url===e?t:null,n})),n}(i.frameURL);else{const e=t.TargetManager.TargetManager.instance().primaryPageTarget(),n=e&&e.model(t.ResourceTreeModel.ResourceTreeModel);c=n&&n.mainFrame}if(!c)return i.frameURL?console.warn("evaluate: there is no frame with URL "+i.frameURL):console.warn("evaluate: the main frame is not yet available"),this.status.E_NOTFOUND(i.frameURL||"");const d=this.registeredExtensions.get(r);if(!d?.isAllowedOnTarget(c.url))return this.status.E_FAILED("Permission denied");let u;i.useContentScriptContext?u=r:i.scriptExecutionContext&&(u=i.scriptExecutionContext);const l=c.resourceTreeModel().target().model(t.RuntimeModel.RuntimeModel),h=l?l.executionContexts():[];if(u){for(let e=0;e!this.workerTasks.get(t)));if(!t&&this.workerTasks.size{const n=new i(t,e,r,!1);this.taskQueue.push(n),this.processNextTask()}))}format(t,e,r){const n={mimeType:t,content:e,indentString:r};return this.runTask("format",n)}javaScriptSubstitute(t,e){return this.runTask("javaScriptSubstitute",{content:t,mapping:Array.from(e.entries())}).then((t=>t||""))}javaScriptScopeTree(t){return this.runTask("javaScriptScopeTree",{content:t}).then((t=>t||null))}evaluatableJavaScriptSubstring(t){return this.runTask("evaluatableJavaScriptSubstring",{content:t}).then((t=>t||""))}parseCSS(t,e){this.runChunkedTask("parseCSS",{content:t},(function(t,r){e(t,r||[])}))}}class i{method;params;callback;isChunked;constructor(t,e,r,n){this.method=t,this.params=e,this.callback=r,this.isChunked=n}}function o(){return s.instance()}var a=Object.freeze({__proto__:null,FormatterWorkerPool:s,formatterWorkerPool:o});function c(t,e,r){return(e?t[e-1]+1:0)+r}function u(t,r){const n=e.ArrayUtilities.upperBound(t,r-1,e.ArrayUtilities.DEFAULT_COMPARATOR);let s;return s=n?r-t[n-1]-1:r,[n,s]}async function h(r,n,s=t.Settings.Settings.instance().moduleSetting("textEditorIndent").get()){const i=n.replace(/\r\n?|[\n\u2028\u2029]/g,"\n").replace(/^\uFEFF/,""),a=o(),c=await a.format(r,i,s),u=e.StringUtilities.findLineEndingIndexes(i),h=e.StringUtilities.findLineEndingIndexes(c.content),k=new l(u,h,c.mapping);return{formattedContent:c.content,formattedMapping:k}}class k{originalToFormatted(t,e=0){return[t,e]}formattedToOriginal(t,e=0){return[t,e]}}class l{originalLineEndings;formattedLineEndings;mapping;constructor(t,e,r){this.originalLineEndings=t,this.formattedLineEndings=e,this.mapping=r}originalToFormatted(t,e){const r=c(this.originalLineEndings,t,e||0),n=this.convertPosition(this.mapping.original,this.mapping.formatted,r);return u(this.formattedLineEndings,n)}formattedToOriginal(t,e){const r=c(this.formattedLineEndings,t,e||0),n=this.convertPosition(this.mapping.formatted,this.mapping.original,r);return u(this.originalLineEndings,n)}convertPosition(t,r,n){const s=e.ArrayUtilities.upperBound(t,n,e.ArrayUtilities.DEFAULT_COMPARATOR)-1;let i=r[s]+n-t[s];return sr[s+1]&&(i=r[s+1]),i}}var p=Object.freeze({__proto__:null,format:async function(e,r,n,s=t.Settings.Settings.instance().moduleSetting("textEditorIndent").get()){return e.isDocumentOrScriptOrStyleSheet()?h(r,n,s):{formattedContent:n,formattedMapping:new k}},formatScriptContent:h});export{a as FormatterWorkerPool,p as ScriptFormatter}; diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/har/har.js b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/har/har.js deleted file mode 100644 index 47b515af9..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/har/har.js +++ /dev/null @@ -1 +0,0 @@ -import*as e from"../../core/sdk/sdk.js";import*as t from"../../core/common/common.js";import*as s from"../../core/i18n/i18n.js";import*as r from"../../core/platform/platform.js";class o{custom;constructor(e){if(!e||"object"!=typeof e)throw"First parameter is expected to be an object";this.custom=new Map}static safeDate(e){const t=new Date(e);if(!Number.isNaN(t.getTime()))return t;throw"Invalid date format"}static safeNumber(e){const t=Number(e);if(!Number.isNaN(t))return t;throw"Casting to number results in NaN"}static optionalNumber(e){return void 0!==e?o.safeNumber(e):void 0}static optionalString(e){return void 0!==e?String(e):void 0}customAsString(e){const t=this.custom.get(e);if(t)return String(t)}customAsNumber(e){const t=this.custom.get(e);if(!t)return;const s=Number(t);return Number.isNaN(s)?void 0:s}customAsArray(e){const t=this.custom.get(e);if(t)return Array.isArray(t)?t:void 0}customInitiator(){return this.custom.get("initiator")}}class i extends o{version;creator;browser;pages;entries;comment;constructor(e){if(super(e),this.version=String(e.version),this.creator=new n(e.creator),this.browser=e.browser?new n(e.browser):void 0,this.pages=Array.isArray(e.pages)?e.pages.map((e=>new a(e))):[],!Array.isArray(e.entries))throw"log.entries is expected to be an array";this.entries=e.entries.map((e=>new u(e))),this.comment=o.optionalString(e.comment)}}class n extends o{name;version;comment;constructor(e){super(e),this.name=String(e.name),this.version=String(e.version),this.comment=o.optionalString(e.comment)}}class a extends o{startedDateTime;id;title;pageTimings;comment;constructor(e){super(e),this.startedDateTime=o.safeDate(e.startedDateTime),this.id=String(e.id),this.title=String(e.title),this.pageTimings=new c(e.pageTimings),this.comment=o.optionalString(e.comment)}}class c extends o{onContentLoad;onLoad;comment;constructor(e){super(e),this.onContentLoad=o.optionalNumber(e.onContentLoad),this.onLoad=o.optionalNumber(e.onLoad),this.comment=o.optionalString(e.comment)}}class u extends o{pageref;startedDateTime;time;request;response;cache;timings;serverIPAddress;connection;comment;constructor(e){super(e),this.pageref=o.optionalString(e.pageref),this.startedDateTime=o.safeDate(e.startedDateTime),this.time=o.safeNumber(e.time),this.request=new m(e.request),this.response=new d(e.response),this.cache={},this.timings=new S(e.timings),this.serverIPAddress=o.optionalString(e.serverIPAddress),this.connection=o.optionalString(e.connection),this.comment=o.optionalString(e.comment),this.custom.set("fromCache",o.optionalString(e._fromCache)),this.custom.set("initiator",this.importInitiator(e._initiator)),this.custom.set("priority",o.optionalString(e._priority)),this.custom.set("resourceType",o.optionalString(e._resourceType)),this.custom.set("webSocketMessages",this.importWebSocketMessages(e._webSocketMessages))}importInitiator(e){if("object"==typeof e)return new q(e)}importWebSocketMessages(e){if(!Array.isArray(e))return;const t=[];for(const s of e){if("object"!=typeof s)return;t.push(new w(s))}return t}}class m extends o{method;url;httpVersion;cookies;headers;queryString;postData;headersSize;bodySize;comment;constructor(e){super(e),this.method=String(e.method),this.url=String(e.url),this.httpVersion=String(e.httpVersion),this.cookies=Array.isArray(e.cookies)?e.cookies.map((e=>new l(e))):[],this.headers=Array.isArray(e.headers)?e.headers.map((e=>new p(e))):[],this.queryString=Array.isArray(e.queryString)?e.queryString.map((e=>new h(e))):[],this.postData=e.postData?new g(e.postData):void 0,this.headersSize=o.safeNumber(e.headersSize),this.bodySize=o.safeNumber(e.bodySize),this.comment=o.optionalString(e.comment)}}class d extends o{status;statusText;httpVersion;cookies;headers;content;redirectURL;headersSize;bodySize;comment;constructor(e){super(e),this.status=o.safeNumber(e.status),this.statusText=String(e.statusText),this.httpVersion=String(e.httpVersion),this.cookies=Array.isArray(e.cookies)?e.cookies.map((e=>new l(e))):[],this.headers=Array.isArray(e.headers)?e.headers.map((e=>new p(e))):[],this.content=new y(e.content),this.redirectURL=String(e.redirectURL),this.headersSize=o.safeNumber(e.headersSize),this.bodySize=o.safeNumber(e.bodySize),this.comment=o.optionalString(e.comment),this.custom.set("transferSize",o.optionalNumber(e._transferSize)),this.custom.set("error",o.optionalString(e._error))}}class l extends o{name;value;path;domain;expires;httpOnly;secure;comment;constructor(e){super(e),this.name=String(e.name),this.value=String(e.value),this.path=o.optionalString(e.path),this.domain=o.optionalString(e.domain),this.expires=e.expires?o.safeDate(e.expires):void 0,this.httpOnly=void 0!==e.httpOnly?Boolean(e.httpOnly):void 0,this.secure=void 0!==e.secure?Boolean(e.secure):void 0,this.comment=o.optionalString(e.comment)}}class p extends o{name;value;comment;constructor(e){super(e),this.name=String(e.name),this.value=String(e.value),this.comment=o.optionalString(e.comment)}}class h extends o{name;value;comment;constructor(e){super(e),this.name=String(e.name),this.value=String(e.value),this.comment=o.optionalString(e.comment)}}class g extends o{mimeType;params;text;comment;constructor(e){super(e),this.mimeType=String(e.mimeType),this.params=Array.isArray(e.params)?e.params.map((e=>new b(e))):[],this.text=String(e.text),this.comment=o.optionalString(e.comment)}}class b extends o{name;value;fileName;contentType;comment;constructor(e){super(e),this.name=String(e.name),this.value=o.optionalString(e.value),this.fileName=o.optionalString(e.fileName),this.contentType=o.optionalString(e.contentType),this.comment=o.optionalString(e.comment)}}class y extends o{size;compression;mimeType;text;encoding;comment;constructor(e){super(e),this.size=o.safeNumber(e.size),this.compression=o.optionalNumber(e.compression),this.mimeType=String(e.mimeType),this.text=o.optionalString(e.text),this.encoding=o.optionalString(e.encoding),this.comment=o.optionalString(e.comment)}}class S extends o{blocked;dns;connect;send;wait;receive;ssl;comment;constructor(e){super(e),this.blocked=o.optionalNumber(e.blocked),this.dns=o.optionalNumber(e.dns),this.connect=o.optionalNumber(e.connect),this.send=o.safeNumber(e.send),this.wait=o.safeNumber(e.wait),this.receive=o.safeNumber(e.receive),this.ssl=o.optionalNumber(e.ssl),this.comment=o.optionalString(e.comment),this.custom.set("blocked_queueing",o.optionalNumber(e._blocked_queueing)),this.custom.set("blocked_proxy",o.optionalNumber(e._blocked_proxy))}}class q extends o{type;url;lineNumber;requestId;stack;constructor(t){super(t),this.type=o.optionalString(t.type)??e.NetworkRequest.InitiatorType.Other,this.url=o.optionalString(t.url),this.lineNumber=o.optionalNumber(t.lineNumber),this.requestId=o.optionalString(t.requestId),t.stack&&(this.stack=new f(t.stack))}}class f extends o{description;callFrames;parent;parentId;constructor(e){super(e),this.callFrames=Array.isArray(e.callFrames)?e.callFrames.map((e=>e?new T(e):null)).filter(Boolean):[],e.parent&&(this.parent=new f(e.parent)),this.description=o.optionalString(e.description);const t=e.parentId;t&&(this.parentId={id:o.optionalString(t.id)??"",debuggerId:o.optionalString(t.debuggerId)})}}class T extends o{functionName;scriptId;url="";lineNumber=-1;columnNumber=-1;constructor(e){super(e),this.functionName=o.optionalString(e.functionName)??"",this.scriptId=o.optionalString(e.scriptId)??"",this.url=o.optionalString(e.url)??"",this.lineNumber=o.optionalNumber(e.lineNumber)??-1,this.columnNumber=o.optionalNumber(e.columnNumber)??-1}}class w extends o{time;opcode;data;type;constructor(e){super(e),this.time=o.optionalNumber(e.time),this.opcode=o.optionalNumber(e.opcode),this.data=o.optionalString(e.data),this.type=o.optionalString(e.type)}}var k=Object.freeze({__proto__:null,HARRoot:class extends o{log;constructor(e){super(e),this.log=new i(e.log)}},HARLog:i,HARPage:a,HAREntry:u,HARParam:b,HARTimings:S,HARInitiator:q,HARStack:f,HARCallFrame:T});class v{static requestsFromHARLog(t){const s=new Map;for(const e of t.pages)s.set(e.id,e);t.entries.sort(((e,t)=>e.startedDateTime.valueOf()-t.startedDateTime.valueOf()));const r=new Map,o=[];for(const i of t.entries){const t=i.pageref;let n=t?r.get(t):void 0;const a=n?n.mainRequest.url():i.request.url;let c=null;const u=i.customInitiator();u&&(c={type:u.type,url:u.url,lineNumber:u.lineNumber,requestId:u.requestId,stack:u.stack});const m=e.NetworkRequest.NetworkRequest.createWithoutBackendRequest("har-"+o.length,i.request.url,a,c),d=t?s.get(t):void 0;!n&&t&&d&&(n=v.buildPageLoad(d,m),r.set(t,n)),v.fillRequestFromHAREntry(m,i,n),n&&n.bindRequest(m),o.push(m)}return o}static buildPageLoad(t,s){const r=new e.PageLoad.PageLoad(s);return r.startTime=t.startedDateTime.valueOf(),r.contentLoadTime=1e3*Number(t.pageTimings.onContentLoad),r.loadTime=1e3*Number(t.pageTimings.onLoad),r}static fillRequestFromHAREntry(t,s,r){s.request.postData?t.setRequestFormData(!0,s.request.postData.text):t.setRequestFormData(!1,null),t.connectionId=s.connection||"",t.requestMethod=s.request.method,t.setRequestHeaders(s.request.headers),s.response.content.mimeType&&"x-unknown"!==s.response.content.mimeType&&(t.mimeType=s.response.content.mimeType),t.responseHeaders=s.response.headers,t.statusCode=s.response.status,t.statusText=s.response.statusText;let o=s.response.httpVersion.toLowerCase();"http/2.0"===o&&(o="h2"),t.protocol=o.replace(/^http\/2\.0?\+quic/,"http/2+quic");const i=s.startedDateTime.getTime()/1e3;t.setIssueTime(i,i);const n=s.response.content.size>0?s.response.content.size:0,a=s.response.headersSize>0?s.response.headersSize:0,c=s.response.bodySize>0?s.response.bodySize:0;t.resourceSize=n||a+c;let u=s.response.customAsNumber("transferSize");void 0===u&&(u=s.response.headersSize+s.response.bodySize),t.setTransferSize(u>=0?u:0);const m=s.customAsString("fromCache");"memory"===m?t.setFromMemoryCache():"disk"===m&&t.setFromDiskCache();const d=s.response.content.text,l={error:null,content:d||null,encoded:"base64"===s.response.content.encoding};t.setContentDataProvider((async()=>l)),v.setupTiming(t,i,s.time,s.timings),t.setRemoteAddress(s.serverIPAddress||"",80),t.setResourceType(v.getResourceType(t,s,r));const p=s.customAsString("priority");p&&Protocol.Network.ResourcePriority.hasOwnProperty(p)&&t.setPriority(p);const h=s.customAsArray("webSocketMessages");if(h)for(const s of h){if(void 0===s.time)continue;if(!Object.values(e.NetworkRequest.WebSocketFrameType).includes(s.type))continue;if(void 0===s.opcode)continue;if(void 0===s.data)continue;const r=s.type===e.NetworkRequest.WebSocketFrameType.Send;t.addFrame({time:s.time,text:s.data,opCode:s.opcode,mask:r,type:s.type})}t.finished=!0}static getResourceType(e,s,r){const o=s.customAsString("resourceType");if(o){const e=t.ResourceType.ResourceType.fromName(o);if(e)return e}if(r&&r.mainRequest===e)return t.ResourceType.resourceTypes.Document;const i=t.ResourceType.ResourceType.fromMimeType(s.response.content.mimeType);if(i!==t.ResourceType.resourceTypes.Other)return i;const n=t.ResourceType.ResourceType.fromURL(s.request.url);return n||t.ResourceType.resourceTypes.Other}static setupTiming(e,t,s,r){function o(e){return void 0===e||e<0?-1:(i+=e,i)}let i=r.blocked&&r.blocked>=0?r.blocked:0;const n=r.customAsNumber("blocked_proxy")||-1,a=r.customAsNumber("blocked_queueing")||-1,c=r.ssl&&r.ssl>=0?r.ssl:0;r.connect&&r.connect>0&&(r.connect-=c);const u={proxyStart:n>0?i-n:-1,proxyEnd:n>0?i:-1,requestTime:t+(a>0?a:0)/1e3,dnsStart:r.dns&&r.dns>=0?i:-1,dnsEnd:o(r.dns),connectStart:r.connect&&r.connect>=0?i:-1,connectEnd:o(r.connect)+c,sslStart:r.ssl&&r.ssl>=0?i:-1,sslEnd:o(r.ssl),workerStart:-1,workerReady:-1,workerFetchStart:-1,workerRespondWithSettled:-1,sendStart:r.send>=0?i:-1,sendEnd:o(r.send),pushStart:0,pushEnd:0,receiveHeadersStart:r.wait&&r.wait>=0?i:-1,receiveHeadersEnd:o(r.wait)};o(r.receive),e.timing=u,e.endTime=t+Math.max(s,i)/1e3}}var N=Object.freeze({__proto__:null,Importer:v});class x{static pseudoWallTime(e,t){return new Date(1e3*e.pseudoWallTime(t))}static async build(e){const t=new x,s=[];for(const t of e)s.push(R.build(t));const r=await Promise.all(s);return{version:"1.2",creator:t.creator(),pages:t.buildPages(e),entries:r}}creator(){const e=/AppleWebKit\/([^ ]+)/.exec(window.navigator.userAgent);return{name:"WebInspector",version:e?e[1]:"n/a"}}buildPages(t){const s=new Set,r=[];for(let o=0;or.blocked&&(r.blocked=r._blocked_proxy);const s=e.dnsEnd>=0?t:0,o=e.dnsEnd>=0?e.dnsEnd:-1;r.dns=o-s;const n=e.sslEnd>0?e.sslStart:0,a=e.sslEnd>0?e.sslEnd:-1;r.ssl=a-n;const c=e.connectEnd>=0?d([o,t]):0,u=e.connectEnd>=0?e.connectEnd:-1;r.connect=u-c;const m=e.sendEnd>=0?Math.max(u,o,t):0,l=e.sendEnd>=0?e.sendEnd:0;r.send=l-m,r.send<0&&(r.send=0),i=Math.max(l,u,a,o,t,0)}else if(-1===this.request.responseReceivedTime)return r.blocked=R.toMilliseconds(this.request.endTime-t),r;const n=e?e.requestTime:s,a=i,c=R.toMilliseconds(this.request.responseReceivedTime-n);r.wait=c-a;const u=c,m=R.toMilliseconds(this.request.endTime-n);return r.receive=Math.max(m-u,0),r;function d(e){return e.reduce(((e,t)=>t>=0&&te.issueTime()-t.issueTime()));const o=await x.build(e),i=[];for(let t=0;t=57344&&t<64976||t>65007&&t<=1114111&&65534!=(65534&t)))return!0;var t;return!1}(s)&&(s=r.StringUtilities.toBase64(s),o=!0),e.response.content.text=s}o&&(e.response.content.encoding="base64")}}static async writeToStream(e,t,s){const r=t.createSubProgress();r.setTitle(C(A.writingFile)),r.setTotalWork(s.length);for(let t=0;t 96) diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/CompatibilityModeQuirks.md b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/CompatibilityModeQuirks.md deleted file mode 100644 index 5107ea748..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/CompatibilityModeQuirks.md +++ /dev/null @@ -1,5 +0,0 @@ -# Page layout may be unexpected due to Quirks Mode - -One or more documents in this page is in Quirks Mode, which will render the affected document(s) with quirks incompatible with the current HTML and CSS specifications. - -Quirks Mode exists mostly due to historical reasons. If this is not intentional, you can [add or modify the DOCTYPE to be ``](issueQuirksModeDoctype) to render the page in No Quirks Mode. diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/CookieAttributeValueExceedsMaxSize.md b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/CookieAttributeValueExceedsMaxSize.md deleted file mode 100644 index a4ad6a017..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/CookieAttributeValueExceedsMaxSize.md +++ /dev/null @@ -1,5 +0,0 @@ -# Ensure cookie attribute values don’t exceed 1024 characters - -Cookie attribute values exceeding 1024 characters in size will result in the attribute being ignored. This could lead to unexpected behavior since the cookie will be processed as if the offending attribute / attribute value pair were not present. - -Resolve this issue by ensuring that cookie attribute values don’t exceed 1024 characters. \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/LowTextContrast.md b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/LowTextContrast.md deleted file mode 100644 index 3340be988..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/LowTextContrast.md +++ /dev/null @@ -1,5 +0,0 @@ -# Users may have difficulties reading text content due to insufficient color contrast - -Low-contrast text is difficult or impossible for users to read. A [minimum contrast ratio (AA) of 4.5](issuesContrastWCAG21AA) is recommended for all text. Since font size and weight affect color perception, an exception is made for very large or bold text — in this case, a contrast ratio of 3.0 is allowed. The [enhanced conformance level (AAA)](issuesContrastWCAG21AAA) requires the contrast ratio to be above 7.0 for regular text and 4.5 for large text. - -Update colors or change the font size or weight to achieve sufficient contrast. You can use the [“Suggest color” feature](issuesContrastSuggestColor) in the DevTools color picker to automatically select a better text color. \ No newline at end of file diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteExcludeContextDowngradeRead.md b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteExcludeContextDowngradeRead.md deleted file mode 100644 index 724e1c4b9..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteExcludeContextDowngradeRead.md +++ /dev/null @@ -1,8 +0,0 @@ -# Migrate entirely to HTTPS to have cookies sent to same-site subresources - -A cookie was not sent to {PLACEHOLDER_destination} origin from {PLACEHOLDER_origin} context. -Because this cookie would have been sent across schemes on the same site, it was not sent. -This behavior enhances the `SameSite` attribute’s protection of user data from request forgery by network attackers. - -Resolve this issue by migrating your site (as defined by the eTLD+1) entirely to HTTPS. -It is also recommended to mark the cookie with the `Secure` attribute if that is not already the case. diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteExcludeContextDowngradeSet.md b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteExcludeContextDowngradeSet.md deleted file mode 100644 index 33da14ab7..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteExcludeContextDowngradeSet.md +++ /dev/null @@ -1,8 +0,0 @@ -# Migrate entirely to HTTPS to allow cookies to be set by same-site subresources - -A cookie was not set by {PLACEHOLDER_origin} origin in {PLACEHOLDER_destination} context. -Because this cookie would have been set across schemes on the same site, it was blocked. -This behavior enhances the `SameSite` attribute’s protection of user data from request forgery by network attackers. - -Resolve this issue by migrating your site (as defined by the eTLD+1) entirely to HTTPS. -It is also recommended to mark the cookie with the `Secure` attribute if that is not already the case. diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteExcludeNavigationContextDowngrade.md b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteExcludeNavigationContextDowngrade.md deleted file mode 100644 index bede35d2c..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteExcludeNavigationContextDowngrade.md +++ /dev/null @@ -1,8 +0,0 @@ -# Migrate entirely to HTTPS to have cookies sent on same-site requests - -A cookie was not sent to {PLACEHOLDER_destination} origin from {PLACEHOLDER_origin} context on a navigation. -Because this cookie would have been sent across schemes on the same site, it was not sent. -This behavior enhances the `SameSite` attribute’s protection of user data from request forgery by network attackers. - -Resolve this issue by migrating your site (as defined by the eTLD+1) entirely to HTTPS. -It is also recommended to mark the cookie with the `Secure` attribute if that is not already the case. diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteInvalidSameParty.md b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteInvalidSameParty.md deleted file mode 100644 index c48786233..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteInvalidSameParty.md +++ /dev/null @@ -1,8 +0,0 @@ -# Mark SameParty cookies as Secure and do not use SameSite=Strict for SameParty cookies - -Cookies marked with `SameParty` must also be marked with `Secure`. In addition, cookies marked -with `SameParty` cannot use `SameSite=Strict`. - -Resolve this issue by updating the attributes of the cookie: - * Remove `SameParty` if the cookie should only be used by the same site but not the same first-party set - * Remove `SameSite=Strict` and specify `Secure` if the cookie should be available to all sites of the same first-party set diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteNoneInsecureErrorRead.md b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteNoneInsecureErrorRead.md deleted file mode 100644 index cfe705c0a..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteNoneInsecureErrorRead.md +++ /dev/null @@ -1,8 +0,0 @@ -# Mark cross-site cookies as Secure to allow them to be sent in cross-site requests - -Cookies marked with `SameSite=None` must also be marked with `Secure` to get sent in cross-site requests. -This behavior protects user data from being sent over an insecure connection. - -Resolve this issue by updating the attributes of the cookie: -* Specify `SameSite=None` and `Secure` if the cookie should be sent in cross-site requests. This enables third-party use. -* Specify `SameSite=Strict` or `SameSite=Lax` if the cookie should not be sent in cross-site requests. diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteNoneInsecureErrorSet.md b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteNoneInsecureErrorSet.md deleted file mode 100644 index 55ba7d671..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteNoneInsecureErrorSet.md +++ /dev/null @@ -1,8 +0,0 @@ -# Mark cross-site cookies as Secure to allow setting them in cross-site contexts - -Cookies marked with `SameSite=None` must also be marked with `Secure` to allow setting them in a cross-site context. -This behavior protects user data from being sent over an insecure connection. - -Resolve this issue by updating the attributes of the cookie: -* Specify `SameSite=None` and `Secure` if the cookie is intended to be set in cross-site contexts. Note that only cookies sent over HTTPS may use the `Secure` attribute. -* Specify `SameSite=Strict` or `SameSite=Lax` if the cookie should not be set by cross-site requests. diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteNoneInsecureWarnRead.md b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteNoneInsecureWarnRead.md deleted file mode 100644 index 226001676..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteNoneInsecureWarnRead.md +++ /dev/null @@ -1,8 +0,0 @@ -# Mark cross-site cookies as Secure to allow them to be sent in cross-site requests - -In a future version of the browser, cookies marked with `SameSite=None` must also be marked with `Secure` to get sent in cross-site requests. -This behavior protects user data from being sent over an insecure connection. - -Resolve this issue by updating the attributes of the cookie: -* Specify `SameSite=None` and `Secure` if the cookie should be sent in cross-site requests. This enables third-party use. -* Specify `SameSite=Strict` or `SameSite=Lax` if the cookie should not be sent in cross-site requests. diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteNoneInsecureWarnSet.md b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteNoneInsecureWarnSet.md deleted file mode 100644 index 32a8d8429..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteNoneInsecureWarnSet.md +++ /dev/null @@ -1,8 +0,0 @@ -# Mark cross-site cookies as Secure to allow setting them in cross-site contexts - -In a future version of the browser, cookies marked with `SameSite=None` must also be marked with `Secure` to allow setting them in a cross-site context. -This behavior protects user data from being sent over an insecure connection. - -Resolve this issue by updating the attributes of the cookie: -* Specify `SameSite=None` and `Secure` if the cookie is intended to be set in cross-site contexts. Note that only cookies sent over HTTPS may use the `Secure` attribute. -* Specify `SameSite=Strict` or `SameSite=Lax` if the cookie should not be set by cross-site requests. diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteUnspecifiedLaxAllowUnsafeRead.md b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteUnspecifiedLaxAllowUnsafeRead.md deleted file mode 100644 index 0f96a674d..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteUnspecifiedLaxAllowUnsafeRead.md +++ /dev/null @@ -1,9 +0,0 @@ -# Indicate whether to send a cookie in a cross-site request by specifying its SameSite attribute - -Because a cookie’s `SameSite` attribute was not set or is invalid, it defaults to `SameSite=Lax`, -which will prevent the cookie from being sent in a cross-site request in a future version of the browser. -This behavior protects user data from accidentally leaking to third parties and cross-site request forgery. - -Resolve this issue by updating the attributes of the cookie: -* Specify `SameSite=None` and `Secure` if the cookie should be sent in cross-site requests. This enables third-party use. -* Specify `SameSite=Strict` or `SameSite=Lax` if the cookie should not be sent in cross-site requests. diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteUnspecifiedLaxAllowUnsafeSet.md b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteUnspecifiedLaxAllowUnsafeSet.md deleted file mode 100644 index 22a09f829..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteUnspecifiedLaxAllowUnsafeSet.md +++ /dev/null @@ -1,9 +0,0 @@ -# Indicate whether a cookie is intended to be set in cross-site context by specifying its SameSite attribute - -Because a cookie’s `SameSite` attribute was not set or is invalid, it defaults to `SameSite=Lax`, -which will prevents the cookie from being set in a cross-site context in a future version of the browser. -This behavior protects user data from accidentally leaking to third parties and cross-site request forgery. - -Resolve this issue by updating the attributes of the cookie: -* Specify `SameSite=None` and `Secure` if the cookie is intended to be set in cross-site contexts. Note that only cookies sent over HTTPS may use the `Secure` attribute. -* Specify `SameSite=Strict` or `SameSite=Lax` if the cookie should not be set by cross-site requests. diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteUnspecifiedTreatedAsLaxRead.md b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteUnspecifiedTreatedAsLaxRead.md deleted file mode 100644 index a85247804..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteUnspecifiedTreatedAsLaxRead.md +++ /dev/null @@ -1,9 +0,0 @@ -# Indicate whether to send a cookie in a cross-site request by specifying its SameSite attribute - -Because a cookie’s `SameSite` attribute was not set or is invalid, it defaults to `SameSite=Lax`, -which prevents the cookie from being sent in a cross-site request. -This behavior protects user data from accidentally leaking to third parties and cross-site request forgery. - -Resolve this issue by updating the attributes of the cookie: -* Specify `SameSite=None` and `Secure` if the cookie should be sent in cross-site requests. This enables third-party use. -* Specify `SameSite=Strict` or `SameSite=Lax` if the cookie should not be sent in cross-site requests. diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteUnspecifiedTreatedAsLaxSet.md b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteUnspecifiedTreatedAsLaxSet.md deleted file mode 100644 index 04e74efa8..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteUnspecifiedTreatedAsLaxSet.md +++ /dev/null @@ -1,9 +0,0 @@ -# Indicate whether a cookie is intended to be set in a cross-site context by specifying its SameSite attribute - -Because a cookie’s `SameSite` attribute was not set or is invalid, it defaults to `SameSite=Lax`, -which prevents the cookie from being set in a cross-site context. -This behavior protects user data from accidentally leaking to third parties and cross-site request forgery. - -Resolve this issue by updating the attributes of the cookie: -* Specify `SameSite=None` and `Secure` if the cookie is intended to be set in cross-site contexts. Note that only cookies sent over HTTPS may use the `Secure` attribute. -* Specify `SameSite=Strict` or `SameSite=Lax` if the cookie should not be set by cross-site requests. diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteWarnCrossDowngradeRead.md b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteWarnCrossDowngradeRead.md deleted file mode 100644 index 170cba359..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteWarnCrossDowngradeRead.md +++ /dev/null @@ -1,8 +0,0 @@ -# Migrate entirely to HTTPS to continue having cookies sent to same-site subresources - -A cookie is being sent to {PLACEHOLDER_destination} origin from {PLACEHOLDER_origin} context. -Because this cookie is being sent across schemes on the same site, it will not be sent in a future version of Chrome. -This behavior enhances the `SameSite` attribute’s protection of user data from request forgery by network attackers. - -Resolve this issue by migrating your site (as defined by the eTLD+1) entirely to HTTPS. -It is also recommended to mark the cookie with the `Secure` attribute if that is not already the case. diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteWarnCrossDowngradeSet.md b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteWarnCrossDowngradeSet.md deleted file mode 100644 index e5154b1ff..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteWarnCrossDowngradeSet.md +++ /dev/null @@ -1,8 +0,0 @@ -# Migrate entirely to HTTPS to continue allowing cookies to be set by same-site subresources - -A cookie is being set by {PLACEHOLDER_origin} origin in {PLACEHOLDER_destination} context. -Because this cookie is being set across schemes on the same site, it will be blocked in a future version of Chrome. -This behavior enhances the `SameSite` attribute’s protection of user data from request forgery by network attackers. - -Resolve this issue by migrating your site (as defined by the eTLD+1) entirely to HTTPS. -It is also recommended to mark the cookie with the `Secure` attribute if that is not already the case. diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteWarnStrictLaxDowngradeStrict.md b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteWarnStrictLaxDowngradeStrict.md deleted file mode 100644 index d41d22f16..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteWarnStrictLaxDowngradeStrict.md +++ /dev/null @@ -1,8 +0,0 @@ -# Migrate entirely to HTTPS to continue having cookies sent on same-site requests - -A cookie is being sent to {PLACEHOLDER_destination} origin from {PLACEHOLDER_origin} context on a navigation. -Because this cookie is being sent across schemes on the same site, it will not be sent in a future version of Chrome. -This behavior enhances the `SameSite` attribute’s protection of user data from request forgery by network attackers. - -Resolve this issue by migrating your site (as defined by the eTLD+1) entirely to HTTPS. -It is also recommended to mark the cookie with the `Secure` attribute if that is not already the case. diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/arInsecureContext.md b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/arInsecureContext.md deleted file mode 100644 index 595fd888c..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/arInsecureContext.md +++ /dev/null @@ -1,7 +0,0 @@ -# Ensure that the attribution registration context is secure - -This page tried to register a source or trigger using the Attribution Reporting -API but failed because the page that initiated the registration was not secure. - -The registration context must use HTTPS unless it is `localhost` or -`127.0.0.1`. diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/arInvalidRegisterOsSourceHeader.md b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/arInvalidRegisterOsSourceHeader.md deleted file mode 100644 index a32254b34..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/arInvalidRegisterOsSourceHeader.md +++ /dev/null @@ -1,5 +0,0 @@ -# Ensure that the `Attribution-Reporting-Register-OS-Source` header is valid - -This page tried to register an OS source using the Attribution Reporting API -but failed because an `Attribution-Reporting-Register-OS-Source` response -header was invalid. diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/arInvalidRegisterOsTriggerHeader.md b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/arInvalidRegisterOsTriggerHeader.md deleted file mode 100644 index df74ad336..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/arInvalidRegisterOsTriggerHeader.md +++ /dev/null @@ -1,5 +0,0 @@ -# Ensure that the `Attribution-Reporting-Register-OS-Trigger` header is valid - -This page tried to register an OS trigger using the Attribution Reporting API -but failed because an `Attribution-Reporting-Register-OS-Trigger` response -header was invalid. diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/arInvalidRegisterSourceHeader.md b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/arInvalidRegisterSourceHeader.md deleted file mode 100644 index a54851ffc..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/arInvalidRegisterSourceHeader.md +++ /dev/null @@ -1,5 +0,0 @@ -# Ensure that the `Attribution-Reporting-Register-Source` header is valid - -This page tried to register a source using the Attribution Reporting API but -failed because an `Attribution-Reporting-Register-Source` response header was -invalid. diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/arInvalidRegisterTriggerHeader.md b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/arInvalidRegisterTriggerHeader.md deleted file mode 100644 index a22cc7eb6..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/arInvalidRegisterTriggerHeader.md +++ /dev/null @@ -1,5 +0,0 @@ -# Ensure that the `Attribution-Reporting-Register-Trigger` header is valid - -This page tried to register a trigger using the Attribution Reporting API but -failed because an `Attribution-Reporting-Register-Trigger` response header was -invalid. diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/arOsSourceIgnored.md b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/arOsSourceIgnored.md deleted file mode 100644 index 52c717ba8..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/arOsSourceIgnored.md +++ /dev/null @@ -1,18 +0,0 @@ -# An attribution OS source registration was ignored because the request was ineligible - -This page tried to register an OS source using the Attribution Reporting API, -but the request was ineligible to do so, so the OS source registration was -ignored. - -A request is eligible for OS source registration if it has all of the following: - -- An `Attribution-Reporting-Eligible` header whose value is a structured - dictionary that contains the key `navigation-source` or `event-source` -- An `Attribution-Reporting-Support` header whose value is a structured - dictionary that contains the key `os` - -Otherwise, any `Attribution-Reporting-Register-OS-Source` response header will -be ignored. - -Additionally, a single HTTP redirect chain may register only all sources or all -triggers, not a combination of both. diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/arOsTriggerIgnored.md b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/arOsTriggerIgnored.md deleted file mode 100644 index deb297a95..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/arOsTriggerIgnored.md +++ /dev/null @@ -1,19 +0,0 @@ -# An attribution OS trigger registration was ignored because the request was ineligible - -This page tried to register an OS trigger using the Attribution Reporting API, -but the request was ineligible to do so, so the OS trigger registration was -ignored. - -A request is eligible for OS trigger registration if it has all of the following: - -- No `Attribution-Reporting-Eligible` header or an - `Attribution-Reporting-Eligible` header whose value is a structured - dictionary that contains the key `trigger` -- An `Attribution-Reporting-Support` header whose value is a structured - dictionary that contains the key `os` - -Otherwise, any `Attribution-Reporting-Register-OS-Trigger` response header will -be ignored. - -Additionally, a single HTTP redirect chain may register only all sources or all -triggers, not a combination of both. diff --git a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/arPermissionPolicyDisabled.md b/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/arPermissionPolicyDisabled.md deleted file mode 100644 index 9dfeb269b..000000000 --- a/node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend/dist/third-party/front_end/models/issues_manager/descriptions/arPermissionPolicyDisabled.md +++ /dev/null @@ -1,8 +0,0 @@ -# The Attribution Reporting API can’t be used because Permissions Policy has been disabled - -This page tried to use the Attribution Reporting API but failed because the -`attribution-reporting` Permission Policy was explicitly disabled. - -This API is currently enabled by default for top-level and cross-origin frames, -but it is still possible for frames to have the permission disabled by their -parent, e.g. with `