diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 635547b33..9f85a9b02 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,7 +47,20 @@ jobs: - run: yarn run test:mocha-coverage - run: yarn run test:mocha-coverage:report - name: Coveralls - uses: coverallsapp/github-action@master + uses: coverallsapp/github-action@v2 with: github-token: ${{ secrets.GITHUB_TOKEN }} - path-to-lcov: './coverage/lcov.info' \ No newline at end of file + path-to-lcov: './coverage/lcov.info' + parallel: true + flag-name: node-${{ matrix.node-version }}-${{ matrix.os }} + + coveralls-finish: + needs: build + if: always() + runs-on: ubuntu-latest + steps: + - name: Coveralls Finished + uses: coverallsapp/github-action@v2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel-finished: true \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 35118b467..839cef024 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ Change Log +v5.4.2 +--- +* Fixed obfuscated code hanging in Bun when `selfDefending` is enabled. Fixes https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1404 + +v5.4.1 +--- +* Fixed `Utils.nodeRequire` causing `ReferenceError: require is not defined` in browser build by making it lazy-evaluated +* Fixed missing space between keywords (`return`, `throw`, `typeof`) and Unicode surrogate pair identifiers in compact mode. Fixes https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1112 +* Fixed `domainLock` being case-sensitive — domain values are now normalized to lowercase. Fixes https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1182 +* Removed `source-map-support` runtime dependency. Use `node --enable-source-maps` instead. Fixes https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1149 + +v5.4.0 +--- +* Add support for `import attributes`. Fixes https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1256 +* Add `renameProperties` support for private class fields and methods (`#foo`, `#bar()`). Fixes https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1220 +* Fixed `reservedNames` not preserving class method and property names when `stringArray` or `deadCodeInjection` is enabled. Fixes https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1279 +* Fixed infinite loop / stack overflow when `reservedNames` patterns match all generated identifier names. Now throws a descriptive error instead. Fixes https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1382 +* Fixed `transformObjectKeys` changing evaluation order when object expression is inside a sequence expression with preceding side effects (e.g. `return aux(ys), { min }`). Fixes https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1246 +* Fixed destructuring patterns inside class static blocks not being renamed when `renameGlobals` is disabled. Fixes https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1141 +* Fixed CLI `--options-preset` not applying preset values for options not explicitly set via command line (e.g. `splitStrings` from `high-obfuscation` preset was ignored). Fixes https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1236 +* Replaced `mkdirp` dependency with native `fs.mkdirSync({ recursive: true })`. Fixes https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1275. Thank you https://github.com/roli-lpci! +* Updated reserved DOM properties list, fixing `renameProperties` breaking modern built-in methods like `Array.prototype.at()`. Fixes https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1066 +* Replaced `conf` dependency with custom implementation using `env-paths` and native `fs` + +v5.3.1 +--- +* Fixed class expression name references inside class body being incorrectly resolved to an import binding with the same name, causing broken code at runtime. Fixes https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1386 + v5.3.0 --- * Add Pro API support to CLI diff --git a/README.md b/README.md index fe9b9759a..937bc642a 100644 --- a/README.md +++ b/README.md @@ -15,13 +15,25 @@ Huge thanks to all supporters! --- -### :rocket: Obfuscator.io with VM Obfuscation is out! +### :rocket: Obfuscator.io with VM Obfuscation -**Obfuscator.io** features **VM-based bytecode obfuscation** — the most advanced code protection available. Your JavaScript functions are transformed into custom bytecode running on an embedded virtual machine, making reverse engineering extremely difficult. +**Obfuscator.io** adds **VM-based bytecode obfuscation** to this package - your JavaScript functions are compiled to custom bytecode that runs on an embedded virtual machine. Each build produces unique opcodes and VM structure, making reverse engineering and automated deobfuscation dramatically harder. -[Try it at obfuscator.io](https://obfuscator.io) +| Protection goal | Free (this package) | [obfuscator.io](https://obfuscator.io) | +| --- |-----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Rename identifiers | ✅ variable/function renaming | ✅ + VM-local symbols never exposed as JavaScript | +| Obscure strings | ✅ string array + base64/rc4 | ✅ + strings embedded in bytecode constants | +| Obscure control flow | ✅ control flow flattening | ✅ full bytecode virtualization, [`vmJumpsEncoding`](#vmjumpsencoding) (runtime-computed jump targets), [`vmDeadCodeInjection`](#vmdeadcodeinjection) (fake bytecode sequences) | +| Resist decompilation | ⚠️ output is still JavaScript | ✅ custom opcodes, [`vmStatefulOpcodes`](#vmstatefulopcodes) (position-dependent opcode mapping), [`vmMacroOps`](#vmmacroops) (fused instructions), [`vmDecoyOpcodes`](#vmdecoyopcodes) (fake opcode handlers) | +| Resist automated LLM-based analysis | ❌ fully vulnerable (no LLM-specific defenses) | ✅ bytecode encryption + anti-LLM defenses in [`vmSelfDefending`](#vmselfdefending) and [`vmDebugProtection`](#vmdebugProtection) | +| Encryption | ✅ [`stringArrayEncoding`](#stringarrayencoding) (base64/rc4 on extracted strings) | ✅ [`vmBytecodeEncoding`](#vmbytecodeencoding) (per-instruction encoding), [`vmBytecodeArrayEncoding`](#vmbytecodeArrayEncoding) (whole bytecode array as single block) | +| Anti-debugging | ✅ `debugProtection` (freezes browser DevTools) | ✅ [`vmDebugProtection`](#vmdebugProtection) (multi-layered anti-debugging and anti-analysis defenses) | +| Tamper detection | ✅ `selfDefending` (breaks if beautified) | ✅ [`vmSelfDefending`](#vmselfdefending) (multi-layered tamper detection, anti-hooking, anti-reverse-engineering protection) | +| Runs offline, no network | ✅ | ❌ uses obfuscator.io API (requires token) | -This package provides access to Obfuscator.io Pro API via CLI and Node.js API. +[Visit Obfuscator.io](https://obfuscator.io) · [Pro API methods](#shield-pro-api-methods-vm-obfuscation) + +This package provides access to Obfuscator.io API via CLI and Node.js API. --- @@ -51,6 +63,7 @@ The example of obfuscated code: [github.com](https://github.com/javascript-obfus * Malta: [malta-js-obfuscator](https://github.com/fedeghe/malta-js-obfuscator) * Netlify plugin: [netlify-plugin-js-obfuscator](https://www.npmjs.com/package/netlify-plugin-js-obfuscator) * Snowpack plugin: [snowpack-javascript-obfuscator](https://www.npmjs.com/package/snowpack-javascript-obfuscator) +* Vite plugin: [vite-plugin-bundle-obfuscator](https://github.com/z0ffy/vite-plugin-bundle-obfuscator) [![npm version](https://badge.fury.io/js/javascript-obfuscator.svg)](https://badge.fury.io/js/javascript-obfuscator) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fjavascript-obfuscator%2Fjavascript-obfuscator.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fjavascript-obfuscator%2Fjavascript-obfuscator?ref=badge_shield) @@ -302,7 +315,6 @@ const result = await JavaScriptObfuscator.obfuscatePro( `function hello() { console.log("Hello World"); }`, { vmObfuscation: true, // Required! - vmObfuscationThreshold: 1, compact: true }, { @@ -338,8 +350,7 @@ You can specify which obfuscator version to use via the `version` option: const result = await JavaScriptObfuscator.obfuscatePro( sourceCode, { - vmObfuscation: true, - vmObfuscationThreshold: 1 + vmObfuscation: true }, { apiToken: 'your_javascript_obfuscator_pro_api_token', @@ -356,8 +367,7 @@ The API uses streaming mode to provide real-time progress updates during obfusca const result = await JavaScriptObfuscator.obfuscatePro( sourceCode, { - vmObfuscation: true, - vmObfuscationThreshold: 1 + vmObfuscation: true }, { apiToken: 'your_javascript_obfuscator_pro_api_token' @@ -516,6 +526,8 @@ When using CLI this prefix will be added automatically. ## JavaScript Obfuscator Options +> :shield: **Looking for VM obfuscation?** Options like `vmObfuscation`, `parseHtml`, and every `vm*` option are Pro-only and require an API token from [obfuscator.io](https://obfuscator.io). Use them via the [`obfuscatePro()`](#shield-pro-api-methods-vm-obfuscation) method, or the `--pro-api-token` CLI flag — see [Pro API Methods](#shield-pro-api-methods-vm-obfuscation). + Following options are available for the JS Obfuscator: #### options: @@ -1865,20 +1877,6 @@ Enables VM-based bytecode obfuscation. When enabled, JavaScript functions are co **Example:** Your readable code like `return qty * price` becomes a list of numbers like `[0x15,0x03,0x17,...]` that only the embedded VM interpreter can execute. The original logic is no longer visible as JavaScript. -### `vmObfuscationThreshold` -Type: `number` Default: `1` - -Controls what percentage of your root-level functions get VM protection. - -> **Warning:** Values other than `1` may cause runtime bugs when VM-obfuscated and non-VM-obfuscated code share top-level variables. A value of `1` is strongly recommended. For selective function obfuscation, use `vmTargetFunctionsMode: 'comment'` with the `// javascript-obfuscator:vm` directive instead. - -### `vmPreprocessIdentifiers` -Type: `boolean` Default: `true` - -Renames all non-global identifiers to unique hexadecimal names before VM obfuscation. This eliminates variable shadowing that can cause scope resolution issues in the VM bytecode. - -**When to disable:** Only disable this if you encounter specific compatibility issues. The preprocessing step ensures correct variable resolution in complex nested scopes. - ### `vmTargetFunctions` Type: `string[]` Default: `[]` @@ -1887,8 +1885,8 @@ Specify exactly which root-level functions should get VM protection by name. **Example:** ```javascript { - vmObfuscation: true, - vmTargetFunctions: ['someFunctionName'] + vmObfuscation: true, + vmTargetFunctions: ['someFunctionName'] } ``` @@ -1902,8 +1900,8 @@ Specify root-level functions that should never get VM protection. Takes preceden **Example:** ```javascript { - vmObfuscation: true, - vmExcludeFunctions: ['someFunctionName'] + vmObfuscation: true, + vmExcludeFunctions: ['someFunctionName'] } ``` @@ -1923,28 +1921,28 @@ Controls how functions/methods are selected for VM obfuscation. ```javascript // Source code function regularFunction() { - return 'not virtualized'; + return 'not virtualized'; } /* javascript-obfuscator:vm */ function sensitiveFunction() { - return 'this will be VM-protected'; + return 'this will be VM-protected'; } function outer() { - /* javascript-obfuscator:vm */ - function nestedSensitive() { - return 'nested but still VM-protected'; - } - return nestedSensitive(); + /* javascript-obfuscator:vm */ + function nestedSensitive() { + return 'nested but still VM-protected'; + } + return nestedSensitive(); } ``` ```javascript // Obfuscator options { - vmObfuscation: true, - vmTargetFunctionsMode: 'comment' + vmObfuscation: true, + vmTargetFunctionsMode: 'comment' } ``` @@ -1987,11 +1985,6 @@ Makes the VM interpreter smaller and unique for each build. As the result - smaller output and each build looks different. -### `vmOpcodeShuffle` -Type: `boolean` Default: `false` - -Randomizes the numeric values assigned to each opcode. For example, the `LOAD` instruction might be `1` in one build and `47` in another. - ### `vmBytecodeEncoding` Type: `boolean` Default: `false` @@ -2042,10 +2035,10 @@ vmBytecodeArrayEncodingKeyGetter: "window.config.encryption.key" ```ts // Build time JavaScriptObfuscator.obfuscate(code, { - vmObfuscation: true, - vmBytecodeArrayEncoding: true, - vmBytecodeArrayEncodingKey: 'mySecretKey123', - vmBytecodeArrayEncodingKeyGetter: 'window.__VM_KEY__' + vmObfuscation: true, + vmBytecodeArrayEncoding: true, + vmBytecodeArrayEncodingKey: 'mySecretKey123', + vmBytecodeArrayEncodingKeyGetter: 'window.__VM_KEY__' }); // Runtime - key must be set before obfuscated code runs @@ -2067,50 +2060,6 @@ Type: `boolean` Default: `false` Injects fake bytecode sequences that are never executed. These look like real instructions but are skipped during runtime, confusing analysis tools that process them. -### `vmSplitDispatcher` -Type: `boolean` Default: `false` - -Splits the VM dispatcher into multiple smaller switch statements organized by opcode category, instead of one large monolithic switch. Each category (stack, arithmetic, control flow, etc.) gets its own switch, routed by if/else range checks. - -This option supports `vmDynamicOpcodes` in both modes: `true` (shuffle first, then split into groups) and `false`. - -> :warning: When `vmIndirectDispatch` is enabled, this option is ignored. Prefer `vmIndirectDispatch` as it provides better obfuscation with similar performance. - -### `vmIndirectDispatch` -Type: `boolean` Default: `false` - -Uses compile-time generated handler functions for opcode dispatch instead of switch statements. Handlers are generated at compile-time with inlined opcode logic and shuffled positions. - -Instead of: -```javascript -switch(op) { - case 0: /* handle opcode 0 */ break; - case 1: /* handle opcode 1 */ break; -} -``` - -It generates: -```javascript -var _hm = {0:42, 1:17, ...}; // opcode → handler index mapping -var _h = [handler0, handler1, ...]; // shuffled handler array -_h[_hm[op]](arg); // single lookup + function call -``` - -This option supports `vmDynamicOpcodes` in both modes. - -> :warning: When enabled, this takes priority over `vmSplitDispatcher`. Both options cannot be active simultaneously. - -### `vmCompactDispatcher` -Type: `boolean` Default: `false` - -Uses a single unified dispatcher (generator-based) for both sync and async/generator code execution. By default (`false`), the VM generates two separate dispatchers: a non-generator version for sync code (faster) and a generator version for async/generator code. When enabled, only the generator-based dispatcher is used for all execution. - -**Trade-offs:** -- `false` (default): Larger code size due to dual dispatchers, but faster sync execution (no generator overhead) -- `true`: Smaller code size with single dispatcher, but sync code has generator protocol overhead - -Use this when code size is more important than sync execution speed. - ### `vmMacroOps` Type: `boolean` Default: `false` @@ -2119,12 +2068,16 @@ Combines common instruction sequences into single "macro" opcodes. For example, ### `vmDebugProtection` Type: `boolean` Default: `false` -Adds anti-debugging measures to the VM runtime. Detects debugger presence and alters behavior when debugging is detected. +Adds multi-layered anti-debugging, anti-analysis, and anti-LLM defenses to the VM runtime. For best results, allow `unsafe-eval` in your Content Security Policy. Works best with `browser`/`browser-no-eval` targets. -### `vmRuntimeOpcodeDerivation` +### `vmSelfDefending` Type: `boolean` Default: `false` -Derives the opcode mapping table at runtime from a seed value instead of hardcoding it. The seed is stored in the bytecode and used to generate the opcode-to-handler mapping via Fisher-Yates shuffle during execution. +Adds multi-layered tamper detection, anti-hooking, and anti-reverse-engineering protection to the VM runtime. + +> :warning: This option force-enables [`vmBytecodeArrayEncoding`](#vmbytecodeArrayEncoding). + +Strongly recommended to use together with [`vmDebugProtection`](#vmDebugProtection), [`vmBytecodeArrayEncodingKey`](#vmbytecodeArrayEncodingKey), and [`vmBytecodeArrayEncodingKeyGetter`](#vmbytecodeArrayEncodingKeyGetter). ### `vmStatefulOpcodes` Type: `boolean` Default: `false` @@ -2138,30 +2091,25 @@ Encrypts values on the VM stack during execution. Values are encoded when pushed This option heavily affects performance. -### `vmInstructionShuffle` +### `vmCompactDispatcher` Type: `boolean` Default: `false` -Randomizes the bytecode instruction layout per function. Each function can have a different instruction array format: -- Layout 0: `[op, arg, op, arg, ...]` (interleaved - default) -- Layout 1: `[arg, op, arg, op, ...]` (swapped interleaved) -- Layout 2: `[op0, op1, ..., arg0, arg1, ...]` (opcodes first, then arguments) -- Layout 3: `[arg0, arg1, ..., op0, op1, ...]` (arguments first, then opcodes) +Uses a single VM executor instead of dual executors (sync + generator). Reduces obfuscated code size but adds ~20% performance overhead on recursion-heavy code. -This makes pattern recognition across functions harder during analysis. +- `false` (default): dual executors — optimal performance, larger output +- `true`: single executor — smaller output, slightly slower -### `vmRandomizeKeys` +### `vmStringArrayBytecodeOnly` Type: `boolean` Default: `false` -Randomizes the property key names used in bytecode objects. Standard keys like `i` (instructions), `c` (constants) become random 2-character identifiers, making the bytecode structure different for each build. +When enabled, the string array will **only** extract strings from bytecode data — no other strings in the code are transformed. This force-enables `stringArray` even if it's not explicitly set. -### `vmBytecodeFormat` -Type: `string` Default: `binary` +**Why use this:** Extracting all VM runtime strings to a string array is slow. This option targets only bytecode content for string array extraction, improving performance while still protecting bytecode constants. -Controls how bytecode is stored in the output. +- When `vmBytecodeArrayEncoding: false` — strings inside bytecode constant pools (`c` arrays) are extracted +- When `vmBytecodeArrayEncoding: true` — top-level base64 encoded bytecode strings are extracted +- `stringArrayThreshold` still controls what percentage of those bytecode strings are extracted -**Options:** -- `binary` - Compact binary format. Smaller size, recommended for production. -- `json` - Human-readable JSON format. Larger size, useful for debugging. ### `strictMode` Type: `boolean | null` Default: `null` diff --git a/package.json b/package.json index 2519534eb..3c29944bc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "javascript-obfuscator", - "version": "5.3.0", + "version": "5.4.2", "description": "JavaScript obfuscator", "keywords": [ "obfuscator", @@ -21,27 +21,26 @@ }, "types": "typings/index.d.ts", "dependencies": { - "@javascript-obfuscator/escodegen": "2.3.1", + "@javascript-obfuscator/escodegen": "2.4.1", "@javascript-obfuscator/estraverse": "5.4.0", "@vercel/blob": ">=0.23.0", "acorn": "8.15.0", + "acorn-import-attributes": "^1.9.5", "assert": "2.1.0", "chalk": "4.1.2", "chance": "1.1.13", "class-validator": "0.14.3", "commander": "12.1.0", - "conf": "15.0.2", + "env-paths": "4.0.0", "eslint-scope": "8.4.0", "eslint-visitor-keys": "4.2.1", "fast-deep-equal": "3.1.3", "inversify": "6.1.4", "js-string-escape": "1.0.1", "md5": "2.3.0", - "mkdirp": "3.0.1", "multimatch": "5.0.0", "process": "0.11.10", "reflect-metadata": "0.2.2", - "source-map-support": "0.5.21", "string-template": "1.0.0", "stringz": "2.1.0", "tslib": "2.8.1" @@ -58,7 +57,6 @@ "@types/js-beautify": "1.14.3", "@types/js-string-escape": "1.0.3", "@types/md5": "2.3.6", - "@types/mkdirp": "1.0.2", "@types/mocha": "10.0.10", "@types/multimatch": "4.0.0", "@types/node": "22.10.2", @@ -86,11 +84,13 @@ "js-beautify": "1.15.4", "mocha": "11.7.4", "nyc": "17.1.0", + "parse5": "^8.0.0", "pjson": "1.0.9", "prettier": "3.6.2", "rimraf": "6.0.1", "sinon": "19.0.2", "source-map-resolve": "0.6.0", + "source-map-support": "0.5.21", "terser": "5.44.0", "threads": "1.7.0", "ts-loader": "9.5.4", diff --git a/src/ASTParserFacade.ts b/src/ASTParserFacade.ts index 8e3c27bfb..ade6007c4 100644 --- a/src/ASTParserFacade.ts +++ b/src/ASTParserFacade.ts @@ -1,6 +1,9 @@ import * as acorn from 'acorn'; import * as ESTree from 'estree'; import chalk, { Chalk } from 'chalk'; +import { importAttributesOrAssertions } from 'acorn-import-attributes'; + +const AcornParser = acorn.Parser.extend(importAttributesOrAssertions); /** * Facade over AST parser `acorn` @@ -67,7 +70,7 @@ export class ASTParserFacade { sourceType }; - const program: acorn.Node & ESTree.Program = acorn.parse(sourceCode, config); + const program: acorn.Node & ESTree.Program = AcornParser.parse(sourceCode, config); if (comments.length) { program.comments = comments; diff --git a/src/analyzers/scope-analyzer/ScopeAnalyzer.ts b/src/analyzers/scope-analyzer/ScopeAnalyzer.ts index b4001cf6d..1c001e376 100644 --- a/src/analyzers/scope-analyzer/ScopeAnalyzer.ts +++ b/src/analyzers/scope-analyzer/ScopeAnalyzer.ts @@ -238,7 +238,11 @@ export class ScopeAnalyzer implements IScopeAnalyzer { (definition: eslintScope.Definition) => definition.type === 'ClassName' ); - return isValidClassNameVariable && variable.name === classNameVariable.name; + const isImportBinding: boolean = variable.defs.some( + (definition: eslintScope.Definition) => definition.type === 'ImportBinding' + ); + + return isValidClassNameVariable && variable.name === classNameVariable.name && !isImportBinding; } ); diff --git a/src/cli/JavaScriptObfuscatorCLI.ts b/src/cli/JavaScriptObfuscatorCLI.ts index 99b16d53a..95eb5b78d 100644 --- a/src/cli/JavaScriptObfuscatorCLI.ts +++ b/src/cli/JavaScriptObfuscatorCLI.ts @@ -4,6 +4,7 @@ import * as path from 'path'; import { TInputCLIOptions } from '../types/options/TInputCLIOptions'; import { TInputOptions } from '../types/options/TInputOptions'; +import { TOptionsPreset } from '../types/options/TOptionsPreset'; import { IFileData } from '../interfaces/cli/IFileData'; import { IInitializable } from '../interfaces/IInitializable'; @@ -24,11 +25,10 @@ import { StringArrayEncoding } from '../enums/node-transformers/string-array-tra import { StringArrayIndexesType } from '../enums/node-transformers/string-array-transformers/StringArrayIndexesType'; import { StringArrayWrappersType } from '../enums/node-transformers/string-array-transformers/StringArrayWrappersType'; -import { DEFAULT_PRESET } from '../options/presets/Default'; - import { ArraySanitizer } from './sanitizers/ArraySanitizer'; import { BooleanSanitizer } from './sanitizers/BooleanSanitizer'; +import { Options } from '../options/Options'; import { CLIUtils } from './utils/CLIUtils'; import { IdentifierNamesCacheFileUtils } from './utils/IdentifierNamesCacheFileUtils'; import { JavaScriptObfuscator } from '../JavaScriptObfuscatorFacade'; @@ -112,26 +112,36 @@ export class JavaScriptObfuscatorCLI implements IInitializable { /** * @param {TInputCLIOptions} inputOptions + * @param {commander.Command} command * @returns {TInputOptions} */ - private static buildOptions(inputOptions: TInputCLIOptions): TInputOptions { - const inputCLIOptions: TInputOptions = JavaScriptObfuscatorCLI.filterOptions(inputOptions); + private static buildOptions(inputOptions: TInputCLIOptions, command: commander.Command): TInputOptions { + const inputCLIOptions: TInputOptions = JavaScriptObfuscatorCLI.filterOptions(inputOptions, command); const configFilePath: string | undefined = inputOptions.config; const configFileLocation: string = configFilePath ? path.resolve(configFilePath, '.') : ''; const configFileOptions: TInputOptions = configFileLocation ? CLIUtils.getUserConfig(configFileLocation) : {}; + const presetName: TOptionsPreset = + inputCLIOptions.optionsPreset ?? configFileOptions.optionsPreset ?? OptionsPreset.Default; + const presetOptions: TInputOptions = Options.getOptionsByPreset(presetName); + return { - ...DEFAULT_PRESET, + ...presetOptions, ...configFileOptions, ...inputCLIOptions }; } /** + * Filters out options that were not explicitly set by the user. + * Commander.js sets default values for all options, which would + * override preset values. Only user-provided options should be kept. + * * @param {TObject} options + * @param {commander.Command} command * @returns {TInputOptions} */ - private static filterOptions(options: TInputCLIOptions): TInputOptions { + private static filterOptions(options: TInputCLIOptions, command: commander.Command): TInputOptions { const filteredOptions: TInputOptions = {}; Object.keys(options).forEach((option: keyof TInputCLIOptions) => { @@ -139,6 +149,10 @@ export class JavaScriptObfuscatorCLI implements IInitializable { return; } + if (command.getOptionValueSource(String(option)) === 'default') { + return; + } + filteredOptions[option] = options[option]; }); @@ -152,7 +166,7 @@ export class JavaScriptObfuscatorCLI implements IInitializable { this.configureHelp(); this.inputPath = path.normalize(this.commands.args[0] || ''); - this.inputCLIOptions = JavaScriptObfuscatorCLI.buildOptions(this.commands.opts()); + this.inputCLIOptions = JavaScriptObfuscatorCLI.buildOptions(this.commands.opts(), this.commands); this.sourceCodeFileUtils = new SourceCodeFileUtils(this.inputPath, this.inputCLIOptions); this.obfuscatedCodeFileUtils = new ObfuscatedCodeFileUtils(this.inputPath, this.inputCLIOptions); this.identifierNamesCacheFileUtils = new IdentifierNamesCacheFileUtils( diff --git a/src/cli/utils/ObfuscatedCodeFileUtils.ts b/src/cli/utils/ObfuscatedCodeFileUtils.ts index da157c6a8..443f225d3 100644 --- a/src/cli/utils/ObfuscatedCodeFileUtils.ts +++ b/src/cli/utils/ObfuscatedCodeFileUtils.ts @@ -1,5 +1,4 @@ import * as fs from 'fs'; -import * as mkdirp from 'mkdirp'; import * as path from 'path'; import { TInputCLIOptions } from '../../types/options/TInputCLIOptions'; @@ -135,7 +134,7 @@ export class ObfuscatedCodeFileUtils { * @param {string} data */ public writeFile(outputPath: string, data: string): void { - mkdirp.sync(path.dirname(outputPath)); + fs.mkdirSync(path.dirname(outputPath), { recursive: true }); fs.writeFileSync(outputPath, data, { encoding: JavaScriptObfuscatorCLI.encoding diff --git a/src/constants/ReservedDomProperties.json b/src/constants/ReservedDomProperties.json index 1a3c53adc..633d7b921 100644 --- a/src/constants/ReservedDomProperties.json +++ b/src/constants/ReservedDomProperties.json @@ -107,6 +107,7 @@ "-webkit-box-pack", "-webkit-box-shadow", "-webkit-box-sizing", + "-webkit-clip-path", "-webkit-filter", "-webkit-flex", "-webkit-flex-basis", @@ -115,6 +116,7 @@ "-webkit-flex-grow", "-webkit-flex-shrink", "-webkit-flex-wrap", + "-webkit-font-feature-settings", "-webkit-justify-content", "-webkit-line-clamp", "-webkit-mask", @@ -131,6 +133,7 @@ "-webkit-perspective", "-webkit-perspective-origin", "-webkit-text-fill-color", + "-webkit-text-security", "-webkit-text-size-adjust", "-webkit-text-stroke", "-webkit-text-stroke-color", @@ -144,27 +147,6 @@ "-webkit-transition-property", "-webkit-transition-timing-function", "-webkit-user-select", - "0", - "1", - "10", - "11", - "12", - "13", - "14", - "15", - "16", - "17", - "18", - "19", - "2", - "20", - "3", - "4", - "5", - "6", - "7", - "8", - "9", "@@iterator", "ABORT_ERR", "ACTIVE", @@ -175,6 +157,7 @@ "ADDITION", "ALIASED_LINE_WIDTH_RANGE", "ALIASED_POINT_SIZE_RANGE", + "ALL", "ALLOW_KEYBOARD_INPUT", "ALLPASS", "ALPHA", @@ -206,24 +189,30 @@ "AnimationTimeline", "AnonXMLHttpRequest", "Any", + "AnyPermissions", "ApplicationCache", "ApplicationCacheErrorEvent", "Array", "ArrayBuffer", "ArrayType", + "AsyncDisposableStack", "Atomics", "Attr", "Audio", "AudioBuffer", "AudioBufferSourceNode", "AudioContext", + "AudioData", + "AudioDecoder", "AudioDestinationNode", + "AudioEncoder", "AudioListener", "AudioNode", "AudioParam", "AudioParamMap", "AudioProcessingEvent", "AudioScheduledSourceNode", + "AudioSinkInfo", "AudioStreamTrack", "AudioWorklet", "AudioWorkletNode", @@ -244,6 +233,7 @@ "BLEND_EQUATION_RGB", "BLEND_SRC_ALPHA", "BLEND_SRC_RGB", + "BLUE", "BLUE_BITS", "BLUR", "BOOL", @@ -285,6 +275,8 @@ "BluetoothUUID", "Boolean", "BroadcastChannel", + "BrowserCaptureMediaStreamTrack", + "BrowserInfo", "ByteLengthQueuingStrategy", "CAPTURING_PHASE", "CCW", @@ -320,11 +312,13 @@ "COMMENT_NODE", "COMPARE_REF_TO_TEXTURE", "COMPILE_STATUS", + "COMPLETION_STATUS_KHR", "COMPRESSED_RGBA_S3TC_DXT1_EXT", "COMPRESSED_RGBA_S3TC_DXT3_EXT", "COMPRESSED_RGBA_S3TC_DXT5_EXT", "COMPRESSED_RGB_S3TC_DXT1_EXT", "COMPRESSED_TEXTURE_FORMATS", + "COMPUTE", "CONDITION_SATISFIED", "CONFIGURATION_UNSUPPORTED", "CONNECTING", @@ -333,25 +327,37 @@ "CONSTRAINT_ERR", "CONTEXT_LOST_WEBGL", "CONTROL_MASK", + "COPY_DST", "COPY_READ_BUFFER", "COPY_READ_BUFFER_BINDING", + "COPY_SRC", "COPY_WRITE_BUFFER", "COPY_WRITE_BUFFER_BINDING", "COUNTER_STYLE_RULE", + "CSPViolationReportBody", "CSS", "CSS2Properties", "CSSAnimation", "CSSCharsetRule", "CSSConditionRule", + "CSSContainerRule", "CSSCounterStyleRule", "CSSFontFaceRule", "CSSFontFeatureValuesRule", + "CSSFontPaletteValuesRule", + "CSSFunctionDeclarations", + "CSSFunctionDescriptors", + "CSSFunctionRule", "CSSGroupingRule", "CSSImageValue", "CSSImportRule", "CSSKeyframeRule", "CSSKeyframesRule", "CSSKeywordValue", + "CSSLayerBlockRule", + "CSSLayerStatementRule", + "CSSMarginRule", + "CSSMathClamp", "CSSMathInvert", "CSSMathMax", "CSSMathMin", @@ -364,20 +370,28 @@ "CSSMozDocumentRule", "CSSNameSpaceRule", "CSSNamespaceRule", + "CSSNestedDeclarations", "CSSNumericArray", "CSSNumericValue", + "CSSPageDescriptors", "CSSPageRule", "CSSPerspective", + "CSSPositionTryDescriptors", + "CSSPositionTryRule", "CSSPositionValue", "CSSPrimitiveValue", + "CSSPropertyRule", "CSSRotate", "CSSRule", "CSSRuleList", "CSSScale", + "CSSScopeRule", "CSSSkew", "CSSSkewX", "CSSSkewY", + "CSSStartingStyleRule", "CSSStyleDeclaration", + "CSSStyleProperties", "CSSStyleRule", "CSSStyleSheet", "CSSStyleValue", @@ -394,6 +408,7 @@ "CSSVariableReferenceValue", "CSSVariablesDeclaration", "CSSVariablesRule", + "CSSViewTransitionRule", "CSSViewportRule", "CSS_ATTR", "CSS_CM", @@ -476,9 +491,12 @@ "CanvasGradient", "CanvasPattern", "CanvasRenderingContext2D", + "CaptureController", "CaretPosition", "ChannelMergerNode", "ChannelSplitterNode", + "ChapterInformation", + "CharacterBoundsUpdateEvent", "CharacterData", "ClientRect", "ClientRectList", @@ -486,7 +504,10 @@ "ClipboardEvent", "ClipboardItem", "CloseEvent", + "CloseWatcher", "Collator", + "ColorArray", + "ColorValue", "CommandEvent", "Comment", "CompileError", @@ -494,16 +515,26 @@ "CompressionStream", "Console", "ConstantSourceNode", + "ContentVisibilityAutoStateChangeEvent", + "ContextFilter", + "ContextType", "Controllers", "ConvolverNode", + "CookieChangeEvent", + "CookieStore", + "CookieStoreManager", "CountQueuingStrategy", "Counter", + "CreateMonitor", + "CreateType", "Credential", "CredentialsContainer", + "CropTarget", "Crypto", "CryptoKey", "CustomElementRegistry", "CustomEvent", + "CustomStateSet", "DATABASE_ERR", "DATA_CLONE_ERR", "DATA_ERR", @@ -994,24 +1025,33 @@ "DateTimeFormat", "DecompressionStream", "DelayNode", + "DelegatedInkTrailPresenter", "DeprecationReportBody", "DesktopNotification", "DesktopNotificationCenter", + "Details", "DeviceLightEvent", "DeviceMotionEvent", "DeviceMotionEventAcceleration", "DeviceMotionEventRotationRate", "DeviceOrientationEvent", + "DevicePosture", "DeviceProximityEvent", "DeviceStorage", "DeviceStorageChangeEvent", + "DigitalCredential", "Directory", "DisplayNames", + "DisposableStack", "Document", "DocumentFragment", + "DocumentPictureInPicture", + "DocumentPictureInPictureEvent", "DocumentTimeline", "DocumentType", "DragEvent", + "Duration", + "DurationFormat", "DynamicsCompressorNode", "E", "ELEMENT_ARRAY_BUFFER", @@ -1029,10 +1069,12 @@ "EQUALPOWER", "ERROR", "EXPONENTIAL_DISTANCE", - "exports", + "EditContext", "Element", "ElementInternals", "ElementQuery", + "EncodedAudioChunk", + "EncodedVideoChunk", "EnterPictureInPictureEvent", "Entity", "EntityReference", @@ -1040,10 +1082,18 @@ "ErrorEvent", "EvalError", "Event", + "EventCounts", "EventException", "EventSource", "EventTarget", + "Exception", + "ExtensionContext", + "ExtensionDisabledReason", + "ExtensionInfo", + "ExtensionInstallType", + "ExtensionType", "External", + "EyeDropper", "FASTEST", "FIDOSDK", "FILTER_ACCEPT", @@ -1069,6 +1119,7 @@ "FOCUS", "FONT_FACE_RULE", "FONT_FEATURE_VALUES_RULE", + "FRAGMENT", "FRAGMENT_SHADER", "FRAGMENT_SHADER_DERIVATIVE_HINT", "FRAGMENT_SHADER_DERIVATIVE_HINT_OES", @@ -1105,20 +1156,30 @@ "FederatedCredential", "Feed", "FeedEntry", + "Fence", + "FencedFrameConfig", + "FetchLaterResult", "File", "FileError", "FileList", "FileReader", "FileSystem", "FileSystemDirectoryEntry", + "FileSystemDirectoryHandle", "FileSystemDirectoryReader", "FileSystemEntry", "FileSystemFileEntry", + "FileSystemFileHandle", + "FileSystemHandle", + "FileSystemObserver", + "FileSystemWritableFileStream", "FinalizationRegistry", "FindInPage", + "Float16Array", "Float32Array", "Float64Array", "FocusEvent", + "FontData", "FontFace", "FontFaceSet", "FontFaceSetLoadEvent", @@ -1128,7 +1189,48 @@ "Function", "GENERATE_MIPMAP_HINT", "GEQUAL", + "GPU", + "GPUAdapter", + "GPUAdapterInfo", + "GPUBindGroup", + "GPUBindGroupLayout", + "GPUBuffer", + "GPUBufferUsage", + "GPUCanvasContext", + "GPUColorWrite", + "GPUCommandBuffer", + "GPUCommandEncoder", + "GPUCompilationInfo", + "GPUCompilationMessage", + "GPUComputePassEncoder", + "GPUComputePipeline", + "GPUDevice", + "GPUDeviceLostInfo", + "GPUError", + "GPUExternalTexture", + "GPUInternalError", + "GPUMapMode", + "GPUOutOfMemoryError", + "GPUPipelineError", + "GPUPipelineLayout", + "GPUQuerySet", + "GPUQueue", + "GPURenderBundle", + "GPURenderBundleEncoder", + "GPURenderPassEncoder", + "GPURenderPipeline", + "GPUSampler", + "GPUShaderModule", + "GPUShaderStage", + "GPUSupportedFeatures", + "GPUSupportedLimits", + "GPUTexture", + "GPUTextureUsage", + "GPUTextureView", + "GPUUncapturedErrorEvent", + "GPUValidationError", "GREATER", + "GREEN", "GREEN_BITS", "GainNode", "Gamepad", @@ -1143,7 +1245,9 @@ "GeolocationPosition", "GeolocationPositionError", "GestureEvent", + "GetInfo", "Global", + "GravitySensor", "Gyroscope", "HALF_FLOAT", "HAVE_CURRENT_DATA", @@ -1152,7 +1256,11 @@ "HAVE_METADATA", "HAVE_NOTHING", "HEADERS_RECEIVED", + "HID", + "HIDConnectionEvent", "HIDDEN", + "HIDDevice", + "HIDInputReportEvent", "HIERARCHY_REQUEST_ERR", "HIGHPASS", "HIGHSHELF", @@ -1186,6 +1294,7 @@ "HTMLDocument", "HTMLElement", "HTMLEmbedElement", + "HTMLFencedFrameElement", "HTMLFieldSetElement", "HTMLFontElement", "HTMLFormControlsCollection", @@ -1228,6 +1337,7 @@ "HTMLQuoteElement", "HTMLScriptElement", "HTMLSelectElement", + "HTMLSelectedContentElement", "HTMLShadowElement", "HTMLSlotElement", "HTMLSourceElement", @@ -1249,6 +1359,8 @@ "HTMLVideoElement", "HashChangeEvent", "Headers", + "Highlight", + "HighlightRegistry", "History", "Hz", "ICE_CHECKING", @@ -1270,6 +1382,7 @@ "IDBMutableFile", "IDBObjectStore", "IDBOpenDBRequest", + "IDBRecord", "IDBRequest", "IDBTransaction", "IDBVersionChangeEvent", @@ -1280,7 +1393,9 @@ "IMPORT_RULE", "INCR", "INCR_WRAP", + "INDEX", "INDEX_SIZE_ERR", + "INDIRECT", "INT", "INTERLEAVED_ATTRIBS", "INT_2_10_10_10_REV", @@ -1306,13 +1421,23 @@ "INVERSE_DISTANCE", "INVERT", "IceCandidate", + "IconInfo", + "IdentityCredential", + "IdentityCredentialError", + "IdentityProvider", "IdleDeadline", + "IdleDetector", "Image", "ImageBitmap", "ImageBitmapRenderingContext", "ImageCapture", "ImageData", + "ImageDataType", + "ImageDecoder", + "ImageTrack", + "ImageTrackList", "Infinity", + "Ink", "InputDeviceCapabilities", "InputDeviceInfo", "InputEvent", @@ -1320,10 +1445,13 @@ "InstallTrigger", "InstallTriggerImpl", "Instance", + "Instant", "Int16Array", "Int32Array", "Int8Array", + "IntegrityViolationReportBody", "Intent", + "InterestEvent", "InternalError", "IntersectionObserver", "IntersectionObserverEntry", @@ -1331,6 +1459,7 @@ "IsSearchProviderInstalled", "Iterator", "JSON", + "JSTag", "KEEP", "KEYDOWN", "KEYFRAMES_RULE", @@ -1371,7 +1500,12 @@ "LSParserFilter", "LUMINANCE", "LUMINANCE_ALPHA", + "LanguageCode", + "LanguageDetector", "LargestContentfulPaint", + "LaunchParams", + "LaunchQueue", + "LaunchType", "LayoutShift", "LayoutShiftAttribution", "LinearAccelerationSensor", @@ -1382,9 +1516,13 @@ "Location", "Lock", "LockManager", + "MAP_READ", + "MAP_WRITE", + "MARGIN_RULE", "MAX", "MAX_3D_TEXTURE_SIZE", "MAX_ARRAY_TEXTURE_LAYERS", + "MAX_CAPTURE_VISIBLE_TAB_CALLS_PER_SECOND", "MAX_CLIENT_WAIT_TIMEOUT_WEBGL", "MAX_COLOR_ATTACHMENTS", "MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS", @@ -1529,17 +1667,23 @@ "MediaSession", "MediaSettingsRange", "MediaSource", + "MediaSourceHandle", "MediaStream", "MediaStreamAudioDestinationNode", "MediaStreamAudioSourceNode", "MediaStreamEvent", "MediaStreamTrack", "MediaStreamTrackAudioSourceNode", + "MediaStreamTrackAudioStats", "MediaStreamTrackEvent", + "MediaStreamTrackGenerator", + "MediaStreamTrackProcessor", + "MediaStreamTrackVideoStats", "Memory", "MessageChannel", "MessageEvent", "MessagePort", + "MessageSender", "Methods", "MimeType", "MimeTypeArray", @@ -1641,6 +1785,8 @@ "MutationEvent", "MutationObserver", "MutationRecord", + "MutedInfo", + "MutedInfoReason", "NAMESPACE_ERR", "NAMESPACE_RULE", "NEAREST", @@ -1679,17 +1825,31 @@ "NUM_COMPRESSED_TEXTURE_FORMATS", "NaN", "NamedNodeMap", + "NavigateEvent", + "Navigation", + "NavigationActivation", + "NavigationCurrentEntryChangeEvent", + "NavigationDestination", + "NavigationHistoryEntry", + "NavigationPrecommitController", "NavigationPreloadManager", + "NavigationTransition", "Navigator", + "NavigatorLogin", + "NavigatorManagedData", + "NavigatorUAData", "NearbyLinks", "NetworkInformation", "Node", "NodeFilter", "NodeIterator", "NodeList", + "NotRestoredReasonDetails", + "NotRestoredReasons", "Notation", "Notification", "NotifyPaintEvent", + "Now", "Number", "NumberFormat", "OBJECT_TYPE", @@ -1708,13 +1868,20 @@ "ORDERED_NODE_ITERATOR_TYPE", "ORDERED_NODE_SNAPSHOT_TYPE", "OTHER_ERROR", + "OTPCredential", "OUT_OF_MEMORY", "Object", + "Observable", "OfflineAudioCompletionEvent", "OfflineAudioContext", "OfflineResourceList", "OffscreenCanvas", "OffscreenCanvasRenderingContext2D", + "OnClickData", + "OnInstalledReason", + "OnPerformanceWarningCategory", + "OnPerformanceWarningSeverity", + "OnRestartRequiredReason", "Option", "OrientationSensor", "OscillatorNode", @@ -1766,6 +1933,9 @@ "PREV_NO_DUPLICATE", "PROCESSING_INSTRUCTION_NODE", "PageChangeEvent", + "PageRevealEvent", + "PageSettings", + "PageSwapEvent", "PageTransitionEvent", "PaintRequest", "PaintRequestList", @@ -1783,6 +1953,7 @@ "PerformanceElementTiming", "PerformanceEntry", "PerformanceEventTiming", + "PerformanceLongAnimationFrameTiming", "PerformanceLongTaskTiming", "PerformanceMark", "PerformanceMeasure", @@ -1792,6 +1963,7 @@ "PerformanceObserverEntryList", "PerformancePaintTiming", "PerformanceResourceTiming", + "PerformanceScriptTiming", "PerformanceServerTiming", "PerformanceTiming", "PeriodicSyncManager", @@ -1799,13 +1971,24 @@ "PermissionStatus", "Permissions", "PhotoCapabilities", + "PictureInPictureEvent", "PictureInPictureWindow", + "PlainDate", + "PlainDateTime", + "PlainMonthDay", + "PlainTime", + "PlainYearMonth", + "PlatformArch", + "PlatformInfo", + "PlatformNaclArch", + "PlatformOs", "Plugin", "PluginArray", "PluralRules", "PointerEvent", "PopStateEvent", "PopupBlockedEvent", + "Port", "Presentation", "PresentationAvailability", "PresentationConnection", @@ -1814,22 +1997,28 @@ "PresentationConnectionList", "PresentationReceiver", "PresentationRequest", + "PressureObserver", + "PressureRecord", "ProcessingInstruction", + "Profiler", "ProgressEvent", "Promise", "PromiseRejectionEvent", "PropertyNodeList", + "ProtectedAudience", "Proxy", "PublicKeyCredential", "PushManager", "PushSubscription", "PushSubscriptionOptions", "Q", + "QUERY_RESOLVE", "QUERY_RESULT", "QUERY_RESULT_AVAILABLE", "QUOTA_ERR", "QUOTA_EXCEEDED_ERR", "QueryInterface", + "QuotaExceededError", "R11F_G11F_B10F", "R16F", "R16I", @@ -1842,6 +2031,7 @@ "R8UI", "R8_SNORM", "RASTERIZER_DISCARD", + "READ", "READ_BUFFER", "READ_FRAMEBUFFER", "READ_FRAMEBUFFER_BINDING", @@ -1871,6 +2061,7 @@ "RENDERING_INTENT_RELATIVE_COLORIMETRIC", "RENDERING_INTENT_SATURATION", "RENDERING_INTENT_UNKNOWN", + "RENDER_ATTACHMENT", "REPEAT", "REPLACE", "RG", @@ -1924,6 +2115,8 @@ "RTCDataChannel", "RTCDataChannelEvent", "RTCDtlsTransport", + "RTCEncodedAudioFrame", + "RTCEncodedVideoFrame", "RTCError", "RTCErrorEvent", "RTCIceCandidate", @@ -1932,6 +2125,7 @@ "RTCPeerConnectionIceErrorEvent", "RTCPeerConnectionIceEvent", "RTCRtpReceiver", + "RTCRtpScriptTransform", "RTCRtpSender", "RTCRtpTransceiver", "RTCSctpTransport", @@ -1942,7 +2136,11 @@ "Range", "RangeError", "RangeException", + "ReadableByteStreamController", "ReadableStream", + "ReadableStreamBYOBReader", + "ReadableStreamBYOBRequest", + "ReadableStreamDefaultController", "ReadableStreamDefaultReader", "RecordErrorEvent", "Rect", @@ -1956,10 +2154,12 @@ "ReportBody", "ReportingObserver", "Request", + "RequestUpdateCheckStatus", "ResizeObserver", "ResizeObserverEntry", "ResizeObserverSize", "Response", + "RestrictionTarget", "RuntimeError", "SAMPLER_2D", "SAMPLER_2D_ARRAY", @@ -2051,6 +2251,8 @@ "STENCIL_TEST", "STENCIL_VALUE_MASK", "STENCIL_WRITEMASK", + "STORAGE", + "STORAGE_BINDING", "STREAM_COPY", "STREAM_DRAW", "STREAM_READ", @@ -2253,6 +2455,7 @@ "SVG_FECOMPOSITE_OPERATOR_ARITHMETIC", "SVG_FECOMPOSITE_OPERATOR_ATOP", "SVG_FECOMPOSITE_OPERATOR_IN", + "SVG_FECOMPOSITE_OPERATOR_LIGHTER", "SVG_FECOMPOSITE_OPERATOR_OUT", "SVG_FECOMPOSITE_OPERATOR_OVER", "SVG_FECOMPOSITE_OPERATOR_UNKNOWN", @@ -2274,6 +2477,7 @@ "SVG_MARKERUNITS_USERSPACEONUSE", "SVG_MARKER_ORIENT_ANGLE", "SVG_MARKER_ORIENT_AUTO", + "SVG_MARKER_ORIENT_AUTO_START_REVERSE", "SVG_MARKER_ORIENT_UNKNOWN", "SVG_MASKTYPE_ALPHA", "SVG_MASKTYPE_LUMINANCE", @@ -2337,15 +2541,23 @@ "SYNC_STATUS", "SYNTAX_ERR", "SavedPages", + "Scheduler", + "Scheduling", "Screen", + "ScreenDetailed", + "ScreenDetails", "ScreenOrientation", "Script", "ScriptProcessorNode", "ScrollAreaEvent", + "ScrollTimeline", "SecurityPolicyViolationEvent", + "Segmenter", "Selection", "Sensor", "SensorErrorEvent", + "Serial", + "SerialPort", "ServiceWorker", "ServiceWorkerContainer", "ServiceWorkerRegistration", @@ -2353,10 +2565,25 @@ "Set", "ShadowRoot", "SharedArrayBuffer", + "SharedStorage", + "SharedStorageAppendMethod", + "SharedStorageClearMethod", + "SharedStorageDeleteMethod", + "SharedStorageModifierMethod", + "SharedStorageSetMethod", + "SharedStorageWorklet", "SharedWorker", + "SharingState", "SimpleGestureEvent", + "SnapEvent", "SourceBuffer", "SourceBufferList", + "SpeechGrammar", + "SpeechGrammarList", + "SpeechRecognition", + "SpeechRecognitionErrorEvent", + "SpeechRecognitionEvent", + "SpeechRecognitionPhrase", "SpeechSynthesis", "SpeechSynthesisErrorEvent", "SpeechSynthesisEvent", @@ -2366,6 +2593,8 @@ "StereoPannerNode", "StopIteration", "Storage", + "StorageBucket", + "StorageBucketManager", "StorageEvent", "StorageManager", "String", @@ -2375,10 +2604,17 @@ "StyleSheet", "StyleSheetList", "SubmitEvent", + "Subscriber", "SubtleCrypto", + "Summarizer", + "SuppressedError", + "SuspendError", + "Suspending", "Symbol", "SyncManager", "SyntaxError", + "TAB_ID_NONE", + "TAB_INDEX_NONE", "TEMPORARY", "TEXTPATH_METHODTYPE_ALIGN", "TEXTPATH_METHODTYPE_STRETCH", @@ -2423,6 +2659,7 @@ "TEXTURE_2D_ARRAY", "TEXTURE_3D", "TEXTURE_BASE_LEVEL", + "TEXTURE_BINDING", "TEXTURE_BINDING_2D", "TEXTURE_BINDING_2D_ARRAY", "TEXTURE_BINDING_3D", @@ -2475,27 +2712,40 @@ "TYPE_NAVIGATE", "TYPE_RELOAD", "TYPE_RESERVED", + "Tab", + "TabStatus", "Table", + "Tag", "TaskAttributionTiming", + "TaskController", + "TaskPriorityChangeEvent", + "TaskSignal", + "Temporal", "Text", "TextDecoder", "TextDecoderStream", "TextEncoder", "TextEncoderStream", "TextEvent", + "TextFormat", + "TextFormatUpdateEvent", "TextMetrics", "TextTrack", "TextTrackCue", "TextTrackCueList", "TextTrackList", + "TextUpdateEvent", "TimeEvent", "TimeRanges", + "ToggleEvent", "Touch", "TouchEvent", "TouchList", "TrackEvent", "TransformStream", + "TransformStreamDefaultController", "TransitionEvent", + "Translator", "TreeWalker", "TrustedHTML", "TrustedScript", @@ -2507,6 +2757,7 @@ "U2F", "UIEvent", "UNCACHED", + "UNIFORM", "UNIFORM_ARRAY_STRIDE", "UNIFORM_BLOCK_ACTIVE_UNIFORMS", "UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES", @@ -2565,6 +2816,7 @@ "UPDATEREADY", "URIError", "URL", + "URLPattern", "URLSearchParams", "URLUnencoded", "URL_MISMATCH_ERR", @@ -2586,6 +2838,8 @@ "Uint32Array", "Uint8Array", "Uint8ClampedArray", + "UpdateFilter", + "UpdatePropertyName", "UserActivation", "UserMessageHandler", "UserMessageHandlersNamespace", @@ -2597,6 +2851,7 @@ "VERSION", "VERSION_CHANGE", "VERSION_ERR", + "VERTEX", "VERTEX_ARRAY_BINDING", "VERTEX_ATTRIB_ARRAY_BUFFER_BINDING", "VERTEX_ATTRIB_ARRAY_DIVISOR", @@ -2625,14 +2880,30 @@ "VTTCue", "VTTRegion", "ValidityState", + "VideoColorSpace", + "VideoDecoder", + "VideoEncoder", + "VideoFrame", "VideoPlaybackQuality", "VideoStreamTrack", + "ViewTimeline", + "ViewTransition", + "ViewTransitionTypeSet", + "ViewType", + "Viewport", + "VirtualKeyboard", + "VirtualKeyboardGeometryChangeEvent", + "VisibilityStateEntry", "VisualViewport", "WAIT_FAILED", "WEBKIT_FILTER_RULE", "WEBKIT_KEYFRAMES_RULE", "WEBKIT_KEYFRAME_RULE", "WEBKIT_REGION_RULE", + "WGSLLanguageFeatures", + "WINDOW_ID_CURRENT", + "WINDOW_ID_NONE", + "WRITE", "WRONG_DOCUMENT_ERR", "WakeLock", "WakeLockSentinel", @@ -2647,6 +2918,7 @@ "WebGLBuffer", "WebGLContextEvent", "WebGLFramebuffer", + "WebGLObject", "WebGLProgram", "WebGLQuery", "WebGLRenderbuffer", @@ -2685,6 +2957,14 @@ "WebKitSourceBufferList", "WebKitTransitionEvent", "WebSocket", + "WebSocketError", + "WebSocketStream", + "WebTransport", + "WebTransportBidirectionalStream", + "WebTransportDatagramDuplexStream", + "WebTransportError", + "WebTransportReceiveStream", + "WebTransportSendStream", "WebkitAlignContent", "WebkitAlignItems", "WebkitAlignSelf", @@ -2716,6 +2996,7 @@ "WebkitBoxPack", "WebkitBoxShadow", "WebkitBoxSizing", + "WebkitClipPath", "WebkitFilter", "WebkitFlex", "WebkitFlexBasis", @@ -2724,6 +3005,7 @@ "WebkitFlexGrow", "WebkitFlexShrink", "WebkitFlexWrap", + "WebkitFontFeatureSettings", "WebkitJustifyContent", "WebkitLineClamp", "WebkitMask", @@ -2740,6 +3022,7 @@ "WebkitPerspective", "WebkitPerspectiveOrigin", "WebkitTextFillColor", + "WebkitTextSecurity", "WebkitTextSizeAdjust", "WebkitTextStroke", "WebkitTextStrokeColor", @@ -2755,9 +3038,14 @@ "WebkitUserSelect", "WheelEvent", "Window", + "WindowControlsOverlay", + "WindowControlsOverlayGeometryChangeEvent", + "WindowState", + "WindowType", "Worker", "Worklet", "WritableStream", + "WritableStreamDefaultController", "WritableStreamDefaultWriter", "XMLDocument", "XMLHttpRequest", @@ -2772,16 +3060,26 @@ "XPathExpression", "XPathNSResolver", "XPathResult", + "XRAnchor", + "XRAnchorSet", "XRBoundedReferenceSpace", + "XRCPUDepthInformation", + "XRCamera", "XRDOMOverlayState", + "XRDepthInformation", "XRFrame", + "XRHand", "XRHitTestResult", "XRHitTestSource", "XRInputSource", "XRInputSourceArray", "XRInputSourceEvent", "XRInputSourcesChangeEvent", + "XRJointPose", + "XRJointSpace", "XRLayer", + "XRLightEstimate", + "XRLightProbe", "XRPose", "XRRay", "XRReferenceSpace", @@ -2797,11 +3095,19 @@ "XRView", "XRViewerPose", "XRViewport", + "XRWebGLBinding", + "XRWebGLDepthInformation", "XRWebGLLayer", "XSLTProcessor", "ZERO", + "ZonedDateTime", + "ZoomSettings", + "ZoomSettingsMode", + "ZoomSettingsScope", "_XD0M_", "_YD0M_", + "__REACT_DEVTOOLS_GLOBAL_HOOK__", + "__brand", "__defineGetter__", "__defineSetter__", "__lookupGetter__", @@ -2814,14 +3120,18 @@ "abbr", "abort", "aborted", + "aboutConfigPrefs", "abs", "absolute", "acceleration", "accelerationIncludingGravity", "accelerator", + "accent-color", + "accentColor", "accept", "acceptCharset", "acceptNode", + "access", "accessKey", "accessKeyLabel", "accuracy", @@ -2831,6 +3141,8 @@ "actionURL", "actions", "activated", + "activation", + "activationStart", "active", "activeCues", "activeElement", @@ -2838,10 +3150,15 @@ "activeSourceCount", "activeTexture", "activeVRDisplays", + "activeViewTransition", + "activityLog", "actualBoundingBoxAscent", "actualBoundingBoxDescent", "actualBoundingBoxLeft", "actualBoundingBoxRight", + "adAuctionComponents", + "adAuctionHeaders", + "adapterInfo", "add", "addAll", "addBehavior", @@ -2867,6 +3184,7 @@ "addSearchEngine", "addSourceBuffer", "addStream", + "addTeardown", "addTextTrack", "addTrack", "addTransceiver", @@ -2878,11 +3196,17 @@ "addons", "address", "addressLine", + "addressModeU", + "addressModeV", + "addressModeW", + "adopt", "adoptNode", + "adoptedCallback", "adoptedStyleSheets", "adr", "advance", "after", + "alarms", "album", "alert", "algorithm", @@ -2897,6 +3221,7 @@ "alinkColor", "all", "allSettled", + "allocationSize", "allow", "allowFullscreen", "allowPaymentRequest", @@ -2905,6 +3230,9 @@ "allowedToPlay", "allowsFeature", "alpha", + "alphaMode", + "alphaToCoverageEnabled", + "alphabeticBaseline", "alt", "altGraphKey", "altHtml", @@ -2915,11 +3243,15 @@ "alternates", "altitude", "altitudeAccuracy", + "altitudeAngle", "amplitude", "ancestorOrigins", "anchor", + "anchorName", "anchorNode", "anchorOffset", + "anchorScope", + "anchorSpace", "anchors", "and", "angle", @@ -2927,11 +3259,13 @@ "angularVelocity", "animVal", "animate", + "animated", "animatedInstanceRoot", "animatedNormalizedPathSegList", "animatedPathSegList", "animatedPoints", "animation", + "animation-composition", "animation-delay", "animation-direction", "animation-duration", @@ -2940,6 +3274,7 @@ "animation-name", "animation-play-state", "animation-timing-function", + "animationComposition", "animationDelay", "animationDirection", "animationDuration", @@ -2951,6 +3286,7 @@ "animationTimingFunction", "animationsPaused", "anniversary", + "annotation", "antialias", "anticipatedRemoval", "any", @@ -2980,30 +3316,45 @@ "applyElement", "arc", "arcTo", + "arch", + "architecture", "archive", "areas", "arguments", + "ariaActiveDescendantElement", "ariaAtomic", "ariaAutoComplete", + "ariaBrailleLabel", + "ariaBrailleRoleDescription", "ariaBusy", "ariaChecked", "ariaColCount", "ariaColIndex", + "ariaColIndexText", "ariaColSpan", + "ariaControlsElements", "ariaCurrent", + "ariaDescribedByElements", "ariaDescription", + "ariaDetailsElements", "ariaDisabled", + "ariaErrorMessageElements", "ariaExpanded", + "ariaFlowToElements", "ariaHasPopup", "ariaHidden", + "ariaInvalid", "ariaKeyShortcuts", "ariaLabel", + "ariaLabelledByElements", "ariaLevel", "ariaLive", "ariaModal", "ariaMultiLine", "ariaMultiSelectable", + "ariaNotify", "ariaOrientation", + "ariaOwnsElements", "ariaPlaceholder", "ariaPosInSet", "ariaPressed", @@ -3013,6 +3364,7 @@ "ariaRoleDescription", "ariaRowCount", "ariaRowIndex", + "ariaRowIndexText", "ariaRowSpan", "ariaSelected", "ariaSetSize", @@ -3022,20 +3374,28 @@ "ariaValueNow", "ariaValueText", "arrayBuffer", + "arrayLayerCount", + "arrayStride", "artist", "artwork", "as", "asIntN", "asUintN", + "ascentOverride", "asin", "asinh", + "aspect", + "aspect-ratio", + "aspectRatio", "assert", "assign", "assignedElements", "assignedNodes", "assignedSlot", "async", + "asyncDispose", "asyncIterator", + "at", "atEnd", "atan", "atan2", @@ -3045,11 +3405,13 @@ "attachInternals", "attachShader", "attachShadow", + "attachedElements", "attachments", "attack", "attestationObject", "attrChange", "attrName", + "attributeChangedCallback", "attributeFilter", "attributeName", "attributeNamespace", @@ -3057,10 +3419,13 @@ "attributeStyleMap", "attributes", "attribution", + "attributionSrc", + "audioBitrateMode", "audioBitsPerSecond", "audioTracks", "audioWorklet", "authenticatedSignedWrites", + "authenticatorAttachment", "authenticatorData", "autoIncrement", "autobuffer", @@ -3076,14 +3441,19 @@ "availWidth", "availability", "available", + "averageLatency", "aversion", "ax", "axes", "axis", "ay", "azimuth", + "azimuthAngle", "b", "back", + "backdrop-filter", + "backdropFilter", + "backends", "backface-visibility", "backfaceVisibility", "background", @@ -3113,23 +3483,33 @@ "badInput", "badge", "balance", + "baseArrayLayer", "baseFrequencyX", "baseFrequencyY", "baseLatency", "baseLayer", + "baseMipLevel", "baseNode", "baseOffset", + "basePalette", "baseURI", "baseVal", + "baseline-source", "baselineShift", + "baselineSource", + "batchUpdate", "battery", "bday", "before", + "beginComputePass", "beginElement", "beginElementAt", + "beginOcclusionQuery", "beginPath", "beginQuery", + "beginRenderPass", "beginTransformFeedback", + "beginningOfPassWriteIndex", "behavior", "behaviorCookie", "behaviorPart", @@ -3149,11 +3529,15 @@ "bindBufferBase", "bindBufferRange", "bindFramebuffer", + "bindGroupLayouts", "bindRenderbuffer", "bindSampler", "bindTexture", "bindTransformFeedback", "bindVertexArray", + "binding", + "bitness", + "blend", "blendColor", "blendEquation", "blendEquationSeparate", @@ -3166,6 +3550,9 @@ "blockDirection", "blockSize", "blockedURI", + "blockedURL", + "blocking", + "blockingDuration", "blue", "bluetooth", "blur", @@ -3174,6 +3561,7 @@ "bold", "bookmarks", "booleanValue", + "boost", "border", "border-block", "border-block-color", @@ -3305,6 +3693,7 @@ "boundingClientRect", "boundingHeight", "boundingLeft", + "boundingRect", "boundingTop", "boundingWidth", "bounds", @@ -3315,6 +3704,8 @@ "boxDecorationBreak", "boxShadow", "boxSizing", + "brand", + "brands", "break-after", "break-before", "break-inside", @@ -3322,7 +3713,11 @@ "breakBefore", "breakInside", "broadcast", + "browser", "browserLanguage", + "browserSettings", + "browsingData", + "browsingTopics", "btoa", "bubbles", "buffer", @@ -3333,28 +3728,42 @@ "buffered", "bufferedAmount", "bufferedAmountLowThreshold", + "buffers", "buildID", "buildNumber", "button", "buttonID", "buttons", + "byobRequest", "byteLength", "byteOffset", + "bytes", + "bytesPerRow", "bytesWritten", "c", "cache", "caches", "call", "caller", + "camera", "canBeFormatted", "canBeMounted", "canBeShared", + "canConstructInDedicatedWorker", + "canGoBack", + "canGoForward", "canHaveChildren", "canHaveHTML", "canInsertDTMF", + "canIntercept", + "canLoadAdAuctionFencedFrame", + "canLoadOpaqueURL", "canMakePayment", + "canParse", "canPlayType", "canPresent", + "canShare", + "canTransition", "canTrickleIceCandidates", "cancel", "cancelAndHoldAtTime", @@ -3368,14 +3777,18 @@ "candidate", "canonicalUUID", "canvas", + "cap", "capabilities", "caption", "caption-side", "captionSide", + "captivePortal", "capture", "captureEvents", "captureStackTrace", "captureStream", + "captureTab", + "captureVisibleTab", "caret-color", "caretBidiLevel", "caretColor", @@ -3396,29 +3809,36 @@ "chain", "challenge", "changeType", + "changed", "changedTouches", "channel", "channelCount", "channelCountMode", "channelInterpretation", + "chapterInfo", "char", "charAt", "charCode", "charCodeAt", "charIndex", "charLength", + "characterBounds", + "characterBoundsRangeStart", "characterData", "characterDataOldValue", "characterSet", + "characterVariant", "characteristic", "charging", "chargingTime", "charset", "check", + "checkDCE", "checkEnclosure", "checkFramebufferStatus", "checkIntersection", "checkValidity", + "checkVisibility", "checked", "childElementCount", "childList", @@ -3436,6 +3856,7 @@ "clear", "clearAppBadge", "clearAttributes", + "clearBuffer", "clearBufferfi", "clearBufferfv", "clearBufferiv", @@ -3450,12 +3871,14 @@ "clearMarks", "clearMaxGCPauseAccumulator", "clearMeasures", + "clearOriginJoinedAdInterestGroups", "clearParameters", "clearRect", "clearResourceTimings", "clearShadow", "clearStencil", "clearTimeout", + "clearValue", "clearWatch", "click", "clickCount", @@ -3482,13 +3905,16 @@ "clipTop", "clipboard", "clipboardData", + "clonable", "clone", "cloneContents", "cloneNode", "cloneRange", "close", + "closeCode", "closePath", "closed", + "closedBy", "closest", "clz", "clz32", @@ -3498,22 +3924,31 @@ "codeBase", "codePointAt", "codeType", + "codedHeight", + "codedRect", + "codedWidth", "colSpan", "collapse", "collapseToEnd", "collapseToStart", "collapsed", "collect", + "collections", "colno", "color", "color-adjust", "color-interpolation", "color-interpolation-filters", + "color-scheme", "colorAdjust", + "colorAttachments", "colorDepth", + "colorFormats", "colorInterpolation", "colorInterpolationFilters", "colorMask", + "colorScheme", + "colorSpace", "colorType", "cols", "column-count", @@ -3537,11 +3972,16 @@ "columnWidth", "columns", "command", + "commandForElement", + "commands", "commit", + "commitLoadTime", "commitPreferences", "commitStyles", + "committed", "commonAncestorContainer", "compact", + "compare", "compareBoundaryPoints", "compareDocumentPosition", "compareEndPoints", @@ -3554,6 +3994,7 @@ "compileShader", "compileStreaming", "complete", + "completed", "component", "componentFromPoint", "composed", @@ -3565,58 +4006,92 @@ "compressedTexImage3D", "compressedTexSubImage2D", "compressedTexSubImage3D", + "compute", "computedStyleMap", "concat", "conditionText", "coneInnerAngle", "coneOuterAngle", "coneOuterGain", + "config", + "configURL", + "configurable", "configuration", "configurationName", "configurationValue", "configurations", + "configure", "confirm", "confirmComposition", "confirmSiteSpecificTrackingException", "confirmWebWideTrackingException", + "congestionControl", "connect", "connectEnd", + "connectNative", "connectShark", "connectStart", "connected", + "connectedCallback", + "connectedMoveCallback", "connection", + "connectionInfo", "connectionList", "connectionSpeed", "connectionState", "connections", "console", "consolidate", + "constants", "constraint", "constrictionActive", "construct", "constructor", "contactID", "contain", + "contain-intrinsic-block-size", + "contain-intrinsic-height", + "contain-intrinsic-inline-size", + "contain-intrinsic-size", + "contain-intrinsic-width", + "containIntrinsicBlockSize", + "containIntrinsicHeight", + "containIntrinsicInlineSize", + "containIntrinsicSize", + "containIntrinsicWidth", + "container", + "container-name", + "container-type", "containerId", "containerName", + "containerQuery", "containerSrc", "containerType", "contains", "containsNode", "content", + "content-visibility", "contentBoxSize", "contentDocument", "contentEditable", + "contentEncoding", "contentHint", "contentOverflow", "contentRect", "contentScriptType", "contentStyleType", "contentType", + "contentVisibility", "contentWindow", "context", + "contextId", + "contextIds", "contextMenu", + "contextMenus", + "contextType", + "contextTypes", "contextmenu", + "contextualIdentities", "continue", "continuePrimaryKey", "continuous", @@ -3633,12 +4108,20 @@ "convertToSpecifiedUnits", "cookie", "cookieEnabled", + "cookieStore", + "cookies", "coords", "copyBufferSubData", + "copyBufferToBuffer", + "copyBufferToTexture", + "copyExternalImageToTexture", "copyFromChannel", "copyTexImage2D", "copyTexSubImage2D", "copyTexSubImage3D", + "copyTextureToBuffer", + "copyTextureToTexture", + "copyTo", "copyToChannel", "copyWithin", "correspondingElement", @@ -3657,11 +4140,22 @@ "country", "cpuClass", "cpuSleepAllowed", + "cqb", + "cqh", + "cqi", + "cqmax", + "cqmin", + "cqw", "create", "createAnalyser", + "createAnchor", "createAnswer", "createAttribute", "createAttributeNS", + "createAuctionNonce", + "createBidirectionalStream", + "createBindGroup", + "createBindGroupLayout", "createBiquadFilter", "createBuffer", "createBufferSource", @@ -3670,7 +4164,11 @@ "createCaption", "createChannelMerger", "createChannelSplitter", + "createCommandEncoder", "createComment", + "createComputePipeline", + "createComputePipelineAsync", + "createConicGradient", "createConstantSource", "createContextualFragment", "createControlRange", @@ -3685,6 +4183,7 @@ "createDynamicsCompressor", "createElement", "createElementNS", + "createEncodedStreams", "createEntityReference", "createEvent", "createEventObject", @@ -3717,15 +4216,20 @@ "createPanner", "createPattern", "createPeriodicWave", + "createPipelineLayout", "createPolicy", "createPopup", "createProcessingInstruction", "createProgram", "createQuery", + "createQuerySet", "createRadialGradient", "createRange", "createRangeCollection", "createReader", + "createRenderBundleEncoder", + "createRenderPipeline", + "createRenderPipelineAsync", "createRenderbuffer", "createSVGAngle", "createSVGLength", @@ -3760,12 +4264,14 @@ "createScriptURL", "createSession", "createShader", + "createShaderModule", "createShadowRoot", "createStereoPanner", "createStyleSheet", "createTBody", "createTFoot", "createTHead", + "createTask", "createTextNode", "createTextRange", "createTexture", @@ -3773,10 +4279,17 @@ "createTouchList", "createTransformFeedback", "createTreeWalker", + "createUnidirectionalStream", "createVertexArray", + "createView", "createWaveShaper", + "createWorklet", + "createWritable", "creationTime", + "credentialless", "credentials", + "criticalCHRestart", + "cropTo", "crossOrigin", "crossOriginIsolated", "crypto", @@ -3790,13 +4303,17 @@ "ctrlLeft", "cues", "cullFace", + "cullMode", + "currentCSSZoom", "currentDirection", + "currentEntry", "currentLocalDescription", "currentNode", "currentPage", "currentRect", "currentRemoteDescription", "currentScale", + "currentScreen", "currentScript", "currentSrc", "currentState", @@ -3822,19 +4339,23 @@ "dataTransfer", "database", "databases", + "datagrams", "dataset", "dateTime", "db", "debug", "debuggerEnabled", + "declarativeNetRequest", "declare", "decode", "decodeAudioData", + "decodeQueueSize", "decodeURI", "decodeURIComponent", "decodedBodySize", "decoding", "decodingInfo", + "decreaseZoomLevel", "decrypt", "default", "defaultCharset", @@ -3843,6 +4364,7 @@ "defaultPlaybackRate", "defaultPolicy", "defaultPrevented", + "defaultQueue", "defaultRequest", "defaultSelected", "defaultStatus", @@ -3886,37 +4408,66 @@ "deleteTexture", "deleteTransformFeedback", "deleteVertexArray", + "deleted", "deliverChangeRecords", + "deliveredFrames", + "deliveredFramesDuration", "delivery", "deliveryInfo", "deliveryStatus", "deliveryTimestamp", + "deliveryType", "delta", "deltaMode", "deltaX", "deltaY", "deltaZ", "dependentLocality", + "deprecatedReplaceInURN", + "deprecatedRunAdAuctionEnforcesKAnonymity", + "deprecatedURNToURL", + "depthActive", + "depthBias", + "depthBiasClamp", + "depthBiasSlopeScale", + "depthClearValue", + "depthCompare", + "depthDataFormat", + "depthFailOp", "depthFar", "depthFunc", + "depthLoadOp", "depthMask", "depthNear", + "depthOrArrayLayers", "depthRange", + "depthReadOnly", + "depthStencil", + "depthStencilAttachment", + "depthStencilFormat", + "depthStoreOp", + "depthType", + "depthUsage", + "depthWriteEnabled", "deref", "deriveBits", "deriveKey", + "descentOverride", "description", "deselectAll", "designMode", "desiredSize", "destination", "destinationURL", + "destroy", "detach", "detachEvent", "detachShader", + "detached", "detail", "details", "detect", + "detectLanguage", "detune", "device", "deviceClass", @@ -3924,6 +4475,7 @@ "deviceMemory", "devicePixelContentBoxSize", "devicePixelRatio", + "devicePosture", "deviceProtocol", "deviceSubclass", "deviceVersionMajor", @@ -3931,9 +4483,13 @@ "deviceVersionSubminor", "deviceXDPI", "deviceYDPI", + "devtools", + "devtools_panels", "didTimeout", + "difference", "diffuseConstant", "digest", + "dimension", "dimensions", "dir", "dirName", @@ -3944,31 +4500,52 @@ "disableRemotePlayback", "disableVertexAttribArray", "disabled", + "discard", + "discardedFrames", "dischargingTime", "disconnect", "disconnectShark", + "disconnectedCallback", "dispatchEvent", + "dispatchWorkgroups", + "dispatchWorkgroupsIndirect", "display", + "displayHeight", "displayId", "displayName", + "displayWidth", + "dispose", + "disposeAsync", + "disposed", "disposition", "distanceModel", "div", "divisor", "djsapi", "djsproxy", + "dns", "doImport", "doNotTrack", "doScroll", "doctype", "document", "documentElement", + "documentId", + "documentIds", + "documentLifecycle", "documentMode", + "documentOrigin", + "documentOrigins", + "documentPictureInPicture", "documentURI", + "documentURL", + "documentUrl", + "documentUrls", "dolphin", "dolphinGameCenter", "dolphininfo", "dolphinmeta", + "dom", "domComplete", "domContentLoadedEventEnd", "domContentLoadedEventStart", @@ -3986,13 +4563,16 @@ "downDegrees", "downlink", "download", + "downloadRequest", "downloadTotal", "downloaded", + "downloads", "dpcm", "dpi", "dppx", "dragDrop", "draggable", + "draw", "drawArrays", "drawArraysInstanced", "drawArraysInstancedANGLE", @@ -4004,30 +4584,48 @@ "drawFocusIfNeeded", "drawImage", "drawImageFromRect", + "drawIndexed", + "drawIndexedIndirect", + "drawIndirect", "drawRangeElements", "drawSystemFocusRing", + "drawingBufferColorSpace", + "drawingBufferFormat", "drawingBufferHeight", + "drawingBufferStorage", "drawingBufferWidth", + "drop", "dropEffect", "droppedVideoFrames", "dropzone", + "dstFactor", "dtmf", "dump", "dumpProfile", + "duplex", "duplicate", "durability", "duration", + "dvb", + "dvh", + "dvi", + "dvmax", + "dvmin", "dvname", "dvnum", + "dvw", "dx", "dy", + "dynamicId", "dynsrc", "e", "edgeMode", + "editContext", "effect", "effectAllowed", "effectiveDirective", "effectiveType", + "effects", "elapsedTime", "element", "elementFromPoint", @@ -4037,8 +4635,11 @@ "elevation", "ellipse", "em", + "emHeightAscent", + "emHeightDescent", "email", "embeds", + "emit", "emma", "empty", "empty-cells", @@ -4052,9 +4653,11 @@ "enableStyleSheetsForSet", "enableVertexAttribArray", "enabled", + "enabledFeatures", "enabledPlugin", "encode", "encodeInto", + "encodeQueueSize", "encodeURI", "encodeURIComponent", "encodedBodySize", @@ -4066,6 +4669,8 @@ "endContainer", "endElement", "endElementAt", + "endOcclusionQuery", + "endOfPassWriteIndex", "endOfStream", "endOffset", "endQuery", @@ -4076,10 +4681,14 @@ "endpointNumber", "endpoints", "endsWith", + "enqueue", "enterKeyHint", "entities", "entries", + "entry", + "entryPoint", "entryType", + "enumerable", "enumerate", "enumerateDevices", "enumerateEditable", @@ -4094,7 +4703,9 @@ "eval", "evaluate", "event", + "eventCounts", "eventPhase", + "events", "every", "ex", "exception", @@ -4103,6 +4714,8 @@ "execCommand", "execCommandShowHelp", "execScript", + "executeBundles", + "executionStart", "exitFullscreen", "exitPictureInPicture", "exitPointerLock", @@ -4112,6 +4725,10 @@ "expandEntityReferences", "expando", "expansion", + "expectedContextLanguages", + "expectedImprovement", + "expectedInputLanguages", + "experiments", "expiration", "expirationTime", "expires", @@ -4121,18 +4738,24 @@ "exponent", "exponentialRampToValueAtTime", "exportKey", + "exports", "extend", + "extension", + "extensionTypes", "extensions", "extentNode", "extentOffset", "external", "externalResourcesRequired", + "externalTexture", "extractContents", "extractable", "eye", "f", + "f16round", "face", "factoryReset", + "failOp", "failureReason", "fallback", "family", @@ -4144,8 +4767,11 @@ "featurePolicy", "featureSettings", "features", + "fence", "fenceSync", "fetch", + "fetchLater", + "fetchPriority", "fetchStart", "fftSize", "fgColor", @@ -4163,8 +4789,10 @@ "fill", "fill-opacity", "fill-rule", + "fillJointRadii", "fillLightMode", "fillOpacity", + "fillPoses", "fillRect", "fillRule", "fillStyle", @@ -4174,18 +4802,28 @@ "filterResY", "filterUnits", "filters", + "finalResponseHeadersStart", "finally", "find", "findIndex", + "findLast", + "findLastIndex", "findRule", "findText", "finish", + "finishDocumentLoadTime", + "finishLoadTime", "finished", "fireEvent", "firesTouchEvents", + "first", "firstChild", "firstElementChild", + "firstInterimResponseStart", "firstPage", + "firstPaintAfterLoadTime", + "firstPaintTime", + "firstUIEventTimestamp", "fixed", "flags", "flat", @@ -4203,6 +4841,7 @@ "flexGrow", "flexShrink", "flexWrap", + "flip", "flipX", "flipY", "float", @@ -4223,11 +4862,16 @@ "font-kerning", "font-language-override", "font-optical-sizing", + "font-palette", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-synthesis", + "font-synthesis-position", + "font-synthesis-small-caps", + "font-synthesis-style", + "font-synthesis-weight", "font-variant", "font-variant-alternates", "font-variant-caps", @@ -4237,21 +4881,29 @@ "font-variant-position", "font-variation-settings", "font-weight", + "fontBoundingBoxAscent", + "fontBoundingBoxDescent", "fontFamily", "fontFeatureSettings", "fontKerning", "fontLanguageOverride", "fontOpticalSizing", + "fontPalette", "fontSize", "fontSizeAdjust", "fontSmoothingEnabled", "fontStretch", "fontStyle", "fontSynthesis", + "fontSynthesisPosition", + "fontSynthesisSmallCaps", + "fontSynthesisStyle", + "fontSynthesisWeight", "fontVariant", "fontVariantAlternates", "fontVariantCaps", "fontVariantEastAsian", + "fontVariantEmoji", "fontVariantLigatures", "fontVariantNumeric", "fontVariantPosition", @@ -4264,7 +4916,12 @@ "for", "forEach", "force", + "forceFallbackAdapter", "forceRedraw", + "forced-color-adjust", + "forcedColorAdjust", + "forcedStyleAndLayoutDuration", + "forget", "form", "formAction", "formData", @@ -4276,15 +4933,20 @@ "formatToParts", "forms", "forward", + "forwardWheel", "forwardX", "forwardY", "forwardZ", "foundation", "fr", + "fragment", "fragmentDirective", "frame", "frameBorder", + "frameCount", "frameElement", + "frameId", + "frameIds", "frameSpacing", "framebuffer", "framebufferHeight", @@ -4298,31 +4960,39 @@ "frequency", "frequencyBinCount", "from", + "fromAsync", + "fromBase64", "fromCharCode", "fromCodePoint", "fromElement", "fromEntries", "fromFloat32Array", "fromFloat64Array", + "fromHex", "fromMatrix", "fromPoint", "fromQuad", "fromRect", "frontFace", "fround", + "fullName", "fullPath", + "fullRange", "fullScreen", + "fullVersionList", "fullscreen", "fullscreenElement", "fullscreenEnabled", "fx", "fy", + "g", "gain", "gamepad", "gamma", "gap", "gatheringState", "gatt", + "geckoProfiler", "genderIdentity", "generateCertificate", "generateKey", @@ -4331,6 +5001,7 @@ "geolocation", "gestureObject", "get", + "getAcceptLanguages", "getActiveAttrib", "getActiveUniform", "getActiveUniformBlockName", @@ -4339,10 +5010,12 @@ "getAdjacentText", "getAll", "getAllKeys", + "getAllRecords", "getAllResponseHeaders", "getAllowlistForFeature", "getAnimations", "getAsFile", + "getAsFileSystemHandle", "getAsString", "getAttachedShaders", "getAttribLocation", @@ -4353,33 +5026,46 @@ "getAttributeNodeNS", "getAttributeType", "getAudioTracks", + "getAuthenticatorData", + "getAutoplayPolicy", "getAvailability", "getBBox", + "getBackgroundPage", + "getBadgeBackgroundColor", + "getBadgeText", + "getBadgeTextColor", "getBattery", "getBigInt64", "getBigUint64", + "getBindGroupLayout", "getBlob", "getBookmark", "getBoundingClientRect", "getBounds", "getBoxQuads", + "getBrowserInfo", "getBufferParameter", "getBufferSubData", "getByteFrequencyData", "getByteTimeDomainData", "getCSSCanvasContext", "getCTM", + "getCameraImage", "getCandidateWindowClientRect", "getCanonicalLocales", "getCapabilities", + "getCaptureHandle", "getChannelData", "getCharNumAtPosition", "getCharacteristic", "getCharacteristics", + "getClientCapabilities", "getClientExtensionResults", "getClientRect", "getClientRects", "getCoalescedEvents", + "getCompilationInfo", + "getComposedRanges", "getCompositionAlternatives", "getComputedStyle", "getComputedTextLength", @@ -4388,22 +5074,28 @@ "getConstraints", "getContext", "getContextAttributes", + "getContexts", "getContributingSources", "getCounterValue", "getCueAsHTML", "getCueById", + "getCurrent", "getCurrentPosition", + "getCurrentTexture", "getCurrentTime", "getData", "getDatabaseNames", "getDate", "getDay", "getDefaultComputedStyle", + "getDepthInMeters", + "getDepthInformation", "getDescriptor", "getDescriptors", "getDestinationInsertionPoints", "getDevices", "getDirectory", + "getDirectoryHandle", "getDisplayMedia", "getDistributedNodes", "getEditable", @@ -4422,10 +5114,13 @@ "getExtentOfChar", "getEyeParameters", "getFeature", + "getFiberRoots", "getFile", + "getFileHandle", "getFiles", "getFilesAndDirectories", "getFingerprints", + "getFloat16", "getFloat32", "getFloat64", "getFloatFrequencyData", @@ -4433,10 +5128,14 @@ "getFloatValue", "getFragDataLocation", "getFrameData", + "getFrameId", "getFramebufferAttachmentParameter", "getFrequencyResponse", "getFullYear", "getGamepads", + "getHTML", + "getHeaderExtensionsToNegotiate", + "getHighEntropyValues", "getHitTestResults", "getHitTestResultsForTransientInput", "getHours", @@ -4444,38 +5143,54 @@ "getIds", "getImageData", "getIndexedParameter", + "getInfo", + "getInnerHTML", "getInstalledRelatedApps", "getInt16", "getInt32", "getInt8", + "getInterestGroupAdAuctionData", + "getInternalModuleRanges", "getInternalformatParameter", "getIntersectionList", "getItem", "getItems", + "getJointPose", "getKey", "getKeyframes", + "getLastFocused", "getLayers", "getLayoutMap", + "getLightEstimate", "getLineDash", "getLocalCandidates", "getLocalParameters", "getLocalStreams", + "getManagedConfiguration", + "getManifest", + "getMappedRange", "getMarks", "getMatchedCSSRules", "getMaxGCPauseSinceClear", "getMeasures", + "getMessage", "getMetadata", "getMilliseconds", "getMinutes", "getModifierState", "getMonth", + "getName", "getNamedItem", "getNamedItemNS", "getNativeFramebufferScaleFactor", + "getNegotiatedHeaderExtensions", + "getNestedConfigs", "getNotifications", "getNotifier", "getNumberOfChars", "getOffsetReferenceSpace", + "getOrInsert", + "getOrInsertComputed", "getOutputTimestamp", "getOverrideHistoryNavigationMode", "getOverrideStyle", @@ -4483,17 +5198,25 @@ "getOwnPropertyDescriptors", "getOwnPropertyNames", "getOwnPropertySymbols", + "getPackageDirectoryEntry", "getParameter", "getParameters", "getParent", + "getPathData", "getPathSegAtLength", + "getPathSegmentAtLength", + "getPermissionWarningsByManifest", "getPhotoCapabilities", "getPhotoSettings", + "getPlatformInfo", "getPointAtLength", + "getPopup", + "getPorts", "getPose", "getPredictedEvents", "getPreference", "getPreferenceDefault", + "getPreferredCanvasFormat", "getPresentationAttribute", "getPreventDefault", "getPrimaryService", @@ -4506,6 +5229,8 @@ "getPropertyType", "getPropertyValue", "getPrototypeOf", + "getPublicKey", + "getPublicKeyAlgorithm", "getQuery", "getQueryParameter", "getRGBColorValue", @@ -4514,6 +5239,7 @@ "getReader", "getReceivers", "getRectValue", + "getReflectionCubeMap", "getRegistration", "getRegistrations", "getRemoteCandidates", @@ -4528,16 +5254,20 @@ "getSVGDocument", "getSamplerParameter", "getScreenCTM", + "getScreenDetails", "getSeconds", "getSelectedCandidatePair", "getSelection", + "getSelf", "getSenders", "getService", + "getSetCookie", "getSettings", "getShaderInfoLog", "getShaderParameter", "getShaderPrecisionFormat", "getShaderSource", + "getSignals", "getSimpleDuration", "getSiteIcons", "getSources", @@ -4552,17 +5282,22 @@ "getStringValue", "getSubStringLength", "getSubscription", + "getSubscriptions", "getSupportedConstraints", "getSupportedExtensions", "getSupportedFormats", + "getSupportedZoomLevels", "getSyncParameter", "getSynchronizationSources", "getTags", "getTargetRanges", "getTexParameter", + "getTextFormats", "getTime", "getTimezoneOffset", "getTiming", + "getTitle", + "getTitlebarAreaRect", "getTotalLength", "getTrackById", "getTracks", @@ -4573,6 +5308,8 @@ "getTransports", "getType", "getTypeMapping", + "getUILanguage", + "getURL", "getUTCDate", "getUTCDay", "getUTCFullYear", @@ -4588,7 +5325,9 @@ "getUniformBlockIndex", "getUniformIndices", "getUniformLocation", + "getUserInfo", "getUserMedia", + "getUserSettings", "getVRDisplays", "getValues", "getVarDate", @@ -4599,19 +5338,26 @@ "getVideoTracks", "getViewerPose", "getViewport", + "getViews", "getVoices", "getWakeLockState", "getWriter", "getYear", + "getZoom", + "getZoomSettings", "givenName", "global", "globalAlpha", "globalCompositeOperation", + "globalPrivacyControl", "globalThis", "glyphOrientationHorizontal", "glyphOrientationVertical", "glyphRef", "go", + "goBack", + "goForward", + "gpu", "grabFrame", "grad", "gradientTransform", @@ -4655,12 +5401,19 @@ "gridTemplateRows", "gripSpace", "group", + "groupBy", "groupCollapsed", "groupEnd", "groupId", + "groups", + "grow", + "growable", + "guestProcessId", + "guestRenderFrameRoutingId", "hadRecentInput", "hand", "handedness", + "hangingBaseline", "hapticActuators", "hardwareConcurrency", "has", @@ -4670,30 +5423,45 @@ "hasBeenActive", "hasChildNodes", "hasComposition", + "hasDynamicOffset", "hasEnrolledInstrument", "hasExtension", "hasExternalDisplay", "hasFeature", "hasFocus", + "hasIndices", "hasInstance", "hasLayout", "hasOrientation", + "hasOwn", "hasOwnProperty", "hasPointerCapture", "hasPosition", + "hasPrivateToken", "hasReading", + "hasRedemptionRecord", + "hasRegExpGroups", "hasStorageAccess", + "hasUAVisualTransition", + "hasUnpartitionedCookieAccess", "hash", + "hashChange", "head", "headers", "heading", "height", + "hid", "hidden", "hide", "hideFocus", + "hidePopover", "high", "highWaterMark", + "highlight", + "highlights", + "highlightsFromPoint", "hint", + "hints", "history", "honorificPrefix", "honorificSuffix", @@ -4711,8 +5479,13 @@ "httpEquiv", "httpRequestStatusCode", "hwTimestamp", + "hyphenate-character", + "hyphenateCharacter", + "hyphenateLimitChars", "hyphens", "hypot", + "i18n", + "ic", "iccId", "iceConnectionState", "iceGatheringState", @@ -4722,10 +5495,13 @@ "id", "identifier", "identity", + "ideographicBaseline", + "idle", "idpLoginUrl", "ignoreBOM", "ignoreCase", "ignoreDepthValues", + "image", "image-orientation", "image-rendering", "imageHeight", @@ -4740,6 +5516,7 @@ "ime-mode", "imeMode", "implementation", + "importExternalTexture", "importKey", "importNode", "importStylesheet", @@ -4750,8 +5527,15 @@ "in1", "in2", "inBandMetadataTrackDispatchType", + "inIncognitoContext", "inRange", "includes", + "incognito", + "incomingBidirectionalStreams", + "incomingHighWaterMark", + "incomingMaxAge", + "incomingUnidirectionalStreams", + "increaseZoomLevel", "incremental", "indeterminate", "index", @@ -4759,9 +5543,12 @@ "indexOf", "indexedDB", "indicate", + "indices", + "inert", "inertiaDestinationX", "inertiaDestinationY", "info", + "inherits", "init", "initAnimationEvent", "initBeforeLoadEvent", @@ -4808,8 +5595,11 @@ "initWebKitWheelEvent", "initWheelEvent", "initialTime", + "initialValue", "initialize", "initiatorType", + "inject", + "ink", "inline-size", "inlineSize", "inlineVerticalFieldOfView", @@ -4823,6 +5613,7 @@ "inputEncoding", "inputMethod", "inputMode", + "inputQuota", "inputSource", "inputSources", "inputType", @@ -4834,6 +5625,7 @@ "insertCell", "insertDTMF", "insertData", + "insertDebugMarker", "insertItemBefore", "insertNode", "insertRow", @@ -4851,6 +5643,8 @@ "insetInline", "insetInlineEnd", "insetInlineStart", + "inspect", + "install", "installing", "instanceRoot", "instantiate", @@ -4860,8 +5654,11 @@ "int32", "int8", "integrity", + "interactionCount", + "interactionId", "interactionMode", "intercept", + "interestForElement", "interfaceClass", "interfaceName", "interfaceNumber", @@ -4871,6 +5668,7 @@ "interimResults", "internalSubset", "interpretation", + "intersection", "intersectionRatio", "intersectionRect", "intersectsNode", @@ -4880,11 +5678,16 @@ "invalidateSubFramebuffer", "inverse", "invertSelf", + "invoker", + "invokerType", "is", "is2D", "isActive", + "isAllowedFileSchemeAccess", + "isAllowedIncognitoAccess", "isAlternate", "isArray", + "isAutoSelected", "isBingCurrentSearchDefault", "isBuffer", "isCandidateWindowVisible", @@ -4892,6 +5695,8 @@ "isCollapsed", "isComposing", "isConcatSpreadable", + "isConditionalMediationAvailable", + "isConfigSupported", "isConnected", "isContentEditable", "isContentHandlerRegistered", @@ -4899,13 +5704,18 @@ "isDefaultNamespace", "isDirectory", "isDisabled", + "isDisjointFrom", "isEnabled", "isEqual", "isEqualNode", + "isError", + "isExtended", "isExtensible", "isExternalCTAP2SecurityKeySupported", + "isFallbackAdapter", "isFile", "isFinite", + "isFirstPersonObserver", "isFramebuffer", "isFrozen", "isGenerator", @@ -4914,7 +5724,9 @@ "isId", "isIdentity", "isInjected", + "isInputPending", "isInteger", + "isInternal", "isIntersecting", "isLockFree", "isMap", @@ -4933,8 +5745,10 @@ "isProtocolHandlerRegistered", "isPrototypeOf", "isQuery", + "isRawJSON", "isRenderbuffer", "isSafeInteger", + "isSameEntry", "isSameNode", "isSampler", "isScript", @@ -4943,6 +5757,8 @@ "isSecureContext", "isSessionSupported", "isShader", + "isSubsetOf", + "isSupersetOf", "isSupported", "isSync", "isTextEdit", @@ -4954,6 +5770,7 @@ "isVertexArray", "isView", "isVisible", + "isWellFormed", "isochronousTransferIn", "isochronousTransferOut", "isolation", @@ -4970,8 +5787,11 @@ "iterationComposite", "iterator", "javaEnabled", + "jitterBufferTarget", "jobTitle", "join", + "joinAdInterestGroup", + "jointName", "json", "justify-content", "justify-items", @@ -5005,14 +5825,17 @@ "keytype", "kind", "knee", + "knownSources", "label", "labels", "lang", "language", "languages", "largeArcFlag", + "last", "lastChild", "lastElementChild", + "lastError", "lastEventId", "lastIndex", "lastIndexOf", @@ -5026,9 +5849,13 @@ "lastParen", "lastState", "lastStyleSheetSet", + "latency", "latitude", + "launchQueue", + "layerName", "layerX", "layerY", + "layout", "layoutFlow", "layoutGrid", "layoutGridChar", @@ -5036,6 +5863,7 @@ "layoutGridMode", "layoutGridType", "lbound", + "leaveAdInterestGroup", "left", "leftContext", "leftDegrees", @@ -5048,9 +5876,11 @@ "letter-spacing", "letterSpacing", "level", + "lh", "lighting-color", "lightingColor", "limitingConeAngle", + "limits", "line", "line-break", "line-height", @@ -5058,9 +5888,12 @@ "lineBreak", "lineCap", "lineDashOffset", + "lineGapOverride", "lineHeight", "lineJoin", + "lineNum", "lineNumber", + "linePos", "lineTo", "lineWidth", "linearAcceleration", @@ -5082,9 +5915,11 @@ "listStylePosition", "listStyleType", "listener", + "listeners", "load", "loadEventEnd", "loadEventStart", + "loadOp", "loadTime", "loadTimes", "loaded", @@ -5101,12 +5936,16 @@ "locked", "lockedFile", "locks", + "lodMaxClamp", + "lodMinClamp", "log", "log10", "log1p", "log2", "logicalXDPI", "logicalYDPI", + "login", + "loglevel", "longDesc", "longitude", "lookupNamespaceURI", @@ -5115,11 +5954,18 @@ "loopEnd", "loopStart", "looping", + "lost", "low", "lower", "lowerBound", "lowerOpen", "lowsrc", + "lvb", + "lvh", + "lvi", + "lvmax", + "lvmin", + "lvw", "m11", "m12", "m13", @@ -5136,11 +5982,17 @@ "m42", "m43", "m44", + "magFilter", "makeXRCompatible", + "managed", + "management", "manifest", "manufacturer", "manufacturerName", "map", + "mapAsync", + "mapState", + "mappedAtCreation", "mapping", "margin", "margin-block", @@ -5208,7 +6060,13 @@ "matchAll", "matchMedia", "matchMedium", + "matchPatterns", "matches", + "math-depth", + "math-style", + "mathDepth", + "mathShift", + "mathStyle", "matrix", "matrixTransform", "max", @@ -5218,23 +6076,59 @@ "max-width", "maxActions", "maxAlternatives", + "maxAnisotropy", + "maxBindGroups", + "maxBindGroupsPlusVertexBuffers", + "maxBindingsPerBindGroup", "maxBlockSize", + "maxBufferSize", + "maxByteLength", "maxChannelCount", "maxChannels", + "maxColorAttachmentBytesPerSample", + "maxColorAttachments", + "maxComputeInvocationsPerWorkgroup", + "maxComputeWorkgroupSizeX", + "maxComputeWorkgroupSizeY", + "maxComputeWorkgroupSizeZ", + "maxComputeWorkgroupStorageSize", + "maxComputeWorkgroupsPerDimension", "maxConnectionsPerServer", + "maxDatagramSize", "maxDecibels", "maxDistance", + "maxDrawCount", + "maxDynamicStorageBuffersPerPipelineLayout", + "maxDynamicUniformBuffersPerPipelineLayout", "maxHeight", "maxInlineSize", + "maxInterStageShaderComponents", + "maxInterStageShaderVariables", "maxLayers", "maxLength", "maxMessageSize", "maxPacketLifeTime", "maxRetransmits", + "maxSampledTexturesPerShaderStage", + "maxSamplersPerShaderStage", + "maxStorageBufferBindingSize", + "maxStorageBuffersPerShaderStage", + "maxStorageTexturesPerShaderStage", + "maxTextureArrayLayers", + "maxTextureDimension1D", + "maxTextureDimension2D", + "maxTextureDimension3D", "maxTouchPoints", + "maxUniformBufferBindingSize", + "maxUniformBuffersPerShaderStage", "maxValue", + "maxVertexAttributes", + "maxVertexBufferArrayStride", + "maxVertexBuffers", "maxWidth", + "maximumLatency", "measure", + "measureInputUsage", "measureText", "media", "mediaCapabilities", @@ -5248,11 +6142,15 @@ "meetOrSlice", "memory", "menubar", + "menus", + "menusChild", + "menusInternal", "mergeAttributes", "message", "messageClass", "messageHandlers", "messageType", + "messages", "metaKey", "metadata", "method", @@ -5266,21 +6164,33 @@ "min-height", "min-inline-size", "min-width", + "minBindingSize", "minBlockSize", "minDecibels", + "minFilter", "minHeight", "minInlineSize", "minLength", + "minStorageBufferOffsetAlignment", + "minUniformBufferOffsetAlignment", "minValue", "minWidth", + "minimumLatency", + "mipLevel", + "mipLevelCount", + "mipmapFilter", "miterLimit", "mix-blend-mode", "mixBlendMode", "mm", + "mobile", "mode", + "model", "modify", + "module", "mount", "move", + "moveBefore", "moveBy", "moveEnd", "moveFirst", @@ -5288,6 +6198,7 @@ "moveFocusLeft", "moveFocusRight", "moveFocusUp", + "moveInSuccession", "moveNext", "moveRow", "moveStart", @@ -5529,16 +6440,25 @@ "multiple", "multiply", "multiplySelf", + "multisample", + "multisampled", "mutableFile", "muted", "n", + "nacl_arch", "name", + "nameList", "nameProp", "namedItem", "namedRecordset", "names", "namespaceURI", "namespaces", + "nativeApplication", + "nativeMap", + "nativeObjectCreate", + "nativeSet", + "nativeWeakMap", "naturalHeight", "naturalWidth", "navigate", @@ -5546,6 +6466,7 @@ "navigationMode", "navigationPreload", "navigationStart", + "navigationType", "navigator", "near", "nearestViewportElement", @@ -5553,7 +6474,9 @@ "negotiated", "netscape", "networkState", + "networkStatus", "newScale", + "newState", "newTranslate", "newURL", "newValue", @@ -5578,19 +6501,25 @@ "nodeType", "nodeValue", "nonce", + "normDepthBufferFromNormView", "normalize", "normalizedPathSegList", + "normandyAddonStudy", + "notRestoredReasons", "notationName", "notations", "note", "noteGrainOn", "noteOff", "noteOn", + "notifications", "notify", "now", + "npnNegotiatedProtocol", "numOctaves", "number", "numberOfChannels", + "numberOfFrames", "numberOfInputs", "numberOfItems", "numberOfOutputs", @@ -5605,12 +6534,16 @@ "objectStoreNames", "objectType", "observe", + "observedAttributes", + "occlusionQuerySet", "of", + "off", "offscreenBuffering", "offset", "offset-anchor", "offset-distance", "offset-path", + "offset-position", "offset-rotate", "offsetAnchor", "offsetDistance", @@ -5619,17 +6552,58 @@ "offsetNode", "offsetParent", "offsetPath", + "offsetPosition", "offsetRotate", "offsetTop", "offsetWidth", "offsetX", "offsetY", "ok", + "oldState", "oldURL", "oldValue", "oldVersion", "olderShadowRoot", + "omnibox", + "on", + "onActivated", + "onAdded", + "onAttached", + "onBoundsChanged", + "onBrowserUpdateAvailable", + "onClicked", + "onCommitFiberRoot", + "onCommitFiberUnmount", + "onConnect", + "onConnectExternal", + "onConnectNative", + "onCreated", + "onDetached", + "onDisabled", + "onEnabled", + "onFocusChanged", + "onHighlighted", + "onInstalled", "onLine", + "onMessage", + "onMessageExternal", + "onMoved", + "onPerformanceWarning", + "onPostCommitFiberRoot", + "onRemoved", + "onReplaced", + "onRestartRequired", + "onStartup", + "onSubmittedWorkDone", + "onSuspend", + "onSuspendCanceled", + "onUninstalled", + "onUpdateAvailable", + "onUpdated", + "onUserScriptConnect", + "onUserScriptMessage", + "onUserSettingsChanged", + "onZoomChange", "onabort", "onabsolutedeviceorientation", "onactivate", @@ -5656,10 +6630,13 @@ "onbeforecut", "onbeforedeactivate", "onbeforeeditfocus", + "onbeforeinput", "onbeforeinstallprompt", + "onbeforematch", "onbeforepaste", "onbeforeprint", "onbeforescriptexecute", + "onbeforetoggle", "onbeforeunload", "onbeforeupdate", "onbeforexrselect", @@ -5676,9 +6653,11 @@ "oncandidatewindowupdate", "oncanplay", "oncanplaythrough", + "oncapturehandlechange", "once", "oncellchange", "onchange", + "oncharacterboundsupdate", "oncharacteristicvaluechanged", "onchargingchange", "onchargingtimechange", @@ -5686,17 +6665,25 @@ "onclick", "onclose", "onclosing", + "oncommand", "oncompassneedscalibration", "oncomplete", + "oncompositionend", + "oncompositionstart", "onconnect", "onconnecting", "onconnectionavailable", "onconnectionstatechange", + "oncontentvisibilityautostatechange", + "oncontextlost", "oncontextmenu", + "oncontextrestored", "oncontrollerchange", "oncontrolselect", "oncopy", "oncuechange", + "oncurrententrychange", + "oncurrentscreenchange", "oncut", "ondataavailable", "ondatachannel", @@ -5704,6 +6691,7 @@ "ondatasetcomplete", "ondblclick", "ondeactivate", + "ondequeue", "ondevicechange", "ondevicelight", "ondevicemotion", @@ -5713,7 +6701,9 @@ "ondischargingtimechange", "ondisconnect", "ondisplay", + "ondispose", "ondownloading", + "ondownloadprogress", "ondrag", "ondragend", "ondragenter", @@ -5732,6 +6722,7 @@ "onerror", "onerrorupdate", "onexit", + "onfencedtreeclick", "onfilterchange", "onfinish", "onfocus", @@ -5741,8 +6732,11 @@ "onfreeze", "onfullscreenchange", "onfullscreenerror", + "ongamepadconnected", + "ongamepaddisconnected", "ongatheringstatechange", "ongattserverdisconnected", + "ongeometrychange", "ongesturechange", "ongestureend", "ongesturestart", @@ -5755,6 +6749,7 @@ "onicegatheringstatechange", "oninactive", "oninput", + "oninputreport", "oninputsourceschange", "oninvalid", "onkeydown", @@ -5766,6 +6761,7 @@ "onleavepictureinpicture", "onlevelchange", "onload", + "onloadT", "onloadeddata", "onloadedmetadata", "onloadend", @@ -5776,6 +6772,7 @@ "onlosecapture", "onlostpointercapture", "only", + "onmanagedconfigurationchange", "onmark", "onmessage", "onmessageerror", @@ -5823,6 +6820,9 @@ "onmssitemodejumplistitemremoved", "onmsthumbnailclick", "onmute", + "onnavigate", + "onnavigateerror", + "onnavigatesuccess", "onnegotiationneeded", "onnomatch", "onnoupdate", @@ -5833,7 +6833,9 @@ "onorientationchange", "onpagechange", "onpagehide", + "onpagereveal", "onpageshow", + "onpageswap", "onpaste", "onpause", "onpayerdetailchange", @@ -5853,12 +6855,15 @@ "onpointerrawupdate", "onpointerup", "onpopstate", + "onprerenderingchange", + "onprioritychange", "onprocessorerror", "onprogress", "onpropertychange", "onratechange", "onreading", "onreadystatechange", + "onreflectionchange", "onrejectionhandled", "onrelease", "onremove", @@ -5877,7 +6882,11 @@ "onrowexit", "onrowsdelete", "onrowsinserted", + "onscreenschange", "onscroll", + "onscrollend", + "onscrollsnapchange", + "onscrollsnapchanging", "onsearch", "onsecuritypolicyviolation", "onseeked", @@ -5891,6 +6900,8 @@ "onshippingoptionchange", "onshow", "onsignalingstatechange", + "onsinkchange", + "onslotchange", "onsoundend", "onsoundstart", "onsourceclose", @@ -5912,7 +6923,9 @@ "onsuccess", "onsuspend", "onterminate", + "ontextformatupdate", "ontextinput", + "ontextupdate", "ontimeout", "ontimeupdate", "ontoggle", @@ -5926,6 +6939,7 @@ "ontransitionend", "ontransitionrun", "ontransitionstart", + "onuncapturederror", "onunhandledrejection", "onunload", "onunmute", @@ -5966,14 +6980,19 @@ "onwebkittransitionend", "onwheel", "onzoom", + "onzoomlevelchange", "opacity", "open", "openCursor", "openDatabase", "openKeyCursor", + "openOptionsPage", + "openOrClosedShadowRoot", + "openPopup", "opened", "opener", "opera", + "operation", "operationType", "operator", "opr", @@ -5994,14 +7013,19 @@ "orientationY", "orientationZ", "origin", + "originAgentCluster", "originalPolicy", "originalTarget", + "ornaments", "orphans", + "os", "oscpu", "outerHTML", "outerHeight", "outerText", "outerWidth", + "outgoingHighWaterMark", + "outgoingMaxAge", "outline", "outline-color", "outline-offset", @@ -6012,21 +7036,28 @@ "outlineStyle", "outlineWidth", "outputBuffer", + "outputChannelCount", + "outputLanguage", "outputLatency", "outputs", + "overallProgress", "overflow", "overflow-anchor", "overflow-block", + "overflow-clip-margin", "overflow-inline", "overflow-wrap", "overflow-x", "overflow-y", "overflowAnchor", "overflowBlock", + "overflowClipMargin", "overflowInline", "overflowWrap", "overflowX", "overflowY", + "overlaysContent", + "overrideColors", "overrideMimeType", "oversample", "overscroll-behavior", @@ -6080,11 +7111,15 @@ "page-break-after", "page-break-before", "page-break-inside", + "page-orientation", + "pageAction", "pageBreakAfter", "pageBreakBefore", "pageBreakInside", "pageCount", "pageLeft", + "pageOrientation", + "pageT", "pageTop", "pageX", "pageXOffset", @@ -6094,11 +7129,13 @@ "paint-order", "paintOrder", "paintRequests", + "paintTime", "paintType", "paintWorklet", "palette", "pan", "panningModel", + "parameterData", "parameters", "parent", "parentElement", @@ -6109,11 +7146,15 @@ "parentWindow", "parse", "parseAll", + "parseCreationOptionsFromJSON", "parseFloat", "parseFromString", + "parseHTMLUnsafe", "parseInt", + "parseRequestOptionsFromJSON", "part", "participants", + "passOp", "passive", "password", "pasteHTML", @@ -6130,6 +7171,8 @@ "patternUnits", "pause", "pauseAnimations", + "pauseDepthSensing", + "pauseDuration", "pauseOnExit", "pauseProfilers", "pauseTransformFeedback", @@ -6139,6 +7182,7 @@ "payerPhone", "paymentManager", "pc", + "pdfViewerEnabled", "peerIdentity", "pending", "pendingLocalDescription", @@ -6151,6 +7195,7 @@ "permissions", "persist", "persisted", + "persistentDeviceId", "personalbar", "perspective", "perspective-origin", @@ -6159,6 +7204,9 @@ "phoneticFamilyName", "phoneticGivenName", "photo", + "phrase", + "phrases", + "pictureInPictureChild", "pictureInPictureElement", "pictureInPictureEnabled", "pictureInPictureWindow", @@ -6168,6 +7216,7 @@ "pitch", "pixelBottom", "pixelDepth", + "pixelFormat", "pixelHeight", "pixelLeft", "pixelRight", @@ -6176,6 +7225,7 @@ "pixelUnitToMillimeterX", "pixelUnitToMillimeterY", "pixelWidth", + "pkcs11", "place-content", "place-items", "place-self", @@ -6184,6 +7234,7 @@ "placeSelf", "placeholder", "platform", + "platformVersion", "platforms", "play", "playEffect", @@ -6210,6 +7261,11 @@ "pointsAtZ", "polygonOffset", "pop", + "popDebugGroup", + "popErrorScope", + "popover", + "popoverTargetAction", + "popoverTargetElement", "populateMatrix", "popupWindowFeatures", "popupWindowName", @@ -6226,28 +7282,45 @@ "posWidth", "pose", "position", + "position-anchor", + "position-area", "positionAlign", + "positionAnchor", + "positionArea", + "positionTry", + "positionTryFallbacks", + "positionVisibility", "positionX", "positionY", "positionZ", "postError", "postMessage", + "postTask", "postalCode", "poster", + "postscriptName", "pow", "powerEfficient", "powerOff", + "powerPreference", "preMultiplySelf", "precision", + "preferredReflectionFormat", "preferredStyleSheetSet", "preferredStylesheetSet", "prefix", "preload", + "premultipliedAlpha", "prepend", + "prerendering", "presentation", + "presentationArea", + "presentationStyle", + "presentationTime", "preserveAlpha", "preserveAspectRatio", "preserveAspectRatioString", + "preservesPitch", "pressed", "pressure", "prevValue", @@ -6257,22 +7330,35 @@ "previousElementSibling", "previousNode", "previousPage", + "previousPriority", "previousRect", "previousScale", "previousSibling", "previousTranslate", + "primaries", "primaryKey", + "primaryLightDirection", + "primaryLightIntensity", + "primitive", "primitiveType", "primitiveUnits", "principals", "print", + "print-color-adjust", + "printColorAdjust", + "printPreview", "priority", + "privacy", "privateKey", + "privateToken", "probablySupportsContext", + "probeSpace", "process", "processIceMessage", + "processLocally", "processingEnd", "processingStart", + "processorOptions", "product", "productId", "productName", @@ -6282,14 +7368,17 @@ "profiles", "projectionMatrix", "promise", + "promising", "prompt", "properties", "propertyIsEnumerable", "propertyName", + "protectedAudience", "protocol", "protocolLong", "prototype", "provider", + "proxy", "pseudoClass", "pseudoElement", "pt", @@ -6298,6 +7387,8 @@ "published", "pulse", "push", + "pushDebugGroup", + "pushErrorScope", "pushManager", "pushNotification", "pushState", @@ -6314,9 +7405,15 @@ "queryCommandSupported", "queryCommandText", "queryCommandValue", + "queryFeatureSupport", + "queryLocalFonts", + "queryPermission", "querySelector", "querySelectorAll", + "querySet", + "queue", "queueMicrotask", + "quota", "quote", "quotes", "r", @@ -6325,21 +7422,29 @@ "race", "rad", "radiogroup", + "radius", "radiusX", "radiusY", "random", + "randomUUID", "range", "rangeCount", + "rangeEnd", "rangeMax", "rangeMin", "rangeOffset", "rangeOverflow", "rangeParent", + "rangeStart", "rangeUnderflow", "rate", "ratio", "raw", "rawId", + "rawJSON", + "rawValueToMeters", + "rcap", + "rch", "read", "readAsArrayBuffer", "readAsBinaryString", @@ -6357,11 +7462,14 @@ "ready", "readyState", "reason", + "reasons", "reboot", + "receiveFeatureReport", "receivedAlert", "receiver", "receivers", "recipient", + "recommendedViewportScale", "reconnect", "recordNumber", "recordsAvailable", @@ -6393,6 +7501,8 @@ "register", "registerContentHandler", "registerElement", + "registerInternalModuleStart", + "registerInternalModuleStop", "registerProperty", "registerProtocolHandler", "reject", @@ -6402,6 +7512,7 @@ "relatedNode", "relatedPort", "relatedTarget", + "relayProtocol", "release", "releaseCapture", "releaseEvents", @@ -6409,6 +7520,8 @@ "releaseLock", "releasePointerCapture", "releaseShaderCompiler", + "released", + "reliability", "reliable", "reliableWrite", "reload", @@ -6424,6 +7537,7 @@ "removeBehavior", "removeChild", "removeCue", + "removeEntry", "removeEventListener", "removeFilter", "removeImport", @@ -6446,16 +7560,21 @@ "removeWebWideTrackingException", "removed", "removedNodes", + "renderBlockingStatus", "renderHeight", + "renderStart", "renderState", "renderTime", "renderWidth", "renderbufferStorage", "renderbufferStorageMultisample", "renderedBuffer", + "rendererInterfaces", + "renderers", "renderingMode", "renotify", "repeat", + "repetitionCount", "replace", "replaceAdjacentText", "replaceAll", @@ -6470,10 +7589,17 @@ "replaceTrack", "replaceWholeText", "replaceWith", + "reportError", + "reportEvent", + "reportId", + "reportOnly", "reportValidity", "request", + "requestAdapter", + "requestAdapterInfo", "requestAnimationFrame", "requestAutocomplete", + "requestClose", "requestData", "requestDevice", "requestFrame", @@ -6482,62 +7608,89 @@ "requestHitTestSourceForTransientInput", "requestId", "requestIdleCallback", + "requestLightProbe", "requestMIDIAccess", "requestMediaKeySystemAccess", "requestPermission", "requestPictureInPicture", "requestPointerLock", + "requestPort", "requestPresent", + "requestPresenter", "requestReferenceSpace", "requestSession", "requestStart", "requestStorageAccess", + "requestStorageAccessFor", "requestSubmit", + "requestTime", + "requestUpdateCheck", "requestVideoFrameCallback", + "requestViewportScale", + "requestWindow", + "requested", "requestingWindow", "requireInteraction", "required", "requiredExtensions", "requiredFeatures", + "requiredLimits", "reset", + "resetLatency", "resetPose", "resetTransform", + "resetZoomLevel", + "resizable", "resize", "resizeBy", "resizeTo", "resolve", + "resolveQuerySet", + "resolveTarget", + "resource", + "respond", + "respondWithNewView", "response", "responseBody", "responseEnd", "responseReady", "responseStart", + "responseStatus", "responseText", "responseType", "responseURL", "responseXML", + "restart", + "restartAfterDelay", "restartIce", "restore", + "restrictTo", "result", "resultIndex", "resultType", "results", "resume", + "resumeDepthSensing", "resumeProfilers", "resumeTransformFeedback", "retry", + "returnType", "returnValue", "rev", "reverse", "reversed", "revocable", "revokeObjectURL", + "rex", "rgbColor", + "ric", "right", "rightContext", "rightDegrees", "rightMargin", "rightProjectionMatrix", "rightViewMatrix", + "rlh", "role", "rolloffFactor", "root", @@ -6554,11 +7707,13 @@ "rotationAngle", "rotationRate", "round", + "roundRect", "row-gap", "rowGap", "rowIndex", "rowSpan", "rows", + "rowsPerImage", "rtcpTransport", "rtt", "ruby-align", @@ -6567,19 +7722,27 @@ "rubyOverhang", "rubyPosition", "rules", + "run", + "runAdAuction", "runtime", "runtimeStyle", "rx", "ry", "s", "safari", + "sameDocument", "sample", + "sampleCount", "sampleCoverage", + "sampleInterval", "sampleRate", + "sampleType", + "sampler", "samplerParameterf", "samplerParameteri", "sandbox", "save", + "saveAsPDF", "saveData", "scale", "scale3d", @@ -6587,6 +7750,8 @@ "scaleNonUniform", "scaleNonUniformSelf", "scaleSelf", + "scheduler", + "scheduling", "scheme", "scissor", "scope", @@ -6598,10 +7763,13 @@ "screenLeft", "screenPixelToMillimeterX", "screenPixelToMillimeterY", + "screenState", "screenTop", "screenX", "screenY", + "screens", "scriptURL", + "scripting", "scripts", "scroll", "scroll-behavior", @@ -6628,6 +7796,7 @@ "scroll-padding-right", "scroll-padding-top", "scroll-snap-align", + "scroll-snap-stop", "scroll-snap-type", "scrollAmount", "scrollBehavior", @@ -6666,6 +7835,7 @@ "scrollPaddingTop", "scrollRestoration", "scrollSnapAlign", + "scrollSnapStop", "scrollSnapType", "scrollTo", "scrollTop", @@ -6674,6 +7844,7 @@ "scrollX", "scrollY", "scrollbar-color", + "scrollbar-gutter", "scrollbar-width", "scrollbar3dLightColor", "scrollbarArrowColor", @@ -6681,6 +7852,7 @@ "scrollbarColor", "scrollbarDarkShadowColor", "scrollbarFaceColor", + "scrollbarGutter", "scrollbarHighlightColor", "scrollbarShadowColor", "scrollbarTrackColor", @@ -6701,25 +7873,31 @@ "searchParams", "sectionRowIndex", "secureConnectionStart", + "securePaymentConfirmationAvailability", "security", "seed", + "seek", "seekToNextFrame", "seekable", "seeking", + "segments", "select", "selectAllChildren", "selectAlternateInterface", + "selectAudioOutput", "selectConfiguration", "selectNode", "selectNodeContents", "selectNodes", "selectSingleNode", "selectSubString", + "selectURL", "selected", "selectedIndex", "selectedOptions", "selectedStyleSheetSet", "selectedStylesheetSet", + "selectedTrack", "selection", "selectionDirection", "selectionEnd", @@ -6730,11 +7908,18 @@ "send", "sendAsBinary", "sendBeacon", + "sendFeatureReport", + "sendMessage", + "sendNativeMessage", + "sendOrder", + "sendReport", "sender", "sentAlert", "sentTimestamp", "separator", + "serial", "serialNumber", + "serializable", "serializeToString", "serverTiming", "service", @@ -6742,6 +7927,7 @@ "session", "sessionId", "sessionStorage", + "sessions", "set", "setActionHandler", "setActive", @@ -6751,35 +7937,54 @@ "setAttributeNS", "setAttributeNode", "setAttributeNodeNS", + "setAttributionReporting", + "setBadgeBackgroundColor", + "setBadgeText", + "setBadgeTextColor", "setBaseAndExtent", "setBigInt64", "setBigUint64", + "setBindGroup", "setBingCurrentSearchDefault", + "setBlendConstant", + "setCameraActive", "setCapture", + "setCaptureHandleConfig", "setCodecPreferences", "setColor", "setCompositeOperation", "setConfiguration", + "setConsumer", "setCurrentTime", "setCustomValidity", "setData", "setDate", "setDragImage", + "setEnabled", "setEnd", "setEndAfter", "setEndBefore", "setEndPoint", + "setExpires", "setFillColor", "setFilterRes", + "setFloat16", "setFloat32", "setFloat64", "setFloatValue", + "setFocusBehavior", "setFormValue", + "setFromBase64", + "setFromHex", "setFullYear", + "setHTMLUnsafe", + "setHeaderExtensionsToNegotiate", "setHeaderValue", "setHours", + "setIcon", "setIdentityProvider", "setImmediate", + "setIndexBuffer", "setInt16", "setInt32", "setInt8", @@ -6795,6 +8000,7 @@ "setMatrix", "setMatrixValue", "setMediaKeys", + "setMicrophoneActive", "setMilliseconds", "setMinutes", "setMiterLimit", @@ -6809,11 +8015,16 @@ "setPaint", "setParameter", "setParameters", + "setPathData", "setPeriodicWave", + "setPipeline", "setPointerCapture", + "setPopup", "setPosition", "setPositionState", "setPreference", + "setPriority", + "setPrivateToken", "setProperty", "setPrototypeOf", "setRGBColor", @@ -6821,23 +8032,30 @@ "setRadius", "setRangeText", "setRemoteDescription", + "setReportEventDataForAutomaticBeacons", "setRequestHeader", "setResizable", "setResourceTimingBufferSize", "setRotate", "setScale", + "setScissorRect", "setSeconds", "setSelectionRange", "setServerCertificate", "setShadow", + "setSharedStorageContext", + "setSignals", "setSinkId", "setSkewX", "setSkewY", "setStart", "setStartAfter", "setStartBefore", + "setStatus", "setStdDeviation", + "setStencilReference", "setStreams", + "setStrictMode", "setStringValue", "setStrokeColor", "setSuggestResult", @@ -6845,6 +8063,7 @@ "setTargetValueAtTime", "setTime", "setTimeout", + "setTitle", "setTransform", "setTranslate", "setUTCDate", @@ -6857,6 +8076,8 @@ "setUint16", "setUint32", "setUint8", + "setUninstallURL", + "setUpdateUrlData", "setUri", "setValidity", "setValueAtTime", @@ -6864,16 +8085,25 @@ "setVariable", "setVelocity", "setVersion", + "setVertexBuffer", + "setViewport", "setYear", + "setZoom", + "setZoomSettings", "settingName", "settingValue", "sex", + "shaderLocation", "shaderSource", "shadowBlur", "shadowColor", "shadowOffsetX", "shadowOffsetY", "shadowRoot", + "shadowRootClonable", + "shadowRootDelegatesFocus", + "shadowRootMode", + "shadowRootSerializable", "shape", "shape-image-threshold", "shape-margin", @@ -6883,6 +8113,10 @@ "shapeMargin", "shapeOutside", "shapeRendering", + "share", + "sharedContext", + "sharedStorage", + "sharedStorageWritable", "sheet", "shift", "shiftKey", @@ -6891,14 +8125,23 @@ "shippingOption", "shippingType", "show", + "showDirectoryPicker", "showHelp", "showModal", "showModalDialog", "showModelessDialog", "showNotification", + "showOpenFilePicker", + "showPicker", + "showPopover", + "showSaveFilePicker", "sidebar", + "sidebarAction", "sign", "signal", + "signalAllAcceptedCredentials", + "signalCurrentUserDetails", + "signalUnknownCredential", "signalingState", "signature", "silent", @@ -6908,6 +8151,7 @@ "sinkId", "sittingToStandingTransform", "size", + "sizeAdjust", "sizeToContent", "sizeX", "sizeZ", @@ -6916,13 +8160,18 @@ "skewXSelf", "skewY", "skewYSelf", + "skipTransition", + "skipped", "slice", "slope", "slot", + "slotAssignment", "small", "smil", "smooth", "smoothingTimeConstant", + "snapTargetBlock", + "snapTargetInline", "snapToLines", "snapshotItem", "snapshotLength", @@ -6933,8 +8182,14 @@ "sourceBuffer", "sourceBuffers", "sourceCapabilities", + "sourceCharPosition", + "sourceElement", "sourceFile", + "sourceFunctionName", "sourceIndex", + "sourceLanguage", + "sourceMap", + "sourceURL", "sources", "spacing", "span", @@ -6949,6 +8204,7 @@ "speed", "speedOfSound", "spellcheck", + "sphericalHarmonicsCoefficients", "splice", "split", "splitText", @@ -6956,6 +8212,7 @@ "sqrt", "src", "srcElement", + "srcFactor", "srcFilter", "srcObject", "srcUrn", @@ -6970,7 +8227,9 @@ "standby", "start", "startContainer", + "startE", "startIce", + "startLoadTime", "startMessages", "startNotifications", "startOffset", @@ -6978,8 +8237,11 @@ "startRendering", "startShark", "startTime", + "startViewTransition", "startsWith", "state", + "states", + "stats", "status", "statusCode", "statusMessage", @@ -6987,15 +8249,24 @@ "statusbar", "stdDeviationX", "stdDeviationY", + "stencilBack", + "stencilClearValue", + "stencilFront", "stencilFunc", "stencilFuncSeparate", + "stencilLoadOp", "stencilMask", "stencilMaskSeparate", "stencilOp", "stencilOpSeparate", + "stencilReadMask", + "stencilReadOnly", + "stencilStoreOp", + "stencilWriteMask", "step", "stepDown", "stepMismatch", + "stepMode", "stepUp", "sticky", "stitchTiles", @@ -7012,19 +8283,24 @@ "stopped", "storage", "storageArea", + "storageBuckets", "storageName", "storageStatus", + "storageTexture", "store", + "storeOp", "storeSiteSpecificTrackingException", "storeWebWideTrackingException", "stpVersion", "stream", + "streamErrorCode", "streams", "stretch", "strike", "string", "stringValue", "stringify", + "stripIndexFormat", "stroke", "stroke-dasharray", "stroke-dashoffset", @@ -7043,15 +8319,21 @@ "strokeStyle", "strokeText", "strokeWidth", + "structuredClone", "style", + "styleAndLayoutStart", "styleFloat", "styleMap", "styleMedia", "styleSheet", "styleSheetSets", "styleSheets", + "styleset", + "stylistic", "sub", "subarray", + "subgroupMaxSize", + "subgroupMinSize", "subject", "submit", "submitFrame", @@ -7064,22 +8346,39 @@ "subtree", "suffix", "suffixes", + "sumPrecise", + "summarize", + "summarizeStreaming", "summary", "sup", "supported", "supportedContentEncodings", "supportedEntryTypes", + "supportedValuesOf", "supports", + "supportsFiber", "supportsSession", + "supportsText", + "suppressed", "surfaceScale", "surroundContents", "suspend", "suspendRedraw", + "svb", + "svh", + "svi", + "svmax", + "svmin", + "svw", "swapCache", "swapNode", + "swash", "sweepFlag", + "switchMap", "symbols", + "symmetricDifference", "sync", + "syntax", "sysexEnabled", "system", "systemCode", @@ -7090,31 +8389,44 @@ "tBodies", "tFoot", "tHead", + "tab", + "tab-size", + "tabId", + "tabIds", "tabIndex", + "tabSize", "table", "table-layout", "tableLayout", "tableValues", + "tabs", "tag", "tagName", "tagUrn", "tags", "taintEnabled", + "take", "takePhoto", "takeRecords", + "takeUntil", "tan", "tangentialPressure", "tanh", "target", + "targetAddressSpace", "targetElement", + "targetLanguage", "targetRayMode", "targetRaySpace", "targetTouches", + "targetURL", "targetX", "targetY", + "targets", "tcpType", "tee", "tel", + "telemetry", "terminate", "test", "texImage2D", @@ -7149,6 +8461,9 @@ "text-transform", "text-underline-offset", "text-underline-position", + "text-wrap", + "text-wrap-mode", + "text-wrap-style", "textAlign", "textAlignLast", "textAnchor", @@ -7159,6 +8474,7 @@ "textDecoration", "textDecorationBlink", "textDecorationColor", + "textDecorationInset", "textDecorationLine", "textDecorationLineThrough", "textDecorationNone", @@ -7185,10 +8501,16 @@ "textTransform", "textUnderlineOffset", "textUnderlinePosition", + "textWrap", + "textWrapMode", + "textWrapStyle", + "texture", + "theme", "then", "threadId", "threshold", "thresholds", + "throwIfAborted", "tiltX", "tiltY", "time", @@ -7203,10 +8525,14 @@ "timeout", "timestamp", "timestampOffset", + "timestampWrites", "timing", "title", + "titlebarAreaRect", + "tlsChannelId", "to", "toArray", + "toBase64", "toBlob", "toDataURL", "toDateString", @@ -7216,6 +8542,7 @@ "toFloat32Array", "toFloat64Array", "toGMTString", + "toHex", "toISOString", "toJSON", "toLocaleDateString", @@ -7229,18 +8556,26 @@ "toMethod", "toPrecision", "toPrimitive", + "toReversed", "toSdp", + "toSorted", "toSource", + "toSpliced", "toStaticHTML", "toString", "toStringTag", "toSum", + "toTemporalInstant", "toTimeString", "toUTCString", "toUpperCase", + "toWellFormed", "toggle", "toggleAttribute", "toggleLongPressEnabled", + "togglePopover", + "toggleReaderMode", + "token", "tone", "toneBuffer", "tooLong", @@ -7248,8 +8583,12 @@ "toolbar", "top", "topMargin", + "topSites", + "topology", "total", "totalFrameDelay", + "totalFrames", + "totalFramesDuration", "totalVideoFrames", "touch-action", "touchAction", @@ -7258,15 +8597,20 @@ "trace", "track", "trackVisibility", + "trackedAnchors", + "tracks", + "tran", "transaction", "transactions", "transceiver", + "transfer", "transferControlToOffscreen", "transferFromImageBitmap", "transferImageBitmap", "transferIn", "transferOut", "transferSize", + "transferToFixedLength", "transferToImageBitmap", "transform", "transform-box", @@ -7281,19 +8625,23 @@ "transformToDocument", "transformToFragment", "transition", + "transition-behavior", "transition-delay", "transition-duration", "transition-property", "transition-timing-function", + "transitionBehavior", "transitionDelay", "transitionDuration", "transitionProperty", "transitionTimingFunction", "translate", "translateSelf", + "translateStreaming", "translationX", "translationY", "transport", + "traverseTo", "trim", "trimEnd", "trimLeft", @@ -7303,6 +8651,7 @@ "trunc", "truncate", "trustedTypes", + "try", "turn", "twist", "type", @@ -7316,13 +8665,20 @@ "uint32", "uint8", "uint8Clamped", + "unadjustedMovement", + "unclippedDepth", + "unconfigure", "undefined", + "underlineStyle", + "underlineThickness", "unescape", "uneval", + "ungroup", "unicode", "unicode-bidi", "unicodeBidi", "unicodeRange", + "unicodeSets", "uniform1f", "uniform1fv", "uniform1i", @@ -7357,6 +8713,8 @@ "uniformMatrix4fv", "uniformMatrix4x2fv", "uniformMatrix4x3fv", + "uninstallSelf", + "union", "unique", "uniqueID", "uniqueNumber", @@ -7366,8 +8724,10 @@ "unloadEventEnd", "unloadEventStart", "unlock", + "unmap", "unmount", "unobserve", + "unpackColorSpace", "unpause", "unpauseAnimations", "unreadCount", @@ -7387,12 +8747,23 @@ "upY", "upZ", "update", + "updateAdInterestGroups", + "updateCallbackDone", + "updateCharacterBounds", "updateCommands", + "updateControlBounds", + "updateCurrentEntry", "updateIce", + "updateInkTrailStartPoint", "updateInterval", "updatePlaybackRate", + "updateRangeEnd", + "updateRangeStart", "updateRenderState", + "updateSelection", + "updateSelectionBounds", "updateSettings", + "updateText", "updateTiming", "updateViaCache", "updateWith", @@ -7409,11 +8780,13 @@ "url", "urn", "urns", + "usage", "usages", "usb", "usbVersionMajor", "usbVersionMinor", "usbVersionSubminor", + "use", "useCurrentView", "useMap", "useProgram", @@ -7421,11 +8794,15 @@ "user-select", "userActivation", "userAgent", + "userAgentAllowsProtocol", + "userAgentData", "userChoice", "userHandle", "userHint", + "userInitiated", "userLanguage", "userSelect", + "userState", "userVisibleOnly", "username", "usernameFragment", @@ -7452,6 +8829,7 @@ "variable", "variant", "variationSettings", + "vb", "vector-effect", "vectorEffect", "velocityAngular", @@ -7463,6 +8841,7 @@ "vendorSub", "verify", "version", + "vertex", "vertexAttrib1f", "vertexAttrib1fv", "vertexAttrib2f", @@ -7484,6 +8863,7 @@ "verticalAlign", "verticalOverflow", "vh", + "vi", "vibrate", "vibrationActuator", "videoBitsPerSecond", @@ -7493,17 +8873,25 @@ "view", "viewBox", "viewBoxString", + "viewDimension", + "viewFormats", "viewTarget", "viewTargetString", + "viewTransition", + "viewTransitionClass", + "viewTransitionName", "viewport", "viewportAnchorX", "viewportAnchorY", "viewportElement", "views", "violatedDirective", + "virtualKeyboard", + "virtualKeyboardPolicy", "visibility", "visibilityState", "visible", + "visibleRect", "visualViewport", "vlinkColor", "vmax", @@ -7516,17 +8904,24 @@ "vw", "w", "wait", + "waitAsync", "waitSync", "waiting", "wake", "wakeLock", "wand", + "warmup", "warn", + "wasAlternateProtocolAvailable", "wasClean", "wasDiscarded", + "wasFetchedViaSpdy", + "wasNpnNegotiated", "watch", "watchAvailability", "watchPosition", + "webNavigation", + "webRequest", "webdriver", "webkitAddKey", "webkitAlignContent", @@ -7582,6 +8977,7 @@ "webkitCancelKeyRequest", "webkitCancelRequestAnimationFrame", "webkitClearResourceTimings", + "webkitClipPath", "webkitClosedCaptionsVisible", "webkitConvertPointFromNodeToPage", "webkitConvertPointFromPageToNode", @@ -7606,6 +9002,7 @@ "webkitFlexGrow", "webkitFlexShrink", "webkitFlexWrap", + "webkitFontFeatureSettings", "webkitFullScreenKeyboardInputAllowed", "webkitFullscreenElement", "webkitFullscreenEnabled", @@ -7689,6 +9086,7 @@ "webkitSupportsFullscreen", "webkitTemporaryStorage", "webkitTextFillColor", + "webkitTextSecurity", "webkitTextSizeAdjust", "webkitTextStroke", "webkitTextStrokeColor", @@ -7711,14 +9109,18 @@ "webkitdropzone", "webstore", "weight", + "wgslLanguageFeatures", "whatToShow", "wheelDelta", "wheelDeltaX", "wheelDeltaY", + "when", "whenDefined", "which", "white-space", + "white-space-collapse", "whiteSpace", + "whiteSpaceCollapse", "wholeText", "widows", "width", @@ -7726,25 +9128,45 @@ "willChange", "willValidate", "window", + "windowAttribution", + "windowControlsOverlay", + "windowId", + "windowIds", + "windows", + "with", "withCredentials", + "withResolvers", "word-break", "word-spacing", "word-wrap", "wordBreak", "wordSpacing", "wordWrap", + "workerCacheLookupStart", + "workerFinalSourceType", + "workerMatchedSourceType", + "workerRouterEvaluationStart", "workerStart", + "worklet", + "wow64", "wrap", "wrapKey", "writable", "writableAuxiliaries", "write", + "writeBuffer", + "writeMask", "writeText", + "writeTexture", + "writeTimestamp", "writeValue", + "writeValueWithResponse", + "writeValueWithoutResponse", "writeWithoutResponse", "writeln", "writing-mode", "writingMode", + "writingSuggestions", "x", "x1", "x2", @@ -7762,10 +9184,12 @@ "y2", "yChannelSelector", "yandex", + "yield", "z", "z-index", "zIndex", "zoom", "zoomAndPan", + "zoomLevel", "zoomRectScreen" -] \ No newline at end of file +] diff --git a/src/custom-code-helpers/string-array/templates/string-array-calls-wrapper/AtobTemplate.ts b/src/custom-code-helpers/string-array/templates/string-array-calls-wrapper/AtobTemplate.ts index 340d7b42a..f94a27569 100644 --- a/src/custom-code-helpers/string-array/templates/string-array-calls-wrapper/AtobTemplate.ts +++ b/src/custom-code-helpers/string-array/templates/string-array-calls-wrapper/AtobTemplate.ts @@ -12,8 +12,15 @@ export function AtobTemplate(selfDefending: boolean): string { let output = ''; let tempEncodedString = ''; - ${selfDefending ? 'let func = output + {atobFunctionName};' : ''} - + ${ + selfDefending + ? ` + let func = output + {atobFunctionName}; + let __ = ('' + function(){return 0;}).indexOf('\\n') !== -1; + ` + : '' + } + for ( let bc = 0, bs, buffer, idx = 0; buffer = input.charAt(idx++); @@ -21,7 +28,13 @@ export function AtobTemplate(selfDefending: boolean): string { ? output += ${((): string => { const basePart: string = 'String.fromCharCode(255 & bs >> (-2 * bc & 6))'; - return selfDefending ? `((func.charCodeAt(idx + 10) - 10 !== 0) ? ${basePart} : bc)` : basePart; + return selfDefending + ? ` + ((__ || func.charCodeAt(idx + 10) - 10 !== 0) + ? ${basePart} + : bc) + ` + : basePart; })()} : 0 ) { diff --git a/src/custom-code-helpers/string-array/templates/string-array-calls-wrapper/SelfDefendingTemplate.ts b/src/custom-code-helpers/string-array/templates/string-array-calls-wrapper/SelfDefendingTemplate.ts index def5c29e9..92abd981d 100644 --- a/src/custom-code-helpers/string-array/templates/string-array-calls-wrapper/SelfDefendingTemplate.ts +++ b/src/custom-code-helpers/string-array/templates/string-array-calls-wrapper/SelfDefendingTemplate.ts @@ -57,6 +57,8 @@ export function SelfDefendingTemplate( return ${rc4BytesIdentifier}(this.${statesIdentifier}[0]); }; - new StatesClass({stringArrayCallsWrapperName}).${checkStateIdentifier}(); + if (('' + function(){return 0;}).indexOf('\\n') === -1) { + new StatesClass({stringArrayCallsWrapperName}).${checkStateIdentifier}(); + } `; } diff --git a/src/declarations/acorn-import-attributes.d.ts b/src/declarations/acorn-import-attributes.d.ts new file mode 100644 index 000000000..76ea39ab9 --- /dev/null +++ b/src/declarations/acorn-import-attributes.d.ts @@ -0,0 +1,9 @@ +declare module 'acorn-import-attributes' { + import { Parser } from 'acorn'; + + type TParserExtension = (BaseParser: typeof Parser) => typeof Parser; + + export const importAttributes: TParserExtension; + export const importAssertions: TParserExtension; + export const importAttributesOrAssertions: TParserExtension; +} diff --git a/src/generators/identifier-names-generators/AbstractIdentifierNamesGenerator.ts b/src/generators/identifier-names-generators/AbstractIdentifierNamesGenerator.ts index a9655ad1f..329b7f414 100644 --- a/src/generators/identifier-names-generators/AbstractIdentifierNamesGenerator.ts +++ b/src/generators/identifier-names-generators/AbstractIdentifierNamesGenerator.ts @@ -11,6 +11,11 @@ import { NodeGuards } from '../../node/NodeGuards'; @injectable() export abstract class AbstractIdentifierNamesGenerator implements IIdentifierNamesGenerator { + /** + * @type {number} + */ + private static readonly maxGenerationAttempts: number = 10000; + /** * @type {IOptions} */ @@ -132,6 +137,19 @@ export abstract class AbstractIdentifierNamesGenerator implements IIdentifierNam return !this.allLexicalScopePreservedNames.has(name); } + /** + * @param {number} attempts + */ + protected checkGenerationAttempts(attempts: number): void { + if (attempts > AbstractIdentifierNamesGenerator.maxGenerationAttempts) { + throw new Error( + 'Unable to generate a valid identifier name. ' + + 'This is likely caused by `reservedNames` patterns that match all generated names. ' + + 'Please check your `reservedNames` option.' + ); + } + } + /** * @param {string} name * @returns {boolean} diff --git a/src/generators/identifier-names-generators/HexadecimalIdentifierNamesGenerator.ts b/src/generators/identifier-names-generators/HexadecimalIdentifierNamesGenerator.ts index 59df523e5..97020c724 100644 --- a/src/generators/identifier-names-generators/HexadecimalIdentifierNamesGenerator.ts +++ b/src/generators/identifier-names-generators/HexadecimalIdentifierNamesGenerator.ts @@ -87,21 +87,31 @@ export class HexadecimalIdentifierNamesGenerator extends AbstractIdentifierNames /** * @param {number} nameLength * @param {(name: string) => boolean} validationFn + * @param {number} attempts * @returns {string} */ - private generateNextName(nameLength: number | undefined, validationFn: (name: string) => boolean): string { + private generateNextName( + nameLength: number | undefined, + validationFn: (name: string) => boolean + ): string { const rangeMinInteger: number = 10000; const rangeMaxInteger: number = 99_999_999; - const randomInteger: number = this.randomGenerator.getRandomInteger(rangeMinInteger, rangeMaxInteger); - const hexadecimalNumber: string = NumberUtils.toHex(randomInteger); const prefixLength: number = Utils.hexadecimalPrefix.length; const baseNameLength: number = (nameLength ?? HexadecimalIdentifierNamesGenerator.baseIdentifierNameLength) + prefixLength; - const baseIdentifierName: string = hexadecimalNumber.slice(0, baseNameLength); - const identifierName: string = `_${baseIdentifierName}`; - if (!validationFn(identifierName)) { - return this.generateNextName(nameLength, validationFn); + let identifierName: string = ''; + let isValid: boolean = false; + + for (let attempts: number = 0; !isValid; attempts++) { + this.checkGenerationAttempts(attempts); + + const randomInteger: number = this.randomGenerator.getRandomInteger(rangeMinInteger, rangeMaxInteger); + const hexadecimalNumber: string = NumberUtils.toHex(randomInteger); + const baseIdentifierName: string = hexadecimalNumber.slice(0, baseNameLength); + + identifierName = `_${baseIdentifierName}`; + isValid = validationFn(identifierName); } this.preserveName(identifierName); diff --git a/src/generators/identifier-names-generators/MangledIdentifierNamesGenerator.ts b/src/generators/identifier-names-generators/MangledIdentifierNamesGenerator.ts index 96d6c3371..f76c71c97 100644 --- a/src/generators/identifier-names-generators/MangledIdentifierNamesGenerator.ts +++ b/src/generators/identifier-names-generators/MangledIdentifierNamesGenerator.ts @@ -282,11 +282,25 @@ export class MangledIdentifierNamesGenerator extends AbstractIdentifierNamesGene }; let identifierName: string = previousMangledName; - let isValidIdentifierName: boolean; + let isValidIdentifierName: boolean = false; + let reservedNameAttempts: number = 0; do { identifierName = generateNewMangledName(identifierName); + + if ( + this.preservedNamesSet.has(identifierName) || + MangledIdentifierNamesGenerator.reservedNamesSet.has(identifierName) + ) { + continue; + } + isValidIdentifierName = validationFunction?.(identifierName) ?? this.isValidIdentifierName(identifierName); + + if (!isValidIdentifierName) { + this.checkGenerationAttempts(reservedNameAttempts); + reservedNameAttempts++; + } } while (!isValidIdentifierName); return identifierName; diff --git a/src/interfaces/node-transformers/rename-properties-transformers/replacer/IRenamePropertiesReplacer.ts b/src/interfaces/node-transformers/rename-properties-transformers/replacer/IRenamePropertiesReplacer.ts index 18abe84cf..b86590c2c 100644 --- a/src/interfaces/node-transformers/rename-properties-transformers/replacer/IRenamePropertiesReplacer.ts +++ b/src/interfaces/node-transformers/rename-properties-transformers/replacer/IRenamePropertiesReplacer.ts @@ -7,8 +7,8 @@ export interface IRenamePropertiesReplacer { excludePropertyName(propertyName: string): void; /** - * @param {ESTree.Identifier | ESTree.Literal} node - * @returns {ESTree.Identifier | ESTree.Literal} + * @param {ESTree.Identifier | ESTree.Literal | ESTree.PrivateIdentifier} node + * @returns {ESTree.Identifier | ESTree.Literal | ESTree.PrivateIdentifier} */ - replace(node: ESTree.Identifier | ESTree.Literal): ESTree.Identifier | ESTree.Literal; + replace(node: ESTree.Identifier | ESTree.Literal | ESTree.PrivateIdentifier): ESTree.Identifier | ESTree.Literal | ESTree.PrivateIdentifier; } diff --git a/src/node-transformers/converting-transformers/ClassFieldTransformer.ts b/src/node-transformers/converting-transformers/ClassFieldTransformer.ts index f19ca4e96..6ed14af3c 100644 --- a/src/node-transformers/converting-transformers/ClassFieldTransformer.ts +++ b/src/node-transformers/converting-transformers/ClassFieldTransformer.ts @@ -12,6 +12,7 @@ import { NodeTransformationStage } from '../../enums/node-transformers/NodeTrans import { AbstractNodeTransformer } from '../AbstractNodeTransformer'; import { NodeFactory } from '../../node/NodeFactory'; import { NodeGuards } from '../../node/NodeGuards'; +import { IdentifierReplacer } from '../rename-identifiers-transformers/replacer/IdentifierReplacer'; /** * replaces: @@ -89,6 +90,18 @@ export class ClassFieldTransformer extends AbstractNodeTransformer { return classFieldNode; } + /** + * @param {string} name + * @returns {boolean} + */ + private isIgnoredName(name: string): boolean { + if (name === ClassFieldTransformer.ignoredName) { + return true; + } + + return IdentifierReplacer.isReservedName(name, this.options.reservedNames); + } + /** * @param {MethodDefinition | PropertyDefinition} classFieldNode * @param {Identifier} keyNode @@ -98,7 +111,7 @@ export class ClassFieldTransformer extends AbstractNodeTransformer { classFieldNode: ESTree.MethodDefinition | ESTree.PropertyDefinition, keyNode: ESTree.Identifier ): ESTree.MethodDefinition | ESTree.PropertyDefinition { - if (keyNode.name !== ClassFieldTransformer.ignoredName && !classFieldNode.computed) { + if (!this.isIgnoredName(keyNode.name) && !classFieldNode.computed) { classFieldNode.computed = true; classFieldNode.key = NodeFactory.literalNode(keyNode.name); } @@ -115,11 +128,7 @@ export class ClassFieldTransformer extends AbstractNodeTransformer { classFieldNode: ESTree.MethodDefinition | ESTree.PropertyDefinition, keyNode: ESTree.Literal ): ESTree.MethodDefinition | ESTree.PropertyDefinition { - if ( - typeof keyNode.value === 'string' && - keyNode.value !== ClassFieldTransformer.ignoredName && - !classFieldNode.computed - ) { + if (typeof keyNode.value === 'string' && !this.isIgnoredName(keyNode.value) && !classFieldNode.computed) { classFieldNode.computed = true; } diff --git a/src/node-transformers/converting-transformers/ObjectExpressionKeysTransformer.ts b/src/node-transformers/converting-transformers/ObjectExpressionKeysTransformer.ts index 05bc0af6c..9918d1d23 100644 --- a/src/node-transformers/converting-transformers/ObjectExpressionKeysTransformer.ts +++ b/src/node-transformers/converting-transformers/ObjectExpressionKeysTransformer.ts @@ -124,10 +124,7 @@ export class ObjectExpressionKeysTransformer extends AbstractNodeTransformer { objectExpressionNode, objectExpressionParentNode ) || - ObjectExpressionKeysTransformer.isProhibitedSequenceExpression( - objectExpressionNode, - objectExpressionHostStatement - ) || + ObjectExpressionKeysTransformer.isProhibitedSequenceExpression(objectExpressionNode) || ObjectExpressionKeysTransformer.isProhibitedLoopBody(objectExpressionNode) ) { return true; @@ -191,21 +188,73 @@ export class ObjectExpressionKeysTransformer extends AbstractNodeTransformer { /** * @param {ObjectExpression} objectExpressionNode - * @param {Node} objectExpressionHostNode * @returns {boolean} */ - private static isProhibitedSequenceExpression( - objectExpressionNode: ESTree.ObjectExpression, - objectExpressionHostNode: ESTree.Node - ): boolean { - return ( - NodeGuards.isExpressionStatementNode(objectExpressionHostNode) && - NodeGuards.isSequenceExpressionNode(objectExpressionHostNode.expression) && - objectExpressionHostNode.expression.expressions.some( - (expressionNode: ESTree.Expression) => - NodeGuards.isCallExpressionNode(expressionNode) && NodeGuards.isSuperNode(expressionNode.callee) - ) - ); + private static isProhibitedSequenceExpression(objectExpressionNode: ESTree.ObjectExpression): boolean { + const parentNode: ESTree.Node | undefined = objectExpressionNode.parentNode; + + if (!parentNode) { + return false; + } + + // Case 1: object is a direct child of a sequence expression + // e.g. `return aux(ys), { min }` + if (NodeGuards.isSequenceExpressionNode(parentNode)) { + const index: number = parentNode.expressions.indexOf(objectExpressionNode); + + return index > 0; + } + + // Case 2: object is nested inside a sequence expression via assignment/etc + // e.g. `super(), this.state = { foo: 1 }` + // Walk up to find if we're inside a sequence expression at a non-first position + let currentNode: ESTree.Node = parentNode; + + while (currentNode.parentNode) { + const currentParent: ESTree.Node = currentNode.parentNode; + + if (NodeGuards.isSequenceExpressionNode(currentParent)) { + const index: number = currentParent.expressions.indexOf(currentNode); + + if (index > 0) { + // Only prohibit if earlier expressions contain calls (side effects) + return currentParent.expressions.slice(0, index).some( + (expr: ESTree.Expression) => { + let hasCall: boolean = false; + + estraverse.traverse(expr, { + enter: (node: ESTree.Node) => { + if ( + NodeGuards.isCallExpressionNode(node) || + NodeGuards.isNewExpressionNode(node) + ) { + hasCall = true; + + return estraverse.VisitorOption.Break; + } + } + }); + + return hasCall; + } + ); + } + + return false; + } + + if ( + NodeGuards.isFunctionNode(currentParent) || + NodeGuards.isProgramNode(currentParent) || + NodeGuards.isBlockStatementNode(currentParent) + ) { + break; + } + + currentNode = currentParent; + } + + return false; } /** diff --git a/src/node-transformers/converting-transformers/ObjectPatternPropertiesTransformer.ts b/src/node-transformers/converting-transformers/ObjectPatternPropertiesTransformer.ts index d4a80e39e..3b9b378f3 100644 --- a/src/node-transformers/converting-transformers/ObjectPatternPropertiesTransformer.ts +++ b/src/node-transformers/converting-transformers/ObjectPatternPropertiesTransformer.ts @@ -67,8 +67,9 @@ export class ObjectPatternPropertiesTransformer extends AbstractNodeTransformer if (!this.options.renameGlobals) { const lexicalScope: TNodeWithLexicalScope | undefined = NodeLexicalScopeUtils.getLexicalScope(propertyNode); + const isInsideStaticBlock: boolean = this.isInsideStaticBlock(propertyNode); const shouldNotTransformGlobalPropertyNode: boolean = - !!lexicalScope && NodeGuards.isProgramNode(lexicalScope); + !!lexicalScope && NodeGuards.isProgramNode(lexicalScope) && !isInsideStaticBlock; if (shouldNotTransformGlobalPropertyNode) { return propertyNode; @@ -82,4 +83,26 @@ export class ObjectPatternPropertiesTransformer extends AbstractNodeTransformer return propertyNode; } + + /** + * @param {Node} node + * @returns {boolean} + */ + private isInsideStaticBlock(node: ESTree.Node): boolean { + let currentNode: ESTree.Node | undefined = node; + + while (currentNode) { + if (NodeGuards.isStaticBlockNode(currentNode)) { + return true; + } + + if (NodeGuards.isFunctionNode(currentNode) || NodeGuards.isProgramNode(currentNode)) { + return false; + } + + currentNode = currentNode.parentNode; + } + + return false; + } } diff --git a/src/node-transformers/rename-identifiers-transformers/replacer/IdentifierReplacer.ts b/src/node-transformers/rename-identifiers-transformers/replacer/IdentifierReplacer.ts index 8a7d70846..7c2847fa0 100644 --- a/src/node-transformers/rename-identifiers-transformers/replacer/IdentifierReplacer.ts +++ b/src/node-transformers/rename-identifiers-transformers/replacer/IdentifierReplacer.ts @@ -52,6 +52,21 @@ export class IdentifierReplacer implements IIdentifierReplacer { this.identifierNamesGenerator = identifierNamesGeneratorFactory(options); } + /** + * @param {string} name + * @param {string} reservedNames + * @returns {boolean} + */ + public static isReservedName(name: string, reservedNames: string[]): boolean { + if (!reservedNames.length) { + return false; + } + + return reservedNames.some((reservedName: string) => { + return new RegExp(reservedName, 'g').exec(name) !== null; + }); + } + /** * Store identifier node `name` of global identifiers as key in map with random name as value. * Reserved name will be ignored. @@ -62,7 +77,7 @@ export class IdentifierReplacer implements IIdentifierReplacer { public storeGlobalName(identifierNode: ESTree.Identifier, lexicalScopeNode: TNodeWithLexicalScope): void { const identifierName: string = identifierNode.name; - if (this.isReservedName(identifierName)) { + if (IdentifierReplacer.isReservedName(identifierName, this.options.reservedNames)) { return; } @@ -89,7 +104,7 @@ export class IdentifierReplacer implements IIdentifierReplacer { public storeLocalName(identifierNode: ESTree.Identifier, lexicalScopeNode: TNodeWithLexicalScope): void { const identifierName: string = identifierNode.name; - if (this.isReservedName(identifierName)) { + if (IdentifierReplacer.isReservedName(identifierName, this.options.reservedNames)) { return; } @@ -142,18 +157,4 @@ export class IdentifierReplacer implements IIdentifierReplacer { ): void { this.identifierNamesGenerator.preserveNameForLexicalScope(identifierNode.name, lexicalScopeNode); } - - /** - * @param {string} name - * @returns {boolean} - */ - private isReservedName(name: string): boolean { - if (!this.options.reservedNames.length) { - return false; - } - - return this.options.reservedNames.some((reservedName: string) => { - return new RegExp(reservedName, 'g').exec(name) !== null; - }); - } } diff --git a/src/node-transformers/rename-properties-transformers/RenamePropertiesTransformer.ts b/src/node-transformers/rename-properties-transformers/RenamePropertiesTransformer.ts index 685b6d0d4..4a0b45b68 100644 --- a/src/node-transformers/rename-properties-transformers/RenamePropertiesTransformer.ts +++ b/src/node-transformers/rename-properties-transformers/RenamePropertiesTransformer.ts @@ -48,7 +48,7 @@ export class RenamePropertiesTransformer extends AbstractNodeTransformer { >( propertyNode: TNode, propertyKeyNode: ESTree.Expression | ESTree.PrivateIdentifier - ): propertyKeyNode is ESTree.Identifier | ESTree.Literal { + ): propertyKeyNode is ESTree.Identifier | ESTree.Literal | ESTree.PrivateIdentifier { if (NodeGuards.isIdentifierNode(propertyKeyNode) && propertyNode.computed) { return false; } @@ -111,8 +111,13 @@ export class RenamePropertiesTransformer extends AbstractNodeTransformer { * @param {NodeGuards} parentNode * @returns {Node} */ + // eslint-disable-next-line complexity public transformNode(node: ESTree.Node, parentNode: ESTree.Node): ESTree.Node { - if (!NodeGuards.isIdentifierNode(node) && !NodeGuards.isLiteralNode(node)) { + if ( + !NodeGuards.isIdentifierNode(node) && + !NodeGuards.isLiteralNode(node) && + !NodeGuards.isPrivateIdentifierNode(node) + ) { return node; } diff --git a/src/node-transformers/rename-properties-transformers/replacer/RenamePropertiesReplacer.ts b/src/node-transformers/rename-properties-transformers/replacer/RenamePropertiesReplacer.ts index 707a49251..f657b0aaa 100644 --- a/src/node-transformers/rename-properties-transformers/replacer/RenamePropertiesReplacer.ts +++ b/src/node-transformers/rename-properties-transformers/replacer/RenamePropertiesReplacer.ts @@ -80,10 +80,14 @@ export class RenamePropertiesReplacer implements IRenamePropertiesReplacer { } /** - * @param {ESTree.Identifier | ESTree.Literal} node - * @returns {ESTree.Identifier | ESTree.Literal} + * @param {ESTree.Identifier | ESTree.Literal | ESTree.PrivateIdentifier} node + * @returns {ESTree.Identifier | ESTree.Literal | ESTree.PrivateIdentifier} */ - public replace(node: ESTree.Identifier | ESTree.Literal): ESTree.Identifier | ESTree.Literal { + public replace(node: ESTree.Identifier | ESTree.Literal | ESTree.PrivateIdentifier): ESTree.Identifier | ESTree.Literal | ESTree.PrivateIdentifier { + if (NodeGuards.isPrivateIdentifierNode(node)) { + return NodeFactory.privateIdentifierNode(this.replacePropertyName(node.name)); + } + if (NodeGuards.isIdentifierNode(node)) { return NodeFactory.identifierNode(this.replacePropertyName(node.name)); } diff --git a/src/node/NodeFactory.ts b/src/node/NodeFactory.ts index 6057ea1ca..4bb3a813b 100644 --- a/src/node/NodeFactory.ts +++ b/src/node/NodeFactory.ts @@ -373,6 +373,18 @@ export class NodeFactory { }; } + /** + * @param {string} name + * @returns {PrivateIdentifier} + */ + public static privateIdentifierNode(name: string): ESTree.PrivateIdentifier { + return { + type: NodeType.PrivateIdentifier, + name, + metadata: { ignoredNode: false } + }; + } + /** * @param {(ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier)[]} specifiers * @param {Literal} source diff --git a/src/node/NodeMetadata.ts b/src/node/NodeMetadata.ts index 30fc98d8e..adb735d04 100644 --- a/src/node/NodeMetadata.ts +++ b/src/node/NodeMetadata.ts @@ -49,7 +49,9 @@ export class NodeMetadata { * @param {Identifier | Literal} node * @returns {boolean} */ - public static isPropertyKeyToRenameNode(node: ESTree.Identifier | ESTree.Literal): boolean { + public static isPropertyKeyToRenameNode( + node: ESTree.Identifier | ESTree.PrivateIdentifier | ESTree.Literal + ): boolean { return ( NodeMetadata.get( node, diff --git a/src/options/normalizer-rules/DomainLockRule.ts b/src/options/normalizer-rules/DomainLockRule.ts index 030f035f4..677b645ca 100644 --- a/src/options/normalizer-rules/DomainLockRule.ts +++ b/src/options/normalizer-rules/DomainLockRule.ts @@ -13,7 +13,7 @@ export const DomainLockRule: TOptionsNormalizerRule = (options: IOptions): IOpti const normalizedDomains: string[] = []; for (const domain of options.domainLock) { - normalizedDomains.push(Utils.extractDomainFrom(domain)); + normalizedDomains.push(Utils.extractDomainFrom(domain).toLowerCase()); } options = { diff --git a/src/utils/AdvertisementUtils.ts b/src/utils/AdvertisementUtils.ts index f9c5c6008..992e09a0c 100644 --- a/src/utils/AdvertisementUtils.ts +++ b/src/utils/AdvertisementUtils.ts @@ -1,3 +1,10 @@ +import { Utils } from './Utils'; + +interface IConfigData { + adDisplayCount?: number; + adFirstDisplayTime?: number; +} + /** * Utility class for managing PRO advertisement display * - Limits display to first N times @@ -10,16 +17,6 @@ export class AdvertisementUtils { */ private static readonly maxDisplayCount: number = 5; - /** - * Storage key for the display count - */ - private static readonly storageKey: string = 'adDisplayCount'; - - /** - * Storage key for the timestamp of first display - */ - private static readonly timestampKey: string = 'adFirstDisplayTime'; - /** * Reset period in milliseconds (3 days) */ @@ -53,9 +50,14 @@ export class AdvertisementUtils { ]; /** - * Cached conf instance + * Config directory name for env-paths + */ + private static readonly projectName: string = 'javascript-obfuscator'; + + /** + * Cached config file path */ - private static config: any = null; + private static configPath: string | null = null; /** * Check if running in a CI environment @@ -98,36 +100,27 @@ export class AdvertisementUtils { return false; } - // Initialize config if needed - const config = this.getConfig(); - - if (!config) { - return false; - } - - // Check if reset period has passed (3 days) - const firstDisplayTime = this.getFirstDisplayTime(config); + const data = this.readConfig(); const now = Date.now(); - if (firstDisplayTime && now - firstDisplayTime >= this.resetPeriodMs) { - // Reset counter after 3 days - this.resetDisplayData(config); + // Check if reset period has passed (3 days) + if (data.adFirstDisplayTime && now - data.adFirstDisplayTime >= this.resetPeriodMs) { + data.adDisplayCount = 0; + data.adFirstDisplayTime = undefined; } - // Check display count - const count = this.getDisplayCount(config); + const count = data.adDisplayCount ?? 0; if (count >= this.maxDisplayCount) { return false; } - // Set first display time if not set - if (!firstDisplayTime || now - firstDisplayTime >= this.resetPeriodMs) { - this.setFirstDisplayTime(config, now); + if (!data.adFirstDisplayTime) { + data.adFirstDisplayTime = now; } - // Increment count for next time - this.setDisplayCount(config, count + 1); + data.adDisplayCount = count + 1; + this.writeConfig(data); return true; } @@ -140,87 +133,44 @@ export class AdvertisementUtils { } /** - * Get or create conf instance + * Get the config file path */ - private static getConfig(): any { - if (this.config) { - return this.config; + private static getConfigPath(): string { + if (!this.configPath) { + const envPaths = Utils.nodeRequire('env-paths').default; + const fs = Utils.nodeRequire('fs'); + const path = Utils.nodeRequire('path'); + const configDir: string = envPaths(this.projectName).config; + + fs.mkdirSync(configDir, { recursive: true }); + this.configPath = path.join(configDir, 'config.json'); } - if (typeof window === 'undefined') { - try { - // Dynamic import to avoid bundling in browser - // eslint-disable-next-line no-eval - const Conf = eval('require')('conf').default; - - this.config = new Conf({ - projectName: 'javascript-obfuscator' - }); - - return this.config; - } catch { - return null; - } - } - - return null; + return this.configPath!; } /** - * Get current display count from config + * Read config data from disk */ - private static getDisplayCount(config: any): number { + private static readConfig(): IConfigData { try { - const count = config.get(this.storageKey, 0); + const fs = Utils.nodeRequire('fs'); + const raw = fs.readFileSync(this.getConfigPath(), 'utf8'); - return typeof count === 'number' ? count : 0; + return JSON.parse(raw); } catch { - return 0; + return {}; } } /** - * Set display count in config + * Write config data to disk */ - private static setDisplayCount(config: any, count: number): void { + private static writeConfig(data: IConfigData): void { try { - config.set(this.storageKey, count); - } catch { - // Ignore errors - } - } - - /** - * Get first display timestamp from config - */ - private static getFirstDisplayTime(config: any): number | null { - try { - const timestamp = config.get(this.timestampKey, null); - - return typeof timestamp === 'number' ? timestamp : null; - } catch { - return null; - } - } + const fs = Utils.nodeRequire('fs'); - /** - * Set first display timestamp in config - */ - private static setFirstDisplayTime(config: any, timestamp: number): void { - try { - config.set(this.timestampKey, timestamp); - } catch { - // Ignore errors - } - } - - /** - * Reset display data (count and timestamp) - */ - private static resetDisplayData(config: any): void { - try { - config.delete(this.storageKey); - config.delete(this.timestampKey); + fs.writeFileSync(this.getConfigPath(), JSON.stringify(data)); } catch { // Ignore errors } diff --git a/src/utils/Utils.ts b/src/utils/Utils.ts index fc44fa209..f6f47d6f7 100644 --- a/src/utils/Utils.ts +++ b/src/utils/Utils.ts @@ -9,6 +9,16 @@ export class Utils { */ public static readonly hexadecimalPrefix: string = '0x'; + /** + * Dynamic require that bypasses webpack bundling. + * Use for Node.js-only modules that should not be included in the browser build. + * Lazy-evaluated to avoid ReferenceError in browser environments. + */ + // eslint-disable-next-line no-eval + public static get nodeRequire(): NodeRequire { + return eval('require'); + } + /** * @param {string} version * @param {string} buildTimestamp diff --git a/test/fixtures/sample-long-string.js b/test/fixtures/sample-long-string.js new file mode 100644 index 000000000..c259a23a8 --- /dev/null +++ b/test/fixtures/sample-long-string.js @@ -0,0 +1,2 @@ +var x = "This is a long string and it should really be split by the obfuscator"; +console.log(x); diff --git a/test/functional-tests/analyzers/scope-analyzer/ScopeAnalyzer.spec.ts b/test/functional-tests/analyzers/scope-analyzer/ScopeAnalyzer.spec.ts index 188f6d0cc..b5539fe26 100644 --- a/test/functional-tests/analyzers/scope-analyzer/ScopeAnalyzer.spec.ts +++ b/test/functional-tests/analyzers/scope-analyzer/ScopeAnalyzer.spec.ts @@ -6,6 +6,7 @@ import { evalLocal } from '../../../helpers/evalLocal'; import { readFileAsString } from '../../../helpers/readFileAsString'; import { JavaScriptObfuscator } from '../../../../src/JavaScriptObfuscatorFacade'; +import { NO_ADDITIONAL_NODES_PRESET } from '../../../../src/options/presets/NoCustomNodes'; describe('ScopeAnalyzer', () => { describe('analyze', () => { @@ -121,5 +122,64 @@ describe('ScopeAnalyzer', () => { }); }); }); + + describe('Variant #3: class expression name shadowing import binding', () => { + const samplesCount: number = 50; + + let obfuscatedCode: string; + let importBindingName: string | null; + let classExpressionName: string | null; + + beforeEach(() => { + const code: string = readFileAsString( + __dirname + '/fixtures/class-expression-name-shadowing-import.js' + ); + + importBindingName = null; + classExpressionName = null; + + for (let i = 0; i < samplesCount; i++) { + obfuscatedCode = JavaScriptObfuscator.obfuscate(code, { + ...NO_ADDITIONAL_NODES_PRESET, + compact: false, + stringArray: false, + seed: i + }).getObfuscatedCode(); + + const importMatch = obfuscatedCode.match(/import\s*\{\s*i\s+as\s+(\w+)\s*\}/); + const classMatch = obfuscatedCode.match(/=\s*class\s+(\w+)\s*\{/); + + if (importMatch && classMatch) { + importBindingName = importMatch[1]; + classExpressionName = classMatch[1]; + + if (importBindingName !== classExpressionName) { + break; + } + } + } + }); + + it('should not rename class expression self-references to the import binding', () => { + assert.isNotNull(importBindingName, 'should find import binding name'); + assert.isNotNull(classExpressionName, 'should find class expression name'); + + const getInstanceMatch = obfuscatedCode.match(/getInstance[^}]*\{([^}]*)\}/s); + assert.isNotNull(getInstanceMatch, 'should find getInstance body'); + + const getInstanceBody: string = getInstanceMatch![1]; + + assert.include( + getInstanceBody, + `new ${classExpressionName!}()`, + 'new () inside getInstance should reference the class expression name' + ); + assert.notInclude( + getInstanceBody, + `new ${importBindingName!}()`, + 'new () inside getInstance should NOT reference the import binding' + ); + }); + }); }); }); diff --git a/test/functional-tests/analyzers/scope-analyzer/fixtures/class-expression-name-shadowing-import.js b/test/functional-tests/analyzers/scope-analyzer/fixtures/class-expression-name-shadowing-import.js new file mode 100644 index 000000000..3d14de717 --- /dev/null +++ b/test/functional-tests/analyzers/scope-analyzer/fixtures/class-expression-name-shadowing-import.js @@ -0,0 +1,17 @@ +import { i as e } from './runtime.js'; + +function factory() { + return 'factory-result'; +} + +var P = class e { + static instance; + + static getInstance() { + return ((e.instance ||= new e()), e.instance); + } +}; + +var x = e(factory(), 1); + +export { P, x }; diff --git a/test/functional-tests/cli/JavaScriptObfuscatorCLI.spec.ts b/test/functional-tests/cli/JavaScriptObfuscatorCLI.spec.ts index 7fe0a1a8d..8b9462599 100644 --- a/test/functional-tests/cli/JavaScriptObfuscatorCLI.spec.ts +++ b/test/functional-tests/cli/JavaScriptObfuscatorCLI.spec.ts @@ -1,5 +1,4 @@ import * as fs from 'fs'; -import * as mkdirp from 'mkdirp'; import * as path from 'path'; import * as rimraf from 'rimraf'; import * as sinon from 'sinon'; @@ -32,7 +31,7 @@ describe('JavaScriptObfuscatorCLI', function (): void { describe('run', () => { before(async () => { - mkdirp.sync(outputDirName); + fs.mkdirSync(outputDirName, { recursive: true }); }); describe('Variant #1: obfuscation of single file', () => { @@ -1512,6 +1511,51 @@ describe('JavaScriptObfuscatorCLI', function (): void { }); }); + /** + * https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1236 + */ + describe('`--options-preset` should apply preset options that are not explicitly set via CLI', () => { + const longStringFixturePath: string = path.join(fixturesDirName, 'sample-long-string.js'); + + let obfuscatedCode: string; + + before(async () => { + await JavaScriptObfuscatorCLI.obfuscate([ + 'node', + 'javascript-obfuscator', + longStringFixturePath, + '--output', + outputFilePath, + '--options-preset', + 'medium-obfuscation', + '--string-array', + 'false', + '--dead-code-injection', + 'false', + '--control-flow-flattening', + 'false', + '--self-defending', + 'false', + '--debug-protection', + 'false', + '--disable-console-output', + 'false', + '--seed', + '1' + ]); + + obfuscatedCode = fs.readFileSync(outputFilePath, 'utf8'); + }); + + it('should apply `splitStrings` from preset without explicit `--split-strings` flag', () => { + assert.match(obfuscatedCode, /'.+'\s*\+\s*'.+'\s*\+\s*'.+'/); + }); + + after(() => { + fs.unlinkSync(outputFilePath); + }); + }); + after(() => { rimraf.sync(outputDirName); }); diff --git a/test/functional-tests/custom-code-helpers/domain-lock/templates/DomainLockNodeTemplate.spec.ts b/test/functional-tests/custom-code-helpers/domain-lock/templates/DomainLockNodeTemplate.spec.ts index 6f30afa6e..cd55ae393 100644 --- a/test/functional-tests/custom-code-helpers/domain-lock/templates/DomainLockNodeTemplate.spec.ts +++ b/test/functional-tests/custom-code-helpers/domain-lock/templates/DomainLockNodeTemplate.spec.ts @@ -955,4 +955,60 @@ describe('DomainLockTemplate', () => { }); }); }); + + describe('Variant #10: domain with hyphen', () => { + const samplesCount: number = 50; + const domainsString: string = ['my-website.com'].join(';'); + const domainLockRedirectUrl: string = 'about:blank'; + const currentDomain: string = 'my-website.com'; + + let testFunc: () => void; + + before(() => { + testFunc = () => { + for (let i = 0; i < samplesCount; i++) { + const [hiddenDomainsString, domainsStringDiff] = cryptUtils.hideString( + domainsString, + domainsString.length * 3 + ); + + const [hiddenDomainLockRedirectUrl, domainLockRedirectUrlDiff] = cryptUtils.hideString( + domainLockRedirectUrl, + domainLockRedirectUrl.length * 3 + ); + + const root: any = { + document: { + domain: currentDomain, + location: undefined + } + }; + + const fn = getFunctionFromTemplate( + { + domainLockFunctionName: 'domainLockFunction', + domainsStringDiff, + domains: hiddenDomainsString, + domainLockRedirectUrlDiff: domainLockRedirectUrlDiff, + hiddenDomainLockRedirectUrl: hiddenDomainLockRedirectUrl, + globalVariableTemplate: '', + singleCallControllerFunctionName + }, + singleCallControllerFunctionName, + thatThisTemplate + ); + + fn.apply(root); + + if (root.document.location !== undefined) { + throw new Error(`Domain lock redirected for matching hyphenated domain (iteration ${i})`); + } + } + }; + }); + + it('should correctly match domain containing hyphens', () => { + assert.doesNotThrow(testFunc); + }); + }); }); diff --git a/test/functional-tests/custom-code-helpers/string-array/templates/string-array-calls-wrapper-node-template/StringArrayCallsWrapperTemplate.spec.ts b/test/functional-tests/custom-code-helpers/string-array/templates/string-array-calls-wrapper-node-template/StringArrayCallsWrapperTemplate.spec.ts index 68a393509..393fd2e71 100644 --- a/test/functional-tests/custom-code-helpers/string-array/templates/string-array-calls-wrapper-node-template/StringArrayCallsWrapperTemplate.spec.ts +++ b/test/functional-tests/custom-code-helpers/string-array/templates/string-array-calls-wrapper-node-template/StringArrayCallsWrapperTemplate.spec.ts @@ -332,9 +332,9 @@ describe('StringArrayCallsWrapperTemplate', () => { decodedValue = Function(` ${stringArrayTemplate} - + ${stringArrayCallsWrapperTemplate} - + return ${stringArrayCallsWrapperName}(${index}); `)(); }); @@ -379,9 +379,9 @@ describe('StringArrayCallsWrapperTemplate', () => { decodedValue = Function(` ${stringArrayTemplate} - + ${stringArrayCallsWrapperTemplate} - + return ${stringArrayCallsWrapperName}(${index}); `)(); }); @@ -391,6 +391,118 @@ describe('StringArrayCallsWrapperTemplate', () => { }); }); }); + + describe('Variant #3: correct code evaluation when engine reformats Function.prototype.toString', () => { + const origToString = Function.prototype.toString; + + afterEach(() => { + Function.prototype.toString = origToString; + }); + + describe('Variant #1: long decoded string', () => { + const index: string = '0x0'; + + const indexShiftAmount: number = 0; + + const expectedDecodedValue: string = 'test1test1'; + + let decodedValue: string; + + before(() => { + const stringArrayTemplate = format(StringArrayTemplate(), { + stringArrayName, + stringArrayFunctionName, + stringArrayStorageItems: `'${cryptUtilsSwappedAlphabet.btoa('test1test1')}'` + }); + const atobPolyfill = format(AtobTemplate(selfDefendingEnabled), { + atobFunctionName + }); + const atobDecodeTemplate: string = format(StringArrayBase64DecodeTemplate(randomGenerator), { + atobPolyfill, + atobFunctionName, + selfDefendingCode: '', + stringArrayCacheName, + stringArrayCallsWrapperName + }); + const stringArrayCallsWrapperTemplate: string = format(StringArrayCallsWrapperTemplate(), { + decodeCodeHelperTemplate: atobDecodeTemplate, + indexShiftAmount, + stringArrayCacheName, + stringArrayCallsWrapperName, + stringArrayFunctionName + }); + + // Simulate Bun/JSC: Function.prototype.toString adds newlines + Function.prototype.toString = function () { + return origToString.call(this).replace('){', '){\n'); + }; + + decodedValue = Function(` + ${stringArrayTemplate} + + ${stringArrayCallsWrapperTemplate} + + return ${stringArrayCallsWrapperName}(${index}); + `)(); + }); + + it('should correctly return decoded value when engine reformats toString', () => { + assert.deepEqual(decodedValue, expectedDecodedValue); + }); + }); + + describe('Variant #2: 3-characters decoded string', () => { + const index: string = '0x0'; + + const indexShiftAmount: number = 0; + + const expectedDecodedValue: string = 'foo'; + + let decodedValue: string; + + before(() => { + const stringArrayTemplate = format(StringArrayTemplate(), { + stringArrayName, + stringArrayFunctionName, + stringArrayStorageItems: `'${cryptUtilsSwappedAlphabet.btoa('foo')}'` + }); + const atobPolyfill = format(AtobTemplate(selfDefendingEnabled), { + atobFunctionName + }); + const atobDecodeTemplate: string = format(StringArrayBase64DecodeTemplate(randomGenerator), { + atobPolyfill, + atobFunctionName, + selfDefendingCode: '', + stringArrayCacheName, + stringArrayCallsWrapperName + }); + const stringArrayCallsWrapperTemplate: string = format(StringArrayCallsWrapperTemplate(), { + decodeCodeHelperTemplate: atobDecodeTemplate, + indexShiftAmount, + stringArrayCacheName, + stringArrayCallsWrapperName, + stringArrayFunctionName + }); + + // Simulate Bun/JSC: Function.prototype.toString adds newlines + Function.prototype.toString = function () { + return origToString.call(this).replace('){', '){\n'); + }; + + decodedValue = Function(` + ${stringArrayTemplate} + + ${stringArrayCallsWrapperTemplate} + + return ${stringArrayCallsWrapperName}(${index}); + `)(); + }); + + it('should correctly return decoded value when engine reformats toString', () => { + assert.deepEqual(decodedValue, expectedDecodedValue); + }); + }); + }); }); }); diff --git a/test/functional-tests/generators/identifier-names-generators/mangled-identifier-names-generator/MangledIdentifierNamesGenerator.spec.ts b/test/functional-tests/generators/identifier-names-generators/mangled-identifier-names-generator/MangledIdentifierNamesGenerator.spec.ts index 1dc01f542..28a927821 100644 --- a/test/functional-tests/generators/identifier-names-generators/mangled-identifier-names-generator/MangledIdentifierNamesGenerator.spec.ts +++ b/test/functional-tests/generators/identifier-names-generators/mangled-identifier-names-generator/MangledIdentifierNamesGenerator.spec.ts @@ -368,4 +368,23 @@ describe('MangledIdentifierNamesGenerator', () => { }); }); }); + + describe('`reservedNames` that match all generated names', () => { + let testFunc: () => void; + + before(() => { + const code: string = readFileAsString(__dirname + '/fixtures/reserved-names-match-all.js'); + + testFunc = () => + JavaScriptObfuscator.obfuscate(code, { + ...NO_ADDITIONAL_NODES_PRESET, + identifierNamesGenerator: IdentifierNamesGenerator.MangledIdentifierNamesGenerator, + reservedNames: ['^(?!renameMeOnly$)'] + }); + }); + + it('should throw an error when all generated names match reservedNames', () => { + assert.throws(testFunc, 'Unable to generate a valid identifier name'); + }); + }); }); diff --git a/test/functional-tests/generators/identifier-names-generators/mangled-identifier-names-generator/fixtures/reserved-names-match-all.js b/test/functional-tests/generators/identifier-names-generators/mangled-identifier-names-generator/fixtures/reserved-names-match-all.js new file mode 100644 index 000000000..2ab5e9368 --- /dev/null +++ b/test/functional-tests/generators/identifier-names-generators/mangled-identifier-names-generator/fixtures/reserved-names-match-all.js @@ -0,0 +1 @@ +(function(){function pleasedontrename (){}; function renameMeOnly(){}}) diff --git a/test/functional-tests/issues/fixtures/issue1112.js b/test/functional-tests/issues/fixtures/issue1112.js new file mode 100644 index 000000000..2002d83fb --- /dev/null +++ b/test/functional-tests/issues/fixtures/issue1112.js @@ -0,0 +1,3 @@ +(function(𝐜𝐨𝐧𝐭𝐞𝐱𝐭) { + return 𝐜𝐨𝐧𝐭𝐞𝐱𝐭; +})(42) diff --git a/test/functional-tests/issues/fixtures/issue1182.js b/test/functional-tests/issues/fixtures/issue1182.js new file mode 100644 index 000000000..8e2f88daa --- /dev/null +++ b/test/functional-tests/issues/fixtures/issue1182.js @@ -0,0 +1 @@ +var result = 42; diff --git a/test/functional-tests/issues/issue1112.spec.ts b/test/functional-tests/issues/issue1112.spec.ts new file mode 100644 index 000000000..8a8508b6c --- /dev/null +++ b/test/functional-tests/issues/issue1112.spec.ts @@ -0,0 +1,39 @@ +import { assert } from 'chai'; +import { NO_ADDITIONAL_NODES_PRESET } from '../../../src/options/presets/NoCustomNodes'; +import { readFileAsString } from '../../helpers/readFileAsString'; +import { JavaScriptObfuscator } from '../../../src/JavaScriptObfuscatorFacade'; + +// +// https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1112 +// +describe('Issue #1112', () => { + describe('Unicode mathematical bold identifiers should have correct spacing after keywords', () => { + let testFunc: () => void; + + before(() => { + const code: string = readFileAsString(__dirname + '/fixtures/issue1112.js'); + + testFunc = () => { + const obfuscatedCode: string = JavaScriptObfuscator.obfuscate(code, { + ...NO_ADDITIONAL_NODES_PRESET, + reservedNames: ['𝐜𝐨𝐧𝐭𝐞𝐱𝐭'], + compact: true, + seed: 1 + }).getObfuscatedCode(); + + const result = eval(obfuscatedCode); + + if (result !== 42) { + throw new Error( + `Expected 42, got ${result}. ` + + `Missing space between keyword and Unicode identifier.` + ); + } + }; + }); + + it('should produce valid code with Unicode surrogate pair identifiers', () => { + assert.doesNotThrow(testFunc); + }); + }); +}); diff --git a/test/functional-tests/issues/issue1182.spec.ts b/test/functional-tests/issues/issue1182.spec.ts new file mode 100644 index 000000000..428e8c9c2 --- /dev/null +++ b/test/functional-tests/issues/issue1182.spec.ts @@ -0,0 +1,43 @@ +import { assert } from 'chai'; + +import { DomainLockRule } from '../../../src/options/normalizer-rules/DomainLockRule'; +import { IOptions } from '../../../src/interfaces/options/IOptions'; + +// +// https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1182 +// +describe('Issue #1182', () => { + describe('domainLock should be case-insensitive', () => { + it('should normalize mixed-case domain to lowercase', () => { + const options = DomainLockRule({ + domainLock: ['Example.COM'] + } as IOptions); + + assert.deepEqual(options.domainLock, ['example.com']); + }); + + it('should normalize domain with subdomain to lowercase', () => { + const options = DomainLockRule({ + domainLock: ['.Example.COM'] + } as IOptions); + + assert.deepEqual(options.domainLock, ['.example.com']); + }); + + it('should normalize multiple mixed-case domains', () => { + const options = DomainLockRule({ + domainLock: ['Foo.Bar.COM', 'EXAMPLE.ORG'] + } as IOptions); + + assert.deepEqual(options.domainLock, ['foo.bar.com', 'example.org']); + }); + + it('should not change already-lowercase domains', () => { + const options = DomainLockRule({ + domainLock: ['example.com'] + } as IOptions); + + assert.deepEqual(options.domainLock, ['example.com']); + }); + }); +}); diff --git a/test/functional-tests/javascript-obfuscator/JavaScriptObfuscator.spec.ts b/test/functional-tests/javascript-obfuscator/JavaScriptObfuscator.spec.ts index 4955b44d8..a268e201c 100644 --- a/test/functional-tests/javascript-obfuscator/JavaScriptObfuscator.spec.ts +++ b/test/functional-tests/javascript-obfuscator/JavaScriptObfuscator.spec.ts @@ -910,9 +910,7 @@ describe('JavaScriptObfuscator', () => { }); describe('Private identifiers support', () => { - const regExp: RegExp = new RegExp( - 'class Foo *{ *' + '#bar *= *0x1; *' + "\\['method'] *\\(\\) *{ *" + 'this\.#bar *= *0x2;' + '} *' + '}' - ); + const variableMatch: string = '_0x([a-f0-9]){4,6}'; let obfuscatedCode: string; @@ -925,8 +923,20 @@ describe('JavaScriptObfuscator', () => { }).getObfuscatedCode(); }); - it('should support private identifiers', () => { - assert.match(obfuscatedCode, regExp); + it('should rename private field', () => { + assert.match(obfuscatedCode, new RegExp(`#${variableMatch} *= *0x1`)); + }); + + it('should rename private field access', () => { + assert.match(obfuscatedCode, new RegExp(`this\\.#${variableMatch} *= *0x2`)); + }); + + it('should rename private method declaration', () => { + assert.match(obfuscatedCode, new RegExp(`#${variableMatch}\\(\\) *\\{`)); + }); + + it('should rename private method call', () => { + assert.match(obfuscatedCode, new RegExp(`this\\.#${variableMatch}\\(\\)`)); }); }); @@ -1478,6 +1488,116 @@ describe('JavaScriptObfuscator', () => { }); }); + describe('Import attributes', () => { + describe('Variant #1: import with "with" syntax', () => { + const importAttributesRegExp: RegExp = /from\s*'\.\/config\.json'\s*with\s*\{\s*type\s*:\s*'json'\s*\}/; + + let obfuscatedCode: string; + + before(() => { + const code: string = `import config from './config.json' with { type: 'json' };\nconsole.log(config);`; + + obfuscatedCode = JavaScriptObfuscator.obfuscate(code, { + ...NO_ADDITIONAL_NODES_PRESET + }).getObfuscatedCode(); + }); + + it('should preserve import attributes in obfuscated code', () => { + assert.match(obfuscatedCode, importAttributesRegExp); + }); + }); + + describe('Variant #2: import with multiple attributes', () => { + const importAttributesRegExp: RegExp = /from\s*'\.\/data\.json'\s*with\s*\{\s*type\s*:\s*'json'\s*,\s*integrity\s*:\s*'sha384-abc'\s*\}/; + + let obfuscatedCode: string; + + before(() => { + const code: string = `import data from './data.json' with { type: 'json', integrity: 'sha384-abc' };\nconsole.log(data);`; + + obfuscatedCode = JavaScriptObfuscator.obfuscate(code, { + ...NO_ADDITIONAL_NODES_PRESET + }).getObfuscatedCode(); + }); + + it('should preserve multiple import attributes in obfuscated code', () => { + assert.match(obfuscatedCode, importAttributesRegExp); + }); + }); + + describe('Variant #3: import with "assert" syntax (deprecated)', () => { + const importAssertionsRegExp: RegExp = /from\s*'\.\/config\.json'\s*assert\s*\{\s*type\s*:\s*'json'\s*\}/; + + let obfuscatedCode: string; + + before(() => { + const code: string = `import config from './config.json' assert { type: 'json' };\nconsole.log(config);`; + + obfuscatedCode = JavaScriptObfuscator.obfuscate(code, { + ...NO_ADDITIONAL_NODES_PRESET + }).getObfuscatedCode(); + }); + + it('should preserve import assertions in obfuscated code', () => { + assert.match(obfuscatedCode, importAssertionsRegExp); + }); + }); + + describe('Variant #4: export with "with" syntax', () => { + const exportAttributesRegExp: RegExp = /from\s*'\.\/config\.json'\s*with\s*\{\s*type\s*:\s*'json'\s*\}/; + + let obfuscatedCode: string; + + before(() => { + const code: string = `export { default as config } from './config.json' with { type: 'json' };`; + + obfuscatedCode = JavaScriptObfuscator.obfuscate(code, { + ...NO_ADDITIONAL_NODES_PRESET + }).getObfuscatedCode(); + }); + + it('should preserve export attributes in obfuscated code', () => { + assert.match(obfuscatedCode, exportAttributesRegExp); + }); + }); + + describe('Variant #5: export all with "with" syntax', () => { + const exportAllAttributesRegExp: RegExp = /export\s*\*\s*from\s*'\.\/utils\.js'\s*with\s*\{\s*type\s*:\s*'javascript'\s*\}/; + + let obfuscatedCode: string; + + before(() => { + const code: string = `export * from './utils.js' with { type: 'javascript' };`; + + obfuscatedCode = JavaScriptObfuscator.obfuscate(code, { + ...NO_ADDITIONAL_NODES_PRESET + }).getObfuscatedCode(); + }); + + it('should preserve export all attributes in obfuscated code', () => { + assert.match(obfuscatedCode, exportAllAttributesRegExp); + }); + }); + + describe('Variant #6: side-effect import with "with" syntax', () => { + const sideEffectImportRegExp: RegExp = /import\s*'\.\/styles\.css'\s*with\s*\{\s*type\s*:\s*'css'\s*\}/; + + let obfuscatedCode: string; + + before(() => { + const code: string = `import './styles.css' with { type: 'css' };`; + + obfuscatedCode = JavaScriptObfuscator.obfuscate(code, { + ...NO_ADDITIONAL_NODES_PRESET + }).getObfuscatedCode(); + }); + + it('should preserve side-effect import attributes in obfuscated code', () => { + assert.match(obfuscatedCode, sideEffectImportRegExp); + }); + }); + }); + describe('getOptionsByPreset', () => { describe('Variant #1: base behaviour', () => { const optionsPresetName: TOptionsPreset = OptionsPreset.HighObfuscation; diff --git a/test/functional-tests/javascript-obfuscator/fixtures/private-identifier.js b/test/functional-tests/javascript-obfuscator/fixtures/private-identifier.js index fff5f2562..96faea9bc 100644 --- a/test/functional-tests/javascript-obfuscator/fixtures/private-identifier.js +++ b/test/functional-tests/javascript-obfuscator/fixtures/private-identifier.js @@ -4,4 +4,13 @@ class Foo { method() { this.#bar = 2; } -} \ No newline at end of file + + #privateMethod() { + return this.#bar; + } + + run() { + this.method(); + return this.#privateMethod(); + } +} diff --git a/test/functional-tests/node-transformers/converting-transformers/class-field-transformer/ClassFieldTransformer.spec.ts b/test/functional-tests/node-transformers/converting-transformers/class-field-transformer/ClassFieldTransformer.spec.ts index 7dae5624e..ecc0fc387 100644 --- a/test/functional-tests/node-transformers/converting-transformers/class-field-transformer/ClassFieldTransformer.spec.ts +++ b/test/functional-tests/node-transformers/converting-transformers/class-field-transformer/ClassFieldTransformer.spec.ts @@ -273,4 +273,31 @@ describe('ClassFieldTransformer', () => { }); }); }); + + describe('Variant #3: class method not obfuscated if option `reservedNames` is set', () => { + const samplesCount: number = 100; + + let obfuscations: string[]; + + beforeEach(() => { + obfuscations = []; + const code: string = readFileAsString(__dirname + '/fixtures/class-with-function.js'); + + for (let i = 0; i < samplesCount; i++) { + const obfuscatedCode: string = JavaScriptObfuscator.obfuscate(code, { + controlFlowFlattening: true, + deadCodeInjection: true, + reservedNames: ['bar'] + }).getObfuscatedCode(); + + obfuscations.push(obfuscatedCode); + } + }); + + it('class should always have `bar` method not obfuscated', () => { + for (const codeAsString of obfuscations) { + assert.match(codeAsString, /\bbar\s*\(/); + } + }); + }); }); diff --git a/test/functional-tests/node-transformers/converting-transformers/class-field-transformer/fixtures/class-with-function.js b/test/functional-tests/node-transformers/converting-transformers/class-field-transformer/fixtures/class-with-function.js new file mode 100644 index 000000000..42686f069 --- /dev/null +++ b/test/functional-tests/node-transformers/converting-transformers/class-field-transformer/fixtures/class-with-function.js @@ -0,0 +1,6 @@ +class Foo { + bar() { + console.log(1); + baz(); + } +} diff --git a/test/functional-tests/node-transformers/converting-transformers/object-expression-keys-transformer/ObjectExpressionKeysTransformer.spec.ts b/test/functional-tests/node-transformers/converting-transformers/object-expression-keys-transformer/ObjectExpressionKeysTransformer.spec.ts index 41b4e9eb9..da3408845 100644 --- a/test/functional-tests/node-transformers/converting-transformers/object-expression-keys-transformer/ObjectExpressionKeysTransformer.spec.ts +++ b/test/functional-tests/node-transformers/converting-transformers/object-expression-keys-transformer/ObjectExpressionKeysTransformer.spec.ts @@ -2100,7 +2100,67 @@ describe('ObjectExpressionKeysTransformer', () => { }); }); - describe('Variant #16: conditional expression `this` reference', () => { + describe('Variant #16: return statement sequence expression with side effects', () => { + let testFunc: () => void; + + before(() => { + const code: string = readFileAsString( + __dirname + '/fixtures/return-statement-sequence-expression-side-effect.js' + ); + + testFunc = () => { + const obfuscatedCode: string = JavaScriptObfuscator.obfuscate(code, { + ...NO_ADDITIONAL_NODES_PRESET, + transformObjectKeys: true + }).getObfuscatedCode(); + + const result = eval(`${obfuscatedCode} compErr(5);`); + + if (result.min !== 5) { + throw new Error( + `Expected min to be 5, got ${result.min}. ` + + `Object extraction changed evaluation order in sequence expression.` + ); + } + }; + }); + + it('should not change evaluation order when extracting object keys from sequence expression', () => { + assert.doesNotThrow(testFunc); + }); + }); + + describe('Variant #17: return statement sequence expression with nested assignment and side effects', () => { + let testFunc: () => void; + + before(() => { + const code: string = readFileAsString( + __dirname + '/fixtures/return-statement-sequence-expression-nested-assignment-side-effect.js' + ); + + testFunc = () => { + const obfuscatedCode: string = JavaScriptObfuscator.obfuscate(code, { + ...NO_ADDITIONAL_NODES_PRESET, + transformObjectKeys: true + }).getObfuscatedCode(); + + const result = eval(`${obfuscatedCode} test();`); + + if (result.foo !== 42) { + throw new Error( + `Expected foo to be 42, got ${result.foo}. ` + + `Object extraction changed evaluation order in nested sequence expression.` + ); + } + }; + }); + + it('should not change evaluation order when extracting object keys from nested assignment in sequence expression', () => { + assert.doesNotThrow(testFunc); + }); + }); + + describe('Variant #18: conditional expression `this` reference', () => { describe('Variant #1: conditional expression identifier reference', () => { const match: string = `` + diff --git a/test/functional-tests/node-transformers/converting-transformers/object-expression-keys-transformer/fixtures/return-statement-sequence-expression-nested-assignment-side-effect.js b/test/functional-tests/node-transformers/converting-transformers/object-expression-keys-transformer/fixtures/return-statement-sequence-expression-nested-assignment-side-effect.js new file mode 100644 index 000000000..d0e1892c5 --- /dev/null +++ b/test/functional-tests/node-transformers/converting-transformers/object-expression-keys-transformer/fixtures/return-statement-sequence-expression-nested-assignment-side-effect.js @@ -0,0 +1,9 @@ +function test() { + let x, y, val = 0; + + function sideEffect() { + val = 42; + } + + return (sideEffect(), x = (y = { foo: val })); +} diff --git a/test/functional-tests/node-transformers/converting-transformers/object-expression-keys-transformer/fixtures/return-statement-sequence-expression-side-effect.js b/test/functional-tests/node-transformers/converting-transformers/object-expression-keys-transformer/fixtures/return-statement-sequence-expression-side-effect.js new file mode 100644 index 000000000..279259a6e --- /dev/null +++ b/test/functional-tests/node-transformers/converting-transformers/object-expression-keys-transformer/fixtures/return-statement-sequence-expression-side-effect.js @@ -0,0 +1,9 @@ +function compErr(ys) { + let min = Infinity; + + function aux(y) { + if (y < min) min = y; + } + + return (aux(ys), { min }); +} diff --git a/test/functional-tests/node-transformers/converting-transformers/object-pattern-properties-transformer/ObjectPatternPropertiesTransformer.spec.ts b/test/functional-tests/node-transformers/converting-transformers/object-pattern-properties-transformer/ObjectPatternPropertiesTransformer.spec.ts index dd43acb1d..724ba94d8 100644 --- a/test/functional-tests/node-transformers/converting-transformers/object-pattern-properties-transformer/ObjectPatternPropertiesTransformer.spec.ts +++ b/test/functional-tests/node-transformers/converting-transformers/object-pattern-properties-transformer/ObjectPatternPropertiesTransformer.spec.ts @@ -201,4 +201,71 @@ describe('ObjectPatternPropertiesTransformer', () => { }); }); }); + + /** + * https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1141 + */ + describe('Variant #4: class static block', () => { + describe('Variant #1: destructuring declaration', () => { + let testFunc: () => void; + + before(() => { + const code: string = readFileAsString( + __dirname + '/fixtures/static-block-destructuring-declaration.js' + ); + + testFunc = () => { + const obfuscatedCode: string = JavaScriptObfuscator.obfuscate(code, { + ...NO_ADDITIONAL_NODES_PRESET, + renameGlobals: false, + seed: 1 + }).getObfuscatedCode(); + + const result = eval(obfuscatedCode); + + if (result !== 42) { + throw new Error( + `Expected 42, got ${result}. ` + + `Destructuring declaration not renamed correctly in static block.` + ); + } + }; + }); + + it('should correctly rename destructuring declaration in class static block', () => { + assert.doesNotThrow(testFunc); + }); + }); + + describe('Variant #2: destructuring assignment', () => { + let testFunc: () => void; + + before(() => { + const code: string = readFileAsString( + __dirname + '/fixtures/static-block-destructuring-assignment.js' + ); + + testFunc = () => { + const obfuscatedCode: string = JavaScriptObfuscator.obfuscate(code, { + ...NO_ADDITIONAL_NODES_PRESET, + renameGlobals: false, + seed: 1 + }).getObfuscatedCode(); + + const result = eval(obfuscatedCode); + + if (result !== 42) { + throw new Error( + `Expected 42, got ${result}. ` + + `Destructuring assignment not renamed correctly in static block.` + ); + } + }; + }); + + it('should correctly rename destructuring assignment in class static block', () => { + assert.doesNotThrow(testFunc); + }); + }); + }); }); diff --git a/test/functional-tests/node-transformers/converting-transformers/object-pattern-properties-transformer/fixtures/static-block-destructuring-assignment.js b/test/functional-tests/node-transformers/converting-transformers/object-pattern-properties-transformer/fixtures/static-block-destructuring-assignment.js new file mode 100644 index 000000000..b754b2ff0 --- /dev/null +++ b/test/functional-tests/node-transformers/converting-transformers/object-pattern-properties-transformer/fixtures/static-block-destructuring-assignment.js @@ -0,0 +1,11 @@ +(function() { + class Foo { + static result; + static { + let x; + ({ x } = { x: 42 }); + Foo.result = x; + } + } + return Foo.result; +})() diff --git a/test/functional-tests/node-transformers/converting-transformers/object-pattern-properties-transformer/fixtures/static-block-destructuring-declaration.js b/test/functional-tests/node-transformers/converting-transformers/object-pattern-properties-transformer/fixtures/static-block-destructuring-declaration.js new file mode 100644 index 000000000..97a307c2f --- /dev/null +++ b/test/functional-tests/node-transformers/converting-transformers/object-pattern-properties-transformer/fixtures/static-block-destructuring-declaration.js @@ -0,0 +1,10 @@ +(function() { + class Foo { + static result; + static { + let { x } = { x: 42 }; + Foo.result = x; + } + } + return Foo.result; +})() diff --git a/test/functional-tests/node-transformers/rename-identifiers-transformers/identifier-replacer/IdentifierReplacer.spec.ts b/test/functional-tests/node-transformers/rename-identifiers-transformers/identifier-replacer/IdentifierReplacer.spec.ts index 26da60efd..80b4308dc 100644 --- a/test/functional-tests/node-transformers/rename-identifiers-transformers/identifier-replacer/IdentifierReplacer.spec.ts +++ b/test/functional-tests/node-transformers/rename-identifiers-transformers/identifier-replacer/IdentifierReplacer.spec.ts @@ -25,7 +25,7 @@ describe('IdentifierReplacer', () => { }); }); - describe('Variant #1: ignore global reserved names', () => { + describe('Variant #2: ignore global reserved names', () => { let obfuscatedCode: string; before(() => { diff --git a/test/functional-tests/node-transformers/rename-identifiers-transformers/scope-identifiers-transformer/class-declaration/ClassDeclaration.spec.ts b/test/functional-tests/node-transformers/rename-identifiers-transformers/scope-identifiers-transformer/class-declaration/ClassDeclaration.spec.ts index 989eb4d92..5a35cf880 100644 --- a/test/functional-tests/node-transformers/rename-identifiers-transformers/scope-identifiers-transformer/class-declaration/ClassDeclaration.spec.ts +++ b/test/functional-tests/node-transformers/rename-identifiers-transformers/scope-identifiers-transformer/class-declaration/ClassDeclaration.spec.ts @@ -805,5 +805,6 @@ describe('ScopeIdentifiersTransformer ClassDeclaration identifiers', () => { assert.match(obfuscatedCode, defaultExportRegExp); }); }); + }); }); diff --git a/test/unit-tests/cli/utils/IdentifierNamesCacheFileUtils.spec.ts b/test/unit-tests/cli/utils/IdentifierNamesCacheFileUtils.spec.ts index 6e2b47c03..08d7c49f7 100644 --- a/test/unit-tests/cli/utils/IdentifierNamesCacheFileUtils.spec.ts +++ b/test/unit-tests/cli/utils/IdentifierNamesCacheFileUtils.spec.ts @@ -1,5 +1,4 @@ import * as fs from 'fs'; -import * as mkdirp from 'mkdirp'; import * as path from 'path'; import * as rimraf from 'rimraf'; @@ -24,7 +23,7 @@ describe('IdentifierNamesCacheFileUtils', () => { const tmpDirectoryPath: string = path.join('test', 'tmp'); before(() => { - mkdirp.sync(tmpDirectoryPath); + fs.mkdirSync(tmpDirectoryPath, { recursive: true }); }); describe('readFile', () => { diff --git a/test/unit-tests/cli/utils/ObfuscatedCodeFileUtils.spec.ts b/test/unit-tests/cli/utils/ObfuscatedCodeFileUtils.spec.ts index ce87401ed..db0fac264 100644 --- a/test/unit-tests/cli/utils/ObfuscatedCodeFileUtils.spec.ts +++ b/test/unit-tests/cli/utils/ObfuscatedCodeFileUtils.spec.ts @@ -1,6 +1,5 @@ import { assert } from 'chai'; import * as fs from 'fs'; -import * as mkdirp from 'mkdirp'; import * as path from 'path'; import * as rimraf from 'rimraf'; @@ -11,7 +10,7 @@ describe('obfuscatedCodeFileUtils', () => { describe('getOutputCodePath', () => { before(() => { - mkdirp.sync(path.join(tmpDirectoryPath, 'input', 'nested')); + fs.mkdirSync(path.join(tmpDirectoryPath, 'input', 'nested'), { recursive: true }); fs.writeFileSync(path.join(tmpDirectoryPath, 'input', 'nested', 'test-input.js'), 'var foo = 1;'); }); @@ -206,7 +205,7 @@ describe('obfuscatedCodeFileUtils', () => { const baseDirnamePath: string = __dirname; before(() => { - mkdirp.sync(path.join(baseDirnamePath, tmpDirectoryPath, 'input', 'nested')); + fs.mkdirSync(path.join(baseDirnamePath, tmpDirectoryPath, 'input', 'nested'), { recursive: true }); fs.writeFileSync( path.join(baseDirnamePath, tmpDirectoryPath, 'input', 'nested', 'test-input.js'), 'var foo = 1;' diff --git a/test/unit-tests/cli/utils/SourceCodeFileUtils.spec.ts b/test/unit-tests/cli/utils/SourceCodeFileUtils.spec.ts index f7dbb8437..ab66b8ad7 100644 --- a/test/unit-tests/cli/utils/SourceCodeFileUtils.spec.ts +++ b/test/unit-tests/cli/utils/SourceCodeFileUtils.spec.ts @@ -1,5 +1,4 @@ import * as fs from 'fs'; -import * as mkdirp from 'mkdirp'; import * as path from 'path'; import * as rimraf from 'rimraf'; @@ -15,7 +14,7 @@ describe('SourceCodeFileUtils', () => { const tmpDirectoryPath: string = path.join('test', 'tmp'); before(() => { - mkdirp.sync(tmpDirectoryPath); + fs.mkdirSync(tmpDirectoryPath, { recursive: true }); }); describe('readSourceCode', () => { @@ -277,8 +276,8 @@ describe('SourceCodeFileUtils', () => { let result: IFileData[]; before(() => { - mkdirp.sync(parentDirectoryPath1); - mkdirp.sync(parentDirectoryPath2); + fs.mkdirSync(parentDirectoryPath1, { recursive: true }); + fs.mkdirSync(parentDirectoryPath2, { recursive: true }); fs.writeFileSync(filePath1, fileContent); fs.writeFileSync(filePath2, fileContent); fs.writeFileSync(filePath3, fileContent); @@ -534,7 +533,7 @@ describe('SourceCodeFileUtils', () => { let result: IFileData[]; before(() => { - mkdirp.sync(tmpDirectoryWithDotPath); + fs.mkdirSync(tmpDirectoryWithDotPath, { recursive: true }); fs.writeFileSync(filePath, fileContent); result = new SourceCodeFileUtils(tmpDirectoryWithDotPath, {}).readSourceCode(); }); diff --git a/test/unit-tests/generators/identifier-names-generators/HexadecimalIdentifierNamesGenerator.spec.ts b/test/unit-tests/generators/identifier-names-generators/HexadecimalIdentifierNamesGenerator.spec.ts index 190edad8c..2fb8c7d8d 100644 --- a/test/unit-tests/generators/identifier-names-generators/HexadecimalIdentifierNamesGenerator.spec.ts +++ b/test/unit-tests/generators/identifier-names-generators/HexadecimalIdentifierNamesGenerator.spec.ts @@ -121,4 +121,26 @@ describe('HexadecimalIdentifierNamesGenerator', () => { assert.notEqual(hexadecimalIdentifierName1, hexadecimalIdentifierName2); }); }); + + describe('`reservedNames` that match all generated names', () => { + let testFunc: () => void; + + before(() => { + const inversifyContainerFacade: IInversifyContainerFacade = new InversifyContainerFacade(); + + inversifyContainerFacade.load('', '', { + reservedNames: ['^(?!renameMeOnly$)'] + }); + const identifierNamesGenerator = inversifyContainerFacade.getNamed( + ServiceIdentifiers.IIdentifierNamesGenerator, + IdentifierNamesGenerator.HexadecimalIdentifierNamesGenerator + ); + + testFunc = () => identifierNamesGenerator.generateNext(); + }); + + it('should throw an error when all generated names match reservedNames', () => { + assert.throws(testFunc, 'Unable to generate a valid identifier name'); + }); + }); }); diff --git a/test/unit-tests/generators/identifier-names-generators/MangledShuffledlIdentifierNamesGenerator.spec.ts b/test/unit-tests/generators/identifier-names-generators/MangledShuffledlIdentifierNamesGenerator.spec.ts index 79519a24a..08286dafd 100644 --- a/test/unit-tests/generators/identifier-names-generators/MangledShuffledlIdentifierNamesGenerator.spec.ts +++ b/test/unit-tests/generators/identifier-names-generators/MangledShuffledlIdentifierNamesGenerator.spec.ts @@ -217,4 +217,26 @@ describe('MangledShuffledIdentifierNamesGenerator', () => { }); }); }); + + describe('`reservedNames` that match all generated names', () => { + let testFunc: () => void; + + beforeEach(() => { + const inversifyContainerFacade: IInversifyContainerFacade = new InversifyContainerFacade(); + + inversifyContainerFacade.load('', '', { + reservedNames: ['^(?!renameMeOnly$)'] + }); + const identifierNamesGenerator = inversifyContainerFacade.getNamed( + ServiceIdentifiers.IIdentifierNamesGenerator, + IdentifierNamesGenerator.MangledShuffledIdentifierNamesGenerator + ); + + testFunc = () => identifierNamesGenerator.generateNext(); + }); + + it('should throw an error when all generated names match reservedNames', () => { + assert.throws(testFunc, 'Unable to generate a valid identifier name'); + }); + }); }); diff --git a/test/unit-tests/generators/identifier-names-generators/MangledlIdentifierNamesGenerator.spec.ts b/test/unit-tests/generators/identifier-names-generators/MangledlIdentifierNamesGenerator.spec.ts index e64af8560..773b0421d 100644 --- a/test/unit-tests/generators/identifier-names-generators/MangledlIdentifierNamesGenerator.spec.ts +++ b/test/unit-tests/generators/identifier-names-generators/MangledlIdentifierNamesGenerator.spec.ts @@ -342,4 +342,26 @@ describe('MangledIdentifierNamesGenerator', () => { }); }); }); + + describe('`reservedNames` that match all generated names', () => { + let testFunc: () => void; + + beforeEach(() => { + const inversifyContainerFacade: IInversifyContainerFacade = new InversifyContainerFacade(); + + inversifyContainerFacade.load('', '', { + reservedNames: ['^(?!renameMeOnly$)'] + }); + const identifierNamesGenerator = inversifyContainerFacade.getNamed( + ServiceIdentifiers.IIdentifierNamesGenerator, + IdentifierNamesGenerator.MangledIdentifierNamesGenerator + ); + + testFunc = () => identifierNamesGenerator.generateNext(); + }); + + it('should throw an error when all generated names match reservedNames', () => { + assert.throws(testFunc, 'Unable to generate a valid identifier name'); + }); + }); }); diff --git a/test/unit-tests/javascript-obfuscator/ASTParserFacade.spec.ts b/test/unit-tests/javascript-obfuscator/ASTParserFacade.spec.ts index 2546cebea..44323483b 100644 --- a/test/unit-tests/javascript-obfuscator/ASTParserFacade.spec.ts +++ b/test/unit-tests/javascript-obfuscator/ASTParserFacade.spec.ts @@ -87,5 +87,79 @@ describe('ASTParserFacade', () => { }); }); }); + + describe('Import attributes', () => { + describe('Variant #1: import with "with" syntax', () => { + const sourceCode: string = `import config from "./config.json" with { type: "json" };`; + + let astTree: any; + + before(() => { + astTree = ASTParserFacade.parse(sourceCode, { ecmaVersion }); + }); + + it('should parse import with "with" syntax without error', () => { + assert.exists(astTree); + assert.equal(astTree.type, 'Program'); + assert.equal(astTree.body[0].type, 'ImportDeclaration'); + }); + + it('should preserve import attributes in AST', () => { + const importDecl = astTree.body[0]; + assert.exists(importDecl.attributes); + assert.isArray(importDecl.attributes); + assert.equal(importDecl.attributes.length, 1); + assert.equal(importDecl.attributes[0].key.name, 'type'); + assert.equal(importDecl.attributes[0].value.value, 'json'); + }); + }); + + describe('Variant #2: import with "assert" syntax (deprecated)', () => { + const sourceCode: string = `import config from "./config.json" assert { type: "json" };`; + + let astTree: any; + + before(() => { + astTree = ASTParserFacade.parse(sourceCode, { ecmaVersion }); + }); + + it('should parse import with "assert" syntax without error', () => { + assert.exists(astTree); + assert.equal(astTree.type, 'Program'); + assert.equal(astTree.body[0].type, 'ImportDeclaration'); + }); + }); + + describe('Variant #3: export with "with" syntax', () => { + const sourceCode: string = `export { default as config } from "./config.json" with { type: "json" };`; + + let astTree: any; + + before(() => { + astTree = ASTParserFacade.parse(sourceCode, { ecmaVersion }); + }); + + it('should parse export with "with" syntax without error', () => { + assert.exists(astTree); + assert.equal(astTree.type, 'Program'); + assert.equal(astTree.body[0].type, 'ExportNamedDeclaration'); + }); + }); + + describe('Variant #4: dynamic import with "with" syntax', () => { + const sourceCode: string = `const config = await import("./config.json", { with: { type: "json" } });`; + + let astTree: any; + + before(() => { + astTree = ASTParserFacade.parse(sourceCode, { ecmaVersion }); + }); + + it('should parse dynamic import with "with" syntax without error', () => { + assert.exists(astTree); + assert.equal(astTree.type, 'Program'); + }); + }); + }); }); }); diff --git a/test/unit-tests/utils/AdvertisementUtils.spec.ts b/test/unit-tests/utils/AdvertisementUtils.spec.ts index b110e2f19..079b1b764 100644 --- a/test/unit-tests/utils/AdvertisementUtils.spec.ts +++ b/test/unit-tests/utils/AdvertisementUtils.spec.ts @@ -1,8 +1,37 @@ +import * as fs from 'fs'; +import * as path from 'path'; + import { assert } from 'chai'; import { AdvertisementUtils } from '../../../src/utils/AdvertisementUtils'; +import { Utils } from '../../../src/utils/Utils'; + +const envPaths = Utils.nodeRequire('env-paths').default; describe('AdvertisementUtils', () => { + const configPath = path.join(envPaths('javascript-obfuscator').config, 'config.json'); + + function readConfig(): any { + try { + return JSON.parse(fs.readFileSync(configPath, 'utf8')); + } catch { + return {}; + } + } + + function writeConfig(data: any): void { + fs.mkdirSync(path.dirname(configPath), { recursive: true }); + fs.writeFileSync(configPath, JSON.stringify(data)); + } + + function deleteConfig(): void { + try { + fs.unlinkSync(configPath); + } catch { + // Ignore + } + } + describe('isCI', () => { const originalEnv = { ...process.env }; @@ -105,22 +134,10 @@ describe('AdvertisementUtils', () => { }); describe('Variant #3: display counter and reset', () => { - let config: any; - - before(() => { - // Get config instance using eval('require') - same as AdvertisementUtils - // conf is an ES Module, so we need to access .default - // eslint-disable-next-line no-eval - const Conf = eval('require')('conf').default; - config = new Conf({ projectName: 'javascript-obfuscator' }); - }); - beforeEach(() => { - // Clear ad-related config before each test - config.delete('adDisplayCount'); - config.delete('adFirstDisplayTime'); - // Reset cached config in AdvertisementUtils - (AdvertisementUtils as any).config = null; + deleteConfig(); + // Reset cached config path + (AdvertisementUtils as any).configPath = null; // Ensure TTY and non-CI environment process.stdout.isTTY = true; delete process.env.CI; @@ -130,10 +147,8 @@ describe('AdvertisementUtils', () => { }); afterEach(() => { - // Clean up - config.delete('adDisplayCount'); - config.delete('adFirstDisplayTime'); - (AdvertisementUtils as any).config = null; + deleteConfig(); + (AdvertisementUtils as any).configPath = null; }); it('should return true for first 5 calls', () => { @@ -154,13 +169,13 @@ describe('AdvertisementUtils', () => { it('should increment counter on each call', () => { AdvertisementUtils.shouldShowAdvertisement(); - assert.strictEqual(config.get('adDisplayCount'), 1); + assert.strictEqual(readConfig().adDisplayCount, 1); AdvertisementUtils.shouldShowAdvertisement(); - assert.strictEqual(config.get('adDisplayCount'), 2); + assert.strictEqual(readConfig().adDisplayCount, 2); AdvertisementUtils.shouldShowAdvertisement(); - assert.strictEqual(config.get('adDisplayCount'), 3); + assert.strictEqual(readConfig().adDisplayCount, 3); }); it('should set first display timestamp on first call', () => { @@ -168,7 +183,7 @@ describe('AdvertisementUtils', () => { AdvertisementUtils.shouldShowAdvertisement(); const afterTime = Date.now(); - const timestamp = config.get('adFirstDisplayTime'); + const timestamp = readConfig().adFirstDisplayTime; assert.isNumber(timestamp); assert.isAtLeast(timestamp, beforeTime); assert.isAtMost(timestamp, afterTime); @@ -183,14 +198,14 @@ describe('AdvertisementUtils', () => { // Simulate 3 days passing by setting old timestamp const threeDaysAgo = Date.now() - 3 * 24 * 60 * 60 * 1000 - 1000; - config.set('adFirstDisplayTime', threeDaysAgo); - // Reset cached config - (AdvertisementUtils as any).config = null; + const data = readConfig(); + data.adFirstDisplayTime = threeDaysAgo; + writeConfig(data); // Should return true again after reset assert.isTrue(AdvertisementUtils.shouldShowAdvertisement()); // Counter should be reset to 1 - assert.strictEqual(config.get('adDisplayCount'), 1); + assert.strictEqual(readConfig().adDisplayCount, 1); }); it('should not reset counter before 3 days', () => { @@ -201,9 +216,9 @@ describe('AdvertisementUtils', () => { // Simulate 2 days passing (less than 3 days) const twoDaysAgo = Date.now() - 2 * 24 * 60 * 60 * 1000; - config.set('adFirstDisplayTime', twoDaysAgo); - // Reset cached config - (AdvertisementUtils as any).config = null; + const data = readConfig(); + data.adFirstDisplayTime = twoDaysAgo; + writeConfig(data); // Should still return false assert.isFalse(AdvertisementUtils.shouldShowAdvertisement()); diff --git a/webpack/utils/WebpackUtils.js b/webpack/utils/WebpackUtils.js index 811923509..fe5a52f93 100644 --- a/webpack/utils/WebpackUtils.js +++ b/webpack/utils/WebpackUtils.js @@ -1,7 +1,6 @@ const fs = require('fs'); const copyright = 'Copyright (C) 2016-2026 Timofei Kachalov '; -const sourceMapSupportRequire = 'require("source-map-support").install();'; class WebpackUtils { /** @@ -21,9 +20,6 @@ class WebpackUtils { fs.readFileSync('./LICENSE.BSD', 'utf8') + "\n*/"; } - static getSourceMapSupportImport () { - return sourceMapSupportRequire; - } } module.exports.WebpackUtils = WebpackUtils; diff --git a/webpack/webpack.node.config.js b/webpack/webpack.node.config.js index 3da2d2da5..1ba5b32ad 100644 --- a/webpack/webpack.node.config.js +++ b/webpack/webpack.node.config.js @@ -48,8 +48,7 @@ module.exports = { new webpack.BannerPlugin( { banner: WebpackUtils.getBannerText( - WebpackUtils.getLicenseText(), - WebpackUtils.getSourceMapSupportImport() + WebpackUtils.getLicenseText() ), raw: true, entryOnly: false diff --git a/yarn.lock b/yarn.lock index b65d31b1a..0d919ff1b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -329,10 +329,10 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== -"@javascript-obfuscator/escodegen@2.3.1": - version "2.3.1" - resolved "https://registry.yarnpkg.com/@javascript-obfuscator/escodegen/-/escodegen-2.3.1.tgz#a534e73740830d6c7546ca686773b40b09a6b9d1" - integrity sha512-Z0HEAVwwafOume+6LFXirAVZeuEMKWuPzpFbQhCEU9++BMz0IwEa9bmedJ+rMn/IlXRBID9j3gQ0XYAa6jM10g== +"@javascript-obfuscator/escodegen@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@javascript-obfuscator/escodegen/-/escodegen-2.4.1.tgz#6062541cb3027912e9304dd15f8a5ee5946de247" + integrity sha512-YrEJJDr4cb+pIQKWzHFoDlDkQzatcrNB6OhAD6iTSwiKwzZUMVdobwbOuLpF4EiLxUj0qP28Xl1saTHYzIPCLg== dependencies: "@javascript-obfuscator/estraverse" "^5.3.0" esprima "^4.0.1" @@ -693,13 +693,6 @@ resolved "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz" integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== -"@types/mkdirp@1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@types/mkdirp/-/mkdirp-1.0.2.tgz#8d0bad7aa793abe551860be1f7ae7f3198c16666" - integrity sha512-o0K1tSO0Dx5X6xlU5F1D6625FawhC3dU3iqr25lluNv/+/QIVH8RLNEiVokgIZo+mz+87w/3Mkg/VvQS+J51fQ== - dependencies: - "@types/node" "*" - "@types/mocha@10.0.10": version "10.0.10" resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.10.tgz#91f62905e8d23cbd66225312f239454a23bebfa0" @@ -1024,6 +1017,11 @@ abbrev@^2.0.0: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-2.0.0.tgz#cf59829b8b4f03f89dda2771cb7f3653828c89bf" integrity sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ== +acorn-import-attributes@^1.9.5: + version "1.9.5" + resolved "https://registry.yarnpkg.com/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz#7eb1557b1ba05ef18b5ed0ec67591bfab04688ef" + integrity sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ== + acorn-import-phases@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/acorn-import-phases/-/acorn-import-phases-1.0.4.tgz#16eb850ba99a056cb7cbfe872ffb8972e18c8bd7" @@ -1064,13 +1062,6 @@ ajv-formats@^2.1.1: dependencies: ajv "^8.0.0" -ajv-formats@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-3.0.1.tgz#3d5dc762bca17679c3c2ea7e90ad6b7532309578" - integrity sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ== - dependencies: - ajv "^8.0.0" - ajv-keywords@^3.5.2: version "3.5.2" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" @@ -1103,7 +1094,7 @@ ajv@^8.0.0: require-from-string "^2.0.2" uri-js "^4.2.2" -ajv@^8.17.1, ajv@^8.9.0: +ajv@^8.9.0: version "8.17.1" resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6" integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g== @@ -1298,14 +1289,6 @@ atob@^2.1.2: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -atomically@^2.0.3: - version "2.1.0" - resolved "https://registry.yarnpkg.com/atomically/-/atomically-2.1.0.tgz#5a3ce8ea5ab57b65df589a3b63ef7b753cc0af07" - integrity sha512-+gDffFXRW6sl/HCwbta7zK4uNqbPjv4YJEAdz7Vu+FLQHe77eZ4bvbJGi4hE0QPeJlMYMA3piXEr1UL3dAwx7Q== - dependencies: - stubborn-fs "^2.0.0" - when-exit "^2.1.4" - available-typed-arrays@^1.0.0, available-typed-arrays@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.2.tgz" @@ -1655,21 +1638,6 @@ concat-map@0.0.1: resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -conf@15.0.2: - version "15.0.2" - resolved "https://registry.yarnpkg.com/conf/-/conf-15.0.2.tgz#b983be81227a304b9f885fde6c86c7fe5902dc9d" - integrity sha512-JBSrutapCafTrddF9dH3lc7+T2tBycGF4uPkI4Js+g4vLLEhG6RZcFi3aJd5zntdf5tQxAejJt8dihkoQ/eSJw== - dependencies: - ajv "^8.17.1" - ajv-formats "^3.0.1" - atomically "^2.0.3" - debounce-fn "^6.0.0" - dot-prop "^10.0.0" - env-paths "^3.0.0" - json-schema-typed "^8.0.1" - semver "^7.7.2" - uint8array-extras "^1.5.0" - config-chain@^1.1.13: version "1.1.13" resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4" @@ -1788,13 +1756,6 @@ data-view-byte-offset@^1.0.1: es-errors "^1.3.0" is-data-view "^1.0.1" -debounce-fn@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/debounce-fn/-/debounce-fn-6.0.0.tgz#558169aed853eb3cf3a17c0a2438e1a91a7ba44f" - integrity sha512-rBMW+F2TXryBwB54Q0d8drNEI+TfoS9JpNTAoVpukbWEhjXQq4rySFYLaqXMFXwdv61Zb2OHtj5bviSoimqxRQ== - dependencies: - mimic-function "^5.0.0" - debug@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" @@ -1940,13 +1901,6 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -dot-prop@^10.0.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-10.1.0.tgz#91dbeb6771a9d2c31eab11ade3fdb1d83c4376c4" - integrity sha512-MVUtAugQMOff5RnBy2d9N31iG0lNwg1qAoAOn7pOK5wf94WIaE3My2p3uwTQuvS2AcqchkcR3bHByjaM0mmi7Q== - dependencies: - type-fest "^5.0.0" - dunder-proto@^1.0.0, dunder-proto@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a" @@ -2002,10 +1956,17 @@ enhanced-resolve@^5.17.3: graceful-fs "^4.2.4" tapable "^2.2.0" -env-paths@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-3.0.0.tgz#2f1e89c2f6dbd3408e1b1711dd82d62e317f58da" - integrity sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A== +entities@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/entities/-/entities-6.0.1.tgz#c28c34a43379ca7f61d074130b2f5f7020a30694" + integrity sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g== + +env-paths@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-4.0.0.tgz#d0bb1f84a81d2542581bf7b7e8085d0683b39097" + integrity sha512-pxP8eL2SwwaTRi/KHYwLYXinDs7gL3jxFcBYmEdYfZmZXbaVDvdppd0XBU8qVz03rDfKZMXg1omHCbsJjZrMsw== + dependencies: + is-safe-filename "^0.1.0" envinfo@^7.14.0: version "7.19.0" @@ -3341,6 +3302,11 @@ is-regex@^1.2.1: has-tostringtag "^1.0.2" hasown "^2.0.2" +is-safe-filename@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-safe-filename/-/is-safe-filename-0.1.1.tgz#fb22eead097c614c47aa674de5d79a1648a53e66" + integrity sha512-4SrR7AdnY11LHfDKTZY1u6Ga3RuxZdl3YKWWShO5iyuG5h8QS4GD2tOb04peBJ5I7pXbR+CGBNEhTcwK+FzN3g== + is-set@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.3.tgz#8ab209ea424608141372ded6e0cb200ef1d9d01d" @@ -3653,11 +3619,6 @@ json-schema-traverse@^1.0.0: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== -json-schema-typed@^8.0.1: - version "8.0.2" - resolved "https://registry.yarnpkg.com/json-schema-typed/-/json-schema-typed-8.0.2.tgz#e98ee7b1899ff4a184534d1f167c288c66bbeff4" - integrity sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA== - json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" @@ -3859,11 +3820,6 @@ mime-types@^2.1.27: dependencies: mime-db "1.44.0" -mimic-function@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/mimic-function/-/mimic-function-5.0.1.tgz#acbe2b3349f99b9deaca7fb70e48b83e94e67076" - integrity sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA== - min-indent@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" @@ -3919,11 +3875,6 @@ minimist@^1.2.6: resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== -mkdirp@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-3.0.1.tgz#e44e4c5607fb279c168241713cc6e0fea9adcb50" - integrity sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg== - mocha@11.7.4: version "11.7.4" resolved "https://registry.yarnpkg.com/mocha/-/mocha-11.7.4.tgz#f161b17aeccb0762484b33bdb3f7ab9410ba5c82" @@ -4322,6 +4273,13 @@ parse-json@^5.2.0: json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" +parse5@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-8.0.0.tgz#aceb267f6b15f9b6e6ba9e35bfdd481fc2167b12" + integrity sha512-9m4m5GSgXjL4AjumKzq1Fgfp3Z8rsvjRNbnkVwfu2ImRqE5D0LnY2QfDen18FSY9C573YU5XxSapdHZTZ2WolA== + dependencies: + entities "^6.0.0" + path-exists@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" @@ -4721,7 +4679,7 @@ semver@^7.3.5: dependencies: lru-cache "^6.0.0" -semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.6.3, semver@^7.7.2: +semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.6.3: version "7.7.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.3.tgz#4b5f4143d007633a8dc671cd0a6ef9147b8bb946" integrity sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q== @@ -5105,18 +5063,6 @@ strip-json-comments@^3.1.1: resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -stubborn-fs@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/stubborn-fs/-/stubborn-fs-2.0.0.tgz#628750f81c51c44c04ef50fc70ed4d1caea4f1e9" - integrity sha512-Y0AvSwDw8y+nlSNFXMm2g6L51rBGdAQT20J3YSOqxC53Lo3bjWRtr2BKcfYoAf352WYpsZSTURrA0tqhfgudPA== - dependencies: - stubborn-utils "^1.0.1" - -stubborn-utils@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/stubborn-utils/-/stubborn-utils-1.0.2.tgz#0d9c58ab550f40936235056c7ea6febd925c4d41" - integrity sha512-zOh9jPYI+xrNOyisSelgym4tolKTJCQd5GBhK0+0xJvcYDcwlOoxF/rnFKQ2KRZknXSG9jWAp66fwP6AxN9STg== - supports-color@^5.3.0: version "5.5.0" resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" @@ -5165,11 +5111,6 @@ synckit@^0.9.1: "@pkgr/core" "^0.1.0" tslib "^2.6.2" -tagged-tag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/tagged-tag/-/tagged-tag-1.0.0.tgz#a0b5917c2864cba54841495abfa3f6b13edcf4d6" - integrity sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng== - tapable@^2.2.0: version "2.2.0" resolved "https://registry.npmjs.org/tapable/-/tapable-2.2.0.tgz" @@ -5345,13 +5286,6 @@ type-fest@^0.8.0, type-fest@^0.8.1: resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== -type-fest@^5.0.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-5.3.0.tgz#9422125b3094b1087d8446ba151b72fb9f39411a" - integrity sha512-d9CwU93nN0IA1QL+GSNDdwLAu1Ew5ZjTwupvedwg3WdfoH6pIDvYQ2hV0Uc2nKBLPq7NB5apCx57MLS5qlmO5g== - dependencies: - tagged-tag "^1.0.0" - typed-array-buffer@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz#a72395450a4869ec033fd549371b47af3a2ee536" @@ -5409,11 +5343,6 @@ typescript@5.9.3: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f" integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw== -uint8array-extras@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/uint8array-extras/-/uint8array-extras-1.5.0.tgz#10d2a85213de3ada304fea1c454f635c73839e86" - integrity sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A== - unbox-primitive@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.1.0.tgz#8d9d2c9edeea8460c7f35033a88867944934d1e2" @@ -5575,11 +5504,6 @@ webpack@5.102.1: watchpack "^2.4.4" webpack-sources "^3.3.3" -when-exit@^2.1.4: - version "2.1.5" - resolved "https://registry.yarnpkg.com/when-exit/-/when-exit-2.1.5.tgz#53fa4ffa2ba4c792213fb6617eb7d08f0dcb1a9f" - integrity sha512-VGkKJ564kzt6Ms1dbgPP/yuIoQCrsFAnRbptpC5wOEsDaNsbCB2bnfnaA8i/vRs5tjUSEOtIuvl9/MyVsvQZCg== - which-boxed-primitive@^1.1.0, which-boxed-primitive@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz#d76ec27df7fa165f18d5808374a5fe23c29b176e"