From dcdd3ef776d6d8a1ec7d46ec45a660bd6eea8ede Mon Sep 17 00:00:00 2001 From: sokra Date: Mon, 6 Dec 2021 14:47:00 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9A=99=20Update=20compiled=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/next/compiled/webpack/bundle5.js | 16268 ++++++++++---------- 1 file changed, 8299 insertions(+), 7969 deletions(-) diff --git a/packages/next/compiled/webpack/bundle5.js b/packages/next/compiled/webpack/bundle5.js index be607621676f..609327fadcc9 100644 --- a/packages/next/compiled/webpack/bundle5.js +++ b/packages/next/compiled/webpack/bundle5.js @@ -38,7 +38,7 @@ module.exports = JSON.parse("{\"application/1d-interleaved-parityfec\":{\"source /***/ (function(module) { "use strict"; -module.exports = {"i8":"5.64.3"}; +module.exports = {"i8":"5.65.0"}; /***/ }), @@ -46,7 +46,7 @@ module.exports = {"i8":"5.64.3"}; /***/ (function(module) { "use strict"; -module.exports = JSON.parse("{\"definitions\":{\"Amd\":{\"description\":\"Set the value of `require.amd` and `define.amd`. Or disable AMD support.\",\"anyOf\":[{\"description\":\"You can pass `false` to disable AMD support.\",\"enum\":[false]},{\"description\":\"You can pass an object to set the value of `require.amd` and `define.amd`.\",\"type\":\"object\"}]},\"AssetFilterItemTypes\":{\"description\":\"Filtering value, regexp or function.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":false},{\"instanceof\":\"Function\",\"tsType\":\"((name: string, asset: import('../lib/stats/DefaultStatsFactoryPlugin').StatsAsset) => boolean)\"}]},\"AssetFilterTypes\":{\"description\":\"Filtering modules.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Rule to filter.\",\"cli\":{\"helper\":true},\"oneOf\":[{\"$ref\":\"#/definitions/AssetFilterItemTypes\"}]}},{\"$ref\":\"#/definitions/AssetFilterItemTypes\"}]},\"AssetGeneratorDataUrl\":{\"description\":\"The options for data url generator.\",\"anyOf\":[{\"$ref\":\"#/definitions/AssetGeneratorDataUrlOptions\"},{\"$ref\":\"#/definitions/AssetGeneratorDataUrlFunction\"}]},\"AssetGeneratorDataUrlFunction\":{\"description\":\"Function that executes for module and should return an DataUrl string.\",\"instanceof\":\"Function\",\"tsType\":\"((source: string | Buffer, context: { filename: string, module: import('../lib/Module') }) => string)\"},\"AssetGeneratorDataUrlOptions\":{\"description\":\"Options object for data url generation.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"encoding\":{\"description\":\"Asset encoding (defaults to base64).\",\"enum\":[false,\"base64\"]},\"mimetype\":{\"description\":\"Asset mimetype (getting from file extension by default).\",\"type\":\"string\"}}},\"AssetGeneratorOptions\":{\"description\":\"Generator options for asset modules.\",\"type\":\"object\",\"implements\":[\"#/definitions/AssetInlineGeneratorOptions\",\"#/definitions/AssetResourceGeneratorOptions\"],\"additionalProperties\":false,\"properties\":{\"dataUrl\":{\"$ref\":\"#/definitions/AssetGeneratorDataUrl\"},\"emit\":{\"description\":\"Emit an output asset from this asset module. This can be set to 'false' to omit emitting e. g. for SSR.\",\"type\":\"boolean\"},\"filename\":{\"$ref\":\"#/definitions/FilenameTemplate\"},\"publicPath\":{\"$ref\":\"#/definitions/RawPublicPath\"}}},\"AssetInlineGeneratorOptions\":{\"description\":\"Generator options for asset/inline modules.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"dataUrl\":{\"$ref\":\"#/definitions/AssetGeneratorDataUrl\"}}},\"AssetModuleFilename\":{\"description\":\"The filename of asset modules as relative path inside the 'output.path' directory.\",\"anyOf\":[{\"type\":\"string\",\"absolutePath\":false},{\"instanceof\":\"Function\",\"tsType\":\"((pathData: import(\\\"../lib/Compilation\\\").PathData, assetInfo?: import(\\\"../lib/Compilation\\\").AssetInfo) => string)\"}]},\"AssetParserDataUrlFunction\":{\"description\":\"Function that executes for module and should return whenever asset should be inlined as DataUrl.\",\"instanceof\":\"Function\",\"tsType\":\"((source: string | Buffer, context: { filename: string, module: import('../lib/Module') }) => boolean)\"},\"AssetParserDataUrlOptions\":{\"description\":\"Options object for DataUrl condition.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"maxSize\":{\"description\":\"Maximum size of asset that should be inline as modules. Default: 8kb.\",\"type\":\"number\"}}},\"AssetParserOptions\":{\"description\":\"Parser options for asset modules.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"dataUrlCondition\":{\"description\":\"The condition for inlining the asset as DataUrl.\",\"anyOf\":[{\"$ref\":\"#/definitions/AssetParserDataUrlOptions\"},{\"$ref\":\"#/definitions/AssetParserDataUrlFunction\"}]}}},\"AssetResourceGeneratorOptions\":{\"description\":\"Generator options for asset/resource modules.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"emit\":{\"description\":\"Emit an output asset from this asset module. This can be set to 'false' to omit emitting e. g. for SSR.\",\"type\":\"boolean\"},\"filename\":{\"$ref\":\"#/definitions/FilenameTemplate\"},\"publicPath\":{\"$ref\":\"#/definitions/RawPublicPath\"}}},\"AuxiliaryComment\":{\"description\":\"Add a comment in the UMD wrapper.\",\"anyOf\":[{\"description\":\"Append the same comment above each import style.\",\"type\":\"string\"},{\"$ref\":\"#/definitions/LibraryCustomUmdCommentObject\"}]},\"Bail\":{\"description\":\"Report the first error as a hard error instead of tolerating it.\",\"type\":\"boolean\"},\"CacheOptions\":{\"description\":\"Cache generated modules and chunks to improve performance for multiple incremental builds.\",\"anyOf\":[{\"description\":\"Enable in memory caching.\",\"enum\":[true]},{\"$ref\":\"#/definitions/CacheOptionsNormalized\"}]},\"CacheOptionsNormalized\":{\"description\":\"Cache generated modules and chunks to improve performance for multiple incremental builds.\",\"anyOf\":[{\"description\":\"Disable caching.\",\"enum\":[false]},{\"$ref\":\"#/definitions/MemoryCacheOptions\"},{\"$ref\":\"#/definitions/FileCacheOptions\"}]},\"Charset\":{\"description\":\"Add charset attribute for script tag.\",\"type\":\"boolean\"},\"ChunkFilename\":{\"description\":\"Specifies the filename template of output files of non-initial chunks on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.\",\"oneOf\":[{\"$ref\":\"#/definitions/FilenameTemplate\"}]},\"ChunkFormat\":{\"description\":\"The format of chunks (formats included by default are 'array-push' (web/WebWorker), 'commonjs' (node.js), 'module' (ESM), but others might be added by plugins).\",\"anyOf\":[{\"enum\":[\"array-push\",\"commonjs\",\"module\",false]},{\"type\":\"string\"}]},\"ChunkLoadTimeout\":{\"description\":\"Number of milliseconds before chunk request expires.\",\"type\":\"number\"},\"ChunkLoading\":{\"description\":\"The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).\",\"anyOf\":[{\"enum\":[false]},{\"$ref\":\"#/definitions/ChunkLoadingType\"}]},\"ChunkLoadingGlobal\":{\"description\":\"The global variable used by webpack for loading of chunks.\",\"type\":\"string\"},\"ChunkLoadingType\":{\"description\":\"The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).\",\"anyOf\":[{\"enum\":[\"jsonp\",\"import-scripts\",\"require\",\"async-node\",\"import\"]},{\"type\":\"string\"}]},\"Clean\":{\"description\":\"Clean the output directory before emit.\",\"anyOf\":[{\"type\":\"boolean\"},{\"$ref\":\"#/definitions/CleanOptions\"}]},\"CleanOptions\":{\"description\":\"Advanced options for cleaning assets.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"dry\":{\"description\":\"Log the assets that should be removed instead of deleting them.\",\"type\":\"boolean\"},\"keep\":{\"description\":\"Keep these assets.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":false},{\"instanceof\":\"Function\",\"tsType\":\"((filename: string) => boolean)\"}]}}},\"CompareBeforeEmit\":{\"description\":\"Check if to be emitted file already exists and have the same content before writing to output filesystem.\",\"type\":\"boolean\"},\"Context\":{\"description\":\"The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.\",\"type\":\"string\",\"absolutePath\":true},\"CrossOriginLoading\":{\"description\":\"This option enables cross-origin loading of chunks.\",\"enum\":[false,\"anonymous\",\"use-credentials\"]},\"Dependencies\":{\"description\":\"References to other configurations to depend on.\",\"type\":\"array\",\"items\":{\"description\":\"References to another configuration to depend on.\",\"type\":\"string\"}},\"DevServer\":{\"description\":\"Options for the webpack-dev-server.\",\"type\":\"object\"},\"DevTool\":{\"description\":\"A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).\",\"anyOf\":[{\"enum\":[false,\"eval\"]},{\"type\":\"string\",\"pattern\":\"^(inline-|hidden-|eval-)?(nosources-)?(cheap-(module-)?)?source-map$\"}]},\"DevtoolFallbackModuleFilenameTemplate\":{\"description\":\"Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.\",\"anyOf\":[{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"DevtoolModuleFilenameTemplate\":{\"description\":\"Filename template string of function for the sources array in a generated SourceMap.\",\"anyOf\":[{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"DevtoolNamespace\":{\"description\":\"Module namespace to use when interpolating filename template string for the sources array in a generated SourceMap. Defaults to `output.library` if not set. It's useful for avoiding runtime collisions in sourcemaps from multiple webpack projects built as libraries.\",\"type\":\"string\"},\"EmptyGeneratorOptions\":{\"description\":\"No generator options are supported for this module type.\",\"type\":\"object\",\"additionalProperties\":false},\"EmptyParserOptions\":{\"description\":\"No parser options are supported for this module type.\",\"type\":\"object\",\"additionalProperties\":false},\"EnabledChunkLoadingTypes\":{\"description\":\"List of chunk loading types enabled for use by entry points.\",\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/ChunkLoadingType\"}},\"EnabledLibraryTypes\":{\"description\":\"List of library types enabled for use by entry points.\",\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/LibraryType\"}},\"EnabledWasmLoadingTypes\":{\"description\":\"List of wasm loading types enabled for use by entry points.\",\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/WasmLoadingType\"}},\"Entry\":{\"description\":\"The entry point(s) of the compilation.\",\"anyOf\":[{\"$ref\":\"#/definitions/EntryDynamic\"},{\"$ref\":\"#/definitions/EntryStatic\"}]},\"EntryDescription\":{\"description\":\"An object with entry point description.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"asyncChunks\":{\"description\":\"Enable/disable creating async chunks that are loaded on demand.\",\"type\":\"boolean\"},\"chunkLoading\":{\"$ref\":\"#/definitions/ChunkLoading\"},\"dependOn\":{\"description\":\"The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.\",\"anyOf\":[{\"description\":\"The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.\",\"type\":\"array\",\"items\":{\"description\":\"An entrypoint that the current entrypoint depend on. It must be loaded when this entrypoint is loaded.\",\"type\":\"string\",\"minLength\":1},\"minItems\":1,\"uniqueItems\":true},{\"description\":\"An entrypoint that the current entrypoint depend on. It must be loaded when this entrypoint is loaded.\",\"type\":\"string\",\"minLength\":1}]},\"filename\":{\"$ref\":\"#/definitions/EntryFilename\"},\"import\":{\"$ref\":\"#/definitions/EntryItem\"},\"layer\":{\"$ref\":\"#/definitions/Layer\"},\"library\":{\"$ref\":\"#/definitions/LibraryOptions\"},\"publicPath\":{\"$ref\":\"#/definitions/PublicPath\"},\"runtime\":{\"$ref\":\"#/definitions/EntryRuntime\"},\"wasmLoading\":{\"$ref\":\"#/definitions/WasmLoading\"}},\"required\":[\"import\"]},\"EntryDescriptionNormalized\":{\"description\":\"An object with entry point description.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"asyncChunks\":{\"description\":\"Enable/disable creating async chunks that are loaded on demand.\",\"type\":\"boolean\"},\"chunkLoading\":{\"$ref\":\"#/definitions/ChunkLoading\"},\"dependOn\":{\"description\":\"The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.\",\"type\":\"array\",\"items\":{\"description\":\"An entrypoint that the current entrypoint depend on. It must be loaded when this entrypoint is loaded.\",\"type\":\"string\",\"minLength\":1},\"minItems\":1,\"uniqueItems\":true},\"filename\":{\"$ref\":\"#/definitions/Filename\"},\"import\":{\"description\":\"Module(s) that are loaded upon startup. The last one is exported.\",\"type\":\"array\",\"items\":{\"description\":\"Module that is loaded upon startup. Only the last one is exported.\",\"type\":\"string\",\"minLength\":1},\"minItems\":1,\"uniqueItems\":true},\"layer\":{\"$ref\":\"#/definitions/Layer\"},\"library\":{\"$ref\":\"#/definitions/LibraryOptions\"},\"publicPath\":{\"$ref\":\"#/definitions/PublicPath\"},\"runtime\":{\"$ref\":\"#/definitions/EntryRuntime\"},\"wasmLoading\":{\"$ref\":\"#/definitions/WasmLoading\"}}},\"EntryDynamic\":{\"description\":\"A Function returning an entry object, an entry string, an entry array or a promise to these things.\",\"instanceof\":\"Function\",\"tsType\":\"(() => EntryStatic | Promise)\"},\"EntryDynamicNormalized\":{\"description\":\"A Function returning a Promise resolving to a normalized entry.\",\"instanceof\":\"Function\",\"tsType\":\"(() => Promise)\"},\"EntryFilename\":{\"description\":\"Specifies the filename of the output file on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.\",\"oneOf\":[{\"$ref\":\"#/definitions/FilenameTemplate\"}]},\"EntryItem\":{\"description\":\"Module(s) that are loaded upon startup.\",\"anyOf\":[{\"description\":\"All modules are loaded upon startup. The last one is exported.\",\"type\":\"array\",\"items\":{\"description\":\"A module that is loaded upon startup. Only the last one is exported.\",\"type\":\"string\",\"minLength\":1},\"minItems\":1,\"uniqueItems\":true},{\"description\":\"The string is resolved to a module which is loaded upon startup.\",\"type\":\"string\",\"minLength\":1}]},\"EntryNormalized\":{\"description\":\"The entry point(s) of the compilation.\",\"anyOf\":[{\"$ref\":\"#/definitions/EntryDynamicNormalized\"},{\"$ref\":\"#/definitions/EntryStaticNormalized\"}]},\"EntryObject\":{\"description\":\"Multiple entry bundles are created. The key is the entry name. The value can be a string, an array or an entry description object.\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"An entry point with name.\",\"anyOf\":[{\"$ref\":\"#/definitions/EntryItem\"},{\"$ref\":\"#/definitions/EntryDescription\"}]}},\"EntryRuntime\":{\"description\":\"The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\",\"minLength\":1}]},\"EntryStatic\":{\"description\":\"A static entry description.\",\"anyOf\":[{\"$ref\":\"#/definitions/EntryObject\"},{\"$ref\":\"#/definitions/EntryUnnamed\"}]},\"EntryStaticNormalized\":{\"description\":\"Multiple entry bundles are created. The key is the entry name. The value is an entry description object.\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"An object with entry point description.\",\"oneOf\":[{\"$ref\":\"#/definitions/EntryDescriptionNormalized\"}]}},\"EntryUnnamed\":{\"description\":\"An entry point without name.\",\"oneOf\":[{\"$ref\":\"#/definitions/EntryItem\"}]},\"Environment\":{\"description\":\"The abilities of the environment where the webpack generated code should run.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"arrowFunction\":{\"description\":\"The environment supports arrow functions ('() => { ... }').\",\"type\":\"boolean\"},\"bigIntLiteral\":{\"description\":\"The environment supports BigInt as literal (123n).\",\"type\":\"boolean\"},\"const\":{\"description\":\"The environment supports const and let for variable declarations.\",\"type\":\"boolean\"},\"destructuring\":{\"description\":\"The environment supports destructuring ('{ a, b } = obj').\",\"type\":\"boolean\"},\"dynamicImport\":{\"description\":\"The environment supports an async import() function to import EcmaScript modules.\",\"type\":\"boolean\"},\"forOf\":{\"description\":\"The environment supports 'for of' iteration ('for (const x of array) { ... }').\",\"type\":\"boolean\"},\"module\":{\"description\":\"The environment supports EcmaScript Module syntax to import EcmaScript modules (import ... from '...').\",\"type\":\"boolean\"}}},\"Experiments\":{\"description\":\"Enables/Disables experiments (experimental features with relax SemVer compatibility).\",\"type\":\"object\",\"implements\":[\"#/definitions/ExperimentsCommon\"],\"additionalProperties\":false,\"properties\":{\"asyncWebAssembly\":{\"description\":\"Support WebAssembly as asynchronous EcmaScript Module.\",\"type\":\"boolean\"},\"backCompat\":{\"description\":\"Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.\",\"type\":\"boolean\"},\"buildHttp\":{\"description\":\"Build http(s): urls using a lockfile and resource content cache.\",\"anyOf\":[{\"$ref\":\"#/definitions/HttpUriAllowedUris\"},{\"$ref\":\"#/definitions/HttpUriOptions\"}]},\"cacheUnaffected\":{\"description\":\"Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.\",\"type\":\"boolean\"},\"futureDefaults\":{\"description\":\"Apply defaults of next major version.\",\"type\":\"boolean\"},\"layers\":{\"description\":\"Enable module layers.\",\"type\":\"boolean\"},\"lazyCompilation\":{\"description\":\"Compile entrypoints and import()s only when they are accessed.\",\"anyOf\":[{\"type\":\"boolean\"},{\"$ref\":\"#/definitions/LazyCompilationOptions\"}]},\"outputModule\":{\"description\":\"Allow output javascript files as module source type.\",\"type\":\"boolean\"},\"syncWebAssembly\":{\"description\":\"Support WebAssembly as synchronous EcmaScript Module (outdated).\",\"type\":\"boolean\"},\"topLevelAwait\":{\"description\":\"Allow using top-level-await in EcmaScript Modules.\",\"type\":\"boolean\"}}},\"ExperimentsCommon\":{\"description\":\"Enables/Disables experiments (experimental features with relax SemVer compatibility).\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"asyncWebAssembly\":{\"description\":\"Support WebAssembly as asynchronous EcmaScript Module.\",\"type\":\"boolean\"},\"backCompat\":{\"description\":\"Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.\",\"type\":\"boolean\"},\"cacheUnaffected\":{\"description\":\"Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.\",\"type\":\"boolean\"},\"futureDefaults\":{\"description\":\"Apply defaults of next major version.\",\"type\":\"boolean\"},\"layers\":{\"description\":\"Enable module layers.\",\"type\":\"boolean\"},\"outputModule\":{\"description\":\"Allow output javascript files as module source type.\",\"type\":\"boolean\"},\"syncWebAssembly\":{\"description\":\"Support WebAssembly as synchronous EcmaScript Module (outdated).\",\"type\":\"boolean\"},\"topLevelAwait\":{\"description\":\"Allow using top-level-await in EcmaScript Modules.\",\"type\":\"boolean\"}}},\"ExperimentsNormalized\":{\"description\":\"Enables/Disables experiments (experimental features with relax SemVer compatibility).\",\"type\":\"object\",\"implements\":[\"#/definitions/ExperimentsCommon\"],\"additionalProperties\":false,\"properties\":{\"asyncWebAssembly\":{\"description\":\"Support WebAssembly as asynchronous EcmaScript Module.\",\"type\":\"boolean\"},\"backCompat\":{\"description\":\"Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.\",\"type\":\"boolean\"},\"buildHttp\":{\"description\":\"Build http(s): urls using a lockfile and resource content cache.\",\"oneOf\":[{\"$ref\":\"#/definitions/HttpUriOptions\"}]},\"cacheUnaffected\":{\"description\":\"Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.\",\"type\":\"boolean\"},\"futureDefaults\":{\"description\":\"Apply defaults of next major version.\",\"type\":\"boolean\"},\"layers\":{\"description\":\"Enable module layers.\",\"type\":\"boolean\"},\"lazyCompilation\":{\"description\":\"Compile entrypoints and import()s only when they are accessed.\",\"oneOf\":[{\"$ref\":\"#/definitions/LazyCompilationOptions\"}]},\"outputModule\":{\"description\":\"Allow output javascript files as module source type.\",\"type\":\"boolean\"},\"syncWebAssembly\":{\"description\":\"Support WebAssembly as synchronous EcmaScript Module (outdated).\",\"type\":\"boolean\"},\"topLevelAwait\":{\"description\":\"Allow using top-level-await in EcmaScript Modules.\",\"type\":\"boolean\"}}},\"ExternalItem\":{\"description\":\"Specify dependency that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.\",\"anyOf\":[{\"description\":\"Every matched dependency becomes external.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"description\":\"An exact matched dependency becomes external. The same string is used as external dependency.\",\"type\":\"string\"},{\"description\":\"If an dependency matches exactly a property of the object, the property value is used as dependency.\",\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#/definitions/ExternalItemValue\"},\"properties\":{\"byLayer\":{\"description\":\"Specify externals depending on the layer.\",\"anyOf\":[{\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#/definitions/ExternalItem\"}},{\"instanceof\":\"Function\",\"tsType\":\"((layer: string | null) => ExternalItem)\"}]}}},{\"description\":\"The function is called on each dependency (`function(context, request, callback(err, result))`).\",\"instanceof\":\"Function\",\"tsType\":\"(((data: ExternalItemFunctionData, callback: (err?: Error, result?: ExternalItemValue) => void) => void) | ((data: ExternalItemFunctionData) => Promise))\"}]},\"ExternalItemFunctionData\":{\"description\":\"Data object passed as argument when a function is set for 'externals'.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"context\":{\"description\":\"The directory in which the request is placed.\",\"type\":\"string\"},\"contextInfo\":{\"description\":\"Contextual information.\",\"type\":\"object\",\"tsType\":\"import('../lib/ModuleFactory').ModuleFactoryCreateDataContextInfo\"},\"dependencyType\":{\"description\":\"The category of the referencing dependencies.\",\"type\":\"string\"},\"getResolve\":{\"description\":\"Get a resolve function with the current resolver options.\",\"instanceof\":\"Function\",\"tsType\":\"((options?: ResolveOptions) => ((context: string, request: string, callback: (err?: Error, result?: string) => void) => void) | ((context: string, request: string) => Promise))\"},\"request\":{\"description\":\"The request as written by the user in the require/import expression/statement.\",\"type\":\"string\"}}},\"ExternalItemValue\":{\"description\":\"The dependency used for the external.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"A part of the target of the external.\",\"type\":\"string\",\"minLength\":1}},{\"description\":\"`true`: The dependency name is used as target of the external.\",\"type\":\"boolean\"},{\"description\":\"The target of the external.\",\"type\":\"string\"},{\"type\":\"object\"}]},\"Externals\":{\"description\":\"Specify dependencies that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/ExternalItem\"}},{\"$ref\":\"#/definitions/ExternalItem\"}]},\"ExternalsPresets\":{\"description\":\"Enable presets of externals for specific targets.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"electron\":{\"description\":\"Treat common electron built-in modules in main and preload context like 'electron', 'ipc' or 'shell' as external and load them via require() when used.\",\"type\":\"boolean\"},\"electronMain\":{\"description\":\"Treat electron built-in modules in the main context like 'app', 'ipc-main' or 'shell' as external and load them via require() when used.\",\"type\":\"boolean\"},\"electronPreload\":{\"description\":\"Treat electron built-in modules in the preload context like 'web-frame', 'ipc-renderer' or 'shell' as external and load them via require() when used.\",\"type\":\"boolean\"},\"electronRenderer\":{\"description\":\"Treat electron built-in modules in the renderer context like 'web-frame', 'ipc-renderer' or 'shell' as external and load them via require() when used.\",\"type\":\"boolean\"},\"node\":{\"description\":\"Treat node.js built-in modules like fs, path or vm as external and load them via require() when used.\",\"type\":\"boolean\"},\"nwjs\":{\"description\":\"Treat NW.js legacy nw.gui module as external and load it via require() when used.\",\"type\":\"boolean\"},\"web\":{\"description\":\"Treat references to 'http(s)://...' and 'std:...' as external and load them via import when used (Note that this changes execution order as externals are executed before any other code in the chunk).\",\"type\":\"boolean\"},\"webAsync\":{\"description\":\"Treat references to 'http(s)://...' and 'std:...' as external and load them via async import() when used (Note that this external type is an async module, which has various effects on the execution).\",\"type\":\"boolean\"}}},\"ExternalsType\":{\"description\":\"Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).\",\"enum\":[\"var\",\"module\",\"assign\",\"this\",\"window\",\"self\",\"global\",\"commonjs\",\"commonjs2\",\"commonjs-module\",\"amd\",\"amd-require\",\"umd\",\"umd2\",\"jsonp\",\"system\",\"promise\",\"import\",\"script\",\"node-commonjs\"]},\"FileCacheOptions\":{\"description\":\"Options object for persistent file-based caching.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"allowCollectingMemory\":{\"description\":\"Allows to collect unused memory allocated during deserialization. This requires copying data into smaller buffers and has a performance cost.\",\"type\":\"boolean\"},\"buildDependencies\":{\"description\":\"Dependencies the build depends on (in multiple categories, default categories: 'defaultWebpack').\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"List of dependencies the build depends on.\",\"type\":\"array\",\"items\":{\"description\":\"Request to a dependency (resolved as directory relative to the context directory).\",\"type\":\"string\",\"minLength\":1}}},\"cacheDirectory\":{\"description\":\"Base directory for the cache (defaults to node_modules/.cache/webpack).\",\"type\":\"string\",\"absolutePath\":true},\"cacheLocation\":{\"description\":\"Locations for the cache (defaults to cacheDirectory / name).\",\"type\":\"string\",\"absolutePath\":true},\"compression\":{\"description\":\"Compression type used for the cache files.\",\"enum\":[false,\"gzip\",\"brotli\"]},\"hashAlgorithm\":{\"description\":\"Algorithm used for generation the hash (see node.js crypto package).\",\"type\":\"string\"},\"idleTimeout\":{\"description\":\"Time in ms after which idle period the cache storing should happen.\",\"type\":\"number\",\"minimum\":0},\"idleTimeoutAfterLargeChanges\":{\"description\":\"Time in ms after which idle period the cache storing should happen when larger changes has been detected (cumulative build time > 2 x avg cache store time).\",\"type\":\"number\",\"minimum\":0},\"idleTimeoutForInitialStore\":{\"description\":\"Time in ms after which idle period the initial cache storing should happen.\",\"type\":\"number\",\"minimum\":0},\"immutablePaths\":{\"description\":\"List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.\",\"type\":\"array\",\"items\":{\"description\":\"List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.\",\"anyOf\":[{\"description\":\"A RegExp matching an immutable directory (usually a package manager cache directory, including the tailing slash)\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"description\":\"A path to an immutable directory (usually a package manager cache directory).\",\"type\":\"string\",\"absolutePath\":true,\"minLength\":1}]}},\"managedPaths\":{\"description\":\"List of paths that are managed by a package manager and can be trusted to not be modified otherwise.\",\"type\":\"array\",\"items\":{\"description\":\"List of paths that are managed by a package manager and can be trusted to not be modified otherwise.\",\"anyOf\":[{\"description\":\"A RegExp matching a managed directory (usually a node_modules directory, including the tailing slash)\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"description\":\"A path to a managed directory (usually a node_modules directory).\",\"type\":\"string\",\"absolutePath\":true,\"minLength\":1}]}},\"maxAge\":{\"description\":\"Time for which unused cache entries stay in the filesystem cache at minimum (in milliseconds).\",\"type\":\"number\",\"minimum\":0},\"maxMemoryGenerations\":{\"description\":\"Number of generations unused cache entries stay in memory cache at minimum (0 = no memory cache used, 1 = may be removed after unused for a single compilation, ..., Infinity: kept forever). Cache entries will be deserialized from disk when removed from memory cache.\",\"type\":\"number\",\"minimum\":0},\"memoryCacheUnaffected\":{\"description\":\"Additionally cache computation of modules that are unchanged and reference only unchanged modules in memory.\",\"type\":\"boolean\"},\"name\":{\"description\":\"Name for the cache. Different names will lead to different coexisting caches.\",\"type\":\"string\"},\"profile\":{\"description\":\"Track and log detailed timing information for individual cache items.\",\"type\":\"boolean\"},\"store\":{\"description\":\"When to store data to the filesystem. (pack: Store data when compiler is idle in a single file).\",\"enum\":[\"pack\"]},\"type\":{\"description\":\"Filesystem caching.\",\"enum\":[\"filesystem\"]},\"version\":{\"description\":\"Version of the cache data. Different versions won't allow to reuse the cache and override existing content. Update the version when config changed in a way which doesn't allow to reuse cache. This will invalidate the cache.\",\"type\":\"string\"}},\"required\":[\"type\"]},\"Filename\":{\"description\":\"Specifies the filename of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.\",\"oneOf\":[{\"$ref\":\"#/definitions/FilenameTemplate\"}]},\"FilenameTemplate\":{\"description\":\"Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.\",\"anyOf\":[{\"type\":\"string\",\"absolutePath\":false,\"minLength\":1},{\"instanceof\":\"Function\",\"tsType\":\"((pathData: import(\\\"../lib/Compilation\\\").PathData, assetInfo?: import(\\\"../lib/Compilation\\\").AssetInfo) => string)\"}]},\"FilterItemTypes\":{\"description\":\"Filtering value, regexp or function.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":false},{\"instanceof\":\"Function\",\"tsType\":\"((value: string) => boolean)\"}]},\"FilterTypes\":{\"description\":\"Filtering values.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Rule to filter.\",\"cli\":{\"helper\":true},\"oneOf\":[{\"$ref\":\"#/definitions/FilterItemTypes\"}]}},{\"$ref\":\"#/definitions/FilterItemTypes\"}]},\"GeneratorOptionsByModuleType\":{\"description\":\"Specify options for each generator.\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"Options for generating.\",\"type\":\"object\",\"additionalProperties\":true},\"properties\":{\"asset\":{\"$ref\":\"#/definitions/AssetGeneratorOptions\"},\"asset/inline\":{\"$ref\":\"#/definitions/AssetInlineGeneratorOptions\"},\"asset/resource\":{\"$ref\":\"#/definitions/AssetResourceGeneratorOptions\"},\"javascript\":{\"$ref\":\"#/definitions/EmptyGeneratorOptions\"},\"javascript/auto\":{\"$ref\":\"#/definitions/EmptyGeneratorOptions\"},\"javascript/dynamic\":{\"$ref\":\"#/definitions/EmptyGeneratorOptions\"},\"javascript/esm\":{\"$ref\":\"#/definitions/EmptyGeneratorOptions\"}}},\"GlobalObject\":{\"description\":\"An expression which is used to address the global object/scope in runtime code.\",\"type\":\"string\",\"minLength\":1},\"HashDigest\":{\"description\":\"Digest type used for the hash.\",\"type\":\"string\"},\"HashDigestLength\":{\"description\":\"Number of chars which are used for the hash.\",\"type\":\"number\",\"minimum\":1},\"HashFunction\":{\"description\":\"Algorithm used for generation the hash (see node.js crypto package).\",\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"instanceof\":\"Function\",\"tsType\":\"typeof import('../lib/util/Hash')\"}]},\"HashSalt\":{\"description\":\"Any string which is added to the hash to salt it.\",\"type\":\"string\",\"minLength\":1},\"HotUpdateChunkFilename\":{\"description\":\"The filename of the Hot Update Chunks. They are inside the output.path directory.\",\"type\":\"string\",\"absolutePath\":false},\"HotUpdateGlobal\":{\"description\":\"The global variable used by webpack for loading of hot update chunks.\",\"type\":\"string\"},\"HotUpdateMainFilename\":{\"description\":\"The filename of the Hot Update Main File. It is inside the 'output.path' directory.\",\"type\":\"string\",\"absolutePath\":false},\"HttpUriAllowedUris\":{\"description\":\"List of allowed URIs for building http resources.\",\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/HttpUriOptionsAllowedUris\"}]},\"HttpUriOptions\":{\"description\":\"Options for building http resources.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"allowedUris\":{\"$ref\":\"#/definitions/HttpUriOptionsAllowedUris\"},\"cacheLocation\":{\"description\":\"Location where resource content is stored for lockfile entries. It's also possible to disable storing by passing false.\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\",\"absolutePath\":true}]},\"frozen\":{\"description\":\"When set, anything that would lead to a modification of the lockfile or any resource content, will result in an error.\",\"type\":\"boolean\"},\"lockfileLocation\":{\"description\":\"Location of the lockfile.\",\"type\":\"string\",\"absolutePath\":true},\"upgrade\":{\"description\":\"When set, resources of existing lockfile entries will be fetched and entries will be upgraded when resource content has changed.\",\"type\":\"boolean\"}},\"required\":[\"allowedUris\"]},\"HttpUriOptionsAllowedUris\":{\"description\":\"List of allowed URIs (resp. the beginning of them).\",\"type\":\"array\",\"items\":{\"description\":\"List of allowed URIs (resp. the beginning of them).\",\"anyOf\":[{\"description\":\"Allowed URI pattern.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"description\":\"Allowed URI (resp. the beginning of it).\",\"type\":\"string\",\"pattern\":\"^https?://\"},{\"description\":\"Allowed URI filter function.\",\"instanceof\":\"Function\",\"tsType\":\"((uri: string) => boolean)\"}]}},\"IgnoreWarnings\":{\"description\":\"Ignore specific warnings.\",\"type\":\"array\",\"items\":{\"description\":\"Ignore specific warnings.\",\"anyOf\":[{\"description\":\"A RegExp to select the warning message.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"file\":{\"description\":\"A RegExp to select the origin file for the warning.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},\"message\":{\"description\":\"A RegExp to select the warning message.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},\"module\":{\"description\":\"A RegExp to select the origin module for the warning.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"}}},{\"description\":\"A custom function to select warnings based on the raw warning instance.\",\"instanceof\":\"Function\",\"tsType\":\"((warning: import('../lib/WebpackError'), compilation: import('../lib/Compilation')) => boolean)\"}]}},\"IgnoreWarningsNormalized\":{\"description\":\"Ignore specific warnings.\",\"type\":\"array\",\"items\":{\"description\":\"A function to select warnings based on the raw warning instance.\",\"instanceof\":\"Function\",\"tsType\":\"((warning: import('../lib/WebpackError'), compilation: import('../lib/Compilation')) => boolean)\"}},\"Iife\":{\"description\":\"Wrap javascript code into IIFE's to avoid leaking into global scope.\",\"type\":\"boolean\"},\"ImportFunctionName\":{\"description\":\"The name of the native import() function (can be exchanged for a polyfill).\",\"type\":\"string\"},\"ImportMetaName\":{\"description\":\"The name of the native import.meta object (can be exchanged for a polyfill).\",\"type\":\"string\"},\"InfrastructureLogging\":{\"description\":\"Options for infrastructure level logging.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"appendOnly\":{\"description\":\"Only appends lines to the output. Avoids updating existing output e. g. for status messages. This option is only used when no custom console is provided.\",\"type\":\"boolean\"},\"colors\":{\"description\":\"Enables/Disables colorful output. This option is only used when no custom console is provided.\",\"type\":\"boolean\"},\"console\":{\"description\":\"Custom console used for logging.\",\"tsType\":\"Console\"},\"debug\":{\"description\":\"Enable debug logging for specific loggers.\",\"anyOf\":[{\"description\":\"Enable/Disable debug logging for all loggers.\",\"type\":\"boolean\"},{\"$ref\":\"#/definitions/FilterTypes\"}]},\"level\":{\"description\":\"Log level.\",\"enum\":[\"none\",\"error\",\"warn\",\"info\",\"log\",\"verbose\"]},\"stream\":{\"description\":\"Stream used for logging output. Defaults to process.stderr. This option is only used when no custom console is provided.\",\"tsType\":\"NodeJS.WritableStream\"}}},\"JavascriptParserOptions\":{\"description\":\"Parser options for javascript modules.\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"amd\":{\"$ref\":\"#/definitions/Amd\"},\"browserify\":{\"description\":\"Enable/disable special handling for browserify bundles.\",\"type\":\"boolean\"},\"commonjs\":{\"description\":\"Enable/disable parsing of CommonJs syntax.\",\"type\":\"boolean\"},\"commonjsMagicComments\":{\"description\":\"Enable/disable parsing of magic comments in CommonJs syntax.\",\"type\":\"boolean\"},\"exportsPresence\":{\"description\":\"Specifies the behavior of invalid export names in \\\"import ... from ...\\\" and \\\"export ... from ...\\\".\",\"enum\":[\"error\",\"warn\",\"auto\",false]},\"exprContextCritical\":{\"description\":\"Enable warnings for full dynamic dependencies.\",\"type\":\"boolean\"},\"exprContextRecursive\":{\"description\":\"Enable recursive directory lookup for full dynamic dependencies.\",\"type\":\"boolean\"},\"exprContextRegExp\":{\"description\":\"Sets the default regular expression for full dynamic dependencies.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"boolean\"}]},\"exprContextRequest\":{\"description\":\"Set the default request for full dynamic dependencies.\",\"type\":\"string\"},\"harmony\":{\"description\":\"Enable/disable parsing of EcmaScript Modules syntax.\",\"type\":\"boolean\"},\"import\":{\"description\":\"Enable/disable parsing of import() syntax.\",\"type\":\"boolean\"},\"importExportsPresence\":{\"description\":\"Specifies the behavior of invalid export names in \\\"import ... from ...\\\".\",\"enum\":[\"error\",\"warn\",\"auto\",false]},\"node\":{\"$ref\":\"#/definitions/Node\"},\"reexportExportsPresence\":{\"description\":\"Specifies the behavior of invalid export names in \\\"export ... from ...\\\". This might be useful to disable during the migration from \\\"export ... from ...\\\" to \\\"export type ... from ...\\\" when reexporting types in TypeScript.\",\"enum\":[\"error\",\"warn\",\"auto\",false]},\"requireContext\":{\"description\":\"Enable/disable parsing of require.context syntax.\",\"type\":\"boolean\"},\"requireEnsure\":{\"description\":\"Enable/disable parsing of require.ensure syntax.\",\"type\":\"boolean\"},\"requireInclude\":{\"description\":\"Enable/disable parsing of require.include syntax.\",\"type\":\"boolean\"},\"requireJs\":{\"description\":\"Enable/disable parsing of require.js special syntax like require.config, requirejs.config, require.version and requirejs.onError.\",\"type\":\"boolean\"},\"strictExportPresence\":{\"description\":\"Deprecated in favor of \\\"exportsPresence\\\". Emit errors instead of warnings when imported names don't exist in imported module.\",\"type\":\"boolean\"},\"strictThisContextOnImports\":{\"description\":\"Handle the this context correctly according to the spec for namespace objects.\",\"type\":\"boolean\"},\"system\":{\"description\":\"Enable/disable parsing of System.js special syntax like System.import, System.get, System.set and System.register.\",\"type\":\"boolean\"},\"unknownContextCritical\":{\"description\":\"Enable warnings when using the require function in a not statically analyse-able way.\",\"type\":\"boolean\"},\"unknownContextRecursive\":{\"description\":\"Enable recursive directory lookup when using the require function in a not statically analyse-able way.\",\"type\":\"boolean\"},\"unknownContextRegExp\":{\"description\":\"Sets the regular expression when using the require function in a not statically analyse-able way.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"boolean\"}]},\"unknownContextRequest\":{\"description\":\"Sets the request when using the require function in a not statically analyse-able way.\",\"type\":\"string\"},\"url\":{\"description\":\"Enable/disable parsing of new URL() syntax.\",\"anyOf\":[{\"enum\":[\"relative\"]},{\"type\":\"boolean\"}]},\"worker\":{\"description\":\"Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register().\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Specify a syntax that should be parsed as WebWorker reference. 'Abc' handles 'new Abc()', 'Abc from xyz' handles 'import { Abc } from \\\"xyz\\\"; new Abc()', 'abc()' handles 'abc()', and combinations are also possible.\",\"type\":\"string\",\"minLength\":1}},{\"type\":\"boolean\"}]},\"wrappedContextCritical\":{\"description\":\"Enable warnings for partial dynamic dependencies.\",\"type\":\"boolean\"},\"wrappedContextRecursive\":{\"description\":\"Enable recursive directory lookup for partial dynamic dependencies.\",\"type\":\"boolean\"},\"wrappedContextRegExp\":{\"description\":\"Set the inner regular expression for partial dynamic dependencies.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"}}},\"Layer\":{\"description\":\"Specifies the layer in which modules of this entrypoint are placed.\",\"anyOf\":[{\"enum\":[null]},{\"type\":\"string\",\"minLength\":1}]},\"LazyCompilationDefaultBackendOptions\":{\"description\":\"Options for the default backend.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"client\":{\"description\":\"A custom client.\",\"type\":\"string\"},\"listen\":{\"description\":\"Specifies where to listen to from the server.\",\"anyOf\":[{\"description\":\"A port.\",\"type\":\"number\"},{\"description\":\"Listen options.\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"host\":{\"description\":\"A host.\",\"type\":\"string\"},\"port\":{\"description\":\"A port.\",\"type\":\"number\"}},\"tsType\":\"import(\\\"net\\\").ListenOptions\"},{\"description\":\"A custom listen function.\",\"instanceof\":\"Function\",\"tsType\":\"((server: import(\\\"net\\\").Server) => void)\"}]},\"protocol\":{\"description\":\"Specifies the protocol the client should use to connect to the server.\",\"enum\":[\"http\",\"https\"]},\"server\":{\"description\":\"Specifies how to create the server handling the EventSource requests.\",\"anyOf\":[{\"description\":\"ServerOptions for the http or https createServer call.\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{},\"tsType\":\"(import(\\\"https\\\").ServerOptions | import(\\\"http\\\").ServerOptions)\"},{\"description\":\"A custom create server function.\",\"instanceof\":\"Function\",\"tsType\":\"(() => import(\\\"net\\\").Server)\"}]}}},\"LazyCompilationOptions\":{\"description\":\"Options for compiling entrypoints and import()s only when they are accessed.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"backend\":{\"description\":\"Specifies the backend that should be used for handling client keep alive.\",\"anyOf\":[{\"description\":\"A custom backend.\",\"instanceof\":\"Function\",\"tsType\":\"(((compiler: import('../lib/Compiler'), callback: (err?: Error, api?: import(\\\"../lib/hmr/LazyCompilationPlugin\\\").BackendApi) => void) => void) | ((compiler: import('../lib/Compiler')) => Promise))\"},{\"$ref\":\"#/definitions/LazyCompilationDefaultBackendOptions\"}]},\"entries\":{\"description\":\"Enable/disable lazy compilation for entries.\",\"type\":\"boolean\"},\"imports\":{\"description\":\"Enable/disable lazy compilation for import() modules.\",\"type\":\"boolean\"},\"test\":{\"description\":\"Specify which entrypoints or import()ed modules should be lazily compiled. This is matched with the imported module and not the entrypoint name.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"((module: import('../lib/Module')) => boolean)\"}]}}},\"Library\":{\"description\":\"Make the output files a library, exporting the exports of the entry point.\",\"anyOf\":[{\"$ref\":\"#/definitions/LibraryName\"},{\"$ref\":\"#/definitions/LibraryOptions\"}]},\"LibraryCustomUmdCommentObject\":{\"description\":\"Set explicit comments for `commonjs`, `commonjs2`, `amd`, and `root`.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"amd\":{\"description\":\"Set comment for `amd` section in UMD.\",\"type\":\"string\"},\"commonjs\":{\"description\":\"Set comment for `commonjs` (exports) section in UMD.\",\"type\":\"string\"},\"commonjs2\":{\"description\":\"Set comment for `commonjs2` (module.exports) section in UMD.\",\"type\":\"string\"},\"root\":{\"description\":\"Set comment for `root` (global variable) section in UMD.\",\"type\":\"string\"}}},\"LibraryCustomUmdObject\":{\"description\":\"Description object for all UMD variants of the library name.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"amd\":{\"description\":\"Name of the exposed AMD library in the UMD.\",\"type\":\"string\",\"minLength\":1},\"commonjs\":{\"description\":\"Name of the exposed commonjs export in the UMD.\",\"type\":\"string\",\"minLength\":1},\"root\":{\"description\":\"Name of the property exposed globally by a UMD library.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Part of the name of the property exposed globally by a UMD library.\",\"type\":\"string\",\"minLength\":1}},{\"type\":\"string\",\"minLength\":1}]}}},\"LibraryExport\":{\"description\":\"Specify which export should be exposed as library.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Part of the export that should be exposed as library.\",\"type\":\"string\",\"minLength\":1}},{\"type\":\"string\",\"minLength\":1}]},\"LibraryName\":{\"description\":\"The name of the library (some types allow unnamed libraries too).\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"A part of the library name.\",\"type\":\"string\",\"minLength\":1},\"minItems\":1},{\"type\":\"string\",\"minLength\":1},{\"$ref\":\"#/definitions/LibraryCustomUmdObject\"}]},\"LibraryOptions\":{\"description\":\"Options for library.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"auxiliaryComment\":{\"$ref\":\"#/definitions/AuxiliaryComment\"},\"export\":{\"$ref\":\"#/definitions/LibraryExport\"},\"name\":{\"$ref\":\"#/definitions/LibraryName\"},\"type\":{\"$ref\":\"#/definitions/LibraryType\"},\"umdNamedDefine\":{\"$ref\":\"#/definitions/UmdNamedDefine\"}},\"required\":[\"type\"]},\"LibraryType\":{\"description\":\"Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).\",\"anyOf\":[{\"enum\":[\"var\",\"module\",\"assign\",\"assign-properties\",\"this\",\"window\",\"self\",\"global\",\"commonjs\",\"commonjs2\",\"commonjs-module\",\"amd\",\"amd-require\",\"umd\",\"umd2\",\"jsonp\",\"system\"]},{\"type\":\"string\"}]},\"Loader\":{\"description\":\"Custom values available in the loader context.\",\"type\":\"object\"},\"MemoryCacheOptions\":{\"description\":\"Options object for in-memory caching.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"cacheUnaffected\":{\"description\":\"Additionally cache computation of modules that are unchanged and reference only unchanged modules.\",\"type\":\"boolean\"},\"maxGenerations\":{\"description\":\"Number of generations unused cache entries stay in memory cache at minimum (1 = may be removed after unused for a single compilation, ..., Infinity: kept forever).\",\"type\":\"number\",\"minimum\":1},\"type\":{\"description\":\"In memory caching.\",\"enum\":[\"memory\"]}},\"required\":[\"type\"]},\"Mode\":{\"description\":\"Enable production optimizations or development hints.\",\"enum\":[\"development\",\"production\",\"none\"]},\"ModuleFilterItemTypes\":{\"description\":\"Filtering value, regexp or function.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":false},{\"instanceof\":\"Function\",\"tsType\":\"((name: string, module: import('../lib/stats/DefaultStatsFactoryPlugin').StatsModule, type: 'module' | 'chunk' | 'root-of-chunk' | 'nested') => boolean)\"}]},\"ModuleFilterTypes\":{\"description\":\"Filtering modules.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Rule to filter.\",\"cli\":{\"helper\":true},\"oneOf\":[{\"$ref\":\"#/definitions/ModuleFilterItemTypes\"}]}},{\"$ref\":\"#/definitions/ModuleFilterItemTypes\"}]},\"ModuleOptions\":{\"description\":\"Options affecting the normal modules (`NormalModuleFactory`).\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"defaultRules\":{\"description\":\"An array of rules applied by default for modules.\",\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetRules\"}]},\"exprContextCritical\":{\"description\":\"Enable warnings for full dynamic dependencies.\",\"type\":\"boolean\"},\"exprContextRecursive\":{\"description\":\"Enable recursive directory lookup for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRecursive'.\",\"type\":\"boolean\"},\"exprContextRegExp\":{\"description\":\"Sets the default regular expression for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRegExp'.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"boolean\"}]},\"exprContextRequest\":{\"description\":\"Set the default request for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRequest'.\",\"type\":\"string\"},\"generator\":{\"$ref\":\"#/definitions/GeneratorOptionsByModuleType\"},\"noParse\":{\"$ref\":\"#/definitions/NoParse\"},\"parser\":{\"$ref\":\"#/definitions/ParserOptionsByModuleType\"},\"rules\":{\"description\":\"An array of rules applied for modules.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetRules\"}]},\"strictExportPresence\":{\"description\":\"Emit errors instead of warnings when imported names don't exist in imported module. Deprecated: This option has moved to 'module.parser.javascript.strictExportPresence'.\",\"type\":\"boolean\"},\"strictThisContextOnImports\":{\"description\":\"Handle the this context correctly according to the spec for namespace objects. Deprecated: This option has moved to 'module.parser.javascript.strictThisContextOnImports'.\",\"type\":\"boolean\"},\"unknownContextCritical\":{\"description\":\"Enable warnings when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextCritical'.\",\"type\":\"boolean\"},\"unknownContextRecursive\":{\"description\":\"Enable recursive directory lookup when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRecursive'.\",\"type\":\"boolean\"},\"unknownContextRegExp\":{\"description\":\"Sets the regular expression when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRegExp'.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"boolean\"}]},\"unknownContextRequest\":{\"description\":\"Sets the request when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRequest'.\",\"type\":\"string\"},\"unsafeCache\":{\"description\":\"Cache the resolving of module requests.\",\"anyOf\":[{\"type\":\"boolean\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"wrappedContextCritical\":{\"description\":\"Enable warnings for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextCritical'.\",\"type\":\"boolean\"},\"wrappedContextRecursive\":{\"description\":\"Enable recursive directory lookup for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRecursive'.\",\"type\":\"boolean\"},\"wrappedContextRegExp\":{\"description\":\"Set the inner regular expression for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRegExp'.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"}}},\"ModuleOptionsNormalized\":{\"description\":\"Options affecting the normal modules (`NormalModuleFactory`).\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"defaultRules\":{\"description\":\"An array of rules applied by default for modules.\",\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetRules\"}]},\"generator\":{\"$ref\":\"#/definitions/GeneratorOptionsByModuleType\"},\"noParse\":{\"$ref\":\"#/definitions/NoParse\"},\"parser\":{\"$ref\":\"#/definitions/ParserOptionsByModuleType\"},\"rules\":{\"description\":\"An array of rules applied for modules.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetRules\"}]},\"unsafeCache\":{\"description\":\"Cache the resolving of module requests.\",\"anyOf\":[{\"type\":\"boolean\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]}},\"required\":[\"defaultRules\",\"generator\",\"parser\",\"rules\"]},\"Name\":{\"description\":\"Name of the configuration. Used when loading multiple configurations.\",\"type\":\"string\"},\"NoParse\":{\"description\":\"Don't parse files matching. It's matched against the full resolved request.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Don't parse files matching. It's matched against the full resolved request.\",\"anyOf\":[{\"description\":\"A regular expression, when matched the module is not parsed.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"description\":\"An absolute path, when the module starts with this path it is not parsed.\",\"type\":\"string\",\"absolutePath\":true},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"minItems\":1},{\"description\":\"A regular expression, when matched the module is not parsed.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"description\":\"An absolute path, when the module starts with this path it is not parsed.\",\"type\":\"string\",\"absolutePath\":true},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"Node\":{\"description\":\"Include polyfills or mocks for various node stuff.\",\"anyOf\":[{\"enum\":[false]},{\"$ref\":\"#/definitions/NodeOptions\"}]},\"NodeOptions\":{\"description\":\"Options object for node compatibility features.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"__dirname\":{\"description\":\"Include a polyfill for the '__dirname' variable.\",\"enum\":[false,true,\"warn-mock\",\"mock\",\"eval-only\"]},\"__filename\":{\"description\":\"Include a polyfill for the '__filename' variable.\",\"enum\":[false,true,\"warn-mock\",\"mock\",\"eval-only\"]},\"global\":{\"description\":\"Include a polyfill for the 'global' variable.\",\"enum\":[false,true,\"warn\"]}}},\"Optimization\":{\"description\":\"Enables/Disables integrated optimizations.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"checkWasmTypes\":{\"description\":\"Check for incompatible wasm types when importing/exporting from/to ESM.\",\"type\":\"boolean\"},\"chunkIds\":{\"description\":\"Define the algorithm to choose chunk ids (named: readable ids for better debugging, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin).\",\"enum\":[\"natural\",\"named\",\"deterministic\",\"size\",\"total-size\",false]},\"concatenateModules\":{\"description\":\"Concatenate modules when possible to generate less modules, more efficient code and enable more optimizations by the minimizer.\",\"type\":\"boolean\"},\"emitOnErrors\":{\"description\":\"Emit assets even when errors occur. Critical errors are emitted into the generated code and will cause errors at runtime.\",\"type\":\"boolean\"},\"flagIncludedChunks\":{\"description\":\"Also flag chunks as loaded which contain a subset of the modules.\",\"type\":\"boolean\"},\"innerGraph\":{\"description\":\"Creates a module-internal dependency graph for top level symbols, exports and imports, to improve unused exports detection.\",\"type\":\"boolean\"},\"mangleExports\":{\"description\":\"Rename exports when possible to generate shorter code (depends on optimization.usedExports and optimization.providedExports, true/\\\"deterministic\\\": generate short deterministic names optimized for caching, \\\"size\\\": generate the shortest possible names).\",\"anyOf\":[{\"enum\":[\"size\",\"deterministic\"]},{\"type\":\"boolean\"}]},\"mangleWasmImports\":{\"description\":\"Reduce size of WASM by changing imports to shorter strings.\",\"type\":\"boolean\"},\"mergeDuplicateChunks\":{\"description\":\"Merge chunks which contain the same modules.\",\"type\":\"boolean\"},\"minimize\":{\"description\":\"Enable minimizing the output. Uses optimization.minimizer.\",\"type\":\"boolean\"},\"minimizer\":{\"description\":\"Minimizer(s) to use for minimizing the output.\",\"type\":\"array\",\"cli\":{\"exclude\":true},\"items\":{\"description\":\"Plugin of type object or instanceof Function.\",\"anyOf\":[{\"enum\":[\"...\"]},{\"$ref\":\"#/definitions/WebpackPluginInstance\"},{\"$ref\":\"#/definitions/WebpackPluginFunction\"}]}},\"moduleIds\":{\"description\":\"Define the algorithm to choose module ids (natural: numeric ids in order of usage, named: readable ids for better debugging, hashed: (deprecated) short hashes as ids for better long term caching, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, false: no algorithm used, as custom one can be provided via plugin).\",\"enum\":[\"natural\",\"named\",\"hashed\",\"deterministic\",\"size\",false]},\"noEmitOnErrors\":{\"description\":\"Avoid emitting assets when errors occur (deprecated: use 'emitOnErrors' instead).\",\"type\":\"boolean\",\"cli\":{\"exclude\":true}},\"nodeEnv\":{\"description\":\"Set process.env.NODE_ENV to a specific value.\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\"}]},\"portableRecords\":{\"description\":\"Generate records with relative paths to be able to move the context folder.\",\"type\":\"boolean\"},\"providedExports\":{\"description\":\"Figure out which exports are provided by modules to generate more efficient code.\",\"type\":\"boolean\"},\"realContentHash\":{\"description\":\"Use real [contenthash] based on final content of the assets.\",\"type\":\"boolean\"},\"removeAvailableModules\":{\"description\":\"Removes modules from chunks when these modules are already included in all parents.\",\"type\":\"boolean\"},\"removeEmptyChunks\":{\"description\":\"Remove chunks which are empty.\",\"type\":\"boolean\"},\"runtimeChunk\":{\"$ref\":\"#/definitions/OptimizationRuntimeChunk\"},\"sideEffects\":{\"description\":\"Skip over modules which contain no side effects when exports are not used (false: disabled, 'flag': only use manually placed side effects flag, true: also analyse source code for side effects).\",\"anyOf\":[{\"enum\":[\"flag\"]},{\"type\":\"boolean\"}]},\"splitChunks\":{\"description\":\"Optimize duplication and caching by splitting chunks by shared modules and cache group.\",\"anyOf\":[{\"enum\":[false]},{\"$ref\":\"#/definitions/OptimizationSplitChunksOptions\"}]},\"usedExports\":{\"description\":\"Figure out which exports are used by modules to mangle export names, omit unused exports and generate more efficient code (true: analyse used exports for each runtime, \\\"global\\\": analyse exports globally for all runtimes combined).\",\"anyOf\":[{\"enum\":[\"global\"]},{\"type\":\"boolean\"}]}}},\"OptimizationRuntimeChunk\":{\"description\":\"Create an additional chunk which contains only the webpack runtime and chunk hash maps.\",\"anyOf\":[{\"enum\":[\"single\",\"multiple\"]},{\"type\":\"boolean\"},{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"name\":{\"description\":\"The name or name factory for the runtime chunks.\",\"anyOf\":[{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]}}}]},\"OptimizationRuntimeChunkNormalized\":{\"description\":\"Create an additional chunk which contains only the webpack runtime and chunk hash maps.\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"name\":{\"description\":\"The name factory for the runtime chunks.\",\"instanceof\":\"Function\",\"tsType\":\"Function\"}}}]},\"OptimizationSplitChunksCacheGroup\":{\"description\":\"Options object for describing behavior of a cache group selecting modules that should be cached together.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"automaticNameDelimiter\":{\"description\":\"Sets the name delimiter for created chunks.\",\"type\":\"string\",\"minLength\":1},\"chunks\":{\"description\":\"Select chunks for determining cache group content (defaults to \\\"initial\\\", \\\"initial\\\" and \\\"all\\\" requires adding these chunks to the HTML).\",\"anyOf\":[{\"enum\":[\"initial\",\"async\",\"all\"]},{\"instanceof\":\"Function\",\"tsType\":\"((chunk: import('../lib/Chunk')) => boolean)\"}]},\"enforce\":{\"description\":\"Ignore minimum size, minimum chunks and maximum requests and always create chunks for this cache group.\",\"type\":\"boolean\"},\"enforceSizeThreshold\":{\"description\":\"Size threshold at which splitting is enforced and other restrictions (minRemainingSize, maxAsyncRequests, maxInitialRequests) are ignored.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"filename\":{\"description\":\"Sets the template for the filename for created chunks.\",\"anyOf\":[{\"type\":\"string\",\"absolutePath\":false,\"minLength\":1},{\"instanceof\":\"Function\",\"tsType\":\"((pathData: import(\\\"../lib/Compilation\\\").PathData, assetInfo?: import(\\\"../lib/Compilation\\\").AssetInfo) => string)\"}]},\"idHint\":{\"description\":\"Sets the hint for chunk id.\",\"type\":\"string\"},\"layer\":{\"description\":\"Assign modules to a cache group by module layer.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"maxAsyncRequests\":{\"description\":\"Maximum number of requests which are accepted for on-demand loading.\",\"type\":\"number\",\"minimum\":1},\"maxAsyncSize\":{\"description\":\"Maximal size hint for the on-demand chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"maxInitialRequests\":{\"description\":\"Maximum number of initial chunks which are accepted for an entry point.\",\"type\":\"number\",\"minimum\":1},\"maxInitialSize\":{\"description\":\"Maximal size hint for the initial chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"maxSize\":{\"description\":\"Maximal size hint for the created chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"minChunks\":{\"description\":\"Minimum number of times a module has to be duplicated until it's considered for splitting.\",\"type\":\"number\",\"minimum\":1},\"minRemainingSize\":{\"description\":\"Minimal size for the chunks the stay after moving the modules to a new chunk.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"minSize\":{\"description\":\"Minimal size for the created chunk.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"minSizeReduction\":{\"description\":\"Minimum size reduction due to the created chunk.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"name\":{\"description\":\"Give chunks for this cache group a name (chunks with equal name are merged).\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"priority\":{\"description\":\"Priority of this cache group.\",\"type\":\"number\"},\"reuseExistingChunk\":{\"description\":\"Try to reuse existing chunk (with name) when it has matching modules.\",\"type\":\"boolean\"},\"test\":{\"description\":\"Assign modules to a cache group by module name.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"type\":{\"description\":\"Assign modules to a cache group by module type.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"usedExports\":{\"description\":\"Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal.\",\"type\":\"boolean\"}}},\"OptimizationSplitChunksGetCacheGroups\":{\"description\":\"A function returning cache groups.\",\"instanceof\":\"Function\",\"tsType\":\"((module: import('../lib/Module')) => OptimizationSplitChunksCacheGroup | OptimizationSplitChunksCacheGroup[] | void)\"},\"OptimizationSplitChunksOptions\":{\"description\":\"Options object for splitting chunks into smaller chunks.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"automaticNameDelimiter\":{\"description\":\"Sets the name delimiter for created chunks.\",\"type\":\"string\",\"minLength\":1},\"cacheGroups\":{\"description\":\"Assign modules to a cache group (modules from different cache groups are tried to keep in separate chunks, default categories: 'default', 'defaultVendors').\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"Configuration for a cache group.\",\"anyOf\":[{\"enum\":[false]},{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"},{\"$ref\":\"#/definitions/OptimizationSplitChunksCacheGroup\"}]},\"not\":{\"description\":\"Using the cacheGroup shorthand syntax with a cache group named 'test' is a potential config error\\nDid you intent to define a cache group with a test instead?\\ncacheGroups: {\\n : {\\n test: ...\\n }\\n}.\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"test\":{\"description\":\"The test property is a cache group name, but using the test option of the cache group could be intended instead.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]}},\"required\":[\"test\"]}},\"chunks\":{\"description\":\"Select chunks for determining shared modules (defaults to \\\"async\\\", \\\"initial\\\" and \\\"all\\\" requires adding these chunks to the HTML).\",\"anyOf\":[{\"enum\":[\"initial\",\"async\",\"all\"]},{\"instanceof\":\"Function\",\"tsType\":\"((chunk: import('../lib/Chunk')) => boolean)\"}]},\"defaultSizeTypes\":{\"description\":\"Sets the size types which are used when a number is used for sizes.\",\"type\":\"array\",\"items\":{\"description\":\"Size type, like 'javascript', 'webassembly'.\",\"type\":\"string\"},\"minItems\":1},\"enforceSizeThreshold\":{\"description\":\"Size threshold at which splitting is enforced and other restrictions (minRemainingSize, maxAsyncRequests, maxInitialRequests) are ignored.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"fallbackCacheGroup\":{\"description\":\"Options for modules not selected by any other cache group.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"automaticNameDelimiter\":{\"description\":\"Sets the name delimiter for created chunks.\",\"type\":\"string\",\"minLength\":1},\"chunks\":{\"description\":\"Select chunks for determining shared modules (defaults to \\\"async\\\", \\\"initial\\\" and \\\"all\\\" requires adding these chunks to the HTML).\",\"anyOf\":[{\"enum\":[\"initial\",\"async\",\"all\"]},{\"instanceof\":\"Function\",\"tsType\":\"((chunk: import('../lib/Chunk')) => boolean)\"}]},\"maxAsyncSize\":{\"description\":\"Maximal size hint for the on-demand chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"maxInitialSize\":{\"description\":\"Maximal size hint for the initial chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"maxSize\":{\"description\":\"Maximal size hint for the created chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"minSize\":{\"description\":\"Minimal size for the created chunk.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"minSizeReduction\":{\"description\":\"Minimum size reduction due to the created chunk.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]}}},\"filename\":{\"description\":\"Sets the template for the filename for created chunks.\",\"anyOf\":[{\"type\":\"string\",\"absolutePath\":false,\"minLength\":1},{\"instanceof\":\"Function\",\"tsType\":\"((pathData: import(\\\"../lib/Compilation\\\").PathData, assetInfo?: import(\\\"../lib/Compilation\\\").AssetInfo) => string)\"}]},\"hidePathInfo\":{\"description\":\"Prevents exposing path info when creating names for parts splitted by maxSize.\",\"type\":\"boolean\"},\"maxAsyncRequests\":{\"description\":\"Maximum number of requests which are accepted for on-demand loading.\",\"type\":\"number\",\"minimum\":1},\"maxAsyncSize\":{\"description\":\"Maximal size hint for the on-demand chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"maxInitialRequests\":{\"description\":\"Maximum number of initial chunks which are accepted for an entry point.\",\"type\":\"number\",\"minimum\":1},\"maxInitialSize\":{\"description\":\"Maximal size hint for the initial chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"maxSize\":{\"description\":\"Maximal size hint for the created chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"minChunks\":{\"description\":\"Minimum number of times a module has to be duplicated until it's considered for splitting.\",\"type\":\"number\",\"minimum\":1},\"minRemainingSize\":{\"description\":\"Minimal size for the chunks the stay after moving the modules to a new chunk.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"minSize\":{\"description\":\"Minimal size for the created chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"minSizeReduction\":{\"description\":\"Minimum size reduction due to the created chunk.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"name\":{\"description\":\"Give chunks created a name (chunks with equal name are merged).\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"usedExports\":{\"description\":\"Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal.\",\"type\":\"boolean\"}}},\"OptimizationSplitChunksSizes\":{\"description\":\"Size description for limits.\",\"anyOf\":[{\"description\":\"Size of the javascript part of the chunk.\",\"type\":\"number\",\"minimum\":0},{\"description\":\"Specify size limits per size type.\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"Size of the part of the chunk with the type of the key.\",\"type\":\"number\"}}]},\"Output\":{\"description\":\"Options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"assetModuleFilename\":{\"$ref\":\"#/definitions/AssetModuleFilename\"},\"asyncChunks\":{\"description\":\"Enable/disable creating async chunks that are loaded on demand.\",\"type\":\"boolean\"},\"auxiliaryComment\":{\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/AuxiliaryComment\"}]},\"charset\":{\"$ref\":\"#/definitions/Charset\"},\"chunkFilename\":{\"$ref\":\"#/definitions/ChunkFilename\"},\"chunkFormat\":{\"$ref\":\"#/definitions/ChunkFormat\"},\"chunkLoadTimeout\":{\"$ref\":\"#/definitions/ChunkLoadTimeout\"},\"chunkLoading\":{\"$ref\":\"#/definitions/ChunkLoading\"},\"chunkLoadingGlobal\":{\"$ref\":\"#/definitions/ChunkLoadingGlobal\"},\"clean\":{\"$ref\":\"#/definitions/Clean\"},\"compareBeforeEmit\":{\"$ref\":\"#/definitions/CompareBeforeEmit\"},\"crossOriginLoading\":{\"$ref\":\"#/definitions/CrossOriginLoading\"},\"devtoolFallbackModuleFilenameTemplate\":{\"$ref\":\"#/definitions/DevtoolFallbackModuleFilenameTemplate\"},\"devtoolModuleFilenameTemplate\":{\"$ref\":\"#/definitions/DevtoolModuleFilenameTemplate\"},\"devtoolNamespace\":{\"$ref\":\"#/definitions/DevtoolNamespace\"},\"enabledChunkLoadingTypes\":{\"$ref\":\"#/definitions/EnabledChunkLoadingTypes\"},\"enabledLibraryTypes\":{\"$ref\":\"#/definitions/EnabledLibraryTypes\"},\"enabledWasmLoadingTypes\":{\"$ref\":\"#/definitions/EnabledWasmLoadingTypes\"},\"environment\":{\"$ref\":\"#/definitions/Environment\"},\"filename\":{\"$ref\":\"#/definitions/Filename\"},\"globalObject\":{\"$ref\":\"#/definitions/GlobalObject\"},\"hashDigest\":{\"$ref\":\"#/definitions/HashDigest\"},\"hashDigestLength\":{\"$ref\":\"#/definitions/HashDigestLength\"},\"hashFunction\":{\"$ref\":\"#/definitions/HashFunction\"},\"hashSalt\":{\"$ref\":\"#/definitions/HashSalt\"},\"hotUpdateChunkFilename\":{\"$ref\":\"#/definitions/HotUpdateChunkFilename\"},\"hotUpdateGlobal\":{\"$ref\":\"#/definitions/HotUpdateGlobal\"},\"hotUpdateMainFilename\":{\"$ref\":\"#/definitions/HotUpdateMainFilename\"},\"iife\":{\"$ref\":\"#/definitions/Iife\"},\"importFunctionName\":{\"$ref\":\"#/definitions/ImportFunctionName\"},\"importMetaName\":{\"$ref\":\"#/definitions/ImportMetaName\"},\"library\":{\"$ref\":\"#/definitions/Library\"},\"libraryExport\":{\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/LibraryExport\"}]},\"libraryTarget\":{\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/LibraryType\"}]},\"module\":{\"$ref\":\"#/definitions/OutputModule\"},\"path\":{\"$ref\":\"#/definitions/Path\"},\"pathinfo\":{\"$ref\":\"#/definitions/Pathinfo\"},\"publicPath\":{\"$ref\":\"#/definitions/PublicPath\"},\"scriptType\":{\"$ref\":\"#/definitions/ScriptType\"},\"sourceMapFilename\":{\"$ref\":\"#/definitions/SourceMapFilename\"},\"sourcePrefix\":{\"$ref\":\"#/definitions/SourcePrefix\"},\"strictModuleErrorHandling\":{\"$ref\":\"#/definitions/StrictModuleErrorHandling\"},\"strictModuleExceptionHandling\":{\"$ref\":\"#/definitions/StrictModuleExceptionHandling\"},\"trustedTypes\":{\"description\":\"Use a Trusted Types policy to create urls for chunks. 'output.uniqueName' is used a default policy name. Passing a string sets a custom policy name.\",\"anyOf\":[{\"enum\":[true]},{\"description\":\"The name of the Trusted Types policy created by webpack to serve bundle chunks.\",\"type\":\"string\",\"minLength\":1},{\"$ref\":\"#/definitions/TrustedTypes\"}]},\"umdNamedDefine\":{\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/UmdNamedDefine\"}]},\"uniqueName\":{\"$ref\":\"#/definitions/UniqueName\"},\"wasmLoading\":{\"$ref\":\"#/definitions/WasmLoading\"},\"webassemblyModuleFilename\":{\"$ref\":\"#/definitions/WebassemblyModuleFilename\"},\"workerChunkLoading\":{\"$ref\":\"#/definitions/ChunkLoading\"},\"workerWasmLoading\":{\"$ref\":\"#/definitions/WasmLoading\"}}},\"OutputModule\":{\"description\":\"Output javascript files as module source type.\",\"type\":\"boolean\"},\"OutputNormalized\":{\"description\":\"Normalized options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"assetModuleFilename\":{\"$ref\":\"#/definitions/AssetModuleFilename\"},\"asyncChunks\":{\"description\":\"Enable/disable creating async chunks that are loaded on demand.\",\"type\":\"boolean\"},\"charset\":{\"$ref\":\"#/definitions/Charset\"},\"chunkFilename\":{\"$ref\":\"#/definitions/ChunkFilename\"},\"chunkFormat\":{\"$ref\":\"#/definitions/ChunkFormat\"},\"chunkLoadTimeout\":{\"$ref\":\"#/definitions/ChunkLoadTimeout\"},\"chunkLoading\":{\"$ref\":\"#/definitions/ChunkLoading\"},\"chunkLoadingGlobal\":{\"$ref\":\"#/definitions/ChunkLoadingGlobal\"},\"clean\":{\"$ref\":\"#/definitions/Clean\"},\"compareBeforeEmit\":{\"$ref\":\"#/definitions/CompareBeforeEmit\"},\"crossOriginLoading\":{\"$ref\":\"#/definitions/CrossOriginLoading\"},\"devtoolFallbackModuleFilenameTemplate\":{\"$ref\":\"#/definitions/DevtoolFallbackModuleFilenameTemplate\"},\"devtoolModuleFilenameTemplate\":{\"$ref\":\"#/definitions/DevtoolModuleFilenameTemplate\"},\"devtoolNamespace\":{\"$ref\":\"#/definitions/DevtoolNamespace\"},\"enabledChunkLoadingTypes\":{\"$ref\":\"#/definitions/EnabledChunkLoadingTypes\"},\"enabledLibraryTypes\":{\"$ref\":\"#/definitions/EnabledLibraryTypes\"},\"enabledWasmLoadingTypes\":{\"$ref\":\"#/definitions/EnabledWasmLoadingTypes\"},\"environment\":{\"$ref\":\"#/definitions/Environment\"},\"filename\":{\"$ref\":\"#/definitions/Filename\"},\"globalObject\":{\"$ref\":\"#/definitions/GlobalObject\"},\"hashDigest\":{\"$ref\":\"#/definitions/HashDigest\"},\"hashDigestLength\":{\"$ref\":\"#/definitions/HashDigestLength\"},\"hashFunction\":{\"$ref\":\"#/definitions/HashFunction\"},\"hashSalt\":{\"$ref\":\"#/definitions/HashSalt\"},\"hotUpdateChunkFilename\":{\"$ref\":\"#/definitions/HotUpdateChunkFilename\"},\"hotUpdateGlobal\":{\"$ref\":\"#/definitions/HotUpdateGlobal\"},\"hotUpdateMainFilename\":{\"$ref\":\"#/definitions/HotUpdateMainFilename\"},\"iife\":{\"$ref\":\"#/definitions/Iife\"},\"importFunctionName\":{\"$ref\":\"#/definitions/ImportFunctionName\"},\"importMetaName\":{\"$ref\":\"#/definitions/ImportMetaName\"},\"library\":{\"$ref\":\"#/definitions/LibraryOptions\"},\"module\":{\"$ref\":\"#/definitions/OutputModule\"},\"path\":{\"$ref\":\"#/definitions/Path\"},\"pathinfo\":{\"$ref\":\"#/definitions/Pathinfo\"},\"publicPath\":{\"$ref\":\"#/definitions/PublicPath\"},\"scriptType\":{\"$ref\":\"#/definitions/ScriptType\"},\"sourceMapFilename\":{\"$ref\":\"#/definitions/SourceMapFilename\"},\"sourcePrefix\":{\"$ref\":\"#/definitions/SourcePrefix\"},\"strictModuleErrorHandling\":{\"$ref\":\"#/definitions/StrictModuleErrorHandling\"},\"strictModuleExceptionHandling\":{\"$ref\":\"#/definitions/StrictModuleExceptionHandling\"},\"trustedTypes\":{\"$ref\":\"#/definitions/TrustedTypes\"},\"uniqueName\":{\"$ref\":\"#/definitions/UniqueName\"},\"wasmLoading\":{\"$ref\":\"#/definitions/WasmLoading\"},\"webassemblyModuleFilename\":{\"$ref\":\"#/definitions/WebassemblyModuleFilename\"},\"workerChunkLoading\":{\"$ref\":\"#/definitions/ChunkLoading\"},\"workerWasmLoading\":{\"$ref\":\"#/definitions/WasmLoading\"}}},\"Parallelism\":{\"description\":\"The number of parallel processed modules in the compilation.\",\"type\":\"number\",\"minimum\":1},\"ParserOptionsByModuleType\":{\"description\":\"Specify options for each parser.\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"Options for parsing.\",\"type\":\"object\",\"additionalProperties\":true},\"properties\":{\"asset\":{\"$ref\":\"#/definitions/AssetParserOptions\"},\"asset/inline\":{\"$ref\":\"#/definitions/EmptyParserOptions\"},\"asset/resource\":{\"$ref\":\"#/definitions/EmptyParserOptions\"},\"asset/source\":{\"$ref\":\"#/definitions/EmptyParserOptions\"},\"javascript\":{\"$ref\":\"#/definitions/JavascriptParserOptions\"},\"javascript/auto\":{\"$ref\":\"#/definitions/JavascriptParserOptions\"},\"javascript/dynamic\":{\"$ref\":\"#/definitions/JavascriptParserOptions\"},\"javascript/esm\":{\"$ref\":\"#/definitions/JavascriptParserOptions\"}}},\"Path\":{\"description\":\"The output directory as **absolute path** (required).\",\"type\":\"string\",\"absolutePath\":true},\"Pathinfo\":{\"description\":\"Include comments with information about the modules.\",\"anyOf\":[{\"enum\":[\"verbose\"]},{\"type\":\"boolean\"}]},\"Performance\":{\"description\":\"Configuration for web performance recommendations.\",\"anyOf\":[{\"enum\":[false]},{\"$ref\":\"#/definitions/PerformanceOptions\"}]},\"PerformanceOptions\":{\"description\":\"Configuration object for web performance recommendations.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"assetFilter\":{\"description\":\"Filter function to select assets that are checked.\",\"instanceof\":\"Function\",\"tsType\":\"Function\"},\"hints\":{\"description\":\"Sets the format of the hints: warnings, errors or nothing at all.\",\"enum\":[false,\"warning\",\"error\"]},\"maxAssetSize\":{\"description\":\"File size limit (in bytes) when exceeded, that webpack will provide performance hints.\",\"type\":\"number\"},\"maxEntrypointSize\":{\"description\":\"Total size of an entry point (in bytes).\",\"type\":\"number\"}}},\"Plugins\":{\"description\":\"Add additional plugins to the compiler.\",\"type\":\"array\",\"items\":{\"description\":\"Plugin of type object or instanceof Function.\",\"anyOf\":[{\"$ref\":\"#/definitions/WebpackPluginInstance\"},{\"$ref\":\"#/definitions/WebpackPluginFunction\"}]}},\"Profile\":{\"description\":\"Capture timing information for each module.\",\"type\":\"boolean\"},\"PublicPath\":{\"description\":\"The 'publicPath' specifies the public URL address of the output files when referenced in a browser.\",\"anyOf\":[{\"enum\":[\"auto\"]},{\"$ref\":\"#/definitions/RawPublicPath\"}]},\"RawPublicPath\":{\"description\":\"The 'publicPath' specifies the public URL address of the output files when referenced in a browser.\",\"anyOf\":[{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"((pathData: import(\\\"../lib/Compilation\\\").PathData, assetInfo?: import(\\\"../lib/Compilation\\\").AssetInfo) => string)\"}]},\"RecordsInputPath\":{\"description\":\"Store compiler state to a json file.\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\",\"absolutePath\":true}]},\"RecordsOutputPath\":{\"description\":\"Load compiler state from a json file.\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\",\"absolutePath\":true}]},\"RecordsPath\":{\"description\":\"Store/Load compiler state from/to a json file. This will result in persistent ids of modules and chunks. An absolute path is expected. `recordsPath` is used for `recordsInputPath` and `recordsOutputPath` if they left undefined.\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\",\"absolutePath\":true}]},\"Resolve\":{\"description\":\"Options for the resolver.\",\"oneOf\":[{\"$ref\":\"#/definitions/ResolveOptions\"}]},\"ResolveAlias\":{\"description\":\"Redirect module requests.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Alias configuration.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"alias\":{\"description\":\"New request.\",\"anyOf\":[{\"description\":\"Multiple alternative requests.\",\"type\":\"array\",\"items\":{\"description\":\"One choice of request.\",\"type\":\"string\",\"minLength\":1}},{\"description\":\"Ignore request (replace with empty module).\",\"enum\":[false]},{\"description\":\"New request.\",\"type\":\"string\",\"minLength\":1}]},\"name\":{\"description\":\"Request to be redirected.\",\"type\":\"string\"},\"onlyModule\":{\"description\":\"Redirect only exact matching request.\",\"type\":\"boolean\"}},\"required\":[\"alias\",\"name\"]}},{\"type\":\"object\",\"additionalProperties\":{\"description\":\"New request.\",\"anyOf\":[{\"description\":\"Multiple alternative requests.\",\"type\":\"array\",\"items\":{\"description\":\"One choice of request.\",\"type\":\"string\",\"minLength\":1}},{\"description\":\"Ignore request (replace with empty module).\",\"enum\":[false]},{\"description\":\"New request.\",\"type\":\"string\",\"minLength\":1}]}}]},\"ResolveLoader\":{\"description\":\"Options for the resolver when resolving loaders.\",\"oneOf\":[{\"$ref\":\"#/definitions/ResolveOptions\"}]},\"ResolveOptions\":{\"description\":\"Options object for resolving requests.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"alias\":{\"$ref\":\"#/definitions/ResolveAlias\"},\"aliasFields\":{\"description\":\"Fields in the description file (usually package.json) which are used to redirect requests inside the module.\",\"type\":\"array\",\"items\":{\"description\":\"Field in the description file (usually package.json) which are used to redirect requests inside the module.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Part of the field path in the description file (usually package.json) which are used to redirect requests inside the module.\",\"type\":\"string\",\"minLength\":1}},{\"type\":\"string\",\"minLength\":1}]}},\"byDependency\":{\"description\":\"Extra resolve options per dependency category. Typical categories are \\\"commonjs\\\", \\\"amd\\\", \\\"esm\\\".\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"Options object for resolving requests.\",\"oneOf\":[{\"$ref\":\"#/definitions/ResolveOptions\"}]}},\"cache\":{\"description\":\"Enable caching of successfully resolved requests (cache entries are revalidated).\",\"type\":\"boolean\"},\"cachePredicate\":{\"description\":\"Predicate function to decide which requests should be cached.\",\"instanceof\":\"Function\",\"tsType\":\"((request: import('enhanced-resolve').ResolveRequest) => boolean)\"},\"cacheWithContext\":{\"description\":\"Include the context information in the cache identifier when caching.\",\"type\":\"boolean\"},\"conditionNames\":{\"description\":\"Condition names for exports field entry point.\",\"type\":\"array\",\"items\":{\"description\":\"Condition names for exports field entry point.\",\"type\":\"string\"}},\"descriptionFiles\":{\"description\":\"Filenames used to find a description file (like a package.json).\",\"type\":\"array\",\"items\":{\"description\":\"Filename used to find a description file (like a package.json).\",\"type\":\"string\",\"minLength\":1}},\"enforceExtension\":{\"description\":\"Enforce the resolver to use one of the extensions from the extensions option (User must specify requests without extension).\",\"type\":\"boolean\"},\"exportsFields\":{\"description\":\"Field names from the description file (usually package.json) which are used to provide entry points of a package.\",\"type\":\"array\",\"items\":{\"description\":\"Field name from the description file (usually package.json) which is used to provide entry points of a package.\",\"type\":\"string\"}},\"extensions\":{\"description\":\"Extensions added to the request when trying to find the file.\",\"type\":\"array\",\"items\":{\"description\":\"Extension added to the request when trying to find the file.\",\"type\":\"string\"}},\"fallback\":{\"description\":\"Redirect module requests when normal resolving fails.\",\"oneOf\":[{\"$ref\":\"#/definitions/ResolveAlias\"}]},\"fileSystem\":{\"description\":\"Filesystem for the resolver.\",\"tsType\":\"(import('../lib/util/fs').InputFileSystem)\"},\"fullySpecified\":{\"description\":\"Treats the request specified by the user as fully specified, meaning no extensions are added and the mainFiles in directories are not resolved (This doesn't affect requests from mainFields, aliasFields or aliases).\",\"type\":\"boolean\"},\"importsFields\":{\"description\":\"Field names from the description file (usually package.json) which are used to provide internal request of a package (requests starting with # are considered as internal).\",\"type\":\"array\",\"items\":{\"description\":\"Field name from the description file (usually package.json) which is used to provide internal request of a package (requests starting with # are considered as internal).\",\"type\":\"string\"}},\"mainFields\":{\"description\":\"Field names from the description file (package.json) which are used to find the default entry point.\",\"type\":\"array\",\"items\":{\"description\":\"Field name from the description file (package.json) which are used to find the default entry point.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Part of the field path from the description file (package.json) which are used to find the default entry point.\",\"type\":\"string\",\"minLength\":1}},{\"type\":\"string\",\"minLength\":1}]}},\"mainFiles\":{\"description\":\"Filenames used to find the default entry point if there is no description file or main field.\",\"type\":\"array\",\"items\":{\"description\":\"Filename used to find the default entry point if there is no description file or main field.\",\"type\":\"string\",\"minLength\":1}},\"modules\":{\"description\":\"Folder names or directory paths where to find modules.\",\"type\":\"array\",\"items\":{\"description\":\"Folder name or directory path where to find modules.\",\"type\":\"string\",\"minLength\":1}},\"plugins\":{\"description\":\"Plugins for the resolver.\",\"type\":\"array\",\"cli\":{\"exclude\":true},\"items\":{\"description\":\"Plugin of type object or instanceof Function.\",\"anyOf\":[{\"enum\":[\"...\"]},{\"$ref\":\"#/definitions/ResolvePluginInstance\"}]}},\"preferAbsolute\":{\"description\":\"Prefer to resolve server-relative URLs (starting with '/') as absolute paths before falling back to resolve in 'resolve.roots'.\",\"type\":\"boolean\"},\"preferRelative\":{\"description\":\"Prefer to resolve module requests as relative request and fallback to resolving as module.\",\"type\":\"boolean\"},\"resolver\":{\"description\":\"Custom resolver.\",\"tsType\":\"(import('enhanced-resolve').Resolver)\"},\"restrictions\":{\"description\":\"A list of resolve restrictions. Resolve results must fulfill all of these restrictions to resolve successfully. Other resolve paths are taken when restrictions are not met.\",\"type\":\"array\",\"items\":{\"description\":\"Resolve restriction. Resolve result must fulfill this restriction.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":true,\"minLength\":1}]}},\"roots\":{\"description\":\"A list of directories in which requests that are server-relative URLs (starting with '/') are resolved.\",\"type\":\"array\",\"items\":{\"description\":\"Directory in which requests that are server-relative URLs (starting with '/') are resolved.\",\"type\":\"string\"}},\"symlinks\":{\"description\":\"Enable resolving symlinks to the original location.\",\"type\":\"boolean\"},\"unsafeCache\":{\"description\":\"Enable caching of successfully resolved requests (cache entries are not revalidated).\",\"anyOf\":[{\"type\":\"boolean\"},{\"type\":\"object\",\"additionalProperties\":true}]},\"useSyncFileSystemCalls\":{\"description\":\"Use synchronous filesystem calls for the resolver.\",\"type\":\"boolean\"}}},\"ResolvePluginInstance\":{\"description\":\"Plugin instance.\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"apply\":{\"description\":\"The run point of the plugin, required method.\",\"instanceof\":\"Function\",\"tsType\":\"(resolver: import('enhanced-resolve').Resolver) => void\"}},\"required\":[\"apply\"]},\"RuleSetCondition\":{\"description\":\"A condition matcher.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"((value: string) => boolean)\"},{\"$ref\":\"#/definitions/RuleSetLogicalConditions\"},{\"$ref\":\"#/definitions/RuleSetConditions\"}]},\"RuleSetConditionAbsolute\":{\"description\":\"A condition matcher matching an absolute path.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":true},{\"instanceof\":\"Function\",\"tsType\":\"((value: string) => boolean)\"},{\"$ref\":\"#/definitions/RuleSetLogicalConditionsAbsolute\"},{\"$ref\":\"#/definitions/RuleSetConditionsAbsolute\"}]},\"RuleSetConditionOrConditions\":{\"description\":\"One or multiple rule conditions.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetCondition\"},{\"$ref\":\"#/definitions/RuleSetConditions\"}]},\"RuleSetConditionOrConditionsAbsolute\":{\"description\":\"One or multiple rule conditions matching an absolute path.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetConditionAbsolute\"},{\"$ref\":\"#/definitions/RuleSetConditionsAbsolute\"}]},\"RuleSetConditions\":{\"description\":\"A list of rule conditions.\",\"type\":\"array\",\"items\":{\"description\":\"A rule condition.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetCondition\"}]}},\"RuleSetConditionsAbsolute\":{\"description\":\"A list of rule conditions matching an absolute path.\",\"type\":\"array\",\"items\":{\"description\":\"A rule condition matching an absolute path.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionAbsolute\"}]}},\"RuleSetLoader\":{\"description\":\"A loader request.\",\"type\":\"string\",\"minLength\":1},\"RuleSetLoaderOptions\":{\"description\":\"Options passed to a loader.\",\"anyOf\":[{\"type\":\"string\"},{\"type\":\"object\"}]},\"RuleSetLogicalConditions\":{\"description\":\"Logic operators used in a condition matcher.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"and\":{\"description\":\"Logical AND.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditions\"}]},\"not\":{\"description\":\"Logical NOT.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetCondition\"}]},\"or\":{\"description\":\"Logical OR.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditions\"}]}}},\"RuleSetLogicalConditionsAbsolute\":{\"description\":\"Logic operators used in a condition matcher.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"and\":{\"description\":\"Logical AND.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionsAbsolute\"}]},\"not\":{\"description\":\"Logical NOT.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionAbsolute\"}]},\"or\":{\"description\":\"Logical OR.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionsAbsolute\"}]}}},\"RuleSetRule\":{\"description\":\"A rule description with conditions and effects for modules.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"assert\":{\"description\":\"Match on import assertions of the dependency.\",\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}},\"compiler\":{\"description\":\"Match the child compiler name.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"dependency\":{\"description\":\"Match dependency type.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"descriptionData\":{\"description\":\"Match values of properties in the description file (usually package.json).\",\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}},\"enforce\":{\"description\":\"Enforce this rule as pre or post step.\",\"enum\":[\"pre\",\"post\"]},\"exclude\":{\"description\":\"Shortcut for resource.exclude.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"generator\":{\"description\":\"The options for the module generator.\",\"type\":\"object\"},\"include\":{\"description\":\"Shortcut for resource.include.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"issuer\":{\"description\":\"Match the issuer of the module (The module pointing to this module).\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"issuerLayer\":{\"description\":\"Match layer of the issuer of this module (The module pointing to this module).\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"layer\":{\"description\":\"Specifies the layer in which the module should be placed in.\",\"type\":\"string\"},\"loader\":{\"description\":\"Shortcut for use.loader.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetLoader\"}]},\"mimetype\":{\"description\":\"Match module mimetype when load from Data URI.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"oneOf\":{\"description\":\"Only execute the first matching rule in this array.\",\"type\":\"array\",\"items\":{\"description\":\"A rule.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetRule\"}]}},\"options\":{\"description\":\"Shortcut for use.options.\",\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetLoaderOptions\"}]},\"parser\":{\"description\":\"Options for parsing.\",\"type\":\"object\",\"additionalProperties\":true},\"realResource\":{\"description\":\"Match the real resource path of the module.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"resolve\":{\"description\":\"Options for the resolver.\",\"type\":\"object\",\"oneOf\":[{\"$ref\":\"#/definitions/ResolveOptions\"}]},\"resource\":{\"description\":\"Match the resource path of the module.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"resourceFragment\":{\"description\":\"Match the resource fragment of the module.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"resourceQuery\":{\"description\":\"Match the resource query of the module.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"rules\":{\"description\":\"Match and execute these rules when this rule is matched.\",\"type\":\"array\",\"items\":{\"description\":\"A rule.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetRule\"}]}},\"scheme\":{\"description\":\"Match module scheme.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"sideEffects\":{\"description\":\"Flags a module as with or without side effects.\",\"type\":\"boolean\"},\"test\":{\"description\":\"Shortcut for resource.test.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"type\":{\"description\":\"Module type to use for the module.\",\"type\":\"string\"},\"use\":{\"description\":\"Modifiers applied to the module when rule is matched.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetUse\"}]}}},\"RuleSetRules\":{\"description\":\"A list of rules.\",\"type\":\"array\",\"items\":{\"description\":\"A rule.\",\"anyOf\":[{\"cli\":{\"exclude\":true},\"enum\":[\"...\"]},{\"$ref\":\"#/definitions/RuleSetRule\"}]}},\"RuleSetUse\":{\"description\":\"A list of descriptions of loaders applied.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"An use item.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetUseItem\"}]}},{\"instanceof\":\"Function\",\"tsType\":\"((data: { resource: string, realResource: string, resourceQuery: string, issuer: string, compiler: string }) => RuleSetUseItem[])\"},{\"$ref\":\"#/definitions/RuleSetUseItem\"}]},\"RuleSetUseItem\":{\"description\":\"A description of an applied loader.\",\"anyOf\":[{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"ident\":{\"description\":\"Unique loader options identifier.\",\"type\":\"string\"},\"loader\":{\"description\":\"Loader name.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetLoader\"}]},\"options\":{\"description\":\"Loader options.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetLoaderOptions\"}]}}},{\"instanceof\":\"Function\",\"tsType\":\"((data: object) => RuleSetUseItem|RuleSetUseItem[])\"},{\"$ref\":\"#/definitions/RuleSetLoader\"}]},\"ScriptType\":{\"description\":\"This option enables loading async chunks via a custom script type, such as script type=\\\"module\\\".\",\"enum\":[false,\"text/javascript\",\"module\"]},\"SnapshotOptions\":{\"description\":\"Options affecting how file system snapshots are created and validated.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"buildDependencies\":{\"description\":\"Options for snapshotting build dependencies to determine if the whole cache need to be invalidated.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"hash\":{\"description\":\"Use hashes of the content of the files/directories to determine invalidation.\",\"type\":\"boolean\"},\"timestamp\":{\"description\":\"Use timestamps of the files/directories to determine invalidation.\",\"type\":\"boolean\"}}},\"immutablePaths\":{\"description\":\"List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.\",\"type\":\"array\",\"items\":{\"description\":\"List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.\",\"anyOf\":[{\"description\":\"A RegExp matching an immutable directory (usually a package manager cache directory, including the tailing slash)\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"description\":\"A path to an immutable directory (usually a package manager cache directory).\",\"type\":\"string\",\"absolutePath\":true,\"minLength\":1}]}},\"managedPaths\":{\"description\":\"List of paths that are managed by a package manager and can be trusted to not be modified otherwise.\",\"type\":\"array\",\"items\":{\"description\":\"List of paths that are managed by a package manager and can be trusted to not be modified otherwise.\",\"anyOf\":[{\"description\":\"A RegExp matching a managed directory (usually a node_modules directory, including the tailing slash)\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"description\":\"A path to a managed directory (usually a node_modules directory).\",\"type\":\"string\",\"absolutePath\":true,\"minLength\":1}]}},\"module\":{\"description\":\"Options for snapshotting dependencies of modules to determine if they need to be built again.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"hash\":{\"description\":\"Use hashes of the content of the files/directories to determine invalidation.\",\"type\":\"boolean\"},\"timestamp\":{\"description\":\"Use timestamps of the files/directories to determine invalidation.\",\"type\":\"boolean\"}}},\"resolve\":{\"description\":\"Options for snapshotting dependencies of request resolving to determine if requests need to be re-resolved.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"hash\":{\"description\":\"Use hashes of the content of the files/directories to determine invalidation.\",\"type\":\"boolean\"},\"timestamp\":{\"description\":\"Use timestamps of the files/directories to determine invalidation.\",\"type\":\"boolean\"}}},\"resolveBuildDependencies\":{\"description\":\"Options for snapshotting the resolving of build dependencies to determine if the build dependencies need to be re-resolved.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"hash\":{\"description\":\"Use hashes of the content of the files/directories to determine invalidation.\",\"type\":\"boolean\"},\"timestamp\":{\"description\":\"Use timestamps of the files/directories to determine invalidation.\",\"type\":\"boolean\"}}}}},\"SourceMapFilename\":{\"description\":\"The filename of the SourceMaps for the JavaScript files. They are inside the 'output.path' directory.\",\"type\":\"string\",\"absolutePath\":false},\"SourcePrefix\":{\"description\":\"Prefixes every line of the source in the bundle with this string.\",\"type\":\"string\"},\"StatsOptions\":{\"description\":\"Stats options object.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"all\":{\"description\":\"Fallback value for stats options when an option is not defined (has precedence over local webpack defaults).\",\"type\":\"boolean\"},\"assets\":{\"description\":\"Add assets information.\",\"type\":\"boolean\"},\"assetsSort\":{\"description\":\"Sort the assets by that field.\",\"type\":\"string\"},\"assetsSpace\":{\"description\":\"Space to display assets (groups will be collapsed to fit this space).\",\"type\":\"number\"},\"builtAt\":{\"description\":\"Add built at time information.\",\"type\":\"boolean\"},\"cached\":{\"description\":\"Add information about cached (not built) modules (deprecated: use 'cachedModules' instead).\",\"type\":\"boolean\"},\"cachedAssets\":{\"description\":\"Show cached assets (setting this to `false` only shows emitted files).\",\"type\":\"boolean\"},\"cachedModules\":{\"description\":\"Add information about cached (not built) modules.\",\"type\":\"boolean\"},\"children\":{\"description\":\"Add children information.\",\"type\":\"boolean\"},\"chunkGroupAuxiliary\":{\"description\":\"Display auxiliary assets in chunk groups.\",\"type\":\"boolean\"},\"chunkGroupChildren\":{\"description\":\"Display children of chunk groups.\",\"type\":\"boolean\"},\"chunkGroupMaxAssets\":{\"description\":\"Limit of assets displayed in chunk groups.\",\"type\":\"number\"},\"chunkGroups\":{\"description\":\"Display all chunk groups with the corresponding bundles.\",\"type\":\"boolean\"},\"chunkModules\":{\"description\":\"Add built modules information to chunk information.\",\"type\":\"boolean\"},\"chunkModulesSpace\":{\"description\":\"Space to display chunk modules (groups will be collapsed to fit this space, value is in number of modules/group).\",\"type\":\"number\"},\"chunkOrigins\":{\"description\":\"Add the origins of chunks and chunk merging info.\",\"type\":\"boolean\"},\"chunkRelations\":{\"description\":\"Add information about parent, children and sibling chunks to chunk information.\",\"type\":\"boolean\"},\"chunks\":{\"description\":\"Add chunk information.\",\"type\":\"boolean\"},\"chunksSort\":{\"description\":\"Sort the chunks by that field.\",\"type\":\"string\"},\"colors\":{\"description\":\"Enables/Disables colorful output.\",\"anyOf\":[{\"description\":\"Enables/Disables colorful output.\",\"type\":\"boolean\"},{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"bold\":{\"description\":\"Custom color for bold text.\",\"type\":\"string\"},\"cyan\":{\"description\":\"Custom color for cyan text.\",\"type\":\"string\"},\"green\":{\"description\":\"Custom color for green text.\",\"type\":\"string\"},\"magenta\":{\"description\":\"Custom color for magenta text.\",\"type\":\"string\"},\"red\":{\"description\":\"Custom color for red text.\",\"type\":\"string\"},\"yellow\":{\"description\":\"Custom color for yellow text.\",\"type\":\"string\"}}}]},\"context\":{\"description\":\"Context directory for request shortening.\",\"type\":\"string\",\"absolutePath\":true},\"dependentModules\":{\"description\":\"Show chunk modules that are dependencies of other modules of the chunk.\",\"type\":\"boolean\"},\"depth\":{\"description\":\"Add module depth in module graph.\",\"type\":\"boolean\"},\"entrypoints\":{\"description\":\"Display the entry points with the corresponding bundles.\",\"anyOf\":[{\"enum\":[\"auto\"]},{\"type\":\"boolean\"}]},\"env\":{\"description\":\"Add --env information.\",\"type\":\"boolean\"},\"errorDetails\":{\"description\":\"Add details to errors (like resolving log).\",\"anyOf\":[{\"enum\":[\"auto\"]},{\"type\":\"boolean\"}]},\"errorStack\":{\"description\":\"Add internal stack trace to errors.\",\"type\":\"boolean\"},\"errors\":{\"description\":\"Add errors.\",\"type\":\"boolean\"},\"errorsCount\":{\"description\":\"Add errors count.\",\"type\":\"boolean\"},\"exclude\":{\"description\":\"Please use excludeModules instead.\",\"cli\":{\"exclude\":true},\"anyOf\":[{\"type\":\"boolean\"},{\"$ref\":\"#/definitions/ModuleFilterTypes\"}]},\"excludeAssets\":{\"description\":\"Suppress assets that match the specified filters. Filters can be Strings, RegExps or Functions.\",\"oneOf\":[{\"$ref\":\"#/definitions/AssetFilterTypes\"}]},\"excludeModules\":{\"description\":\"Suppress modules that match the specified filters. Filters can be Strings, RegExps, Booleans or Functions.\",\"anyOf\":[{\"type\":\"boolean\"},{\"$ref\":\"#/definitions/ModuleFilterTypes\"}]},\"groupAssetsByChunk\":{\"description\":\"Group assets by how their are related to chunks.\",\"type\":\"boolean\"},\"groupAssetsByEmitStatus\":{\"description\":\"Group assets by their status (emitted, compared for emit or cached).\",\"type\":\"boolean\"},\"groupAssetsByExtension\":{\"description\":\"Group assets by their extension.\",\"type\":\"boolean\"},\"groupAssetsByInfo\":{\"description\":\"Group assets by their asset info (immutable, development, hotModuleReplacement, etc).\",\"type\":\"boolean\"},\"groupAssetsByPath\":{\"description\":\"Group assets by their path.\",\"type\":\"boolean\"},\"groupModulesByAttributes\":{\"description\":\"Group modules by their attributes (errors, warnings, assets, optional, orphan, or dependent).\",\"type\":\"boolean\"},\"groupModulesByCacheStatus\":{\"description\":\"Group modules by their status (cached or built and cacheable).\",\"type\":\"boolean\"},\"groupModulesByExtension\":{\"description\":\"Group modules by their extension.\",\"type\":\"boolean\"},\"groupModulesByLayer\":{\"description\":\"Group modules by their layer.\",\"type\":\"boolean\"},\"groupModulesByPath\":{\"description\":\"Group modules by their path.\",\"type\":\"boolean\"},\"groupModulesByType\":{\"description\":\"Group modules by their type.\",\"type\":\"boolean\"},\"groupReasonsByOrigin\":{\"description\":\"Group reasons by their origin module.\",\"type\":\"boolean\"},\"hash\":{\"description\":\"Add the hash of the compilation.\",\"type\":\"boolean\"},\"ids\":{\"description\":\"Add ids.\",\"type\":\"boolean\"},\"logging\":{\"description\":\"Add logging output.\",\"anyOf\":[{\"description\":\"Specify log level of logging output.\",\"enum\":[\"none\",\"error\",\"warn\",\"info\",\"log\",\"verbose\"]},{\"description\":\"Enable/disable logging output (`true`: shows normal logging output, loglevel: log).\",\"type\":\"boolean\"}]},\"loggingDebug\":{\"description\":\"Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions.\",\"anyOf\":[{\"description\":\"Enable/Disable debug logging for all loggers.\",\"type\":\"boolean\"},{\"$ref\":\"#/definitions/FilterTypes\"}]},\"loggingTrace\":{\"description\":\"Add stack traces to logging output.\",\"type\":\"boolean\"},\"moduleAssets\":{\"description\":\"Add information about assets inside modules.\",\"type\":\"boolean\"},\"moduleTrace\":{\"description\":\"Add dependencies and origin of warnings/errors.\",\"type\":\"boolean\"},\"modules\":{\"description\":\"Add built modules information.\",\"type\":\"boolean\"},\"modulesSort\":{\"description\":\"Sort the modules by that field.\",\"type\":\"string\"},\"modulesSpace\":{\"description\":\"Space to display modules (groups will be collapsed to fit this space, value is in number of modules/groups).\",\"type\":\"number\"},\"nestedModules\":{\"description\":\"Add information about modules nested in other modules (like with module concatenation).\",\"type\":\"boolean\"},\"nestedModulesSpace\":{\"description\":\"Space to display modules nested within other modules (groups will be collapsed to fit this space, value is in number of modules/group).\",\"type\":\"number\"},\"optimizationBailout\":{\"description\":\"Show reasons why optimization bailed out for modules.\",\"type\":\"boolean\"},\"orphanModules\":{\"description\":\"Add information about orphan modules.\",\"type\":\"boolean\"},\"outputPath\":{\"description\":\"Add output path information.\",\"type\":\"boolean\"},\"performance\":{\"description\":\"Add performance hint flags.\",\"type\":\"boolean\"},\"preset\":{\"description\":\"Preset for the default values.\",\"anyOf\":[{\"type\":\"boolean\"},{\"type\":\"string\"}]},\"providedExports\":{\"description\":\"Show exports provided by modules.\",\"type\":\"boolean\"},\"publicPath\":{\"description\":\"Add public path information.\",\"type\":\"boolean\"},\"reasons\":{\"description\":\"Add information about the reasons why modules are included.\",\"type\":\"boolean\"},\"reasonsSpace\":{\"description\":\"Space to display reasons (groups will be collapsed to fit this space).\",\"type\":\"number\"},\"relatedAssets\":{\"description\":\"Add information about assets that are related to other assets (like SourceMaps for assets).\",\"type\":\"boolean\"},\"runtime\":{\"description\":\"Add information about runtime modules (deprecated: use 'runtimeModules' instead).\",\"type\":\"boolean\"},\"runtimeModules\":{\"description\":\"Add information about runtime modules.\",\"type\":\"boolean\"},\"source\":{\"description\":\"Add the source code of modules.\",\"type\":\"boolean\"},\"timings\":{\"description\":\"Add timing information.\",\"type\":\"boolean\"},\"usedExports\":{\"description\":\"Show exports used by modules.\",\"type\":\"boolean\"},\"version\":{\"description\":\"Add webpack version information.\",\"type\":\"boolean\"},\"warnings\":{\"description\":\"Add warnings.\",\"type\":\"boolean\"},\"warningsCount\":{\"description\":\"Add warnings count.\",\"type\":\"boolean\"},\"warningsFilter\":{\"description\":\"Suppress listing warnings that match the specified filters (they will still be counted). Filters can be Strings, RegExps or Functions.\",\"oneOf\":[{\"$ref\":\"#/definitions/WarningFilterTypes\"}]}}},\"StatsValue\":{\"description\":\"Stats options object or preset name.\",\"anyOf\":[{\"enum\":[\"none\",\"summary\",\"errors-only\",\"errors-warnings\",\"minimal\",\"normal\",\"detailed\",\"verbose\"]},{\"type\":\"boolean\"},{\"$ref\":\"#/definitions/StatsOptions\"}]},\"StrictModuleErrorHandling\":{\"description\":\"Handles error in module loading correctly at a performance cost. This will handle module error compatible with the EcmaScript Modules spec.\",\"type\":\"boolean\"},\"StrictModuleExceptionHandling\":{\"description\":\"Handles exceptions in module loading correctly at a performance cost (Deprecated). This will handle module error compatible with the Node.js CommonJS way.\",\"type\":\"boolean\"},\"Target\":{\"description\":\"Environment to build for. An array of environments to build for all of them when possible.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Environment to build for.\",\"type\":\"string\",\"minLength\":1},\"minItems\":1},{\"enum\":[false]},{\"type\":\"string\",\"minLength\":1}]},\"TrustedTypes\":{\"description\":\"Use a Trusted Types policy to create urls for chunks.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"policyName\":{\"description\":\"The name of the Trusted Types policy created by webpack to serve bundle chunks.\",\"type\":\"string\",\"minLength\":1}}},\"UmdNamedDefine\":{\"description\":\"If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.\",\"type\":\"boolean\"},\"UniqueName\":{\"description\":\"A unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals.\",\"type\":\"string\",\"minLength\":1},\"WarningFilterItemTypes\":{\"description\":\"Filtering value, regexp or function.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":false},{\"instanceof\":\"Function\",\"tsType\":\"((warning: import('../lib/stats/DefaultStatsFactoryPlugin').StatsError, value: string) => boolean)\"}]},\"WarningFilterTypes\":{\"description\":\"Filtering warnings.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Rule to filter.\",\"cli\":{\"helper\":true},\"oneOf\":[{\"$ref\":\"#/definitions/WarningFilterItemTypes\"}]}},{\"$ref\":\"#/definitions/WarningFilterItemTypes\"}]},\"WasmLoading\":{\"description\":\"The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).\",\"anyOf\":[{\"enum\":[false]},{\"$ref\":\"#/definitions/WasmLoadingType\"}]},\"WasmLoadingType\":{\"description\":\"The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).\",\"anyOf\":[{\"enum\":[\"fetch-streaming\",\"fetch\",\"async-node\"]},{\"type\":\"string\"}]},\"Watch\":{\"description\":\"Enter watch mode, which rebuilds on file change.\",\"type\":\"boolean\"},\"WatchOptions\":{\"description\":\"Options for the watcher.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"aggregateTimeout\":{\"description\":\"Delay the rebuilt after the first change. Value is a time in ms.\",\"type\":\"number\"},\"followSymlinks\":{\"description\":\"Resolve symlinks and watch symlink and real file. This is usually not needed as webpack already resolves symlinks ('resolve.symlinks').\",\"type\":\"boolean\"},\"ignored\":{\"description\":\"Ignore some files from watching (glob pattern or regexp).\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"A glob pattern for files that should be ignored from watching.\",\"type\":\"string\",\"minLength\":1}},{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"description\":\"A single glob pattern for files that should be ignored from watching.\",\"type\":\"string\",\"minLength\":1}]},\"poll\":{\"description\":\"Enable polling mode for watching.\",\"anyOf\":[{\"description\":\"`number`: use polling with specified interval.\",\"type\":\"number\"},{\"description\":\"`true`: use polling.\",\"type\":\"boolean\"}]},\"stdin\":{\"description\":\"Stop watching when stdin stream has ended.\",\"type\":\"boolean\"}}},\"WebassemblyModuleFilename\":{\"description\":\"The filename of WebAssembly modules as relative path inside the 'output.path' directory.\",\"type\":\"string\",\"absolutePath\":false},\"WebpackOptionsNormalized\":{\"description\":\"Normalized webpack options object.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"amd\":{\"$ref\":\"#/definitions/Amd\"},\"bail\":{\"$ref\":\"#/definitions/Bail\"},\"cache\":{\"$ref\":\"#/definitions/CacheOptionsNormalized\"},\"context\":{\"$ref\":\"#/definitions/Context\"},\"dependencies\":{\"$ref\":\"#/definitions/Dependencies\"},\"devServer\":{\"$ref\":\"#/definitions/DevServer\"},\"devtool\":{\"$ref\":\"#/definitions/DevTool\"},\"entry\":{\"$ref\":\"#/definitions/EntryNormalized\"},\"experiments\":{\"$ref\":\"#/definitions/ExperimentsNormalized\"},\"externals\":{\"$ref\":\"#/definitions/Externals\"},\"externalsPresets\":{\"$ref\":\"#/definitions/ExternalsPresets\"},\"externalsType\":{\"$ref\":\"#/definitions/ExternalsType\"},\"ignoreWarnings\":{\"$ref\":\"#/definitions/IgnoreWarningsNormalized\"},\"infrastructureLogging\":{\"$ref\":\"#/definitions/InfrastructureLogging\"},\"loader\":{\"$ref\":\"#/definitions/Loader\"},\"mode\":{\"$ref\":\"#/definitions/Mode\"},\"module\":{\"$ref\":\"#/definitions/ModuleOptionsNormalized\"},\"name\":{\"$ref\":\"#/definitions/Name\"},\"node\":{\"$ref\":\"#/definitions/Node\"},\"optimization\":{\"$ref\":\"#/definitions/Optimization\"},\"output\":{\"$ref\":\"#/definitions/OutputNormalized\"},\"parallelism\":{\"$ref\":\"#/definitions/Parallelism\"},\"performance\":{\"$ref\":\"#/definitions/Performance\"},\"plugins\":{\"$ref\":\"#/definitions/Plugins\"},\"profile\":{\"$ref\":\"#/definitions/Profile\"},\"recordsInputPath\":{\"$ref\":\"#/definitions/RecordsInputPath\"},\"recordsOutputPath\":{\"$ref\":\"#/definitions/RecordsOutputPath\"},\"resolve\":{\"$ref\":\"#/definitions/Resolve\"},\"resolveLoader\":{\"$ref\":\"#/definitions/ResolveLoader\"},\"snapshot\":{\"$ref\":\"#/definitions/SnapshotOptions\"},\"stats\":{\"$ref\":\"#/definitions/StatsValue\"},\"target\":{\"$ref\":\"#/definitions/Target\"},\"watch\":{\"$ref\":\"#/definitions/Watch\"},\"watchOptions\":{\"$ref\":\"#/definitions/WatchOptions\"}},\"required\":[\"cache\",\"snapshot\",\"entry\",\"experiments\",\"externals\",\"externalsPresets\",\"infrastructureLogging\",\"module\",\"node\",\"optimization\",\"output\",\"plugins\",\"resolve\",\"resolveLoader\",\"stats\",\"watchOptions\"]},\"WebpackPluginFunction\":{\"description\":\"Function acting as plugin.\",\"instanceof\":\"Function\",\"tsType\":\"(this: import('../lib/Compiler'), compiler: import('../lib/Compiler')) => void\"},\"WebpackPluginInstance\":{\"description\":\"Plugin instance.\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"apply\":{\"description\":\"The run point of the plugin, required method.\",\"instanceof\":\"Function\",\"tsType\":\"(compiler: import('../lib/Compiler')) => void\"}},\"required\":[\"apply\"]}},\"title\":\"WebpackOptions\",\"description\":\"Options object as provided by the user.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"amd\":{\"$ref\":\"#/definitions/Amd\"},\"bail\":{\"$ref\":\"#/definitions/Bail\"},\"cache\":{\"$ref\":\"#/definitions/CacheOptions\"},\"context\":{\"$ref\":\"#/definitions/Context\"},\"dependencies\":{\"$ref\":\"#/definitions/Dependencies\"},\"devServer\":{\"$ref\":\"#/definitions/DevServer\"},\"devtool\":{\"$ref\":\"#/definitions/DevTool\"},\"entry\":{\"$ref\":\"#/definitions/Entry\"},\"experiments\":{\"$ref\":\"#/definitions/Experiments\"},\"externals\":{\"$ref\":\"#/definitions/Externals\"},\"externalsPresets\":{\"$ref\":\"#/definitions/ExternalsPresets\"},\"externalsType\":{\"$ref\":\"#/definitions/ExternalsType\"},\"ignoreWarnings\":{\"$ref\":\"#/definitions/IgnoreWarnings\"},\"infrastructureLogging\":{\"$ref\":\"#/definitions/InfrastructureLogging\"},\"loader\":{\"$ref\":\"#/definitions/Loader\"},\"mode\":{\"$ref\":\"#/definitions/Mode\"},\"module\":{\"$ref\":\"#/definitions/ModuleOptions\"},\"name\":{\"$ref\":\"#/definitions/Name\"},\"node\":{\"$ref\":\"#/definitions/Node\"},\"optimization\":{\"$ref\":\"#/definitions/Optimization\"},\"output\":{\"$ref\":\"#/definitions/Output\"},\"parallelism\":{\"$ref\":\"#/definitions/Parallelism\"},\"performance\":{\"$ref\":\"#/definitions/Performance\"},\"plugins\":{\"$ref\":\"#/definitions/Plugins\"},\"profile\":{\"$ref\":\"#/definitions/Profile\"},\"recordsInputPath\":{\"$ref\":\"#/definitions/RecordsInputPath\"},\"recordsOutputPath\":{\"$ref\":\"#/definitions/RecordsOutputPath\"},\"recordsPath\":{\"$ref\":\"#/definitions/RecordsPath\"},\"resolve\":{\"$ref\":\"#/definitions/Resolve\"},\"resolveLoader\":{\"$ref\":\"#/definitions/ResolveLoader\"},\"snapshot\":{\"$ref\":\"#/definitions/SnapshotOptions\"},\"stats\":{\"$ref\":\"#/definitions/StatsValue\"},\"target\":{\"$ref\":\"#/definitions/Target\"},\"watch\":{\"$ref\":\"#/definitions/Watch\"},\"watchOptions\":{\"$ref\":\"#/definitions/WatchOptions\"}}}"); +module.exports = JSON.parse("{\"definitions\":{\"Amd\":{\"description\":\"Set the value of `require.amd` and `define.amd`. Or disable AMD support.\",\"anyOf\":[{\"description\":\"You can pass `false` to disable AMD support.\",\"enum\":[false]},{\"description\":\"You can pass an object to set the value of `require.amd` and `define.amd`.\",\"type\":\"object\"}]},\"AssetFilterItemTypes\":{\"description\":\"Filtering value, regexp or function.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":false},{\"instanceof\":\"Function\",\"tsType\":\"((name: string, asset: import('../lib/stats/DefaultStatsFactoryPlugin').StatsAsset) => boolean)\"}]},\"AssetFilterTypes\":{\"description\":\"Filtering modules.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Rule to filter.\",\"cli\":{\"helper\":true},\"oneOf\":[{\"$ref\":\"#/definitions/AssetFilterItemTypes\"}]}},{\"$ref\":\"#/definitions/AssetFilterItemTypes\"}]},\"AssetGeneratorDataUrl\":{\"description\":\"The options for data url generator.\",\"anyOf\":[{\"$ref\":\"#/definitions/AssetGeneratorDataUrlOptions\"},{\"$ref\":\"#/definitions/AssetGeneratorDataUrlFunction\"}]},\"AssetGeneratorDataUrlFunction\":{\"description\":\"Function that executes for module and should return an DataUrl string.\",\"instanceof\":\"Function\",\"tsType\":\"((source: string | Buffer, context: { filename: string, module: import('../lib/Module') }) => string)\"},\"AssetGeneratorDataUrlOptions\":{\"description\":\"Options object for data url generation.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"encoding\":{\"description\":\"Asset encoding (defaults to base64).\",\"enum\":[false,\"base64\"]},\"mimetype\":{\"description\":\"Asset mimetype (getting from file extension by default).\",\"type\":\"string\"}}},\"AssetGeneratorOptions\":{\"description\":\"Generator options for asset modules.\",\"type\":\"object\",\"implements\":[\"#/definitions/AssetInlineGeneratorOptions\",\"#/definitions/AssetResourceGeneratorOptions\"],\"additionalProperties\":false,\"properties\":{\"dataUrl\":{\"$ref\":\"#/definitions/AssetGeneratorDataUrl\"},\"emit\":{\"description\":\"Emit an output asset from this asset module. This can be set to 'false' to omit emitting e. g. for SSR.\",\"type\":\"boolean\"},\"filename\":{\"$ref\":\"#/definitions/FilenameTemplate\"},\"publicPath\":{\"$ref\":\"#/definitions/RawPublicPath\"}}},\"AssetInlineGeneratorOptions\":{\"description\":\"Generator options for asset/inline modules.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"dataUrl\":{\"$ref\":\"#/definitions/AssetGeneratorDataUrl\"}}},\"AssetModuleFilename\":{\"description\":\"The filename of asset modules as relative path inside the 'output.path' directory.\",\"anyOf\":[{\"type\":\"string\",\"absolutePath\":false},{\"instanceof\":\"Function\",\"tsType\":\"((pathData: import(\\\"../lib/Compilation\\\").PathData, assetInfo?: import(\\\"../lib/Compilation\\\").AssetInfo) => string)\"}]},\"AssetParserDataUrlFunction\":{\"description\":\"Function that executes for module and should return whenever asset should be inlined as DataUrl.\",\"instanceof\":\"Function\",\"tsType\":\"((source: string | Buffer, context: { filename: string, module: import('../lib/Module') }) => boolean)\"},\"AssetParserDataUrlOptions\":{\"description\":\"Options object for DataUrl condition.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"maxSize\":{\"description\":\"Maximum size of asset that should be inline as modules. Default: 8kb.\",\"type\":\"number\"}}},\"AssetParserOptions\":{\"description\":\"Parser options for asset modules.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"dataUrlCondition\":{\"description\":\"The condition for inlining the asset as DataUrl.\",\"anyOf\":[{\"$ref\":\"#/definitions/AssetParserDataUrlOptions\"},{\"$ref\":\"#/definitions/AssetParserDataUrlFunction\"}]}}},\"AssetResourceGeneratorOptions\":{\"description\":\"Generator options for asset/resource modules.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"emit\":{\"description\":\"Emit an output asset from this asset module. This can be set to 'false' to omit emitting e. g. for SSR.\",\"type\":\"boolean\"},\"filename\":{\"$ref\":\"#/definitions/FilenameTemplate\"},\"publicPath\":{\"$ref\":\"#/definitions/RawPublicPath\"}}},\"AuxiliaryComment\":{\"description\":\"Add a comment in the UMD wrapper.\",\"anyOf\":[{\"description\":\"Append the same comment above each import style.\",\"type\":\"string\"},{\"$ref\":\"#/definitions/LibraryCustomUmdCommentObject\"}]},\"Bail\":{\"description\":\"Report the first error as a hard error instead of tolerating it.\",\"type\":\"boolean\"},\"CacheOptions\":{\"description\":\"Cache generated modules and chunks to improve performance for multiple incremental builds.\",\"anyOf\":[{\"description\":\"Enable in memory caching.\",\"enum\":[true]},{\"$ref\":\"#/definitions/CacheOptionsNormalized\"}]},\"CacheOptionsNormalized\":{\"description\":\"Cache generated modules and chunks to improve performance for multiple incremental builds.\",\"anyOf\":[{\"description\":\"Disable caching.\",\"enum\":[false]},{\"$ref\":\"#/definitions/MemoryCacheOptions\"},{\"$ref\":\"#/definitions/FileCacheOptions\"}]},\"Charset\":{\"description\":\"Add charset attribute for script tag.\",\"type\":\"boolean\"},\"ChunkFilename\":{\"description\":\"Specifies the filename template of output files of non-initial chunks on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.\",\"oneOf\":[{\"$ref\":\"#/definitions/FilenameTemplate\"}]},\"ChunkFormat\":{\"description\":\"The format of chunks (formats included by default are 'array-push' (web/WebWorker), 'commonjs' (node.js), 'module' (ESM), but others might be added by plugins).\",\"anyOf\":[{\"enum\":[\"array-push\",\"commonjs\",\"module\",false]},{\"type\":\"string\"}]},\"ChunkLoadTimeout\":{\"description\":\"Number of milliseconds before chunk request expires.\",\"type\":\"number\"},\"ChunkLoading\":{\"description\":\"The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).\",\"anyOf\":[{\"enum\":[false]},{\"$ref\":\"#/definitions/ChunkLoadingType\"}]},\"ChunkLoadingGlobal\":{\"description\":\"The global variable used by webpack for loading of chunks.\",\"type\":\"string\"},\"ChunkLoadingType\":{\"description\":\"The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).\",\"anyOf\":[{\"enum\":[\"jsonp\",\"import-scripts\",\"require\",\"async-node\",\"import\"]},{\"type\":\"string\"}]},\"Clean\":{\"description\":\"Clean the output directory before emit.\",\"anyOf\":[{\"type\":\"boolean\"},{\"$ref\":\"#/definitions/CleanOptions\"}]},\"CleanOptions\":{\"description\":\"Advanced options for cleaning assets.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"dry\":{\"description\":\"Log the assets that should be removed instead of deleting them.\",\"type\":\"boolean\"},\"keep\":{\"description\":\"Keep these assets.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":false},{\"instanceof\":\"Function\",\"tsType\":\"((filename: string) => boolean)\"}]}}},\"CompareBeforeEmit\":{\"description\":\"Check if to be emitted file already exists and have the same content before writing to output filesystem.\",\"type\":\"boolean\"},\"Context\":{\"description\":\"The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.\",\"type\":\"string\",\"absolutePath\":true},\"CrossOriginLoading\":{\"description\":\"This option enables cross-origin loading of chunks.\",\"enum\":[false,\"anonymous\",\"use-credentials\"]},\"Dependencies\":{\"description\":\"References to other configurations to depend on.\",\"type\":\"array\",\"items\":{\"description\":\"References to another configuration to depend on.\",\"type\":\"string\"}},\"DevServer\":{\"description\":\"Options for the webpack-dev-server.\",\"type\":\"object\"},\"DevTool\":{\"description\":\"A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).\",\"anyOf\":[{\"enum\":[false,\"eval\"]},{\"type\":\"string\",\"pattern\":\"^(inline-|hidden-|eval-)?(nosources-)?(cheap-(module-)?)?source-map$\"}]},\"DevtoolFallbackModuleFilenameTemplate\":{\"description\":\"Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.\",\"anyOf\":[{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"DevtoolModuleFilenameTemplate\":{\"description\":\"Filename template string of function for the sources array in a generated SourceMap.\",\"anyOf\":[{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"DevtoolNamespace\":{\"description\":\"Module namespace to use when interpolating filename template string for the sources array in a generated SourceMap. Defaults to `output.library` if not set. It's useful for avoiding runtime collisions in sourcemaps from multiple webpack projects built as libraries.\",\"type\":\"string\"},\"EmptyGeneratorOptions\":{\"description\":\"No generator options are supported for this module type.\",\"type\":\"object\",\"additionalProperties\":false},\"EmptyParserOptions\":{\"description\":\"No parser options are supported for this module type.\",\"type\":\"object\",\"additionalProperties\":false},\"EnabledChunkLoadingTypes\":{\"description\":\"List of chunk loading types enabled for use by entry points.\",\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/ChunkLoadingType\"}},\"EnabledLibraryTypes\":{\"description\":\"List of library types enabled for use by entry points.\",\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/LibraryType\"}},\"EnabledWasmLoadingTypes\":{\"description\":\"List of wasm loading types enabled for use by entry points.\",\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/WasmLoadingType\"}},\"Entry\":{\"description\":\"The entry point(s) of the compilation.\",\"anyOf\":[{\"$ref\":\"#/definitions/EntryDynamic\"},{\"$ref\":\"#/definitions/EntryStatic\"}]},\"EntryDescription\":{\"description\":\"An object with entry point description.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"asyncChunks\":{\"description\":\"Enable/disable creating async chunks that are loaded on demand.\",\"type\":\"boolean\"},\"chunkLoading\":{\"$ref\":\"#/definitions/ChunkLoading\"},\"dependOn\":{\"description\":\"The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.\",\"anyOf\":[{\"description\":\"The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.\",\"type\":\"array\",\"items\":{\"description\":\"An entrypoint that the current entrypoint depend on. It must be loaded when this entrypoint is loaded.\",\"type\":\"string\",\"minLength\":1},\"minItems\":1,\"uniqueItems\":true},{\"description\":\"An entrypoint that the current entrypoint depend on. It must be loaded when this entrypoint is loaded.\",\"type\":\"string\",\"minLength\":1}]},\"filename\":{\"$ref\":\"#/definitions/EntryFilename\"},\"import\":{\"$ref\":\"#/definitions/EntryItem\"},\"layer\":{\"$ref\":\"#/definitions/Layer\"},\"library\":{\"$ref\":\"#/definitions/LibraryOptions\"},\"publicPath\":{\"$ref\":\"#/definitions/PublicPath\"},\"runtime\":{\"$ref\":\"#/definitions/EntryRuntime\"},\"wasmLoading\":{\"$ref\":\"#/definitions/WasmLoading\"}},\"required\":[\"import\"]},\"EntryDescriptionNormalized\":{\"description\":\"An object with entry point description.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"asyncChunks\":{\"description\":\"Enable/disable creating async chunks that are loaded on demand.\",\"type\":\"boolean\"},\"chunkLoading\":{\"$ref\":\"#/definitions/ChunkLoading\"},\"dependOn\":{\"description\":\"The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.\",\"type\":\"array\",\"items\":{\"description\":\"An entrypoint that the current entrypoint depend on. It must be loaded when this entrypoint is loaded.\",\"type\":\"string\",\"minLength\":1},\"minItems\":1,\"uniqueItems\":true},\"filename\":{\"$ref\":\"#/definitions/Filename\"},\"import\":{\"description\":\"Module(s) that are loaded upon startup. The last one is exported.\",\"type\":\"array\",\"items\":{\"description\":\"Module that is loaded upon startup. Only the last one is exported.\",\"type\":\"string\",\"minLength\":1},\"minItems\":1,\"uniqueItems\":true},\"layer\":{\"$ref\":\"#/definitions/Layer\"},\"library\":{\"$ref\":\"#/definitions/LibraryOptions\"},\"publicPath\":{\"$ref\":\"#/definitions/PublicPath\"},\"runtime\":{\"$ref\":\"#/definitions/EntryRuntime\"},\"wasmLoading\":{\"$ref\":\"#/definitions/WasmLoading\"}}},\"EntryDynamic\":{\"description\":\"A Function returning an entry object, an entry string, an entry array or a promise to these things.\",\"instanceof\":\"Function\",\"tsType\":\"(() => EntryStatic | Promise)\"},\"EntryDynamicNormalized\":{\"description\":\"A Function returning a Promise resolving to a normalized entry.\",\"instanceof\":\"Function\",\"tsType\":\"(() => Promise)\"},\"EntryFilename\":{\"description\":\"Specifies the filename of the output file on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.\",\"oneOf\":[{\"$ref\":\"#/definitions/FilenameTemplate\"}]},\"EntryItem\":{\"description\":\"Module(s) that are loaded upon startup.\",\"anyOf\":[{\"description\":\"All modules are loaded upon startup. The last one is exported.\",\"type\":\"array\",\"items\":{\"description\":\"A module that is loaded upon startup. Only the last one is exported.\",\"type\":\"string\",\"minLength\":1},\"minItems\":1,\"uniqueItems\":true},{\"description\":\"The string is resolved to a module which is loaded upon startup.\",\"type\":\"string\",\"minLength\":1}]},\"EntryNormalized\":{\"description\":\"The entry point(s) of the compilation.\",\"anyOf\":[{\"$ref\":\"#/definitions/EntryDynamicNormalized\"},{\"$ref\":\"#/definitions/EntryStaticNormalized\"}]},\"EntryObject\":{\"description\":\"Multiple entry bundles are created. The key is the entry name. The value can be a string, an array or an entry description object.\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"An entry point with name.\",\"anyOf\":[{\"$ref\":\"#/definitions/EntryItem\"},{\"$ref\":\"#/definitions/EntryDescription\"}]}},\"EntryRuntime\":{\"description\":\"The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\",\"minLength\":1}]},\"EntryStatic\":{\"description\":\"A static entry description.\",\"anyOf\":[{\"$ref\":\"#/definitions/EntryObject\"},{\"$ref\":\"#/definitions/EntryUnnamed\"}]},\"EntryStaticNormalized\":{\"description\":\"Multiple entry bundles are created. The key is the entry name. The value is an entry description object.\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"An object with entry point description.\",\"oneOf\":[{\"$ref\":\"#/definitions/EntryDescriptionNormalized\"}]}},\"EntryUnnamed\":{\"description\":\"An entry point without name.\",\"oneOf\":[{\"$ref\":\"#/definitions/EntryItem\"}]},\"Environment\":{\"description\":\"The abilities of the environment where the webpack generated code should run.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"arrowFunction\":{\"description\":\"The environment supports arrow functions ('() => { ... }').\",\"type\":\"boolean\"},\"bigIntLiteral\":{\"description\":\"The environment supports BigInt as literal (123n).\",\"type\":\"boolean\"},\"const\":{\"description\":\"The environment supports const and let for variable declarations.\",\"type\":\"boolean\"},\"destructuring\":{\"description\":\"The environment supports destructuring ('{ a, b } = obj').\",\"type\":\"boolean\"},\"dynamicImport\":{\"description\":\"The environment supports an async import() function to import EcmaScript modules.\",\"type\":\"boolean\"},\"forOf\":{\"description\":\"The environment supports 'for of' iteration ('for (const x of array) { ... }').\",\"type\":\"boolean\"},\"module\":{\"description\":\"The environment supports EcmaScript Module syntax to import EcmaScript modules (import ... from '...').\",\"type\":\"boolean\"},\"optionalChaining\":{\"description\":\"The environment supports optional chaining ('obj?.a' or 'obj?.()').\",\"type\":\"boolean\"},\"templateLiteral\":{\"description\":\"The environment supports template literals.\",\"type\":\"boolean\"}}},\"Experiments\":{\"description\":\"Enables/Disables experiments (experimental features with relax SemVer compatibility).\",\"type\":\"object\",\"implements\":[\"#/definitions/ExperimentsCommon\"],\"additionalProperties\":false,\"properties\":{\"asyncWebAssembly\":{\"description\":\"Support WebAssembly as asynchronous EcmaScript Module.\",\"type\":\"boolean\"},\"backCompat\":{\"description\":\"Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.\",\"type\":\"boolean\"},\"buildHttp\":{\"description\":\"Build http(s): urls using a lockfile and resource content cache.\",\"anyOf\":[{\"$ref\":\"#/definitions/HttpUriAllowedUris\"},{\"$ref\":\"#/definitions/HttpUriOptions\"}]},\"cacheUnaffected\":{\"description\":\"Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.\",\"type\":\"boolean\"},\"futureDefaults\":{\"description\":\"Apply defaults of next major version.\",\"type\":\"boolean\"},\"layers\":{\"description\":\"Enable module layers.\",\"type\":\"boolean\"},\"lazyCompilation\":{\"description\":\"Compile entrypoints and import()s only when they are accessed.\",\"anyOf\":[{\"type\":\"boolean\"},{\"$ref\":\"#/definitions/LazyCompilationOptions\"}]},\"outputModule\":{\"description\":\"Allow output javascript files as module source type.\",\"type\":\"boolean\"},\"syncWebAssembly\":{\"description\":\"Support WebAssembly as synchronous EcmaScript Module (outdated).\",\"type\":\"boolean\"},\"topLevelAwait\":{\"description\":\"Allow using top-level-await in EcmaScript Modules.\",\"type\":\"boolean\"}}},\"ExperimentsCommon\":{\"description\":\"Enables/Disables experiments (experimental features with relax SemVer compatibility).\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"asyncWebAssembly\":{\"description\":\"Support WebAssembly as asynchronous EcmaScript Module.\",\"type\":\"boolean\"},\"backCompat\":{\"description\":\"Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.\",\"type\":\"boolean\"},\"cacheUnaffected\":{\"description\":\"Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.\",\"type\":\"boolean\"},\"futureDefaults\":{\"description\":\"Apply defaults of next major version.\",\"type\":\"boolean\"},\"layers\":{\"description\":\"Enable module layers.\",\"type\":\"boolean\"},\"outputModule\":{\"description\":\"Allow output javascript files as module source type.\",\"type\":\"boolean\"},\"syncWebAssembly\":{\"description\":\"Support WebAssembly as synchronous EcmaScript Module (outdated).\",\"type\":\"boolean\"},\"topLevelAwait\":{\"description\":\"Allow using top-level-await in EcmaScript Modules.\",\"type\":\"boolean\"}}},\"ExperimentsNormalized\":{\"description\":\"Enables/Disables experiments (experimental features with relax SemVer compatibility).\",\"type\":\"object\",\"implements\":[\"#/definitions/ExperimentsCommon\"],\"additionalProperties\":false,\"properties\":{\"asyncWebAssembly\":{\"description\":\"Support WebAssembly as asynchronous EcmaScript Module.\",\"type\":\"boolean\"},\"backCompat\":{\"description\":\"Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.\",\"type\":\"boolean\"},\"buildHttp\":{\"description\":\"Build http(s): urls using a lockfile and resource content cache.\",\"oneOf\":[{\"$ref\":\"#/definitions/HttpUriOptions\"}]},\"cacheUnaffected\":{\"description\":\"Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.\",\"type\":\"boolean\"},\"futureDefaults\":{\"description\":\"Apply defaults of next major version.\",\"type\":\"boolean\"},\"layers\":{\"description\":\"Enable module layers.\",\"type\":\"boolean\"},\"lazyCompilation\":{\"description\":\"Compile entrypoints and import()s only when they are accessed.\",\"oneOf\":[{\"$ref\":\"#/definitions/LazyCompilationOptions\"}]},\"outputModule\":{\"description\":\"Allow output javascript files as module source type.\",\"type\":\"boolean\"},\"syncWebAssembly\":{\"description\":\"Support WebAssembly as synchronous EcmaScript Module (outdated).\",\"type\":\"boolean\"},\"topLevelAwait\":{\"description\":\"Allow using top-level-await in EcmaScript Modules.\",\"type\":\"boolean\"}}},\"ExternalItem\":{\"description\":\"Specify dependency that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.\",\"anyOf\":[{\"description\":\"Every matched dependency becomes external.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"description\":\"An exact matched dependency becomes external. The same string is used as external dependency.\",\"type\":\"string\"},{\"description\":\"If an dependency matches exactly a property of the object, the property value is used as dependency.\",\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#/definitions/ExternalItemValue\"},\"properties\":{\"byLayer\":{\"description\":\"Specify externals depending on the layer.\",\"anyOf\":[{\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#/definitions/ExternalItem\"}},{\"instanceof\":\"Function\",\"tsType\":\"((layer: string | null) => ExternalItem)\"}]}}},{\"description\":\"The function is called on each dependency (`function(context, request, callback(err, result))`).\",\"instanceof\":\"Function\",\"tsType\":\"(((data: ExternalItemFunctionData, callback: (err?: Error, result?: ExternalItemValue) => void) => void) | ((data: ExternalItemFunctionData) => Promise))\"}]},\"ExternalItemFunctionData\":{\"description\":\"Data object passed as argument when a function is set for 'externals'.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"context\":{\"description\":\"The directory in which the request is placed.\",\"type\":\"string\"},\"contextInfo\":{\"description\":\"Contextual information.\",\"type\":\"object\",\"tsType\":\"import('../lib/ModuleFactory').ModuleFactoryCreateDataContextInfo\"},\"dependencyType\":{\"description\":\"The category of the referencing dependencies.\",\"type\":\"string\"},\"getResolve\":{\"description\":\"Get a resolve function with the current resolver options.\",\"instanceof\":\"Function\",\"tsType\":\"((options?: ResolveOptions) => ((context: string, request: string, callback: (err?: Error, result?: string) => void) => void) | ((context: string, request: string) => Promise))\"},\"request\":{\"description\":\"The request as written by the user in the require/import expression/statement.\",\"type\":\"string\"}}},\"ExternalItemValue\":{\"description\":\"The dependency used for the external.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"A part of the target of the external.\",\"type\":\"string\",\"minLength\":1}},{\"description\":\"`true`: The dependency name is used as target of the external.\",\"type\":\"boolean\"},{\"description\":\"The target of the external.\",\"type\":\"string\"},{\"type\":\"object\"}]},\"Externals\":{\"description\":\"Specify dependencies that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/ExternalItem\"}},{\"$ref\":\"#/definitions/ExternalItem\"}]},\"ExternalsPresets\":{\"description\":\"Enable presets of externals for specific targets.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"electron\":{\"description\":\"Treat common electron built-in modules in main and preload context like 'electron', 'ipc' or 'shell' as external and load them via require() when used.\",\"type\":\"boolean\"},\"electronMain\":{\"description\":\"Treat electron built-in modules in the main context like 'app', 'ipc-main' or 'shell' as external and load them via require() when used.\",\"type\":\"boolean\"},\"electronPreload\":{\"description\":\"Treat electron built-in modules in the preload context like 'web-frame', 'ipc-renderer' or 'shell' as external and load them via require() when used.\",\"type\":\"boolean\"},\"electronRenderer\":{\"description\":\"Treat electron built-in modules in the renderer context like 'web-frame', 'ipc-renderer' or 'shell' as external and load them via require() when used.\",\"type\":\"boolean\"},\"node\":{\"description\":\"Treat node.js built-in modules like fs, path or vm as external and load them via require() when used.\",\"type\":\"boolean\"},\"nwjs\":{\"description\":\"Treat NW.js legacy nw.gui module as external and load it via require() when used.\",\"type\":\"boolean\"},\"web\":{\"description\":\"Treat references to 'http(s)://...' and 'std:...' as external and load them via import when used (Note that this changes execution order as externals are executed before any other code in the chunk).\",\"type\":\"boolean\"},\"webAsync\":{\"description\":\"Treat references to 'http(s)://...' and 'std:...' as external and load them via async import() when used (Note that this external type is an async module, which has various effects on the execution).\",\"type\":\"boolean\"}}},\"ExternalsType\":{\"description\":\"Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).\",\"enum\":[\"var\",\"module\",\"assign\",\"this\",\"window\",\"self\",\"global\",\"commonjs\",\"commonjs2\",\"commonjs-module\",\"amd\",\"amd-require\",\"umd\",\"umd2\",\"jsonp\",\"system\",\"promise\",\"import\",\"script\",\"node-commonjs\"]},\"FileCacheOptions\":{\"description\":\"Options object for persistent file-based caching.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"allowCollectingMemory\":{\"description\":\"Allows to collect unused memory allocated during deserialization. This requires copying data into smaller buffers and has a performance cost.\",\"type\":\"boolean\"},\"buildDependencies\":{\"description\":\"Dependencies the build depends on (in multiple categories, default categories: 'defaultWebpack').\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"List of dependencies the build depends on.\",\"type\":\"array\",\"items\":{\"description\":\"Request to a dependency (resolved as directory relative to the context directory).\",\"type\":\"string\",\"minLength\":1}}},\"cacheDirectory\":{\"description\":\"Base directory for the cache (defaults to node_modules/.cache/webpack).\",\"type\":\"string\",\"absolutePath\":true},\"cacheLocation\":{\"description\":\"Locations for the cache (defaults to cacheDirectory / name).\",\"type\":\"string\",\"absolutePath\":true},\"compression\":{\"description\":\"Compression type used for the cache files.\",\"enum\":[false,\"gzip\",\"brotli\"]},\"hashAlgorithm\":{\"description\":\"Algorithm used for generation the hash (see node.js crypto package).\",\"type\":\"string\"},\"idleTimeout\":{\"description\":\"Time in ms after which idle period the cache storing should happen.\",\"type\":\"number\",\"minimum\":0},\"idleTimeoutAfterLargeChanges\":{\"description\":\"Time in ms after which idle period the cache storing should happen when larger changes has been detected (cumulative build time > 2 x avg cache store time).\",\"type\":\"number\",\"minimum\":0},\"idleTimeoutForInitialStore\":{\"description\":\"Time in ms after which idle period the initial cache storing should happen.\",\"type\":\"number\",\"minimum\":0},\"immutablePaths\":{\"description\":\"List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.\",\"type\":\"array\",\"items\":{\"description\":\"List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.\",\"anyOf\":[{\"description\":\"A RegExp matching an immutable directory (usually a package manager cache directory, including the tailing slash)\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"description\":\"A path to an immutable directory (usually a package manager cache directory).\",\"type\":\"string\",\"absolutePath\":true,\"minLength\":1}]}},\"managedPaths\":{\"description\":\"List of paths that are managed by a package manager and can be trusted to not be modified otherwise.\",\"type\":\"array\",\"items\":{\"description\":\"List of paths that are managed by a package manager and can be trusted to not be modified otherwise.\",\"anyOf\":[{\"description\":\"A RegExp matching a managed directory (usually a node_modules directory, including the tailing slash)\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"description\":\"A path to a managed directory (usually a node_modules directory).\",\"type\":\"string\",\"absolutePath\":true,\"minLength\":1}]}},\"maxAge\":{\"description\":\"Time for which unused cache entries stay in the filesystem cache at minimum (in milliseconds).\",\"type\":\"number\",\"minimum\":0},\"maxMemoryGenerations\":{\"description\":\"Number of generations unused cache entries stay in memory cache at minimum (0 = no memory cache used, 1 = may be removed after unused for a single compilation, ..., Infinity: kept forever). Cache entries will be deserialized from disk when removed from memory cache.\",\"type\":\"number\",\"minimum\":0},\"memoryCacheUnaffected\":{\"description\":\"Additionally cache computation of modules that are unchanged and reference only unchanged modules in memory.\",\"type\":\"boolean\"},\"name\":{\"description\":\"Name for the cache. Different names will lead to different coexisting caches.\",\"type\":\"string\"},\"profile\":{\"description\":\"Track and log detailed timing information for individual cache items.\",\"type\":\"boolean\"},\"store\":{\"description\":\"When to store data to the filesystem. (pack: Store data when compiler is idle in a single file).\",\"enum\":[\"pack\"]},\"type\":{\"description\":\"Filesystem caching.\",\"enum\":[\"filesystem\"]},\"version\":{\"description\":\"Version of the cache data. Different versions won't allow to reuse the cache and override existing content. Update the version when config changed in a way which doesn't allow to reuse cache. This will invalidate the cache.\",\"type\":\"string\"}},\"required\":[\"type\"]},\"Filename\":{\"description\":\"Specifies the filename of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.\",\"oneOf\":[{\"$ref\":\"#/definitions/FilenameTemplate\"}]},\"FilenameTemplate\":{\"description\":\"Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.\",\"anyOf\":[{\"type\":\"string\",\"absolutePath\":false,\"minLength\":1},{\"instanceof\":\"Function\",\"tsType\":\"((pathData: import(\\\"../lib/Compilation\\\").PathData, assetInfo?: import(\\\"../lib/Compilation\\\").AssetInfo) => string)\"}]},\"FilterItemTypes\":{\"description\":\"Filtering value, regexp or function.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":false},{\"instanceof\":\"Function\",\"tsType\":\"((value: string) => boolean)\"}]},\"FilterTypes\":{\"description\":\"Filtering values.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Rule to filter.\",\"cli\":{\"helper\":true},\"oneOf\":[{\"$ref\":\"#/definitions/FilterItemTypes\"}]}},{\"$ref\":\"#/definitions/FilterItemTypes\"}]},\"GeneratorOptionsByModuleType\":{\"description\":\"Specify options for each generator.\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"Options for generating.\",\"type\":\"object\",\"additionalProperties\":true},\"properties\":{\"asset\":{\"$ref\":\"#/definitions/AssetGeneratorOptions\"},\"asset/inline\":{\"$ref\":\"#/definitions/AssetInlineGeneratorOptions\"},\"asset/resource\":{\"$ref\":\"#/definitions/AssetResourceGeneratorOptions\"},\"javascript\":{\"$ref\":\"#/definitions/EmptyGeneratorOptions\"},\"javascript/auto\":{\"$ref\":\"#/definitions/EmptyGeneratorOptions\"},\"javascript/dynamic\":{\"$ref\":\"#/definitions/EmptyGeneratorOptions\"},\"javascript/esm\":{\"$ref\":\"#/definitions/EmptyGeneratorOptions\"}}},\"GlobalObject\":{\"description\":\"An expression which is used to address the global object/scope in runtime code.\",\"type\":\"string\",\"minLength\":1},\"HashDigest\":{\"description\":\"Digest type used for the hash.\",\"type\":\"string\"},\"HashDigestLength\":{\"description\":\"Number of chars which are used for the hash.\",\"type\":\"number\",\"minimum\":1},\"HashFunction\":{\"description\":\"Algorithm used for generation the hash (see node.js crypto package).\",\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"instanceof\":\"Function\",\"tsType\":\"typeof import('../lib/util/Hash')\"}]},\"HashSalt\":{\"description\":\"Any string which is added to the hash to salt it.\",\"type\":\"string\",\"minLength\":1},\"HotUpdateChunkFilename\":{\"description\":\"The filename of the Hot Update Chunks. They are inside the output.path directory.\",\"type\":\"string\",\"absolutePath\":false},\"HotUpdateGlobal\":{\"description\":\"The global variable used by webpack for loading of hot update chunks.\",\"type\":\"string\"},\"HotUpdateMainFilename\":{\"description\":\"The filename of the Hot Update Main File. It is inside the 'output.path' directory.\",\"type\":\"string\",\"absolutePath\":false},\"HttpUriAllowedUris\":{\"description\":\"List of allowed URIs for building http resources.\",\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/HttpUriOptionsAllowedUris\"}]},\"HttpUriOptions\":{\"description\":\"Options for building http resources.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"allowedUris\":{\"$ref\":\"#/definitions/HttpUriOptionsAllowedUris\"},\"cacheLocation\":{\"description\":\"Location where resource content is stored for lockfile entries. It's also possible to disable storing by passing false.\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\",\"absolutePath\":true}]},\"frozen\":{\"description\":\"When set, anything that would lead to a modification of the lockfile or any resource content, will result in an error.\",\"type\":\"boolean\"},\"lockfileLocation\":{\"description\":\"Location of the lockfile.\",\"type\":\"string\",\"absolutePath\":true},\"upgrade\":{\"description\":\"When set, resources of existing lockfile entries will be fetched and entries will be upgraded when resource content has changed.\",\"type\":\"boolean\"}},\"required\":[\"allowedUris\"]},\"HttpUriOptionsAllowedUris\":{\"description\":\"List of allowed URIs (resp. the beginning of them).\",\"type\":\"array\",\"items\":{\"description\":\"List of allowed URIs (resp. the beginning of them).\",\"anyOf\":[{\"description\":\"Allowed URI pattern.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"description\":\"Allowed URI (resp. the beginning of it).\",\"type\":\"string\",\"pattern\":\"^https?://\"},{\"description\":\"Allowed URI filter function.\",\"instanceof\":\"Function\",\"tsType\":\"((uri: string) => boolean)\"}]}},\"IgnoreWarnings\":{\"description\":\"Ignore specific warnings.\",\"type\":\"array\",\"items\":{\"description\":\"Ignore specific warnings.\",\"anyOf\":[{\"description\":\"A RegExp to select the warning message.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"file\":{\"description\":\"A RegExp to select the origin file for the warning.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},\"message\":{\"description\":\"A RegExp to select the warning message.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},\"module\":{\"description\":\"A RegExp to select the origin module for the warning.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"}}},{\"description\":\"A custom function to select warnings based on the raw warning instance.\",\"instanceof\":\"Function\",\"tsType\":\"((warning: import('../lib/WebpackError'), compilation: import('../lib/Compilation')) => boolean)\"}]}},\"IgnoreWarningsNormalized\":{\"description\":\"Ignore specific warnings.\",\"type\":\"array\",\"items\":{\"description\":\"A function to select warnings based on the raw warning instance.\",\"instanceof\":\"Function\",\"tsType\":\"((warning: import('../lib/WebpackError'), compilation: import('../lib/Compilation')) => boolean)\"}},\"Iife\":{\"description\":\"Wrap javascript code into IIFE's to avoid leaking into global scope.\",\"type\":\"boolean\"},\"ImportFunctionName\":{\"description\":\"The name of the native import() function (can be exchanged for a polyfill).\",\"type\":\"string\"},\"ImportMetaName\":{\"description\":\"The name of the native import.meta object (can be exchanged for a polyfill).\",\"type\":\"string\"},\"InfrastructureLogging\":{\"description\":\"Options for infrastructure level logging.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"appendOnly\":{\"description\":\"Only appends lines to the output. Avoids updating existing output e. g. for status messages. This option is only used when no custom console is provided.\",\"type\":\"boolean\"},\"colors\":{\"description\":\"Enables/Disables colorful output. This option is only used when no custom console is provided.\",\"type\":\"boolean\"},\"console\":{\"description\":\"Custom console used for logging.\",\"tsType\":\"Console\"},\"debug\":{\"description\":\"Enable debug logging for specific loggers.\",\"anyOf\":[{\"description\":\"Enable/Disable debug logging for all loggers.\",\"type\":\"boolean\"},{\"$ref\":\"#/definitions/FilterTypes\"}]},\"level\":{\"description\":\"Log level.\",\"enum\":[\"none\",\"error\",\"warn\",\"info\",\"log\",\"verbose\"]},\"stream\":{\"description\":\"Stream used for logging output. Defaults to process.stderr. This option is only used when no custom console is provided.\",\"tsType\":\"NodeJS.WritableStream\"}}},\"JavascriptParserOptions\":{\"description\":\"Parser options for javascript modules.\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"amd\":{\"$ref\":\"#/definitions/Amd\"},\"browserify\":{\"description\":\"Enable/disable special handling for browserify bundles.\",\"type\":\"boolean\"},\"commonjs\":{\"description\":\"Enable/disable parsing of CommonJs syntax.\",\"type\":\"boolean\"},\"commonjsMagicComments\":{\"description\":\"Enable/disable parsing of magic comments in CommonJs syntax.\",\"type\":\"boolean\"},\"exportsPresence\":{\"description\":\"Specifies the behavior of invalid export names in \\\"import ... from ...\\\" and \\\"export ... from ...\\\".\",\"enum\":[\"error\",\"warn\",\"auto\",false]},\"exprContextCritical\":{\"description\":\"Enable warnings for full dynamic dependencies.\",\"type\":\"boolean\"},\"exprContextRecursive\":{\"description\":\"Enable recursive directory lookup for full dynamic dependencies.\",\"type\":\"boolean\"},\"exprContextRegExp\":{\"description\":\"Sets the default regular expression for full dynamic dependencies.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"boolean\"}]},\"exprContextRequest\":{\"description\":\"Set the default request for full dynamic dependencies.\",\"type\":\"string\"},\"harmony\":{\"description\":\"Enable/disable parsing of EcmaScript Modules syntax.\",\"type\":\"boolean\"},\"import\":{\"description\":\"Enable/disable parsing of import() syntax.\",\"type\":\"boolean\"},\"importExportsPresence\":{\"description\":\"Specifies the behavior of invalid export names in \\\"import ... from ...\\\".\",\"enum\":[\"error\",\"warn\",\"auto\",false]},\"node\":{\"$ref\":\"#/definitions/Node\"},\"reexportExportsPresence\":{\"description\":\"Specifies the behavior of invalid export names in \\\"export ... from ...\\\". This might be useful to disable during the migration from \\\"export ... from ...\\\" to \\\"export type ... from ...\\\" when reexporting types in TypeScript.\",\"enum\":[\"error\",\"warn\",\"auto\",false]},\"requireContext\":{\"description\":\"Enable/disable parsing of require.context syntax.\",\"type\":\"boolean\"},\"requireEnsure\":{\"description\":\"Enable/disable parsing of require.ensure syntax.\",\"type\":\"boolean\"},\"requireInclude\":{\"description\":\"Enable/disable parsing of require.include syntax.\",\"type\":\"boolean\"},\"requireJs\":{\"description\":\"Enable/disable parsing of require.js special syntax like require.config, requirejs.config, require.version and requirejs.onError.\",\"type\":\"boolean\"},\"strictExportPresence\":{\"description\":\"Deprecated in favor of \\\"exportsPresence\\\". Emit errors instead of warnings when imported names don't exist in imported module.\",\"type\":\"boolean\"},\"strictThisContextOnImports\":{\"description\":\"Handle the this context correctly according to the spec for namespace objects.\",\"type\":\"boolean\"},\"system\":{\"description\":\"Enable/disable parsing of System.js special syntax like System.import, System.get, System.set and System.register.\",\"type\":\"boolean\"},\"unknownContextCritical\":{\"description\":\"Enable warnings when using the require function in a not statically analyse-able way.\",\"type\":\"boolean\"},\"unknownContextRecursive\":{\"description\":\"Enable recursive directory lookup when using the require function in a not statically analyse-able way.\",\"type\":\"boolean\"},\"unknownContextRegExp\":{\"description\":\"Sets the regular expression when using the require function in a not statically analyse-able way.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"boolean\"}]},\"unknownContextRequest\":{\"description\":\"Sets the request when using the require function in a not statically analyse-able way.\",\"type\":\"string\"},\"url\":{\"description\":\"Enable/disable parsing of new URL() syntax.\",\"anyOf\":[{\"enum\":[\"relative\"]},{\"type\":\"boolean\"}]},\"worker\":{\"description\":\"Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register().\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Specify a syntax that should be parsed as WebWorker reference. 'Abc' handles 'new Abc()', 'Abc from xyz' handles 'import { Abc } from \\\"xyz\\\"; new Abc()', 'abc()' handles 'abc()', and combinations are also possible.\",\"type\":\"string\",\"minLength\":1}},{\"type\":\"boolean\"}]},\"wrappedContextCritical\":{\"description\":\"Enable warnings for partial dynamic dependencies.\",\"type\":\"boolean\"},\"wrappedContextRecursive\":{\"description\":\"Enable recursive directory lookup for partial dynamic dependencies.\",\"type\":\"boolean\"},\"wrappedContextRegExp\":{\"description\":\"Set the inner regular expression for partial dynamic dependencies.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"}}},\"Layer\":{\"description\":\"Specifies the layer in which modules of this entrypoint are placed.\",\"anyOf\":[{\"enum\":[null]},{\"type\":\"string\",\"minLength\":1}]},\"LazyCompilationDefaultBackendOptions\":{\"description\":\"Options for the default backend.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"client\":{\"description\":\"A custom client.\",\"type\":\"string\"},\"listen\":{\"description\":\"Specifies where to listen to from the server.\",\"anyOf\":[{\"description\":\"A port.\",\"type\":\"number\"},{\"description\":\"Listen options.\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"host\":{\"description\":\"A host.\",\"type\":\"string\"},\"port\":{\"description\":\"A port.\",\"type\":\"number\"}},\"tsType\":\"import(\\\"net\\\").ListenOptions\"},{\"description\":\"A custom listen function.\",\"instanceof\":\"Function\",\"tsType\":\"((server: import(\\\"net\\\").Server) => void)\"}]},\"protocol\":{\"description\":\"Specifies the protocol the client should use to connect to the server.\",\"enum\":[\"http\",\"https\"]},\"server\":{\"description\":\"Specifies how to create the server handling the EventSource requests.\",\"anyOf\":[{\"description\":\"ServerOptions for the http or https createServer call.\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{},\"tsType\":\"(import(\\\"https\\\").ServerOptions | import(\\\"http\\\").ServerOptions)\"},{\"description\":\"A custom create server function.\",\"instanceof\":\"Function\",\"tsType\":\"(() => import(\\\"net\\\").Server)\"}]}}},\"LazyCompilationOptions\":{\"description\":\"Options for compiling entrypoints and import()s only when they are accessed.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"backend\":{\"description\":\"Specifies the backend that should be used for handling client keep alive.\",\"anyOf\":[{\"description\":\"A custom backend.\",\"instanceof\":\"Function\",\"tsType\":\"(((compiler: import('../lib/Compiler'), callback: (err?: Error, api?: import(\\\"../lib/hmr/LazyCompilationPlugin\\\").BackendApi) => void) => void) | ((compiler: import('../lib/Compiler')) => Promise))\"},{\"$ref\":\"#/definitions/LazyCompilationDefaultBackendOptions\"}]},\"entries\":{\"description\":\"Enable/disable lazy compilation for entries.\",\"type\":\"boolean\"},\"imports\":{\"description\":\"Enable/disable lazy compilation for import() modules.\",\"type\":\"boolean\"},\"test\":{\"description\":\"Specify which entrypoints or import()ed modules should be lazily compiled. This is matched with the imported module and not the entrypoint name.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"((module: import('../lib/Module')) => boolean)\"}]}}},\"Library\":{\"description\":\"Make the output files a library, exporting the exports of the entry point.\",\"anyOf\":[{\"$ref\":\"#/definitions/LibraryName\"},{\"$ref\":\"#/definitions/LibraryOptions\"}]},\"LibraryCustomUmdCommentObject\":{\"description\":\"Set explicit comments for `commonjs`, `commonjs2`, `amd`, and `root`.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"amd\":{\"description\":\"Set comment for `amd` section in UMD.\",\"type\":\"string\"},\"commonjs\":{\"description\":\"Set comment for `commonjs` (exports) section in UMD.\",\"type\":\"string\"},\"commonjs2\":{\"description\":\"Set comment for `commonjs2` (module.exports) section in UMD.\",\"type\":\"string\"},\"root\":{\"description\":\"Set comment for `root` (global variable) section in UMD.\",\"type\":\"string\"}}},\"LibraryCustomUmdObject\":{\"description\":\"Description object for all UMD variants of the library name.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"amd\":{\"description\":\"Name of the exposed AMD library in the UMD.\",\"type\":\"string\",\"minLength\":1},\"commonjs\":{\"description\":\"Name of the exposed commonjs export in the UMD.\",\"type\":\"string\",\"minLength\":1},\"root\":{\"description\":\"Name of the property exposed globally by a UMD library.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Part of the name of the property exposed globally by a UMD library.\",\"type\":\"string\",\"minLength\":1}},{\"type\":\"string\",\"minLength\":1}]}}},\"LibraryExport\":{\"description\":\"Specify which export should be exposed as library.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Part of the export that should be exposed as library.\",\"type\":\"string\",\"minLength\":1}},{\"type\":\"string\",\"minLength\":1}]},\"LibraryName\":{\"description\":\"The name of the library (some types allow unnamed libraries too).\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"A part of the library name.\",\"type\":\"string\",\"minLength\":1},\"minItems\":1},{\"type\":\"string\",\"minLength\":1},{\"$ref\":\"#/definitions/LibraryCustomUmdObject\"}]},\"LibraryOptions\":{\"description\":\"Options for library.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"auxiliaryComment\":{\"$ref\":\"#/definitions/AuxiliaryComment\"},\"export\":{\"$ref\":\"#/definitions/LibraryExport\"},\"name\":{\"$ref\":\"#/definitions/LibraryName\"},\"type\":{\"$ref\":\"#/definitions/LibraryType\"},\"umdNamedDefine\":{\"$ref\":\"#/definitions/UmdNamedDefine\"}},\"required\":[\"type\"]},\"LibraryType\":{\"description\":\"Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).\",\"anyOf\":[{\"enum\":[\"var\",\"module\",\"assign\",\"assign-properties\",\"this\",\"window\",\"self\",\"global\",\"commonjs\",\"commonjs2\",\"commonjs-module\",\"amd\",\"amd-require\",\"umd\",\"umd2\",\"jsonp\",\"system\"]},{\"type\":\"string\"}]},\"Loader\":{\"description\":\"Custom values available in the loader context.\",\"type\":\"object\"},\"MemoryCacheOptions\":{\"description\":\"Options object for in-memory caching.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"cacheUnaffected\":{\"description\":\"Additionally cache computation of modules that are unchanged and reference only unchanged modules.\",\"type\":\"boolean\"},\"maxGenerations\":{\"description\":\"Number of generations unused cache entries stay in memory cache at minimum (1 = may be removed after unused for a single compilation, ..., Infinity: kept forever).\",\"type\":\"number\",\"minimum\":1},\"type\":{\"description\":\"In memory caching.\",\"enum\":[\"memory\"]}},\"required\":[\"type\"]},\"Mode\":{\"description\":\"Enable production optimizations or development hints.\",\"enum\":[\"development\",\"production\",\"none\"]},\"ModuleFilterItemTypes\":{\"description\":\"Filtering value, regexp or function.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":false},{\"instanceof\":\"Function\",\"tsType\":\"((name: string, module: import('../lib/stats/DefaultStatsFactoryPlugin').StatsModule, type: 'module' | 'chunk' | 'root-of-chunk' | 'nested') => boolean)\"}]},\"ModuleFilterTypes\":{\"description\":\"Filtering modules.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Rule to filter.\",\"cli\":{\"helper\":true},\"oneOf\":[{\"$ref\":\"#/definitions/ModuleFilterItemTypes\"}]}},{\"$ref\":\"#/definitions/ModuleFilterItemTypes\"}]},\"ModuleOptions\":{\"description\":\"Options affecting the normal modules (`NormalModuleFactory`).\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"defaultRules\":{\"description\":\"An array of rules applied by default for modules.\",\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetRules\"}]},\"exprContextCritical\":{\"description\":\"Enable warnings for full dynamic dependencies.\",\"type\":\"boolean\"},\"exprContextRecursive\":{\"description\":\"Enable recursive directory lookup for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRecursive'.\",\"type\":\"boolean\"},\"exprContextRegExp\":{\"description\":\"Sets the default regular expression for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRegExp'.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"boolean\"}]},\"exprContextRequest\":{\"description\":\"Set the default request for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRequest'.\",\"type\":\"string\"},\"generator\":{\"$ref\":\"#/definitions/GeneratorOptionsByModuleType\"},\"noParse\":{\"$ref\":\"#/definitions/NoParse\"},\"parser\":{\"$ref\":\"#/definitions/ParserOptionsByModuleType\"},\"rules\":{\"description\":\"An array of rules applied for modules.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetRules\"}]},\"strictExportPresence\":{\"description\":\"Emit errors instead of warnings when imported names don't exist in imported module. Deprecated: This option has moved to 'module.parser.javascript.strictExportPresence'.\",\"type\":\"boolean\"},\"strictThisContextOnImports\":{\"description\":\"Handle the this context correctly according to the spec for namespace objects. Deprecated: This option has moved to 'module.parser.javascript.strictThisContextOnImports'.\",\"type\":\"boolean\"},\"unknownContextCritical\":{\"description\":\"Enable warnings when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextCritical'.\",\"type\":\"boolean\"},\"unknownContextRecursive\":{\"description\":\"Enable recursive directory lookup when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRecursive'.\",\"type\":\"boolean\"},\"unknownContextRegExp\":{\"description\":\"Sets the regular expression when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRegExp'.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"boolean\"}]},\"unknownContextRequest\":{\"description\":\"Sets the request when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRequest'.\",\"type\":\"string\"},\"unsafeCache\":{\"description\":\"Cache the resolving of module requests.\",\"anyOf\":[{\"type\":\"boolean\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"wrappedContextCritical\":{\"description\":\"Enable warnings for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextCritical'.\",\"type\":\"boolean\"},\"wrappedContextRecursive\":{\"description\":\"Enable recursive directory lookup for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRecursive'.\",\"type\":\"boolean\"},\"wrappedContextRegExp\":{\"description\":\"Set the inner regular expression for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRegExp'.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"}}},\"ModuleOptionsNormalized\":{\"description\":\"Options affecting the normal modules (`NormalModuleFactory`).\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"defaultRules\":{\"description\":\"An array of rules applied by default for modules.\",\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetRules\"}]},\"generator\":{\"$ref\":\"#/definitions/GeneratorOptionsByModuleType\"},\"noParse\":{\"$ref\":\"#/definitions/NoParse\"},\"parser\":{\"$ref\":\"#/definitions/ParserOptionsByModuleType\"},\"rules\":{\"description\":\"An array of rules applied for modules.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetRules\"}]},\"unsafeCache\":{\"description\":\"Cache the resolving of module requests.\",\"anyOf\":[{\"type\":\"boolean\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]}},\"required\":[\"defaultRules\",\"generator\",\"parser\",\"rules\"]},\"Name\":{\"description\":\"Name of the configuration. Used when loading multiple configurations.\",\"type\":\"string\"},\"NoParse\":{\"description\":\"Don't parse files matching. It's matched against the full resolved request.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Don't parse files matching. It's matched against the full resolved request.\",\"anyOf\":[{\"description\":\"A regular expression, when matched the module is not parsed.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"description\":\"An absolute path, when the module starts with this path it is not parsed.\",\"type\":\"string\",\"absolutePath\":true},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"minItems\":1},{\"description\":\"A regular expression, when matched the module is not parsed.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"description\":\"An absolute path, when the module starts with this path it is not parsed.\",\"type\":\"string\",\"absolutePath\":true},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"Node\":{\"description\":\"Include polyfills or mocks for various node stuff.\",\"anyOf\":[{\"enum\":[false]},{\"$ref\":\"#/definitions/NodeOptions\"}]},\"NodeOptions\":{\"description\":\"Options object for node compatibility features.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"__dirname\":{\"description\":\"Include a polyfill for the '__dirname' variable.\",\"enum\":[false,true,\"warn-mock\",\"mock\",\"eval-only\"]},\"__filename\":{\"description\":\"Include a polyfill for the '__filename' variable.\",\"enum\":[false,true,\"warn-mock\",\"mock\",\"eval-only\"]},\"global\":{\"description\":\"Include a polyfill for the 'global' variable.\",\"enum\":[false,true,\"warn\"]}}},\"Optimization\":{\"description\":\"Enables/Disables integrated optimizations.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"checkWasmTypes\":{\"description\":\"Check for incompatible wasm types when importing/exporting from/to ESM.\",\"type\":\"boolean\"},\"chunkIds\":{\"description\":\"Define the algorithm to choose chunk ids (named: readable ids for better debugging, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin).\",\"enum\":[\"natural\",\"named\",\"deterministic\",\"size\",\"total-size\",false]},\"concatenateModules\":{\"description\":\"Concatenate modules when possible to generate less modules, more efficient code and enable more optimizations by the minimizer.\",\"type\":\"boolean\"},\"emitOnErrors\":{\"description\":\"Emit assets even when errors occur. Critical errors are emitted into the generated code and will cause errors at runtime.\",\"type\":\"boolean\"},\"flagIncludedChunks\":{\"description\":\"Also flag chunks as loaded which contain a subset of the modules.\",\"type\":\"boolean\"},\"innerGraph\":{\"description\":\"Creates a module-internal dependency graph for top level symbols, exports and imports, to improve unused exports detection.\",\"type\":\"boolean\"},\"mangleExports\":{\"description\":\"Rename exports when possible to generate shorter code (depends on optimization.usedExports and optimization.providedExports, true/\\\"deterministic\\\": generate short deterministic names optimized for caching, \\\"size\\\": generate the shortest possible names).\",\"anyOf\":[{\"enum\":[\"size\",\"deterministic\"]},{\"type\":\"boolean\"}]},\"mangleWasmImports\":{\"description\":\"Reduce size of WASM by changing imports to shorter strings.\",\"type\":\"boolean\"},\"mergeDuplicateChunks\":{\"description\":\"Merge chunks which contain the same modules.\",\"type\":\"boolean\"},\"minimize\":{\"description\":\"Enable minimizing the output. Uses optimization.minimizer.\",\"type\":\"boolean\"},\"minimizer\":{\"description\":\"Minimizer(s) to use for minimizing the output.\",\"type\":\"array\",\"cli\":{\"exclude\":true},\"items\":{\"description\":\"Plugin of type object or instanceof Function.\",\"anyOf\":[{\"enum\":[\"...\"]},{\"$ref\":\"#/definitions/WebpackPluginInstance\"},{\"$ref\":\"#/definitions/WebpackPluginFunction\"}]}},\"moduleIds\":{\"description\":\"Define the algorithm to choose module ids (natural: numeric ids in order of usage, named: readable ids for better debugging, hashed: (deprecated) short hashes as ids for better long term caching, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, false: no algorithm used, as custom one can be provided via plugin).\",\"enum\":[\"natural\",\"named\",\"hashed\",\"deterministic\",\"size\",false]},\"noEmitOnErrors\":{\"description\":\"Avoid emitting assets when errors occur (deprecated: use 'emitOnErrors' instead).\",\"type\":\"boolean\",\"cli\":{\"exclude\":true}},\"nodeEnv\":{\"description\":\"Set process.env.NODE_ENV to a specific value.\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\"}]},\"portableRecords\":{\"description\":\"Generate records with relative paths to be able to move the context folder.\",\"type\":\"boolean\"},\"providedExports\":{\"description\":\"Figure out which exports are provided by modules to generate more efficient code.\",\"type\":\"boolean\"},\"realContentHash\":{\"description\":\"Use real [contenthash] based on final content of the assets.\",\"type\":\"boolean\"},\"removeAvailableModules\":{\"description\":\"Removes modules from chunks when these modules are already included in all parents.\",\"type\":\"boolean\"},\"removeEmptyChunks\":{\"description\":\"Remove chunks which are empty.\",\"type\":\"boolean\"},\"runtimeChunk\":{\"$ref\":\"#/definitions/OptimizationRuntimeChunk\"},\"sideEffects\":{\"description\":\"Skip over modules which contain no side effects when exports are not used (false: disabled, 'flag': only use manually placed side effects flag, true: also analyse source code for side effects).\",\"anyOf\":[{\"enum\":[\"flag\"]},{\"type\":\"boolean\"}]},\"splitChunks\":{\"description\":\"Optimize duplication and caching by splitting chunks by shared modules and cache group.\",\"anyOf\":[{\"enum\":[false]},{\"$ref\":\"#/definitions/OptimizationSplitChunksOptions\"}]},\"usedExports\":{\"description\":\"Figure out which exports are used by modules to mangle export names, omit unused exports and generate more efficient code (true: analyse used exports for each runtime, \\\"global\\\": analyse exports globally for all runtimes combined).\",\"anyOf\":[{\"enum\":[\"global\"]},{\"type\":\"boolean\"}]}}},\"OptimizationRuntimeChunk\":{\"description\":\"Create an additional chunk which contains only the webpack runtime and chunk hash maps.\",\"anyOf\":[{\"enum\":[\"single\",\"multiple\"]},{\"type\":\"boolean\"},{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"name\":{\"description\":\"The name or name factory for the runtime chunks.\",\"anyOf\":[{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]}}}]},\"OptimizationRuntimeChunkNormalized\":{\"description\":\"Create an additional chunk which contains only the webpack runtime and chunk hash maps.\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"name\":{\"description\":\"The name factory for the runtime chunks.\",\"instanceof\":\"Function\",\"tsType\":\"Function\"}}}]},\"OptimizationSplitChunksCacheGroup\":{\"description\":\"Options object for describing behavior of a cache group selecting modules that should be cached together.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"automaticNameDelimiter\":{\"description\":\"Sets the name delimiter for created chunks.\",\"type\":\"string\",\"minLength\":1},\"chunks\":{\"description\":\"Select chunks for determining cache group content (defaults to \\\"initial\\\", \\\"initial\\\" and \\\"all\\\" requires adding these chunks to the HTML).\",\"anyOf\":[{\"enum\":[\"initial\",\"async\",\"all\"]},{\"instanceof\":\"Function\",\"tsType\":\"((chunk: import('../lib/Chunk')) => boolean)\"}]},\"enforce\":{\"description\":\"Ignore minimum size, minimum chunks and maximum requests and always create chunks for this cache group.\",\"type\":\"boolean\"},\"enforceSizeThreshold\":{\"description\":\"Size threshold at which splitting is enforced and other restrictions (minRemainingSize, maxAsyncRequests, maxInitialRequests) are ignored.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"filename\":{\"description\":\"Sets the template for the filename for created chunks.\",\"anyOf\":[{\"type\":\"string\",\"absolutePath\":false,\"minLength\":1},{\"instanceof\":\"Function\",\"tsType\":\"((pathData: import(\\\"../lib/Compilation\\\").PathData, assetInfo?: import(\\\"../lib/Compilation\\\").AssetInfo) => string)\"}]},\"idHint\":{\"description\":\"Sets the hint for chunk id.\",\"type\":\"string\"},\"layer\":{\"description\":\"Assign modules to a cache group by module layer.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"maxAsyncRequests\":{\"description\":\"Maximum number of requests which are accepted for on-demand loading.\",\"type\":\"number\",\"minimum\":1},\"maxAsyncSize\":{\"description\":\"Maximal size hint for the on-demand chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"maxInitialRequests\":{\"description\":\"Maximum number of initial chunks which are accepted for an entry point.\",\"type\":\"number\",\"minimum\":1},\"maxInitialSize\":{\"description\":\"Maximal size hint for the initial chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"maxSize\":{\"description\":\"Maximal size hint for the created chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"minChunks\":{\"description\":\"Minimum number of times a module has to be duplicated until it's considered for splitting.\",\"type\":\"number\",\"minimum\":1},\"minRemainingSize\":{\"description\":\"Minimal size for the chunks the stay after moving the modules to a new chunk.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"minSize\":{\"description\":\"Minimal size for the created chunk.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"minSizeReduction\":{\"description\":\"Minimum size reduction due to the created chunk.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"name\":{\"description\":\"Give chunks for this cache group a name (chunks with equal name are merged).\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"priority\":{\"description\":\"Priority of this cache group.\",\"type\":\"number\"},\"reuseExistingChunk\":{\"description\":\"Try to reuse existing chunk (with name) when it has matching modules.\",\"type\":\"boolean\"},\"test\":{\"description\":\"Assign modules to a cache group by module name.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"type\":{\"description\":\"Assign modules to a cache group by module type.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"usedExports\":{\"description\":\"Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal.\",\"type\":\"boolean\"}}},\"OptimizationSplitChunksGetCacheGroups\":{\"description\":\"A function returning cache groups.\",\"instanceof\":\"Function\",\"tsType\":\"((module: import('../lib/Module')) => OptimizationSplitChunksCacheGroup | OptimizationSplitChunksCacheGroup[] | void)\"},\"OptimizationSplitChunksOptions\":{\"description\":\"Options object for splitting chunks into smaller chunks.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"automaticNameDelimiter\":{\"description\":\"Sets the name delimiter for created chunks.\",\"type\":\"string\",\"minLength\":1},\"cacheGroups\":{\"description\":\"Assign modules to a cache group (modules from different cache groups are tried to keep in separate chunks, default categories: 'default', 'defaultVendors').\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"Configuration for a cache group.\",\"anyOf\":[{\"enum\":[false]},{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"},{\"$ref\":\"#/definitions/OptimizationSplitChunksCacheGroup\"}]},\"not\":{\"description\":\"Using the cacheGroup shorthand syntax with a cache group named 'test' is a potential config error\\nDid you intent to define a cache group with a test instead?\\ncacheGroups: {\\n : {\\n test: ...\\n }\\n}.\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"test\":{\"description\":\"The test property is a cache group name, but using the test option of the cache group could be intended instead.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]}},\"required\":[\"test\"]}},\"chunks\":{\"description\":\"Select chunks for determining shared modules (defaults to \\\"async\\\", \\\"initial\\\" and \\\"all\\\" requires adding these chunks to the HTML).\",\"anyOf\":[{\"enum\":[\"initial\",\"async\",\"all\"]},{\"instanceof\":\"Function\",\"tsType\":\"((chunk: import('../lib/Chunk')) => boolean)\"}]},\"defaultSizeTypes\":{\"description\":\"Sets the size types which are used when a number is used for sizes.\",\"type\":\"array\",\"items\":{\"description\":\"Size type, like 'javascript', 'webassembly'.\",\"type\":\"string\"},\"minItems\":1},\"enforceSizeThreshold\":{\"description\":\"Size threshold at which splitting is enforced and other restrictions (minRemainingSize, maxAsyncRequests, maxInitialRequests) are ignored.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"fallbackCacheGroup\":{\"description\":\"Options for modules not selected by any other cache group.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"automaticNameDelimiter\":{\"description\":\"Sets the name delimiter for created chunks.\",\"type\":\"string\",\"minLength\":1},\"chunks\":{\"description\":\"Select chunks for determining shared modules (defaults to \\\"async\\\", \\\"initial\\\" and \\\"all\\\" requires adding these chunks to the HTML).\",\"anyOf\":[{\"enum\":[\"initial\",\"async\",\"all\"]},{\"instanceof\":\"Function\",\"tsType\":\"((chunk: import('../lib/Chunk')) => boolean)\"}]},\"maxAsyncSize\":{\"description\":\"Maximal size hint for the on-demand chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"maxInitialSize\":{\"description\":\"Maximal size hint for the initial chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"maxSize\":{\"description\":\"Maximal size hint for the created chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"minSize\":{\"description\":\"Minimal size for the created chunk.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"minSizeReduction\":{\"description\":\"Minimum size reduction due to the created chunk.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]}}},\"filename\":{\"description\":\"Sets the template for the filename for created chunks.\",\"anyOf\":[{\"type\":\"string\",\"absolutePath\":false,\"minLength\":1},{\"instanceof\":\"Function\",\"tsType\":\"((pathData: import(\\\"../lib/Compilation\\\").PathData, assetInfo?: import(\\\"../lib/Compilation\\\").AssetInfo) => string)\"}]},\"hidePathInfo\":{\"description\":\"Prevents exposing path info when creating names for parts splitted by maxSize.\",\"type\":\"boolean\"},\"maxAsyncRequests\":{\"description\":\"Maximum number of requests which are accepted for on-demand loading.\",\"type\":\"number\",\"minimum\":1},\"maxAsyncSize\":{\"description\":\"Maximal size hint for the on-demand chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"maxInitialRequests\":{\"description\":\"Maximum number of initial chunks which are accepted for an entry point.\",\"type\":\"number\",\"minimum\":1},\"maxInitialSize\":{\"description\":\"Maximal size hint for the initial chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"maxSize\":{\"description\":\"Maximal size hint for the created chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"minChunks\":{\"description\":\"Minimum number of times a module has to be duplicated until it's considered for splitting.\",\"type\":\"number\",\"minimum\":1},\"minRemainingSize\":{\"description\":\"Minimal size for the chunks the stay after moving the modules to a new chunk.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"minSize\":{\"description\":\"Minimal size for the created chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"minSizeReduction\":{\"description\":\"Minimum size reduction due to the created chunk.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"name\":{\"description\":\"Give chunks created a name (chunks with equal name are merged).\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"usedExports\":{\"description\":\"Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal.\",\"type\":\"boolean\"}}},\"OptimizationSplitChunksSizes\":{\"description\":\"Size description for limits.\",\"anyOf\":[{\"description\":\"Size of the javascript part of the chunk.\",\"type\":\"number\",\"minimum\":0},{\"description\":\"Specify size limits per size type.\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"Size of the part of the chunk with the type of the key.\",\"type\":\"number\"}}]},\"Output\":{\"description\":\"Options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"assetModuleFilename\":{\"$ref\":\"#/definitions/AssetModuleFilename\"},\"asyncChunks\":{\"description\":\"Enable/disable creating async chunks that are loaded on demand.\",\"type\":\"boolean\"},\"auxiliaryComment\":{\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/AuxiliaryComment\"}]},\"charset\":{\"$ref\":\"#/definitions/Charset\"},\"chunkFilename\":{\"$ref\":\"#/definitions/ChunkFilename\"},\"chunkFormat\":{\"$ref\":\"#/definitions/ChunkFormat\"},\"chunkLoadTimeout\":{\"$ref\":\"#/definitions/ChunkLoadTimeout\"},\"chunkLoading\":{\"$ref\":\"#/definitions/ChunkLoading\"},\"chunkLoadingGlobal\":{\"$ref\":\"#/definitions/ChunkLoadingGlobal\"},\"clean\":{\"$ref\":\"#/definitions/Clean\"},\"compareBeforeEmit\":{\"$ref\":\"#/definitions/CompareBeforeEmit\"},\"crossOriginLoading\":{\"$ref\":\"#/definitions/CrossOriginLoading\"},\"devtoolFallbackModuleFilenameTemplate\":{\"$ref\":\"#/definitions/DevtoolFallbackModuleFilenameTemplate\"},\"devtoolModuleFilenameTemplate\":{\"$ref\":\"#/definitions/DevtoolModuleFilenameTemplate\"},\"devtoolNamespace\":{\"$ref\":\"#/definitions/DevtoolNamespace\"},\"enabledChunkLoadingTypes\":{\"$ref\":\"#/definitions/EnabledChunkLoadingTypes\"},\"enabledLibraryTypes\":{\"$ref\":\"#/definitions/EnabledLibraryTypes\"},\"enabledWasmLoadingTypes\":{\"$ref\":\"#/definitions/EnabledWasmLoadingTypes\"},\"environment\":{\"$ref\":\"#/definitions/Environment\"},\"filename\":{\"$ref\":\"#/definitions/Filename\"},\"globalObject\":{\"$ref\":\"#/definitions/GlobalObject\"},\"hashDigest\":{\"$ref\":\"#/definitions/HashDigest\"},\"hashDigestLength\":{\"$ref\":\"#/definitions/HashDigestLength\"},\"hashFunction\":{\"$ref\":\"#/definitions/HashFunction\"},\"hashSalt\":{\"$ref\":\"#/definitions/HashSalt\"},\"hotUpdateChunkFilename\":{\"$ref\":\"#/definitions/HotUpdateChunkFilename\"},\"hotUpdateGlobal\":{\"$ref\":\"#/definitions/HotUpdateGlobal\"},\"hotUpdateMainFilename\":{\"$ref\":\"#/definitions/HotUpdateMainFilename\"},\"iife\":{\"$ref\":\"#/definitions/Iife\"},\"importFunctionName\":{\"$ref\":\"#/definitions/ImportFunctionName\"},\"importMetaName\":{\"$ref\":\"#/definitions/ImportMetaName\"},\"library\":{\"$ref\":\"#/definitions/Library\"},\"libraryExport\":{\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/LibraryExport\"}]},\"libraryTarget\":{\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/LibraryType\"}]},\"module\":{\"$ref\":\"#/definitions/OutputModule\"},\"path\":{\"$ref\":\"#/definitions/Path\"},\"pathinfo\":{\"$ref\":\"#/definitions/Pathinfo\"},\"publicPath\":{\"$ref\":\"#/definitions/PublicPath\"},\"scriptType\":{\"$ref\":\"#/definitions/ScriptType\"},\"sourceMapFilename\":{\"$ref\":\"#/definitions/SourceMapFilename\"},\"sourcePrefix\":{\"$ref\":\"#/definitions/SourcePrefix\"},\"strictModuleErrorHandling\":{\"$ref\":\"#/definitions/StrictModuleErrorHandling\"},\"strictModuleExceptionHandling\":{\"$ref\":\"#/definitions/StrictModuleExceptionHandling\"},\"trustedTypes\":{\"description\":\"Use a Trusted Types policy to create urls for chunks. 'output.uniqueName' is used a default policy name. Passing a string sets a custom policy name.\",\"anyOf\":[{\"enum\":[true]},{\"description\":\"The name of the Trusted Types policy created by webpack to serve bundle chunks.\",\"type\":\"string\",\"minLength\":1},{\"$ref\":\"#/definitions/TrustedTypes\"}]},\"umdNamedDefine\":{\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/UmdNamedDefine\"}]},\"uniqueName\":{\"$ref\":\"#/definitions/UniqueName\"},\"wasmLoading\":{\"$ref\":\"#/definitions/WasmLoading\"},\"webassemblyModuleFilename\":{\"$ref\":\"#/definitions/WebassemblyModuleFilename\"},\"workerChunkLoading\":{\"$ref\":\"#/definitions/ChunkLoading\"},\"workerWasmLoading\":{\"$ref\":\"#/definitions/WasmLoading\"}}},\"OutputModule\":{\"description\":\"Output javascript files as module source type.\",\"type\":\"boolean\"},\"OutputNormalized\":{\"description\":\"Normalized options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"assetModuleFilename\":{\"$ref\":\"#/definitions/AssetModuleFilename\"},\"asyncChunks\":{\"description\":\"Enable/disable creating async chunks that are loaded on demand.\",\"type\":\"boolean\"},\"charset\":{\"$ref\":\"#/definitions/Charset\"},\"chunkFilename\":{\"$ref\":\"#/definitions/ChunkFilename\"},\"chunkFormat\":{\"$ref\":\"#/definitions/ChunkFormat\"},\"chunkLoadTimeout\":{\"$ref\":\"#/definitions/ChunkLoadTimeout\"},\"chunkLoading\":{\"$ref\":\"#/definitions/ChunkLoading\"},\"chunkLoadingGlobal\":{\"$ref\":\"#/definitions/ChunkLoadingGlobal\"},\"clean\":{\"$ref\":\"#/definitions/Clean\"},\"compareBeforeEmit\":{\"$ref\":\"#/definitions/CompareBeforeEmit\"},\"crossOriginLoading\":{\"$ref\":\"#/definitions/CrossOriginLoading\"},\"devtoolFallbackModuleFilenameTemplate\":{\"$ref\":\"#/definitions/DevtoolFallbackModuleFilenameTemplate\"},\"devtoolModuleFilenameTemplate\":{\"$ref\":\"#/definitions/DevtoolModuleFilenameTemplate\"},\"devtoolNamespace\":{\"$ref\":\"#/definitions/DevtoolNamespace\"},\"enabledChunkLoadingTypes\":{\"$ref\":\"#/definitions/EnabledChunkLoadingTypes\"},\"enabledLibraryTypes\":{\"$ref\":\"#/definitions/EnabledLibraryTypes\"},\"enabledWasmLoadingTypes\":{\"$ref\":\"#/definitions/EnabledWasmLoadingTypes\"},\"environment\":{\"$ref\":\"#/definitions/Environment\"},\"filename\":{\"$ref\":\"#/definitions/Filename\"},\"globalObject\":{\"$ref\":\"#/definitions/GlobalObject\"},\"hashDigest\":{\"$ref\":\"#/definitions/HashDigest\"},\"hashDigestLength\":{\"$ref\":\"#/definitions/HashDigestLength\"},\"hashFunction\":{\"$ref\":\"#/definitions/HashFunction\"},\"hashSalt\":{\"$ref\":\"#/definitions/HashSalt\"},\"hotUpdateChunkFilename\":{\"$ref\":\"#/definitions/HotUpdateChunkFilename\"},\"hotUpdateGlobal\":{\"$ref\":\"#/definitions/HotUpdateGlobal\"},\"hotUpdateMainFilename\":{\"$ref\":\"#/definitions/HotUpdateMainFilename\"},\"iife\":{\"$ref\":\"#/definitions/Iife\"},\"importFunctionName\":{\"$ref\":\"#/definitions/ImportFunctionName\"},\"importMetaName\":{\"$ref\":\"#/definitions/ImportMetaName\"},\"library\":{\"$ref\":\"#/definitions/LibraryOptions\"},\"module\":{\"$ref\":\"#/definitions/OutputModule\"},\"path\":{\"$ref\":\"#/definitions/Path\"},\"pathinfo\":{\"$ref\":\"#/definitions/Pathinfo\"},\"publicPath\":{\"$ref\":\"#/definitions/PublicPath\"},\"scriptType\":{\"$ref\":\"#/definitions/ScriptType\"},\"sourceMapFilename\":{\"$ref\":\"#/definitions/SourceMapFilename\"},\"sourcePrefix\":{\"$ref\":\"#/definitions/SourcePrefix\"},\"strictModuleErrorHandling\":{\"$ref\":\"#/definitions/StrictModuleErrorHandling\"},\"strictModuleExceptionHandling\":{\"$ref\":\"#/definitions/StrictModuleExceptionHandling\"},\"trustedTypes\":{\"$ref\":\"#/definitions/TrustedTypes\"},\"uniqueName\":{\"$ref\":\"#/definitions/UniqueName\"},\"wasmLoading\":{\"$ref\":\"#/definitions/WasmLoading\"},\"webassemblyModuleFilename\":{\"$ref\":\"#/definitions/WebassemblyModuleFilename\"},\"workerChunkLoading\":{\"$ref\":\"#/definitions/ChunkLoading\"},\"workerWasmLoading\":{\"$ref\":\"#/definitions/WasmLoading\"}}},\"Parallelism\":{\"description\":\"The number of parallel processed modules in the compilation.\",\"type\":\"number\",\"minimum\":1},\"ParserOptionsByModuleType\":{\"description\":\"Specify options for each parser.\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"Options for parsing.\",\"type\":\"object\",\"additionalProperties\":true},\"properties\":{\"asset\":{\"$ref\":\"#/definitions/AssetParserOptions\"},\"asset/inline\":{\"$ref\":\"#/definitions/EmptyParserOptions\"},\"asset/resource\":{\"$ref\":\"#/definitions/EmptyParserOptions\"},\"asset/source\":{\"$ref\":\"#/definitions/EmptyParserOptions\"},\"javascript\":{\"$ref\":\"#/definitions/JavascriptParserOptions\"},\"javascript/auto\":{\"$ref\":\"#/definitions/JavascriptParserOptions\"},\"javascript/dynamic\":{\"$ref\":\"#/definitions/JavascriptParserOptions\"},\"javascript/esm\":{\"$ref\":\"#/definitions/JavascriptParserOptions\"}}},\"Path\":{\"description\":\"The output directory as **absolute path** (required).\",\"type\":\"string\",\"absolutePath\":true},\"Pathinfo\":{\"description\":\"Include comments with information about the modules.\",\"anyOf\":[{\"enum\":[\"verbose\"]},{\"type\":\"boolean\"}]},\"Performance\":{\"description\":\"Configuration for web performance recommendations.\",\"anyOf\":[{\"enum\":[false]},{\"$ref\":\"#/definitions/PerformanceOptions\"}]},\"PerformanceOptions\":{\"description\":\"Configuration object for web performance recommendations.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"assetFilter\":{\"description\":\"Filter function to select assets that are checked.\",\"instanceof\":\"Function\",\"tsType\":\"Function\"},\"hints\":{\"description\":\"Sets the format of the hints: warnings, errors or nothing at all.\",\"enum\":[false,\"warning\",\"error\"]},\"maxAssetSize\":{\"description\":\"File size limit (in bytes) when exceeded, that webpack will provide performance hints.\",\"type\":\"number\"},\"maxEntrypointSize\":{\"description\":\"Total size of an entry point (in bytes).\",\"type\":\"number\"}}},\"Plugins\":{\"description\":\"Add additional plugins to the compiler.\",\"type\":\"array\",\"items\":{\"description\":\"Plugin of type object or instanceof Function.\",\"anyOf\":[{\"$ref\":\"#/definitions/WebpackPluginInstance\"},{\"$ref\":\"#/definitions/WebpackPluginFunction\"}]}},\"Profile\":{\"description\":\"Capture timing information for each module.\",\"type\":\"boolean\"},\"PublicPath\":{\"description\":\"The 'publicPath' specifies the public URL address of the output files when referenced in a browser.\",\"anyOf\":[{\"enum\":[\"auto\"]},{\"$ref\":\"#/definitions/RawPublicPath\"}]},\"RawPublicPath\":{\"description\":\"The 'publicPath' specifies the public URL address of the output files when referenced in a browser.\",\"anyOf\":[{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"((pathData: import(\\\"../lib/Compilation\\\").PathData, assetInfo?: import(\\\"../lib/Compilation\\\").AssetInfo) => string)\"}]},\"RecordsInputPath\":{\"description\":\"Store compiler state to a json file.\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\",\"absolutePath\":true}]},\"RecordsOutputPath\":{\"description\":\"Load compiler state from a json file.\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\",\"absolutePath\":true}]},\"RecordsPath\":{\"description\":\"Store/Load compiler state from/to a json file. This will result in persistent ids of modules and chunks. An absolute path is expected. `recordsPath` is used for `recordsInputPath` and `recordsOutputPath` if they left undefined.\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\",\"absolutePath\":true}]},\"Resolve\":{\"description\":\"Options for the resolver.\",\"oneOf\":[{\"$ref\":\"#/definitions/ResolveOptions\"}]},\"ResolveAlias\":{\"description\":\"Redirect module requests.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Alias configuration.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"alias\":{\"description\":\"New request.\",\"anyOf\":[{\"description\":\"Multiple alternative requests.\",\"type\":\"array\",\"items\":{\"description\":\"One choice of request.\",\"type\":\"string\",\"minLength\":1}},{\"description\":\"Ignore request (replace with empty module).\",\"enum\":[false]},{\"description\":\"New request.\",\"type\":\"string\",\"minLength\":1}]},\"name\":{\"description\":\"Request to be redirected.\",\"type\":\"string\"},\"onlyModule\":{\"description\":\"Redirect only exact matching request.\",\"type\":\"boolean\"}},\"required\":[\"alias\",\"name\"]}},{\"type\":\"object\",\"additionalProperties\":{\"description\":\"New request.\",\"anyOf\":[{\"description\":\"Multiple alternative requests.\",\"type\":\"array\",\"items\":{\"description\":\"One choice of request.\",\"type\":\"string\",\"minLength\":1}},{\"description\":\"Ignore request (replace with empty module).\",\"enum\":[false]},{\"description\":\"New request.\",\"type\":\"string\",\"minLength\":1}]}}]},\"ResolveLoader\":{\"description\":\"Options for the resolver when resolving loaders.\",\"oneOf\":[{\"$ref\":\"#/definitions/ResolveOptions\"}]},\"ResolveOptions\":{\"description\":\"Options object for resolving requests.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"alias\":{\"$ref\":\"#/definitions/ResolveAlias\"},\"aliasFields\":{\"description\":\"Fields in the description file (usually package.json) which are used to redirect requests inside the module.\",\"type\":\"array\",\"items\":{\"description\":\"Field in the description file (usually package.json) which are used to redirect requests inside the module.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Part of the field path in the description file (usually package.json) which are used to redirect requests inside the module.\",\"type\":\"string\",\"minLength\":1}},{\"type\":\"string\",\"minLength\":1}]}},\"byDependency\":{\"description\":\"Extra resolve options per dependency category. Typical categories are \\\"commonjs\\\", \\\"amd\\\", \\\"esm\\\".\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"Options object for resolving requests.\",\"oneOf\":[{\"$ref\":\"#/definitions/ResolveOptions\"}]}},\"cache\":{\"description\":\"Enable caching of successfully resolved requests (cache entries are revalidated).\",\"type\":\"boolean\"},\"cachePredicate\":{\"description\":\"Predicate function to decide which requests should be cached.\",\"instanceof\":\"Function\",\"tsType\":\"((request: import('enhanced-resolve').ResolveRequest) => boolean)\"},\"cacheWithContext\":{\"description\":\"Include the context information in the cache identifier when caching.\",\"type\":\"boolean\"},\"conditionNames\":{\"description\":\"Condition names for exports field entry point.\",\"type\":\"array\",\"items\":{\"description\":\"Condition names for exports field entry point.\",\"type\":\"string\"}},\"descriptionFiles\":{\"description\":\"Filenames used to find a description file (like a package.json).\",\"type\":\"array\",\"items\":{\"description\":\"Filename used to find a description file (like a package.json).\",\"type\":\"string\",\"minLength\":1}},\"enforceExtension\":{\"description\":\"Enforce the resolver to use one of the extensions from the extensions option (User must specify requests without extension).\",\"type\":\"boolean\"},\"exportsFields\":{\"description\":\"Field names from the description file (usually package.json) which are used to provide entry points of a package.\",\"type\":\"array\",\"items\":{\"description\":\"Field name from the description file (usually package.json) which is used to provide entry points of a package.\",\"type\":\"string\"}},\"extensions\":{\"description\":\"Extensions added to the request when trying to find the file.\",\"type\":\"array\",\"items\":{\"description\":\"Extension added to the request when trying to find the file.\",\"type\":\"string\"}},\"fallback\":{\"description\":\"Redirect module requests when normal resolving fails.\",\"oneOf\":[{\"$ref\":\"#/definitions/ResolveAlias\"}]},\"fileSystem\":{\"description\":\"Filesystem for the resolver.\",\"tsType\":\"(import('../lib/util/fs').InputFileSystem)\"},\"fullySpecified\":{\"description\":\"Treats the request specified by the user as fully specified, meaning no extensions are added and the mainFiles in directories are not resolved (This doesn't affect requests from mainFields, aliasFields or aliases).\",\"type\":\"boolean\"},\"importsFields\":{\"description\":\"Field names from the description file (usually package.json) which are used to provide internal request of a package (requests starting with # are considered as internal).\",\"type\":\"array\",\"items\":{\"description\":\"Field name from the description file (usually package.json) which is used to provide internal request of a package (requests starting with # are considered as internal).\",\"type\":\"string\"}},\"mainFields\":{\"description\":\"Field names from the description file (package.json) which are used to find the default entry point.\",\"type\":\"array\",\"items\":{\"description\":\"Field name from the description file (package.json) which are used to find the default entry point.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Part of the field path from the description file (package.json) which are used to find the default entry point.\",\"type\":\"string\",\"minLength\":1}},{\"type\":\"string\",\"minLength\":1}]}},\"mainFiles\":{\"description\":\"Filenames used to find the default entry point if there is no description file or main field.\",\"type\":\"array\",\"items\":{\"description\":\"Filename used to find the default entry point if there is no description file or main field.\",\"type\":\"string\",\"minLength\":1}},\"modules\":{\"description\":\"Folder names or directory paths where to find modules.\",\"type\":\"array\",\"items\":{\"description\":\"Folder name or directory path where to find modules.\",\"type\":\"string\",\"minLength\":1}},\"plugins\":{\"description\":\"Plugins for the resolver.\",\"type\":\"array\",\"cli\":{\"exclude\":true},\"items\":{\"description\":\"Plugin of type object or instanceof Function.\",\"anyOf\":[{\"enum\":[\"...\"]},{\"$ref\":\"#/definitions/ResolvePluginInstance\"}]}},\"preferAbsolute\":{\"description\":\"Prefer to resolve server-relative URLs (starting with '/') as absolute paths before falling back to resolve in 'resolve.roots'.\",\"type\":\"boolean\"},\"preferRelative\":{\"description\":\"Prefer to resolve module requests as relative request and fallback to resolving as module.\",\"type\":\"boolean\"},\"resolver\":{\"description\":\"Custom resolver.\",\"tsType\":\"(import('enhanced-resolve').Resolver)\"},\"restrictions\":{\"description\":\"A list of resolve restrictions. Resolve results must fulfill all of these restrictions to resolve successfully. Other resolve paths are taken when restrictions are not met.\",\"type\":\"array\",\"items\":{\"description\":\"Resolve restriction. Resolve result must fulfill this restriction.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":true,\"minLength\":1}]}},\"roots\":{\"description\":\"A list of directories in which requests that are server-relative URLs (starting with '/') are resolved.\",\"type\":\"array\",\"items\":{\"description\":\"Directory in which requests that are server-relative URLs (starting with '/') are resolved.\",\"type\":\"string\"}},\"symlinks\":{\"description\":\"Enable resolving symlinks to the original location.\",\"type\":\"boolean\"},\"unsafeCache\":{\"description\":\"Enable caching of successfully resolved requests (cache entries are not revalidated).\",\"anyOf\":[{\"type\":\"boolean\"},{\"type\":\"object\",\"additionalProperties\":true}]},\"useSyncFileSystemCalls\":{\"description\":\"Use synchronous filesystem calls for the resolver.\",\"type\":\"boolean\"}}},\"ResolvePluginInstance\":{\"description\":\"Plugin instance.\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"apply\":{\"description\":\"The run point of the plugin, required method.\",\"instanceof\":\"Function\",\"tsType\":\"(resolver: import('enhanced-resolve').Resolver) => void\"}},\"required\":[\"apply\"]},\"RuleSetCondition\":{\"description\":\"A condition matcher.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"((value: string) => boolean)\"},{\"$ref\":\"#/definitions/RuleSetLogicalConditions\"},{\"$ref\":\"#/definitions/RuleSetConditions\"}]},\"RuleSetConditionAbsolute\":{\"description\":\"A condition matcher matching an absolute path.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":true},{\"instanceof\":\"Function\",\"tsType\":\"((value: string) => boolean)\"},{\"$ref\":\"#/definitions/RuleSetLogicalConditionsAbsolute\"},{\"$ref\":\"#/definitions/RuleSetConditionsAbsolute\"}]},\"RuleSetConditionOrConditions\":{\"description\":\"One or multiple rule conditions.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetCondition\"},{\"$ref\":\"#/definitions/RuleSetConditions\"}]},\"RuleSetConditionOrConditionsAbsolute\":{\"description\":\"One or multiple rule conditions matching an absolute path.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetConditionAbsolute\"},{\"$ref\":\"#/definitions/RuleSetConditionsAbsolute\"}]},\"RuleSetConditions\":{\"description\":\"A list of rule conditions.\",\"type\":\"array\",\"items\":{\"description\":\"A rule condition.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetCondition\"}]}},\"RuleSetConditionsAbsolute\":{\"description\":\"A list of rule conditions matching an absolute path.\",\"type\":\"array\",\"items\":{\"description\":\"A rule condition matching an absolute path.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionAbsolute\"}]}},\"RuleSetLoader\":{\"description\":\"A loader request.\",\"type\":\"string\",\"minLength\":1},\"RuleSetLoaderOptions\":{\"description\":\"Options passed to a loader.\",\"anyOf\":[{\"type\":\"string\"},{\"type\":\"object\"}]},\"RuleSetLogicalConditions\":{\"description\":\"Logic operators used in a condition matcher.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"and\":{\"description\":\"Logical AND.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditions\"}]},\"not\":{\"description\":\"Logical NOT.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetCondition\"}]},\"or\":{\"description\":\"Logical OR.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditions\"}]}}},\"RuleSetLogicalConditionsAbsolute\":{\"description\":\"Logic operators used in a condition matcher.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"and\":{\"description\":\"Logical AND.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionsAbsolute\"}]},\"not\":{\"description\":\"Logical NOT.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionAbsolute\"}]},\"or\":{\"description\":\"Logical OR.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionsAbsolute\"}]}}},\"RuleSetRule\":{\"description\":\"A rule description with conditions and effects for modules.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"assert\":{\"description\":\"Match on import assertions of the dependency.\",\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}},\"compiler\":{\"description\":\"Match the child compiler name.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"dependency\":{\"description\":\"Match dependency type.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"descriptionData\":{\"description\":\"Match values of properties in the description file (usually package.json).\",\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}},\"enforce\":{\"description\":\"Enforce this rule as pre or post step.\",\"enum\":[\"pre\",\"post\"]},\"exclude\":{\"description\":\"Shortcut for resource.exclude.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"generator\":{\"description\":\"The options for the module generator.\",\"type\":\"object\"},\"include\":{\"description\":\"Shortcut for resource.include.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"issuer\":{\"description\":\"Match the issuer of the module (The module pointing to this module).\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"issuerLayer\":{\"description\":\"Match layer of the issuer of this module (The module pointing to this module).\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"layer\":{\"description\":\"Specifies the layer in which the module should be placed in.\",\"type\":\"string\"},\"loader\":{\"description\":\"Shortcut for use.loader.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetLoader\"}]},\"mimetype\":{\"description\":\"Match module mimetype when load from Data URI.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"oneOf\":{\"description\":\"Only execute the first matching rule in this array.\",\"type\":\"array\",\"items\":{\"description\":\"A rule.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetRule\"}]}},\"options\":{\"description\":\"Shortcut for use.options.\",\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetLoaderOptions\"}]},\"parser\":{\"description\":\"Options for parsing.\",\"type\":\"object\",\"additionalProperties\":true},\"realResource\":{\"description\":\"Match the real resource path of the module.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"resolve\":{\"description\":\"Options for the resolver.\",\"type\":\"object\",\"oneOf\":[{\"$ref\":\"#/definitions/ResolveOptions\"}]},\"resource\":{\"description\":\"Match the resource path of the module.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"resourceFragment\":{\"description\":\"Match the resource fragment of the module.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"resourceQuery\":{\"description\":\"Match the resource query of the module.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"rules\":{\"description\":\"Match and execute these rules when this rule is matched.\",\"type\":\"array\",\"items\":{\"description\":\"A rule.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetRule\"}]}},\"scheme\":{\"description\":\"Match module scheme.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"sideEffects\":{\"description\":\"Flags a module as with or without side effects.\",\"type\":\"boolean\"},\"test\":{\"description\":\"Shortcut for resource.test.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"type\":{\"description\":\"Module type to use for the module.\",\"type\":\"string\"},\"use\":{\"description\":\"Modifiers applied to the module when rule is matched.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetUse\"}]}}},\"RuleSetRules\":{\"description\":\"A list of rules.\",\"type\":\"array\",\"items\":{\"description\":\"A rule.\",\"anyOf\":[{\"cli\":{\"exclude\":true},\"enum\":[\"...\"]},{\"$ref\":\"#/definitions/RuleSetRule\"}]}},\"RuleSetUse\":{\"description\":\"A list of descriptions of loaders applied.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"An use item.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetUseItem\"}]}},{\"instanceof\":\"Function\",\"tsType\":\"((data: { resource: string, realResource: string, resourceQuery: string, issuer: string, compiler: string }) => RuleSetUseItem[])\"},{\"$ref\":\"#/definitions/RuleSetUseItem\"}]},\"RuleSetUseItem\":{\"description\":\"A description of an applied loader.\",\"anyOf\":[{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"ident\":{\"description\":\"Unique loader options identifier.\",\"type\":\"string\"},\"loader\":{\"description\":\"Loader name.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetLoader\"}]},\"options\":{\"description\":\"Loader options.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetLoaderOptions\"}]}}},{\"instanceof\":\"Function\",\"tsType\":\"((data: object) => RuleSetUseItem|RuleSetUseItem[])\"},{\"$ref\":\"#/definitions/RuleSetLoader\"}]},\"ScriptType\":{\"description\":\"This option enables loading async chunks via a custom script type, such as script type=\\\"module\\\".\",\"enum\":[false,\"text/javascript\",\"module\"]},\"SnapshotOptions\":{\"description\":\"Options affecting how file system snapshots are created and validated.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"buildDependencies\":{\"description\":\"Options for snapshotting build dependencies to determine if the whole cache need to be invalidated.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"hash\":{\"description\":\"Use hashes of the content of the files/directories to determine invalidation.\",\"type\":\"boolean\"},\"timestamp\":{\"description\":\"Use timestamps of the files/directories to determine invalidation.\",\"type\":\"boolean\"}}},\"immutablePaths\":{\"description\":\"List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.\",\"type\":\"array\",\"items\":{\"description\":\"List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.\",\"anyOf\":[{\"description\":\"A RegExp matching an immutable directory (usually a package manager cache directory, including the tailing slash)\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"description\":\"A path to an immutable directory (usually a package manager cache directory).\",\"type\":\"string\",\"absolutePath\":true,\"minLength\":1}]}},\"managedPaths\":{\"description\":\"List of paths that are managed by a package manager and can be trusted to not be modified otherwise.\",\"type\":\"array\",\"items\":{\"description\":\"List of paths that are managed by a package manager and can be trusted to not be modified otherwise.\",\"anyOf\":[{\"description\":\"A RegExp matching a managed directory (usually a node_modules directory, including the tailing slash)\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"description\":\"A path to a managed directory (usually a node_modules directory).\",\"type\":\"string\",\"absolutePath\":true,\"minLength\":1}]}},\"module\":{\"description\":\"Options for snapshotting dependencies of modules to determine if they need to be built again.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"hash\":{\"description\":\"Use hashes of the content of the files/directories to determine invalidation.\",\"type\":\"boolean\"},\"timestamp\":{\"description\":\"Use timestamps of the files/directories to determine invalidation.\",\"type\":\"boolean\"}}},\"resolve\":{\"description\":\"Options for snapshotting dependencies of request resolving to determine if requests need to be re-resolved.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"hash\":{\"description\":\"Use hashes of the content of the files/directories to determine invalidation.\",\"type\":\"boolean\"},\"timestamp\":{\"description\":\"Use timestamps of the files/directories to determine invalidation.\",\"type\":\"boolean\"}}},\"resolveBuildDependencies\":{\"description\":\"Options for snapshotting the resolving of build dependencies to determine if the build dependencies need to be re-resolved.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"hash\":{\"description\":\"Use hashes of the content of the files/directories to determine invalidation.\",\"type\":\"boolean\"},\"timestamp\":{\"description\":\"Use timestamps of the files/directories to determine invalidation.\",\"type\":\"boolean\"}}}}},\"SourceMapFilename\":{\"description\":\"The filename of the SourceMaps for the JavaScript files. They are inside the 'output.path' directory.\",\"type\":\"string\",\"absolutePath\":false},\"SourcePrefix\":{\"description\":\"Prefixes every line of the source in the bundle with this string.\",\"type\":\"string\"},\"StatsOptions\":{\"description\":\"Stats options object.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"all\":{\"description\":\"Fallback value for stats options when an option is not defined (has precedence over local webpack defaults).\",\"type\":\"boolean\"},\"assets\":{\"description\":\"Add assets information.\",\"type\":\"boolean\"},\"assetsSort\":{\"description\":\"Sort the assets by that field.\",\"type\":\"string\"},\"assetsSpace\":{\"description\":\"Space to display assets (groups will be collapsed to fit this space).\",\"type\":\"number\"},\"builtAt\":{\"description\":\"Add built at time information.\",\"type\":\"boolean\"},\"cached\":{\"description\":\"Add information about cached (not built) modules (deprecated: use 'cachedModules' instead).\",\"type\":\"boolean\"},\"cachedAssets\":{\"description\":\"Show cached assets (setting this to `false` only shows emitted files).\",\"type\":\"boolean\"},\"cachedModules\":{\"description\":\"Add information about cached (not built) modules.\",\"type\":\"boolean\"},\"children\":{\"description\":\"Add children information.\",\"type\":\"boolean\"},\"chunkGroupAuxiliary\":{\"description\":\"Display auxiliary assets in chunk groups.\",\"type\":\"boolean\"},\"chunkGroupChildren\":{\"description\":\"Display children of chunk groups.\",\"type\":\"boolean\"},\"chunkGroupMaxAssets\":{\"description\":\"Limit of assets displayed in chunk groups.\",\"type\":\"number\"},\"chunkGroups\":{\"description\":\"Display all chunk groups with the corresponding bundles.\",\"type\":\"boolean\"},\"chunkModules\":{\"description\":\"Add built modules information to chunk information.\",\"type\":\"boolean\"},\"chunkModulesSpace\":{\"description\":\"Space to display chunk modules (groups will be collapsed to fit this space, value is in number of modules/group).\",\"type\":\"number\"},\"chunkOrigins\":{\"description\":\"Add the origins of chunks and chunk merging info.\",\"type\":\"boolean\"},\"chunkRelations\":{\"description\":\"Add information about parent, children and sibling chunks to chunk information.\",\"type\":\"boolean\"},\"chunks\":{\"description\":\"Add chunk information.\",\"type\":\"boolean\"},\"chunksSort\":{\"description\":\"Sort the chunks by that field.\",\"type\":\"string\"},\"colors\":{\"description\":\"Enables/Disables colorful output.\",\"anyOf\":[{\"description\":\"Enables/Disables colorful output.\",\"type\":\"boolean\"},{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"bold\":{\"description\":\"Custom color for bold text.\",\"type\":\"string\"},\"cyan\":{\"description\":\"Custom color for cyan text.\",\"type\":\"string\"},\"green\":{\"description\":\"Custom color for green text.\",\"type\":\"string\"},\"magenta\":{\"description\":\"Custom color for magenta text.\",\"type\":\"string\"},\"red\":{\"description\":\"Custom color for red text.\",\"type\":\"string\"},\"yellow\":{\"description\":\"Custom color for yellow text.\",\"type\":\"string\"}}}]},\"context\":{\"description\":\"Context directory for request shortening.\",\"type\":\"string\",\"absolutePath\":true},\"dependentModules\":{\"description\":\"Show chunk modules that are dependencies of other modules of the chunk.\",\"type\":\"boolean\"},\"depth\":{\"description\":\"Add module depth in module graph.\",\"type\":\"boolean\"},\"entrypoints\":{\"description\":\"Display the entry points with the corresponding bundles.\",\"anyOf\":[{\"enum\":[\"auto\"]},{\"type\":\"boolean\"}]},\"env\":{\"description\":\"Add --env information.\",\"type\":\"boolean\"},\"errorDetails\":{\"description\":\"Add details to errors (like resolving log).\",\"anyOf\":[{\"enum\":[\"auto\"]},{\"type\":\"boolean\"}]},\"errorStack\":{\"description\":\"Add internal stack trace to errors.\",\"type\":\"boolean\"},\"errors\":{\"description\":\"Add errors.\",\"type\":\"boolean\"},\"errorsCount\":{\"description\":\"Add errors count.\",\"type\":\"boolean\"},\"exclude\":{\"description\":\"Please use excludeModules instead.\",\"cli\":{\"exclude\":true},\"anyOf\":[{\"type\":\"boolean\"},{\"$ref\":\"#/definitions/ModuleFilterTypes\"}]},\"excludeAssets\":{\"description\":\"Suppress assets that match the specified filters. Filters can be Strings, RegExps or Functions.\",\"oneOf\":[{\"$ref\":\"#/definitions/AssetFilterTypes\"}]},\"excludeModules\":{\"description\":\"Suppress modules that match the specified filters. Filters can be Strings, RegExps, Booleans or Functions.\",\"anyOf\":[{\"type\":\"boolean\"},{\"$ref\":\"#/definitions/ModuleFilterTypes\"}]},\"groupAssetsByChunk\":{\"description\":\"Group assets by how their are related to chunks.\",\"type\":\"boolean\"},\"groupAssetsByEmitStatus\":{\"description\":\"Group assets by their status (emitted, compared for emit or cached).\",\"type\":\"boolean\"},\"groupAssetsByExtension\":{\"description\":\"Group assets by their extension.\",\"type\":\"boolean\"},\"groupAssetsByInfo\":{\"description\":\"Group assets by their asset info (immutable, development, hotModuleReplacement, etc).\",\"type\":\"boolean\"},\"groupAssetsByPath\":{\"description\":\"Group assets by their path.\",\"type\":\"boolean\"},\"groupModulesByAttributes\":{\"description\":\"Group modules by their attributes (errors, warnings, assets, optional, orphan, or dependent).\",\"type\":\"boolean\"},\"groupModulesByCacheStatus\":{\"description\":\"Group modules by their status (cached or built and cacheable).\",\"type\":\"boolean\"},\"groupModulesByExtension\":{\"description\":\"Group modules by their extension.\",\"type\":\"boolean\"},\"groupModulesByLayer\":{\"description\":\"Group modules by their layer.\",\"type\":\"boolean\"},\"groupModulesByPath\":{\"description\":\"Group modules by their path.\",\"type\":\"boolean\"},\"groupModulesByType\":{\"description\":\"Group modules by their type.\",\"type\":\"boolean\"},\"groupReasonsByOrigin\":{\"description\":\"Group reasons by their origin module.\",\"type\":\"boolean\"},\"hash\":{\"description\":\"Add the hash of the compilation.\",\"type\":\"boolean\"},\"ids\":{\"description\":\"Add ids.\",\"type\":\"boolean\"},\"logging\":{\"description\":\"Add logging output.\",\"anyOf\":[{\"description\":\"Specify log level of logging output.\",\"enum\":[\"none\",\"error\",\"warn\",\"info\",\"log\",\"verbose\"]},{\"description\":\"Enable/disable logging output (`true`: shows normal logging output, loglevel: log).\",\"type\":\"boolean\"}]},\"loggingDebug\":{\"description\":\"Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions.\",\"anyOf\":[{\"description\":\"Enable/Disable debug logging for all loggers.\",\"type\":\"boolean\"},{\"$ref\":\"#/definitions/FilterTypes\"}]},\"loggingTrace\":{\"description\":\"Add stack traces to logging output.\",\"type\":\"boolean\"},\"moduleAssets\":{\"description\":\"Add information about assets inside modules.\",\"type\":\"boolean\"},\"moduleTrace\":{\"description\":\"Add dependencies and origin of warnings/errors.\",\"type\":\"boolean\"},\"modules\":{\"description\":\"Add built modules information.\",\"type\":\"boolean\"},\"modulesSort\":{\"description\":\"Sort the modules by that field.\",\"type\":\"string\"},\"modulesSpace\":{\"description\":\"Space to display modules (groups will be collapsed to fit this space, value is in number of modules/groups).\",\"type\":\"number\"},\"nestedModules\":{\"description\":\"Add information about modules nested in other modules (like with module concatenation).\",\"type\":\"boolean\"},\"nestedModulesSpace\":{\"description\":\"Space to display modules nested within other modules (groups will be collapsed to fit this space, value is in number of modules/group).\",\"type\":\"number\"},\"optimizationBailout\":{\"description\":\"Show reasons why optimization bailed out for modules.\",\"type\":\"boolean\"},\"orphanModules\":{\"description\":\"Add information about orphan modules.\",\"type\":\"boolean\"},\"outputPath\":{\"description\":\"Add output path information.\",\"type\":\"boolean\"},\"performance\":{\"description\":\"Add performance hint flags.\",\"type\":\"boolean\"},\"preset\":{\"description\":\"Preset for the default values.\",\"anyOf\":[{\"type\":\"boolean\"},{\"type\":\"string\"}]},\"providedExports\":{\"description\":\"Show exports provided by modules.\",\"type\":\"boolean\"},\"publicPath\":{\"description\":\"Add public path information.\",\"type\":\"boolean\"},\"reasons\":{\"description\":\"Add information about the reasons why modules are included.\",\"type\":\"boolean\"},\"reasonsSpace\":{\"description\":\"Space to display reasons (groups will be collapsed to fit this space).\",\"type\":\"number\"},\"relatedAssets\":{\"description\":\"Add information about assets that are related to other assets (like SourceMaps for assets).\",\"type\":\"boolean\"},\"runtime\":{\"description\":\"Add information about runtime modules (deprecated: use 'runtimeModules' instead).\",\"type\":\"boolean\"},\"runtimeModules\":{\"description\":\"Add information about runtime modules.\",\"type\":\"boolean\"},\"source\":{\"description\":\"Add the source code of modules.\",\"type\":\"boolean\"},\"timings\":{\"description\":\"Add timing information.\",\"type\":\"boolean\"},\"usedExports\":{\"description\":\"Show exports used by modules.\",\"type\":\"boolean\"},\"version\":{\"description\":\"Add webpack version information.\",\"type\":\"boolean\"},\"warnings\":{\"description\":\"Add warnings.\",\"type\":\"boolean\"},\"warningsCount\":{\"description\":\"Add warnings count.\",\"type\":\"boolean\"},\"warningsFilter\":{\"description\":\"Suppress listing warnings that match the specified filters (they will still be counted). Filters can be Strings, RegExps or Functions.\",\"oneOf\":[{\"$ref\":\"#/definitions/WarningFilterTypes\"}]}}},\"StatsValue\":{\"description\":\"Stats options object or preset name.\",\"anyOf\":[{\"enum\":[\"none\",\"summary\",\"errors-only\",\"errors-warnings\",\"minimal\",\"normal\",\"detailed\",\"verbose\"]},{\"type\":\"boolean\"},{\"$ref\":\"#/definitions/StatsOptions\"}]},\"StrictModuleErrorHandling\":{\"description\":\"Handles error in module loading correctly at a performance cost. This will handle module error compatible with the EcmaScript Modules spec.\",\"type\":\"boolean\"},\"StrictModuleExceptionHandling\":{\"description\":\"Handles exceptions in module loading correctly at a performance cost (Deprecated). This will handle module error compatible with the Node.js CommonJS way.\",\"type\":\"boolean\"},\"Target\":{\"description\":\"Environment to build for. An array of environments to build for all of them when possible.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Environment to build for.\",\"type\":\"string\",\"minLength\":1},\"minItems\":1},{\"enum\":[false]},{\"type\":\"string\",\"minLength\":1}]},\"TrustedTypes\":{\"description\":\"Use a Trusted Types policy to create urls for chunks.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"policyName\":{\"description\":\"The name of the Trusted Types policy created by webpack to serve bundle chunks.\",\"type\":\"string\",\"minLength\":1}}},\"UmdNamedDefine\":{\"description\":\"If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.\",\"type\":\"boolean\"},\"UniqueName\":{\"description\":\"A unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals.\",\"type\":\"string\",\"minLength\":1},\"WarningFilterItemTypes\":{\"description\":\"Filtering value, regexp or function.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":false},{\"instanceof\":\"Function\",\"tsType\":\"((warning: import('../lib/stats/DefaultStatsFactoryPlugin').StatsError, value: string) => boolean)\"}]},\"WarningFilterTypes\":{\"description\":\"Filtering warnings.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Rule to filter.\",\"cli\":{\"helper\":true},\"oneOf\":[{\"$ref\":\"#/definitions/WarningFilterItemTypes\"}]}},{\"$ref\":\"#/definitions/WarningFilterItemTypes\"}]},\"WasmLoading\":{\"description\":\"The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).\",\"anyOf\":[{\"enum\":[false]},{\"$ref\":\"#/definitions/WasmLoadingType\"}]},\"WasmLoadingType\":{\"description\":\"The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).\",\"anyOf\":[{\"enum\":[\"fetch-streaming\",\"fetch\",\"async-node\"]},{\"type\":\"string\"}]},\"Watch\":{\"description\":\"Enter watch mode, which rebuilds on file change.\",\"type\":\"boolean\"},\"WatchOptions\":{\"description\":\"Options for the watcher.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"aggregateTimeout\":{\"description\":\"Delay the rebuilt after the first change. Value is a time in ms.\",\"type\":\"number\"},\"followSymlinks\":{\"description\":\"Resolve symlinks and watch symlink and real file. This is usually not needed as webpack already resolves symlinks ('resolve.symlinks').\",\"type\":\"boolean\"},\"ignored\":{\"description\":\"Ignore some files from watching (glob pattern or regexp).\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"A glob pattern for files that should be ignored from watching.\",\"type\":\"string\",\"minLength\":1}},{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"description\":\"A single glob pattern for files that should be ignored from watching.\",\"type\":\"string\",\"minLength\":1}]},\"poll\":{\"description\":\"Enable polling mode for watching.\",\"anyOf\":[{\"description\":\"`number`: use polling with specified interval.\",\"type\":\"number\"},{\"description\":\"`true`: use polling.\",\"type\":\"boolean\"}]},\"stdin\":{\"description\":\"Stop watching when stdin stream has ended.\",\"type\":\"boolean\"}}},\"WebassemblyModuleFilename\":{\"description\":\"The filename of WebAssembly modules as relative path inside the 'output.path' directory.\",\"type\":\"string\",\"absolutePath\":false},\"WebpackOptionsNormalized\":{\"description\":\"Normalized webpack options object.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"amd\":{\"$ref\":\"#/definitions/Amd\"},\"bail\":{\"$ref\":\"#/definitions/Bail\"},\"cache\":{\"$ref\":\"#/definitions/CacheOptionsNormalized\"},\"context\":{\"$ref\":\"#/definitions/Context\"},\"dependencies\":{\"$ref\":\"#/definitions/Dependencies\"},\"devServer\":{\"$ref\":\"#/definitions/DevServer\"},\"devtool\":{\"$ref\":\"#/definitions/DevTool\"},\"entry\":{\"$ref\":\"#/definitions/EntryNormalized\"},\"experiments\":{\"$ref\":\"#/definitions/ExperimentsNormalized\"},\"externals\":{\"$ref\":\"#/definitions/Externals\"},\"externalsPresets\":{\"$ref\":\"#/definitions/ExternalsPresets\"},\"externalsType\":{\"$ref\":\"#/definitions/ExternalsType\"},\"ignoreWarnings\":{\"$ref\":\"#/definitions/IgnoreWarningsNormalized\"},\"infrastructureLogging\":{\"$ref\":\"#/definitions/InfrastructureLogging\"},\"loader\":{\"$ref\":\"#/definitions/Loader\"},\"mode\":{\"$ref\":\"#/definitions/Mode\"},\"module\":{\"$ref\":\"#/definitions/ModuleOptionsNormalized\"},\"name\":{\"$ref\":\"#/definitions/Name\"},\"node\":{\"$ref\":\"#/definitions/Node\"},\"optimization\":{\"$ref\":\"#/definitions/Optimization\"},\"output\":{\"$ref\":\"#/definitions/OutputNormalized\"},\"parallelism\":{\"$ref\":\"#/definitions/Parallelism\"},\"performance\":{\"$ref\":\"#/definitions/Performance\"},\"plugins\":{\"$ref\":\"#/definitions/Plugins\"},\"profile\":{\"$ref\":\"#/definitions/Profile\"},\"recordsInputPath\":{\"$ref\":\"#/definitions/RecordsInputPath\"},\"recordsOutputPath\":{\"$ref\":\"#/definitions/RecordsOutputPath\"},\"resolve\":{\"$ref\":\"#/definitions/Resolve\"},\"resolveLoader\":{\"$ref\":\"#/definitions/ResolveLoader\"},\"snapshot\":{\"$ref\":\"#/definitions/SnapshotOptions\"},\"stats\":{\"$ref\":\"#/definitions/StatsValue\"},\"target\":{\"$ref\":\"#/definitions/Target\"},\"watch\":{\"$ref\":\"#/definitions/Watch\"},\"watchOptions\":{\"$ref\":\"#/definitions/WatchOptions\"}},\"required\":[\"cache\",\"snapshot\",\"entry\",\"experiments\",\"externals\",\"externalsPresets\",\"infrastructureLogging\",\"module\",\"node\",\"optimization\",\"output\",\"plugins\",\"resolve\",\"resolveLoader\",\"stats\",\"watchOptions\"]},\"WebpackPluginFunction\":{\"description\":\"Function acting as plugin.\",\"instanceof\":\"Function\",\"tsType\":\"(this: import('../lib/Compiler'), compiler: import('../lib/Compiler')) => void\"},\"WebpackPluginInstance\":{\"description\":\"Plugin instance.\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"apply\":{\"description\":\"The run point of the plugin, required method.\",\"instanceof\":\"Function\",\"tsType\":\"(compiler: import('../lib/Compiler')) => void\"}},\"required\":[\"apply\"]}},\"title\":\"WebpackOptions\",\"description\":\"Options object as provided by the user.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"amd\":{\"$ref\":\"#/definitions/Amd\"},\"bail\":{\"$ref\":\"#/definitions/Bail\"},\"cache\":{\"$ref\":\"#/definitions/CacheOptions\"},\"context\":{\"$ref\":\"#/definitions/Context\"},\"dependencies\":{\"$ref\":\"#/definitions/Dependencies\"},\"devServer\":{\"$ref\":\"#/definitions/DevServer\"},\"devtool\":{\"$ref\":\"#/definitions/DevTool\"},\"entry\":{\"$ref\":\"#/definitions/Entry\"},\"experiments\":{\"$ref\":\"#/definitions/Experiments\"},\"externals\":{\"$ref\":\"#/definitions/Externals\"},\"externalsPresets\":{\"$ref\":\"#/definitions/ExternalsPresets\"},\"externalsType\":{\"$ref\":\"#/definitions/ExternalsType\"},\"ignoreWarnings\":{\"$ref\":\"#/definitions/IgnoreWarnings\"},\"infrastructureLogging\":{\"$ref\":\"#/definitions/InfrastructureLogging\"},\"loader\":{\"$ref\":\"#/definitions/Loader\"},\"mode\":{\"$ref\":\"#/definitions/Mode\"},\"module\":{\"$ref\":\"#/definitions/ModuleOptions\"},\"name\":{\"$ref\":\"#/definitions/Name\"},\"node\":{\"$ref\":\"#/definitions/Node\"},\"optimization\":{\"$ref\":\"#/definitions/Optimization\"},\"output\":{\"$ref\":\"#/definitions/Output\"},\"parallelism\":{\"$ref\":\"#/definitions/Parallelism\"},\"performance\":{\"$ref\":\"#/definitions/Performance\"},\"plugins\":{\"$ref\":\"#/definitions/Plugins\"},\"profile\":{\"$ref\":\"#/definitions/Profile\"},\"recordsInputPath\":{\"$ref\":\"#/definitions/RecordsInputPath\"},\"recordsOutputPath\":{\"$ref\":\"#/definitions/RecordsOutputPath\"},\"recordsPath\":{\"$ref\":\"#/definitions/RecordsPath\"},\"resolve\":{\"$ref\":\"#/definitions/Resolve\"},\"resolveLoader\":{\"$ref\":\"#/definitions/ResolveLoader\"},\"snapshot\":{\"$ref\":\"#/definitions/SnapshotOptions\"},\"stats\":{\"$ref\":\"#/definitions/StatsValue\"},\"target\":{\"$ref\":\"#/definitions/Target\"},\"watch\":{\"$ref\":\"#/definitions/Watch\"},\"watchOptions\":{\"$ref\":\"#/definitions/WatchOptions\"}}}"); /***/ }), @@ -22629,7 +22629,7 @@ var __classPrivateFieldSet; /***/ }), -/***/ 46806: +/***/ 76595: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; @@ -22639,802 +22639,790 @@ var __classPrivateFieldSet; */ +const EventEmitter = __webpack_require__(28614).EventEmitter; +const fs = __webpack_require__(82161); +const path = __webpack_require__(85622); -const RuntimeGlobals = __webpack_require__(49404); -const WebpackError = __webpack_require__(68422); -const ConstDependency = __webpack_require__(60864); -const BasicEvaluatedExpression = __webpack_require__(2412); -const { - toConstantDependency, - evaluateToString -} = __webpack_require__(28723); -const ChunkNameRuntimeModule = __webpack_require__(43818); -const GetFullHashRuntimeModule = __webpack_require__(28454); - -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./javascript/JavascriptParser")} JavascriptParser */ - -/* eslint-disable camelcase */ -const REPLACEMENTS = { - __webpack_require__: { - expr: RuntimeGlobals.require, - req: [RuntimeGlobals.require], - type: "function", - assign: false - }, - __webpack_public_path__: { - expr: RuntimeGlobals.publicPath, - req: [RuntimeGlobals.publicPath], - type: "string", - assign: true - }, - __webpack_base_uri__: { - expr: RuntimeGlobals.baseURI, - req: [RuntimeGlobals.baseURI], - type: "string", - assign: true - }, - __webpack_modules__: { - expr: RuntimeGlobals.moduleFactories, - req: [RuntimeGlobals.moduleFactories], - type: "object", - assign: false - }, - __webpack_chunk_load__: { - expr: RuntimeGlobals.ensureChunk, - req: [RuntimeGlobals.ensureChunk], - type: "function", - assign: true - }, - __non_webpack_require__: { - expr: "require", - req: null, - type: undefined, // type is not known, depends on environment - assign: true - }, - __webpack_nonce__: { - expr: RuntimeGlobals.scriptNonce, - req: [RuntimeGlobals.scriptNonce], - type: "string", - assign: true - }, - __webpack_hash__: { - expr: `${RuntimeGlobals.getFullHash}()`, - req: [RuntimeGlobals.getFullHash], - type: "string", - assign: false - }, - __webpack_chunkname__: { - expr: RuntimeGlobals.chunkName, - req: [RuntimeGlobals.chunkName], - type: "string", - assign: false - }, - __webpack_get_script_filename__: { - expr: RuntimeGlobals.getChunkScriptFilename, - req: [RuntimeGlobals.getChunkScriptFilename], - type: "function", - assign: true - }, - __webpack_runtime_id__: { - expr: RuntimeGlobals.runtimeId, - req: [RuntimeGlobals.runtimeId], - assign: false - }, - "require.onError": { - expr: RuntimeGlobals.uncaughtErrorHandler, - req: [RuntimeGlobals.uncaughtErrorHandler], - type: undefined, // type is not known, could be function or undefined - assign: true // is never a pattern - }, - __system_context__: { - expr: RuntimeGlobals.systemContext, - req: [RuntimeGlobals.systemContext], - type: "object", - assign: false - }, - __webpack_share_scopes__: { - expr: RuntimeGlobals.shareScopeMap, - req: [RuntimeGlobals.shareScopeMap], - type: "object", - assign: false - }, - __webpack_init_sharing__: { - expr: RuntimeGlobals.initializeSharing, - req: [RuntimeGlobals.initializeSharing], - type: "function", - assign: true - } -}; -/* eslint-enable camelcase */ - -class APIPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "APIPlugin", - (compilation, { normalModuleFactory }) => { - compilation.dependencyTemplates.set( - ConstDependency, - new ConstDependency.Template() - ); - - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.chunkName) - .tap("APIPlugin", chunk => { - compilation.addRuntimeModule( - chunk, - new ChunkNameRuntimeModule(chunk.name) - ); - return true; - }); +const watchEventSource = __webpack_require__(72511); - compilation.hooks.runtimeRequirementInTree - .for(RuntimeGlobals.getFullHash) - .tap("APIPlugin", (chunk, set) => { - compilation.addRuntimeModule(chunk, new GetFullHashRuntimeModule()); - return true; - }); +const EXISTANCE_ONLY_TIME_ENTRY = Object.freeze({}); - /** - * @param {JavascriptParser} parser the parser - */ - const handler = parser => { - Object.keys(REPLACEMENTS).forEach(key => { - const info = REPLACEMENTS[key]; - parser.hooks.expression - .for(key) - .tap( - "APIPlugin", - toConstantDependency(parser, info.expr, info.req) - ); - if (info.assign === false) { - parser.hooks.assign.for(key).tap("APIPlugin", expr => { - const err = new WebpackError(`${key} must not be assigned`); - err.loc = expr.loc; - throw err; - }); - } - if (info.type) { - parser.hooks.evaluateTypeof - .for(key) - .tap("APIPlugin", evaluateToString(info.type)); - } - }); +let FS_ACCURACY = 1000; - parser.hooks.expression - .for("__webpack_layer__") - .tap("APIPlugin", expr => { - const dep = new ConstDependency( - JSON.stringify(parser.state.module.layer), - expr.range - ); - dep.loc = expr.loc; - parser.state.module.addPresentationalDependency(dep); - return true; - }); - parser.hooks.evaluateIdentifier - .for("__webpack_layer__") - .tap("APIPlugin", expr => - (parser.state.module.layer === null - ? new BasicEvaluatedExpression().setNull() - : new BasicEvaluatedExpression().setString( - parser.state.module.layer - ) - ).setRange(expr.range) - ); - parser.hooks.evaluateTypeof - .for("__webpack_layer__") - .tap("APIPlugin", expr => - new BasicEvaluatedExpression() - .setString( - parser.state.module.layer === null ? "object" : "string" - ) - .setRange(expr.range) - ); - }; +const IS_OSX = __webpack_require__(12087).platform() === "darwin"; +const WATCHPACK_POLLING = process.env.WATCHPACK_POLLING; +const FORCE_POLLING = + `${+WATCHPACK_POLLING}` === WATCHPACK_POLLING + ? +WATCHPACK_POLLING + : !!WATCHPACK_POLLING && WATCHPACK_POLLING !== "false"; - normalModuleFactory.hooks.parser - .for("javascript/auto") - .tap("APIPlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/dynamic") - .tap("APIPlugin", handler); - normalModuleFactory.hooks.parser - .for("javascript/esm") - .tap("APIPlugin", handler); - } - ); - } +function withoutCase(str) { + return str.toLowerCase(); } -module.exports = APIPlugin; - - -/***/ }), - -/***/ 570: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Ivan Kopeykin @vankop -*/ - - - -const WebpackError = __webpack_require__(68422); -const CURRENT_METHOD_REGEXP = /at ([a-zA-Z0-9_.]*)/; - -/** - * @param {string=} method method name - * @returns {string} message - */ -function createMessage(method) { - return `Abstract method${method ? " " + method : ""}. Must be overridden.`; +function needCalls(times, callback) { + return function() { + if (--times === 0) { + return callback(); + } + }; } -/** - * @constructor - */ -function Message() { - /** @type {string} */ - this.stack = undefined; - Error.captureStackTrace(this); - /** @type {RegExpMatchArray} */ - const match = this.stack.split("\n")[3].match(CURRENT_METHOD_REGEXP); +class Watcher extends EventEmitter { + constructor(directoryWatcher, filePath, startTime) { + super(); + this.directoryWatcher = directoryWatcher; + this.path = filePath; + this.startTime = startTime && +startTime; + } - this.message = match && match[1] ? createMessage(match[1]) : createMessage(); -} + checkStartTime(mtime, initial) { + const startTime = this.startTime; + if (typeof startTime !== "number") return !initial; + return startTime <= mtime; + } -/** - * Error for abstract method - * @example - * class FooClass { - * abstractMethod() { - * throw new AbstractMethodError(); // error message: Abstract method FooClass.abstractMethod. Must be overridden. - * } - * } - * - */ -class AbstractMethodError extends WebpackError { - constructor() { - super(new Message().message); - this.name = "AbstractMethodError"; + close() { + this.emit("closed"); } } -module.exports = AbstractMethodError; - - -/***/ }), - -/***/ 11315: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const DependenciesBlock = __webpack_require__(21484); -const makeSerializable = __webpack_require__(26522); - -/** @typedef {import("./ChunkGraph")} ChunkGraph */ -/** @typedef {import("./ChunkGroup")} ChunkGroup */ -/** @typedef {import("./ChunkGroup").ChunkGroupOptions} ChunkGroupOptions */ -/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ -/** @typedef {import("./Dependency").UpdateHashContext} UpdateHashContext */ -/** @typedef {import("./Entrypoint").EntryOptions} EntryOptions */ -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./util/Hash")} Hash */ - -class AsyncDependenciesBlock extends DependenciesBlock { - /** - * @param {ChunkGroupOptions & { entryOptions?: EntryOptions }} groupOptions options for the group - * @param {DependencyLocation=} loc the line of code - * @param {string=} request the request - */ - constructor(groupOptions, loc, request) { +class DirectoryWatcher extends EventEmitter { + constructor(watcherManager, directoryPath, options) { super(); - if (typeof groupOptions === "string") { - groupOptions = { name: groupOptions }; - } else if (!groupOptions) { - groupOptions = { name: undefined }; + if (FORCE_POLLING) { + options.poll = FORCE_POLLING; } - this.groupOptions = groupOptions; - this.loc = loc; - this.request = request; - this._stringifiedGroupOptions = undefined; - } + this.watcherManager = watcherManager; + this.options = options; + this.path = directoryPath; + // safeTime is the point in time after which reading is safe to be unchanged + // timestamp is a value that should be compared with another timestamp (mtime) + /** @type {Map} */ + this.filesWithoutCase = new Map(); + this.directories = new Map(); + this.lastWatchEvent = 0; + this.initialScan = true; + this.ignored = options.ignored || (() => false); + this.nestedWatching = false; + this.polledWatching = + typeof options.poll === "number" + ? options.poll + : options.poll + ? 5007 + : false; + this.timeout = undefined; + this.initialScanRemoved = new Set(); + this.initialScanFinished = undefined; + /** @type {Map>} */ + this.watchers = new Map(); + this.parentWatcher = null; + this.refs = 0; + this._activeEvents = new Map(); + this.closed = false; + this.scanning = false; + this.scanAgain = false; + this.scanAgainInitial = false; - /** - * @returns {string} The name of the chunk - */ - get chunkName() { - return this.groupOptions.name; + this.createWatcher(); + this.doScan(true); } - /** - * @param {string} value The new chunk name - * @returns {void} - */ - set chunkName(value) { - if (this.groupOptions.name !== value) { - this.groupOptions.name = value; - this._stringifiedGroupOptions = undefined; + createWatcher() { + try { + if (this.polledWatching) { + this.watcher = { + close: () => { + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = undefined; + } + } + }; + } else { + if (IS_OSX) { + this.watchInParentDirectory(); + } + this.watcher = watchEventSource.watch(this.path); + this.watcher.on("change", this.onWatchEvent.bind(this)); + this.watcher.on("error", this.onWatcherError.bind(this)); + } + } catch (err) { + this.onWatcherError(err); } } - /** - * @param {Hash} hash the hash used to track dependencies - * @param {UpdateHashContext} context context - * @returns {void} - */ - updateHash(hash, context) { - const { chunkGraph } = context; - if (this._stringifiedGroupOptions === undefined) { - this._stringifiedGroupOptions = JSON.stringify(this.groupOptions); + forEachWatcher(path, fn) { + const watchers = this.watchers.get(withoutCase(path)); + if (watchers !== undefined) { + for (const w of watchers) { + fn(w); + } } - const chunkGroup = chunkGraph.getBlockChunkGroup(this); - hash.update( - `${this._stringifiedGroupOptions}${chunkGroup ? chunkGroup.id : ""}` - ); - super.updateHash(hash, context); - } - - serialize(context) { - const { write } = context; - write(this.groupOptions); - write(this.loc); - write(this.request); - super.serialize(context); - } - - deserialize(context) { - const { read } = context; - this.groupOptions = read(); - this.loc = read(); - this.request = read(); - super.deserialize(context); - } -} - -makeSerializable(AsyncDependenciesBlock, "webpack/lib/AsyncDependenciesBlock"); - -Object.defineProperty(AsyncDependenciesBlock.prototype, "module", { - get() { - throw new Error( - "module property was removed from AsyncDependenciesBlock (it's not needed)" - ); - }, - set() { - throw new Error( - "module property was removed from AsyncDependenciesBlock (it's not needed)" - ); } -}); - -module.exports = AsyncDependenciesBlock; - - -/***/ }), - -/***/ 69073: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Sean Larkin @thelarkinn -*/ - + setMissing(itemPath, initial, type) { + if (this.initialScan) { + this.initialScanRemoved.add(itemPath); + } -const WebpackError = __webpack_require__(68422); + const oldDirectory = this.directories.get(itemPath); + if (oldDirectory) { + if (this.nestedWatching) oldDirectory.close(); + this.directories.delete(itemPath); -/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ -/** @typedef {import("./Module")} Module */ + this.forEachWatcher(itemPath, w => w.emit("remove", type)); + if (!initial) { + this.forEachWatcher(this.path, w => + w.emit("change", itemPath, null, type, initial) + ); + } + } -class AsyncDependencyToInitialChunkError extends WebpackError { - /** - * Creates an instance of AsyncDependencyToInitialChunkError. - * @param {string} chunkName Name of Chunk - * @param {Module} module module tied to dependency - * @param {DependencyLocation} loc location of dependency - */ - constructor(chunkName, module, loc) { - super( - `It's not allowed to load an initial chunk on demand. The chunk name "${chunkName}" is already used by an entrypoint.` - ); + const oldFile = this.files.get(itemPath); + if (oldFile) { + this.files.delete(itemPath); + const key = withoutCase(itemPath); + const count = this.filesWithoutCase.get(key) - 1; + if (count <= 0) { + this.filesWithoutCase.delete(key); + this.forEachWatcher(itemPath, w => w.emit("remove", type)); + } else { + this.filesWithoutCase.set(key, count); + } - this.name = "AsyncDependencyToInitialChunkError"; - this.module = module; - this.loc = loc; + if (!initial) { + this.forEachWatcher(this.path, w => + w.emit("change", itemPath, null, type, initial) + ); + } + } } -} - -module.exports = AsyncDependencyToInitialChunkError; + setFileTime(filePath, mtime, initial, ignoreWhenEqual, type) { + const now = Date.now(); -/***/ }), - -/***/ 51714: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + if (this.ignored(filePath)) return; -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ + const old = this.files.get(filePath); + let safeTime, accuracy; + if (initial) { + safeTime = Math.min(now, mtime) + FS_ACCURACY; + accuracy = FS_ACCURACY; + } else { + safeTime = now; + accuracy = 0; + if (old && old.timestamp === mtime && mtime + FS_ACCURACY < now - 1000) { + // We are sure that mtime is untouched + // This can be caused by some file attribute change + // e. g. when access time has been changed + // but the file content is untouched + return; + } + } -const asyncLib = __webpack_require__(36386); -const NormalModule = __webpack_require__(11026); -const PrefetchDependency = __webpack_require__(39986); + if (ignoreWhenEqual && old && old.timestamp === mtime) return; -/** @typedef {import("./Compiler")} Compiler */ + this.files.set(filePath, { + safeTime, + accuracy, + timestamp: mtime + }); -class AutomaticPrefetchPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "AutomaticPrefetchPlugin", - (compilation, { normalModuleFactory }) => { - compilation.dependencyFactories.set( - PrefetchDependency, - normalModuleFactory - ); + if (!old) { + const key = withoutCase(filePath); + const count = this.filesWithoutCase.get(key); + this.filesWithoutCase.set(key, (count || 0) + 1); + if (count !== undefined) { + // There is already a file with case-insensitive-equal name + // On a case-insensitive filesystem we may miss the renaming + // when only casing is changed. + // To be sure that our information is correct + // we trigger a rescan here + this.doScan(false); } - ); - let lastModules = null; - compiler.hooks.afterCompile.tap("AutomaticPrefetchPlugin", compilation => { - lastModules = []; - for (const m of compilation.modules) { - if (m instanceof NormalModule) { - lastModules.push({ - context: m.context, - request: m.request - }); + this.forEachWatcher(filePath, w => { + if (!initial || w.checkStartTime(safeTime, initial)) { + w.emit("change", mtime, type); } + }); + } else if (!initial) { + this.forEachWatcher(filePath, w => w.emit("change", mtime, type)); + } + this.forEachWatcher(this.path, w => { + if (!initial || w.checkStartTime(safeTime, initial)) { + w.emit("change", filePath, safeTime, type, initial); } }); - compiler.hooks.make.tapAsync( - "AutomaticPrefetchPlugin", - (compilation, callback) => { - if (!lastModules) return callback(); - asyncLib.forEach( - lastModules, - (m, callback) => { - compilation.addModuleChain( - m.context || compiler.context, - new PrefetchDependency(`!!${m.request}`), - callback - ); - }, - err => { - lastModules = null; - callback(err); - } - ); - } - ); } -} -module.exports = AutomaticPrefetchPlugin; - - -/***/ }), - -/***/ 45480: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - + setDirectory(directoryPath, birthtime, initial, type) { + if (this.ignored(directoryPath)) return; + if (directoryPath === this.path) { + if (!initial) { + this.forEachWatcher(this.path, w => + w.emit("change", directoryPath, birthtime, type, initial) + ); + } + } else { + const old = this.directories.get(directoryPath); + if (!old) { + const now = Date.now(); -const { ConcatSource } = __webpack_require__(96192); -const Compilation = __webpack_require__(59622); -const ModuleFilenameHelpers = __webpack_require__(80295); -const Template = __webpack_require__(92066); -const createSchemaValidation = __webpack_require__(77695); + if (this.nestedWatching) { + this.createNestedWatcher(directoryPath); + } else { + this.directories.set(directoryPath, true); + } -/** @typedef {import("../declarations/plugins/BannerPlugin").BannerPluginArgument} BannerPluginArgument */ -/** @typedef {import("../declarations/plugins/BannerPlugin").BannerPluginOptions} BannerPluginOptions */ -/** @typedef {import("./Compiler")} Compiler */ + let safeTime; + if (initial) { + safeTime = Math.min(now, birthtime) + FS_ACCURACY; + } else { + safeTime = now; + } -const validate = createSchemaValidation( - __webpack_require__(79456), - () => __webpack_require__(33946), - { - name: "Banner Plugin", - baseDataPath: "options" + this.forEachWatcher(directoryPath, w => { + if (!initial || w.checkStartTime(safeTime, false)) { + w.emit("change", birthtime, type); + } + }); + this.forEachWatcher(this.path, w => { + if (!initial || w.checkStartTime(safeTime, initial)) { + w.emit("change", directoryPath, safeTime, type, initial); + } + }); + } + } } -); -const wrapComment = str => { - if (!str.includes("\n")) { - return Template.toComment(str); + createNestedWatcher(directoryPath) { + const watcher = this.watcherManager.watchDirectory(directoryPath, 1); + watcher.on("change", (filePath, mtime, type, initial) => { + this.forEachWatcher(this.path, w => { + if (!initial || w.checkStartTime(mtime, initial)) { + w.emit("change", filePath, mtime, type, initial); + } + }); + }); + this.directories.set(directoryPath, watcher); } - return `/*!\n * ${str - .replace(/\*\//g, "* /") - .split("\n") - .join("\n * ") - .replace(/\s+\n/g, "\n") - .trimRight()}\n */`; -}; -class BannerPlugin { - /** - * @param {BannerPluginArgument} options options object - */ - constructor(options) { - if (typeof options === "string" || typeof options === "function") { - options = { - banner: options - }; + setNestedWatching(flag) { + if (this.nestedWatching !== !!flag) { + this.nestedWatching = !!flag; + if (this.nestedWatching) { + for (const directory of this.directories.keys()) { + this.createNestedWatcher(directory); + } + } else { + for (const [directory, watcher] of this.directories) { + watcher.close(); + this.directories.set(directory, true); + } + } } + } - validate(options); - - this.options = options; - - const bannerOption = options.banner; - if (typeof bannerOption === "function") { - const getBanner = bannerOption; - this.banner = this.options.raw - ? getBanner - : data => wrapComment(getBanner(data)); + watch(filePath, startTime) { + const key = withoutCase(filePath); + let watchers = this.watchers.get(key); + if (watchers === undefined) { + watchers = new Set(); + this.watchers.set(key, watchers); + } + this.refs++; + const watcher = new Watcher(this, filePath, startTime); + watcher.on("closed", () => { + if (--this.refs <= 0) { + this.close(); + return; + } + watchers.delete(watcher); + if (watchers.size === 0) { + this.watchers.delete(key); + if (this.path === filePath) this.setNestedWatching(false); + } + }); + watchers.add(watcher); + let safeTime; + if (filePath === this.path) { + this.setNestedWatching(true); + safeTime = this.lastWatchEvent; + for (const entry of this.files.values()) { + fixupEntryAccuracy(entry); + safeTime = Math.max(safeTime, entry.safeTime); + } } else { - const banner = this.options.raw - ? bannerOption - : wrapComment(bannerOption); - this.banner = () => banner; + const entry = this.files.get(filePath); + if (entry) { + fixupEntryAccuracy(entry); + safeTime = entry.safeTime; + } else { + safeTime = 0; + } + } + if (safeTime) { + if (safeTime >= startTime) { + process.nextTick(() => { + if (this.closed) return; + if (filePath === this.path) { + watcher.emit( + "change", + filePath, + safeTime, + "watch (outdated on attach)", + true + ); + } else { + watcher.emit( + "change", + safeTime, + "watch (outdated on attach)", + true + ); + } + }); + } + } else if (this.initialScan) { + if (this.initialScanRemoved.has(filePath)) { + process.nextTick(() => { + if (this.closed) return; + watcher.emit("remove"); + }); + } + } else if ( + !this.directories.has(filePath) && + watcher.checkStartTime(this.initialScanFinished, false) + ) { + process.nextTick(() => { + if (this.closed) return; + watcher.emit("initial-missing", "watch (missing on attach)"); + }); } + return watcher; } - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - const options = this.options; - const banner = this.banner; - const matchObject = ModuleFilenameHelpers.matchObject.bind( - undefined, - options - ); + onWatchEvent(eventType, filename) { + if (this.closed) return; + if (!filename) { + // In some cases no filename is provided + // This seem to happen on windows + // So some event happened but we don't know which file is affected + // We have to do a full scan of the directory + this.doScan(false); + return; + } - compiler.hooks.compilation.tap("BannerPlugin", compilation => { - compilation.hooks.processAssets.tap( - { - name: "BannerPlugin", - stage: Compilation.PROCESS_ASSETS_STAGE_ADDITIONS - }, - () => { - for (const chunk of compilation.chunks) { - if (options.entryOnly && !chunk.canBeInitial()) { - continue; - } + const filePath = path.join(this.path, filename); + if (this.ignored(filePath)) return; - for (const file of chunk.files) { - if (!matchObject(file)) { - continue; + if (this._activeEvents.get(filename) === undefined) { + this._activeEvents.set(filename, false); + const checkStats = () => { + if (this.closed) return; + this._activeEvents.set(filename, false); + fs.lstat(filePath, (err, stats) => { + if (this.closed) return; + if (this._activeEvents.get(filename) === true) { + process.nextTick(checkStats); + return; + } + this._activeEvents.delete(filename); + // ENOENT happens when the file/directory doesn't exist + // EPERM happens when the containing directory doesn't exist + if (err) { + if ( + err.code !== "ENOENT" && + err.code !== "EPERM" && + err.code !== "EBUSY" + ) { + this.onStatsError(err); + } else { + if (filename === path.basename(this.path)) { + // This may indicate that the directory itself was removed + if (!fs.existsSync(this.path)) { + this.onDirectoryRemoved("stat failed"); + } } - - const data = { - chunk, - filename: file - }; - - const comment = compilation.getPath(banner, data); - - compilation.updateAsset( - file, - old => new ConcatSource(comment, "\n", old) - ); } } - } - ); - }); + this.lastWatchEvent = Date.now(); + if (!stats) { + this.setMissing(filePath, false, eventType); + } else if (stats.isDirectory()) { + this.setDirectory( + filePath, + +stats.birthtime || 1, + false, + eventType + ); + } else if (stats.isFile() || stats.isSymbolicLink()) { + if (stats.mtime) { + ensureFsAccuracy(stats.mtime); + } + this.setFileTime( + filePath, + +stats.mtime || +stats.ctime || 1, + false, + false, + eventType + ); + } + }); + }; + process.nextTick(checkStats); + } else { + this._activeEvents.set(filename, true); + } } -} - -module.exports = BannerPlugin; + onWatcherError(err) { + if (this.closed) return; + if (err) { + if (err.code !== "EPERM" && err.code !== "ENOENT") { + console.error("Watchpack Error (watcher): " + err); + } + this.onDirectoryRemoved("watch error"); + } + } -/***/ }), + onStatsError(err) { + if (err) { + console.error("Watchpack Error (stats): " + err); + } + } -/***/ 99453: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + onScanError(err) { + if (err) { + console.error("Watchpack Error (initial scan): " + err); + } + this.onScanFinished(); + } -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ + onScanFinished() { + if (this.polledWatching) { + this.timeout = setTimeout(() => { + if (this.closed) return; + this.doScan(false); + }, this.polledWatching); + } + } + onDirectoryRemoved(reason) { + if (this.watcher) { + this.watcher.close(); + this.watcher = null; + } + this.watchInParentDirectory(); + const type = `directory-removed (${reason})`; + for (const directory of this.directories.keys()) { + this.setMissing(directory, null, type); + } + for (const file of this.files.keys()) { + this.setMissing(file, null, type); + } + } + watchInParentDirectory() { + if (!this.parentWatcher) { + const parentDir = path.dirname(this.path); + // avoid watching in the root directory + // removing directories in the root directory is not supported + if (path.dirname(parentDir) === parentDir) return; -const { AsyncParallelHook, AsyncSeriesBailHook, SyncHook } = __webpack_require__(34718); -const { - makeWebpackError, - makeWebpackErrorCallback -} = __webpack_require__(89935); + this.parentWatcher = this.watcherManager.watchFile(this.path, 1); + this.parentWatcher.on("change", (mtime, type) => { + if (this.closed) return; -/** @typedef {import("./WebpackError")} WebpackError */ + // On non-osx platforms we don't need this watcher to detect + // directory removal, as an EPERM error indicates that + if ((!IS_OSX || this.polledWatching) && this.parentWatcher) { + this.parentWatcher.close(); + this.parentWatcher = null; + } + // Try to create the watcher when parent directory is found + if (!this.watcher) { + this.createWatcher(); + this.doScan(false); -/** - * @typedef {Object} Etag - * @property {function(): string} toString - */ + // directory was created so we emit an event + this.forEachWatcher(this.path, w => + w.emit("change", this.path, mtime, type, false) + ); + } + }); + this.parentWatcher.on("remove", () => { + this.onDirectoryRemoved("parent directory removed"); + }); + } + } -/** - * @template T - * @callback CallbackCache - * @param {WebpackError=} err - * @param {T=} result - * @returns {void} - */ - -/** - * @callback GotHandler - * @param {any} result - * @param {function(Error=): void} callback - * @returns {void} - */ - -const needCalls = (times, callback) => { - return err => { - if (--times === 0) { - return callback(err); + doScan(initial) { + if (this.scanning) { + if (this.scanAgain) { + if (!initial) this.scanAgainInitial = false; + } else { + this.scanAgain = true; + this.scanAgainInitial = initial; + } + return; } - if (err && times > 0) { - times = 0; - return callback(err); + this.scanning = true; + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = undefined; } - }; -}; - -class Cache { - constructor() { - this.hooks = { - /** @type {AsyncSeriesBailHook<[string, Etag | null, GotHandler[]], any>} */ - get: new AsyncSeriesBailHook(["identifier", "etag", "gotHandlers"]), - /** @type {AsyncParallelHook<[string, Etag | null, any]>} */ - store: new AsyncParallelHook(["identifier", "etag", "data"]), - /** @type {AsyncParallelHook<[Iterable]>} */ - storeBuildDependencies: new AsyncParallelHook(["dependencies"]), - /** @type {SyncHook<[]>} */ - beginIdle: new SyncHook([]), - /** @type {AsyncParallelHook<[]>} */ - endIdle: new AsyncParallelHook([]), - /** @type {AsyncParallelHook<[]>} */ - shutdown: new AsyncParallelHook([]) - }; - } - - /** - * @template T - * @param {string} identifier the cache identifier - * @param {Etag | null} etag the etag - * @param {CallbackCache} callback signals when the value is retrieved - * @returns {void} - */ - get(identifier, etag, callback) { - const gotHandlers = []; - this.hooks.get.callAsync(identifier, etag, gotHandlers, (err, result) => { - if (err) { - callback(makeWebpackError(err, "Cache.hooks.get")); - return; - } - if (result === null) { - result = undefined; - } - if (gotHandlers.length > 1) { - const innerCallback = needCalls(gotHandlers.length, () => - callback(null, result) + process.nextTick(() => { + if (this.closed) return; + fs.readdir(this.path, (err, items) => { + if (this.closed) return; + if (err) { + if (err.code === "ENOENT" || err.code === "EPERM") { + this.onDirectoryRemoved("scan readdir failed"); + } else { + this.onScanError(err); + } + this.initialScan = false; + this.initialScanFinished = Date.now(); + if (initial) { + for (const watchers of this.watchers.values()) { + for (const watcher of watchers) { + if (watcher.checkStartTime(this.initialScanFinished, false)) { + watcher.emit( + "initial-missing", + "scan (parent directory missing in initial scan)" + ); + } + } + } + } + if (this.scanAgain) { + this.scanAgain = false; + this.doScan(this.scanAgainInitial); + } else { + this.scanning = false; + } + return; + } + const itemPaths = new Set( + items.map(item => path.join(this.path, item.normalize("NFC"))) ); - for (const gotHandler of gotHandlers) { - gotHandler(result, innerCallback); + for (const file of this.files.keys()) { + if (!itemPaths.has(file)) { + this.setMissing(file, initial, "scan (missing)"); + } } - } else if (gotHandlers.length === 1) { - gotHandlers[0](result, () => callback(null, result)); - } else { - callback(null, result); - } + for (const directory of this.directories.keys()) { + if (!itemPaths.has(directory)) { + this.setMissing(directory, initial, "scan (missing)"); + } + } + if (this.scanAgain) { + // Early repeat of scan + this.scanAgain = false; + this.doScan(initial); + return; + } + const itemFinished = needCalls(itemPaths.size + 1, () => { + if (this.closed) return; + this.initialScan = false; + this.initialScanRemoved = null; + this.initialScanFinished = Date.now(); + if (initial) { + const missingWatchers = new Map(this.watchers); + missingWatchers.delete(withoutCase(this.path)); + for (const item of itemPaths) { + missingWatchers.delete(withoutCase(item)); + } + for (const watchers of missingWatchers.values()) { + for (const watcher of watchers) { + if (watcher.checkStartTime(this.initialScanFinished, false)) { + watcher.emit( + "initial-missing", + "scan (missing in initial scan)" + ); + } + } + } + } + if (this.scanAgain) { + this.scanAgain = false; + this.doScan(this.scanAgainInitial); + } else { + this.scanning = false; + this.onScanFinished(); + } + }); + for (const itemPath of itemPaths) { + fs.lstat(itemPath, (err2, stats) => { + if (this.closed) return; + if (err2) { + if ( + err2.code === "ENOENT" || + err2.code === "EPERM" || + err2.code === "EACCES" || + err2.code === "EBUSY" + ) { + this.setMissing(itemPath, initial, "scan (" + err2.code + ")"); + } else { + this.onScanError(err2); + } + itemFinished(); + return; + } + if (stats.isFile() || stats.isSymbolicLink()) { + if (stats.mtime) { + ensureFsAccuracy(stats.mtime); + } + this.setFileTime( + itemPath, + +stats.mtime || +stats.ctime || 1, + initial, + true, + "scan (file)" + ); + } else if (stats.isDirectory()) { + if (!initial || !this.directories.has(itemPath)) + this.setDirectory( + itemPath, + +stats.birthtime || 1, + initial, + "scan (dir)" + ); + } + itemFinished(); + }); + } + itemFinished(); + }); }); } - /** - * @template T - * @param {string} identifier the cache identifier - * @param {Etag | null} etag the etag - * @param {T} data the value to store - * @param {CallbackCache} callback signals when the value is stored - * @returns {void} - */ - store(identifier, etag, data, callback) { - this.hooks.store.callAsync( - identifier, - etag, - data, - makeWebpackErrorCallback(callback, "Cache.hooks.store") - ); + getTimes() { + const obj = Object.create(null); + let safeTime = this.lastWatchEvent; + for (const [file, entry] of this.files) { + fixupEntryAccuracy(entry); + safeTime = Math.max(safeTime, entry.safeTime); + obj[file] = Math.max(entry.safeTime, entry.timestamp); + } + if (this.nestedWatching) { + for (const w of this.directories.values()) { + const times = w.directoryWatcher.getTimes(); + for (const file of Object.keys(times)) { + const time = times[file]; + safeTime = Math.max(safeTime, time); + obj[file] = time; + } + } + obj[this.path] = safeTime; + } + if (!this.initialScan) { + for (const watchers of this.watchers.values()) { + for (const watcher of watchers) { + const path = watcher.path; + if (!Object.prototype.hasOwnProperty.call(obj, path)) { + obj[path] = null; + } + } + } + } + return obj; } - /** - * After this method has succeeded the cache can only be restored when build dependencies are - * @param {Iterable} dependencies list of all build dependencies - * @param {CallbackCache} callback signals when the dependencies are stored - * @returns {void} - */ - storeBuildDependencies(dependencies, callback) { - this.hooks.storeBuildDependencies.callAsync( - dependencies, - makeWebpackErrorCallback(callback, "Cache.hooks.storeBuildDependencies") - ); + collectTimeInfoEntries(fileTimestamps, directoryTimestamps) { + let safeTime = this.lastWatchEvent; + for (const [file, entry] of this.files) { + fixupEntryAccuracy(entry); + safeTime = Math.max(safeTime, entry.safeTime); + fileTimestamps.set(file, entry); + } + if (this.nestedWatching) { + for (const w of this.directories.values()) { + safeTime = Math.max( + safeTime, + w.directoryWatcher.collectTimeInfoEntries( + fileTimestamps, + directoryTimestamps + ) + ); + } + fileTimestamps.set(this.path, EXISTANCE_ONLY_TIME_ENTRY); + directoryTimestamps.set(this.path, { + safeTime + }); + } else { + for (const dir of this.directories.keys()) { + // No additional info about this directory + // but maybe another DirectoryWatcher has info + fileTimestamps.set(dir, EXISTANCE_ONLY_TIME_ENTRY); + if (!directoryTimestamps.has(dir)) + directoryTimestamps.set(dir, EXISTANCE_ONLY_TIME_ENTRY); + } + fileTimestamps.set(this.path, EXISTANCE_ONLY_TIME_ENTRY); + directoryTimestamps.set(this.path, EXISTANCE_ONLY_TIME_ENTRY); + } + if (!this.initialScan) { + for (const watchers of this.watchers.values()) { + for (const watcher of watchers) { + const path = watcher.path; + if (!fileTimestamps.has(path)) { + fileTimestamps.set(path, null); + } + } + } + } + return safeTime; } - /** - * @returns {void} - */ - beginIdle() { - this.hooks.beginIdle.call(); + close() { + this.closed = true; + this.initialScan = false; + if (this.watcher) { + this.watcher.close(); + this.watcher = null; + } + if (this.nestedWatching) { + for (const w of this.directories.values()) { + w.close(); + } + this.directories.clear(); + } + if (this.parentWatcher) { + this.parentWatcher.close(); + this.parentWatcher = null; + } + this.emit("closed"); } +} - /** - * @param {CallbackCache} callback signals when the call finishes - * @returns {void} - */ - endIdle(callback) { - this.hooks.endIdle.callAsync( - makeWebpackErrorCallback(callback, "Cache.hooks.endIdle") - ); - } +module.exports = DirectoryWatcher; +module.exports.EXISTANCE_ONLY_TIME_ENTRY = EXISTANCE_ONLY_TIME_ENTRY; - /** - * @param {CallbackCache} callback signals when the call finishes - * @returns {void} - */ - shutdown(callback) { - this.hooks.shutdown.callAsync( - makeWebpackErrorCallback(callback, "Cache.hooks.shutdown") - ); +function fixupEntryAccuracy(entry) { + if (entry.accuracy > FS_ACCURACY) { + entry.safeTime = entry.safeTime - entry.accuracy + FS_ACCURACY; + entry.accuracy = FS_ACCURACY; } } -Cache.STAGE_MEMORY = -10; -Cache.STAGE_DEFAULT = 0; -Cache.STAGE_DISK = 10; -Cache.STAGE_NETWORK = 20; - -module.exports = Cache; +function ensureFsAccuracy(mtime) { + if (!mtime) return; + if (FS_ACCURACY > 1 && mtime % 1 !== 0) FS_ACCURACY = 1; + else if (FS_ACCURACY > 10 && mtime % 10 !== 0) FS_ACCURACY = 10; + else if (FS_ACCURACY > 100 && mtime % 100 !== 0) FS_ACCURACY = 100; +} /***/ }), -/***/ 67014: +/***/ 30417: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; @@ -23444,357 +23432,172 @@ module.exports = Cache; */ +const fs = __webpack_require__(35747); +const path = __webpack_require__(85622); -const asyncLib = __webpack_require__(36386); -const getLazyHashedEtag = __webpack_require__(12339); -const mergeEtags = __webpack_require__(53885); - -/** @typedef {import("./Cache")} Cache */ -/** @typedef {import("./Cache").Etag} Etag */ -/** @typedef {import("./WebpackError")} WebpackError */ -/** @typedef {import("./cache/getLazyHashedEtag").HashableObject} HashableObject */ -/** @typedef {typeof import("./util/Hash")} HashConstructor */ - -/** - * @template T - * @callback CallbackCache - * @param {WebpackError=} err - * @param {T=} result - * @returns {void} - */ - -/** - * @template T - * @callback CallbackNormalErrorCache - * @param {Error=} err - * @param {T=} result - * @returns {void} - */ - -class MultiItemCache { - /** - * @param {ItemCacheFacade[]} items item caches - */ - constructor(items) { - this._items = items; - if (items.length === 1) return /** @type {any} */ (items[0]); - } - - /** - * @template T - * @param {CallbackCache} callback signals when the value is retrieved - * @returns {void} - */ - get(callback) { - const next = i => { - this._items[i].get((err, result) => { - if (err) return callback(err); - if (result !== undefined) return callback(null, result); - if (++i >= this._items.length) return callback(); - next(i); - }); - }; - next(0); - } - - /** - * @template T - * @returns {Promise} promise with the data - */ - getPromise() { - const next = i => { - return this._items[i].getPromise().then(result => { - if (result !== undefined) return result; - if (++i < this._items.length) return next(i); - }); - }; - return next(0); - } +// macOS, Linux, and Windows all rely on these errors +const EXPECTED_ERRORS = new Set(["EINVAL", "ENOENT"]); - /** - * @template T - * @param {T} data the value to store - * @param {CallbackCache} callback signals when the value is stored - * @returns {void} - */ - store(data, callback) { - asyncLib.each( - this._items, - (item, callback) => item.store(data, callback), - callback - ); - } +// On Windows there is also this error in some cases +if (process.platform === "win32") EXPECTED_ERRORS.add("UNKNOWN"); - /** - * @template T - * @param {T} data the value to store - * @returns {Promise} promise signals when the value is stored - */ - storePromise(data) { - return Promise.all(this._items.map(item => item.storePromise(data))).then( - () => {} - ); +class LinkResolver { + constructor() { + this.cache = new Map(); } -} -class ItemCacheFacade { /** - * @param {Cache} cache the root cache - * @param {string} name the child cache item name - * @param {Etag | null} etag the etag + * @param {string} file path to file or directory + * @returns {string[]} array of file and all symlinks contributed in the resolving process (first item is the resolved file) */ - constructor(cache, name, etag) { - this._cache = cache; - this._name = name; - this._etag = etag; - } + resolve(file) { + const cacheEntry = this.cache.get(file); + if (cacheEntry !== undefined) { + return cacheEntry; + } + const parent = path.dirname(file); + if (parent === file) { + // At root of filesystem there can't be a link + const result = Object.freeze([file]); + this.cache.set(file, result); + return result; + } + // resolve the parent directory to find links there and get the real path + const parentResolved = this.resolve(parent); + let realFile = file; - /** - * @template T - * @param {CallbackCache} callback signals when the value is retrieved - * @returns {void} - */ - get(callback) { - this._cache.get(this._name, this._etag, callback); - } + // is the parent directory really somewhere else? + if (parentResolved[0] !== parent) { + // get the real location of file + const basename = path.basename(file); + realFile = path.resolve(parentResolved[0], basename); + } + // try to read the link content + try { + const linkContent = fs.readlinkSync(realFile); - /** - * @template T - * @returns {Promise} promise with the data - */ - getPromise() { - return new Promise((resolve, reject) => { - this._cache.get(this._name, this._etag, (err, data) => { - if (err) { - reject(err); - } else { - resolve(data); - } - }); - }); - } + // resolve the link content relative to the parent directory + const resolvedLink = path.resolve(parentResolved[0], linkContent); - /** - * @template T - * @param {T} data the value to store - * @param {CallbackCache} callback signals when the value is stored - * @returns {void} - */ - store(data, callback) { - this._cache.store(this._name, this._etag, data, callback); - } + // recursive resolve the link content for more links in the structure + const linkResolved = this.resolve(resolvedLink); - /** - * @template T - * @param {T} data the value to store - * @returns {Promise} promise signals when the value is stored - */ - storePromise(data) { - return new Promise((resolve, reject) => { - this._cache.store(this._name, this._etag, data, err => { - if (err) { - reject(err); - } else { - resolve(); + // merge parent and link resolve results + let result; + if (linkResolved.length > 1 && parentResolved.length > 1) { + // when both contain links we need to duplicate them with a Set + const resultSet = new Set(linkResolved); + // add the link + resultSet.add(realFile); + // add all symlinks of the parent + for (let i = 1; i < parentResolved.length; i++) { + resultSet.add(parentResolved[i]); } - }); - }); - } - - /** - * @template T - * @param {function(CallbackNormalErrorCache): void} computer function to compute the value if not cached - * @param {CallbackNormalErrorCache} callback signals when the value is retrieved - * @returns {void} - */ - provide(computer, callback) { - this.get((err, cacheEntry) => { - if (err) return callback(err); - if (cacheEntry !== undefined) return cacheEntry; - computer((err, result) => { - if (err) return callback(err); - this.store(result, err => { - if (err) return callback(err); - callback(null, result); - }); - }); - }); - } - - /** - * @template T - * @param {function(): Promise | T} computer function to compute the value if not cached - * @returns {Promise} promise with the data - */ - async providePromise(computer) { - const cacheEntry = await this.getPromise(); - if (cacheEntry !== undefined) return cacheEntry; - const result = await computer(); - await this.storePromise(result); - return result; + result = Object.freeze(Array.from(resultSet)); + } else if (parentResolved.length > 1) { + // we have links in the parent but not for the link content location + result = parentResolved.slice(); + result[0] = linkResolved[0]; + // add the link + result.push(realFile); + Object.freeze(result); + } else if (linkResolved.length > 1) { + // we can return the link content location result + result = linkResolved.slice(); + // add the link + result.push(realFile); + Object.freeze(result); + } else { + // neither link content location nor parent have links + // this link is the only link here + result = Object.freeze([ + // the resolve real location + linkResolved[0], + // add the link + realFile + ]); + } + this.cache.set(file, result); + return result; + } catch (e) { + if (!EXPECTED_ERRORS.has(e.code)) { + throw e; + } + // no link + const result = parentResolved.slice(); + result[0] = realFile; + Object.freeze(result); + this.cache.set(file, result); + return result; + } } } +module.exports = LinkResolver; -class CacheFacade { - /** - * @param {Cache} cache the root cache - * @param {string} name the child cache name - * @param {string | HashConstructor} hashFunction the hash function to use - */ - constructor(cache, name, hashFunction) { - this._cache = cache; - this._name = name; - this._hashFunction = hashFunction; - } - - /** - * @param {string} name the child cache name# - * @returns {CacheFacade} child cache - */ - getChildCache(name) { - return new CacheFacade( - this._cache, - `${this._name}|${name}`, - this._hashFunction - ); - } - /** - * @param {string} identifier the cache identifier - * @param {Etag | null} etag the etag - * @returns {ItemCacheFacade} item cache - */ - getItemCache(identifier, etag) { - return new ItemCacheFacade( - this._cache, - `${this._name}|${identifier}`, - etag - ); - } +/***/ }), - /** - * @param {HashableObject} obj an hashable object - * @returns {Etag} an etag that is lazy hashed - */ - getLazyHashedEtag(obj) { - return getLazyHashedEtag(obj, this._hashFunction); - } +/***/ 56001: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - /** - * @param {Etag} a an etag - * @param {Etag} b another etag - * @returns {Etag} an etag that represents both - */ - mergeEtags(a, b) { - return mergeEtags(a, b); - } +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ - /** - * @template T - * @param {string} identifier the cache identifier - * @param {Etag | null} etag the etag - * @param {CallbackCache} callback signals when the value is retrieved - * @returns {void} - */ - get(identifier, etag, callback) { - this._cache.get(`${this._name}|${identifier}`, etag, callback); - } - /** - * @template T - * @param {string} identifier the cache identifier - * @param {Etag | null} etag the etag - * @returns {Promise} promise with the data - */ - getPromise(identifier, etag) { - return new Promise((resolve, reject) => { - this._cache.get(`${this._name}|${identifier}`, etag, (err, data) => { - if (err) { - reject(err); - } else { - resolve(data); - } - }); - }); - } +const path = __webpack_require__(85622); +const DirectoryWatcher = __webpack_require__(76595); - /** - * @template T - * @param {string} identifier the cache identifier - * @param {Etag | null} etag the etag - * @param {T} data the value to store - * @param {CallbackCache} callback signals when the value is stored - * @returns {void} - */ - store(identifier, etag, data, callback) { - this._cache.store(`${this._name}|${identifier}`, etag, data, callback); +class WatcherManager { + constructor(options) { + this.options = options; + this.directoryWatchers = new Map(); } - /** - * @template T - * @param {string} identifier the cache identifier - * @param {Etag | null} etag the etag - * @param {T} data the value to store - * @returns {Promise} promise signals when the value is stored - */ - storePromise(identifier, etag, data) { - return new Promise((resolve, reject) => { - this._cache.store(`${this._name}|${identifier}`, etag, data, err => { - if (err) { - reject(err); - } else { - resolve(); - } + getDirectoryWatcher(directory) { + const watcher = this.directoryWatchers.get(directory); + if (watcher === undefined) { + const newWatcher = new DirectoryWatcher(this, directory, this.options); + this.directoryWatchers.set(directory, newWatcher); + newWatcher.on("closed", () => { + this.directoryWatchers.delete(directory); }); - }); + return newWatcher; + } + return watcher; } - /** - * @template T - * @param {string} identifier the cache identifier - * @param {Etag | null} etag the etag - * @param {function(CallbackNormalErrorCache): void} computer function to compute the value if not cached - * @param {CallbackNormalErrorCache} callback signals when the value is retrieved - * @returns {void} - */ - provide(identifier, etag, computer, callback) { - this.get(identifier, etag, (err, cacheEntry) => { - if (err) return callback(err); - if (cacheEntry !== undefined) return cacheEntry; - computer((err, result) => { - if (err) return callback(err); - this.store(identifier, etag, result, err => { - if (err) return callback(err); - callback(null, result); - }); - }); - }); + watchFile(p, startTime) { + const directory = path.dirname(p); + if (directory === p) return null; + return this.getDirectoryWatcher(directory).watch(p, startTime); } - /** - * @template T - * @param {string} identifier the cache identifier - * @param {Etag | null} etag the etag - * @param {function(): Promise | T} computer function to compute the value if not cached - * @returns {Promise} promise with the data - */ - async providePromise(identifier, etag, computer) { - const cacheEntry = await this.getPromise(identifier, etag); - if (cacheEntry !== undefined) return cacheEntry; - const result = await computer(); - await this.storePromise(identifier, etag, result); - return result; + watchDirectory(directory, startTime) { + return this.getDirectoryWatcher(directory).watch(directory, startTime); } } -module.exports = CacheFacade; -module.exports.ItemCacheFacade = ItemCacheFacade; -module.exports.MultiItemCache = MultiItemCache; +const watcherManagers = new WeakMap(); +/** + * @param {object} options options + * @returns {WatcherManager} the watcher manager + */ +module.exports = options => { + const watcherManager = watcherManagers.get(options); + if (watcherManager !== undefined) return watcherManager; + const newWatcherManager = new WatcherManager(options); + watcherManagers.set(options, newWatcherManager); + return newWatcherManager; +}; +module.exports.WatcherManager = WatcherManager; /***/ }), -/***/ 42444: +/***/ 93030: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; @@ -23804,77 +23607,144 @@ module.exports.MultiItemCache = MultiItemCache; */ - -const WebpackError = __webpack_require__(68422); - -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./ModuleGraph")} ModuleGraph */ +const path = __webpack_require__(85622); /** - * @param {Module[]} modules the modules to be sorted - * @returns {Module[]} sorted version of original modules + * @template T + * @typedef {Object} TreeNode + * @property {string} filePath + * @property {TreeNode} parent + * @property {TreeNode[]} children + * @property {number} entries + * @property {boolean} active + * @property {T[] | T | undefined} value */ -const sortModules = modules => { - return modules.sort((a, b) => { - const aIdent = a.identifier(); - const bIdent = b.identifier(); - /* istanbul ignore next */ - if (aIdent < bIdent) return -1; - /* istanbul ignore next */ - if (aIdent > bIdent) return 1; - /* istanbul ignore next */ - return 0; - }); -}; /** - * @param {Module[]} modules each module from throw - * @param {ModuleGraph} moduleGraph the module graph - * @returns {string} each message from provided modules + * @template T + * @param {Map>} the new plan */ -const createModulesListMessage = (modules, moduleGraph) => { - return modules - .map(m => { - let message = `* ${m.identifier()}`; - const validReasons = Array.from( - moduleGraph.getIncomingConnectionsByOriginModule(m).keys() - ).filter(x => x); - - if (validReasons.length > 0) { - message += `\n Used by ${validReasons.length} module(s), i. e.`; - message += `\n ${validReasons[0].identifier()}`; +module.exports = (plan, limit) => { + const treeMap = new Map(); + // Convert to tree + for (const [filePath, value] of plan) { + treeMap.set(filePath, { + filePath, + parent: undefined, + children: undefined, + entries: 1, + active: true, + value + }); + } + let currentCount = treeMap.size; + // Create parents and calculate sum of entries + for (const node of treeMap.values()) { + const parentPath = path.dirname(node.filePath); + if (parentPath !== node.filePath) { + let parent = treeMap.get(parentPath); + if (parent === undefined) { + parent = { + filePath: parentPath, + parent: undefined, + children: [node], + entries: node.entries, + active: false, + value: undefined + }; + treeMap.set(parentPath, parent); + node.parent = parent; + } else { + node.parent = parent; + if (parent.children === undefined) { + parent.children = [node]; + } else { + parent.children.push(node); + } + do { + parent.entries += node.entries; + parent = parent.parent; + } while (parent); } - return message; - }) - .join("\n"); -}; - -class CaseSensitiveModulesWarning extends WebpackError { - /** - * Creates an instance of CaseSensitiveModulesWarning. - * @param {Iterable} modules modules that were detected - * @param {ModuleGraph} moduleGraph the module graph - */ - constructor(modules, moduleGraph) { - const sortedModules = sortModules(Array.from(modules)); - const modulesList = createModulesListMessage(sortedModules, moduleGraph); - super(`There are multiple modules with names that only differ in casing. -This can lead to unexpected behavior when compiling on a filesystem with other case-semantic. -Use equal casing. Compare these module identifiers: -${modulesList}`); - - this.name = "CaseSensitiveModulesWarning"; - this.module = sortedModules[0]; + } } -} - -module.exports = CaseSensitiveModulesWarning; + // Reduce until limit reached + while (currentCount > limit) { + // Select node that helps reaching the limit most effectively without overmerging + const overLimit = currentCount - limit; + let bestNode = undefined; + let bestCost = Infinity; + for (const node of treeMap.values()) { + if (node.entries <= 1 || !node.children || !node.parent) continue; + if (node.children.length === 0) continue; + if (node.children.length === 1 && !node.value) continue; + // Try to select the node with has just a bit more entries than we need to reduce + // When just a bit more is over 30% over the limit, + // also consider just a bit less entries then we need to reduce + const cost = + node.entries - 1 >= overLimit + ? node.entries - 1 - overLimit + : overLimit - node.entries + 1 + limit * 0.3; + if (cost < bestCost) { + bestNode = node; + bestCost = cost; + } + } + if (!bestNode) break; + // Merge all children + const reduction = bestNode.entries - 1; + bestNode.active = true; + bestNode.entries = 1; + currentCount -= reduction; + let parent = bestNode.parent; + while (parent) { + parent.entries -= reduction; + parent = parent.parent; + } + const queue = new Set(bestNode.children); + for (const node of queue) { + node.active = false; + node.entries = 0; + if (node.children) { + for (const child of node.children) queue.add(child); + } + } + } + // Write down new plan + const newPlan = new Map(); + for (const rootNode of treeMap.values()) { + if (!rootNode.active) continue; + const map = new Map(); + const queue = new Set([rootNode]); + for (const node of queue) { + if (node.active && node !== rootNode) continue; + if (node.value) { + if (Array.isArray(node.value)) { + for (const item of node.value) { + map.set(item, node.filePath); + } + } else { + map.set(node.value, node.filePath); + } + } + if (node.children) { + for (const child of node.children) { + queue.add(child); + } + } + } + newPlan.set(rootNode.filePath, map); + } + return newPlan; +}; /***/ }), -/***/ 65574: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { +/***/ 72511: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; /* @@ -23883,823 +23753,731 @@ module.exports = CaseSensitiveModulesWarning; */ +const fs = __webpack_require__(35747); +const path = __webpack_require__(85622); +const { EventEmitter } = __webpack_require__(28614); +const reducePlan = __webpack_require__(93030); -const ChunkGraph = __webpack_require__(97860); -const Entrypoint = __webpack_require__(86695); -const { intersect } = __webpack_require__(34715); -const SortableSet = __webpack_require__(67563); -const StringXor = __webpack_require__(23877); -const { - compareModulesByIdentifier, - compareChunkGroupsByIndex, - compareModulesById -} = __webpack_require__(26296); -const { createArrayToSetDeprecationSet } = __webpack_require__(2594); -const { mergeRuntime } = __webpack_require__(19655); +const IS_OSX = __webpack_require__(12087).platform() === "darwin"; +const IS_WIN = __webpack_require__(12087).platform() === "win32"; +const SUPPORTS_RECURSIVE_WATCHING = IS_OSX || IS_WIN; -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("./ChunkGraph").ChunkFilterPredicate} ChunkFilterPredicate */ -/** @typedef {import("./ChunkGraph").ChunkSizeOptions} ChunkSizeOptions */ -/** @typedef {import("./ChunkGraph").ModuleFilterPredicate} ModuleFilterPredicate */ -/** @typedef {import("./ChunkGroup")} ChunkGroup */ -/** @typedef {import("./Compilation")} Compilation */ -/** @typedef {import("./Compilation").AssetInfo} AssetInfo */ -/** @typedef {import("./Compilation").PathData} PathData */ -/** @typedef {import("./Entrypoint").EntryOptions} EntryOptions */ -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./ModuleGraph")} ModuleGraph */ -/** @typedef {import("./util/Hash")} Hash */ -/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ +const watcherLimit = + +process.env.WATCHPACK_WATCHER_LIMIT || (IS_OSX ? 2000 : 10000); -const ChunkFilesSet = createArrayToSetDeprecationSet("chunk.files"); +const recursiveWatcherLogging = !!process.env + .WATCHPACK_RECURSIVE_WATCHER_LOGGING; -/** - * @typedef {Object} WithId an object who has an id property * - * @property {string | number} id the id of the object - */ +let isBatch = false; +let watcherCount = 0; -/** - * @deprecated - * @typedef {Object} ChunkMaps - * @property {Record} hash - * @property {Record>} contentHash - * @property {Record} name - */ +/** @type {Map} */ +const pendingWatchers = new Map(); -/** - * @deprecated - * @typedef {Object} ChunkModuleMaps - * @property {Record} id - * @property {Record} hash - */ +/** @type {Map} */ +const recursiveWatchers = new Map(); -let debugId = 1000; +/** @type {Map} */ +const directWatchers = new Map(); -/** - * A Chunk is a unit of encapsulation for Modules. - * Chunks are "rendered" into bundles that get emitted when the build completes. - */ -class Chunk { - /** - * @param {string=} name of chunk being created, is optional (for subclasses) - * @param {boolean} backCompat enable backward-compatibility - */ - constructor(name, backCompat = true) { - /** @type {number | string | null} */ - this.id = null; - /** @type {(number|string)[] | null} */ - this.ids = null; - /** @type {number} */ - this.debugId = debugId++; - /** @type {string} */ - this.name = name; - /** @type {SortableSet} */ - this.idNameHints = new SortableSet(); - /** @type {boolean} */ - this.preventIntegration = false; - /** @type {(string | function(PathData, AssetInfo=): string)?} */ - this.filenameTemplate = undefined; - /** @private @type {SortableSet} */ - this._groups = new SortableSet(undefined, compareChunkGroupsByIndex); - /** @type {RuntimeSpec} */ - this.runtime = undefined; - /** @type {Set} */ - this.files = backCompat ? new ChunkFilesSet() : new Set(); - /** @type {Set} */ - this.auxiliaryFiles = new Set(); - /** @type {boolean} */ - this.rendered = false; - /** @type {string=} */ - this.hash = undefined; - /** @type {Record} */ - this.contentHash = Object.create(null); - /** @type {string=} */ - this.renderedHash = undefined; - /** @type {string=} */ - this.chunkReason = undefined; - /** @type {boolean} */ - this.extraAsync = false; - } +/** @type {Map} */ +const underlyingWatcher = new Map(); - // TODO remove in webpack 6 - // BACKWARD-COMPAT START - get entryModule() { - const entryModules = Array.from( - ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.entryModule", - "DEP_WEBPACK_CHUNK_ENTRY_MODULE" - ).getChunkEntryModulesIterable(this) - ); - if (entryModules.length === 0) { - return undefined; - } else if (entryModules.length === 1) { - return entryModules[0]; - } else { - throw new Error( - "Module.entryModule: Multiple entry modules are not supported by the deprecated API (Use the new ChunkGroup API)" - ); +class DirectWatcher { + constructor(filePath) { + this.filePath = filePath; + this.watchers = new Set(); + this.watcher = undefined; + try { + const watcher = fs.watch(filePath); + this.watcher = watcher; + watcher.on("change", (type, filename) => { + for (const w of this.watchers) { + w.emit("change", type, filename); + } + }); + watcher.on("error", error => { + for (const w of this.watchers) { + w.emit("error", error); + } + }); + } catch (err) { + process.nextTick(() => { + for (const w of this.watchers) { + w.emit("error", err); + } + }); } + watcherCount++; } - /** - * @returns {boolean} true, if the chunk contains an entry module - */ - hasEntryModule() { - return ( - ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.hasEntryModule", - "DEP_WEBPACK_CHUNK_HAS_ENTRY_MODULE" - ).getNumberOfEntryModules(this) > 0 - ); + add(watcher) { + underlyingWatcher.set(watcher, this); + this.watchers.add(watcher); } - /** - * @param {Module} module the module - * @returns {boolean} true, if the chunk could be added - */ - addModule(module) { - const chunkGraph = ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.addModule", - "DEP_WEBPACK_CHUNK_ADD_MODULE" - ); - if (chunkGraph.isModuleInChunk(module, this)) return false; - chunkGraph.connectChunkAndModule(this, module); - return true; + remove(watcher) { + this.watchers.delete(watcher); + if (this.watchers.size === 0) { + directWatchers.delete(this.filePath); + watcherCount--; + if (this.watcher) this.watcher.close(); + } } - /** - * @param {Module} module the module - * @returns {void} - */ - removeModule(module) { - ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.removeModule", - "DEP_WEBPACK_CHUNK_REMOVE_MODULE" - ).disconnectChunkAndModule(this, module); + getWatchers() { + return this.watchers; } +} - /** - * @returns {number} the number of module which are contained in this chunk - */ - getNumberOfModules() { - return ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.getNumberOfModules", - "DEP_WEBPACK_CHUNK_GET_NUMBER_OF_MODULES" - ).getNumberOfChunkModules(this); +class RecursiveWatcher { + constructor(rootPath) { + this.rootPath = rootPath; + /** @type {Map} */ + this.mapWatcherToPath = new Map(); + /** @type {Map>} */ + this.mapPathToWatchers = new Map(); + this.watcher = undefined; + try { + const watcher = fs.watch(rootPath, { + recursive: true + }); + this.watcher = watcher; + watcher.on("change", (type, filename) => { + if (!filename) { + if (recursiveWatcherLogging) { + process.stderr.write( + `[watchpack] dispatch ${type} event in recursive watcher (${ + this.rootPath + }) to all watchers\n` + ); + } + for (const w of this.mapWatcherToPath.keys()) { + w.emit("change", type); + } + } else { + const dir = path.dirname(filename); + const watchers = this.mapPathToWatchers.get(dir); + if (recursiveWatcherLogging) { + process.stderr.write( + `[watchpack] dispatch ${type} event in recursive watcher (${ + this.rootPath + }) for '${filename}' to ${ + watchers ? watchers.size : 0 + } watchers\n` + ); + } + if (watchers === undefined) return; + for (const w of watchers) { + w.emit("change", type, path.basename(filename)); + } + } + }); + watcher.on("error", error => { + for (const w of this.mapWatcherToPath.keys()) { + w.emit("error", error); + } + }); + } catch (err) { + process.nextTick(() => { + for (const w of this.mapWatcherToPath.keys()) { + w.emit("error", err); + } + }); + } + watcherCount++; + if (recursiveWatcherLogging) { + process.stderr.write( + `[watchpack] created recursive watcher at ${rootPath}\n` + ); + } } - get modulesIterable() { - const chunkGraph = ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.modulesIterable", - "DEP_WEBPACK_CHUNK_MODULES_ITERABLE" - ); - return chunkGraph.getOrderedChunkModulesIterable( - this, - compareModulesByIdentifier - ); + add(filePath, watcher) { + underlyingWatcher.set(watcher, this); + const subpath = filePath.slice(this.rootPath.length + 1) || "."; + this.mapWatcherToPath.set(watcher, subpath); + const set = this.mapPathToWatchers.get(subpath); + if (set === undefined) { + const newSet = new Set(); + newSet.add(watcher); + this.mapPathToWatchers.set(subpath, newSet); + } else { + set.add(watcher); + } } - /** - * @param {Chunk} otherChunk the chunk to compare with - * @returns {-1|0|1} the comparison result - */ - compareTo(otherChunk) { - const chunkGraph = ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.compareTo", - "DEP_WEBPACK_CHUNK_COMPARE_TO" - ); - return chunkGraph.compareChunks(this, otherChunk); + remove(watcher) { + const subpath = this.mapWatcherToPath.get(watcher); + if (!subpath) return; + this.mapWatcherToPath.delete(watcher); + const set = this.mapPathToWatchers.get(subpath); + set.delete(watcher); + if (set.size === 0) { + this.mapPathToWatchers.delete(subpath); + } + if (this.mapWatcherToPath.size === 0) { + recursiveWatchers.delete(this.rootPath); + watcherCount--; + if (this.watcher) this.watcher.close(); + if (recursiveWatcherLogging) { + process.stderr.write( + `[watchpack] closed recursive watcher at ${this.rootPath}\n` + ); + } + } } - /** - * @param {Module} module the module - * @returns {boolean} true, if the chunk contains the module - */ - containsModule(module) { - return ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.containsModule", - "DEP_WEBPACK_CHUNK_CONTAINS_MODULE" - ).isModuleInChunk(module, this); + getWatchers() { + return this.mapWatcherToPath; } +} - /** - * @returns {Module[]} the modules for this chunk - */ - getModules() { - return ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.getModules", - "DEP_WEBPACK_CHUNK_GET_MODULES" - ).getChunkModules(this); +class Watcher extends EventEmitter { + close() { + if (pendingWatchers.has(this)) { + pendingWatchers.delete(this); + return; + } + const watcher = underlyingWatcher.get(this); + watcher.remove(this); + underlyingWatcher.delete(this); } +} - /** - * @returns {void} - */ - remove() { - const chunkGraph = ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.remove", - "DEP_WEBPACK_CHUNK_REMOVE" - ); - chunkGraph.disconnectChunk(this); - this.disconnectFromGroups(); - } +const createDirectWatcher = filePath => { + const existing = directWatchers.get(filePath); + if (existing !== undefined) return existing; + const w = new DirectWatcher(filePath); + directWatchers.set(filePath, w); + return w; +}; - /** - * @param {Module} module the module - * @param {Chunk} otherChunk the target chunk - * @returns {void} - */ - moveModule(module, otherChunk) { - const chunkGraph = ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.moveModule", - "DEP_WEBPACK_CHUNK_MOVE_MODULE" - ); - chunkGraph.disconnectChunkAndModule(this, module); - chunkGraph.connectChunkAndModule(otherChunk, module); - } +const createRecursiveWatcher = rootPath => { + const existing = recursiveWatchers.get(rootPath); + if (existing !== undefined) return existing; + const w = new RecursiveWatcher(rootPath); + recursiveWatchers.set(rootPath, w); + return w; +}; - /** - * @param {Chunk} otherChunk the other chunk - * @returns {boolean} true, if the specified chunk has been integrated - */ - integrate(otherChunk) { - const chunkGraph = ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.integrate", - "DEP_WEBPACK_CHUNK_INTEGRATE" - ); - if (chunkGraph.canChunksBeIntegrated(this, otherChunk)) { - chunkGraph.integrateChunks(this, otherChunk); - return true; +const execute = () => { + /** @type {Map} */ + const map = new Map(); + const addWatcher = (watcher, filePath) => { + const entry = map.get(filePath); + if (entry === undefined) { + map.set(filePath, watcher); + } else if (Array.isArray(entry)) { + entry.push(watcher); } else { - return false; + map.set(filePath, [entry, watcher]); } + }; + for (const [watcher, filePath] of pendingWatchers) { + addWatcher(watcher, filePath); } + pendingWatchers.clear(); - /** - * @param {Chunk} otherChunk the other chunk - * @returns {boolean} true, if chunks could be integrated - */ - canBeIntegrated(otherChunk) { - const chunkGraph = ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.canBeIntegrated", - "DEP_WEBPACK_CHUNK_CAN_BE_INTEGRATED" - ); - return chunkGraph.canChunksBeIntegrated(this, otherChunk); - } - - /** - * @returns {boolean} true, if this chunk contains no module - */ - isEmpty() { - const chunkGraph = ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.isEmpty", - "DEP_WEBPACK_CHUNK_IS_EMPTY" - ); - return chunkGraph.getNumberOfChunkModules(this) === 0; - } - - /** - * @returns {number} total size of all modules in this chunk - */ - modulesSize() { - const chunkGraph = ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.modulesSize", - "DEP_WEBPACK_CHUNK_MODULES_SIZE" - ); - return chunkGraph.getChunkModulesSize(this); + // Fast case when we are not reaching the limit + if (!SUPPORTS_RECURSIVE_WATCHING || watcherLimit - watcherCount >= map.size) { + // Create watchers for all entries in the map + for (const [filePath, entry] of map) { + const w = createDirectWatcher(filePath); + if (Array.isArray(entry)) { + for (const item of entry) w.add(item); + } else { + w.add(entry); + } + } + return; } - /** - * @param {ChunkSizeOptions} options options object - * @returns {number} total size of this chunk - */ - size(options = {}) { - const chunkGraph = ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.size", - "DEP_WEBPACK_CHUNK_SIZE" - ); - return chunkGraph.getChunkSize(this, options); + // Reconsider existing watchers to improving watch plan + for (const watcher of recursiveWatchers.values()) { + for (const [w, subpath] of watcher.getWatchers()) { + addWatcher(w, path.join(watcher.rootPath, subpath)); + } } - - /** - * @param {Chunk} otherChunk the other chunk - * @param {ChunkSizeOptions} options options object - * @returns {number} total size of the chunk or false if the chunk can't be integrated - */ - integratedSize(otherChunk, options) { - const chunkGraph = ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.integratedSize", - "DEP_WEBPACK_CHUNK_INTEGRATED_SIZE" - ); - return chunkGraph.getIntegratedChunksSize(this, otherChunk, options); + for (const watcher of directWatchers.values()) { + for (const w of watcher.getWatchers()) { + addWatcher(w, watcher.filePath); + } } - /** - * @param {ModuleFilterPredicate} filterFn function used to filter modules - * @returns {ChunkModuleMaps} module map information - */ - getChunkModuleMaps(filterFn) { - const chunkGraph = ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.getChunkModuleMaps", - "DEP_WEBPACK_CHUNK_GET_CHUNK_MODULE_MAPS" - ); - /** @type {Record} */ - const chunkModuleIdMap = Object.create(null); - /** @type {Record} */ - const chunkModuleHashMap = Object.create(null); + // Merge map entries to keep watcher limit + // Create a 10% buffer to be able to enter fast case more often + const plan = reducePlan(map, watcherLimit * 0.9); - for (const asyncChunk of this.getAllAsyncChunks()) { - /** @type {(string|number)[]} */ - let array; - for (const module of chunkGraph.getOrderedChunkModulesIterable( - asyncChunk, - compareModulesById(chunkGraph) - )) { - if (filterFn(module)) { - if (array === undefined) { - array = []; - chunkModuleIdMap[asyncChunk.id] = array; + // Update watchers for all entries in the map + for (const [filePath, entry] of plan) { + if (entry.size === 1) { + for (const [watcher, filePath] of entry) { + const w = createDirectWatcher(filePath); + const old = underlyingWatcher.get(watcher); + if (old === w) continue; + w.add(watcher); + if (old !== undefined) old.remove(watcher); + } + } else { + const filePaths = new Set(entry.values()); + if (filePaths.size > 1) { + const w = createRecursiveWatcher(filePath); + for (const [watcher, watcherPath] of entry) { + const old = underlyingWatcher.get(watcher); + if (old === w) continue; + w.add(watcherPath, watcher); + if (old !== undefined) old.remove(watcher); + } + } else { + for (const filePath of filePaths) { + const w = createDirectWatcher(filePath); + for (const watcher of entry.keys()) { + const old = underlyingWatcher.get(watcher); + if (old === w) continue; + w.add(watcher); + if (old !== undefined) old.remove(watcher); } - const moduleId = chunkGraph.getModuleId(module); - array.push(moduleId); - chunkModuleHashMap[moduleId] = chunkGraph.getRenderedModuleHash( - module, - undefined - ); } } } - - return { - id: chunkModuleIdMap, - hash: chunkModuleHashMap - }; } +}; - /** - * @param {ModuleFilterPredicate} filterFn predicate function used to filter modules - * @param {ChunkFilterPredicate=} filterChunkFn predicate function used to filter chunks - * @returns {boolean} return true if module exists in graph - */ - hasModuleInGraph(filterFn, filterChunkFn) { - const chunkGraph = ChunkGraph.getChunkGraphForChunk( - this, - "Chunk.hasModuleInGraph", - "DEP_WEBPACK_CHUNK_HAS_MODULE_IN_GRAPH" - ); - return chunkGraph.hasModuleInGraph(this, filterFn, filterChunkFn); +exports.watch = filePath => { + const watcher = new Watcher(); + // Find an existing watcher + const directWatcher = directWatchers.get(filePath); + if (directWatcher !== undefined) { + directWatcher.add(watcher); + return watcher; } - - /** - * @deprecated - * @param {boolean} realHash whether the full hash or the rendered hash is to be used - * @returns {ChunkMaps} the chunk map information - */ - getChunkMaps(realHash) { - /** @type {Record} */ - const chunkHashMap = Object.create(null); - /** @type {Record>} */ - const chunkContentHashMap = Object.create(null); - /** @type {Record} */ - const chunkNameMap = Object.create(null); - - for (const chunk of this.getAllAsyncChunks()) { - chunkHashMap[chunk.id] = realHash ? chunk.hash : chunk.renderedHash; - for (const key of Object.keys(chunk.contentHash)) { - if (!chunkContentHashMap[key]) { - chunkContentHashMap[key] = Object.create(null); - } - chunkContentHashMap[key][chunk.id] = chunk.contentHash[key]; - } - if (chunk.name) { - chunkNameMap[chunk.id] = chunk.name; - } + let current = filePath; + for (;;) { + const recursiveWatcher = recursiveWatchers.get(current); + if (recursiveWatcher !== undefined) { + recursiveWatcher.add(filePath, watcher); + return watcher; } - - return { - hash: chunkHashMap, - contentHash: chunkContentHashMap, - name: chunkNameMap - }; + const parent = path.dirname(current); + if (parent === current) break; + current = parent; } - // BACKWARD-COMPAT END + // Queue up watcher for creation + pendingWatchers.set(watcher, filePath); + if (!isBatch) execute(); + return watcher; +}; - /** - * @returns {boolean} whether or not the Chunk will have a runtime - */ - hasRuntime() { - for (const chunkGroup of this._groups) { - if ( - chunkGroup instanceof Entrypoint && - chunkGroup.getRuntimeChunk() === this - ) { - return true; - } - } - return false; +exports.batch = fn => { + isBatch = true; + try { + fn(); + } finally { + isBatch = false; + execute(); } +}; - /** - * @returns {boolean} whether or not this chunk can be an initial chunk - */ - canBeInitial() { - for (const chunkGroup of this._groups) { - if (chunkGroup.isInitial()) return true; - } - return false; - } +exports.getNumberOfWatchers = () => { + return watcherCount; +}; - /** - * @returns {boolean} whether this chunk can only be an initial chunk - */ - isOnlyInitial() { - if (this._groups.size <= 0) return false; - for (const chunkGroup of this._groups) { - if (!chunkGroup.isInitial()) return false; - } - return true; - } - /** - * @returns {EntryOptions | undefined} the entry options for this chunk - */ - getEntryOptions() { - for (const chunkGroup of this._groups) { - if (chunkGroup instanceof Entrypoint) { - return chunkGroup.options; - } - } - return undefined; - } +/***/ }), - /** - * @param {ChunkGroup} chunkGroup the chunkGroup the chunk is being added - * @returns {void} - */ - addGroup(chunkGroup) { - this._groups.add(chunkGroup); - } +/***/ 29149: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - /** - * @param {ChunkGroup} chunkGroup the chunkGroup the chunk is being removed from - * @returns {void} - */ - removeGroup(chunkGroup) { - this._groups.delete(chunkGroup); - } +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ - /** - * @param {ChunkGroup} chunkGroup the chunkGroup to check - * @returns {boolean} returns true if chunk has chunkGroup reference and exists in chunkGroup - */ - isInGroup(chunkGroup) { - return this._groups.has(chunkGroup); - } - /** - * @returns {number} the amount of groups that the said chunk is in - */ - getNumberOfGroups() { - return this._groups.size; - } +const getWatcherManager = __webpack_require__(56001); +const LinkResolver = __webpack_require__(30417); +const EventEmitter = __webpack_require__(28614).EventEmitter; +const globToRegExp = __webpack_require__(22797); +const watchEventSource = __webpack_require__(72511); - /** - * @returns {Iterable} the chunkGroups that the said chunk is referenced in - */ - get groupsIterable() { - this._groups.sort(); - return this._groups; - } +const EMPTY_ARRAY = []; +const EMPTY_OPTIONS = {}; - /** - * @returns {void} - */ - disconnectFromGroups() { - for (const chunkGroup of this._groups) { - chunkGroup.removeChunk(this); +function addWatchersToSet(watchers, set) { + for (const ww of watchers) { + const w = ww.watcher; + if (!set.has(w.directoryWatcher)) { + set.add(w.directoryWatcher); } } +} - /** - * @param {Chunk} newChunk the new chunk that will be split out of - * @returns {void} - */ - split(newChunk) { - for (const chunkGroup of this._groups) { - chunkGroup.insertChunk(newChunk, this); - newChunk.addGroup(chunkGroup); - } - for (const idHint of this.idNameHints) { - newChunk.idNameHints.add(idHint); - } - newChunk.runtime = mergeRuntime(newChunk.runtime, this.runtime); - } +const stringToRegexp = ignored => { + const source = globToRegExp(ignored, { globstar: true, extended: true }) + .source; + const matchingStart = source.slice(0, source.length - 1) + "(?:$|\\/)"; + return matchingStart; +}; - /** - * @param {Hash} hash hash (will be modified) - * @param {ChunkGraph} chunkGraph the chunk graph - * @returns {void} - */ - updateHash(hash, chunkGraph) { - hash.update( - `${this.id} ${this.ids ? this.ids.join() : ""} ${this.name || ""} ` - ); - const xor = new StringXor(); - for (const m of chunkGraph.getChunkModulesIterable(this)) { - xor.add(chunkGraph.getModuleHash(m, this.runtime)); - } - xor.updateHash(hash); - const entryModules = - chunkGraph.getChunkEntryModulesWithChunkGroupIterable(this); - for (const [m, chunkGroup] of entryModules) { - hash.update(`entry${chunkGraph.getModuleId(m)}${chunkGroup.id}`); - } +const ignoredToFunction = ignored => { + if (Array.isArray(ignored)) { + const regexp = new RegExp(ignored.map(i => stringToRegexp(i)).join("|")); + return x => regexp.test(x.replace(/\\/g, "/")); + } else if (typeof ignored === "string") { + const regexp = new RegExp(stringToRegexp(ignored)); + return x => regexp.test(x.replace(/\\/g, "/")); + } else if (ignored instanceof RegExp) { + return x => ignored.test(x.replace(/\\/g, "/")); + } else if (ignored instanceof Function) { + return ignored; + } else if (ignored) { + throw new Error(`Invalid option for 'ignored': ${ignored}`); + } else { + return () => false; } +}; - /** - * @returns {Set} a set of all the async chunks - */ - getAllAsyncChunks() { - const queue = new Set(); - const chunks = new Set(); - - const initialChunks = intersect( - Array.from(this.groupsIterable, g => new Set(g.chunks)) - ); +const normalizeOptions = options => { + return { + followSymlinks: !!options.followSymlinks, + ignored: ignoredToFunction(options.ignored), + poll: options.poll + }; +}; - const initialQueue = new Set(this.groupsIterable); +const normalizeCache = new WeakMap(); +const cachedNormalizeOptions = options => { + const cacheEntry = normalizeCache.get(options); + if (cacheEntry !== undefined) return cacheEntry; + const normalized = normalizeOptions(options); + normalizeCache.set(options, normalized); + return normalized; +}; - for (const chunkGroup of initialQueue) { - for (const child of chunkGroup.childrenIterable) { - if (child instanceof Entrypoint) { - initialQueue.add(child); - } else { - queue.add(child); - } +class WatchpackFileWatcher { + constructor(watchpack, watcher, files) { + this.files = Array.isArray(files) ? files : [files]; + this.watcher = watcher; + watcher.on("initial-missing", type => { + for (const file of this.files) { + if (!watchpack._missing.has(file)) + watchpack._onRemove(file, file, type); } - } - - for (const chunkGroup of queue) { - for (const chunk of chunkGroup.chunks) { - if (!initialChunks.has(chunk)) { - chunks.add(chunk); - } + }); + watcher.on("change", (mtime, type) => { + for (const file of this.files) { + watchpack._onChange(file, mtime, file, type); } - for (const child of chunkGroup.childrenIterable) { - queue.add(child); + }); + watcher.on("remove", type => { + for (const file of this.files) { + watchpack._onRemove(file, file, type); } - } - - return chunks; + }); } - /** - * @returns {Set} a set of all the initial chunks (including itself) - */ - getAllInitialChunks() { - const chunks = new Set(); - const queue = new Set(this.groupsIterable); - for (const group of queue) { - if (group.isInitial()) { - for (const c of group.chunks) chunks.add(c); - for (const g of group.childrenIterable) queue.add(g); + update(files) { + if (!Array.isArray(files)) { + if (this.files.length !== 1) { + this.files = [files]; + } else if (this.files[0] !== files) { + this.files[0] = files; } + } else { + this.files = files; } - return chunks; } - /** - * @returns {Set} a set of all the referenced chunks (including itself) - */ - getAllReferencedChunks() { - const queue = new Set(this.groupsIterable); - const chunks = new Set(); + close() { + this.watcher.close(); + } +} - for (const chunkGroup of queue) { - for (const chunk of chunkGroup.chunks) { - chunks.add(chunk); +class WatchpackDirectoryWatcher { + constructor(watchpack, watcher, directories) { + this.directories = Array.isArray(directories) ? directories : [directories]; + this.watcher = watcher; + watcher.on("initial-missing", type => { + for (const item of this.directories) { + watchpack._onRemove(item, item, type); } - for (const child of chunkGroup.childrenIterable) { - queue.add(child); + }); + watcher.on("change", (file, mtime, type) => { + for (const item of this.directories) { + watchpack._onChange(item, mtime, file, type); } - } - - return chunks; + }); + watcher.on("remove", type => { + for (const item of this.directories) { + watchpack._onRemove(item, item, type); + } + }); } - /** - * @returns {Set} a set of all the referenced entrypoints - */ - getAllReferencedAsyncEntrypoints() { - const queue = new Set(this.groupsIterable); - const entrypoints = new Set(); - - for (const chunkGroup of queue) { - for (const entrypoint of chunkGroup.asyncEntrypointsIterable) { - entrypoints.add(entrypoint); - } - for (const child of chunkGroup.childrenIterable) { - queue.add(child); + update(directories) { + if (!Array.isArray(directories)) { + if (this.directories.length !== 1) { + this.directories = [directories]; + } else if (this.directories[0] !== directories) { + this.directories[0] = directories; } + } else { + this.directories = directories; } - - return entrypoints; } - /** - * @returns {boolean} true, if the chunk references async chunks - */ - hasAsyncChunks() { - const queue = new Set(); + close() { + this.watcher.close(); + } +} - const initialChunks = intersect( - Array.from(this.groupsIterable, g => new Set(g.chunks)) - ); +class Watchpack extends EventEmitter { + constructor(options) { + super(); + if (!options) options = EMPTY_OPTIONS; + this.options = options; + this.aggregateTimeout = + typeof options.aggregateTimeout === "number" + ? options.aggregateTimeout + : 200; + this.watcherOptions = cachedNormalizeOptions(options); + this.watcherManager = getWatcherManager(this.watcherOptions); + this.fileWatchers = new Map(); + this.directoryWatchers = new Map(); + this._missing = new Set(); + this.startTime = undefined; + this.paused = false; + this.aggregatedChanges = new Set(); + this.aggregatedRemovals = new Set(); + this.aggregateTimer = undefined; + this._onTimeout = this._onTimeout.bind(this); + } - for (const chunkGroup of this.groupsIterable) { - for (const child of chunkGroup.childrenIterable) { - queue.add(child); - } + watch(arg1, arg2, arg3) { + let files, directories, missing, startTime; + if (!arg2) { + ({ + files = EMPTY_ARRAY, + directories = EMPTY_ARRAY, + missing = EMPTY_ARRAY, + startTime + } = arg1); + } else { + files = arg1; + directories = arg2; + missing = EMPTY_ARRAY; + startTime = arg3; } - - for (const chunkGroup of queue) { - for (const chunk of chunkGroup.chunks) { - if (!initialChunks.has(chunk)) { - return true; + this.paused = false; + const fileWatchers = this.fileWatchers; + const directoryWatchers = this.directoryWatchers; + const ignored = this.watcherOptions.ignored; + const filter = path => !ignored(path); + const addToMap = (map, key, item) => { + const list = map.get(key); + if (list === undefined) { + map.set(key, item); + } else if (Array.isArray(list)) { + list.push(item); + } else { + map.set(key, [list, item]); + } + }; + const fileWatchersNeeded = new Map(); + const directoryWatchersNeeded = new Map(); + const missingFiles = new Set(); + if (this.watcherOptions.followSymlinks) { + const resolver = new LinkResolver(); + for (const file of files) { + if (filter(file)) { + for (const innerFile of resolver.resolve(file)) { + if (file === innerFile || filter(innerFile)) { + addToMap(fileWatchersNeeded, innerFile, file); + } + } } } - for (const child of chunkGroup.childrenIterable) { - queue.add(child); + for (const file of missing) { + if (filter(file)) { + for (const innerFile of resolver.resolve(file)) { + if (file === innerFile || filter(innerFile)) { + missingFiles.add(file); + addToMap(fileWatchersNeeded, innerFile, file); + } + } + } } - } - - return false; - } - - /** - * @param {ChunkGraph} chunkGraph the chunk graph - * @param {ChunkFilterPredicate=} filterFn function used to filter chunks - * @returns {Record} a record object of names to lists of child ids(?) - */ - getChildIdsByOrders(chunkGraph, filterFn) { - /** @type {Map} */ - const lists = new Map(); - for (const group of this.groupsIterable) { - if (group.chunks[group.chunks.length - 1] === this) { - for (const childGroup of group.childrenIterable) { - for (const key of Object.keys(childGroup.options)) { - if (key.endsWith("Order")) { - const name = key.substr(0, key.length - "Order".length); - let list = lists.get(name); - if (list === undefined) { - list = []; - lists.set(name, list); - } - list.push({ - order: childGroup.options[key], - group: childGroup - }); + for (const dir of directories) { + if (filter(dir)) { + let first = true; + for (const innerItem of resolver.resolve(dir)) { + if (filter(innerItem)) { + addToMap( + first ? directoryWatchersNeeded : fileWatchersNeeded, + innerItem, + dir + ); } + first = false; } } } - } - /** @type {Record} */ - const result = Object.create(null); - for (const [name, list] of lists) { - list.sort((a, b) => { - const cmp = b.order - a.order; - if (cmp !== 0) return cmp; - return a.group.compareTo(chunkGraph, b.group); - }); - /** @type {Set} */ - const chunkIdSet = new Set(); - for (const item of list) { - for (const chunk of item.group.chunks) { - if (filterFn && !filterFn(chunk, chunkGraph)) continue; - chunkIdSet.add(chunk.id); + } else { + for (const file of files) { + if (filter(file)) { + addToMap(fileWatchersNeeded, file, file); } } - if (chunkIdSet.size > 0) { - result[name] = Array.from(chunkIdSet); + for (const file of missing) { + if (filter(file)) { + missingFiles.add(file); + addToMap(fileWatchersNeeded, file, file); + } + } + for (const dir of directories) { + if (filter(dir)) { + addToMap(directoryWatchersNeeded, dir, dir); + } } } - return result; - } - - /** - * @param {ChunkGraph} chunkGraph the chunk graph - * @param {string} type option name - * @returns {{ onChunks: Chunk[], chunks: Set }[]} referenced chunks for a specific type - */ - getChildrenOfTypeInOrder(chunkGraph, type) { - const list = []; - for (const group of this.groupsIterable) { - for (const childGroup of group.childrenIterable) { - const order = childGroup.options[type]; - if (order === undefined) continue; - list.push({ - order, - group, - childGroup - }); + // Close unneeded old watchers + // and update existing watchers + for (const [key, w] of fileWatchers) { + const needed = fileWatchersNeeded.get(key); + if (needed === undefined) { + w.close(); + fileWatchers.delete(key); + } else { + w.update(needed); + fileWatchersNeeded.delete(key); } } - if (list.length === 0) return undefined; - list.sort((a, b) => { - const cmp = b.order - a.order; - if (cmp !== 0) return cmp; - return a.group.compareTo(chunkGraph, b.group); - }); - const result = []; - let lastEntry; - for (const { group, childGroup } of list) { - if (lastEntry && lastEntry.onChunks === group.chunks) { - for (const chunk of childGroup.chunks) { - lastEntry.chunks.add(chunk); - } + for (const [key, w] of directoryWatchers) { + const needed = directoryWatchersNeeded.get(key); + if (needed === undefined) { + w.close(); + directoryWatchers.delete(key); } else { - result.push( - (lastEntry = { - onChunks: group.chunks, - chunks: new Set(childGroup.chunks) - }) - ); + w.update(needed); + directoryWatchersNeeded.delete(key); } } - return result; - } - - /** - * @param {ChunkGraph} chunkGraph the chunk graph - * @param {boolean=} includeDirectChildren include direct children (by default only children of async children are included) - * @param {ChunkFilterPredicate=} filterFn function used to filter chunks - * @returns {Record>} a record object of names to lists of child ids(?) by chunk id - */ - getChildIdsByOrdersMap(chunkGraph, includeDirectChildren, filterFn) { - /** @type {Record>} */ - const chunkMaps = Object.create(null); - - /** - * @param {Chunk} chunk a chunk - * @returns {void} - */ - const addChildIdsByOrdersToMap = chunk => { - const data = chunk.getChildIdsByOrders(chunkGraph, filterFn); - for (const key of Object.keys(data)) { - let chunkMap = chunkMaps[key]; - if (chunkMap === undefined) { - chunkMaps[key] = chunkMap = Object.create(null); + // Create new watchers and install handlers on these watchers + watchEventSource.batch(() => { + for (const [key, files] of fileWatchersNeeded) { + const watcher = this.watcherManager.watchFile(key, startTime); + if (watcher) { + fileWatchers.set(key, new WatchpackFileWatcher(this, watcher, files)); } - chunkMap[chunk.id] = data[key]; } - }; - - if (includeDirectChildren) { - /** @type {Set} */ - const chunks = new Set(); - for (const chunkGroup of this.groupsIterable) { - for (const chunk of chunkGroup.chunks) { - chunks.add(chunk); + for (const [key, directories] of directoryWatchersNeeded) { + const watcher = this.watcherManager.watchDirectory(key, startTime); + if (watcher) { + directoryWatchers.set( + key, + new WatchpackDirectoryWatcher(this, watcher, directories) + ); } } - for (const chunk of chunks) { - addChildIdsByOrdersToMap(chunk); - } + }); + this._missing = missingFiles; + this.startTime = startTime; + } + + close() { + this.paused = true; + if (this.aggregateTimer) clearTimeout(this.aggregateTimer); + for (const w of this.fileWatchers.values()) w.close(); + for (const w of this.directoryWatchers.values()) w.close(); + this.fileWatchers.clear(); + this.directoryWatchers.clear(); + } + + pause() { + this.paused = true; + if (this.aggregateTimer) clearTimeout(this.aggregateTimer); + } + + getTimes() { + const directoryWatchers = new Set(); + addWatchersToSet(this.fileWatchers.values(), directoryWatchers); + addWatchersToSet(this.directoryWatchers.values(), directoryWatchers); + const obj = Object.create(null); + for (const w of directoryWatchers) { + const times = w.getTimes(); + for (const file of Object.keys(times)) obj[file] = times[file]; } + return obj; + } - for (const chunk of this.getAllAsyncChunks()) { - addChildIdsByOrdersToMap(chunk); + getTimeInfoEntries() { + const map = new Map(); + this.collectTimeInfoEntries(map, map); + return map; + } + + collectTimeInfoEntries(fileTimestamps, directoryTimestamps) { + const allWatchers = new Set(); + addWatchersToSet(this.fileWatchers.values(), allWatchers); + addWatchersToSet(this.directoryWatchers.values(), allWatchers); + const safeTime = { value: 0 }; + for (const w of allWatchers) { + w.collectTimeInfoEntries(fileTimestamps, directoryTimestamps, safeTime); } + } - return chunkMaps; + getAggregated() { + if (this.aggregateTimer) { + clearTimeout(this.aggregateTimer); + this.aggregateTimer = undefined; + } + const changes = this.aggregatedChanges; + const removals = this.aggregatedRemovals; + this.aggregatedChanges = new Set(); + this.aggregatedRemovals = new Set(); + return { changes, removals }; + } + + _onChange(item, mtime, file, type) { + file = file || item; + if (!this.paused) { + this.emit("change", file, mtime, type); + if (this.aggregateTimer) clearTimeout(this.aggregateTimer); + this.aggregateTimer = setTimeout(this._onTimeout, this.aggregateTimeout); + } + this.aggregatedRemovals.delete(item); + this.aggregatedChanges.add(item); + } + + _onRemove(item, file, type) { + file = file || item; + if (!this.paused) { + this.emit("remove", file, type); + if (this.aggregateTimer) clearTimeout(this.aggregateTimer); + this.aggregateTimer = setTimeout(this._onTimeout, this.aggregateTimeout); + } + this.aggregatedChanges.delete(item); + this.aggregatedRemovals.add(item); + } + + _onTimeout() { + this.aggregateTimer = undefined; + const changes = this.aggregatedChanges; + const removals = this.aggregatedRemovals; + this.aggregatedChanges = new Set(); + this.aggregatedRemovals = new Set(); + this.emit("aggregated", changes, removals); } } -module.exports = Chunk; +module.exports = Watchpack; /***/ }), -/***/ 97860: +/***/ 46806: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; @@ -24710,2236 +24488,1949 @@ module.exports = Chunk; -const util = __webpack_require__(31669); -const Entrypoint = __webpack_require__(86695); -const ModuleGraphConnection = __webpack_require__(94144); -const { first } = __webpack_require__(34715); -const SortableSet = __webpack_require__(67563); -const { - compareModulesById, - compareIterables, - compareModulesByIdentifier, - concatComparators, - compareSelect, - compareIds -} = __webpack_require__(26296); -const createHash = __webpack_require__(24123); -const findGraphRoots = __webpack_require__(38670); +const RuntimeGlobals = __webpack_require__(49404); +const WebpackError = __webpack_require__(68422); +const ConstDependency = __webpack_require__(60864); +const BasicEvaluatedExpression = __webpack_require__(2412); const { - RuntimeSpecMap, - RuntimeSpecSet, - runtimeToString, - mergeRuntime, - forEachRuntime -} = __webpack_require__(19655); + toConstantDependency, + evaluateToString +} = __webpack_require__(28723); +const ChunkNameRuntimeModule = __webpack_require__(43818); +const GetFullHashRuntimeModule = __webpack_require__(28454); -/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ -/** @typedef {import("./Chunk")} Chunk */ -/** @typedef {import("./ChunkGroup")} ChunkGroup */ -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./ModuleGraph")} ModuleGraph */ -/** @typedef {import("./RuntimeModule")} RuntimeModule */ -/** @typedef {typeof import("./util/Hash")} Hash */ -/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./javascript/JavascriptParser")} JavascriptParser */ -/** @type {ReadonlySet} */ -const EMPTY_SET = new Set(); +/* eslint-disable camelcase */ +const REPLACEMENTS = { + __webpack_require__: { + expr: RuntimeGlobals.require, + req: [RuntimeGlobals.require], + type: "function", + assign: false + }, + __webpack_public_path__: { + expr: RuntimeGlobals.publicPath, + req: [RuntimeGlobals.publicPath], + type: "string", + assign: true + }, + __webpack_base_uri__: { + expr: RuntimeGlobals.baseURI, + req: [RuntimeGlobals.baseURI], + type: "string", + assign: true + }, + __webpack_modules__: { + expr: RuntimeGlobals.moduleFactories, + req: [RuntimeGlobals.moduleFactories], + type: "object", + assign: false + }, + __webpack_chunk_load__: { + expr: RuntimeGlobals.ensureChunk, + req: [RuntimeGlobals.ensureChunk], + type: "function", + assign: true + }, + __non_webpack_require__: { + expr: "require", + req: null, + type: undefined, // type is not known, depends on environment + assign: true + }, + __webpack_nonce__: { + expr: RuntimeGlobals.scriptNonce, + req: [RuntimeGlobals.scriptNonce], + type: "string", + assign: true + }, + __webpack_hash__: { + expr: `${RuntimeGlobals.getFullHash}()`, + req: [RuntimeGlobals.getFullHash], + type: "string", + assign: false + }, + __webpack_chunkname__: { + expr: RuntimeGlobals.chunkName, + req: [RuntimeGlobals.chunkName], + type: "string", + assign: false + }, + __webpack_get_script_filename__: { + expr: RuntimeGlobals.getChunkScriptFilename, + req: [RuntimeGlobals.getChunkScriptFilename], + type: "function", + assign: true + }, + __webpack_runtime_id__: { + expr: RuntimeGlobals.runtimeId, + req: [RuntimeGlobals.runtimeId], + assign: false + }, + "require.onError": { + expr: RuntimeGlobals.uncaughtErrorHandler, + req: [RuntimeGlobals.uncaughtErrorHandler], + type: undefined, // type is not known, could be function or undefined + assign: true // is never a pattern + }, + __system_context__: { + expr: RuntimeGlobals.systemContext, + req: [RuntimeGlobals.systemContext], + type: "object", + assign: false + }, + __webpack_share_scopes__: { + expr: RuntimeGlobals.shareScopeMap, + req: [RuntimeGlobals.shareScopeMap], + type: "object", + assign: false + }, + __webpack_init_sharing__: { + expr: RuntimeGlobals.initializeSharing, + req: [RuntimeGlobals.initializeSharing], + type: "function", + assign: true + } +}; +/* eslint-enable camelcase */ -const ZERO_BIG_INT = BigInt(0); +class APIPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "APIPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyTemplates.set( + ConstDependency, + new ConstDependency.Template() + ); -const compareModuleIterables = compareIterables(compareModulesByIdentifier); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.chunkName) + .tap("APIPlugin", chunk => { + compilation.addRuntimeModule( + chunk, + new ChunkNameRuntimeModule(chunk.name) + ); + return true; + }); -/** @typedef {(c: Chunk, chunkGraph: ChunkGraph) => boolean} ChunkFilterPredicate */ -/** @typedef {(m: Module) => boolean} ModuleFilterPredicate */ + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.getFullHash) + .tap("APIPlugin", (chunk, set) => { + compilation.addRuntimeModule(chunk, new GetFullHashRuntimeModule()); + return true; + }); -/** - * @typedef {Object} ChunkSizeOptions - * @property {number=} chunkOverhead constant overhead for a chunk - * @property {number=} entryChunkMultiplicator multiplicator for initial chunks - */ + /** + * @param {JavascriptParser} parser the parser + */ + const handler = parser => { + Object.keys(REPLACEMENTS).forEach(key => { + const info = REPLACEMENTS[key]; + parser.hooks.expression + .for(key) + .tap( + "APIPlugin", + toConstantDependency(parser, info.expr, info.req) + ); + if (info.assign === false) { + parser.hooks.assign.for(key).tap("APIPlugin", expr => { + const err = new WebpackError(`${key} must not be assigned`); + err.loc = expr.loc; + throw err; + }); + } + if (info.type) { + parser.hooks.evaluateTypeof + .for(key) + .tap("APIPlugin", evaluateToString(info.type)); + } + }); -class ModuleHashInfo { - constructor(hash, renderedHash) { - this.hash = hash; - this.renderedHash = renderedHash; + parser.hooks.expression + .for("__webpack_layer__") + .tap("APIPlugin", expr => { + const dep = new ConstDependency( + JSON.stringify(parser.state.module.layer), + expr.range + ); + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + return true; + }); + parser.hooks.evaluateIdentifier + .for("__webpack_layer__") + .tap("APIPlugin", expr => + (parser.state.module.layer === null + ? new BasicEvaluatedExpression().setNull() + : new BasicEvaluatedExpression().setString( + parser.state.module.layer + ) + ).setRange(expr.range) + ); + parser.hooks.evaluateTypeof + .for("__webpack_layer__") + .tap("APIPlugin", expr => + new BasicEvaluatedExpression() + .setString( + parser.state.module.layer === null ? "object" : "string" + ) + .setRange(expr.range) + ); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("APIPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("APIPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/esm") + .tap("APIPlugin", handler); + } + ); } } -/** @template T @typedef {(set: SortableSet) => T[]} SetToArrayFunction */ +module.exports = APIPlugin; -/** - * @template T - * @param {SortableSet} set the set - * @returns {T[]} set as array - */ -const getArray = set => { - return Array.from(set); -}; -/** - * @param {SortableSet} chunks the chunks - * @returns {RuntimeSpecSet} runtimes - */ -const getModuleRuntimes = chunks => { - const runtimes = new RuntimeSpecSet(); - for (const chunk of chunks) { - runtimes.add(chunk.runtime); - } - return runtimes; -}; +/***/ }), -/** - * @param {SortableSet} set the set - * @returns {Map>} modules by source type - */ -const modulesBySourceType = set => { - /** @type {Map>} */ - const map = new Map(); - for (const module of set) { - for (const sourceType of module.getSourceTypes()) { - let innerSet = map.get(sourceType); - if (innerSet === undefined) { - innerSet = new SortableSet(); - map.set(sourceType, innerSet); - } - innerSet.add(module); - } - } - for (const [key, innerSet] of map) { - // When all modules have the source type, we reuse the original SortableSet - // to benefit from the shared cache (especially for sorting) - if (innerSet.size === set.size) { - map.set(key, set); - } - } - return map; -}; +/***/ 570: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { -/** @type {WeakMap} */ -const createOrderedArrayFunctionMap = new WeakMap(); +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Ivan Kopeykin @vankop +*/ -/** - * @template T - * @param {function(T, T): -1|0|1} comparator comparator function - * @returns {SetToArrayFunction} set as ordered array - */ -const createOrderedArrayFunction = comparator => { - /** @type {SetToArrayFunction} */ - let fn = createOrderedArrayFunctionMap.get(comparator); - if (fn !== undefined) return fn; - fn = set => { - set.sortWith(comparator); - return Array.from(set); - }; - createOrderedArrayFunctionMap.set(comparator, fn); - return fn; -}; -/** - * @param {Iterable} modules the modules to get the count/size of - * @returns {number} the size of the modules - */ -const getModulesSize = modules => { - let size = 0; - for (const module of modules) { - for (const type of module.getSourceTypes()) { - size += module.size(type); - } - } - return size; -}; + +const WebpackError = __webpack_require__(68422); +const CURRENT_METHOD_REGEXP = /at ([a-zA-Z0-9_.]*)/; /** - * @param {Iterable} modules the sortable Set to get the size of - * @returns {Record} the sizes of the modules + * @param {string=} method method name + * @returns {string} message */ -const getModulesSizes = modules => { - let sizes = Object.create(null); - for (const module of modules) { - for (const type of module.getSourceTypes()) { - sizes[type] = (sizes[type] || 0) + module.size(type); - } - } - return sizes; -}; +function createMessage(method) { + return `Abstract method${method ? " " + method : ""}. Must be overridden.`; +} /** - * @param {Chunk} a chunk - * @param {Chunk} b chunk - * @returns {boolean} true, if a is always a parent of b + * @constructor */ -const isAvailableChunk = (a, b) => { - const queue = new Set(b.groupsIterable); - for (const chunkGroup of queue) { - if (a.isInGroup(chunkGroup)) continue; - if (chunkGroup.isInitial()) return false; - for (const parent of chunkGroup.parentsIterable) { - queue.add(parent); - } - } - return true; -}; +function Message() { + /** @type {string} */ + this.stack = undefined; + Error.captureStackTrace(this); + /** @type {RegExpMatchArray} */ + const match = this.stack.split("\n")[3].match(CURRENT_METHOD_REGEXP); -class ChunkGraphModule { - constructor() { - /** @type {SortableSet} */ - this.chunks = new SortableSet(); - /** @type {Set | undefined} */ - this.entryInChunks = undefined; - /** @type {Set | undefined} */ - this.runtimeInChunks = undefined; - /** @type {RuntimeSpecMap} */ - this.hashes = undefined; - /** @type {string | number} */ - this.id = null; - /** @type {RuntimeSpecMap> | undefined} */ - this.runtimeRequirements = undefined; - /** @type {RuntimeSpecMap} */ - this.graphHashes = undefined; - /** @type {RuntimeSpecMap} */ - this.graphHashesWithConnections = undefined; - } + this.message = match && match[1] ? createMessage(match[1]) : createMessage(); } -class ChunkGraphChunk { +/** + * Error for abstract method + * @example + * class FooClass { + * abstractMethod() { + * throw new AbstractMethodError(); // error message: Abstract method FooClass.abstractMethod. Must be overridden. + * } + * } + * + */ +class AbstractMethodError extends WebpackError { constructor() { - /** @type {SortableSet} */ - this.modules = new SortableSet(); - /** @type {Map} */ - this.entryModules = new Map(); - /** @type {SortableSet} */ - this.runtimeModules = new SortableSet(); - /** @type {Set | undefined} */ - this.fullHashModules = undefined; - /** @type {Set | undefined} */ - this.dependentHashModules = undefined; - /** @type {Set | undefined} */ - this.runtimeRequirements = undefined; - /** @type {Set} */ - this.runtimeRequirementsInTree = new Set(); + super(new Message().message); + this.name = "AbstractMethodError"; } } -class ChunkGraph { - /** - * @param {ModuleGraph} moduleGraph the module graph - * @param {string | Hash} hashFunction the hash function to use - */ - constructor(moduleGraph, hashFunction = "md4") { - /** @private @type {WeakMap} */ - this._modules = new WeakMap(); - /** @private @type {WeakMap} */ - this._chunks = new WeakMap(); - /** @private @type {WeakMap} */ - this._blockChunkGroups = new WeakMap(); - /** @private @type {Map} */ - this._runtimeIds = new Map(); - /** @type {ModuleGraph} */ - this.moduleGraph = moduleGraph; +module.exports = AbstractMethodError; - this._hashFunction = hashFunction; - this._getGraphRoots = this._getGraphRoots.bind(this); - } +/***/ }), - /** - * @private - * @param {Module} module the module - * @returns {ChunkGraphModule} internal module - */ - _getChunkGraphModule(module) { - let cgm = this._modules.get(module); - if (cgm === undefined) { - cgm = new ChunkGraphModule(); - this._modules.set(module, cgm); - } - return cgm; - } +/***/ 11315: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - /** - * @private - * @param {Chunk} chunk the chunk - * @returns {ChunkGraphChunk} internal chunk - */ - _getChunkGraphChunk(chunk) { - let cgc = this._chunks.get(chunk); - if (cgc === undefined) { - cgc = new ChunkGraphChunk(); - this._chunks.set(chunk, cgc); - } - return cgc; - } +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ - /** - * @param {SortableSet} set the sortable Set to get the roots of - * @returns {Module[]} the graph roots - */ - _getGraphRoots(set) { - const { moduleGraph } = this; - return Array.from( - findGraphRoots(set, module => { - /** @type {Set} */ - const set = new Set(); - const addDependencies = module => { - for (const connection of moduleGraph.getOutgoingConnections(module)) { - if (!connection.module) continue; - const activeState = connection.getActiveState(undefined); - if (activeState === false) continue; - if (activeState === ModuleGraphConnection.TRANSITIVE_ONLY) { - addDependencies(connection.module); - continue; - } - set.add(connection.module); - } - }; - addDependencies(module); - return set; - }) - ).sort(compareModulesByIdentifier); - } + +const DependenciesBlock = __webpack_require__(21484); +const makeSerializable = __webpack_require__(26522); + +/** @typedef {import("./ChunkGraph")} ChunkGraph */ +/** @typedef {import("./ChunkGroup")} ChunkGroup */ +/** @typedef {import("./ChunkGroup").ChunkGroupOptions} ChunkGroupOptions */ +/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ +/** @typedef {import("./Dependency").UpdateHashContext} UpdateHashContext */ +/** @typedef {import("./Entrypoint").EntryOptions} EntryOptions */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./util/Hash")} Hash */ + +class AsyncDependenciesBlock extends DependenciesBlock { /** - * @param {Chunk} chunk the new chunk - * @param {Module} module the module - * @returns {void} + * @param {ChunkGroupOptions & { entryOptions?: EntryOptions }} groupOptions options for the group + * @param {DependencyLocation=} loc the line of code + * @param {string=} request the request */ - connectChunkAndModule(chunk, module) { - const cgm = this._getChunkGraphModule(module); - const cgc = this._getChunkGraphChunk(chunk); - cgm.chunks.add(chunk); - cgc.modules.add(module); + constructor(groupOptions, loc, request) { + super(); + if (typeof groupOptions === "string") { + groupOptions = { name: groupOptions }; + } else if (!groupOptions) { + groupOptions = { name: undefined }; + } + this.groupOptions = groupOptions; + this.loc = loc; + this.request = request; + this._stringifiedGroupOptions = undefined; } /** - * @param {Chunk} chunk the chunk - * @param {Module} module the module - * @returns {void} + * @returns {string} The name of the chunk */ - disconnectChunkAndModule(chunk, module) { - const cgm = this._getChunkGraphModule(module); - const cgc = this._getChunkGraphChunk(chunk); - cgc.modules.delete(module); - cgm.chunks.delete(chunk); + get chunkName() { + return this.groupOptions.name; } /** - * @param {Chunk} chunk the chunk which will be disconnected + * @param {string} value The new chunk name * @returns {void} */ - disconnectChunk(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - for (const module of cgc.modules) { - const cgm = this._getChunkGraphModule(module); - cgm.chunks.delete(chunk); + set chunkName(value) { + if (this.groupOptions.name !== value) { + this.groupOptions.name = value; + this._stringifiedGroupOptions = undefined; } - cgc.modules.clear(); - chunk.disconnectFromGroups(); - ChunkGraph.clearChunkGraphForChunk(chunk); } /** - * @param {Chunk} chunk the chunk - * @param {Iterable} modules the modules + * @param {Hash} hash the hash used to track dependencies + * @param {UpdateHashContext} context context * @returns {void} */ - attachModules(chunk, modules) { - const cgc = this._getChunkGraphChunk(chunk); - for (const module of modules) { - cgc.modules.add(module); + updateHash(hash, context) { + const { chunkGraph } = context; + if (this._stringifiedGroupOptions === undefined) { + this._stringifiedGroupOptions = JSON.stringify(this.groupOptions); } + const chunkGroup = chunkGraph.getBlockChunkGroup(this); + hash.update( + `${this._stringifiedGroupOptions}${chunkGroup ? chunkGroup.id : ""}` + ); + super.updateHash(hash, context); } - /** - * @param {Chunk} chunk the chunk - * @param {Iterable} modules the runtime modules - * @returns {void} - */ - attachRuntimeModules(chunk, modules) { - const cgc = this._getChunkGraphChunk(chunk); - for (const module of modules) { - cgc.runtimeModules.add(module); - } + serialize(context) { + const { write } = context; + write(this.groupOptions); + write(this.loc); + write(this.request); + super.serialize(context); } - /** - * @param {Chunk} chunk the chunk - * @param {Iterable} modules the modules that require a full hash - * @returns {void} - */ - attachFullHashModules(chunk, modules) { - const cgc = this._getChunkGraphChunk(chunk); - if (cgc.fullHashModules === undefined) cgc.fullHashModules = new Set(); - for (const module of modules) { - cgc.fullHashModules.add(module); - } + deserialize(context) { + const { read } = context; + this.groupOptions = read(); + this.loc = read(); + this.request = read(); + super.deserialize(context); } +} - /** - * @param {Chunk} chunk the chunk - * @param {Iterable} modules the modules that require a full hash - * @returns {void} - */ - attachDependentHashModules(chunk, modules) { - const cgc = this._getChunkGraphChunk(chunk); - if (cgc.dependentHashModules === undefined) - cgc.dependentHashModules = new Set(); - for (const module of modules) { - cgc.dependentHashModules.add(module); - } +makeSerializable(AsyncDependenciesBlock, "webpack/lib/AsyncDependenciesBlock"); + +Object.defineProperty(AsyncDependenciesBlock.prototype, "module", { + get() { + throw new Error( + "module property was removed from AsyncDependenciesBlock (it's not needed)" + ); + }, + set() { + throw new Error( + "module property was removed from AsyncDependenciesBlock (it's not needed)" + ); } +}); - /** - * @param {Module} oldModule the replaced module - * @param {Module} newModule the replacing module - * @returns {void} - */ - replaceModule(oldModule, newModule) { - const oldCgm = this._getChunkGraphModule(oldModule); - const newCgm = this._getChunkGraphModule(newModule); +module.exports = AsyncDependenciesBlock; - for (const chunk of oldCgm.chunks) { - const cgc = this._getChunkGraphChunk(chunk); - cgc.modules.delete(oldModule); - cgc.modules.add(newModule); - newCgm.chunks.add(chunk); - } - oldCgm.chunks.clear(); - if (oldCgm.entryInChunks !== undefined) { - if (newCgm.entryInChunks === undefined) { - newCgm.entryInChunks = new Set(); - } - for (const chunk of oldCgm.entryInChunks) { - const cgc = this._getChunkGraphChunk(chunk); - const old = cgc.entryModules.get(oldModule); - /** @type {Map} */ - const newEntryModules = new Map(); - for (const [m, cg] of cgc.entryModules) { - if (m === oldModule) { - newEntryModules.set(newModule, old); - } else { - newEntryModules.set(m, cg); - } - } - cgc.entryModules = newEntryModules; - newCgm.entryInChunks.add(chunk); - } - oldCgm.entryInChunks = undefined; - } +/***/ }), - if (oldCgm.runtimeInChunks !== undefined) { - if (newCgm.runtimeInChunks === undefined) { - newCgm.runtimeInChunks = new Set(); - } - for (const chunk of oldCgm.runtimeInChunks) { - const cgc = this._getChunkGraphChunk(chunk); - cgc.runtimeModules.delete(/** @type {RuntimeModule} */ (oldModule)); - cgc.runtimeModules.add(/** @type {RuntimeModule} */ (newModule)); - newCgm.runtimeInChunks.add(chunk); - if ( - cgc.fullHashModules !== undefined && - cgc.fullHashModules.has(/** @type {RuntimeModule} */ (oldModule)) - ) { - cgc.fullHashModules.delete(/** @type {RuntimeModule} */ (oldModule)); - cgc.fullHashModules.add(/** @type {RuntimeModule} */ (newModule)); - } - if ( - cgc.dependentHashModules !== undefined && - cgc.dependentHashModules.has(/** @type {RuntimeModule} */ (oldModule)) - ) { - cgc.dependentHashModules.delete( - /** @type {RuntimeModule} */ (oldModule) - ); - cgc.dependentHashModules.add( - /** @type {RuntimeModule} */ (newModule) - ); - } - } - oldCgm.runtimeInChunks = undefined; - } - } +/***/ 69073: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - /** - * @param {Module} module the checked module - * @param {Chunk} chunk the checked chunk - * @returns {boolean} true, if the chunk contains the module - */ - isModuleInChunk(module, chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.modules.has(module); - } +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Sean Larkin @thelarkinn +*/ - /** - * @param {Module} module the checked module - * @param {ChunkGroup} chunkGroup the checked chunk group - * @returns {boolean} true, if the chunk contains the module - */ - isModuleInChunkGroup(module, chunkGroup) { - for (const chunk of chunkGroup.chunks) { - if (this.isModuleInChunk(module, chunk)) return true; - } - return false; - } - /** - * @param {Module} module the checked module - * @returns {boolean} true, if the module is entry of any chunk - */ - isEntryModule(module) { - const cgm = this._getChunkGraphModule(module); - return cgm.entryInChunks !== undefined; - } - /** - * @param {Module} module the module - * @returns {Iterable} iterable of chunks (do not modify) - */ - getModuleChunksIterable(module) { - const cgm = this._getChunkGraphModule(module); - return cgm.chunks; - } +const WebpackError = __webpack_require__(68422); - /** - * @param {Module} module the module - * @param {function(Chunk, Chunk): -1|0|1} sortFn sort function - * @returns {Iterable} iterable of chunks (do not modify) - */ - getOrderedModuleChunksIterable(module, sortFn) { - const cgm = this._getChunkGraphModule(module); - cgm.chunks.sortWith(sortFn); - return cgm.chunks; - } +/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ +/** @typedef {import("./Module")} Module */ +class AsyncDependencyToInitialChunkError extends WebpackError { /** - * @param {Module} module the module - * @returns {Chunk[]} array of chunks (cached, do not modify) + * Creates an instance of AsyncDependencyToInitialChunkError. + * @param {string} chunkName Name of Chunk + * @param {Module} module module tied to dependency + * @param {DependencyLocation} loc location of dependency */ - getModuleChunks(module) { - const cgm = this._getChunkGraphModule(module); - return cgm.chunks.getFromCache(getArray); - } + constructor(chunkName, module, loc) { + super( + `It's not allowed to load an initial chunk on demand. The chunk name "${chunkName}" is already used by an entrypoint.` + ); - /** - * @param {Module} module the module - * @returns {number} the number of chunk which contain the module - */ - getNumberOfModuleChunks(module) { - const cgm = this._getChunkGraphModule(module); - return cgm.chunks.size; + this.name = "AsyncDependencyToInitialChunkError"; + this.module = module; + this.loc = loc; } +} - /** - * @param {Module} module the module - * @returns {RuntimeSpecSet} runtimes - */ - getModuleRuntimes(module) { - const cgm = this._getChunkGraphModule(module); - return cgm.chunks.getFromUnorderedCache(getModuleRuntimes); - } +module.exports = AsyncDependencyToInitialChunkError; - /** - * @param {Chunk} chunk the chunk - * @returns {number} the number of modules which are contained in this chunk - */ - getNumberOfChunkModules(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.modules.size; - } - /** - * @param {Chunk} chunk the chunk - * @returns {number} the number of full hash modules which are contained in this chunk - */ - getNumberOfChunkFullHashModules(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.fullHashModules === undefined ? 0 : cgc.fullHashModules.size; - } +/***/ }), - /** - * @param {Chunk} chunk the chunk - * @returns {Iterable} return the modules for this chunk - */ - getChunkModulesIterable(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.modules; - } +/***/ 51714: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - /** - * @param {Chunk} chunk the chunk - * @param {string} sourceType source type - * @returns {Iterable | undefined} return the modules for this chunk - */ - getChunkModulesIterableBySourceType(chunk, sourceType) { - const cgc = this._getChunkGraphChunk(chunk); - const modulesWithSourceType = cgc.modules - .getFromUnorderedCache(modulesBySourceType) - .get(sourceType); - return modulesWithSourceType; - } +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ - /** - * @param {Chunk} chunk the chunk - * @param {function(Module, Module): -1|0|1} comparator comparator function - * @returns {Iterable} return the modules for this chunk - */ - getOrderedChunkModulesIterable(chunk, comparator) { - const cgc = this._getChunkGraphChunk(chunk); - cgc.modules.sortWith(comparator); - return cgc.modules; - } - /** - * @param {Chunk} chunk the chunk - * @param {string} sourceType source type - * @param {function(Module, Module): -1|0|1} comparator comparator function - * @returns {Iterable | undefined} return the modules for this chunk - */ - getOrderedChunkModulesIterableBySourceType(chunk, sourceType, comparator) { - const cgc = this._getChunkGraphChunk(chunk); - const modulesWithSourceType = cgc.modules - .getFromUnorderedCache(modulesBySourceType) - .get(sourceType); - if (modulesWithSourceType === undefined) return undefined; - modulesWithSourceType.sortWith(comparator); - return modulesWithSourceType; - } - /** - * @param {Chunk} chunk the chunk - * @returns {Module[]} return the modules for this chunk (cached, do not modify) - */ - getChunkModules(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.modules.getFromUnorderedCache(getArray); - } +const asyncLib = __webpack_require__(36386); +const NormalModule = __webpack_require__(11026); +const PrefetchDependency = __webpack_require__(39986); - /** - * @param {Chunk} chunk the chunk - * @param {function(Module, Module): -1|0|1} comparator comparator function - * @returns {Module[]} return the modules for this chunk (cached, do not modify) - */ - getOrderedChunkModules(chunk, comparator) { - const cgc = this._getChunkGraphChunk(chunk); - const arrayFunction = createOrderedArrayFunction(comparator); - return cgc.modules.getFromUnorderedCache(arrayFunction); - } +/** @typedef {import("./Compiler")} Compiler */ +class AutomaticPrefetchPlugin { /** - * @param {Chunk} chunk the chunk - * @param {ModuleFilterPredicate} filterFn function used to filter modules - * @param {boolean} includeAllChunks all chunks or only async chunks - * @returns {Record} chunk to module ids object + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} */ - getChunkModuleIdMap(chunk, filterFn, includeAllChunks = false) { - /** @type {Record} */ - const chunkModuleIdMap = Object.create(null); + apply(compiler) { + compiler.hooks.compilation.tap( + "AutomaticPrefetchPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set( + PrefetchDependency, + normalModuleFactory + ); + } + ); + let lastModules = null; + compiler.hooks.afterCompile.tap("AutomaticPrefetchPlugin", compilation => { + lastModules = []; - for (const asyncChunk of includeAllChunks - ? chunk.getAllReferencedChunks() - : chunk.getAllAsyncChunks()) { - /** @type {(string|number)[]} */ - let array; - for (const module of this.getOrderedChunkModulesIterable( - asyncChunk, - compareModulesById(this) - )) { - if (filterFn(module)) { - if (array === undefined) { - array = []; - chunkModuleIdMap[asyncChunk.id] = array; - } - const moduleId = this.getModuleId(module); - array.push(moduleId); + for (const m of compilation.modules) { + if (m instanceof NormalModule) { + lastModules.push({ + context: m.context, + request: m.request + }); } } - } - - return chunkModuleIdMap; + }); + compiler.hooks.make.tapAsync( + "AutomaticPrefetchPlugin", + (compilation, callback) => { + if (!lastModules) return callback(); + asyncLib.forEach( + lastModules, + (m, callback) => { + compilation.addModuleChain( + m.context || compiler.context, + new PrefetchDependency(`!!${m.request}`), + callback + ); + }, + err => { + lastModules = null; + callback(err); + } + ); + } + ); } +} +module.exports = AutomaticPrefetchPlugin; - /** - * @param {Chunk} chunk the chunk - * @param {ModuleFilterPredicate} filterFn function used to filter modules - * @param {number} hashLength length of the hash - * @param {boolean} includeAllChunks all chunks or only async chunks - * @returns {Record>} chunk to module id to module hash object - */ - getChunkModuleRenderedHashMap( - chunk, - filterFn, - hashLength = 0, - includeAllChunks = false - ) { - /** @type {Record>} */ - const chunkModuleHashMap = Object.create(null); - for (const asyncChunk of includeAllChunks - ? chunk.getAllReferencedChunks() - : chunk.getAllAsyncChunks()) { - /** @type {Record} */ - let idToHashMap; - for (const module of this.getOrderedChunkModulesIterable( - asyncChunk, - compareModulesById(this) - )) { - if (filterFn(module)) { - if (idToHashMap === undefined) { - idToHashMap = Object.create(null); - chunkModuleHashMap[asyncChunk.id] = idToHashMap; - } - const moduleId = this.getModuleId(module); - const hash = this.getRenderedModuleHash(module, asyncChunk.runtime); - idToHashMap[moduleId] = hashLength ? hash.slice(0, hashLength) : hash; - } - } - } +/***/ }), - return chunkModuleHashMap; +/***/ 45480: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { ConcatSource } = __webpack_require__(96192); +const Compilation = __webpack_require__(59622); +const ModuleFilenameHelpers = __webpack_require__(80295); +const Template = __webpack_require__(92066); +const createSchemaValidation = __webpack_require__(77695); + +/** @typedef {import("../declarations/plugins/BannerPlugin").BannerPluginArgument} BannerPluginArgument */ +/** @typedef {import("../declarations/plugins/BannerPlugin").BannerPluginOptions} BannerPluginOptions */ +/** @typedef {import("./Compiler")} Compiler */ + +const validate = createSchemaValidation( + __webpack_require__(79456), + () => __webpack_require__(33946), + { + name: "Banner Plugin", + baseDataPath: "options" + } +); + +const wrapComment = str => { + if (!str.includes("\n")) { + return Template.toComment(str); } + return `/*!\n * ${str + .replace(/\*\//g, "* /") + .split("\n") + .join("\n * ") + .replace(/\s+\n/g, "\n") + .trimRight()}\n */`; +}; +class BannerPlugin { /** - * @param {Chunk} chunk the chunk - * @param {ChunkFilterPredicate} filterFn function used to filter chunks - * @returns {Record} chunk map + * @param {BannerPluginArgument} options options object */ - getChunkConditionMap(chunk, filterFn) { - const map = Object.create(null); - for (const c of chunk.getAllReferencedChunks()) { - map[c.id] = filterFn(c, this); + constructor(options) { + if (typeof options === "string" || typeof options === "function") { + options = { + banner: options + }; + } + + validate(options); + + this.options = options; + + const bannerOption = options.banner; + if (typeof bannerOption === "function") { + const getBanner = bannerOption; + this.banner = this.options.raw + ? getBanner + : data => wrapComment(getBanner(data)); + } else { + const banner = this.options.raw + ? bannerOption + : wrapComment(bannerOption); + this.banner = () => banner; } - return map; } /** - * @param {Chunk} chunk the chunk - * @param {ModuleFilterPredicate} filterFn predicate function used to filter modules - * @param {ChunkFilterPredicate=} filterChunkFn predicate function used to filter chunks - * @returns {boolean} return true if module exists in graph + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} */ - hasModuleInGraph(chunk, filterFn, filterChunkFn) { - const queue = new Set(chunk.groupsIterable); - const chunksProcessed = new Set(); + apply(compiler) { + const options = this.options; + const banner = this.banner; + const matchObject = ModuleFilenameHelpers.matchObject.bind( + undefined, + options + ); - for (const chunkGroup of queue) { - for (const innerChunk of chunkGroup.chunks) { - if (!chunksProcessed.has(innerChunk)) { - chunksProcessed.add(innerChunk); - if (!filterChunkFn || filterChunkFn(innerChunk, this)) { - for (const module of this.getChunkModulesIterable(innerChunk)) { - if (filterFn(module)) { - return true; + compiler.hooks.compilation.tap("BannerPlugin", compilation => { + compilation.hooks.processAssets.tap( + { + name: "BannerPlugin", + stage: Compilation.PROCESS_ASSETS_STAGE_ADDITIONS + }, + () => { + for (const chunk of compilation.chunks) { + if (options.entryOnly && !chunk.canBeInitial()) { + continue; + } + + for (const file of chunk.files) { + if (!matchObject(file)) { + continue; } + + const data = { + chunk, + filename: file + }; + + const comment = compilation.getPath(banner, data); + + compilation.updateAsset( + file, + old => new ConcatSource(comment, "\n", old) + ); } } } - } - for (const child of chunkGroup.childrenIterable) { - queue.add(child); - } - } - return false; - } - - /** - * @param {Chunk} chunkA first chunk - * @param {Chunk} chunkB second chunk - * @returns {-1|0|1} this is a comparator function like sort and returns -1, 0, or 1 based on sort order - */ - compareChunks(chunkA, chunkB) { - const cgcA = this._getChunkGraphChunk(chunkA); - const cgcB = this._getChunkGraphChunk(chunkB); - if (cgcA.modules.size > cgcB.modules.size) return -1; - if (cgcA.modules.size < cgcB.modules.size) return 1; - cgcA.modules.sortWith(compareModulesByIdentifier); - cgcB.modules.sortWith(compareModulesByIdentifier); - return compareModuleIterables(cgcA.modules, cgcB.modules); - } - - /** - * @param {Chunk} chunk the chunk - * @returns {number} total size of all modules in the chunk - */ - getChunkModulesSize(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.modules.getFromUnorderedCache(getModulesSize); + ); + }); } +} - /** - * @param {Chunk} chunk the chunk - * @returns {Record} total sizes of all modules in the chunk by source type - */ - getChunkModulesSizes(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.modules.getFromUnorderedCache(getModulesSizes); - } +module.exports = BannerPlugin; - /** - * @param {Chunk} chunk the chunk - * @returns {Module[]} root modules of the chunks (ordered by identifier) - */ - getChunkRootModules(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.modules.getFromUnorderedCache(this._getGraphRoots); - } - /** - * @param {Chunk} chunk the chunk - * @param {ChunkSizeOptions} options options object - * @returns {number} total size of the chunk - */ - getChunkSize(chunk, options = {}) { - const cgc = this._getChunkGraphChunk(chunk); - const modulesSize = cgc.modules.getFromUnorderedCache(getModulesSize); - const chunkOverhead = - typeof options.chunkOverhead === "number" ? options.chunkOverhead : 10000; - const entryChunkMultiplicator = - typeof options.entryChunkMultiplicator === "number" - ? options.entryChunkMultiplicator - : 10; - return ( - chunkOverhead + - modulesSize * (chunk.canBeInitial() ? entryChunkMultiplicator : 1) - ); - } +/***/ }), - /** - * @param {Chunk} chunkA chunk - * @param {Chunk} chunkB chunk - * @param {ChunkSizeOptions} options options object - * @returns {number} total size of the chunk or false if chunks can't be integrated - */ - getIntegratedChunksSize(chunkA, chunkB, options = {}) { - const cgcA = this._getChunkGraphChunk(chunkA); - const cgcB = this._getChunkGraphChunk(chunkB); - const allModules = new Set(cgcA.modules); - for (const m of cgcB.modules) allModules.add(m); - let modulesSize = getModulesSize(allModules); - const chunkOverhead = - typeof options.chunkOverhead === "number" ? options.chunkOverhead : 10000; - const entryChunkMultiplicator = - typeof options.entryChunkMultiplicator === "number" - ? options.entryChunkMultiplicator - : 10; - return ( - chunkOverhead + - modulesSize * - (chunkA.canBeInitial() || chunkB.canBeInitial() - ? entryChunkMultiplicator - : 1) - ); - } +/***/ 99453: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - /** - * @param {Chunk} chunkA chunk - * @param {Chunk} chunkB chunk - * @returns {boolean} true, if chunks could be integrated - */ - canChunksBeIntegrated(chunkA, chunkB) { - if (chunkA.preventIntegration || chunkB.preventIntegration) { - return false; - } +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ - const hasRuntimeA = chunkA.hasRuntime(); - const hasRuntimeB = chunkB.hasRuntime(); - if (hasRuntimeA !== hasRuntimeB) { - if (hasRuntimeA) { - return isAvailableChunk(chunkA, chunkB); - } else if (hasRuntimeB) { - return isAvailableChunk(chunkB, chunkA); - } else { - return false; - } - } - if ( - this.getNumberOfEntryModules(chunkA) > 0 || - this.getNumberOfEntryModules(chunkB) > 0 - ) { - return false; - } +const { AsyncParallelHook, AsyncSeriesBailHook, SyncHook } = __webpack_require__(34718); +const { + makeWebpackError, + makeWebpackErrorCallback +} = __webpack_require__(89935); - return true; - } +/** @typedef {import("./WebpackError")} WebpackError */ - /** - * @param {Chunk} chunkA the target chunk - * @param {Chunk} chunkB the chunk to integrate - * @returns {void} - */ - integrateChunks(chunkA, chunkB) { - // Decide for one name (deterministic) - if (chunkA.name && chunkB.name) { - if ( - this.getNumberOfEntryModules(chunkA) > 0 === - this.getNumberOfEntryModules(chunkB) > 0 - ) { - // When both chunks have entry modules or none have one, use - // shortest name - if (chunkA.name.length !== chunkB.name.length) { - chunkA.name = - chunkA.name.length < chunkB.name.length ? chunkA.name : chunkB.name; - } else { - chunkA.name = chunkA.name < chunkB.name ? chunkA.name : chunkB.name; - } - } else if (this.getNumberOfEntryModules(chunkB) > 0) { - // Pick the name of the chunk with the entry module - chunkA.name = chunkB.name; - } - } else if (chunkB.name) { - chunkA.name = chunkB.name; - } +/** + * @typedef {Object} Etag + * @property {function(): string} toString + */ - // Merge id name hints - for (const hint of chunkB.idNameHints) { - chunkA.idNameHints.add(hint); - } +/** + * @template T + * @callback CallbackCache + * @param {WebpackError=} err + * @param {T=} result + * @returns {void} + */ - // Merge runtime - chunkA.runtime = mergeRuntime(chunkA.runtime, chunkB.runtime); +/** + * @callback GotHandler + * @param {any} result + * @param {function(Error=): void} callback + * @returns {void} + */ - // getChunkModules is used here to create a clone, because disconnectChunkAndModule modifies - for (const module of this.getChunkModules(chunkB)) { - this.disconnectChunkAndModule(chunkB, module); - this.connectChunkAndModule(chunkA, module); +const needCalls = (times, callback) => { + return err => { + if (--times === 0) { + return callback(err); } - - for (const [module, chunkGroup] of Array.from( - this.getChunkEntryModulesWithChunkGroupIterable(chunkB) - )) { - this.disconnectChunkAndEntryModule(chunkB, module); - this.connectChunkAndEntryModule(chunkA, module, chunkGroup); + if (err && times > 0) { + times = 0; + return callback(err); } + }; +}; - for (const chunkGroup of chunkB.groupsIterable) { - chunkGroup.replaceChunk(chunkB, chunkA); - chunkA.addGroup(chunkGroup); - chunkB.removeGroup(chunkGroup); - } - ChunkGraph.clearChunkGraphForChunk(chunkB); +class Cache { + constructor() { + this.hooks = { + /** @type {AsyncSeriesBailHook<[string, Etag | null, GotHandler[]], any>} */ + get: new AsyncSeriesBailHook(["identifier", "etag", "gotHandlers"]), + /** @type {AsyncParallelHook<[string, Etag | null, any]>} */ + store: new AsyncParallelHook(["identifier", "etag", "data"]), + /** @type {AsyncParallelHook<[Iterable]>} */ + storeBuildDependencies: new AsyncParallelHook(["dependencies"]), + /** @type {SyncHook<[]>} */ + beginIdle: new SyncHook([]), + /** @type {AsyncParallelHook<[]>} */ + endIdle: new AsyncParallelHook([]), + /** @type {AsyncParallelHook<[]>} */ + shutdown: new AsyncParallelHook([]) + }; } /** - * @param {Chunk} chunk the chunk to upgrade + * @template T + * @param {string} identifier the cache identifier + * @param {Etag | null} etag the etag + * @param {CallbackCache} callback signals when the value is retrieved * @returns {void} */ - upgradeDependentToFullHashModules(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - if (cgc.dependentHashModules === undefined) return; - if (cgc.fullHashModules === undefined) { - cgc.fullHashModules = cgc.dependentHashModules; - } else { - for (const m of cgc.dependentHashModules) { - cgc.fullHashModules.add(m); + get(identifier, etag, callback) { + const gotHandlers = []; + this.hooks.get.callAsync(identifier, etag, gotHandlers, (err, result) => { + if (err) { + callback(makeWebpackError(err, "Cache.hooks.get")); + return; } - cgc.dependentHashModules = undefined; - } + if (result === null) { + result = undefined; + } + if (gotHandlers.length > 1) { + const innerCallback = needCalls(gotHandlers.length, () => + callback(null, result) + ); + for (const gotHandler of gotHandlers) { + gotHandler(result, innerCallback); + } + } else if (gotHandlers.length === 1) { + gotHandlers[0](result, () => callback(null, result)); + } else { + callback(null, result); + } + }); } /** - * @param {Module} module the checked module - * @param {Chunk} chunk the checked chunk - * @returns {boolean} true, if the chunk contains the module as entry + * @template T + * @param {string} identifier the cache identifier + * @param {Etag | null} etag the etag + * @param {T} data the value to store + * @param {CallbackCache} callback signals when the value is stored + * @returns {void} */ - isEntryModuleInChunk(module, chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.entryModules.has(module); + store(identifier, etag, data, callback) { + this.hooks.store.callAsync( + identifier, + etag, + data, + makeWebpackErrorCallback(callback, "Cache.hooks.store") + ); } /** - * @param {Chunk} chunk the new chunk - * @param {Module} module the entry module - * @param {Entrypoint=} entrypoint the chunk group which must be loaded before the module is executed + * After this method has succeeded the cache can only be restored when build dependencies are + * @param {Iterable} dependencies list of all build dependencies + * @param {CallbackCache} callback signals when the dependencies are stored * @returns {void} */ - connectChunkAndEntryModule(chunk, module, entrypoint) { - const cgm = this._getChunkGraphModule(module); - const cgc = this._getChunkGraphChunk(chunk); - if (cgm.entryInChunks === undefined) { - cgm.entryInChunks = new Set(); - } - cgm.entryInChunks.add(chunk); - cgc.entryModules.set(module, entrypoint); + storeBuildDependencies(dependencies, callback) { + this.hooks.storeBuildDependencies.callAsync( + dependencies, + makeWebpackErrorCallback(callback, "Cache.hooks.storeBuildDependencies") + ); } /** - * @param {Chunk} chunk the new chunk - * @param {RuntimeModule} module the runtime module * @returns {void} */ - connectChunkAndRuntimeModule(chunk, module) { - const cgm = this._getChunkGraphModule(module); - const cgc = this._getChunkGraphChunk(chunk); - if (cgm.runtimeInChunks === undefined) { - cgm.runtimeInChunks = new Set(); - } - cgm.runtimeInChunks.add(chunk); - cgc.runtimeModules.add(module); + beginIdle() { + this.hooks.beginIdle.call(); } /** - * @param {Chunk} chunk the new chunk - * @param {RuntimeModule} module the module that require a full hash + * @param {CallbackCache} callback signals when the call finishes * @returns {void} */ - addFullHashModuleToChunk(chunk, module) { - const cgc = this._getChunkGraphChunk(chunk); - if (cgc.fullHashModules === undefined) cgc.fullHashModules = new Set(); - cgc.fullHashModules.add(module); + endIdle(callback) { + this.hooks.endIdle.callAsync( + makeWebpackErrorCallback(callback, "Cache.hooks.endIdle") + ); } /** - * @param {Chunk} chunk the new chunk - * @param {RuntimeModule} module the module that require a full hash + * @param {CallbackCache} callback signals when the call finishes * @returns {void} */ - addDependentHashModuleToChunk(chunk, module) { - const cgc = this._getChunkGraphChunk(chunk); - if (cgc.dependentHashModules === undefined) - cgc.dependentHashModules = new Set(); - cgc.dependentHashModules.add(module); + shutdown(callback) { + this.hooks.shutdown.callAsync( + makeWebpackErrorCallback(callback, "Cache.hooks.shutdown") + ); } +} + +Cache.STAGE_MEMORY = -10; +Cache.STAGE_DEFAULT = 0; +Cache.STAGE_DISK = 10; +Cache.STAGE_NETWORK = 20; + +module.exports = Cache; + +/***/ }), + +/***/ 67014: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const asyncLib = __webpack_require__(36386); +const getLazyHashedEtag = __webpack_require__(12339); +const mergeEtags = __webpack_require__(53885); + +/** @typedef {import("./Cache")} Cache */ +/** @typedef {import("./Cache").Etag} Etag */ +/** @typedef {import("./WebpackError")} WebpackError */ +/** @typedef {import("./cache/getLazyHashedEtag").HashableObject} HashableObject */ +/** @typedef {typeof import("./util/Hash")} HashConstructor */ + +/** + * @template T + * @callback CallbackCache + * @param {WebpackError=} err + * @param {T=} result + * @returns {void} + */ + +/** + * @template T + * @callback CallbackNormalErrorCache + * @param {Error=} err + * @param {T=} result + * @returns {void} + */ + +class MultiItemCache { /** - * @param {Chunk} chunk the new chunk - * @param {Module} module the entry module - * @returns {void} + * @param {ItemCacheFacade[]} items item caches */ - disconnectChunkAndEntryModule(chunk, module) { - const cgm = this._getChunkGraphModule(module); - const cgc = this._getChunkGraphChunk(chunk); - cgm.entryInChunks.delete(chunk); - if (cgm.entryInChunks.size === 0) { - cgm.entryInChunks = undefined; - } - cgc.entryModules.delete(module); + constructor(items) { + this._items = items; + if (items.length === 1) return /** @type {any} */ (items[0]); } /** - * @param {Chunk} chunk the new chunk - * @param {RuntimeModule} module the runtime module + * @template T + * @param {CallbackCache} callback signals when the value is retrieved * @returns {void} */ - disconnectChunkAndRuntimeModule(chunk, module) { - const cgm = this._getChunkGraphModule(module); - const cgc = this._getChunkGraphChunk(chunk); - cgm.runtimeInChunks.delete(chunk); - if (cgm.runtimeInChunks.size === 0) { - cgm.runtimeInChunks = undefined; - } - cgc.runtimeModules.delete(module); + get(callback) { + const next = i => { + this._items[i].get((err, result) => { + if (err) return callback(err); + if (result !== undefined) return callback(null, result); + if (++i >= this._items.length) return callback(); + next(i); + }); + }; + next(0); } /** - * @param {Module} module the entry module, it will no longer be entry - * @returns {void} + * @template T + * @returns {Promise} promise with the data */ - disconnectEntryModule(module) { - const cgm = this._getChunkGraphModule(module); - for (const chunk of cgm.entryInChunks) { - const cgc = this._getChunkGraphChunk(chunk); - cgc.entryModules.delete(module); - } - cgm.entryInChunks = undefined; + getPromise() { + const next = i => { + return this._items[i].getPromise().then(result => { + if (result !== undefined) return result; + if (++i < this._items.length) return next(i); + }); + }; + return next(0); } /** - * @param {Chunk} chunk the chunk, for which all entries will be removed + * @template T + * @param {T} data the value to store + * @param {CallbackCache} callback signals when the value is stored * @returns {void} */ - disconnectEntries(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - for (const module of cgc.entryModules.keys()) { - const cgm = this._getChunkGraphModule(module); - cgm.entryInChunks.delete(chunk); - if (cgm.entryInChunks.size === 0) { - cgm.entryInChunks = undefined; - } - } - cgc.entryModules.clear(); + store(data, callback) { + asyncLib.each( + this._items, + (item, callback) => item.store(data, callback), + callback + ); } /** - * @param {Chunk} chunk the chunk - * @returns {number} the amount of entry modules in chunk + * @template T + * @param {T} data the value to store + * @returns {Promise} promise signals when the value is stored */ - getNumberOfEntryModules(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.entryModules.size; + storePromise(data) { + return Promise.all(this._items.map(item => item.storePromise(data))).then( + () => {} + ); } +} +class ItemCacheFacade { /** - * @param {Chunk} chunk the chunk - * @returns {number} the amount of entry modules in chunk + * @param {Cache} cache the root cache + * @param {string} name the child cache item name + * @param {Etag | null} etag the etag */ - getNumberOfRuntimeModules(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.runtimeModules.size; + constructor(cache, name, etag) { + this._cache = cache; + this._name = name; + this._etag = etag; } /** - * @param {Chunk} chunk the chunk - * @returns {Iterable} iterable of modules (do not modify) + * @template T + * @param {CallbackCache} callback signals when the value is retrieved + * @returns {void} */ - getChunkEntryModulesIterable(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.entryModules.keys(); + get(callback) { + this._cache.get(this._name, this._etag, callback); } /** - * @param {Chunk} chunk the chunk - * @returns {Iterable} iterable of chunks + * @template T + * @returns {Promise} promise with the data */ - getChunkEntryDependentChunksIterable(chunk) { - /** @type {Set} */ - const set = new Set(); - for (const chunkGroup of chunk.groupsIterable) { - if (chunkGroup instanceof Entrypoint) { - const entrypointChunk = chunkGroup.getEntrypointChunk(); - const cgc = this._getChunkGraphChunk(entrypointChunk); - for (const chunkGroup of cgc.entryModules.values()) { - for (const c of chunkGroup.chunks) { - if (c !== chunk && c !== entrypointChunk && !c.hasRuntime()) { - set.add(c); - } - } + getPromise() { + return new Promise((resolve, reject) => { + this._cache.get(this._name, this._etag, (err, data) => { + if (err) { + reject(err); + } else { + resolve(data); } - } - } - - return set; + }); + }); } /** - * @param {Chunk} chunk the chunk - * @returns {boolean} true, when it has dependent chunks + * @template T + * @param {T} data the value to store + * @param {CallbackCache} callback signals when the value is stored + * @returns {void} */ - hasChunkEntryDependentChunks(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - for (const chunkGroup of cgc.entryModules.values()) { - for (const c of chunkGroup.chunks) { - if (c !== chunk) { - return true; - } - } - } - return false; + store(data, callback) { + this._cache.store(this._name, this._etag, data, callback); } /** - * @param {Chunk} chunk the chunk - * @returns {Iterable} iterable of modules (do not modify) + * @template T + * @param {T} data the value to store + * @returns {Promise} promise signals when the value is stored */ - getChunkRuntimeModulesIterable(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.runtimeModules; + storePromise(data) { + return new Promise((resolve, reject) => { + this._cache.store(this._name, this._etag, data, err => { + if (err) { + reject(err); + } else { + resolve(); + } + }); + }); } /** - * @param {Chunk} chunk the chunk - * @returns {RuntimeModule[]} array of modules in order of execution + * @template T + * @param {function(CallbackNormalErrorCache): void} computer function to compute the value if not cached + * @param {CallbackNormalErrorCache} callback signals when the value is retrieved + * @returns {void} */ - getChunkRuntimeModulesInOrder(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - const array = Array.from(cgc.runtimeModules); - array.sort( - concatComparators( - compareSelect( - /** - * @param {RuntimeModule} r runtime module - * @returns {number=} stage - */ - r => r.stage, - compareIds - ), - compareModulesByIdentifier - ) - ); - return array; + provide(computer, callback) { + this.get((err, cacheEntry) => { + if (err) return callback(err); + if (cacheEntry !== undefined) return cacheEntry; + computer((err, result) => { + if (err) return callback(err); + this.store(result, err => { + if (err) return callback(err); + callback(null, result); + }); + }); + }); } /** - * @param {Chunk} chunk the chunk - * @returns {Iterable | undefined} iterable of modules (do not modify) + * @template T + * @param {function(): Promise | T} computer function to compute the value if not cached + * @returns {Promise} promise with the data */ - getChunkFullHashModulesIterable(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.fullHashModules; + async providePromise(computer) { + const cacheEntry = await this.getPromise(); + if (cacheEntry !== undefined) return cacheEntry; + const result = await computer(); + await this.storePromise(result); + return result; } +} +class CacheFacade { /** - * @param {Chunk} chunk the chunk - * @returns {ReadonlySet | undefined} set of modules (do not modify) + * @param {Cache} cache the root cache + * @param {string} name the child cache name + * @param {string | HashConstructor} hashFunction the hash function to use */ - getChunkFullHashModulesSet(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.fullHashModules; + constructor(cache, name, hashFunction) { + this._cache = cache; + this._name = name; + this._hashFunction = hashFunction; } /** - * @param {Chunk} chunk the chunk - * @returns {Iterable | undefined} iterable of modules (do not modify) + * @param {string} name the child cache name# + * @returns {CacheFacade} child cache */ - getChunkDependentHashModulesIterable(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.dependentHashModules; + getChildCache(name) { + return new CacheFacade( + this._cache, + `${this._name}|${name}`, + this._hashFunction + ); } - /** @typedef {[Module, Entrypoint | undefined]} EntryModuleWithChunkGroup */ - /** - * @param {Chunk} chunk the chunk - * @returns {Iterable} iterable of modules (do not modify) + * @param {string} identifier the cache identifier + * @param {Etag | null} etag the etag + * @returns {ItemCacheFacade} item cache */ - getChunkEntryModulesWithChunkGroupIterable(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.entryModules; + getItemCache(identifier, etag) { + return new ItemCacheFacade( + this._cache, + `${this._name}|${identifier}`, + etag + ); } /** - * @param {AsyncDependenciesBlock} depBlock the async block - * @returns {ChunkGroup} the chunk group + * @param {HashableObject} obj an hashable object + * @returns {Etag} an etag that is lazy hashed */ - getBlockChunkGroup(depBlock) { - return this._blockChunkGroups.get(depBlock); + getLazyHashedEtag(obj) { + return getLazyHashedEtag(obj, this._hashFunction); } /** - * @param {AsyncDependenciesBlock} depBlock the async block - * @param {ChunkGroup} chunkGroup the chunk group - * @returns {void} + * @param {Etag} a an etag + * @param {Etag} b another etag + * @returns {Etag} an etag that represents both */ - connectBlockAndChunkGroup(depBlock, chunkGroup) { - this._blockChunkGroups.set(depBlock, chunkGroup); - chunkGroup.addBlock(depBlock); + mergeEtags(a, b) { + return mergeEtags(a, b); } /** - * @param {ChunkGroup} chunkGroup the chunk group + * @template T + * @param {string} identifier the cache identifier + * @param {Etag | null} etag the etag + * @param {CallbackCache} callback signals when the value is retrieved * @returns {void} */ - disconnectChunkGroup(chunkGroup) { - for (const block of chunkGroup.blocksIterable) { - this._blockChunkGroups.delete(block); - } - // TODO refactor by moving blocks list into ChunkGraph - chunkGroup._blocks.clear(); + get(identifier, etag, callback) { + this._cache.get(`${this._name}|${identifier}`, etag, callback); } /** - * @param {Module} module the module - * @returns {string | number} the id of the module + * @template T + * @param {string} identifier the cache identifier + * @param {Etag | null} etag the etag + * @returns {Promise} promise with the data */ - getModuleId(module) { - const cgm = this._getChunkGraphModule(module); - return cgm.id; + getPromise(identifier, etag) { + return new Promise((resolve, reject) => { + this._cache.get(`${this._name}|${identifier}`, etag, (err, data) => { + if (err) { + reject(err); + } else { + resolve(data); + } + }); + }); } /** - * @param {Module} module the module - * @param {string | number} id the id of the module + * @template T + * @param {string} identifier the cache identifier + * @param {Etag | null} etag the etag + * @param {T} data the value to store + * @param {CallbackCache} callback signals when the value is stored * @returns {void} */ - setModuleId(module, id) { - const cgm = this._getChunkGraphModule(module); - cgm.id = id; + store(identifier, etag, data, callback) { + this._cache.store(`${this._name}|${identifier}`, etag, data, callback); } /** - * @param {string} runtime runtime - * @returns {string | number} the id of the runtime + * @template T + * @param {string} identifier the cache identifier + * @param {Etag | null} etag the etag + * @param {T} data the value to store + * @returns {Promise} promise signals when the value is stored */ - getRuntimeId(runtime) { - return this._runtimeIds.get(runtime); + storePromise(identifier, etag, data) { + return new Promise((resolve, reject) => { + this._cache.store(`${this._name}|${identifier}`, etag, data, err => { + if (err) { + reject(err); + } else { + resolve(); + } + }); + }); } /** - * @param {string} runtime runtime - * @param {string | number} id the id of the runtime + * @template T + * @param {string} identifier the cache identifier + * @param {Etag | null} etag the etag + * @param {function(CallbackNormalErrorCache): void} computer function to compute the value if not cached + * @param {CallbackNormalErrorCache} callback signals when the value is retrieved * @returns {void} */ - setRuntimeId(runtime, id) { - this._runtimeIds.set(runtime, id); + provide(identifier, etag, computer, callback) { + this.get(identifier, etag, (err, cacheEntry) => { + if (err) return callback(err); + if (cacheEntry !== undefined) return cacheEntry; + computer((err, result) => { + if (err) return callback(err); + this.store(identifier, etag, result, err => { + if (err) return callback(err); + callback(null, result); + }); + }); + }); } /** * @template T - * @param {Module} module the module - * @param {RuntimeSpecMap} hashes hashes data - * @param {RuntimeSpec} runtime the runtime - * @returns {T} hash + * @param {string} identifier the cache identifier + * @param {Etag | null} etag the etag + * @param {function(): Promise | T} computer function to compute the value if not cached + * @returns {Promise} promise with the data */ - _getModuleHashInfo(module, hashes, runtime) { - if (!hashes) { - throw new Error( - `Module ${module.identifier()} has no hash info for runtime ${runtimeToString( - runtime - )} (hashes not set at all)` - ); - } else if (runtime === undefined) { - const hashInfoItems = new Set(hashes.values()); - if (hashInfoItems.size !== 1) { - throw new Error( - `No unique hash info entry for unspecified runtime for ${module.identifier()} (existing runtimes: ${Array.from( - hashes.keys(), - r => runtimeToString(r) - ).join(", ")}). -Caller might not support runtime-dependent code generation (opt-out via optimization.usedExports: "global").` - ); - } - return first(hashInfoItems); - } else { - const hashInfo = hashes.get(runtime); - if (!hashInfo) { - throw new Error( - `Module ${module.identifier()} has no hash info for runtime ${runtimeToString( - runtime - )} (available runtimes ${Array.from( - hashes.keys(), - runtimeToString - ).join(", ")})` - ); - } - return hashInfo; - } + async providePromise(identifier, etag, computer) { + const cacheEntry = await this.getPromise(identifier, etag); + if (cacheEntry !== undefined) return cacheEntry; + const result = await computer(); + await this.storePromise(identifier, etag, result); + return result; } +} + +module.exports = CacheFacade; +module.exports.ItemCacheFacade = ItemCacheFacade; +module.exports.MultiItemCache = MultiItemCache; + + +/***/ }), + +/***/ 42444: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const WebpackError = __webpack_require__(68422); + +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./ModuleGraph")} ModuleGraph */ + +/** + * @param {Module[]} modules the modules to be sorted + * @returns {Module[]} sorted version of original modules + */ +const sortModules = modules => { + return modules.sort((a, b) => { + const aIdent = a.identifier(); + const bIdent = b.identifier(); + /* istanbul ignore next */ + if (aIdent < bIdent) return -1; + /* istanbul ignore next */ + if (aIdent > bIdent) return 1; + /* istanbul ignore next */ + return 0; + }); +}; + +/** + * @param {Module[]} modules each module from throw + * @param {ModuleGraph} moduleGraph the module graph + * @returns {string} each message from provided modules + */ +const createModulesListMessage = (modules, moduleGraph) => { + return modules + .map(m => { + let message = `* ${m.identifier()}`; + const validReasons = Array.from( + moduleGraph.getIncomingConnectionsByOriginModule(m).keys() + ).filter(x => x); + + if (validReasons.length > 0) { + message += `\n Used by ${validReasons.length} module(s), i. e.`; + message += `\n ${validReasons[0].identifier()}`; + } + return message; + }) + .join("\n"); +}; +class CaseSensitiveModulesWarning extends WebpackError { /** - * @param {Module} module the module - * @param {RuntimeSpec} runtime the runtime - * @returns {boolean} true, if the module has hashes for this runtime + * Creates an instance of CaseSensitiveModulesWarning. + * @param {Iterable} modules modules that were detected + * @param {ModuleGraph} moduleGraph the module graph */ - hasModuleHashes(module, runtime) { - const cgm = this._getChunkGraphModule(module); - const hashes = cgm.hashes; - return hashes && hashes.has(runtime); + constructor(modules, moduleGraph) { + const sortedModules = sortModules(Array.from(modules)); + const modulesList = createModulesListMessage(sortedModules, moduleGraph); + super(`There are multiple modules with names that only differ in casing. +This can lead to unexpected behavior when compiling on a filesystem with other case-semantic. +Use equal casing. Compare these module identifiers: +${modulesList}`); + + this.name = "CaseSensitiveModulesWarning"; + this.module = sortedModules[0]; } +} + +module.exports = CaseSensitiveModulesWarning; + + +/***/ }), + +/***/ 65574: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ChunkGraph = __webpack_require__(97860); +const Entrypoint = __webpack_require__(86695); +const { intersect } = __webpack_require__(34715); +const SortableSet = __webpack_require__(67563); +const StringXor = __webpack_require__(23877); +const { + compareModulesByIdentifier, + compareChunkGroupsByIndex, + compareModulesById +} = __webpack_require__(26296); +const { createArrayToSetDeprecationSet } = __webpack_require__(2594); +const { mergeRuntime } = __webpack_require__(19655); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("./ChunkGraph").ChunkFilterPredicate} ChunkFilterPredicate */ +/** @typedef {import("./ChunkGraph").ChunkSizeOptions} ChunkSizeOptions */ +/** @typedef {import("./ChunkGraph").ModuleFilterPredicate} ModuleFilterPredicate */ +/** @typedef {import("./ChunkGroup")} ChunkGroup */ +/** @typedef {import("./Compilation")} Compilation */ +/** @typedef {import("./Compilation").AssetInfo} AssetInfo */ +/** @typedef {import("./Compilation").PathData} PathData */ +/** @typedef {import("./Entrypoint").EntryOptions} EntryOptions */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./ModuleGraph")} ModuleGraph */ +/** @typedef {import("./util/Hash")} Hash */ +/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ + +const ChunkFilesSet = createArrayToSetDeprecationSet("chunk.files"); + +/** + * @typedef {Object} WithId an object who has an id property * + * @property {string | number} id the id of the object + */ + +/** + * @deprecated + * @typedef {Object} ChunkMaps + * @property {Record} hash + * @property {Record>} contentHash + * @property {Record} name + */ + +/** + * @deprecated + * @typedef {Object} ChunkModuleMaps + * @property {Record} id + * @property {Record} hash + */ + +let debugId = 1000; +/** + * A Chunk is a unit of encapsulation for Modules. + * Chunks are "rendered" into bundles that get emitted when the build completes. + */ +class Chunk { /** - * @param {Module} module the module - * @param {RuntimeSpec} runtime the runtime - * @returns {string} hash + * @param {string=} name of chunk being created, is optional (for subclasses) + * @param {boolean} backCompat enable backward-compatibility */ - getModuleHash(module, runtime) { - const cgm = this._getChunkGraphModule(module); - const hashes = cgm.hashes; - return this._getModuleHashInfo(module, hashes, runtime).hash; + constructor(name, backCompat = true) { + /** @type {number | string | null} */ + this.id = null; + /** @type {(number|string)[] | null} */ + this.ids = null; + /** @type {number} */ + this.debugId = debugId++; + /** @type {string} */ + this.name = name; + /** @type {SortableSet} */ + this.idNameHints = new SortableSet(); + /** @type {boolean} */ + this.preventIntegration = false; + /** @type {(string | function(PathData, AssetInfo=): string)?} */ + this.filenameTemplate = undefined; + /** @private @type {SortableSet} */ + this._groups = new SortableSet(undefined, compareChunkGroupsByIndex); + /** @type {RuntimeSpec} */ + this.runtime = undefined; + /** @type {Set} */ + this.files = backCompat ? new ChunkFilesSet() : new Set(); + /** @type {Set} */ + this.auxiliaryFiles = new Set(); + /** @type {boolean} */ + this.rendered = false; + /** @type {string=} */ + this.hash = undefined; + /** @type {Record} */ + this.contentHash = Object.create(null); + /** @type {string=} */ + this.renderedHash = undefined; + /** @type {string=} */ + this.chunkReason = undefined; + /** @type {boolean} */ + this.extraAsync = false; + } + + // TODO remove in webpack 6 + // BACKWARD-COMPAT START + get entryModule() { + const entryModules = Array.from( + ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.entryModule", + "DEP_WEBPACK_CHUNK_ENTRY_MODULE" + ).getChunkEntryModulesIterable(this) + ); + if (entryModules.length === 0) { + return undefined; + } else if (entryModules.length === 1) { + return entryModules[0]; + } else { + throw new Error( + "Module.entryModule: Multiple entry modules are not supported by the deprecated API (Use the new ChunkGroup API)" + ); + } } /** - * @param {Module} module the module - * @param {RuntimeSpec} runtime the runtime - * @returns {string} hash + * @returns {boolean} true, if the chunk contains an entry module */ - getRenderedModuleHash(module, runtime) { - const cgm = this._getChunkGraphModule(module); - const hashes = cgm.hashes; - return this._getModuleHashInfo(module, hashes, runtime).renderedHash; + hasEntryModule() { + return ( + ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.hasEntryModule", + "DEP_WEBPACK_CHUNK_HAS_ENTRY_MODULE" + ).getNumberOfEntryModules(this) > 0 + ); } /** * @param {Module} module the module - * @param {RuntimeSpec} runtime the runtime - * @param {string} hash the full hash - * @param {string} renderedHash the shortened hash for rendering - * @returns {void} + * @returns {boolean} true, if the chunk could be added */ - setModuleHashes(module, runtime, hash, renderedHash) { - const cgm = this._getChunkGraphModule(module); - if (cgm.hashes === undefined) { - cgm.hashes = new RuntimeSpecMap(); - } - cgm.hashes.set(runtime, new ModuleHashInfo(hash, renderedHash)); + addModule(module) { + const chunkGraph = ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.addModule", + "DEP_WEBPACK_CHUNK_ADD_MODULE" + ); + if (chunkGraph.isModuleInChunk(module, this)) return false; + chunkGraph.connectChunkAndModule(this, module); + return true; } /** * @param {Module} module the module - * @param {RuntimeSpec} runtime the runtime - * @param {Set} items runtime requirements to be added (ownership of this Set is given to ChunkGraph when transferOwnership not false) - * @param {boolean} transferOwnership true: transfer ownership of the items object, false: items is immutable and shared and won't be modified * @returns {void} */ - addModuleRuntimeRequirements( - module, - runtime, - items, - transferOwnership = true - ) { - const cgm = this._getChunkGraphModule(module); - const runtimeRequirementsMap = cgm.runtimeRequirements; - if (runtimeRequirementsMap === undefined) { - const map = new RuntimeSpecMap(); - // TODO avoid cloning item and track ownership instead - map.set(runtime, transferOwnership ? items : new Set(items)); - cgm.runtimeRequirements = map; - return; - } - runtimeRequirementsMap.update(runtime, runtimeRequirements => { - if (runtimeRequirements === undefined) { - return transferOwnership ? items : new Set(items); - } else if (!transferOwnership || runtimeRequirements.size >= items.size) { - for (const item of items) runtimeRequirements.add(item); - return runtimeRequirements; - } else { - for (const item of runtimeRequirements) items.add(item); - return items; - } - }); + removeModule(module) { + ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.removeModule", + "DEP_WEBPACK_CHUNK_REMOVE_MODULE" + ).disconnectChunkAndModule(this, module); } /** - * @param {Chunk} chunk the chunk - * @param {Set} items runtime requirements to be added (ownership of this Set is given to ChunkGraph) - * @returns {void} + * @returns {number} the number of module which are contained in this chunk */ - addChunkRuntimeRequirements(chunk, items) { - const cgc = this._getChunkGraphChunk(chunk); - const runtimeRequirements = cgc.runtimeRequirements; - if (runtimeRequirements === undefined) { - cgc.runtimeRequirements = items; - } else if (runtimeRequirements.size >= items.size) { - for (const item of items) runtimeRequirements.add(item); - } else { - for (const item of runtimeRequirements) items.add(item); - cgc.runtimeRequirements = items; - } + getNumberOfModules() { + return ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.getNumberOfModules", + "DEP_WEBPACK_CHUNK_GET_NUMBER_OF_MODULES" + ).getNumberOfChunkModules(this); + } + + get modulesIterable() { + const chunkGraph = ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.modulesIterable", + "DEP_WEBPACK_CHUNK_MODULES_ITERABLE" + ); + return chunkGraph.getOrderedChunkModulesIterable( + this, + compareModulesByIdentifier + ); } /** - * @param {Chunk} chunk the chunk - * @param {Iterable} items runtime requirements to be added - * @returns {void} + * @param {Chunk} otherChunk the chunk to compare with + * @returns {-1|0|1} the comparison result */ - addTreeRuntimeRequirements(chunk, items) { - const cgc = this._getChunkGraphChunk(chunk); - const runtimeRequirements = cgc.runtimeRequirementsInTree; - for (const item of items) runtimeRequirements.add(item); + compareTo(otherChunk) { + const chunkGraph = ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.compareTo", + "DEP_WEBPACK_CHUNK_COMPARE_TO" + ); + return chunkGraph.compareChunks(this, otherChunk); } /** * @param {Module} module the module - * @param {RuntimeSpec} runtime the runtime - * @returns {ReadonlySet} runtime requirements + * @returns {boolean} true, if the chunk contains the module */ - getModuleRuntimeRequirements(module, runtime) { - const cgm = this._getChunkGraphModule(module); - const runtimeRequirements = - cgm.runtimeRequirements && cgm.runtimeRequirements.get(runtime); - return runtimeRequirements === undefined ? EMPTY_SET : runtimeRequirements; + containsModule(module) { + return ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.containsModule", + "DEP_WEBPACK_CHUNK_CONTAINS_MODULE" + ).isModuleInChunk(module, this); } /** - * @param {Chunk} chunk the chunk - * @returns {ReadonlySet} runtime requirements + * @returns {Module[]} the modules for this chunk */ - getChunkRuntimeRequirements(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - const runtimeRequirements = cgc.runtimeRequirements; - return runtimeRequirements === undefined ? EMPTY_SET : runtimeRequirements; + getModules() { + return ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.getModules", + "DEP_WEBPACK_CHUNK_GET_MODULES" + ).getChunkModules(this); } /** - * @param {Module} module the module - * @param {RuntimeSpec} runtime the runtime - * @param {boolean} withConnections include connections - * @returns {string} hash + * @returns {void} */ - getModuleGraphHash(module, runtime, withConnections = true) { - const cgm = this._getChunkGraphModule(module); - return withConnections - ? this._getModuleGraphHashWithConnections(cgm, module, runtime) - : this._getModuleGraphHashBigInt(cgm, module, runtime).toString(16); + remove() { + const chunkGraph = ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.remove", + "DEP_WEBPACK_CHUNK_REMOVE" + ); + chunkGraph.disconnectChunk(this); + this.disconnectFromGroups(); } /** * @param {Module} module the module - * @param {RuntimeSpec} runtime the runtime - * @param {boolean} withConnections include connections - * @returns {bigint} hash + * @param {Chunk} otherChunk the target chunk + * @returns {void} */ - getModuleGraphHashBigInt(module, runtime, withConnections = true) { - const cgm = this._getChunkGraphModule(module); - return withConnections - ? BigInt( - `0x${this._getModuleGraphHashWithConnections(cgm, module, runtime)}` - ) - : this._getModuleGraphHashBigInt(cgm, module, runtime); + moveModule(module, otherChunk) { + const chunkGraph = ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.moveModule", + "DEP_WEBPACK_CHUNK_MOVE_MODULE" + ); + chunkGraph.disconnectChunkAndModule(this, module); + chunkGraph.connectChunkAndModule(otherChunk, module); } /** - * @param {ChunkGraphModule} cgm the ChunkGraphModule - * @param {Module} module the module - * @param {RuntimeSpec} runtime the runtime - * @returns {bigint} hash as big int + * @param {Chunk} otherChunk the other chunk + * @returns {boolean} true, if the specified chunk has been integrated */ - _getModuleGraphHashBigInt(cgm, module, runtime) { - if (cgm.graphHashes === undefined) { - cgm.graphHashes = new RuntimeSpecMap(); + integrate(otherChunk) { + const chunkGraph = ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.integrate", + "DEP_WEBPACK_CHUNK_INTEGRATE" + ); + if (chunkGraph.canChunksBeIntegrated(this, otherChunk)) { + chunkGraph.integrateChunks(this, otherChunk); + return true; + } else { + return false; } - const graphHash = cgm.graphHashes.provide(runtime, () => { - const hash = createHash(this._hashFunction); - hash.update(`${cgm.id}${this.moduleGraph.isAsync(module)}`); - this.moduleGraph.getExportsInfo(module).updateHash(hash, runtime); - return BigInt(`0x${/** @type {string} */ (hash.digest("hex"))}`); - }); - return graphHash; } /** - * @param {ChunkGraphModule} cgm the ChunkGraphModule - * @param {Module} module the module - * @param {RuntimeSpec} runtime the runtime - * @returns {string} hash + * @param {Chunk} otherChunk the other chunk + * @returns {boolean} true, if chunks could be integrated */ - _getModuleGraphHashWithConnections(cgm, module, runtime) { - if (cgm.graphHashesWithConnections === undefined) { - cgm.graphHashesWithConnections = new RuntimeSpecMap(); - } - const activeStateToString = state => { - if (state === false) return "F"; - if (state === true) return "T"; - if (state === ModuleGraphConnection.TRANSITIVE_ONLY) return "O"; - throw new Error("Not implemented active state"); - }; - const strict = module.buildMeta && module.buildMeta.strictHarmonyModule; - return cgm.graphHashesWithConnections.provide(runtime, () => { - const graphHash = this._getModuleGraphHashBigInt( - cgm, - module, - runtime - ).toString(16); - const connections = this.moduleGraph.getOutgoingConnections(module); - /** @type {Set} */ - const activeNamespaceModules = new Set(); - /** @type {Map>} */ - const connectedModules = new Map(); - const processConnection = (connection, stateInfo) => { - const module = connection.module; - stateInfo += module.getExportsType(this.moduleGraph, strict); - // cspell:word Tnamespace - if (stateInfo === "Tnamespace") activeNamespaceModules.add(module); - else { - const oldModule = connectedModules.get(stateInfo); - if (oldModule === undefined) { - connectedModules.set(stateInfo, module); - } else if (oldModule instanceof Set) { - oldModule.add(module); - } else if (oldModule !== module) { - connectedModules.set(stateInfo, new Set([oldModule, module])); - } - } - }; - if (runtime === undefined || typeof runtime === "string") { - for (const connection of connections) { - const state = connection.getActiveState(runtime); - if (state === false) continue; - processConnection(connection, state === true ? "T" : "O"); - } - } else { - // cspell:word Tnamespace - for (const connection of connections) { - const states = new Set(); - let stateInfo = ""; - forEachRuntime( - runtime, - runtime => { - const state = connection.getActiveState(runtime); - states.add(state); - stateInfo += activeStateToString(state) + runtime; - }, - true - ); - if (states.size === 1) { - const state = first(states); - if (state === false) continue; - stateInfo = activeStateToString(state); - } - processConnection(connection, stateInfo); - } - } - // cspell:word Tnamespace - if (activeNamespaceModules.size === 0 && connectedModules.size === 0) - return graphHash; - const connectedModulesInOrder = - connectedModules.size > 1 - ? Array.from(connectedModules).sort(([a], [b]) => (a < b ? -1 : 1)) - : connectedModules; - const hash = createHash(this._hashFunction); - const addModuleToHash = module => { - hash.update( - this._getModuleGraphHashBigInt( - this._getChunkGraphModule(module), - module, - runtime - ).toString(16) - ); - }; - const addModulesToHash = modules => { - let xor = ZERO_BIG_INT; - for (const m of modules) { - xor = - xor ^ - this._getModuleGraphHashBigInt( - this._getChunkGraphModule(m), - m, - runtime - ); - } - hash.update(xor.toString(16)); - }; - if (activeNamespaceModules.size === 1) - addModuleToHash(activeNamespaceModules.values().next().value); - else if (activeNamespaceModules.size > 1) - addModulesToHash(activeNamespaceModules); - for (const [stateInfo, modules] of connectedModulesInOrder) { - hash.update(stateInfo); - if (modules instanceof Set) { - addModulesToHash(modules); - } else { - addModuleToHash(modules); - } - } - hash.update(graphHash); - return /** @type {string} */ (hash.digest("hex")); - }); + canBeIntegrated(otherChunk) { + const chunkGraph = ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.canBeIntegrated", + "DEP_WEBPACK_CHUNK_CAN_BE_INTEGRATED" + ); + return chunkGraph.canChunksBeIntegrated(this, otherChunk); } /** - * @param {Chunk} chunk the chunk - * @returns {ReadonlySet} runtime requirements + * @returns {boolean} true, if this chunk contains no module */ - getTreeRuntimeRequirements(chunk) { - const cgc = this._getChunkGraphChunk(chunk); - return cgc.runtimeRequirementsInTree; + isEmpty() { + const chunkGraph = ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.isEmpty", + "DEP_WEBPACK_CHUNK_IS_EMPTY" + ); + return chunkGraph.getNumberOfChunkModules(this) === 0; } - // TODO remove in webpack 6 /** - * @param {Module} module the module - * @param {string} deprecateMessage message for the deprecation message - * @param {string} deprecationCode code for the deprecation - * @returns {ChunkGraph} the chunk graph + * @returns {number} total size of all modules in this chunk */ - static getChunkGraphForModule(module, deprecateMessage, deprecationCode) { - const fn = deprecateGetChunkGraphForModuleMap.get(deprecateMessage); - if (fn) return fn(module); - const newFn = util.deprecate( - /** - * @param {Module} module the module - * @returns {ChunkGraph} the chunk graph - */ - module => { - const chunkGraph = chunkGraphForModuleMap.get(module); - if (!chunkGraph) - throw new Error( - deprecateMessage + - ": There was no ChunkGraph assigned to the Module for backward-compat (Use the new API)" - ); - return chunkGraph; - }, - deprecateMessage + ": Use new ChunkGraph API", - deprecationCode + modulesSize() { + const chunkGraph = ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.modulesSize", + "DEP_WEBPACK_CHUNK_MODULES_SIZE" ); - deprecateGetChunkGraphForModuleMap.set(deprecateMessage, newFn); - return newFn(module); + return chunkGraph.getChunkModulesSize(this); } - // TODO remove in webpack 6 /** - * @param {Module} module the module - * @param {ChunkGraph} chunkGraph the chunk graph - * @returns {void} + * @param {ChunkSizeOptions} options options object + * @returns {number} total size of this chunk */ - static setChunkGraphForModule(module, chunkGraph) { - chunkGraphForModuleMap.set(module, chunkGraph); + size(options = {}) { + const chunkGraph = ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.size", + "DEP_WEBPACK_CHUNK_SIZE" + ); + return chunkGraph.getChunkSize(this, options); } - // TODO remove in webpack 6 /** - * @param {Module} module the module - * @returns {void} + * @param {Chunk} otherChunk the other chunk + * @param {ChunkSizeOptions} options options object + * @returns {number} total size of the chunk or false if the chunk can't be integrated */ - static clearChunkGraphForModule(module) { - chunkGraphForModuleMap.delete(module); + integratedSize(otherChunk, options) { + const chunkGraph = ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.integratedSize", + "DEP_WEBPACK_CHUNK_INTEGRATED_SIZE" + ); + return chunkGraph.getIntegratedChunksSize(this, otherChunk, options); } - // TODO remove in webpack 6 /** - * @param {Chunk} chunk the chunk - * @param {string} deprecateMessage message for the deprecation message - * @param {string} deprecationCode code for the deprecation - * @returns {ChunkGraph} the chunk graph + * @param {ModuleFilterPredicate} filterFn function used to filter modules + * @returns {ChunkModuleMaps} module map information */ - static getChunkGraphForChunk(chunk, deprecateMessage, deprecationCode) { - const fn = deprecateGetChunkGraphForChunkMap.get(deprecateMessage); - if (fn) return fn(chunk); - const newFn = util.deprecate( - /** - * @param {Chunk} chunk the chunk - * @returns {ChunkGraph} the chunk graph - */ - chunk => { - const chunkGraph = chunkGraphForChunkMap.get(chunk); - if (!chunkGraph) - throw new Error( - deprecateMessage + - "There was no ChunkGraph assigned to the Chunk for backward-compat (Use the new API)" - ); - return chunkGraph; - }, - deprecateMessage + ": Use new ChunkGraph API", - deprecationCode + getChunkModuleMaps(filterFn) { + const chunkGraph = ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.getChunkModuleMaps", + "DEP_WEBPACK_CHUNK_GET_CHUNK_MODULE_MAPS" ); - deprecateGetChunkGraphForChunkMap.set(deprecateMessage, newFn); - return newFn(chunk); + /** @type {Record} */ + const chunkModuleIdMap = Object.create(null); + /** @type {Record} */ + const chunkModuleHashMap = Object.create(null); + + for (const asyncChunk of this.getAllAsyncChunks()) { + /** @type {(string|number)[]} */ + let array; + for (const module of chunkGraph.getOrderedChunkModulesIterable( + asyncChunk, + compareModulesById(chunkGraph) + )) { + if (filterFn(module)) { + if (array === undefined) { + array = []; + chunkModuleIdMap[asyncChunk.id] = array; + } + const moduleId = chunkGraph.getModuleId(module); + array.push(moduleId); + chunkModuleHashMap[moduleId] = chunkGraph.getRenderedModuleHash( + module, + undefined + ); + } + } + } + + return { + id: chunkModuleIdMap, + hash: chunkModuleHashMap + }; } - // TODO remove in webpack 6 /** - * @param {Chunk} chunk the chunk - * @param {ChunkGraph} chunkGraph the chunk graph - * @returns {void} + * @param {ModuleFilterPredicate} filterFn predicate function used to filter modules + * @param {ChunkFilterPredicate=} filterChunkFn predicate function used to filter chunks + * @returns {boolean} return true if module exists in graph */ - static setChunkGraphForChunk(chunk, chunkGraph) { - chunkGraphForChunkMap.set(chunk, chunkGraph); + hasModuleInGraph(filterFn, filterChunkFn) { + const chunkGraph = ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.hasModuleInGraph", + "DEP_WEBPACK_CHUNK_HAS_MODULE_IN_GRAPH" + ); + return chunkGraph.hasModuleInGraph(this, filterFn, filterChunkFn); } - // TODO remove in webpack 6 /** - * @param {Chunk} chunk the chunk - * @returns {void} + * @deprecated + * @param {boolean} realHash whether the full hash or the rendered hash is to be used + * @returns {ChunkMaps} the chunk map information */ - static clearChunkGraphForChunk(chunk) { - chunkGraphForChunkMap.delete(chunk); - } -} - -// TODO remove in webpack 6 -/** @type {WeakMap} */ -const chunkGraphForModuleMap = new WeakMap(); - -// TODO remove in webpack 6 -/** @type {WeakMap} */ -const chunkGraphForChunkMap = new WeakMap(); - -// TODO remove in webpack 6 -/** @type {Map ChunkGraph>} */ -const deprecateGetChunkGraphForModuleMap = new Map(); - -// TODO remove in webpack 6 -/** @type {Map ChunkGraph>} */ -const deprecateGetChunkGraphForChunkMap = new Map(); - -module.exports = ChunkGraph; - - -/***/ }), - -/***/ 96975: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - - -const util = __webpack_require__(31669); -const SortableSet = __webpack_require__(67563); -const { - compareLocations, - compareChunks, - compareIterables -} = __webpack_require__(26296); - -/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ -/** @typedef {import("./Chunk")} Chunk */ -/** @typedef {import("./ChunkGraph")} ChunkGraph */ -/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ -/** @typedef {import("./Entrypoint")} Entrypoint */ -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./ModuleGraph")} ModuleGraph */ - -/** @typedef {{id: number}} HasId */ -/** @typedef {{module: Module, loc: DependencyLocation, request: string}} OriginRecord */ - -/** - * @typedef {Object} RawChunkGroupOptions - * @property {number=} preloadOrder - * @property {number=} prefetchOrder - */ - -/** @typedef {RawChunkGroupOptions & { name?: string }} ChunkGroupOptions */ + getChunkMaps(realHash) { + /** @type {Record} */ + const chunkHashMap = Object.create(null); + /** @type {Record>} */ + const chunkContentHashMap = Object.create(null); + /** @type {Record} */ + const chunkNameMap = Object.create(null); -let debugId = 5000; + for (const chunk of this.getAllAsyncChunks()) { + chunkHashMap[chunk.id] = realHash ? chunk.hash : chunk.renderedHash; + for (const key of Object.keys(chunk.contentHash)) { + if (!chunkContentHashMap[key]) { + chunkContentHashMap[key] = Object.create(null); + } + chunkContentHashMap[key][chunk.id] = chunk.contentHash[key]; + } + if (chunk.name) { + chunkNameMap[chunk.id] = chunk.name; + } + } -/** - * @template T - * @param {SortableSet} set set to convert to array. - * @returns {T[]} the array format of existing set - */ -const getArray = set => Array.from(set); + return { + hash: chunkHashMap, + contentHash: chunkContentHashMap, + name: chunkNameMap + }; + } + // BACKWARD-COMPAT END -/** - * A convenience method used to sort chunks based on their id's - * @param {ChunkGroup} a first sorting comparator - * @param {ChunkGroup} b second sorting comparator - * @returns {1|0|-1} a sorting index to determine order - */ -const sortById = (a, b) => { - if (a.id < b.id) return -1; - if (b.id < a.id) return 1; - return 0; -}; + /** + * @returns {boolean} whether or not the Chunk will have a runtime + */ + hasRuntime() { + for (const chunkGroup of this._groups) { + if ( + chunkGroup instanceof Entrypoint && + chunkGroup.getRuntimeChunk() === this + ) { + return true; + } + } + return false; + } -/** - * @param {OriginRecord} a the first comparator in sort - * @param {OriginRecord} b the second comparator in sort - * @returns {1|-1|0} returns sorting order as index - */ -const sortOrigin = (a, b) => { - const aIdent = a.module ? a.module.identifier() : ""; - const bIdent = b.module ? b.module.identifier() : ""; - if (aIdent < bIdent) return -1; - if (aIdent > bIdent) return 1; - return compareLocations(a.loc, b.loc); -}; + /** + * @returns {boolean} whether or not this chunk can be an initial chunk + */ + canBeInitial() { + for (const chunkGroup of this._groups) { + if (chunkGroup.isInitial()) return true; + } + return false; + } -class ChunkGroup { /** - * Creates an instance of ChunkGroup. - * @param {string|ChunkGroupOptions=} options chunk group options passed to chunkGroup + * @returns {boolean} whether this chunk can only be an initial chunk */ - constructor(options) { - if (typeof options === "string") { - options = { name: options }; - } else if (!options) { - options = { name: undefined }; + isOnlyInitial() { + if (this._groups.size <= 0) return false; + for (const chunkGroup of this._groups) { + if (!chunkGroup.isInitial()) return false; } - /** @type {number} */ - this.groupDebugId = debugId++; - this.options = options; - /** @type {SortableSet} */ - this._children = new SortableSet(undefined, sortById); - /** @type {SortableSet} */ - this._parents = new SortableSet(undefined, sortById); - /** @type {SortableSet} */ - this._asyncEntrypoints = new SortableSet(undefined, sortById); - this._blocks = new SortableSet(); - /** @type {Chunk[]} */ - this.chunks = []; - /** @type {OriginRecord[]} */ - this.origins = []; - /** Indices in top-down order */ - /** @private @type {Map} */ - this._modulePreOrderIndices = new Map(); - /** Indices in bottom-up order */ - /** @private @type {Map} */ - this._modulePostOrderIndices = new Map(); - /** @type {number} */ - this.index = undefined; + return true; } /** - * when a new chunk is added to a chunkGroup, addingOptions will occur. - * @param {ChunkGroupOptions} options the chunkGroup options passed to addOptions - * @returns {void} + * @returns {EntryOptions | undefined} the entry options for this chunk */ - addOptions(options) { - for (const key of Object.keys(options)) { - if (this.options[key] === undefined) { - this.options[key] = options[key]; - } else if (this.options[key] !== options[key]) { - if (key.endsWith("Order")) { - this.options[key] = Math.max(this.options[key], options[key]); - } else { - throw new Error( - `ChunkGroup.addOptions: No option merge strategy for ${key}` - ); - } + getEntryOptions() { + for (const chunkGroup of this._groups) { + if (chunkGroup instanceof Entrypoint) { + return chunkGroup.options; } } + return undefined; } /** - * returns the name of current ChunkGroup - * @returns {string|undefined} returns the ChunkGroup name + * @param {ChunkGroup} chunkGroup the chunkGroup the chunk is being added + * @returns {void} */ - get name() { - return this.options.name; + addGroup(chunkGroup) { + this._groups.add(chunkGroup); } /** - * sets a new name for current ChunkGroup - * @param {string} value the new name for ChunkGroup + * @param {ChunkGroup} chunkGroup the chunkGroup the chunk is being removed from * @returns {void} */ - set name(value) { - this.options.name = value; + removeGroup(chunkGroup) { + this._groups.delete(chunkGroup); } - /* istanbul ignore next */ /** - * get a uniqueId for ChunkGroup, made up of its member Chunk debugId's - * @returns {string} a unique concatenation of chunk debugId's + * @param {ChunkGroup} chunkGroup the chunkGroup to check + * @returns {boolean} returns true if chunk has chunkGroup reference and exists in chunkGroup */ - get debugId() { - return Array.from(this.chunks, x => x.debugId).join("+"); + isInGroup(chunkGroup) { + return this._groups.has(chunkGroup); } /** - * get a unique id for ChunkGroup, made up of its member Chunk id's - * @returns {string} a unique concatenation of chunk ids + * @returns {number} the amount of groups that the said chunk is in */ - get id() { - return Array.from(this.chunks, x => x.id).join("+"); + getNumberOfGroups() { + return this._groups.size; } /** - * Performs an unshift of a specific chunk - * @param {Chunk} chunk chunk being unshifted - * @returns {boolean} returns true if attempted chunk shift is accepted + * @returns {Iterable} the chunkGroups that the said chunk is referenced in */ - unshiftChunk(chunk) { - const oldIdx = this.chunks.indexOf(chunk); - if (oldIdx > 0) { - this.chunks.splice(oldIdx, 1); - this.chunks.unshift(chunk); - } else if (oldIdx < 0) { - this.chunks.unshift(chunk); - return true; - } - return false; + get groupsIterable() { + this._groups.sort(); + return this._groups; } /** - * inserts a chunk before another existing chunk in group - * @param {Chunk} chunk Chunk being inserted - * @param {Chunk} before Placeholder/target chunk marking new chunk insertion point - * @returns {boolean} return true if insertion was successful + * @returns {void} */ - insertChunk(chunk, before) { - const oldIdx = this.chunks.indexOf(chunk); - const idx = this.chunks.indexOf(before); - if (idx < 0) { - throw new Error("before chunk not found"); - } - if (oldIdx >= 0 && oldIdx > idx) { - this.chunks.splice(oldIdx, 1); - this.chunks.splice(idx, 0, chunk); - } else if (oldIdx < 0) { - this.chunks.splice(idx, 0, chunk); - return true; + disconnectFromGroups() { + for (const chunkGroup of this._groups) { + chunkGroup.removeChunk(this); } - return false; } /** - * add a chunk into ChunkGroup. Is pushed on or prepended - * @param {Chunk} chunk chunk being pushed into ChunkGroupS - * @returns {boolean} returns true if chunk addition was successful. + * @param {Chunk} newChunk the new chunk that will be split out of + * @returns {void} */ - pushChunk(chunk) { - const oldIdx = this.chunks.indexOf(chunk); - if (oldIdx >= 0) { - return false; + split(newChunk) { + for (const chunkGroup of this._groups) { + chunkGroup.insertChunk(newChunk, this); + newChunk.addGroup(chunkGroup); } - this.chunks.push(chunk); - return true; + for (const idHint of this.idNameHints) { + newChunk.idNameHints.add(idHint); + } + newChunk.runtime = mergeRuntime(newChunk.runtime, this.runtime); } /** - * @param {Chunk} oldChunk chunk to be replaced - * @param {Chunk} newChunk New chunk that will be replaced with - * @returns {boolean} returns true if the replacement was successful - */ - replaceChunk(oldChunk, newChunk) { - const oldIdx = this.chunks.indexOf(oldChunk); - if (oldIdx < 0) return false; - const newIdx = this.chunks.indexOf(newChunk); - if (newIdx < 0) { - this.chunks[oldIdx] = newChunk; - return true; - } - if (newIdx < oldIdx) { - this.chunks.splice(oldIdx, 1); - return true; - } else if (newIdx !== oldIdx) { - this.chunks[oldIdx] = newChunk; - this.chunks.splice(newIdx, 1); - return true; - } - } - - /** - * @param {Chunk} chunk chunk to remove - * @returns {boolean} returns true if chunk was removed + * @param {Hash} hash hash (will be modified) + * @param {ChunkGraph} chunkGraph the chunk graph + * @returns {void} */ - removeChunk(chunk) { - const idx = this.chunks.indexOf(chunk); - if (idx >= 0) { - this.chunks.splice(idx, 1); - return true; + updateHash(hash, chunkGraph) { + hash.update( + `${this.id} ${this.ids ? this.ids.join() : ""} ${this.name || ""} ` + ); + const xor = new StringXor(); + for (const m of chunkGraph.getChunkModulesIterable(this)) { + xor.add(chunkGraph.getModuleHash(m, this.runtime)); + } + xor.updateHash(hash); + const entryModules = + chunkGraph.getChunkEntryModulesWithChunkGroupIterable(this); + for (const [m, chunkGroup] of entryModules) { + hash.update(`entry${chunkGraph.getModuleId(m)}${chunkGroup.id}`); } - return false; - } - - /** - * @returns {boolean} true, when this chunk group will be loaded on initial page load - */ - isInitial() { - return false; - } - - /** - * @param {ChunkGroup} group chunk group to add - * @returns {boolean} returns true if chunk group was added - */ - addChild(group) { - const size = this._children.size; - this._children.add(group); - return size !== this._children.size; } /** - * @returns {ChunkGroup[]} returns the children of this group + * @returns {Set} a set of all the async chunks */ - getChildren() { - return this._children.getFromCache(getArray); - } + getAllAsyncChunks() { + const queue = new Set(); + const chunks = new Set(); - getNumberOfChildren() { - return this._children.size; - } + const initialChunks = intersect( + Array.from(this.groupsIterable, g => new Set(g.chunks)) + ); - get childrenIterable() { - return this._children; - } + const initialQueue = new Set(this.groupsIterable); - /** - * @param {ChunkGroup} group the chunk group to remove - * @returns {boolean} returns true if the chunk group was removed - */ - removeChild(group) { - if (!this._children.has(group)) { - return false; + for (const chunkGroup of initialQueue) { + for (const child of chunkGroup.childrenIterable) { + if (child instanceof Entrypoint) { + initialQueue.add(child); + } else { + queue.add(child); + } + } } - this._children.delete(group); - group.removeParent(this); - return true; - } - - /** - * @param {ChunkGroup} parentChunk the parent group to be added into - * @returns {boolean} returns true if this chunk group was added to the parent group - */ - addParent(parentChunk) { - if (!this._parents.has(parentChunk)) { - this._parents.add(parentChunk); - return true; + for (const chunkGroup of queue) { + for (const chunk of chunkGroup.chunks) { + if (!initialChunks.has(chunk)) { + chunks.add(chunk); + } + } + for (const child of chunkGroup.childrenIterable) { + queue.add(child); + } } - return false; - } - - /** - * @returns {ChunkGroup[]} returns the parents of this group - */ - getParents() { - return this._parents.getFromCache(getArray); - } - - getNumberOfParents() { - return this._parents.size; - } - - /** - * @param {ChunkGroup} parent the parent group - * @returns {boolean} returns true if the parent group contains this group - */ - hasParent(parent) { - return this._parents.has(parent); - } - get parentsIterable() { - return this._parents; + return chunks; } /** - * @param {ChunkGroup} chunkGroup the parent group - * @returns {boolean} returns true if this group has been removed from the parent + * @returns {Set} a set of all the initial chunks (including itself) */ - removeParent(chunkGroup) { - if (this._parents.delete(chunkGroup)) { - chunkGroup.removeChild(this); - return true; + getAllInitialChunks() { + const chunks = new Set(); + const queue = new Set(this.groupsIterable); + for (const group of queue) { + if (group.isInitial()) { + for (const c of group.chunks) chunks.add(c); + for (const g of group.childrenIterable) queue.add(g); + } } - return false; - } - - /** - * @param {Entrypoint} entrypoint entrypoint to add - * @returns {boolean} returns true if entrypoint was added - */ - addAsyncEntrypoint(entrypoint) { - const size = this._asyncEntrypoints.size; - this._asyncEntrypoints.add(entrypoint); - return size !== this._asyncEntrypoints.size; - } - - get asyncEntrypointsIterable() { - return this._asyncEntrypoints; - } - - /** - * @returns {Array} an array containing the blocks - */ - getBlocks() { - return this._blocks.getFromCache(getArray); - } - - getNumberOfBlocks() { - return this._blocks.size; - } - - hasBlock(block) { - return this._blocks.has(block); + return chunks; } /** - * @returns {Iterable} blocks + * @returns {Set} a set of all the referenced chunks (including itself) */ - get blocksIterable() { - return this._blocks; - } + getAllReferencedChunks() { + const queue = new Set(this.groupsIterable); + const chunks = new Set(); - /** - * @param {AsyncDependenciesBlock} block a block - * @returns {boolean} false, if block was already added - */ - addBlock(block) { - if (!this._blocks.has(block)) { - this._blocks.add(block); - return true; + for (const chunkGroup of queue) { + for (const chunk of chunkGroup.chunks) { + chunks.add(chunk); + } + for (const child of chunkGroup.childrenIterable) { + queue.add(child); + } } - return false; - } - /** - * @param {Module} module origin module - * @param {DependencyLocation} loc location of the reference in the origin module - * @param {string} request request name of the reference - * @returns {void} - */ - addOrigin(module, loc, request) { - this.origins.push({ - module, - loc, - request - }); + return chunks; } /** - * @returns {string[]} the files contained this chunk group + * @returns {Set} a set of all the referenced entrypoints */ - getFiles() { - const files = new Set(); + getAllReferencedAsyncEntrypoints() { + const queue = new Set(this.groupsIterable); + const entrypoints = new Set(); - for (const chunk of this.chunks) { - for (const file of chunk.files) { - files.add(file); + for (const chunkGroup of queue) { + for (const entrypoint of chunkGroup.asyncEntrypointsIterable) { + entrypoints.add(entrypoint); + } + for (const child of chunkGroup.childrenIterable) { + queue.add(child); } } - return Array.from(files); + return entrypoints; } /** - * @returns {void} + * @returns {boolean} true, if the chunk references async chunks */ - remove() { - // cleanup parents - for (const parentChunkGroup of this._parents) { - // remove this chunk from its parents - parentChunkGroup._children.delete(this); + hasAsyncChunks() { + const queue = new Set(); - // cleanup "sub chunks" - for (const chunkGroup of this._children) { - /** - * remove this chunk as "intermediary" and connect - * it "sub chunks" and parents directly - */ - // add parent to each "sub chunk" - chunkGroup.addParent(parentChunkGroup); - // add "sub chunk" to parent - parentChunkGroup.addChild(chunkGroup); - } - } + const initialChunks = intersect( + Array.from(this.groupsIterable, g => new Set(g.chunks)) + ); - /** - * we need to iterate again over the children - * to remove this from the child's parents. - * This can not be done in the above loop - * as it is not guaranteed that `this._parents` contains anything. - */ - for (const chunkGroup of this._children) { - // remove this as parent of every "sub chunk" - chunkGroup._parents.delete(this); + for (const chunkGroup of this.groupsIterable) { + for (const child of chunkGroup.childrenIterable) { + queue.add(child); + } } - // remove chunks - for (const chunk of this.chunks) { - chunk.removeGroup(this); + for (const chunkGroup of queue) { + for (const chunk of chunkGroup.chunks) { + if (!initialChunks.has(chunk)) { + return true; + } + } + for (const child of chunkGroup.childrenIterable) { + queue.add(child); + } } - } - - sortItems() { - this.origins.sort(sortOrigin); - } - /** - * Sorting predicate which allows current ChunkGroup to be compared against another. - * Sorting values are based off of number of chunks in ChunkGroup. - * - * @param {ChunkGraph} chunkGraph the chunk graph - * @param {ChunkGroup} otherGroup the chunkGroup to compare this against - * @returns {-1|0|1} sort position for comparison - */ - compareTo(chunkGraph, otherGroup) { - if (this.chunks.length > otherGroup.chunks.length) return -1; - if (this.chunks.length < otherGroup.chunks.length) return 1; - return compareIterables(compareChunks(chunkGraph))( - this.chunks, - otherGroup.chunks - ); + return false; } /** - * @param {ModuleGraph} moduleGraph the module graph * @param {ChunkGraph} chunkGraph the chunk graph - * @returns {Record} mapping from children type to ordered list of ChunkGroups + * @param {ChunkFilterPredicate=} filterFn function used to filter chunks + * @returns {Record} a record object of names to lists of child ids(?) */ - getChildrenByOrders(moduleGraph, chunkGraph) { + getChildIdsByOrders(chunkGraph, filterFn) { /** @type {Map} */ const lists = new Map(); - for (const childGroup of this._children) { - for (const key of Object.keys(childGroup.options)) { - if (key.endsWith("Order")) { - const name = key.substr(0, key.length - "Order".length); - let list = lists.get(name); - if (list === undefined) { - lists.set(name, (list = [])); + for (const group of this.groupsIterable) { + if (group.chunks[group.chunks.length - 1] === this) { + for (const childGroup of group.childrenIterable) { + for (const key of Object.keys(childGroup.options)) { + if (key.endsWith("Order")) { + const name = key.substr(0, key.length - "Order".length); + let list = lists.get(name); + if (list === undefined) { + list = []; + lists.set(name, list); + } + list.push({ + order: childGroup.options[key], + group: childGroup + }); + } } - list.push({ - order: childGroup.options[key], - group: childGroup - }); } } } - /** @type {Record} */ + /** @type {Record} */ const result = Object.create(null); for (const [name, list] of lists) { list.sort((a, b) => { @@ -26947,126 +26438,116 @@ class ChunkGroup { if (cmp !== 0) return cmp; return a.group.compareTo(chunkGraph, b.group); }); - result[name] = list.map(i => i.group); + /** @type {Set} */ + const chunkIdSet = new Set(); + for (const item of list) { + for (const chunk of item.group.chunks) { + if (filterFn && !filterFn(chunk, chunkGraph)) continue; + chunkIdSet.add(chunk.id); + } + } + if (chunkIdSet.size > 0) { + result[name] = Array.from(chunkIdSet); + } } return result; } /** - * Sets the top-down index of a module in this ChunkGroup - * @param {Module} module module for which the index should be set - * @param {number} index the index of the module - * @returns {void} - */ - setModulePreOrderIndex(module, index) { - this._modulePreOrderIndices.set(module, index); - } - - /** - * Gets the top-down index of a module in this ChunkGroup - * @param {Module} module the module - * @returns {number} index - */ - getModulePreOrderIndex(module) { - return this._modulePreOrderIndices.get(module); - } - - /** - * Sets the bottom-up index of a module in this ChunkGroup - * @param {Module} module module for which the index should be set - * @param {number} index the index of the module - * @returns {void} - */ - setModulePostOrderIndex(module, index) { - this._modulePostOrderIndices.set(module, index); - } - - /** - * Gets the bottom-up index of a module in this ChunkGroup - * @param {Module} module the module - * @returns {number} index + * @param {ChunkGraph} chunkGraph the chunk graph + * @param {string} type option name + * @returns {{ onChunks: Chunk[], chunks: Set }[]} referenced chunks for a specific type */ - getModulePostOrderIndex(module) { - return this._modulePostOrderIndices.get(module); - } - - /* istanbul ignore next */ - checkConstraints() { - const chunk = this; - for (const child of chunk._children) { - if (!child._parents.has(chunk)) { - throw new Error( - `checkConstraints: child missing parent ${chunk.debugId} -> ${child.debugId}` - ); + getChildrenOfTypeInOrder(chunkGraph, type) { + const list = []; + for (const group of this.groupsIterable) { + for (const childGroup of group.childrenIterable) { + const order = childGroup.options[type]; + if (order === undefined) continue; + list.push({ + order, + group, + childGroup + }); } } - for (const parentChunk of chunk._parents) { - if (!parentChunk._children.has(chunk)) { - throw new Error( - `checkConstraints: parent missing child ${parentChunk.debugId} <- ${chunk.debugId}` + if (list.length === 0) return undefined; + list.sort((a, b) => { + const cmp = b.order - a.order; + if (cmp !== 0) return cmp; + return a.group.compareTo(chunkGraph, b.group); + }); + const result = []; + let lastEntry; + for (const { group, childGroup } of list) { + if (lastEntry && lastEntry.onChunks === group.chunks) { + for (const chunk of childGroup.chunks) { + lastEntry.chunks.add(chunk); + } + } else { + result.push( + (lastEntry = { + onChunks: group.chunks, + chunks: new Set(childGroup.chunks) + }) ); } } + return result; } -} - -ChunkGroup.prototype.getModuleIndex = util.deprecate( - ChunkGroup.prototype.getModulePreOrderIndex, - "ChunkGroup.getModuleIndex was renamed to getModulePreOrderIndex", - "DEP_WEBPACK_CHUNK_GROUP_GET_MODULE_INDEX" -); - -ChunkGroup.prototype.getModuleIndex2 = util.deprecate( - ChunkGroup.prototype.getModulePostOrderIndex, - "ChunkGroup.getModuleIndex2 was renamed to getModulePostOrderIndex", - "DEP_WEBPACK_CHUNK_GROUP_GET_MODULE_INDEX_2" -); - -module.exports = ChunkGroup; - - -/***/ }), - -/***/ 80187: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - + /** + * @param {ChunkGraph} chunkGraph the chunk graph + * @param {boolean=} includeDirectChildren include direct children (by default only children of async children are included) + * @param {ChunkFilterPredicate=} filterFn function used to filter chunks + * @returns {Record>} a record object of names to lists of child ids(?) by chunk id + */ + getChildIdsByOrdersMap(chunkGraph, includeDirectChildren, filterFn) { + /** @type {Record>} */ + const chunkMaps = Object.create(null); -const WebpackError = __webpack_require__(68422); + /** + * @param {Chunk} chunk a chunk + * @returns {void} + */ + const addChildIdsByOrdersToMap = chunk => { + const data = chunk.getChildIdsByOrders(chunkGraph, filterFn); + for (const key of Object.keys(data)) { + let chunkMap = chunkMaps[key]; + if (chunkMap === undefined) { + chunkMaps[key] = chunkMap = Object.create(null); + } + chunkMap[chunk.id] = data[key]; + } + }; -/** @typedef {import("./Chunk")} Chunk */ + if (includeDirectChildren) { + /** @type {Set} */ + const chunks = new Set(); + for (const chunkGroup of this.groupsIterable) { + for (const chunk of chunkGroup.chunks) { + chunks.add(chunk); + } + } + for (const chunk of chunks) { + addChildIdsByOrdersToMap(chunk); + } + } -class ChunkRenderError extends WebpackError { - /** - * Create a new ChunkRenderError - * @param {Chunk} chunk A chunk - * @param {string} file Related file - * @param {Error} error Original error - */ - constructor(chunk, file, error) { - super(); + for (const chunk of this.getAllAsyncChunks()) { + addChildIdsByOrdersToMap(chunk); + } - this.name = "ChunkRenderError"; - this.error = error; - this.message = error.message; - this.details = error.stack; - this.file = file; - this.chunk = chunk; + return chunkMaps; } } -module.exports = ChunkRenderError; +module.exports = Chunk; /***/ }), -/***/ 50527: +/***/ 97860: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; @@ -27078,803 +26559,3170 @@ module.exports = ChunkRenderError; const util = __webpack_require__(31669); -const memoize = __webpack_require__(84297); - -/** @typedef {import("../declarations/WebpackOptions").Output} OutputOptions */ -/** @typedef {import("./Compilation")} Compilation */ - -const getJavascriptModulesPlugin = memoize(() => - __webpack_require__(76767) -); - -// TODO webpack 6 remove this class -class ChunkTemplate { - /** - * @param {OutputOptions} outputOptions output options - * @param {Compilation} compilation the compilation - */ - constructor(outputOptions, compilation) { - this._outputOptions = outputOptions || {}; - this.hooks = Object.freeze({ - renderManifest: { - tap: util.deprecate( - (options, fn) => { - compilation.hooks.renderManifest.tap( - options, - (entries, options) => { - if (options.chunk.hasRuntime()) return entries; - return fn(entries, options); - } - ); - }, - "ChunkTemplate.hooks.renderManifest is deprecated (use Compilation.hooks.renderManifest instead)", - "DEP_WEBPACK_CHUNK_TEMPLATE_RENDER_MANIFEST" - ) - }, - modules: { - tap: util.deprecate( - (options, fn) => { - getJavascriptModulesPlugin() - .getCompilationHooks(compilation) - .renderChunk.tap(options, (source, renderContext) => - fn( - source, - compilation.moduleTemplates.javascript, - renderContext - ) - ); - }, - "ChunkTemplate.hooks.modules is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderChunk instead)", - "DEP_WEBPACK_CHUNK_TEMPLATE_MODULES" - ) - }, - render: { - tap: util.deprecate( - (options, fn) => { - getJavascriptModulesPlugin() - .getCompilationHooks(compilation) - .renderChunk.tap(options, (source, renderContext) => - fn( - source, - compilation.moduleTemplates.javascript, - renderContext - ) - ); - }, - "ChunkTemplate.hooks.render is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderChunk instead)", - "DEP_WEBPACK_CHUNK_TEMPLATE_RENDER" - ) - }, - renderWithEntry: { - tap: util.deprecate( - (options, fn) => { - getJavascriptModulesPlugin() - .getCompilationHooks(compilation) - .render.tap(options, (source, renderContext) => { - if ( - renderContext.chunkGraph.getNumberOfEntryModules( - renderContext.chunk - ) === 0 || - renderContext.chunk.hasRuntime() - ) { - return source; - } - return fn(source, renderContext.chunk); - }); - }, - "ChunkTemplate.hooks.renderWithEntry is deprecated (use JavascriptModulesPlugin.getCompilationHooks().render instead)", - "DEP_WEBPACK_CHUNK_TEMPLATE_RENDER_WITH_ENTRY" - ) - }, - hash: { - tap: util.deprecate( - (options, fn) => { - compilation.hooks.fullHash.tap(options, fn); - }, - "ChunkTemplate.hooks.hash is deprecated (use Compilation.hooks.fullHash instead)", - "DEP_WEBPACK_CHUNK_TEMPLATE_HASH" - ) - }, - hashForChunk: { - tap: util.deprecate( - (options, fn) => { - getJavascriptModulesPlugin() - .getCompilationHooks(compilation) - .chunkHash.tap(options, (chunk, hash, context) => { - if (chunk.hasRuntime()) return; - fn(hash, chunk, context); - }); - }, - "ChunkTemplate.hooks.hashForChunk is deprecated (use JavascriptModulesPlugin.getCompilationHooks().chunkHash instead)", - "DEP_WEBPACK_CHUNK_TEMPLATE_HASH_FOR_CHUNK" - ) - } - }); - } -} - -Object.defineProperty(ChunkTemplate.prototype, "outputOptions", { - get: util.deprecate( - /** - * @this {ChunkTemplate} - * @returns {OutputOptions} output options - */ - function () { - return this._outputOptions; - }, - "ChunkTemplate.outputOptions is deprecated (use Compilation.outputOptions instead)", - "DEP_WEBPACK_CHUNK_TEMPLATE_OUTPUT_OPTIONS" - ) -}); - -module.exports = ChunkTemplate; - +const Entrypoint = __webpack_require__(86695); +const ModuleGraphConnection = __webpack_require__(94144); +const { first } = __webpack_require__(34715); +const SortableSet = __webpack_require__(67563); +const { + compareModulesById, + compareIterables, + compareModulesByIdentifier, + concatComparators, + compareSelect, + compareIds +} = __webpack_require__(26296); +const createHash = __webpack_require__(24123); +const findGraphRoots = __webpack_require__(38670); +const { + RuntimeSpecMap, + RuntimeSpecSet, + runtimeToString, + mergeRuntime, + forEachRuntime +} = __webpack_require__(19655); -/***/ }), +/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("./ChunkGroup")} ChunkGroup */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./ModuleGraph")} ModuleGraph */ +/** @typedef {import("./RuntimeModule")} RuntimeModule */ +/** @typedef {typeof import("./util/Hash")} Hash */ +/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ -/***/ 49129: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { +/** @type {ReadonlySet} */ +const EMPTY_SET = new Set(); -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Sergey Melyukov @smelukov -*/ +const ZERO_BIG_INT = BigInt(0); +const compareModuleIterables = compareIterables(compareModulesByIdentifier); +/** @typedef {(c: Chunk, chunkGraph: ChunkGraph) => boolean} ChunkFilterPredicate */ +/** @typedef {(m: Module) => boolean} ModuleFilterPredicate */ -const asyncLib = __webpack_require__(36386); -const { SyncBailHook } = __webpack_require__(34718); -const Compilation = __webpack_require__(59622); -const createSchemaValidation = __webpack_require__(77695); -const { join } = __webpack_require__(93204); -const processAsyncTree = __webpack_require__(76815); +/** + * @typedef {Object} ChunkSizeOptions + * @property {number=} chunkOverhead constant overhead for a chunk + * @property {number=} entryChunkMultiplicator multiplicator for initial chunks + */ -/** @typedef {import("../declarations/WebpackOptions").CleanOptions} CleanOptions */ -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./logging/Logger").Logger} Logger */ -/** @typedef {import("./util/fs").OutputFileSystem} OutputFileSystem */ -/** @typedef {import("./util/fs").StatsCallback} StatsCallback */ +class ModuleHashInfo { + constructor(hash, renderedHash) { + this.hash = hash; + this.renderedHash = renderedHash; + } +} -/** @typedef {(function(string):boolean)|RegExp} IgnoreItem */ -/** @typedef {function(IgnoreItem): void} AddToIgnoreCallback */ +/** @template T @typedef {(set: SortableSet) => T[]} SetToArrayFunction */ /** - * @typedef {Object} CleanPluginCompilationHooks - * @property {SyncBailHook<[string], boolean>} keep when returning true the file/directory will be kept during cleaning, returning false will clean it and ignore the following plugins and config + * @template T + * @param {SortableSet} set the set + * @returns {T[]} set as array */ +const getArray = set => { + return Array.from(set); +}; -const validate = createSchemaValidation( - undefined, - () => { - const { definitions } = __webpack_require__(1863); - return { - definitions, - oneOf: [{ $ref: "#/definitions/CleanOptions" }] - }; - }, - { - name: "Clean Plugin", - baseDataPath: "options" +/** + * @param {SortableSet} chunks the chunks + * @returns {RuntimeSpecSet} runtimes + */ +const getModuleRuntimes = chunks => { + const runtimes = new RuntimeSpecSet(); + for (const chunk of chunks) { + runtimes.add(chunk.runtime); } -); + return runtimes; +}; /** - * @param {OutputFileSystem} fs filesystem - * @param {string} outputPath output path - * @param {Set} currentAssets filename of the current assets (must not start with .. or ., must only use / as path separator) - * @param {function(Error=, Set=): void} callback returns the filenames of the assets that shouldn't be there - * @returns {void} + * @param {SortableSet} set the set + * @returns {Map>} modules by source type */ -const getDiffToFs = (fs, outputPath, currentAssets, callback) => { - const directories = new Set(); - // get directories of assets - for (const asset of currentAssets) { - directories.add(asset.replace(/(^|\/)[^/]*$/, "")); +const modulesBySourceType = set => { + /** @type {Map>} */ + const map = new Map(); + for (const module of set) { + for (const sourceType of module.getSourceTypes()) { + let innerSet = map.get(sourceType); + if (innerSet === undefined) { + innerSet = new SortableSet(); + map.set(sourceType, innerSet); + } + innerSet.add(module); + } } - // and all parent directories - for (const directory of directories) { - directories.add(directory.replace(/(^|\/)[^/]*$/, "")); + for (const [key, innerSet] of map) { + // When all modules have the source type, we reuse the original SortableSet + // to benefit from the shared cache (especially for sorting) + if (innerSet.size === set.size) { + map.set(key, set); + } } - const diff = new Set(); - asyncLib.forEachLimit( - directories, - 10, - (directory, callback) => { - fs.readdir(join(fs, outputPath, directory), (err, entries) => { - if (err) { - if (err.code === "ENOENT") return callback(); - if (err.code === "ENOTDIR") { - diff.add(directory); - return callback(); - } - return callback(err); - } - for (const entry of entries) { - const file = /** @type {string} */ (entry); - const filename = directory ? `${directory}/${file}` : file; - if (!directories.has(filename) && !currentAssets.has(filename)) { - diff.add(filename); - } - } - callback(); - }); - }, - err => { - if (err) return callback(err); + return map; +}; - callback(null, diff); - } - ); +/** @type {WeakMap} */ +const createOrderedArrayFunctionMap = new WeakMap(); + +/** + * @template T + * @param {function(T, T): -1|0|1} comparator comparator function + * @returns {SetToArrayFunction} set as ordered array + */ +const createOrderedArrayFunction = comparator => { + /** @type {SetToArrayFunction} */ + let fn = createOrderedArrayFunctionMap.get(comparator); + if (fn !== undefined) return fn; + fn = set => { + set.sortWith(comparator); + return Array.from(set); + }; + createOrderedArrayFunctionMap.set(comparator, fn); + return fn; }; /** - * @param {Set} currentAssets assets list - * @param {Set} oldAssets old assets list - * @returns {Set} diff + * @param {Iterable} modules the modules to get the count/size of + * @returns {number} the size of the modules */ -const getDiffToOldAssets = (currentAssets, oldAssets) => { - const diff = new Set(); - for (const asset of oldAssets) { - if (!currentAssets.has(asset)) diff.add(asset); +const getModulesSize = modules => { + let size = 0; + for (const module of modules) { + for (const type of module.getSourceTypes()) { + size += module.size(type); + } } - return diff; + return size; }; /** - * @param {OutputFileSystem} fs filesystem - * @param {string} filename path to file - * @param {StatsCallback} callback callback for provided filename - * @returns {void} + * @param {Iterable} modules the sortable Set to get the size of + * @returns {Record} the sizes of the modules */ -const doStat = (fs, filename, callback) => { - if ("lstat" in fs) { - fs.lstat(filename, callback); - } else { - fs.stat(filename, callback); +const getModulesSizes = modules => { + let sizes = Object.create(null); + for (const module of modules) { + for (const type of module.getSourceTypes()) { + sizes[type] = (sizes[type] || 0) + module.size(type); + } } + return sizes; }; /** - * @param {OutputFileSystem} fs filesystem - * @param {string} outputPath output path - * @param {boolean} dry only log instead of fs modification - * @param {Logger} logger logger - * @param {Set} diff filenames of the assets that shouldn't be there - * @param {function(string): boolean} isKept check if the entry is ignored - * @param {function(Error=): void} callback callback - * @returns {void} + * @param {Chunk} a chunk + * @param {Chunk} b chunk + * @returns {boolean} true, if a is always a parent of b */ -const applyDiff = (fs, outputPath, dry, logger, diff, isKept, callback) => { - const log = msg => { - if (dry) { - logger.info(msg); - } else { - logger.log(msg); +const isAvailableChunk = (a, b) => { + const queue = new Set(b.groupsIterable); + for (const chunkGroup of queue) { + if (a.isInGroup(chunkGroup)) continue; + if (chunkGroup.isInitial()) return false; + for (const parent of chunkGroup.parentsIterable) { + queue.add(parent); } - }; - /** @typedef {{ type: "check" | "unlink" | "rmdir", filename: string, parent: { remaining: number, job: Job } | undefined }} Job */ - /** @type {Job[]} */ - const jobs = Array.from(diff, filename => ({ - type: "check", - filename, - parent: undefined - })); - processAsyncTree( - jobs, - 10, - ({ type, filename, parent }, push, callback) => { - const handleError = err => { - if (err.code === "ENOENT") { - log(`${filename} was removed during cleaning by something else`); - handleParent(); - return callback(); - } - return callback(err); - }; - const handleParent = () => { - if (parent && --parent.remaining === 0) push(parent.job); - }; - const path = join(fs, outputPath, filename); - switch (type) { - case "check": - if (isKept(filename)) { - // do not decrement parent entry as we don't want to delete the parent - log(`${filename} will be kept`); - return process.nextTick(callback); - } - doStat(fs, path, (err, stats) => { - if (err) return handleError(err); - if (!stats.isDirectory()) { - push({ - type: "unlink", - filename, - parent - }); - return callback(); - } - fs.readdir(path, (err, entries) => { - if (err) return handleError(err); - /** @type {Job} */ - const deleteJob = { - type: "rmdir", - filename, - parent - }; - if (entries.length === 0) { - push(deleteJob); - } else { - const parentToken = { - remaining: entries.length, - job: deleteJob - }; - for (const entry of entries) { - const file = /** @type {string} */ (entry); - if (file.startsWith(".")) { - log( - `${filename} will be kept (dot-files will never be removed)` - ); - continue; - } - push({ - type: "check", - filename: `${filename}/${file}`, - parent: parentToken - }); - } - } - return callback(); - }); - }); - break; - case "rmdir": - log(`${filename} will be removed`); - if (dry) { - handleParent(); - return process.nextTick(callback); - } - if (!fs.rmdir) { - logger.warn( - `${filename} can't be removed because output file system doesn't support removing directories (rmdir)` - ); - return process.nextTick(callback); - } - fs.rmdir(path, err => { - if (err) return handleError(err); - handleParent(); - callback(); - }); - break; - case "unlink": - log(`${filename} will be removed`); - if (dry) { - handleParent(); - return process.nextTick(callback); - } - if (!fs.unlink) { - logger.warn( - `${filename} can't be removed because output file system doesn't support removing files (rmdir)` - ); - return process.nextTick(callback); - } - fs.unlink(path, err => { - if (err) return handleError(err); - handleParent(); - callback(); - }); - break; - } - }, - callback - ); + } + return true; }; -/** @type {WeakMap} */ -const compilationHooksMap = new WeakMap(); - -class CleanPlugin { - /** - * @param {Compilation} compilation the compilation - * @returns {CleanPluginCompilationHooks} the attached hooks - */ - static getCompilationHooks(compilation) { - if (!(compilation instanceof Compilation)) { - throw new TypeError( - "The 'compilation' argument must be an instance of Compilation" - ); +class ChunkGraphModule { + constructor() { + /** @type {SortableSet} */ + this.chunks = new SortableSet(); + /** @type {Set | undefined} */ + this.entryInChunks = undefined; + /** @type {Set | undefined} */ + this.runtimeInChunks = undefined; + /** @type {RuntimeSpecMap} */ + this.hashes = undefined; + /** @type {string | number} */ + this.id = null; + /** @type {RuntimeSpecMap> | undefined} */ + this.runtimeRequirements = undefined; + /** @type {RuntimeSpecMap} */ + this.graphHashes = undefined; + /** @type {RuntimeSpecMap} */ + this.graphHashesWithConnections = undefined; + } +} + +class ChunkGraphChunk { + constructor() { + /** @type {SortableSet} */ + this.modules = new SortableSet(); + /** @type {Map} */ + this.entryModules = new Map(); + /** @type {SortableSet} */ + this.runtimeModules = new SortableSet(); + /** @type {Set | undefined} */ + this.fullHashModules = undefined; + /** @type {Set | undefined} */ + this.dependentHashModules = undefined; + /** @type {Set | undefined} */ + this.runtimeRequirements = undefined; + /** @type {Set} */ + this.runtimeRequirementsInTree = new Set(); + } +} + +class ChunkGraph { + /** + * @param {ModuleGraph} moduleGraph the module graph + * @param {string | Hash} hashFunction the hash function to use + */ + constructor(moduleGraph, hashFunction = "md4") { + /** @private @type {WeakMap} */ + this._modules = new WeakMap(); + /** @private @type {WeakMap} */ + this._chunks = new WeakMap(); + /** @private @type {WeakMap} */ + this._blockChunkGroups = new WeakMap(); + /** @private @type {Map} */ + this._runtimeIds = new Map(); + /** @type {ModuleGraph} */ + this.moduleGraph = moduleGraph; + + this._hashFunction = hashFunction; + + this._getGraphRoots = this._getGraphRoots.bind(this); + } + + /** + * @private + * @param {Module} module the module + * @returns {ChunkGraphModule} internal module + */ + _getChunkGraphModule(module) { + let cgm = this._modules.get(module); + if (cgm === undefined) { + cgm = new ChunkGraphModule(); + this._modules.set(module, cgm); } - let hooks = compilationHooksMap.get(compilation); - if (hooks === undefined) { - hooks = { - /** @type {SyncBailHook<[string], boolean>} */ - keep: new SyncBailHook(["ignore"]) - }; - compilationHooksMap.set(compilation, hooks); + return cgm; + } + + /** + * @private + * @param {Chunk} chunk the chunk + * @returns {ChunkGraphChunk} internal chunk + */ + _getChunkGraphChunk(chunk) { + let cgc = this._chunks.get(chunk); + if (cgc === undefined) { + cgc = new ChunkGraphChunk(); + this._chunks.set(chunk, cgc); } - return hooks; + return cgc; } - /** @param {CleanOptions} options options */ - constructor(options = {}) { - validate(options); - this.options = { dry: false, ...options }; + /** + * @param {SortableSet} set the sortable Set to get the roots of + * @returns {Module[]} the graph roots + */ + _getGraphRoots(set) { + const { moduleGraph } = this; + return Array.from( + findGraphRoots(set, module => { + /** @type {Set} */ + const set = new Set(); + const addDependencies = module => { + for (const connection of moduleGraph.getOutgoingConnections(module)) { + if (!connection.module) continue; + const activeState = connection.getActiveState(undefined); + if (activeState === false) continue; + if (activeState === ModuleGraphConnection.TRANSITIVE_ONLY) { + addDependencies(connection.module); + continue; + } + set.add(connection.module); + } + }; + addDependencies(module); + return set; + }) + ).sort(compareModulesByIdentifier); } /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance + * @param {Chunk} chunk the new chunk + * @param {Module} module the module * @returns {void} */ - apply(compiler) { - const { dry, keep } = this.options; + connectChunkAndModule(chunk, module) { + const cgm = this._getChunkGraphModule(module); + const cgc = this._getChunkGraphChunk(chunk); + cgm.chunks.add(chunk); + cgc.modules.add(module); + } - const keepFn = - typeof keep === "function" - ? keep - : typeof keep === "string" - ? path => path.startsWith(keep) - : typeof keep === "object" && keep.test - ? path => keep.test(path) - : () => false; + /** + * @param {Chunk} chunk the chunk + * @param {Module} module the module + * @returns {void} + */ + disconnectChunkAndModule(chunk, module) { + const cgm = this._getChunkGraphModule(module); + const cgc = this._getChunkGraphChunk(chunk); + cgc.modules.delete(module); + cgm.chunks.delete(chunk); + } - // We assume that no external modification happens while the compiler is active - // So we can store the old assets and only diff to them to avoid fs access on - // incremental builds - let oldAssets; + /** + * @param {Chunk} chunk the chunk which will be disconnected + * @returns {void} + */ + disconnectChunk(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + for (const module of cgc.modules) { + const cgm = this._getChunkGraphModule(module); + cgm.chunks.delete(chunk); + } + cgc.modules.clear(); + chunk.disconnectFromGroups(); + ChunkGraph.clearChunkGraphForChunk(chunk); + } - compiler.hooks.emit.tapAsync( - { - name: "CleanPlugin", - stage: 100 - }, - (compilation, callback) => { - const hooks = CleanPlugin.getCompilationHooks(compilation); - const logger = compilation.getLogger("webpack.CleanPlugin"); - const fs = compiler.outputFileSystem; + /** + * @param {Chunk} chunk the chunk + * @param {Iterable} modules the modules + * @returns {void} + */ + attachModules(chunk, modules) { + const cgc = this._getChunkGraphChunk(chunk); + for (const module of modules) { + cgc.modules.add(module); + } + } - if (!fs.readdir) { - return callback( - new Error( - "CleanPlugin: Output filesystem doesn't support listing directories (readdir)" - ) - ); - } + /** + * @param {Chunk} chunk the chunk + * @param {Iterable} modules the runtime modules + * @returns {void} + */ + attachRuntimeModules(chunk, modules) { + const cgc = this._getChunkGraphChunk(chunk); + for (const module of modules) { + cgc.runtimeModules.add(module); + } + } - const currentAssets = new Set(); - for (const asset of Object.keys(compilation.assets)) { - if (/^[A-Za-z]:\\|^\/|^\\\\/.test(asset)) continue; - let normalizedAsset; - let newNormalizedAsset = asset.replace(/\\/g, "/"); - do { - normalizedAsset = newNormalizedAsset; - newNormalizedAsset = normalizedAsset.replace( - /(^|\/)(?!\.\.)[^/]+\/\.\.\//g, - "$1" - ); - } while (newNormalizedAsset !== normalizedAsset); - if (normalizedAsset.startsWith("../")) continue; - currentAssets.add(normalizedAsset); - } + /** + * @param {Chunk} chunk the chunk + * @param {Iterable} modules the modules that require a full hash + * @returns {void} + */ + attachFullHashModules(chunk, modules) { + const cgc = this._getChunkGraphChunk(chunk); + if (cgc.fullHashModules === undefined) cgc.fullHashModules = new Set(); + for (const module of modules) { + cgc.fullHashModules.add(module); + } + } - const outputPath = compilation.getPath(compiler.outputPath, {}); + /** + * @param {Chunk} chunk the chunk + * @param {Iterable} modules the modules that require a full hash + * @returns {void} + */ + attachDependentHashModules(chunk, modules) { + const cgc = this._getChunkGraphChunk(chunk); + if (cgc.dependentHashModules === undefined) + cgc.dependentHashModules = new Set(); + for (const module of modules) { + cgc.dependentHashModules.add(module); + } + } - const isKept = path => { - const result = hooks.keep.call(path); - if (result !== undefined) return result; - return keepFn(path); - }; + /** + * @param {Module} oldModule the replaced module + * @param {Module} newModule the replacing module + * @returns {void} + */ + replaceModule(oldModule, newModule) { + const oldCgm = this._getChunkGraphModule(oldModule); + const newCgm = this._getChunkGraphModule(newModule); - const diffCallback = (err, diff) => { - if (err) { - oldAssets = undefined; - return callback(err); + for (const chunk of oldCgm.chunks) { + const cgc = this._getChunkGraphChunk(chunk); + cgc.modules.delete(oldModule); + cgc.modules.add(newModule); + newCgm.chunks.add(chunk); + } + oldCgm.chunks.clear(); + + if (oldCgm.entryInChunks !== undefined) { + if (newCgm.entryInChunks === undefined) { + newCgm.entryInChunks = new Set(); + } + for (const chunk of oldCgm.entryInChunks) { + const cgc = this._getChunkGraphChunk(chunk); + const old = cgc.entryModules.get(oldModule); + /** @type {Map} */ + const newEntryModules = new Map(); + for (const [m, cg] of cgc.entryModules) { + if (m === oldModule) { + newEntryModules.set(newModule, old); + } else { + newEntryModules.set(m, cg); } - applyDiff(fs, outputPath, dry, logger, diff, isKept, err => { - if (err) { - oldAssets = undefined; - } else { - oldAssets = currentAssets; - } - callback(err); - }); - }; + } + cgc.entryModules = newEntryModules; + newCgm.entryInChunks.add(chunk); + } + oldCgm.entryInChunks = undefined; + } - if (oldAssets) { - diffCallback(null, getDiffToOldAssets(currentAssets, oldAssets)); - } else { - getDiffToFs(fs, outputPath, currentAssets, diffCallback); + if (oldCgm.runtimeInChunks !== undefined) { + if (newCgm.runtimeInChunks === undefined) { + newCgm.runtimeInChunks = new Set(); + } + for (const chunk of oldCgm.runtimeInChunks) { + const cgc = this._getChunkGraphChunk(chunk); + cgc.runtimeModules.delete(/** @type {RuntimeModule} */ (oldModule)); + cgc.runtimeModules.add(/** @type {RuntimeModule} */ (newModule)); + newCgm.runtimeInChunks.add(chunk); + if ( + cgc.fullHashModules !== undefined && + cgc.fullHashModules.has(/** @type {RuntimeModule} */ (oldModule)) + ) { + cgc.fullHashModules.delete(/** @type {RuntimeModule} */ (oldModule)); + cgc.fullHashModules.add(/** @type {RuntimeModule} */ (newModule)); + } + if ( + cgc.dependentHashModules !== undefined && + cgc.dependentHashModules.has(/** @type {RuntimeModule} */ (oldModule)) + ) { + cgc.dependentHashModules.delete( + /** @type {RuntimeModule} */ (oldModule) + ); + cgc.dependentHashModules.add( + /** @type {RuntimeModule} */ (newModule) + ); } } - ); + oldCgm.runtimeInChunks = undefined; + } } -} - -module.exports = CleanPlugin; + /** + * @param {Module} module the checked module + * @param {Chunk} chunk the checked chunk + * @returns {boolean} true, if the chunk contains the module + */ + isModuleInChunk(module, chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.modules.has(module); + } -/***/ }), + /** + * @param {Module} module the checked module + * @param {ChunkGroup} chunkGroup the checked chunk group + * @returns {boolean} true, if the chunk contains the module + */ + isModuleInChunkGroup(module, chunkGroup) { + for (const chunk of chunkGroup.chunks) { + if (this.isModuleInChunk(module, chunk)) return true; + } + return false; + } -/***/ 43604: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + /** + * @param {Module} module the checked module + * @returns {boolean} true, if the module is entry of any chunk + */ + isEntryModule(module) { + const cgm = this._getChunkGraphModule(module); + return cgm.entryInChunks !== undefined; + } -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ + /** + * @param {Module} module the module + * @returns {Iterable} iterable of chunks (do not modify) + */ + getModuleChunksIterable(module) { + const cgm = this._getChunkGraphModule(module); + return cgm.chunks; + } + /** + * @param {Module} module the module + * @param {function(Chunk, Chunk): -1|0|1} sortFn sort function + * @returns {Iterable} iterable of chunks (do not modify) + */ + getOrderedModuleChunksIterable(module, sortFn) { + const cgm = this._getChunkGraphModule(module); + cgm.chunks.sortWith(sortFn); + return cgm.chunks; + } + /** + * @param {Module} module the module + * @returns {Chunk[]} array of chunks (cached, do not modify) + */ + getModuleChunks(module) { + const cgm = this._getChunkGraphModule(module); + return cgm.chunks.getFromCache(getArray); + } -const WebpackError = __webpack_require__(68422); + /** + * @param {Module} module the module + * @returns {number} the number of chunk which contain the module + */ + getNumberOfModuleChunks(module) { + const cgm = this._getChunkGraphModule(module); + return cgm.chunks.size; + } -/** @typedef {import("./Module")} Module */ + /** + * @param {Module} module the module + * @returns {RuntimeSpecSet} runtimes + */ + getModuleRuntimes(module) { + const cgm = this._getChunkGraphModule(module); + return cgm.chunks.getFromUnorderedCache(getModuleRuntimes); + } -class CodeGenerationError extends WebpackError { /** - * Create a new CodeGenerationError - * @param {Module} module related module - * @param {Error} error Original error + * @param {Chunk} chunk the chunk + * @returns {number} the number of modules which are contained in this chunk */ - constructor(module, error) { - super(); + getNumberOfChunkModules(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.modules.size; + } - this.name = "CodeGenerationError"; - this.error = error; - this.message = error.message; - this.details = error.stack; - this.module = module; + /** + * @param {Chunk} chunk the chunk + * @returns {number} the number of full hash modules which are contained in this chunk + */ + getNumberOfChunkFullHashModules(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.fullHashModules === undefined ? 0 : cgc.fullHashModules.size; } -} -module.exports = CodeGenerationError; + /** + * @param {Chunk} chunk the chunk + * @returns {Iterable} return the modules for this chunk + */ + getChunkModulesIterable(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.modules; + } + /** + * @param {Chunk} chunk the chunk + * @param {string} sourceType source type + * @returns {Iterable | undefined} return the modules for this chunk + */ + getChunkModulesIterableBySourceType(chunk, sourceType) { + const cgc = this._getChunkGraphChunk(chunk); + const modulesWithSourceType = cgc.modules + .getFromUnorderedCache(modulesBySourceType) + .get(sourceType); + return modulesWithSourceType; + } -/***/ }), + /** + * @param {Chunk} chunk the chunk + * @param {function(Module, Module): -1|0|1} comparator comparator function + * @returns {Iterable} return the modules for this chunk + */ + getOrderedChunkModulesIterable(chunk, comparator) { + const cgc = this._getChunkGraphChunk(chunk); + cgc.modules.sortWith(comparator); + return cgc.modules; + } -/***/ 74841: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + /** + * @param {Chunk} chunk the chunk + * @param {string} sourceType source type + * @param {function(Module, Module): -1|0|1} comparator comparator function + * @returns {Iterable | undefined} return the modules for this chunk + */ + getOrderedChunkModulesIterableBySourceType(chunk, sourceType, comparator) { + const cgc = this._getChunkGraphChunk(chunk); + const modulesWithSourceType = cgc.modules + .getFromUnorderedCache(modulesBySourceType) + .get(sourceType); + if (modulesWithSourceType === undefined) return undefined; + modulesWithSourceType.sortWith(comparator); + return modulesWithSourceType; + } -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ + /** + * @param {Chunk} chunk the chunk + * @returns {Module[]} return the modules for this chunk (cached, do not modify) + */ + getChunkModules(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.modules.getFromUnorderedCache(getArray); + } + /** + * @param {Chunk} chunk the chunk + * @param {function(Module, Module): -1|0|1} comparator comparator function + * @returns {Module[]} return the modules for this chunk (cached, do not modify) + */ + getOrderedChunkModules(chunk, comparator) { + const cgc = this._getChunkGraphChunk(chunk); + const arrayFunction = createOrderedArrayFunction(comparator); + return cgc.modules.getFromUnorderedCache(arrayFunction); + } + /** + * @param {Chunk} chunk the chunk + * @param {ModuleFilterPredicate} filterFn function used to filter modules + * @param {boolean} includeAllChunks all chunks or only async chunks + * @returns {Record} chunk to module ids object + */ + getChunkModuleIdMap(chunk, filterFn, includeAllChunks = false) { + /** @type {Record} */ + const chunkModuleIdMap = Object.create(null); -const { provide } = __webpack_require__(30498); -const { first } = __webpack_require__(34715); -const createHash = __webpack_require__(24123); -const { runtimeToString, RuntimeSpecMap } = __webpack_require__(19655); + for (const asyncChunk of includeAllChunks + ? chunk.getAllReferencedChunks() + : chunk.getAllAsyncChunks()) { + /** @type {(string|number)[]} */ + let array; + for (const module of this.getOrderedChunkModulesIterable( + asyncChunk, + compareModulesById(this) + )) { + if (filterFn(module)) { + if (array === undefined) { + array = []; + chunkModuleIdMap[asyncChunk.id] = array; + } + const moduleId = this.getModuleId(module); + array.push(moduleId); + } + } + } -/** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("./Module")} Module */ -/** @typedef {import("./Module").CodeGenerationResult} CodeGenerationResult */ -/** @typedef {typeof import("./util/Hash")} Hash */ -/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ + return chunkModuleIdMap; + } -class CodeGenerationResults { /** - * @param {string | Hash} hashFunction the hash function to use + * @param {Chunk} chunk the chunk + * @param {ModuleFilterPredicate} filterFn function used to filter modules + * @param {number} hashLength length of the hash + * @param {boolean} includeAllChunks all chunks or only async chunks + * @returns {Record>} chunk to module id to module hash object */ - constructor(hashFunction = "md4") { - /** @type {Map>} */ - this.map = new Map(); - this._hashFunction = hashFunction; + getChunkModuleRenderedHashMap( + chunk, + filterFn, + hashLength = 0, + includeAllChunks = false + ) { + /** @type {Record>} */ + const chunkModuleHashMap = Object.create(null); + + for (const asyncChunk of includeAllChunks + ? chunk.getAllReferencedChunks() + : chunk.getAllAsyncChunks()) { + /** @type {Record} */ + let idToHashMap; + for (const module of this.getOrderedChunkModulesIterable( + asyncChunk, + compareModulesById(this) + )) { + if (filterFn(module)) { + if (idToHashMap === undefined) { + idToHashMap = Object.create(null); + chunkModuleHashMap[asyncChunk.id] = idToHashMap; + } + const moduleId = this.getModuleId(module); + const hash = this.getRenderedModuleHash(module, asyncChunk.runtime); + idToHashMap[moduleId] = hashLength ? hash.slice(0, hashLength) : hash; + } + } + } + + return chunkModuleHashMap; } /** - * @param {Module} module the module - * @param {RuntimeSpec} runtime runtime(s) - * @returns {CodeGenerationResult} the CodeGenerationResult + * @param {Chunk} chunk the chunk + * @param {ChunkFilterPredicate} filterFn function used to filter chunks + * @returns {Record} chunk map */ - get(module, runtime) { - const entry = this.map.get(module); - if (entry === undefined) { - throw new Error( - `No code generation entry for ${module.identifier()} (existing entries: ${Array.from( - this.map.keys(), - m => m.identifier() - ).join(", ")})` - ); + getChunkConditionMap(chunk, filterFn) { + const map = Object.create(null); + for (const c of chunk.getAllReferencedChunks()) { + map[c.id] = filterFn(c, this); } - if (runtime === undefined) { - if (entry.size > 1) { - const results = new Set(entry.values()); - if (results.size !== 1) { - throw new Error( - `No unique code generation entry for unspecified runtime for ${module.identifier()} (existing runtimes: ${Array.from( - entry.keys(), - r => runtimeToString(r) - ).join(", ")}). -Caller might not support runtime-dependent code generation (opt-out via optimization.usedExports: "global").` - ); + return map; + } + + /** + * @param {Chunk} chunk the chunk + * @param {ModuleFilterPredicate} filterFn predicate function used to filter modules + * @param {ChunkFilterPredicate=} filterChunkFn predicate function used to filter chunks + * @returns {boolean} return true if module exists in graph + */ + hasModuleInGraph(chunk, filterFn, filterChunkFn) { + const queue = new Set(chunk.groupsIterable); + const chunksProcessed = new Set(); + + for (const chunkGroup of queue) { + for (const innerChunk of chunkGroup.chunks) { + if (!chunksProcessed.has(innerChunk)) { + chunksProcessed.add(innerChunk); + if (!filterChunkFn || filterChunkFn(innerChunk, this)) { + for (const module of this.getChunkModulesIterable(innerChunk)) { + if (filterFn(module)) { + return true; + } + } + } } - return first(results); } - return entry.values().next().value; - } - const result = entry.get(runtime); - if (result === undefined) { - throw new Error( - `No code generation entry for runtime ${runtimeToString( - runtime - )} for ${module.identifier()} (existing runtimes: ${Array.from( - entry.keys(), - r => runtimeToString(r) - ).join(", ")})` - ); + for (const child of chunkGroup.childrenIterable) { + queue.add(child); + } } - return result; + return false; } /** - * @param {Module} module the module - * @param {RuntimeSpec} runtime runtime(s) - * @returns {boolean} true, when we have data for this + * @param {Chunk} chunkA first chunk + * @param {Chunk} chunkB second chunk + * @returns {-1|0|1} this is a comparator function like sort and returns -1, 0, or 1 based on sort order */ - has(module, runtime) { - const entry = this.map.get(module); - if (entry === undefined) { - return false; - } - if (runtime !== undefined) { - return entry.has(runtime); - } else if (entry.size > 1) { - const results = new Set(entry.values()); - return results.size === 1; - } else { - return entry.size === 1; - } + compareChunks(chunkA, chunkB) { + const cgcA = this._getChunkGraphChunk(chunkA); + const cgcB = this._getChunkGraphChunk(chunkB); + if (cgcA.modules.size > cgcB.modules.size) return -1; + if (cgcA.modules.size < cgcB.modules.size) return 1; + cgcA.modules.sortWith(compareModulesByIdentifier); + cgcB.modules.sortWith(compareModulesByIdentifier); + return compareModuleIterables(cgcA.modules, cgcB.modules); } /** - * @param {Module} module the module - * @param {RuntimeSpec} runtime runtime(s) - * @param {string} sourceType the source type - * @returns {Source} a source + * @param {Chunk} chunk the chunk + * @returns {number} total size of all modules in the chunk */ - getSource(module, runtime, sourceType) { - return this.get(module, runtime).sources.get(sourceType); + getChunkModulesSize(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.modules.getFromUnorderedCache(getModulesSize); } /** - * @param {Module} module the module - * @param {RuntimeSpec} runtime runtime(s) - * @returns {ReadonlySet} runtime requirements + * @param {Chunk} chunk the chunk + * @returns {Record} total sizes of all modules in the chunk by source type */ - getRuntimeRequirements(module, runtime) { - return this.get(module, runtime).runtimeRequirements; + getChunkModulesSizes(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.modules.getFromUnorderedCache(getModulesSizes); } /** - * @param {Module} module the module - * @param {RuntimeSpec} runtime runtime(s) - * @param {string} key data key - * @returns {any} data generated by code generation + * @param {Chunk} chunk the chunk + * @returns {Module[]} root modules of the chunks (ordered by identifier) */ - getData(module, runtime, key) { - const data = this.get(module, runtime).data; - return data === undefined ? undefined : data.get(key); + getChunkRootModules(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.modules.getFromUnorderedCache(this._getGraphRoots); } /** - * @param {Module} module the module - * @param {RuntimeSpec} runtime runtime(s) - * @returns {any} hash of the code generation + * @param {Chunk} chunk the chunk + * @param {ChunkSizeOptions} options options object + * @returns {number} total size of the chunk */ - getHash(module, runtime) { - const info = this.get(module, runtime); - if (info.hash !== undefined) return info.hash; - const hash = createHash(this._hashFunction); - for (const [type, source] of info.sources) { - hash.update(type); - source.updateHash(hash); - } - if (info.runtimeRequirements) { - for (const rr of info.runtimeRequirements) hash.update(rr); - } - return (info.hash = /** @type {string} */ (hash.digest("hex"))); + getChunkSize(chunk, options = {}) { + const cgc = this._getChunkGraphChunk(chunk); + const modulesSize = cgc.modules.getFromUnorderedCache(getModulesSize); + const chunkOverhead = + typeof options.chunkOverhead === "number" ? options.chunkOverhead : 10000; + const entryChunkMultiplicator = + typeof options.entryChunkMultiplicator === "number" + ? options.entryChunkMultiplicator + : 10; + return ( + chunkOverhead + + modulesSize * (chunk.canBeInitial() ? entryChunkMultiplicator : 1) + ); } /** - * @param {Module} module the module - * @param {RuntimeSpec} runtime runtime(s) - * @param {CodeGenerationResult} result result from module - * @returns {void} + * @param {Chunk} chunkA chunk + * @param {Chunk} chunkB chunk + * @param {ChunkSizeOptions} options options object + * @returns {number} total size of the chunk or false if chunks can't be integrated */ - add(module, runtime, result) { - const map = provide(this.map, module, () => new RuntimeSpecMap()); - map.set(runtime, result); + getIntegratedChunksSize(chunkA, chunkB, options = {}) { + const cgcA = this._getChunkGraphChunk(chunkA); + const cgcB = this._getChunkGraphChunk(chunkB); + const allModules = new Set(cgcA.modules); + for (const m of cgcB.modules) allModules.add(m); + let modulesSize = getModulesSize(allModules); + const chunkOverhead = + typeof options.chunkOverhead === "number" ? options.chunkOverhead : 10000; + const entryChunkMultiplicator = + typeof options.entryChunkMultiplicator === "number" + ? options.entryChunkMultiplicator + : 10; + return ( + chunkOverhead + + modulesSize * + (chunkA.canBeInitial() || chunkB.canBeInitial() + ? entryChunkMultiplicator + : 1) + ); } -} - -module.exports = CodeGenerationResults; + /** + * @param {Chunk} chunkA chunk + * @param {Chunk} chunkB chunk + * @returns {boolean} true, if chunks could be integrated + */ + canChunksBeIntegrated(chunkA, chunkB) { + if (chunkA.preventIntegration || chunkB.preventIntegration) { + return false; + } -/***/ }), - -/***/ 28151: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - + const hasRuntimeA = chunkA.hasRuntime(); + const hasRuntimeB = chunkB.hasRuntime(); + if (hasRuntimeA !== hasRuntimeB) { + if (hasRuntimeA) { + return isAvailableChunk(chunkA, chunkB); + } else if (hasRuntimeB) { + return isAvailableChunk(chunkB, chunkA); + } else { + return false; + } + } -const WebpackError = __webpack_require__(68422); -const makeSerializable = __webpack_require__(26522); + if ( + this.getNumberOfEntryModules(chunkA) > 0 || + this.getNumberOfEntryModules(chunkB) > 0 + ) { + return false; + } -/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ + return true; + } -class CommentCompilationWarning extends WebpackError { /** - * - * @param {string} message warning message - * @param {DependencyLocation} loc affected lines of code + * @param {Chunk} chunkA the target chunk + * @param {Chunk} chunkB the chunk to integrate + * @returns {void} */ - constructor(message, loc) { - super(message); - - this.name = "CommentCompilationWarning"; - - this.loc = loc; - } -} + integrateChunks(chunkA, chunkB) { + // Decide for one name (deterministic) + if (chunkA.name && chunkB.name) { + if ( + this.getNumberOfEntryModules(chunkA) > 0 === + this.getNumberOfEntryModules(chunkB) > 0 + ) { + // When both chunks have entry modules or none have one, use + // shortest name + if (chunkA.name.length !== chunkB.name.length) { + chunkA.name = + chunkA.name.length < chunkB.name.length ? chunkA.name : chunkB.name; + } else { + chunkA.name = chunkA.name < chunkB.name ? chunkA.name : chunkB.name; + } + } else if (this.getNumberOfEntryModules(chunkB) > 0) { + // Pick the name of the chunk with the entry module + chunkA.name = chunkB.name; + } + } else if (chunkB.name) { + chunkA.name = chunkB.name; + } -makeSerializable( - CommentCompilationWarning, - "webpack/lib/CommentCompilationWarning" -); + // Merge id name hints + for (const hint of chunkB.idNameHints) { + chunkA.idNameHints.add(hint); + } -module.exports = CommentCompilationWarning; + // Merge runtime + chunkA.runtime = mergeRuntime(chunkA.runtime, chunkB.runtime); + // getChunkModules is used here to create a clone, because disconnectChunkAndModule modifies + for (const module of this.getChunkModules(chunkB)) { + this.disconnectChunkAndModule(chunkB, module); + this.connectChunkAndModule(chunkA, module); + } -/***/ }), + for (const [module, chunkGroup] of Array.from( + this.getChunkEntryModulesWithChunkGroupIterable(chunkB) + )) { + this.disconnectChunkAndEntryModule(chunkB, module); + this.connectChunkAndEntryModule(chunkA, module, chunkGroup); + } -/***/ 27847: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + for (const chunkGroup of chunkB.groupsIterable) { + chunkGroup.replaceChunk(chunkB, chunkA); + chunkA.addGroup(chunkGroup); + chunkB.removeGroup(chunkGroup); + } + ChunkGraph.clearChunkGraphForChunk(chunkB); + } -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ + /** + * @param {Chunk} chunk the chunk to upgrade + * @returns {void} + */ + upgradeDependentToFullHashModules(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + if (cgc.dependentHashModules === undefined) return; + if (cgc.fullHashModules === undefined) { + cgc.fullHashModules = cgc.dependentHashModules; + } else { + for (const m of cgc.dependentHashModules) { + cgc.fullHashModules.add(m); + } + cgc.dependentHashModules = undefined; + } + } + /** + * @param {Module} module the checked module + * @param {Chunk} chunk the checked chunk + * @returns {boolean} true, if the chunk contains the module as entry + */ + isEntryModuleInChunk(module, chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.entryModules.has(module); + } + /** + * @param {Chunk} chunk the new chunk + * @param {Module} module the entry module + * @param {Entrypoint=} entrypoint the chunk group which must be loaded before the module is executed + * @returns {void} + */ + connectChunkAndEntryModule(chunk, module, entrypoint) { + const cgm = this._getChunkGraphModule(module); + const cgc = this._getChunkGraphChunk(chunk); + if (cgm.entryInChunks === undefined) { + cgm.entryInChunks = new Set(); + } + cgm.entryInChunks.add(chunk); + cgc.entryModules.set(module, entrypoint); + } -const ConstDependency = __webpack_require__(60864); + /** + * @param {Chunk} chunk the new chunk + * @param {RuntimeModule} module the runtime module + * @returns {void} + */ + connectChunkAndRuntimeModule(chunk, module) { + const cgm = this._getChunkGraphModule(module); + const cgc = this._getChunkGraphChunk(chunk); + if (cgm.runtimeInChunks === undefined) { + cgm.runtimeInChunks = new Set(); + } + cgm.runtimeInChunks.add(chunk); + cgc.runtimeModules.add(module); + } -/** @typedef {import("./Compiler")} Compiler */ -/** @typedef {import("./javascript/JavascriptParser")} JavascriptParser */ + /** + * @param {Chunk} chunk the new chunk + * @param {RuntimeModule} module the module that require a full hash + * @returns {void} + */ + addFullHashModuleToChunk(chunk, module) { + const cgc = this._getChunkGraphChunk(chunk); + if (cgc.fullHashModules === undefined) cgc.fullHashModules = new Set(); + cgc.fullHashModules.add(module); + } -const nestedWebpackRequireTag = Symbol("nested __webpack_require__"); + /** + * @param {Chunk} chunk the new chunk + * @param {RuntimeModule} module the module that require a full hash + * @returns {void} + */ + addDependentHashModuleToChunk(chunk, module) { + const cgc = this._getChunkGraphChunk(chunk); + if (cgc.dependentHashModules === undefined) + cgc.dependentHashModules = new Set(); + cgc.dependentHashModules.add(module); + } -class CompatibilityPlugin { /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance + * @param {Chunk} chunk the new chunk + * @param {Module} module the entry module * @returns {void} */ - apply(compiler) { - compiler.hooks.compilation.tap( - "CompatibilityPlugin", - (compilation, { normalModuleFactory }) => { - compilation.dependencyTemplates.set( - ConstDependency, - new ConstDependency.Template() - ); + disconnectChunkAndEntryModule(chunk, module) { + const cgm = this._getChunkGraphModule(module); + const cgc = this._getChunkGraphChunk(chunk); + cgm.entryInChunks.delete(chunk); + if (cgm.entryInChunks.size === 0) { + cgm.entryInChunks = undefined; + } + cgc.entryModules.delete(module); + } - normalModuleFactory.hooks.parser - .for("javascript/auto") - .tap("CompatibilityPlugin", (parser, parserOptions) => { - if ( - parserOptions.browserify !== undefined && - !parserOptions.browserify - ) + /** + * @param {Chunk} chunk the new chunk + * @param {RuntimeModule} module the runtime module + * @returns {void} + */ + disconnectChunkAndRuntimeModule(chunk, module) { + const cgm = this._getChunkGraphModule(module); + const cgc = this._getChunkGraphChunk(chunk); + cgm.runtimeInChunks.delete(chunk); + if (cgm.runtimeInChunks.size === 0) { + cgm.runtimeInChunks = undefined; + } + cgc.runtimeModules.delete(module); + } + + /** + * @param {Module} module the entry module, it will no longer be entry + * @returns {void} + */ + disconnectEntryModule(module) { + const cgm = this._getChunkGraphModule(module); + for (const chunk of cgm.entryInChunks) { + const cgc = this._getChunkGraphChunk(chunk); + cgc.entryModules.delete(module); + } + cgm.entryInChunks = undefined; + } + + /** + * @param {Chunk} chunk the chunk, for which all entries will be removed + * @returns {void} + */ + disconnectEntries(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + for (const module of cgc.entryModules.keys()) { + const cgm = this._getChunkGraphModule(module); + cgm.entryInChunks.delete(chunk); + if (cgm.entryInChunks.size === 0) { + cgm.entryInChunks = undefined; + } + } + cgc.entryModules.clear(); + } + + /** + * @param {Chunk} chunk the chunk + * @returns {number} the amount of entry modules in chunk + */ + getNumberOfEntryModules(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.entryModules.size; + } + + /** + * @param {Chunk} chunk the chunk + * @returns {number} the amount of entry modules in chunk + */ + getNumberOfRuntimeModules(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.runtimeModules.size; + } + + /** + * @param {Chunk} chunk the chunk + * @returns {Iterable} iterable of modules (do not modify) + */ + getChunkEntryModulesIterable(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.entryModules.keys(); + } + + /** + * @param {Chunk} chunk the chunk + * @returns {Iterable} iterable of chunks + */ + getChunkEntryDependentChunksIterable(chunk) { + /** @type {Set} */ + const set = new Set(); + for (const chunkGroup of chunk.groupsIterable) { + if (chunkGroup instanceof Entrypoint) { + const entrypointChunk = chunkGroup.getEntrypointChunk(); + const cgc = this._getChunkGraphChunk(entrypointChunk); + for (const chunkGroup of cgc.entryModules.values()) { + for (const c of chunkGroup.chunks) { + if (c !== chunk && c !== entrypointChunk && !c.hasRuntime()) { + set.add(c); + } + } + } + } + } + + return set; + } + + /** + * @param {Chunk} chunk the chunk + * @returns {boolean} true, when it has dependent chunks + */ + hasChunkEntryDependentChunks(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + for (const chunkGroup of cgc.entryModules.values()) { + for (const c of chunkGroup.chunks) { + if (c !== chunk) { + return true; + } + } + } + return false; + } + + /** + * @param {Chunk} chunk the chunk + * @returns {Iterable} iterable of modules (do not modify) + */ + getChunkRuntimeModulesIterable(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.runtimeModules; + } + + /** + * @param {Chunk} chunk the chunk + * @returns {RuntimeModule[]} array of modules in order of execution + */ + getChunkRuntimeModulesInOrder(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + const array = Array.from(cgc.runtimeModules); + array.sort( + concatComparators( + compareSelect( + /** + * @param {RuntimeModule} r runtime module + * @returns {number=} stage + */ + r => r.stage, + compareIds + ), + compareModulesByIdentifier + ) + ); + return array; + } + + /** + * @param {Chunk} chunk the chunk + * @returns {Iterable | undefined} iterable of modules (do not modify) + */ + getChunkFullHashModulesIterable(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.fullHashModules; + } + + /** + * @param {Chunk} chunk the chunk + * @returns {ReadonlySet | undefined} set of modules (do not modify) + */ + getChunkFullHashModulesSet(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.fullHashModules; + } + + /** + * @param {Chunk} chunk the chunk + * @returns {Iterable | undefined} iterable of modules (do not modify) + */ + getChunkDependentHashModulesIterable(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.dependentHashModules; + } + + /** @typedef {[Module, Entrypoint | undefined]} EntryModuleWithChunkGroup */ + + /** + * @param {Chunk} chunk the chunk + * @returns {Iterable} iterable of modules (do not modify) + */ + getChunkEntryModulesWithChunkGroupIterable(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.entryModules; + } + + /** + * @param {AsyncDependenciesBlock} depBlock the async block + * @returns {ChunkGroup} the chunk group + */ + getBlockChunkGroup(depBlock) { + return this._blockChunkGroups.get(depBlock); + } + + /** + * @param {AsyncDependenciesBlock} depBlock the async block + * @param {ChunkGroup} chunkGroup the chunk group + * @returns {void} + */ + connectBlockAndChunkGroup(depBlock, chunkGroup) { + this._blockChunkGroups.set(depBlock, chunkGroup); + chunkGroup.addBlock(depBlock); + } + + /** + * @param {ChunkGroup} chunkGroup the chunk group + * @returns {void} + */ + disconnectChunkGroup(chunkGroup) { + for (const block of chunkGroup.blocksIterable) { + this._blockChunkGroups.delete(block); + } + // TODO refactor by moving blocks list into ChunkGraph + chunkGroup._blocks.clear(); + } + + /** + * @param {Module} module the module + * @returns {string | number} the id of the module + */ + getModuleId(module) { + const cgm = this._getChunkGraphModule(module); + return cgm.id; + } + + /** + * @param {Module} module the module + * @param {string | number} id the id of the module + * @returns {void} + */ + setModuleId(module, id) { + const cgm = this._getChunkGraphModule(module); + cgm.id = id; + } + + /** + * @param {string} runtime runtime + * @returns {string | number} the id of the runtime + */ + getRuntimeId(runtime) { + return this._runtimeIds.get(runtime); + } + + /** + * @param {string} runtime runtime + * @param {string | number} id the id of the runtime + * @returns {void} + */ + setRuntimeId(runtime, id) { + this._runtimeIds.set(runtime, id); + } + + /** + * @template T + * @param {Module} module the module + * @param {RuntimeSpecMap} hashes hashes data + * @param {RuntimeSpec} runtime the runtime + * @returns {T} hash + */ + _getModuleHashInfo(module, hashes, runtime) { + if (!hashes) { + throw new Error( + `Module ${module.identifier()} has no hash info for runtime ${runtimeToString( + runtime + )} (hashes not set at all)` + ); + } else if (runtime === undefined) { + const hashInfoItems = new Set(hashes.values()); + if (hashInfoItems.size !== 1) { + throw new Error( + `No unique hash info entry for unspecified runtime for ${module.identifier()} (existing runtimes: ${Array.from( + hashes.keys(), + r => runtimeToString(r) + ).join(", ")}). +Caller might not support runtime-dependent code generation (opt-out via optimization.usedExports: "global").` + ); + } + return first(hashInfoItems); + } else { + const hashInfo = hashes.get(runtime); + if (!hashInfo) { + throw new Error( + `Module ${module.identifier()} has no hash info for runtime ${runtimeToString( + runtime + )} (available runtimes ${Array.from( + hashes.keys(), + runtimeToString + ).join(", ")})` + ); + } + return hashInfo; + } + } + + /** + * @param {Module} module the module + * @param {RuntimeSpec} runtime the runtime + * @returns {boolean} true, if the module has hashes for this runtime + */ + hasModuleHashes(module, runtime) { + const cgm = this._getChunkGraphModule(module); + const hashes = cgm.hashes; + return hashes && hashes.has(runtime); + } + + /** + * @param {Module} module the module + * @param {RuntimeSpec} runtime the runtime + * @returns {string} hash + */ + getModuleHash(module, runtime) { + const cgm = this._getChunkGraphModule(module); + const hashes = cgm.hashes; + return this._getModuleHashInfo(module, hashes, runtime).hash; + } + + /** + * @param {Module} module the module + * @param {RuntimeSpec} runtime the runtime + * @returns {string} hash + */ + getRenderedModuleHash(module, runtime) { + const cgm = this._getChunkGraphModule(module); + const hashes = cgm.hashes; + return this._getModuleHashInfo(module, hashes, runtime).renderedHash; + } + + /** + * @param {Module} module the module + * @param {RuntimeSpec} runtime the runtime + * @param {string} hash the full hash + * @param {string} renderedHash the shortened hash for rendering + * @returns {void} + */ + setModuleHashes(module, runtime, hash, renderedHash) { + const cgm = this._getChunkGraphModule(module); + if (cgm.hashes === undefined) { + cgm.hashes = new RuntimeSpecMap(); + } + cgm.hashes.set(runtime, new ModuleHashInfo(hash, renderedHash)); + } + + /** + * @param {Module} module the module + * @param {RuntimeSpec} runtime the runtime + * @param {Set} items runtime requirements to be added (ownership of this Set is given to ChunkGraph when transferOwnership not false) + * @param {boolean} transferOwnership true: transfer ownership of the items object, false: items is immutable and shared and won't be modified + * @returns {void} + */ + addModuleRuntimeRequirements( + module, + runtime, + items, + transferOwnership = true + ) { + const cgm = this._getChunkGraphModule(module); + const runtimeRequirementsMap = cgm.runtimeRequirements; + if (runtimeRequirementsMap === undefined) { + const map = new RuntimeSpecMap(); + // TODO avoid cloning item and track ownership instead + map.set(runtime, transferOwnership ? items : new Set(items)); + cgm.runtimeRequirements = map; + return; + } + runtimeRequirementsMap.update(runtime, runtimeRequirements => { + if (runtimeRequirements === undefined) { + return transferOwnership ? items : new Set(items); + } else if (!transferOwnership || runtimeRequirements.size >= items.size) { + for (const item of items) runtimeRequirements.add(item); + return runtimeRequirements; + } else { + for (const item of runtimeRequirements) items.add(item); + return items; + } + }); + } + + /** + * @param {Chunk} chunk the chunk + * @param {Set} items runtime requirements to be added (ownership of this Set is given to ChunkGraph) + * @returns {void} + */ + addChunkRuntimeRequirements(chunk, items) { + const cgc = this._getChunkGraphChunk(chunk); + const runtimeRequirements = cgc.runtimeRequirements; + if (runtimeRequirements === undefined) { + cgc.runtimeRequirements = items; + } else if (runtimeRequirements.size >= items.size) { + for (const item of items) runtimeRequirements.add(item); + } else { + for (const item of runtimeRequirements) items.add(item); + cgc.runtimeRequirements = items; + } + } + + /** + * @param {Chunk} chunk the chunk + * @param {Iterable} items runtime requirements to be added + * @returns {void} + */ + addTreeRuntimeRequirements(chunk, items) { + const cgc = this._getChunkGraphChunk(chunk); + const runtimeRequirements = cgc.runtimeRequirementsInTree; + for (const item of items) runtimeRequirements.add(item); + } + + /** + * @param {Module} module the module + * @param {RuntimeSpec} runtime the runtime + * @returns {ReadonlySet} runtime requirements + */ + getModuleRuntimeRequirements(module, runtime) { + const cgm = this._getChunkGraphModule(module); + const runtimeRequirements = + cgm.runtimeRequirements && cgm.runtimeRequirements.get(runtime); + return runtimeRequirements === undefined ? EMPTY_SET : runtimeRequirements; + } + + /** + * @param {Chunk} chunk the chunk + * @returns {ReadonlySet} runtime requirements + */ + getChunkRuntimeRequirements(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + const runtimeRequirements = cgc.runtimeRequirements; + return runtimeRequirements === undefined ? EMPTY_SET : runtimeRequirements; + } + + /** + * @param {Module} module the module + * @param {RuntimeSpec} runtime the runtime + * @param {boolean} withConnections include connections + * @returns {string} hash + */ + getModuleGraphHash(module, runtime, withConnections = true) { + const cgm = this._getChunkGraphModule(module); + return withConnections + ? this._getModuleGraphHashWithConnections(cgm, module, runtime) + : this._getModuleGraphHashBigInt(cgm, module, runtime).toString(16); + } + + /** + * @param {Module} module the module + * @param {RuntimeSpec} runtime the runtime + * @param {boolean} withConnections include connections + * @returns {bigint} hash + */ + getModuleGraphHashBigInt(module, runtime, withConnections = true) { + const cgm = this._getChunkGraphModule(module); + return withConnections + ? BigInt( + `0x${this._getModuleGraphHashWithConnections(cgm, module, runtime)}` + ) + : this._getModuleGraphHashBigInt(cgm, module, runtime); + } + + /** + * @param {ChunkGraphModule} cgm the ChunkGraphModule + * @param {Module} module the module + * @param {RuntimeSpec} runtime the runtime + * @returns {bigint} hash as big int + */ + _getModuleGraphHashBigInt(cgm, module, runtime) { + if (cgm.graphHashes === undefined) { + cgm.graphHashes = new RuntimeSpecMap(); + } + const graphHash = cgm.graphHashes.provide(runtime, () => { + const hash = createHash(this._hashFunction); + hash.update(`${cgm.id}${this.moduleGraph.isAsync(module)}`); + this.moduleGraph.getExportsInfo(module).updateHash(hash, runtime); + return BigInt(`0x${/** @type {string} */ (hash.digest("hex"))}`); + }); + return graphHash; + } + + /** + * @param {ChunkGraphModule} cgm the ChunkGraphModule + * @param {Module} module the module + * @param {RuntimeSpec} runtime the runtime + * @returns {string} hash + */ + _getModuleGraphHashWithConnections(cgm, module, runtime) { + if (cgm.graphHashesWithConnections === undefined) { + cgm.graphHashesWithConnections = new RuntimeSpecMap(); + } + const activeStateToString = state => { + if (state === false) return "F"; + if (state === true) return "T"; + if (state === ModuleGraphConnection.TRANSITIVE_ONLY) return "O"; + throw new Error("Not implemented active state"); + }; + const strict = module.buildMeta && module.buildMeta.strictHarmonyModule; + return cgm.graphHashesWithConnections.provide(runtime, () => { + const graphHash = this._getModuleGraphHashBigInt( + cgm, + module, + runtime + ).toString(16); + const connections = this.moduleGraph.getOutgoingConnections(module); + /** @type {Set} */ + const activeNamespaceModules = new Set(); + /** @type {Map>} */ + const connectedModules = new Map(); + const processConnection = (connection, stateInfo) => { + const module = connection.module; + stateInfo += module.getExportsType(this.moduleGraph, strict); + // cspell:word Tnamespace + if (stateInfo === "Tnamespace") activeNamespaceModules.add(module); + else { + const oldModule = connectedModules.get(stateInfo); + if (oldModule === undefined) { + connectedModules.set(stateInfo, module); + } else if (oldModule instanceof Set) { + oldModule.add(module); + } else if (oldModule !== module) { + connectedModules.set(stateInfo, new Set([oldModule, module])); + } + } + }; + if (runtime === undefined || typeof runtime === "string") { + for (const connection of connections) { + const state = connection.getActiveState(runtime); + if (state === false) continue; + processConnection(connection, state === true ? "T" : "O"); + } + } else { + // cspell:word Tnamespace + for (const connection of connections) { + const states = new Set(); + let stateInfo = ""; + forEachRuntime( + runtime, + runtime => { + const state = connection.getActiveState(runtime); + states.add(state); + stateInfo += activeStateToString(state) + runtime; + }, + true + ); + if (states.size === 1) { + const state = first(states); + if (state === false) continue; + stateInfo = activeStateToString(state); + } + processConnection(connection, stateInfo); + } + } + // cspell:word Tnamespace + if (activeNamespaceModules.size === 0 && connectedModules.size === 0) + return graphHash; + const connectedModulesInOrder = + connectedModules.size > 1 + ? Array.from(connectedModules).sort(([a], [b]) => (a < b ? -1 : 1)) + : connectedModules; + const hash = createHash(this._hashFunction); + const addModuleToHash = module => { + hash.update( + this._getModuleGraphHashBigInt( + this._getChunkGraphModule(module), + module, + runtime + ).toString(16) + ); + }; + const addModulesToHash = modules => { + let xor = ZERO_BIG_INT; + for (const m of modules) { + xor = + xor ^ + this._getModuleGraphHashBigInt( + this._getChunkGraphModule(m), + m, + runtime + ); + } + hash.update(xor.toString(16)); + }; + if (activeNamespaceModules.size === 1) + addModuleToHash(activeNamespaceModules.values().next().value); + else if (activeNamespaceModules.size > 1) + addModulesToHash(activeNamespaceModules); + for (const [stateInfo, modules] of connectedModulesInOrder) { + hash.update(stateInfo); + if (modules instanceof Set) { + addModulesToHash(modules); + } else { + addModuleToHash(modules); + } + } + hash.update(graphHash); + return /** @type {string} */ (hash.digest("hex")); + }); + } + + /** + * @param {Chunk} chunk the chunk + * @returns {ReadonlySet} runtime requirements + */ + getTreeRuntimeRequirements(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.runtimeRequirementsInTree; + } + + // TODO remove in webpack 6 + /** + * @param {Module} module the module + * @param {string} deprecateMessage message for the deprecation message + * @param {string} deprecationCode code for the deprecation + * @returns {ChunkGraph} the chunk graph + */ + static getChunkGraphForModule(module, deprecateMessage, deprecationCode) { + const fn = deprecateGetChunkGraphForModuleMap.get(deprecateMessage); + if (fn) return fn(module); + const newFn = util.deprecate( + /** + * @param {Module} module the module + * @returns {ChunkGraph} the chunk graph + */ + module => { + const chunkGraph = chunkGraphForModuleMap.get(module); + if (!chunkGraph) + throw new Error( + deprecateMessage + + ": There was no ChunkGraph assigned to the Module for backward-compat (Use the new API)" + ); + return chunkGraph; + }, + deprecateMessage + ": Use new ChunkGraph API", + deprecationCode + ); + deprecateGetChunkGraphForModuleMap.set(deprecateMessage, newFn); + return newFn(module); + } + + // TODO remove in webpack 6 + /** + * @param {Module} module the module + * @param {ChunkGraph} chunkGraph the chunk graph + * @returns {void} + */ + static setChunkGraphForModule(module, chunkGraph) { + chunkGraphForModuleMap.set(module, chunkGraph); + } + + // TODO remove in webpack 6 + /** + * @param {Module} module the module + * @returns {void} + */ + static clearChunkGraphForModule(module) { + chunkGraphForModuleMap.delete(module); + } + + // TODO remove in webpack 6 + /** + * @param {Chunk} chunk the chunk + * @param {string} deprecateMessage message for the deprecation message + * @param {string} deprecationCode code for the deprecation + * @returns {ChunkGraph} the chunk graph + */ + static getChunkGraphForChunk(chunk, deprecateMessage, deprecationCode) { + const fn = deprecateGetChunkGraphForChunkMap.get(deprecateMessage); + if (fn) return fn(chunk); + const newFn = util.deprecate( + /** + * @param {Chunk} chunk the chunk + * @returns {ChunkGraph} the chunk graph + */ + chunk => { + const chunkGraph = chunkGraphForChunkMap.get(chunk); + if (!chunkGraph) + throw new Error( + deprecateMessage + + "There was no ChunkGraph assigned to the Chunk for backward-compat (Use the new API)" + ); + return chunkGraph; + }, + deprecateMessage + ": Use new ChunkGraph API", + deprecationCode + ); + deprecateGetChunkGraphForChunkMap.set(deprecateMessage, newFn); + return newFn(chunk); + } + + // TODO remove in webpack 6 + /** + * @param {Chunk} chunk the chunk + * @param {ChunkGraph} chunkGraph the chunk graph + * @returns {void} + */ + static setChunkGraphForChunk(chunk, chunkGraph) { + chunkGraphForChunkMap.set(chunk, chunkGraph); + } + + // TODO remove in webpack 6 + /** + * @param {Chunk} chunk the chunk + * @returns {void} + */ + static clearChunkGraphForChunk(chunk) { + chunkGraphForChunkMap.delete(chunk); + } +} + +// TODO remove in webpack 6 +/** @type {WeakMap} */ +const chunkGraphForModuleMap = new WeakMap(); + +// TODO remove in webpack 6 +/** @type {WeakMap} */ +const chunkGraphForChunkMap = new WeakMap(); + +// TODO remove in webpack 6 +/** @type {Map ChunkGraph>} */ +const deprecateGetChunkGraphForModuleMap = new Map(); + +// TODO remove in webpack 6 +/** @type {Map ChunkGraph>} */ +const deprecateGetChunkGraphForChunkMap = new Map(); + +module.exports = ChunkGraph; + + +/***/ }), + +/***/ 96975: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const util = __webpack_require__(31669); +const SortableSet = __webpack_require__(67563); +const { + compareLocations, + compareChunks, + compareIterables +} = __webpack_require__(26296); + +/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("./ChunkGraph")} ChunkGraph */ +/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ +/** @typedef {import("./Entrypoint")} Entrypoint */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./ModuleGraph")} ModuleGraph */ + +/** @typedef {{id: number}} HasId */ +/** @typedef {{module: Module, loc: DependencyLocation, request: string}} OriginRecord */ + +/** + * @typedef {Object} RawChunkGroupOptions + * @property {number=} preloadOrder + * @property {number=} prefetchOrder + */ + +/** @typedef {RawChunkGroupOptions & { name?: string }} ChunkGroupOptions */ + +let debugId = 5000; + +/** + * @template T + * @param {SortableSet} set set to convert to array. + * @returns {T[]} the array format of existing set + */ +const getArray = set => Array.from(set); + +/** + * A convenience method used to sort chunks based on their id's + * @param {ChunkGroup} a first sorting comparator + * @param {ChunkGroup} b second sorting comparator + * @returns {1|0|-1} a sorting index to determine order + */ +const sortById = (a, b) => { + if (a.id < b.id) return -1; + if (b.id < a.id) return 1; + return 0; +}; + +/** + * @param {OriginRecord} a the first comparator in sort + * @param {OriginRecord} b the second comparator in sort + * @returns {1|-1|0} returns sorting order as index + */ +const sortOrigin = (a, b) => { + const aIdent = a.module ? a.module.identifier() : ""; + const bIdent = b.module ? b.module.identifier() : ""; + if (aIdent < bIdent) return -1; + if (aIdent > bIdent) return 1; + return compareLocations(a.loc, b.loc); +}; + +class ChunkGroup { + /** + * Creates an instance of ChunkGroup. + * @param {string|ChunkGroupOptions=} options chunk group options passed to chunkGroup + */ + constructor(options) { + if (typeof options === "string") { + options = { name: options }; + } else if (!options) { + options = { name: undefined }; + } + /** @type {number} */ + this.groupDebugId = debugId++; + this.options = options; + /** @type {SortableSet} */ + this._children = new SortableSet(undefined, sortById); + /** @type {SortableSet} */ + this._parents = new SortableSet(undefined, sortById); + /** @type {SortableSet} */ + this._asyncEntrypoints = new SortableSet(undefined, sortById); + this._blocks = new SortableSet(); + /** @type {Chunk[]} */ + this.chunks = []; + /** @type {OriginRecord[]} */ + this.origins = []; + /** Indices in top-down order */ + /** @private @type {Map} */ + this._modulePreOrderIndices = new Map(); + /** Indices in bottom-up order */ + /** @private @type {Map} */ + this._modulePostOrderIndices = new Map(); + /** @type {number} */ + this.index = undefined; + } + + /** + * when a new chunk is added to a chunkGroup, addingOptions will occur. + * @param {ChunkGroupOptions} options the chunkGroup options passed to addOptions + * @returns {void} + */ + addOptions(options) { + for (const key of Object.keys(options)) { + if (this.options[key] === undefined) { + this.options[key] = options[key]; + } else if (this.options[key] !== options[key]) { + if (key.endsWith("Order")) { + this.options[key] = Math.max(this.options[key], options[key]); + } else { + throw new Error( + `ChunkGroup.addOptions: No option merge strategy for ${key}` + ); + } + } + } + } + + /** + * returns the name of current ChunkGroup + * @returns {string|undefined} returns the ChunkGroup name + */ + get name() { + return this.options.name; + } + + /** + * sets a new name for current ChunkGroup + * @param {string} value the new name for ChunkGroup + * @returns {void} + */ + set name(value) { + this.options.name = value; + } + + /* istanbul ignore next */ + /** + * get a uniqueId for ChunkGroup, made up of its member Chunk debugId's + * @returns {string} a unique concatenation of chunk debugId's + */ + get debugId() { + return Array.from(this.chunks, x => x.debugId).join("+"); + } + + /** + * get a unique id for ChunkGroup, made up of its member Chunk id's + * @returns {string} a unique concatenation of chunk ids + */ + get id() { + return Array.from(this.chunks, x => x.id).join("+"); + } + + /** + * Performs an unshift of a specific chunk + * @param {Chunk} chunk chunk being unshifted + * @returns {boolean} returns true if attempted chunk shift is accepted + */ + unshiftChunk(chunk) { + const oldIdx = this.chunks.indexOf(chunk); + if (oldIdx > 0) { + this.chunks.splice(oldIdx, 1); + this.chunks.unshift(chunk); + } else if (oldIdx < 0) { + this.chunks.unshift(chunk); + return true; + } + return false; + } + + /** + * inserts a chunk before another existing chunk in group + * @param {Chunk} chunk Chunk being inserted + * @param {Chunk} before Placeholder/target chunk marking new chunk insertion point + * @returns {boolean} return true if insertion was successful + */ + insertChunk(chunk, before) { + const oldIdx = this.chunks.indexOf(chunk); + const idx = this.chunks.indexOf(before); + if (idx < 0) { + throw new Error("before chunk not found"); + } + if (oldIdx >= 0 && oldIdx > idx) { + this.chunks.splice(oldIdx, 1); + this.chunks.splice(idx, 0, chunk); + } else if (oldIdx < 0) { + this.chunks.splice(idx, 0, chunk); + return true; + } + return false; + } + + /** + * add a chunk into ChunkGroup. Is pushed on or prepended + * @param {Chunk} chunk chunk being pushed into ChunkGroupS + * @returns {boolean} returns true if chunk addition was successful. + */ + pushChunk(chunk) { + const oldIdx = this.chunks.indexOf(chunk); + if (oldIdx >= 0) { + return false; + } + this.chunks.push(chunk); + return true; + } + + /** + * @param {Chunk} oldChunk chunk to be replaced + * @param {Chunk} newChunk New chunk that will be replaced with + * @returns {boolean} returns true if the replacement was successful + */ + replaceChunk(oldChunk, newChunk) { + const oldIdx = this.chunks.indexOf(oldChunk); + if (oldIdx < 0) return false; + const newIdx = this.chunks.indexOf(newChunk); + if (newIdx < 0) { + this.chunks[oldIdx] = newChunk; + return true; + } + if (newIdx < oldIdx) { + this.chunks.splice(oldIdx, 1); + return true; + } else if (newIdx !== oldIdx) { + this.chunks[oldIdx] = newChunk; + this.chunks.splice(newIdx, 1); + return true; + } + } + + /** + * @param {Chunk} chunk chunk to remove + * @returns {boolean} returns true if chunk was removed + */ + removeChunk(chunk) { + const idx = this.chunks.indexOf(chunk); + if (idx >= 0) { + this.chunks.splice(idx, 1); + return true; + } + return false; + } + + /** + * @returns {boolean} true, when this chunk group will be loaded on initial page load + */ + isInitial() { + return false; + } + + /** + * @param {ChunkGroup} group chunk group to add + * @returns {boolean} returns true if chunk group was added + */ + addChild(group) { + const size = this._children.size; + this._children.add(group); + return size !== this._children.size; + } + + /** + * @returns {ChunkGroup[]} returns the children of this group + */ + getChildren() { + return this._children.getFromCache(getArray); + } + + getNumberOfChildren() { + return this._children.size; + } + + get childrenIterable() { + return this._children; + } + + /** + * @param {ChunkGroup} group the chunk group to remove + * @returns {boolean} returns true if the chunk group was removed + */ + removeChild(group) { + if (!this._children.has(group)) { + return false; + } + + this._children.delete(group); + group.removeParent(this); + return true; + } + + /** + * @param {ChunkGroup} parentChunk the parent group to be added into + * @returns {boolean} returns true if this chunk group was added to the parent group + */ + addParent(parentChunk) { + if (!this._parents.has(parentChunk)) { + this._parents.add(parentChunk); + return true; + } + return false; + } + + /** + * @returns {ChunkGroup[]} returns the parents of this group + */ + getParents() { + return this._parents.getFromCache(getArray); + } + + getNumberOfParents() { + return this._parents.size; + } + + /** + * @param {ChunkGroup} parent the parent group + * @returns {boolean} returns true if the parent group contains this group + */ + hasParent(parent) { + return this._parents.has(parent); + } + + get parentsIterable() { + return this._parents; + } + + /** + * @param {ChunkGroup} chunkGroup the parent group + * @returns {boolean} returns true if this group has been removed from the parent + */ + removeParent(chunkGroup) { + if (this._parents.delete(chunkGroup)) { + chunkGroup.removeChild(this); + return true; + } + return false; + } + + /** + * @param {Entrypoint} entrypoint entrypoint to add + * @returns {boolean} returns true if entrypoint was added + */ + addAsyncEntrypoint(entrypoint) { + const size = this._asyncEntrypoints.size; + this._asyncEntrypoints.add(entrypoint); + return size !== this._asyncEntrypoints.size; + } + + get asyncEntrypointsIterable() { + return this._asyncEntrypoints; + } + + /** + * @returns {Array} an array containing the blocks + */ + getBlocks() { + return this._blocks.getFromCache(getArray); + } + + getNumberOfBlocks() { + return this._blocks.size; + } + + hasBlock(block) { + return this._blocks.has(block); + } + + /** + * @returns {Iterable} blocks + */ + get blocksIterable() { + return this._blocks; + } + + /** + * @param {AsyncDependenciesBlock} block a block + * @returns {boolean} false, if block was already added + */ + addBlock(block) { + if (!this._blocks.has(block)) { + this._blocks.add(block); + return true; + } + return false; + } + + /** + * @param {Module} module origin module + * @param {DependencyLocation} loc location of the reference in the origin module + * @param {string} request request name of the reference + * @returns {void} + */ + addOrigin(module, loc, request) { + this.origins.push({ + module, + loc, + request + }); + } + + /** + * @returns {string[]} the files contained this chunk group + */ + getFiles() { + const files = new Set(); + + for (const chunk of this.chunks) { + for (const file of chunk.files) { + files.add(file); + } + } + + return Array.from(files); + } + + /** + * @returns {void} + */ + remove() { + // cleanup parents + for (const parentChunkGroup of this._parents) { + // remove this chunk from its parents + parentChunkGroup._children.delete(this); + + // cleanup "sub chunks" + for (const chunkGroup of this._children) { + /** + * remove this chunk as "intermediary" and connect + * it "sub chunks" and parents directly + */ + // add parent to each "sub chunk" + chunkGroup.addParent(parentChunkGroup); + // add "sub chunk" to parent + parentChunkGroup.addChild(chunkGroup); + } + } + + /** + * we need to iterate again over the children + * to remove this from the child's parents. + * This can not be done in the above loop + * as it is not guaranteed that `this._parents` contains anything. + */ + for (const chunkGroup of this._children) { + // remove this as parent of every "sub chunk" + chunkGroup._parents.delete(this); + } + + // remove chunks + for (const chunk of this.chunks) { + chunk.removeGroup(this); + } + } + + sortItems() { + this.origins.sort(sortOrigin); + } + + /** + * Sorting predicate which allows current ChunkGroup to be compared against another. + * Sorting values are based off of number of chunks in ChunkGroup. + * + * @param {ChunkGraph} chunkGraph the chunk graph + * @param {ChunkGroup} otherGroup the chunkGroup to compare this against + * @returns {-1|0|1} sort position for comparison + */ + compareTo(chunkGraph, otherGroup) { + if (this.chunks.length > otherGroup.chunks.length) return -1; + if (this.chunks.length < otherGroup.chunks.length) return 1; + return compareIterables(compareChunks(chunkGraph))( + this.chunks, + otherGroup.chunks + ); + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @param {ChunkGraph} chunkGraph the chunk graph + * @returns {Record} mapping from children type to ordered list of ChunkGroups + */ + getChildrenByOrders(moduleGraph, chunkGraph) { + /** @type {Map} */ + const lists = new Map(); + for (const childGroup of this._children) { + for (const key of Object.keys(childGroup.options)) { + if (key.endsWith("Order")) { + const name = key.substr(0, key.length - "Order".length); + let list = lists.get(name); + if (list === undefined) { + lists.set(name, (list = [])); + } + list.push({ + order: childGroup.options[key], + group: childGroup + }); + } + } + } + /** @type {Record} */ + const result = Object.create(null); + for (const [name, list] of lists) { + list.sort((a, b) => { + const cmp = b.order - a.order; + if (cmp !== 0) return cmp; + return a.group.compareTo(chunkGraph, b.group); + }); + result[name] = list.map(i => i.group); + } + return result; + } + + /** + * Sets the top-down index of a module in this ChunkGroup + * @param {Module} module module for which the index should be set + * @param {number} index the index of the module + * @returns {void} + */ + setModulePreOrderIndex(module, index) { + this._modulePreOrderIndices.set(module, index); + } + + /** + * Gets the top-down index of a module in this ChunkGroup + * @param {Module} module the module + * @returns {number} index + */ + getModulePreOrderIndex(module) { + return this._modulePreOrderIndices.get(module); + } + + /** + * Sets the bottom-up index of a module in this ChunkGroup + * @param {Module} module module for which the index should be set + * @param {number} index the index of the module + * @returns {void} + */ + setModulePostOrderIndex(module, index) { + this._modulePostOrderIndices.set(module, index); + } + + /** + * Gets the bottom-up index of a module in this ChunkGroup + * @param {Module} module the module + * @returns {number} index + */ + getModulePostOrderIndex(module) { + return this._modulePostOrderIndices.get(module); + } + + /* istanbul ignore next */ + checkConstraints() { + const chunk = this; + for (const child of chunk._children) { + if (!child._parents.has(chunk)) { + throw new Error( + `checkConstraints: child missing parent ${chunk.debugId} -> ${child.debugId}` + ); + } + } + for (const parentChunk of chunk._parents) { + if (!parentChunk._children.has(chunk)) { + throw new Error( + `checkConstraints: parent missing child ${parentChunk.debugId} <- ${chunk.debugId}` + ); + } + } + } +} + +ChunkGroup.prototype.getModuleIndex = util.deprecate( + ChunkGroup.prototype.getModulePreOrderIndex, + "ChunkGroup.getModuleIndex was renamed to getModulePreOrderIndex", + "DEP_WEBPACK_CHUNK_GROUP_GET_MODULE_INDEX" +); + +ChunkGroup.prototype.getModuleIndex2 = util.deprecate( + ChunkGroup.prototype.getModulePostOrderIndex, + "ChunkGroup.getModuleIndex2 was renamed to getModulePostOrderIndex", + "DEP_WEBPACK_CHUNK_GROUP_GET_MODULE_INDEX_2" +); + +module.exports = ChunkGroup; + + +/***/ }), + +/***/ 80187: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const WebpackError = __webpack_require__(68422); + +/** @typedef {import("./Chunk")} Chunk */ + +class ChunkRenderError extends WebpackError { + /** + * Create a new ChunkRenderError + * @param {Chunk} chunk A chunk + * @param {string} file Related file + * @param {Error} error Original error + */ + constructor(chunk, file, error) { + super(); + + this.name = "ChunkRenderError"; + this.error = error; + this.message = error.message; + this.details = error.stack; + this.file = file; + this.chunk = chunk; + } +} + +module.exports = ChunkRenderError; + + +/***/ }), + +/***/ 50527: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const util = __webpack_require__(31669); +const memoize = __webpack_require__(84297); + +/** @typedef {import("../declarations/WebpackOptions").Output} OutputOptions */ +/** @typedef {import("./Compilation")} Compilation */ + +const getJavascriptModulesPlugin = memoize(() => + __webpack_require__(76767) +); + +// TODO webpack 6 remove this class +class ChunkTemplate { + /** + * @param {OutputOptions} outputOptions output options + * @param {Compilation} compilation the compilation + */ + constructor(outputOptions, compilation) { + this._outputOptions = outputOptions || {}; + this.hooks = Object.freeze({ + renderManifest: { + tap: util.deprecate( + (options, fn) => { + compilation.hooks.renderManifest.tap( + options, + (entries, options) => { + if (options.chunk.hasRuntime()) return entries; + return fn(entries, options); + } + ); + }, + "ChunkTemplate.hooks.renderManifest is deprecated (use Compilation.hooks.renderManifest instead)", + "DEP_WEBPACK_CHUNK_TEMPLATE_RENDER_MANIFEST" + ) + }, + modules: { + tap: util.deprecate( + (options, fn) => { + getJavascriptModulesPlugin() + .getCompilationHooks(compilation) + .renderChunk.tap(options, (source, renderContext) => + fn( + source, + compilation.moduleTemplates.javascript, + renderContext + ) + ); + }, + "ChunkTemplate.hooks.modules is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderChunk instead)", + "DEP_WEBPACK_CHUNK_TEMPLATE_MODULES" + ) + }, + render: { + tap: util.deprecate( + (options, fn) => { + getJavascriptModulesPlugin() + .getCompilationHooks(compilation) + .renderChunk.tap(options, (source, renderContext) => + fn( + source, + compilation.moduleTemplates.javascript, + renderContext + ) + ); + }, + "ChunkTemplate.hooks.render is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderChunk instead)", + "DEP_WEBPACK_CHUNK_TEMPLATE_RENDER" + ) + }, + renderWithEntry: { + tap: util.deprecate( + (options, fn) => { + getJavascriptModulesPlugin() + .getCompilationHooks(compilation) + .render.tap(options, (source, renderContext) => { + if ( + renderContext.chunkGraph.getNumberOfEntryModules( + renderContext.chunk + ) === 0 || + renderContext.chunk.hasRuntime() + ) { + return source; + } + return fn(source, renderContext.chunk); + }); + }, + "ChunkTemplate.hooks.renderWithEntry is deprecated (use JavascriptModulesPlugin.getCompilationHooks().render instead)", + "DEP_WEBPACK_CHUNK_TEMPLATE_RENDER_WITH_ENTRY" + ) + }, + hash: { + tap: util.deprecate( + (options, fn) => { + compilation.hooks.fullHash.tap(options, fn); + }, + "ChunkTemplate.hooks.hash is deprecated (use Compilation.hooks.fullHash instead)", + "DEP_WEBPACK_CHUNK_TEMPLATE_HASH" + ) + }, + hashForChunk: { + tap: util.deprecate( + (options, fn) => { + getJavascriptModulesPlugin() + .getCompilationHooks(compilation) + .chunkHash.tap(options, (chunk, hash, context) => { + if (chunk.hasRuntime()) return; + fn(hash, chunk, context); + }); + }, + "ChunkTemplate.hooks.hashForChunk is deprecated (use JavascriptModulesPlugin.getCompilationHooks().chunkHash instead)", + "DEP_WEBPACK_CHUNK_TEMPLATE_HASH_FOR_CHUNK" + ) + } + }); + } +} + +Object.defineProperty(ChunkTemplate.prototype, "outputOptions", { + get: util.deprecate( + /** + * @this {ChunkTemplate} + * @returns {OutputOptions} output options + */ + function () { + return this._outputOptions; + }, + "ChunkTemplate.outputOptions is deprecated (use Compilation.outputOptions instead)", + "DEP_WEBPACK_CHUNK_TEMPLATE_OUTPUT_OPTIONS" + ) +}); + +module.exports = ChunkTemplate; + + +/***/ }), + +/***/ 49129: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Sergey Melyukov @smelukov +*/ + + + +const asyncLib = __webpack_require__(36386); +const { SyncBailHook } = __webpack_require__(34718); +const Compilation = __webpack_require__(59622); +const createSchemaValidation = __webpack_require__(77695); +const { join } = __webpack_require__(93204); +const processAsyncTree = __webpack_require__(76815); + +/** @typedef {import("../declarations/WebpackOptions").CleanOptions} CleanOptions */ +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./logging/Logger").Logger} Logger */ +/** @typedef {import("./util/fs").OutputFileSystem} OutputFileSystem */ +/** @typedef {import("./util/fs").StatsCallback} StatsCallback */ + +/** @typedef {(function(string):boolean)|RegExp} IgnoreItem */ +/** @typedef {function(IgnoreItem): void} AddToIgnoreCallback */ + +/** + * @typedef {Object} CleanPluginCompilationHooks + * @property {SyncBailHook<[string], boolean>} keep when returning true the file/directory will be kept during cleaning, returning false will clean it and ignore the following plugins and config + */ + +const validate = createSchemaValidation( + undefined, + () => { + const { definitions } = __webpack_require__(1863); + return { + definitions, + oneOf: [{ $ref: "#/definitions/CleanOptions" }] + }; + }, + { + name: "Clean Plugin", + baseDataPath: "options" + } +); + +/** + * @param {OutputFileSystem} fs filesystem + * @param {string} outputPath output path + * @param {Set} currentAssets filename of the current assets (must not start with .. or ., must only use / as path separator) + * @param {function(Error=, Set=): void} callback returns the filenames of the assets that shouldn't be there + * @returns {void} + */ +const getDiffToFs = (fs, outputPath, currentAssets, callback) => { + const directories = new Set(); + // get directories of assets + for (const asset of currentAssets) { + directories.add(asset.replace(/(^|\/)[^/]*$/, "")); + } + // and all parent directories + for (const directory of directories) { + directories.add(directory.replace(/(^|\/)[^/]*$/, "")); + } + const diff = new Set(); + asyncLib.forEachLimit( + directories, + 10, + (directory, callback) => { + fs.readdir(join(fs, outputPath, directory), (err, entries) => { + if (err) { + if (err.code === "ENOENT") return callback(); + if (err.code === "ENOTDIR") { + diff.add(directory); + return callback(); + } + return callback(err); + } + for (const entry of entries) { + const file = /** @type {string} */ (entry); + const filename = directory ? `${directory}/${file}` : file; + if (!directories.has(filename) && !currentAssets.has(filename)) { + diff.add(filename); + } + } + callback(); + }); + }, + err => { + if (err) return callback(err); + + callback(null, diff); + } + ); +}; + +/** + * @param {Set} currentAssets assets list + * @param {Set} oldAssets old assets list + * @returns {Set} diff + */ +const getDiffToOldAssets = (currentAssets, oldAssets) => { + const diff = new Set(); + for (const asset of oldAssets) { + if (!currentAssets.has(asset)) diff.add(asset); + } + return diff; +}; + +/** + * @param {OutputFileSystem} fs filesystem + * @param {string} filename path to file + * @param {StatsCallback} callback callback for provided filename + * @returns {void} + */ +const doStat = (fs, filename, callback) => { + if ("lstat" in fs) { + fs.lstat(filename, callback); + } else { + fs.stat(filename, callback); + } +}; + +/** + * @param {OutputFileSystem} fs filesystem + * @param {string} outputPath output path + * @param {boolean} dry only log instead of fs modification + * @param {Logger} logger logger + * @param {Set} diff filenames of the assets that shouldn't be there + * @param {function(string): boolean} isKept check if the entry is ignored + * @param {function(Error=): void} callback callback + * @returns {void} + */ +const applyDiff = (fs, outputPath, dry, logger, diff, isKept, callback) => { + const log = msg => { + if (dry) { + logger.info(msg); + } else { + logger.log(msg); + } + }; + /** @typedef {{ type: "check" | "unlink" | "rmdir", filename: string, parent: { remaining: number, job: Job } | undefined }} Job */ + /** @type {Job[]} */ + const jobs = Array.from(diff, filename => ({ + type: "check", + filename, + parent: undefined + })); + processAsyncTree( + jobs, + 10, + ({ type, filename, parent }, push, callback) => { + const handleError = err => { + if (err.code === "ENOENT") { + log(`${filename} was removed during cleaning by something else`); + handleParent(); + return callback(); + } + return callback(err); + }; + const handleParent = () => { + if (parent && --parent.remaining === 0) push(parent.job); + }; + const path = join(fs, outputPath, filename); + switch (type) { + case "check": + if (isKept(filename)) { + // do not decrement parent entry as we don't want to delete the parent + log(`${filename} will be kept`); + return process.nextTick(callback); + } + doStat(fs, path, (err, stats) => { + if (err) return handleError(err); + if (!stats.isDirectory()) { + push({ + type: "unlink", + filename, + parent + }); + return callback(); + } + fs.readdir(path, (err, entries) => { + if (err) return handleError(err); + /** @type {Job} */ + const deleteJob = { + type: "rmdir", + filename, + parent + }; + if (entries.length === 0) { + push(deleteJob); + } else { + const parentToken = { + remaining: entries.length, + job: deleteJob + }; + for (const entry of entries) { + const file = /** @type {string} */ (entry); + if (file.startsWith(".")) { + log( + `${filename} will be kept (dot-files will never be removed)` + ); + continue; + } + push({ + type: "check", + filename: `${filename}/${file}`, + parent: parentToken + }); + } + } + return callback(); + }); + }); + break; + case "rmdir": + log(`${filename} will be removed`); + if (dry) { + handleParent(); + return process.nextTick(callback); + } + if (!fs.rmdir) { + logger.warn( + `${filename} can't be removed because output file system doesn't support removing directories (rmdir)` + ); + return process.nextTick(callback); + } + fs.rmdir(path, err => { + if (err) return handleError(err); + handleParent(); + callback(); + }); + break; + case "unlink": + log(`${filename} will be removed`); + if (dry) { + handleParent(); + return process.nextTick(callback); + } + if (!fs.unlink) { + logger.warn( + `${filename} can't be removed because output file system doesn't support removing files (rmdir)` + ); + return process.nextTick(callback); + } + fs.unlink(path, err => { + if (err) return handleError(err); + handleParent(); + callback(); + }); + break; + } + }, + callback + ); +}; + +/** @type {WeakMap} */ +const compilationHooksMap = new WeakMap(); + +class CleanPlugin { + /** + * @param {Compilation} compilation the compilation + * @returns {CleanPluginCompilationHooks} the attached hooks + */ + static getCompilationHooks(compilation) { + if (!(compilation instanceof Compilation)) { + throw new TypeError( + "The 'compilation' argument must be an instance of Compilation" + ); + } + let hooks = compilationHooksMap.get(compilation); + if (hooks === undefined) { + hooks = { + /** @type {SyncBailHook<[string], boolean>} */ + keep: new SyncBailHook(["ignore"]) + }; + compilationHooksMap.set(compilation, hooks); + } + return hooks; + } + + /** @param {CleanOptions} options options */ + constructor(options = {}) { + validate(options); + this.options = { dry: false, ...options }; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const { dry, keep } = this.options; + + const keepFn = + typeof keep === "function" + ? keep + : typeof keep === "string" + ? path => path.startsWith(keep) + : typeof keep === "object" && keep.test + ? path => keep.test(path) + : () => false; + + // We assume that no external modification happens while the compiler is active + // So we can store the old assets and only diff to them to avoid fs access on + // incremental builds + let oldAssets; + + compiler.hooks.emit.tapAsync( + { + name: "CleanPlugin", + stage: 100 + }, + (compilation, callback) => { + const hooks = CleanPlugin.getCompilationHooks(compilation); + const logger = compilation.getLogger("webpack.CleanPlugin"); + const fs = compiler.outputFileSystem; + + if (!fs.readdir) { + return callback( + new Error( + "CleanPlugin: Output filesystem doesn't support listing directories (readdir)" + ) + ); + } + + const currentAssets = new Set(); + for (const asset of Object.keys(compilation.assets)) { + if (/^[A-Za-z]:\\|^\/|^\\\\/.test(asset)) continue; + let normalizedAsset; + let newNormalizedAsset = asset.replace(/\\/g, "/"); + do { + normalizedAsset = newNormalizedAsset; + newNormalizedAsset = normalizedAsset.replace( + /(^|\/)(?!\.\.)[^/]+\/\.\.\//g, + "$1" + ); + } while (newNormalizedAsset !== normalizedAsset); + if (normalizedAsset.startsWith("../")) continue; + currentAssets.add(normalizedAsset); + } + + const outputPath = compilation.getPath(compiler.outputPath, {}); + + const isKept = path => { + const result = hooks.keep.call(path); + if (result !== undefined) return result; + return keepFn(path); + }; + + const diffCallback = (err, diff) => { + if (err) { + oldAssets = undefined; + return callback(err); + } + applyDiff(fs, outputPath, dry, logger, diff, isKept, err => { + if (err) { + oldAssets = undefined; + } else { + oldAssets = currentAssets; + } + callback(err); + }); + }; + + if (oldAssets) { + diffCallback(null, getDiffToOldAssets(currentAssets, oldAssets)); + } else { + getDiffToFs(fs, outputPath, currentAssets, diffCallback); + } + } + ); + } +} + +module.exports = CleanPlugin; + + +/***/ }), + +/***/ 43604: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const WebpackError = __webpack_require__(68422); + +/** @typedef {import("./Module")} Module */ + +class CodeGenerationError extends WebpackError { + /** + * Create a new CodeGenerationError + * @param {Module} module related module + * @param {Error} error Original error + */ + constructor(module, error) { + super(); + + this.name = "CodeGenerationError"; + this.error = error; + this.message = error.message; + this.details = error.stack; + this.module = module; + } +} + +module.exports = CodeGenerationError; + + +/***/ }), + +/***/ 74841: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { provide } = __webpack_require__(30498); +const { first } = __webpack_require__(34715); +const createHash = __webpack_require__(24123); +const { runtimeToString, RuntimeSpecMap } = __webpack_require__(19655); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./Module").CodeGenerationResult} CodeGenerationResult */ +/** @typedef {typeof import("./util/Hash")} Hash */ +/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ + +class CodeGenerationResults { + /** + * @param {string | Hash} hashFunction the hash function to use + */ + constructor(hashFunction = "md4") { + /** @type {Map>} */ + this.map = new Map(); + this._hashFunction = hashFunction; + } + + /** + * @param {Module} module the module + * @param {RuntimeSpec} runtime runtime(s) + * @returns {CodeGenerationResult} the CodeGenerationResult + */ + get(module, runtime) { + const entry = this.map.get(module); + if (entry === undefined) { + throw new Error( + `No code generation entry for ${module.identifier()} (existing entries: ${Array.from( + this.map.keys(), + m => m.identifier() + ).join(", ")})` + ); + } + if (runtime === undefined) { + if (entry.size > 1) { + const results = new Set(entry.values()); + if (results.size !== 1) { + throw new Error( + `No unique code generation entry for unspecified runtime for ${module.identifier()} (existing runtimes: ${Array.from( + entry.keys(), + r => runtimeToString(r) + ).join(", ")}). +Caller might not support runtime-dependent code generation (opt-out via optimization.usedExports: "global").` + ); + } + return first(results); + } + return entry.values().next().value; + } + const result = entry.get(runtime); + if (result === undefined) { + throw new Error( + `No code generation entry for runtime ${runtimeToString( + runtime + )} for ${module.identifier()} (existing runtimes: ${Array.from( + entry.keys(), + r => runtimeToString(r) + ).join(", ")})` + ); + } + return result; + } + + /** + * @param {Module} module the module + * @param {RuntimeSpec} runtime runtime(s) + * @returns {boolean} true, when we have data for this + */ + has(module, runtime) { + const entry = this.map.get(module); + if (entry === undefined) { + return false; + } + if (runtime !== undefined) { + return entry.has(runtime); + } else if (entry.size > 1) { + const results = new Set(entry.values()); + return results.size === 1; + } else { + return entry.size === 1; + } + } + + /** + * @param {Module} module the module + * @param {RuntimeSpec} runtime runtime(s) + * @param {string} sourceType the source type + * @returns {Source} a source + */ + getSource(module, runtime, sourceType) { + return this.get(module, runtime).sources.get(sourceType); + } + + /** + * @param {Module} module the module + * @param {RuntimeSpec} runtime runtime(s) + * @returns {ReadonlySet} runtime requirements + */ + getRuntimeRequirements(module, runtime) { + return this.get(module, runtime).runtimeRequirements; + } + + /** + * @param {Module} module the module + * @param {RuntimeSpec} runtime runtime(s) + * @param {string} key data key + * @returns {any} data generated by code generation + */ + getData(module, runtime, key) { + const data = this.get(module, runtime).data; + return data === undefined ? undefined : data.get(key); + } + + /** + * @param {Module} module the module + * @param {RuntimeSpec} runtime runtime(s) + * @returns {any} hash of the code generation + */ + getHash(module, runtime) { + const info = this.get(module, runtime); + if (info.hash !== undefined) return info.hash; + const hash = createHash(this._hashFunction); + for (const [type, source] of info.sources) { + hash.update(type); + source.updateHash(hash); + } + if (info.runtimeRequirements) { + for (const rr of info.runtimeRequirements) hash.update(rr); + } + return (info.hash = /** @type {string} */ (hash.digest("hex"))); + } + + /** + * @param {Module} module the module + * @param {RuntimeSpec} runtime runtime(s) + * @param {CodeGenerationResult} result result from module + * @returns {void} + */ + add(module, runtime, result) { + const map = provide(this.map, module, () => new RuntimeSpecMap()); + map.set(runtime, result); + } +} + +module.exports = CodeGenerationResults; + + +/***/ }), + +/***/ 28151: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const WebpackError = __webpack_require__(68422); +const makeSerializable = __webpack_require__(26522); + +/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ + +class CommentCompilationWarning extends WebpackError { + /** + * + * @param {string} message warning message + * @param {DependencyLocation} loc affected lines of code + */ + constructor(message, loc) { + super(message); + + this.name = "CommentCompilationWarning"; + + this.loc = loc; + } +} + +makeSerializable( + CommentCompilationWarning, + "webpack/lib/CommentCompilationWarning" +); + +module.exports = CommentCompilationWarning; + + +/***/ }), + +/***/ 27847: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ConstDependency = __webpack_require__(60864); + +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./javascript/JavascriptParser")} JavascriptParser */ + +const nestedWebpackRequireTag = Symbol("nested __webpack_require__"); + +class CompatibilityPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "CompatibilityPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyTemplates.set( + ConstDependency, + new ConstDependency.Template() + ); + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("CompatibilityPlugin", (parser, parserOptions) => { + if ( + parserOptions.browserify !== undefined && + !parserOptions.browserify + ) return; parser.hooks.call @@ -41994,7 +43842,7 @@ class ExternalModule extends Module { case "global": return getSourceForGlobalVariableExternal( request, - runtimeTemplate.outputOptions.globalObject + runtimeTemplate.globalObject ); case "commonjs": case "commonjs2": @@ -59126,6 +60974,27 @@ Module has these incoming connections: ${Array.from( ).join("")}`; }; +/** + * @param {string|undefined} definition global object definition + * @returns {string} save to use global object + */ +function getGlobalObject(definition) { + if (!definition) return definition; + const trimmed = definition.trim(); + + if ( + // identifier, we do not need real identifier regarding ECMAScript/Unicode + trimmed.match(/^[_\p{L}][_0-9\p{L}]*$/iu) || + // iife + // call expression + // expression in parentheses + trimmed.match(/^([_\p{L}][_0-9\p{L}]*)?\(.*\)$/iu) + ) + return trimmed; + + return `Object(${trimmed})`; +} + class RuntimeTemplate { /** * @param {Compilation} compilation the compilation @@ -59136,6 +61005,7 @@ class RuntimeTemplate { this.compilation = compilation; this.outputOptions = outputOptions || {}; this.requestShortener = requestShortener; + this.globalObject = getGlobalObject(outputOptions.globalObject); } isIIFE() { @@ -59154,6 +61024,10 @@ class RuntimeTemplate { return this.outputOptions.environment.arrowFunction; } + supportsOptionalChaining() { + return this.outputOptions.environment.optionalChaining; + } + supportsForOf() { return this.outputOptions.environment.forOf; } @@ -59175,8 +61049,7 @@ class RuntimeTemplate { } supportTemplateLiteral() { - // TODO - return false; + return this.outputOptions.environment.templateLiteral; } returningFunction(returnValue, args = "") { @@ -59191,6 +61064,71 @@ class RuntimeTemplate { : `function(${args}) {\n${Template.indent(body)}\n}`; } + /** + * @param {Array} args args + * @returns {string} result expression + */ + concatenation(...args) { + const len = args.length; + + if (len === 2) return this._es5Concatenation(args); + if (len === 0) return '""'; + if (len === 1) { + return typeof args[0] === "string" + ? JSON.stringify(args[0]) + : `"" + ${args[0].expr}`; + } + if (!this.supportTemplateLiteral()) return this._es5Concatenation(args); + + // cost comparison between template literal and concatenation: + // both need equal surroundings: `xxx` vs "xxx" + // template literal has constant cost of 3 chars for each expression + // es5 concatenation has cost of 3 + n chars for n expressions in row + // when a es5 concatenation ends with an expression it reduces cost by 3 + // when a es5 concatenation starts with an single expression it reduces cost by 3 + // e. g. `${a}${b}${c}` (3*3 = 9) is longer than ""+a+b+c ((3+3)-3 = 3) + // e. g. `x${a}x${b}x${c}x` (3*3 = 9) is shorter than "x"+a+"x"+b+"x"+c+"x" (4+4+4 = 12) + + let templateCost = 0; + let concatenationCost = 0; + + let lastWasExpr = false; + for (const arg of args) { + const isExpr = typeof arg !== "string"; + if (isExpr) { + templateCost += 3; + concatenationCost += lastWasExpr ? 1 : 4; + } + lastWasExpr = isExpr; + } + if (lastWasExpr) concatenationCost -= 3; + if (typeof args[0] !== "string" && typeof args[1] === "string") + concatenationCost -= 3; + + if (concatenationCost <= templateCost) return this._es5Concatenation(args); + + return `\`${args + .map(arg => (typeof arg === "string" ? arg : `\${${arg.expr}}`)) + .join("")}\``; + } + + /** + * @param {Array} args args (len >= 2) + * @returns {string} result expression + * @private + */ + _es5Concatenation(args) { + const str = args + .map(arg => (typeof arg === "string" ? JSON.stringify(arg) : arg.expr)) + .join(" + "); + + // when the first two args are expression, we need to prepend "" + to force string + // concatenation instead of number addition. + return typeof args[0] !== "string" && typeof args[1] !== "string" + ? `"" + ${str}` + : str; + } + expressionFunction(expression, args = "") { return this.supportsArrowFunction() ? `(${args}) => (${expression})` @@ -61961,7 +63899,20 @@ class IgnoringWatchFileSystem { fileTimestamps.set(path, IGNORE_TIME_ENTRY); } return fileTimestamps; - } + }, + getInfo: + watcher.getInfo && + (() => { + const info = watcher.getInfo(); + const { fileTimeInfoEntries, contextTimeInfoEntries } = info; + for (const path of ignoredFiles) { + fileTimeInfoEntries.set(path, IGNORE_TIME_ENTRY); + } + for (const path of ignoredDirs) { + contextTimeInfoEntries.set(path, IGNORE_TIME_ENTRY); + } + return info; + }) }; } } @@ -62110,30 +64061,44 @@ class Watching { this.lastWatcherStartTime = Date.now(); } this.compiler.fsStartTime = Date.now(); - this._mergeWithCollected( - changedFiles || - (this.pausedWatcher && + if ( + changedFiles && + removedFiles && + fileTimeInfoEntries && + contextTimeInfoEntries + ) { + this._mergeWithCollected(changedFiles, removedFiles); + this.compiler.fileTimestamps = fileTimeInfoEntries; + this.compiler.contextTimestamps = contextTimeInfoEntries; + } else if (this.pausedWatcher) { + if (this.pausedWatcher.getInfo) { + const { + changes, + removals, + fileTimeInfoEntries, + contextTimeInfoEntries + } = this.pausedWatcher.getInfo(); + this._mergeWithCollected(changes, removals); + this.compiler.fileTimestamps = fileTimeInfoEntries; + this.compiler.contextTimestamps = contextTimeInfoEntries; + } else { + this._mergeWithCollected( this.pausedWatcher.getAggregatedChanges && - this.pausedWatcher.getAggregatedChanges()), - (this.compiler.removedFiles = - removedFiles || - (this.pausedWatcher && + this.pausedWatcher.getAggregatedChanges(), this.pausedWatcher.getAggregatedRemovals && - this.pausedWatcher.getAggregatedRemovals())) - ); - + this.pausedWatcher.getAggregatedRemovals() + ); + this.compiler.fileTimestamps = + this.pausedWatcher.getFileTimeInfoEntries(); + this.compiler.contextTimestamps = + this.pausedWatcher.getContextTimeInfoEntries(); + } + } this.compiler.modifiedFiles = this._collectedChangedFiles; this._collectedChangedFiles = undefined; this.compiler.removedFiles = this._collectedRemovedFiles; this._collectedRemovedFiles = undefined; - this.compiler.fileTimestamps = - fileTimeInfoEntries || - (this.pausedWatcher && this.pausedWatcher.getFileTimeInfoEntries()); - this.compiler.contextTimestamps = - contextTimeInfoEntries || - (this.pausedWatcher && this.pausedWatcher.getContextTimeInfoEntries()); - const run = () => { if (this.compiler.idle) { return this.compiler.cache.endIdle(err => { @@ -63552,7 +65517,7 @@ class AssetGenerator extends Generator { contentHash } ); - let publicPath; + let assetPath; if (this.publicPath !== undefined) { const { path, info } = runtimeTemplate.compilation.getAssetPathWithInfo( @@ -63565,11 +65530,14 @@ class AssetGenerator extends Generator { contentHash } ); - publicPath = JSON.stringify(path); assetInfo = mergeAssetInfo(assetInfo, info); + assetPath = JSON.stringify(path + filename); } else { - publicPath = RuntimeGlobals.publicPath; runtimeRequirements.add(RuntimeGlobals.publicPath); // add __webpack_require__.p + assetPath = runtimeTemplate.concatenation( + { expr: RuntimeGlobals.publicPath }, + filename + ); } assetInfo = { sourceFilename, @@ -63588,9 +65556,7 @@ class AssetGenerator extends Generator { } return new RawSource( - `${ - RuntimeGlobals.module - }.exports = ${publicPath} + ${JSON.stringify(filename)};` + `${RuntimeGlobals.module}.exports = ${assetPath};` ); } } @@ -68948,7 +70914,44 @@ const resolve = browsers => { // kaios: Unknown support node: [12, 0] }), - + optionalChaining: rawChecker({ + chrome: 80, + and_chr: 80, + edge: 80, + firefox: 74, + and_ff: 79, + // ie: Not supported, + opera: 67, + op_mob: 64, + safari: [13, 1], + ios_saf: [13, 4], + samsung: 13, + android: 80, + // and_qq: Not supported + // baidu: Not supported + // and_uc: Not supported + // kaios: Not supported + node: 14 + }), + templateLiteral: rawChecker({ + chrome: 41, + and_chr: 41, + edge: 13, + firefox: 34, + and_ff: 34, + // ie: Not supported, + opera: 29, + op_mob: 64, + safari: [9, 1], + ios_saf: 9, + samsung: 4, + android: 41, + and_qq: [10, 4], + baidu: [7, 12], + and_uc: [12, 12], + kaios: [2, 5], + node: 4 + }), browser: browserProperty, electron: false, node: nodeProperty, @@ -69356,7 +71359,7 @@ const applySnapshotDefaults = (snapshot, { production, futureDefaults }) => { if (process.versions.pnp === "3") { const match = /^(.+?)[\\/]cache[\\/]watchpack-npm-[^\\/]+\.zip[\\/]node_modules[\\/]/.exec( - /*require.resolve*/(98342) + /*require.resolve*/(29149) ); if (match) { return [path.resolve(match[1], "unplugged")]; @@ -69364,7 +71367,7 @@ const applySnapshotDefaults = (snapshot, { production, futureDefaults }) => { } else { const match = /^(.+?[\\/]node_modules[\\/])/.exec( // eslint-disable-next-line node/no-extraneous-require - /*require.resolve*/(98342) + /*require.resolve*/(29149) ); if (match) { return [match[1]]; @@ -69376,7 +71379,7 @@ const applySnapshotDefaults = (snapshot, { production, futureDefaults }) => { if (process.versions.pnp === "1") { const match = /^(.+?[\\/]v4)[\\/]npm-watchpack-[^\\/]+-[\da-f]{40}[\\/]node_modules[\\/]/.exec( - /*require.resolve*/(98342) + /*require.resolve*/(29149) ); if (match) { return [match[1]]; @@ -69384,7 +71387,7 @@ const applySnapshotDefaults = (snapshot, { production, futureDefaults }) => { } else if (process.versions.pnp === "3") { const match = /^(.+?)[\\/]watchpack-npm-[^\\/]+\.zip[\\/]node_modules[\\/]/.exec( - /*require.resolve*/(98342) + /*require.resolve*/(29149) ); if (match) { return [match[1]]; @@ -69811,7 +71814,7 @@ const applyOutputDefaults = ( D(output, "chunkLoadTimeout", 120000); D(output, "hashFunction", futureDefaults ? "xxhash64" : "md4"); D(output, "hashDigest", "hex"); - D(output, "hashDigestLength", 20); + D(output, "hashDigestLength", futureDefaults ? 16 : 20); D(output, "strictModuleExceptionHandling", false); const optimistic = v => v || v === undefined; @@ -70807,6 +72810,8 @@ const getDefaultTarget = context => { * @property {boolean | null} dynamicImport async import() is available * @property {boolean | null} dynamicImportInWorker async import() is available when creating a worker * @property {boolean | null} module ESM syntax is available (when in module) + * @property {boolean | null} optionalChaining optional chaining is available + * @property {boolean | null} templateLiteral template literal is available */ ///** @typedef {PlatformTargetProperties | ApiTargetProperties | EcmaTargetProperties | PlatformTargetProperties & ApiTargetProperties | PlatformTargetProperties & EcmaTargetProperties | ApiTargetProperties & EcmaTargetProperties} TargetProperties */ @@ -70915,6 +72920,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis globalThis: v(12), const: v(6), + templateLiteral: v(4), + optionalChaining: v(14), arrowFunction: v(6), forOf: v(5), destructuring: v(6), @@ -70954,6 +72961,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis globalThis: v(5), const: v(1, 1), + templateLiteral: v(1, 1), + optionalChaining: v(8), arrowFunction: v(1, 1), forOf: v(0, 36), destructuring: v(1, 1), @@ -70989,6 +72998,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis globalThis: v(0, 43), const: v(0, 15), + templateLiteral: v(0, 13), + optionalChaining: v(0, 44), arrowFunction: v(0, 15), forOf: v(0, 13), destructuring: v(0, 15), @@ -71008,6 +73019,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis if (v < 1000) v = v + 2009; return { const: v >= 2015, + templateLiteral: v >= 2015, + optionalChaining: v >= 2020, arrowFunction: v >= 2015, forOf: v >= 2015, destructuring: v >= 2015, @@ -71159,6 +73172,7 @@ const AsyncDependenciesBlock = __webpack_require__(11315); const Module = __webpack_require__(85887); const RuntimeGlobals = __webpack_require__(49404); const Template = __webpack_require__(92066); +const StaticExportsDependency = __webpack_require__(67967); const makeSerializable = __webpack_require__(26522); const ContainerExposedDependency = __webpack_require__(50); @@ -71253,6 +73267,7 @@ class ContainerEntryModule extends Module { strict: true, topLevelDeclarations: new Set(["moduleMap", "get", "init"]) }; + this.buildMeta.exportsType = "namespace"; this.clearDependenciesAndBlocks(); @@ -71276,6 +73291,7 @@ class ContainerEntryModule extends Module { } this.addBlock(block); } + this.addDependency(new StaticExportsDependency(["get", "init"], false)); callback(); } @@ -71366,10 +73382,8 @@ class ContainerEntryModule extends Module { ])};`, `var init = ${runtimeTemplate.basicFunction("shareScope, initScope", [ `if (!${RuntimeGlobals.shareScopeMap}) return;`, - `var oldScope = ${RuntimeGlobals.shareScopeMap}[${JSON.stringify( - this._shareScope - )}];`, `var name = ${JSON.stringify(this._shareScope)}`, + `var oldScope = ${RuntimeGlobals.shareScopeMap}[name];`, `if(oldScope && oldScope !== shareScope) throw new Error("Container initialization failed as it has already been initialized with a different share scope");`, `${RuntimeGlobals.shareScopeMap}[name] = shareScope;`, `return ${RuntimeGlobals.initializeSharing}(name, initScope);` @@ -87010,18 +89024,16 @@ module.exports = ExportWebpackRequireRuntimeModule; -const { ConcatSource, RawSource } = __webpack_require__(96192); +const { ConcatSource } = __webpack_require__(96192); const { RuntimeGlobals } = __webpack_require__(48169); const HotUpdateChunk = __webpack_require__(39222); const Template = __webpack_require__(92066); +const { getAllChunks } = __webpack_require__(8272); const { getCompilationHooks, getChunkFilenameTemplate } = __webpack_require__(76767); -const { - generateEntryStartup, - updateHashForEntryStartup -} = __webpack_require__(30951); +const { updateHashForEntryStartup } = __webpack_require__(30951); /** @typedef {import("../Compiler")} Compiler */ @@ -87089,63 +89101,90 @@ class ModuleChunkFormatPlugin { } ) .split("/"); - const runtimeOutputName = compilation - .getPath( - getChunkFilenameTemplate( - runtimeChunk, - compilation.outputOptions - ), - { - chunk: runtimeChunk, - contentHashType: "javascript" - } - ) - .split("/"); // remove filename, we only need the directory - const outputFilename = currentOutputName.pop(); + currentOutputName.pop(); - // remove common parts - while ( - currentOutputName.length > 0 && - runtimeOutputName.length > 0 && - currentOutputName[0] === runtimeOutputName[0] - ) { - currentOutputName.shift(); - runtimeOutputName.shift(); - } + const getRelativePath = chunk => { + const baseOutputName = currentOutputName.slice(); + const chunkOutputName = compilation + .getPath( + getChunkFilenameTemplate( + chunk, + compilation.outputOptions + ), + { + chunk: chunk, + contentHashType: "javascript" + } + ) + .split("/"); - // create final path - const runtimePath = - (currentOutputName.length > 0 - ? "../".repeat(currentOutputName.length) - : "./") + runtimeOutputName.join("/"); + // remove common parts + while ( + baseOutputName.length > 0 && + chunkOutputName.length > 0 && + baseOutputName[0] === chunkOutputName[0] + ) { + baseOutputName.shift(); + chunkOutputName.shift(); + } + // create final path + return ( + (baseOutputName.length > 0 + ? "../".repeat(baseOutputName.length) + : "./") + chunkOutputName.join("/") + ); + }; const entrySource = new ConcatSource(); entrySource.add(source); entrySource.add(";\n\n// load runtime\n"); entrySource.add( `import __webpack_require__ from ${JSON.stringify( - runtimePath - )};\n` - ); - entrySource.add( - `import * as __webpack_self_exports__ from ${JSON.stringify( - "./" + outputFilename + getRelativePath(runtimeChunk) )};\n` ); - entrySource.add( - `${RuntimeGlobals.externalInstallChunk}(__webpack_self_exports__);\n` - ); - const startupSource = new RawSource( - generateEntryStartup( - chunkGraph, - runtimeTemplate, - entries, - chunk, - false - ) + + const startupSource = new ConcatSource(); + startupSource.add( + `var __webpack_exec__ = ${runtimeTemplate.returningFunction( + `__webpack_require__(${RuntimeGlobals.entryModuleId} = moduleId)`, + "moduleId" + )}\n` ); + + const loadedChunks = new Set(); + let index = 0; + for (let i = 0; i < entries.length; i++) { + const [module, entrypoint] = entries[i]; + const final = i + 1 === entries.length; + const moduleId = chunkGraph.getModuleId(module); + const chunks = getAllChunks( + entrypoint, + runtimeChunk, + undefined + ); + for (const chunk of chunks) { + if (loadedChunks.has(chunk)) continue; + loadedChunks.add(chunk); + startupSource.add( + `import * as __webpack_chunk_${index}__ from ${JSON.stringify( + getRelativePath(chunk) + )};\n` + ); + startupSource.add( + `${RuntimeGlobals.externalInstallChunk}(__webpack_chunk_${index}__);\n` + ); + index++; + } + startupSource.add( + `${ + final ? "var __webpack_exports__ = " : "" + }__webpack_exec__(${JSON.stringify(moduleId)});\n` + ); + } + entrySource.add( hooks.renderStartup.call( startupSource, @@ -89512,6 +91551,7 @@ const memoize = __webpack_require__(84297); /** @typedef {import("../declarations/WebpackOptions").RuleSetRule} RuleSetRule */ /** @typedef {import("../declarations/WebpackOptions").RuleSetUse} RuleSetUse */ /** @typedef {import("../declarations/WebpackOptions").RuleSetUseItem} RuleSetUseItem */ +/** @typedef {import("../declarations/WebpackOptions").StatsOptions} StatsOptions */ /** @typedef {import("../declarations/WebpackOptions").WebpackOptions} Configuration */ /** @typedef {import("../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptionsNormalized */ /** @typedef {import("../declarations/WebpackOptions").WebpackPluginFunction} WebpackPluginFunction */ @@ -89520,6 +91560,8 @@ const memoize = __webpack_require__(84297); /** @typedef {import("./Compilation").AssetInfo} AssetInfo */ /** @typedef {import("./MultiStats")} MultiStats */ /** @typedef {import("./Parser").ParserState} ParserState */ +/** @typedef {import("./ResolverFactory").ResolvePluginInstance} ResolvePluginInstance */ +/** @typedef {import("./ResolverFactory").Resolver} Resolver */ /** @typedef {import("./Watching")} Watching */ /** @typedef {import("./stats/DefaultStatsFactoryPlugin").StatsAsset} StatsAsset */ /** @typedef {import("./stats/DefaultStatsFactoryPlugin").StatsChunk} StatsChunk */ @@ -90112,7 +92154,7 @@ class ArrayPushCallbackChunkFormatPlugin { const { chunk, chunkGraph, runtimeTemplate } = renderContext; const hotUpdateChunk = chunk instanceof HotUpdateChunk ? chunk : null; - const globalObject = runtimeTemplate.outputOptions.globalObject; + const globalObject = runtimeTemplate.globalObject; const source = new ConcatSource(); const runtimeModules = chunkGraph.getChunkRuntimeModulesInOrder(chunk); @@ -90205,7 +92247,7 @@ class ArrayPushCallbackChunkFormatPlugin { (chunk, hash, { chunkGraph, runtimeTemplate }) => { if (chunk.hasRuntime()) return; hash.update( - `ArrayPushCallbackChunkFormatPlugin1${runtimeTemplate.outputOptions.chunkLoadingGlobal}${runtimeTemplate.outputOptions.hotUpdateGlobal}${runtimeTemplate.outputOptions.globalObject}` + `ArrayPushCallbackChunkFormatPlugin1${runtimeTemplate.outputOptions.chunkLoadingGlobal}${runtimeTemplate.outputOptions.hotUpdateGlobal}${runtimeTemplate.globalObject}` ); const entries = Array.from( chunkGraph.getChunkEntryModulesWithChunkGroupIterable(chunk) @@ -90709,6 +92751,47 @@ BasicEvaluatedExpression.isValidRegExpFlags = flags => { module.exports = BasicEvaluatedExpression; +/***/ }), + +/***/ 8272: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Entrypoint = __webpack_require__(86695); + +/** @typedef {import("../Chunk")} Chunk */ + +/** + * @param {Entrypoint} entrypoint a chunk group + * @param {Chunk} excludedChunk1 current chunk which is excluded + * @param {Chunk} excludedChunk2 runtime chunk which is excluded + * @returns {Set} chunks + */ +const getAllChunks = (entrypoint, excludedChunk1, excludedChunk2) => { + const queue = new Set([entrypoint]); + const chunks = new Set(); + for (const entrypoint of queue) { + for (const chunk of entrypoint.chunks) { + if (chunk === excludedChunk1) continue; + if (chunk === excludedChunk2) continue; + chunks.add(chunk); + } + for (const parent of entrypoint.parentsIterable) { + if (parent instanceof Entrypoint) queue.add(parent); + } + } + return chunks; +}; +exports.getAllChunks = getAllChunks; + + /***/ }), /***/ 57634: @@ -93543,6 +95626,13 @@ class JavascriptParser extends Parser { .setString("undefined") .setRange(expr.range); }); + this.hooks.evaluate.for("Identifier").tap("JavascriptParser", expr => { + if (/** @type {IdentifierNode} */ (expr).name === "undefined") { + return new BasicEvaluatedExpression() + .setUndefined() + .setRange(expr.range); + } + }); /** * @param {string} exprType expression type name * @param {function(ExpressionNode): GetInfoResult | undefined} getInfo get info @@ -93797,14 +95887,15 @@ class JavascriptParser extends Parser { const node = /** @type {TaggedTemplateExpressionNode} */ (_node); const tag = this.evaluateExpression(node.tag); - if (tag.isIdentifier() && tag.identifier !== "String.raw") return; - const { quasis, parts } = getSimplifiedTemplateResult( - "raw", - node.quasi - ); - return new BasicEvaluatedExpression() - .setTemplateString(quasis, parts, "raw") - .setRange(node.range); + if (tag.isIdentifier() && tag.identifier === "String.raw") { + const { quasis, parts } = getSimplifiedTemplateResult( + "raw", + node.quasi + ); + return new BasicEvaluatedExpression() + .setTemplateString(quasis, parts, "raw") + .setRange(node.range); + } }); this.hooks.evaluateCallExpressionMember @@ -96504,10 +98595,10 @@ exports.approve = () => true; -const Entrypoint = __webpack_require__(86695); const RuntimeGlobals = __webpack_require__(49404); const Template = __webpack_require__(92066); const { isSubset } = __webpack_require__(34715); +const { getAllChunks } = __webpack_require__(8272); const { chunkHasJs } = __webpack_require__(76767); /** @typedef {import("../util/Hash")} Hash */ @@ -96518,30 +98609,6 @@ const { chunkHasJs } = __webpack_require__(76767); /** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ /** @typedef {(string|number)[]} EntryItem */ -// TODO move to this file to ../javascript/ChunkHelpers.js - -/** - * @param {Entrypoint} entrypoint a chunk group - * @param {Chunk} excludedChunk1 current chunk which is excluded - * @param {Chunk} excludedChunk2 runtime chunk which is excluded - * @returns {Set} chunks - */ -const getAllChunks = (entrypoint, excludedChunk1, excludedChunk2) => { - const queue = new Set([entrypoint]); - const chunks = new Set(); - for (const entrypoint of queue) { - for (const chunk of entrypoint.chunks) { - if (chunk === excludedChunk1) continue; - if (chunk === excludedChunk2) continue; - chunks.add(chunk); - } - for (const parent of entrypoint.parentsIterable) { - if (parent instanceof Entrypoint) queue.add(parent); - } - } - return chunks; -}; - const EXPORT_PREFIX = "var __webpack_exports__ = "; /** @@ -97682,7 +99749,7 @@ class AssignLibraryPlugin extends AbstractLibraryPlugin { _getPrefix(compilation) { return this.prefix === "global" - ? [compilation.outputOptions.globalObject] + ? [compilation.runtimeTemplate.globalObject] : this.prefix; } @@ -97833,15 +99900,10 @@ class AssignLibraryPlugin extends AbstractLibraryPlugin { */ chunkHash(chunk, hash, chunkHashContext, { options, compilation }) { hash.update("AssignLibraryPlugin"); - const prefix = - this.prefix === "global" - ? [compilation.outputOptions.globalObject] - : this.prefix; - const fullName = options.name ? prefix.concat(options.name) : prefix; - const fullNameResolved = fullName.map(n => - compilation.getPath(n, { - chunk - }) + const fullNameResolved = this._getResolvedFullName( + options, + chunk, + compilation ); if (options.name ? this.named === "copy" : this.unnamed === "copy") { hash.update("copy"); @@ -99853,7 +101915,8 @@ module.exports = NodeTemplatePlugin; -const Watchpack = __webpack_require__(98342); +const util = __webpack_require__(31669); +const Watchpack = __webpack_require__(29149); /** @typedef {import("../../declarations/WebpackOptions").WatchOptions} WatchOptions */ /** @typedef {import("../FileSystemInfo").FileSystemInfoEntry} FileSystemInfoEntry */ @@ -99916,7 +101979,22 @@ class NodeWatchFileSystem { if (callbackUndelayed) { this.watcher.once("change", callbackUndelayed); } + + const fetchTimeInfo = () => { + const fileTimeInfoEntries = new Map(); + const contextTimeInfoEntries = new Map(); + if (this.watcher) { + this.watcher.collectTimeInfoEntries( + fileTimeInfoEntries, + contextTimeInfoEntries + ); + } + return { fileTimeInfoEntries, contextTimeInfoEntries }; + }; this.watcher.once("aggregated", (changes, removals) => { + // pause emitting events (avoids clearing aggregated changes and removals on timeout) + this.watcher.pause(); + if (this.inputFileSystem && this.inputFileSystem.purge) { const fs = this.inputFileSystem; for (const item of changes) { @@ -99926,8 +102004,14 @@ class NodeWatchFileSystem { fs.purge(item); } } - const times = this.watcher.getTimeInfoEntries(); - callback(null, times, times, changes, removals); + const { fileTimeInfoEntries, contextTimeInfoEntries } = fetchTimeInfo(); + callback( + null, + fileTimeInfoEntries, + contextTimeInfoEntries, + changes, + removals + ); }); this.watcher.watch({ files, directories, missing, startTime }); @@ -99947,39 +102031,71 @@ class NodeWatchFileSystem { this.watcher.pause(); } }, - getAggregatedRemovals: () => { - const items = this.watcher && this.watcher.aggregatedRemovals; - if (items && this.inputFileSystem && this.inputFileSystem.purge) { - const fs = this.inputFileSystem; - for (const item of items) { - fs.purge(item); + getAggregatedRemovals: util.deprecate( + () => { + const items = this.watcher && this.watcher.aggregatedRemovals; + if (items && this.inputFileSystem && this.inputFileSystem.purge) { + const fs = this.inputFileSystem; + for (const item of items) { + fs.purge(item); + } } - } - return items; - }, - getAggregatedChanges: () => { - const items = this.watcher && this.watcher.aggregatedChanges; - if (items && this.inputFileSystem && this.inputFileSystem.purge) { + return items; + }, + "Watcher.getAggregatedRemovals is deprecated in favor of Watcher.getInfo since that's more performant.", + "DEP_WEBPACK_WATCHER_GET_AGGREGATED_REMOVALS" + ), + getAggregatedChanges: util.deprecate( + () => { + const items = this.watcher && this.watcher.aggregatedChanges; + if (items && this.inputFileSystem && this.inputFileSystem.purge) { + const fs = this.inputFileSystem; + for (const item of items) { + fs.purge(item); + } + } + return items; + }, + "Watcher.getAggregatedChanges is deprecated in favor of Watcher.getInfo since that's more performant.", + "DEP_WEBPACK_WATCHER_GET_AGGREGATED_CHANGES" + ), + getFileTimeInfoEntries: util.deprecate( + () => { + return fetchTimeInfo().fileTimeInfoEntries; + }, + "Watcher.getFileTimeInfoEntries is deprecated in favor of Watcher.getInfo since that's more performant.", + "DEP_WEBPACK_WATCHER_FILE_TIME_INFO_ENTRIES" + ), + getContextTimeInfoEntries: util.deprecate( + () => { + return fetchTimeInfo().contextTimeInfoEntries; + }, + "Watcher.getContextTimeInfoEntries is deprecated in favor of Watcher.getInfo since that's more performant.", + "DEP_WEBPACK_WATCHER_CONTEXT_TIME_INFO_ENTRIES" + ), + getInfo: () => { + const removals = this.watcher && this.watcher.aggregatedRemovals; + const changes = this.watcher && this.watcher.aggregatedChanges; + if (this.inputFileSystem && this.inputFileSystem.purge) { const fs = this.inputFileSystem; - for (const item of items) { - fs.purge(item); + if (removals) { + for (const item of removals) { + fs.purge(item); + } + } + if (changes) { + for (const item of changes) { + fs.purge(item); + } } } - return items; - }, - getFileTimeInfoEntries: () => { - if (this.watcher) { - return this.watcher.getTimeInfoEntries(); - } else { - return new Map(); - } - }, - getContextTimeInfoEntries: () => { - if (this.watcher) { - return this.watcher.getTimeInfoEntries(); - } else { - return new Map(); - } + const { fileTimeInfoEntries, contextTimeInfoEntries } = fetchTimeInfo(); + return { + changes, + removals, + fileTimeInfoEntries, + contextTimeInfoEntries + }; } }; } @@ -115991,6 +118107,10 @@ class ConsumeSharedModule extends Module { } args.push(stringifyHoley(requiredVersion)); fn += "VersionCheck"; + } else { + if (singleton) { + fn += "Singleton"; + } } if (fallbackCode) { fn += "Fallback"; @@ -116464,9 +118584,16 @@ class ConsumeSharedRuntimeModule extends RuntimeModule { ] )};`, `var getInvalidSingletonVersionMessage = ${runtimeTemplate.basicFunction( - "key, version, requiredVersion", + "scope, key, version, requiredVersion", + [ + `return "Unsatisfied version " + version + " from " + (version && scope[key][version].from) + " of shared singleton module " + key + " (required " + rangeToString(requiredVersion) + ")"` + ] + )};`, + `var getSingleton = ${runtimeTemplate.basicFunction( + "scope, scopeName, key, requiredVersion", [ - `return "Unsatisfied version " + version + " of shared singleton module " + key + " (required " + rangeToString(requiredVersion) + ")"` + "var version = findSingletonVersionKey(scope, key);", + "return get(scope[key][version]);" ] )};`, `var getSingletonVersion = ${runtimeTemplate.basicFunction( @@ -116474,7 +118601,7 @@ class ConsumeSharedRuntimeModule extends RuntimeModule { [ "var version = findSingletonVersionKey(scope, key);", "if (!satisfy(requiredVersion, version)) " + - 'typeof console !== "undefined" && console.warn && console.warn(getInvalidSingletonVersionMessage(key, version, requiredVersion));', + 'typeof console !== "undefined" && console.warn && console.warn(getInvalidSingletonVersionMessage(scope, key, version, requiredVersion));', "return get(scope[key][version]);" ] )};`, @@ -116483,7 +118610,7 @@ class ConsumeSharedRuntimeModule extends RuntimeModule { [ "var version = findSingletonVersionKey(scope, key);", "if (!satisfy(requiredVersion, version)) " + - "throw new Error(getInvalidSingletonVersionMessage(key, version, requiredVersion));", + "throw new Error(getInvalidSingletonVersionMessage(scope, key, version, requiredVersion));", "return get(scope[key][version]);" ] )};`, @@ -116563,6 +118690,13 @@ class ConsumeSharedRuntimeModule extends RuntimeModule { "return get(findValidVersion(scope, key, version) || warnInvalidVersion(scope, scopeName, key, version) || findVersion(scope, key));" ] )});`, + `var loadSingleton = /*#__PURE__*/ init(${runtimeTemplate.basicFunction( + "scopeName, scope, key", + [ + "ensureExistence(scopeName, key);", + "return getSingleton(scope, scopeName, key);" + ] + )});`, `var loadSingletonVersionCheck = /*#__PURE__*/ init(${runtimeTemplate.basicFunction( "scopeName, scope, key, version", [ @@ -116591,6 +118725,13 @@ class ConsumeSharedRuntimeModule extends RuntimeModule { "return get(findValidVersion(scope, key, version) || warnInvalidVersion(scope, scopeName, key, version) || findVersion(scope, key));" ] )});`, + `var loadSingletonFallback = /*#__PURE__*/ init(${runtimeTemplate.basicFunction( + "scopeName, scope, key, fallback", + [ + `if(!scope || !${RuntimeGlobals.hasOwnProperty}(scope, key)) return fallback();`, + "return getSingleton(scope, scopeName, key);" + ] + )});`, `var loadSingletonVersionCheckFallback = /*#__PURE__*/ init(${runtimeTemplate.basicFunction( "scopeName, scope, key, version, fallback", [ @@ -121600,7 +123741,7 @@ const AVAILABLE_FORMATS = { }, { regExp: /(\(module has no exports\))/g, format: red }, { regExp: /\(possible exports: (.+)\)/g, format: green }, - { regExp: /\s*([^\s].* doesn't exist)/g, format: red }, + { regExp: /(?:^|\n)(.* doesn't exist)/g, format: red }, { regExp: /('\w+' option has not been set)/g, format: red }, { regExp: /(Emitted value instead of an instance of Error)/g, @@ -127062,6 +129203,9 @@ module.exports = ({ maxSize, minSize, items, getSize, getKey }) => { */ module.exports = function extractUrlAndGlobal(urlAndGlobal) { const index = urlAndGlobal.indexOf("@"); + if (index <= 0 || index === urlAndGlobal.length - 1) { + throw new Error(`Invalid request "${urlAndGlobal}"`); + } return [urlAndGlobal.substring(index + 1), urlAndGlobal.substring(0, index)]; }; @@ -127372,6 +129516,15 @@ const path = __webpack_require__(85622); /** @typedef {function((NodeJS.ErrnoException | Error | null)=, any=): void} ReadJsonCallback */ /** @typedef {function((NodeJS.ErrnoException | Error | null)=, IStats|string=): void} LstatReadlinkAbsoluteCallback */ +/** + * @typedef {Object} WatcherInfo + * @property {Set} changes get current aggregated changes that have not yet send to callback + * @property {Set} removals get current aggregated removals that have not yet send to callback + * @property {Map} fileTimeInfoEntries get info about files + * @property {Map} contextTimeInfoEntries get info about directories + */ + +// TODO webpack 6 deprecate missing getInfo /** * @typedef {Object} Watcher * @property {function(): void} close closes the watcher and all underlying file watchers @@ -127380,6 +129533,7 @@ const path = __webpack_require__(85622); * @property {function(): Set=} getAggregatedRemovals get current aggregated removals that have not yet send to callback * @property {function(): Map} getFileTimeInfoEntries get info about files * @property {function(): Map} getContextTimeInfoEntries get info about directories + * @property {function(): WatcherInfo=} getInfo get info about timestamps and changes */ /** @@ -133698,13 +135852,13 @@ class JsonpChunkLoadingRuntimeModule extends RuntimeModule { const { runtimeTemplate, outputOptions: { - globalObject, chunkLoadingGlobal, hotUpdateGlobal, crossOriginLoading, scriptType } } = compilation; + const globalObject = runtimeTemplate.globalObject; const { linkPreload, linkPrefetch } = JsonpChunkLoadingRuntimeModule.getCompilationHooks(compilation); const fn = RuntimeGlobals.ensureChunkHandlers; @@ -134453,10 +136607,11 @@ class ImportScriptsChunkLoadingRuntimeModule extends RuntimeModule { chunkGraph, compilation: { runtimeTemplate, - outputOptions: { globalObject, chunkLoadingGlobal, hotUpdateGlobal } + outputOptions: { chunkLoadingGlobal, hotUpdateGlobal } }, _withCreateScriptUrl: withCreateScriptUrl } = this; + const globalObject = runtimeTemplate.globalObject; const fn = RuntimeGlobals.ensureChunkHandlers; const withBaseURI = this.runtimeRequirements.has(RuntimeGlobals.baseURI); const withLoading = this.runtimeRequirements.has( @@ -140186,1839 +142341,778 @@ const join = (rootPath, request) => { } return posixNormalize(rootPath); }; -exports.join = join; - -const joinCache = new Map(); - -/** - * @param {string} rootPath the root path - * @param {string | undefined} request the request path - * @returns {string} the joined path - */ -const cachedJoin = (rootPath, request) => { - let cacheEntry; - let cache = joinCache.get(rootPath); - if (cache === undefined) { - joinCache.set(rootPath, (cache = new Map())); - } else { - cacheEntry = cache.get(request); - if (cacheEntry !== undefined) return cacheEntry; - } - cacheEntry = join(rootPath, request); - cache.set(request, cacheEntry); - return cacheEntry; -}; -exports.cachedJoin = cachedJoin; - -const checkExportsFieldTarget = relativePath => { - let lastNonSlashIndex = 2; - let slashIndex = relativePath.indexOf("/", 2); - let cd = 0; - - while (slashIndex !== -1) { - const folder = relativePath.slice(lastNonSlashIndex, slashIndex); - - switch (folder) { - case "..": { - cd--; - if (cd < 0) - return new Error( - `Trying to access out of package scope. Requesting ${relativePath}` - ); - break; - } - default: - cd++; - break; - } - - lastNonSlashIndex = slashIndex + 1; - slashIndex = relativePath.indexOf("/", lastNonSlashIndex); - } -}; -exports.checkExportsFieldTarget = checkExportsFieldTarget; - - -/***/ }), - -/***/ 83798: -/***/ (function(module) { - -"use strict"; - - -class LoadingLoaderError extends Error { - constructor(message) { - super(message); - this.name = "LoaderRunnerError"; - Error.captureStackTrace(this, this.constructor); - } -} - -module.exports = LoadingLoaderError; - - -/***/ }), - -/***/ 67578: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ -var fs = __webpack_require__(35747); -var readFile = fs.readFile.bind(fs); -var loadLoader = __webpack_require__(63395); - -function utf8BufferToString(buf) { - var str = buf.toString("utf-8"); - if(str.charCodeAt(0) === 0xFEFF) { - return str.substr(1); - } else { - return str; - } -} - -const PATH_QUERY_FRAGMENT_REGEXP = /^((?:\0.|[^?#\0])*)(\?(?:\0.|[^#\0])*)?(#.*)?$/; - -/** - * @param {string} str the path with query and fragment - * @returns {{ path: string, query: string, fragment: string }} parsed parts - */ -function parsePathQueryFragment(str) { - var match = PATH_QUERY_FRAGMENT_REGEXP.exec(str); - return { - path: match[1].replace(/\0(.)/g, "$1"), - query: match[2] ? match[2].replace(/\0(.)/g, "$1") : "", - fragment: match[3] || "" - }; -} - -function dirname(path) { - if(path === "/") return "/"; - var i = path.lastIndexOf("/"); - var j = path.lastIndexOf("\\"); - var i2 = path.indexOf("/"); - var j2 = path.indexOf("\\"); - var idx = i > j ? i : j; - var idx2 = i > j ? i2 : j2; - if(idx < 0) return path; - if(idx === idx2) return path.substr(0, idx + 1); - return path.substr(0, idx); -} - -function createLoaderObject(loader) { - var obj = { - path: null, - query: null, - fragment: null, - options: null, - ident: null, - normal: null, - pitch: null, - raw: null, - data: null, - pitchExecuted: false, - normalExecuted: false - }; - Object.defineProperty(obj, "request", { - enumerable: true, - get: function() { - return obj.path.replace(/#/g, "\0#") + obj.query.replace(/#/g, "\0#") + obj.fragment; - }, - set: function(value) { - if(typeof value === "string") { - var splittedRequest = parsePathQueryFragment(value); - obj.path = splittedRequest.path; - obj.query = splittedRequest.query; - obj.fragment = splittedRequest.fragment; - obj.options = undefined; - obj.ident = undefined; - } else { - if(!value.loader) - throw new Error("request should be a string or object with loader and options (" + JSON.stringify(value) + ")"); - obj.path = value.loader; - obj.fragment = value.fragment || ""; - obj.type = value.type; - obj.options = value.options; - obj.ident = value.ident; - if(obj.options === null) - obj.query = ""; - else if(obj.options === undefined) - obj.query = ""; - else if(typeof obj.options === "string") - obj.query = "?" + obj.options; - else if(obj.ident) - obj.query = "??" + obj.ident; - else if(typeof obj.options === "object" && obj.options.ident) - obj.query = "??" + obj.options.ident; - else - obj.query = "?" + JSON.stringify(obj.options); - } - } - }); - obj.request = loader; - if(Object.preventExtensions) { - Object.preventExtensions(obj); - } - return obj; -} - -function runSyncOrAsync(fn, context, args, callback) { - var isSync = true; - var isDone = false; - var isError = false; // internal error - var reportedError = false; - context.async = function async() { - if(isDone) { - if(reportedError) return; // ignore - throw new Error("async(): The callback was already called."); - } - isSync = false; - return innerCallback; - }; - var innerCallback = context.callback = function() { - if(isDone) { - if(reportedError) return; // ignore - throw new Error("callback(): The callback was already called."); - } - isDone = true; - isSync = false; - try { - callback.apply(null, arguments); - } catch(e) { - isError = true; - throw e; - } - }; - try { - var result = (function LOADER_EXECUTION() { - return fn.apply(context, args); - }()); - if(isSync) { - isDone = true; - if(result === undefined) - return callback(); - if(result && typeof result === "object" && typeof result.then === "function") { - return result.then(function(r) { - callback(null, r); - }, callback); - } - return callback(null, result); - } - } catch(e) { - if(isError) throw e; - if(isDone) { - // loader is already "done", so we cannot use the callback function - // for better debugging we print the error on the console - if(typeof e === "object" && e.stack) console.error(e.stack); - else console.error(e); - return; - } - isDone = true; - reportedError = true; - callback(e); - } - -} - -function convertArgs(args, raw) { - if(!raw && Buffer.isBuffer(args[0])) - args[0] = utf8BufferToString(args[0]); - else if(raw && typeof args[0] === "string") - args[0] = Buffer.from(args[0], "utf-8"); -} - -function iteratePitchingLoaders(options, loaderContext, callback) { - // abort after last loader - if(loaderContext.loaderIndex >= loaderContext.loaders.length) - return processResource(options, loaderContext, callback); - - var currentLoaderObject = loaderContext.loaders[loaderContext.loaderIndex]; - - // iterate - if(currentLoaderObject.pitchExecuted) { - loaderContext.loaderIndex++; - return iteratePitchingLoaders(options, loaderContext, callback); - } - - // load loader module - loadLoader(currentLoaderObject, function(err) { - if(err) { - loaderContext.cacheable(false); - return callback(err); - } - var fn = currentLoaderObject.pitch; - currentLoaderObject.pitchExecuted = true; - if(!fn) return iteratePitchingLoaders(options, loaderContext, callback); - - runSyncOrAsync( - fn, - loaderContext, [loaderContext.remainingRequest, loaderContext.previousRequest, currentLoaderObject.data = {}], - function(err) { - if(err) return callback(err); - var args = Array.prototype.slice.call(arguments, 1); - // Determine whether to continue the pitching process based on - // argument values (as opposed to argument presence) in order - // to support synchronous and asynchronous usages. - var hasArg = args.some(function(value) { - return value !== undefined; - }); - if(hasArg) { - loaderContext.loaderIndex--; - iterateNormalLoaders(options, loaderContext, args, callback); - } else { - iteratePitchingLoaders(options, loaderContext, callback); - } - } - ); - }); -} - -function processResource(options, loaderContext, callback) { - // set loader index to last loader - loaderContext.loaderIndex = loaderContext.loaders.length - 1; - - var resourcePath = loaderContext.resourcePath; - if(resourcePath) { - options.processResource(loaderContext, resourcePath, function(err, buffer) { - if(err) return callback(err); - options.resourceBuffer = buffer; - iterateNormalLoaders(options, loaderContext, [buffer], callback); - }); - } else { - iterateNormalLoaders(options, loaderContext, [null], callback); - } -} - -function iterateNormalLoaders(options, loaderContext, args, callback) { - if(loaderContext.loaderIndex < 0) - return callback(null, args); - - var currentLoaderObject = loaderContext.loaders[loaderContext.loaderIndex]; - - // iterate - if(currentLoaderObject.normalExecuted) { - loaderContext.loaderIndex--; - return iterateNormalLoaders(options, loaderContext, args, callback); - } - - var fn = currentLoaderObject.normal; - currentLoaderObject.normalExecuted = true; - if(!fn) { - return iterateNormalLoaders(options, loaderContext, args, callback); - } - - convertArgs(args, currentLoaderObject.raw); - - runSyncOrAsync(fn, loaderContext, args, function(err) { - if(err) return callback(err); - - var args = Array.prototype.slice.call(arguments, 1); - iterateNormalLoaders(options, loaderContext, args, callback); - }); -} - -exports.getContext = function getContext(resource) { - var path = parsePathQueryFragment(resource).path; - return dirname(path); -}; - -exports.runLoaders = function runLoaders(options, callback) { - // read options - var resource = options.resource || ""; - var loaders = options.loaders || []; - var loaderContext = options.context || {}; - var processResource = options.processResource || ((readResource, context, resource, callback) => { - context.addDependency(resource); - readResource(resource, callback); - }).bind(null, options.readResource || readFile); - - // - var splittedResource = resource && parsePathQueryFragment(resource); - var resourcePath = splittedResource ? splittedResource.path : undefined; - var resourceQuery = splittedResource ? splittedResource.query : undefined; - var resourceFragment = splittedResource ? splittedResource.fragment : undefined; - var contextDirectory = resourcePath ? dirname(resourcePath) : null; - - // execution state - var requestCacheable = true; - var fileDependencies = []; - var contextDependencies = []; - var missingDependencies = []; - - // prepare loader objects - loaders = loaders.map(createLoaderObject); - - loaderContext.context = contextDirectory; - loaderContext.loaderIndex = 0; - loaderContext.loaders = loaders; - loaderContext.resourcePath = resourcePath; - loaderContext.resourceQuery = resourceQuery; - loaderContext.resourceFragment = resourceFragment; - loaderContext.async = null; - loaderContext.callback = null; - loaderContext.cacheable = function cacheable(flag) { - if(flag === false) { - requestCacheable = false; - } - }; - loaderContext.dependency = loaderContext.addDependency = function addDependency(file) { - fileDependencies.push(file); - }; - loaderContext.addContextDependency = function addContextDependency(context) { - contextDependencies.push(context); - }; - loaderContext.addMissingDependency = function addMissingDependency(context) { - missingDependencies.push(context); - }; - loaderContext.getDependencies = function getDependencies() { - return fileDependencies.slice(); - }; - loaderContext.getContextDependencies = function getContextDependencies() { - return contextDependencies.slice(); - }; - loaderContext.getMissingDependencies = function getMissingDependencies() { - return missingDependencies.slice(); - }; - loaderContext.clearDependencies = function clearDependencies() { - fileDependencies.length = 0; - contextDependencies.length = 0; - missingDependencies.length = 0; - requestCacheable = true; - }; - Object.defineProperty(loaderContext, "resource", { - enumerable: true, - get: function() { - if(loaderContext.resourcePath === undefined) - return undefined; - return loaderContext.resourcePath.replace(/#/g, "\0#") + loaderContext.resourceQuery.replace(/#/g, "\0#") + loaderContext.resourceFragment; - }, - set: function(value) { - var splittedResource = value && parsePathQueryFragment(value); - loaderContext.resourcePath = splittedResource ? splittedResource.path : undefined; - loaderContext.resourceQuery = splittedResource ? splittedResource.query : undefined; - loaderContext.resourceFragment = splittedResource ? splittedResource.fragment : undefined; - } - }); - Object.defineProperty(loaderContext, "request", { - enumerable: true, - get: function() { - return loaderContext.loaders.map(function(o) { - return o.request; - }).concat(loaderContext.resource || "").join("!"); - } - }); - Object.defineProperty(loaderContext, "remainingRequest", { - enumerable: true, - get: function() { - if(loaderContext.loaderIndex >= loaderContext.loaders.length - 1 && !loaderContext.resource) - return ""; - return loaderContext.loaders.slice(loaderContext.loaderIndex + 1).map(function(o) { - return o.request; - }).concat(loaderContext.resource || "").join("!"); - } - }); - Object.defineProperty(loaderContext, "currentRequest", { - enumerable: true, - get: function() { - return loaderContext.loaders.slice(loaderContext.loaderIndex).map(function(o) { - return o.request; - }).concat(loaderContext.resource || "").join("!"); - } - }); - Object.defineProperty(loaderContext, "previousRequest", { - enumerable: true, - get: function() { - return loaderContext.loaders.slice(0, loaderContext.loaderIndex).map(function(o) { - return o.request; - }).join("!"); - } - }); - Object.defineProperty(loaderContext, "query", { - enumerable: true, - get: function() { - var entry = loaderContext.loaders[loaderContext.loaderIndex]; - return entry.options && typeof entry.options === "object" ? entry.options : entry.query; - } - }); - Object.defineProperty(loaderContext, "data", { - enumerable: true, - get: function() { - return loaderContext.loaders[loaderContext.loaderIndex].data; - } - }); - - // finish loader context - if(Object.preventExtensions) { - Object.preventExtensions(loaderContext); - } - - var processOptions = { - resourceBuffer: null, - processResource: processResource - }; - iteratePitchingLoaders(processOptions, loaderContext, function(err, result) { - if(err) { - return callback(err, { - cacheable: requestCacheable, - fileDependencies: fileDependencies, - contextDependencies: contextDependencies, - missingDependencies: missingDependencies - }); - } - callback(null, { - result: result, - resourceBuffer: processOptions.resourceBuffer, - cacheable: requestCacheable, - fileDependencies: fileDependencies, - contextDependencies: contextDependencies, - missingDependencies: missingDependencies - }); - }); -}; - - -/***/ }), - -/***/ 63395: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var LoaderLoadingError = __webpack_require__(83798); -var url; - -module.exports = function loadLoader(loader, callback) { - if(loader.type === "module") { - try { - if(url === undefined) url = __webpack_require__(78835); - var loaderUrl = url.pathToFileURL(loader.path); - var modulePromise = eval("import(" + JSON.stringify(loaderUrl.toString()) + ")"); - modulePromise.then(function(module) { - handleResult(loader, module, callback); - }, callback); - return; - } catch(e) { - callback(e); - } - } else { - try { - var module = require(loader.path); - } catch(e) { - // it is possible for node to choke on a require if the FD descriptor - // limit has been reached. give it a chance to recover. - if(e instanceof Error && e.code === "EMFILE") { - var retry = loadLoader.bind(null, loader, callback); - if(typeof setImmediate === "function") { - // node >= 0.9.0 - return setImmediate(retry); - } else { - // node < 0.9.0 - return process.nextTick(retry); - } - } - return callback(e); - } - return handleResult(loader, module, callback); - } -}; - -function handleResult(loader, module, callback) { - if(typeof module !== "function" && typeof module !== "object") { - return callback(new LoaderLoadingError( - "Module '" + loader.path + "' is not a loader (export function or es6 module)" - )); - } - loader.normal = typeof module === "function" ? module : module.default; - loader.pitch = module.pitch; - loader.raw = module.raw; - if(typeof loader.normal !== "function" && typeof loader.pitch !== "function") { - return callback(new LoaderLoadingError( - "Module '" + loader.path + "' is not a loader (must have normal or pitch function)" - )); - } - callback(); -} - - -/***/ }), - -/***/ 11060: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -/*! - * mime-db - * Copyright(c) 2014 Jonathan Ong - * MIT Licensed - */ - -/** - * Module exports. - */ - -module.exports = __webpack_require__(53243) - - -/***/ }), - -/***/ 19338: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/*! - * mime-types - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module dependencies. - * @private - */ - -var db = __webpack_require__(11060) -var extname = __webpack_require__(85622).extname - -/** - * Module variables. - * @private - */ - -var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ -var TEXT_TYPE_REGEXP = /^text\//i - -/** - * Module exports. - * @public - */ - -exports.charset = charset -exports.charsets = { lookup: charset } -exports.contentType = contentType -exports.extension = extension -exports.extensions = Object.create(null) -exports.lookup = lookup -exports.types = Object.create(null) - -// Populate the extensions/types maps -populateMaps(exports.extensions, exports.types) - -/** - * Get the default charset for a MIME type. - * - * @param {string} type - * @return {boolean|string} - */ - -function charset (type) { - if (!type || typeof type !== 'string') { - return false - } - - // TODO: use media-typer - var match = EXTRACT_TYPE_REGEXP.exec(type) - var mime = match && db[match[1].toLowerCase()] - - if (mime && mime.charset) { - return mime.charset - } - - // default text/* to utf-8 - if (match && TEXT_TYPE_REGEXP.test(match[1])) { - return 'UTF-8' - } - - return false -} - -/** - * Create a full Content-Type header given a MIME type or extension. - * - * @param {string} str - * @return {boolean|string} - */ - -function contentType (str) { - // TODO: should this even be in this module? - if (!str || typeof str !== 'string') { - return false - } - - var mime = str.indexOf('/') === -1 - ? exports.lookup(str) - : str - - if (!mime) { - return false - } - - // TODO: use content-type or other module - if (mime.indexOf('charset') === -1) { - var charset = exports.charset(mime) - if (charset) mime += '; charset=' + charset.toLowerCase() - } - - return mime -} - -/** - * Get the default extension for a MIME type. - * - * @param {string} type - * @return {boolean|string} - */ - -function extension (type) { - if (!type || typeof type !== 'string') { - return false - } - - // TODO: use media-typer - var match = EXTRACT_TYPE_REGEXP.exec(type) - - // get extensions - var exts = match && exports.extensions[match[1].toLowerCase()] - - if (!exts || !exts.length) { - return false - } - - return exts[0] -} - -/** - * Lookup the MIME type for a file path/extension. - * - * @param {string} path - * @return {boolean|string} - */ - -function lookup (path) { - if (!path || typeof path !== 'string') { - return false - } - - // get the extension ("ext" or ".ext" or full path) - var extension = extname('x.' + path) - .toLowerCase() - .substr(1) - - if (!extension) { - return false - } - - return exports.types[extension] || false -} - -/** - * Populate the extensions and types maps. - * @private - */ - -function populateMaps (extensions, types) { - // source preference (least -> most) - var preference = ['nginx', 'apache', undefined, 'iana'] - - Object.keys(db).forEach(function forEachMimeType (type) { - var mime = db[type] - var exts = mime.extensions - - if (!exts || !exts.length) { - return - } - - // mime -> extensions - extensions[type] = exts - - // extension -> mime - for (var i = 0; i < exts.length; i++) { - var extension = exts[i] - - if (types[extension]) { - var from = preference.indexOf(db[types[extension]].source) - var to = preference.indexOf(mime.source) - - if (types[extension] !== 'application/octet-stream' && - (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { - // skip the remapping - continue - } - } - - // set the extension -> mime - types[extension] = type - } - }) -} - - -/***/ }), - -/***/ 28339: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - -const Hook = __webpack_require__(36591); -const HookCodeFactory = __webpack_require__(85572); - -class AsyncParallelBailHookCodeFactory extends HookCodeFactory { - content({ onError, onResult, onDone }) { - let code = ""; - code += `var _results = new Array(${this.options.taps.length});\n`; - code += "var _checkDone = function() {\n"; - code += "for(var i = 0; i < _results.length; i++) {\n"; - code += "var item = _results[i];\n"; - code += "if(item === undefined) return false;\n"; - code += "if(item.result !== undefined) {\n"; - code += onResult("item.result"); - code += "return true;\n"; - code += "}\n"; - code += "if(item.error) {\n"; - code += onError("item.error"); - code += "return true;\n"; - code += "}\n"; - code += "}\n"; - code += "return false;\n"; - code += "}\n"; - code += this.callTapsParallel({ - onError: (i, err, done, doneBreak) => { - let code = ""; - code += `if(${i} < _results.length && ((_results.length = ${i + - 1}), (_results[${i}] = { error: ${err} }), _checkDone())) {\n`; - code += doneBreak(true); - code += "} else {\n"; - code += done(); - code += "}\n"; - return code; - }, - onResult: (i, result, done, doneBreak) => { - let code = ""; - code += `if(${i} < _results.length && (${result} !== undefined && (_results.length = ${i + - 1}), (_results[${i}] = { result: ${result} }), _checkDone())) {\n`; - code += doneBreak(true); - code += "} else {\n"; - code += done(); - code += "}\n"; - return code; - }, - onTap: (i, run, done, doneBreak) => { - let code = ""; - if (i > 0) { - code += `if(${i} >= _results.length) {\n`; - code += done(); - code += "} else {\n"; - } - code += run(); - if (i > 0) code += "}\n"; - return code; - }, - onDone - }); - return code; - } -} - -const factory = new AsyncParallelBailHookCodeFactory(); - -const COMPILE = function(options) { - factory.setup(this, options); - return factory.create(options); -}; - -function AsyncParallelBailHook(args = [], name = undefined) { - const hook = new Hook(args, name); - hook.constructor = AsyncParallelBailHook; - hook.compile = COMPILE; - hook._call = undefined; - hook.call = undefined; - return hook; -} - -AsyncParallelBailHook.prototype = null; - -module.exports = AsyncParallelBailHook; - - -/***/ }), - -/***/ 82890: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - -const Hook = __webpack_require__(36591); -const HookCodeFactory = __webpack_require__(85572); - -class AsyncParallelHookCodeFactory extends HookCodeFactory { - content({ onError, onDone }) { - return this.callTapsParallel({ - onError: (i, err, done, doneBreak) => onError(err) + doneBreak(true), - onDone - }); - } -} - -const factory = new AsyncParallelHookCodeFactory(); - -const COMPILE = function(options) { - factory.setup(this, options); - return factory.create(options); -}; - -function AsyncParallelHook(args = [], name = undefined) { - const hook = new Hook(args, name); - hook.constructor = AsyncParallelHook; - hook.compile = COMPILE; - hook._call = undefined; - hook.call = undefined; - return hook; -} - -AsyncParallelHook.prototype = null; - -module.exports = AsyncParallelHook; - - -/***/ }), - -/***/ 97681: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - -const Hook = __webpack_require__(36591); -const HookCodeFactory = __webpack_require__(85572); - -class AsyncSeriesBailHookCodeFactory extends HookCodeFactory { - content({ onError, onResult, resultReturns, onDone }) { - return this.callTapsSeries({ - onError: (i, err, next, doneBreak) => onError(err) + doneBreak(true), - onResult: (i, result, next) => - `if(${result} !== undefined) {\n${onResult( - result - )}\n} else {\n${next()}}\n`, - resultReturns, - onDone - }); - } -} - -const factory = new AsyncSeriesBailHookCodeFactory(); - -const COMPILE = function(options) { - factory.setup(this, options); - return factory.create(options); -}; - -function AsyncSeriesBailHook(args = [], name = undefined) { - const hook = new Hook(args, name); - hook.constructor = AsyncSeriesBailHook; - hook.compile = COMPILE; - hook._call = undefined; - hook.call = undefined; - return hook; -} - -AsyncSeriesBailHook.prototype = null; - -module.exports = AsyncSeriesBailHook; - +exports.join = join; -/***/ }), +const joinCache = new Map(); -/***/ 45146: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { +/** + * @param {string} rootPath the root path + * @param {string | undefined} request the request path + * @returns {string} the joined path + */ +const cachedJoin = (rootPath, request) => { + let cacheEntry; + let cache = joinCache.get(rootPath); + if (cache === undefined) { + joinCache.set(rootPath, (cache = new Map())); + } else { + cacheEntry = cache.get(request); + if (cacheEntry !== undefined) return cacheEntry; + } + cacheEntry = join(rootPath, request); + cache.set(request, cacheEntry); + return cacheEntry; +}; +exports.cachedJoin = cachedJoin; -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ +const checkExportsFieldTarget = relativePath => { + let lastNonSlashIndex = 2; + let slashIndex = relativePath.indexOf("/", 2); + let cd = 0; + while (slashIndex !== -1) { + const folder = relativePath.slice(lastNonSlashIndex, slashIndex); -const Hook = __webpack_require__(36591); -const HookCodeFactory = __webpack_require__(85572); + switch (folder) { + case "..": { + cd--; + if (cd < 0) + return new Error( + `Trying to access out of package scope. Requesting ${relativePath}` + ); + break; + } + default: + cd++; + break; + } -class AsyncSeriesHookCodeFactory extends HookCodeFactory { - content({ onError, onDone }) { - return this.callTapsSeries({ - onError: (i, err, next, doneBreak) => onError(err) + doneBreak(true), - onDone - }); + lastNonSlashIndex = slashIndex + 1; + slashIndex = relativePath.indexOf("/", lastNonSlashIndex); } -} - -const factory = new AsyncSeriesHookCodeFactory(); - -const COMPILE = function(options) { - factory.setup(this, options); - return factory.create(options); }; - -function AsyncSeriesHook(args = [], name = undefined) { - const hook = new Hook(args, name); - hook.constructor = AsyncSeriesHook; - hook.compile = COMPILE; - hook._call = undefined; - hook.call = undefined; - return hook; -} - -AsyncSeriesHook.prototype = null; - -module.exports = AsyncSeriesHook; +exports.checkExportsFieldTarget = checkExportsFieldTarget; /***/ }), -/***/ 5463: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { +/***/ 83798: +/***/ (function(module) { "use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - -const Hook = __webpack_require__(36591); -const HookCodeFactory = __webpack_require__(85572); -class AsyncSeriesLoopHookCodeFactory extends HookCodeFactory { - content({ onError, onDone }) { - return this.callTapsLooping({ - onError: (i, err, next, doneBreak) => onError(err) + doneBreak(true), - onDone - }); +class LoadingLoaderError extends Error { + constructor(message) { + super(message); + this.name = "LoaderRunnerError"; + Error.captureStackTrace(this, this.constructor); } } -const factory = new AsyncSeriesLoopHookCodeFactory(); - -const COMPILE = function(options) { - factory.setup(this, options); - return factory.create(options); -}; - -function AsyncSeriesLoopHook(args = [], name = undefined) { - const hook = new Hook(args, name); - hook.constructor = AsyncSeriesLoopHook; - hook.compile = COMPILE; - hook._call = undefined; - hook.call = undefined; - return hook; -} - -AsyncSeriesLoopHook.prototype = null; - -module.exports = AsyncSeriesLoopHook; +module.exports = LoadingLoaderError; /***/ }), -/***/ 73448: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { +/***/ 67578: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { -"use strict"; /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ +var fs = __webpack_require__(35747); +var readFile = fs.readFile.bind(fs); +var loadLoader = __webpack_require__(63395); - -const Hook = __webpack_require__(36591); -const HookCodeFactory = __webpack_require__(85572); - -class AsyncSeriesWaterfallHookCodeFactory extends HookCodeFactory { - content({ onError, onResult, onDone }) { - return this.callTapsSeries({ - onError: (i, err, next, doneBreak) => onError(err) + doneBreak(true), - onResult: (i, result, next) => { - let code = ""; - code += `if(${result} !== undefined) {\n`; - code += `${this._args[0]} = ${result};\n`; - code += `}\n`; - code += next(); - return code; - }, - onDone: () => onResult(this._args[0]) - }); +function utf8BufferToString(buf) { + var str = buf.toString("utf-8"); + if(str.charCodeAt(0) === 0xFEFF) { + return str.substr(1); + } else { + return str; } } -const factory = new AsyncSeriesWaterfallHookCodeFactory(); - -const COMPILE = function(options) { - factory.setup(this, options); - return factory.create(options); -}; +const PATH_QUERY_FRAGMENT_REGEXP = /^((?:\0.|[^?#\0])*)(\?(?:\0.|[^#\0])*)?(#.*)?$/; -function AsyncSeriesWaterfallHook(args = [], name = undefined) { - if (args.length < 1) - throw new Error("Waterfall hooks must have at least one argument"); - const hook = new Hook(args, name); - hook.constructor = AsyncSeriesWaterfallHook; - hook.compile = COMPILE; - hook._call = undefined; - hook.call = undefined; - return hook; +/** + * @param {string} str the path with query and fragment + * @returns {{ path: string, query: string, fragment: string }} parsed parts + */ +function parsePathQueryFragment(str) { + var match = PATH_QUERY_FRAGMENT_REGEXP.exec(str); + return { + path: match[1].replace(/\0(.)/g, "$1"), + query: match[2] ? match[2].replace(/\0(.)/g, "$1") : "", + fragment: match[3] || "" + }; } -AsyncSeriesWaterfallHook.prototype = null; - -module.exports = AsyncSeriesWaterfallHook; - - -/***/ }), - -/***/ 36591: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - - -const util = __webpack_require__(31669); - -const deprecateContext = util.deprecate(() => {}, -"Hook.context is deprecated and will be removed"); - -const CALL_DELEGATE = function(...args) { - this.call = this._createCall("sync"); - return this.call(...args); -}; -const CALL_ASYNC_DELEGATE = function(...args) { - this.callAsync = this._createCall("async"); - return this.callAsync(...args); -}; -const PROMISE_DELEGATE = function(...args) { - this.promise = this._createCall("promise"); - return this.promise(...args); -}; - -class Hook { - constructor(args = [], name = undefined) { - this._args = args; - this.name = name; - this.taps = []; - this.interceptors = []; - this._call = CALL_DELEGATE; - this.call = CALL_DELEGATE; - this._callAsync = CALL_ASYNC_DELEGATE; - this.callAsync = CALL_ASYNC_DELEGATE; - this._promise = PROMISE_DELEGATE; - this.promise = PROMISE_DELEGATE; - this._x = undefined; - - this.compile = this.compile; - this.tap = this.tap; - this.tapAsync = this.tapAsync; - this.tapPromise = this.tapPromise; - } - - compile(options) { - throw new Error("Abstract: should be overridden"); - } +function dirname(path) { + if(path === "/") return "/"; + var i = path.lastIndexOf("/"); + var j = path.lastIndexOf("\\"); + var i2 = path.indexOf("/"); + var j2 = path.indexOf("\\"); + var idx = i > j ? i : j; + var idx2 = i > j ? i2 : j2; + if(idx < 0) return path; + if(idx === idx2) return path.substr(0, idx + 1); + return path.substr(0, idx); +} - _createCall(type) { - return this.compile({ - taps: this.taps, - interceptors: this.interceptors, - args: this._args, - type: type - }); +function createLoaderObject(loader) { + var obj = { + path: null, + query: null, + fragment: null, + options: null, + ident: null, + normal: null, + pitch: null, + raw: null, + data: null, + pitchExecuted: false, + normalExecuted: false + }; + Object.defineProperty(obj, "request", { + enumerable: true, + get: function() { + return obj.path.replace(/#/g, "\0#") + obj.query.replace(/#/g, "\0#") + obj.fragment; + }, + set: function(value) { + if(typeof value === "string") { + var splittedRequest = parsePathQueryFragment(value); + obj.path = splittedRequest.path; + obj.query = splittedRequest.query; + obj.fragment = splittedRequest.fragment; + obj.options = undefined; + obj.ident = undefined; + } else { + if(!value.loader) + throw new Error("request should be a string or object with loader and options (" + JSON.stringify(value) + ")"); + obj.path = value.loader; + obj.fragment = value.fragment || ""; + obj.type = value.type; + obj.options = value.options; + obj.ident = value.ident; + if(obj.options === null) + obj.query = ""; + else if(obj.options === undefined) + obj.query = ""; + else if(typeof obj.options === "string") + obj.query = "?" + obj.options; + else if(obj.ident) + obj.query = "??" + obj.ident; + else if(typeof obj.options === "object" && obj.options.ident) + obj.query = "??" + obj.options.ident; + else + obj.query = "?" + JSON.stringify(obj.options); + } + } + }); + obj.request = loader; + if(Object.preventExtensions) { + Object.preventExtensions(obj); } + return obj; +} - _tap(type, options, fn) { - if (typeof options === "string") { - options = { - name: options.trim() - }; - } else if (typeof options !== "object" || options === null) { - throw new Error("Invalid tap options"); +function runSyncOrAsync(fn, context, args, callback) { + var isSync = true; + var isDone = false; + var isError = false; // internal error + var reportedError = false; + context.async = function async() { + if(isDone) { + if(reportedError) return; // ignore + throw new Error("async(): The callback was already called."); } - if (typeof options.name !== "string" || options.name === "") { - throw new Error("Missing name for tap"); + isSync = false; + return innerCallback; + }; + var innerCallback = context.callback = function() { + if(isDone) { + if(reportedError) return; // ignore + throw new Error("callback(): The callback was already called."); } - if (typeof options.context !== "undefined") { - deprecateContext(); + isDone = true; + isSync = false; + try { + callback.apply(null, arguments); + } catch(e) { + isError = true; + throw e; } - options = Object.assign({ type, fn }, options); - options = this._runRegisterInterceptors(options); - this._insert(options); - } - - tap(options, fn) { - this._tap("sync", options, fn); - } - - tapAsync(options, fn) { - this._tap("async", options, fn); - } - - tapPromise(options, fn) { - this._tap("promise", options, fn); - } - - _runRegisterInterceptors(options) { - for (const interceptor of this.interceptors) { - if (interceptor.register) { - const newOptions = interceptor.register(options); - if (newOptions !== undefined) { - options = newOptions; - } + }; + try { + var result = (function LOADER_EXECUTION() { + return fn.apply(context, args); + }()); + if(isSync) { + isDone = true; + if(result === undefined) + return callback(); + if(result && typeof result === "object" && typeof result.then === "function") { + return result.then(function(r) { + callback(null, r); + }, callback); } + return callback(null, result); } - return options; + } catch(e) { + if(isError) throw e; + if(isDone) { + // loader is already "done", so we cannot use the callback function + // for better debugging we print the error on the console + if(typeof e === "object" && e.stack) console.error(e.stack); + else console.error(e); + return; + } + isDone = true; + reportedError = true; + callback(e); } - withOptions(options) { - const mergeOptions = opt => - Object.assign({}, options, typeof opt === "string" ? { name: opt } : opt); +} - return { - name: this.name, - tap: (opt, fn) => this.tap(mergeOptions(opt), fn), - tapAsync: (opt, fn) => this.tapAsync(mergeOptions(opt), fn), - tapPromise: (opt, fn) => this.tapPromise(mergeOptions(opt), fn), - intercept: interceptor => this.intercept(interceptor), - isUsed: () => this.isUsed(), - withOptions: opt => this.withOptions(mergeOptions(opt)) - }; - } +function convertArgs(args, raw) { + if(!raw && Buffer.isBuffer(args[0])) + args[0] = utf8BufferToString(args[0]); + else if(raw && typeof args[0] === "string") + args[0] = Buffer.from(args[0], "utf-8"); +} - isUsed() { - return this.taps.length > 0 || this.interceptors.length > 0; - } +function iteratePitchingLoaders(options, loaderContext, callback) { + // abort after last loader + if(loaderContext.loaderIndex >= loaderContext.loaders.length) + return processResource(options, loaderContext, callback); - intercept(interceptor) { - this._resetCompilation(); - this.interceptors.push(Object.assign({}, interceptor)); - if (interceptor.register) { - for (let i = 0; i < this.taps.length; i++) { - this.taps[i] = interceptor.register(this.taps[i]); - } - } - } + var currentLoaderObject = loaderContext.loaders[loaderContext.loaderIndex]; - _resetCompilation() { - this.call = this._call; - this.callAsync = this._callAsync; - this.promise = this._promise; + // iterate + if(currentLoaderObject.pitchExecuted) { + loaderContext.loaderIndex++; + return iteratePitchingLoaders(options, loaderContext, callback); } - _insert(item) { - this._resetCompilation(); - let before; - if (typeof item.before === "string") { - before = new Set([item.before]); - } else if (Array.isArray(item.before)) { - before = new Set(item.before); - } - let stage = 0; - if (typeof item.stage === "number") { - stage = item.stage; + // load loader module + loadLoader(currentLoaderObject, function(err) { + if(err) { + loaderContext.cacheable(false); + return callback(err); } - let i = this.taps.length; - while (i > 0) { - i--; - const x = this.taps[i]; - this.taps[i + 1] = x; - const xStage = x.stage || 0; - if (before) { - if (before.has(x.name)) { - before.delete(x.name); - continue; - } - if (before.size > 0) { - continue; + var fn = currentLoaderObject.pitch; + currentLoaderObject.pitchExecuted = true; + if(!fn) return iteratePitchingLoaders(options, loaderContext, callback); + + runSyncOrAsync( + fn, + loaderContext, [loaderContext.remainingRequest, loaderContext.previousRequest, currentLoaderObject.data = {}], + function(err) { + if(err) return callback(err); + var args = Array.prototype.slice.call(arguments, 1); + // Determine whether to continue the pitching process based on + // argument values (as opposed to argument presence) in order + // to support synchronous and asynchronous usages. + var hasArg = args.some(function(value) { + return value !== undefined; + }); + if(hasArg) { + loaderContext.loaderIndex--; + iterateNormalLoaders(options, loaderContext, args, callback); + } else { + iteratePitchingLoaders(options, loaderContext, callback); } } - if (xStage > stage) { - continue; - } - i++; - break; - } - this.taps[i] = item; - } + ); + }); } -Object.setPrototypeOf(Hook.prototype, null); +function processResource(options, loaderContext, callback) { + // set loader index to last loader + loaderContext.loaderIndex = loaderContext.loaders.length - 1; -module.exports = Hook; + var resourcePath = loaderContext.resourcePath; + if(resourcePath) { + options.processResource(loaderContext, resourcePath, function(err, buffer) { + if(err) return callback(err); + options.resourceBuffer = buffer; + iterateNormalLoaders(options, loaderContext, [buffer], callback); + }); + } else { + iterateNormalLoaders(options, loaderContext, [null], callback); + } +} +function iterateNormalLoaders(options, loaderContext, args, callback) { + if(loaderContext.loaderIndex < 0) + return callback(null, args); -/***/ }), + var currentLoaderObject = loaderContext.loaders[loaderContext.loaderIndex]; -/***/ 85572: -/***/ (function(module) { + // iterate + if(currentLoaderObject.normalExecuted) { + loaderContext.loaderIndex--; + return iterateNormalLoaders(options, loaderContext, args, callback); + } -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ + var fn = currentLoaderObject.normal; + currentLoaderObject.normalExecuted = true; + if(!fn) { + return iterateNormalLoaders(options, loaderContext, args, callback); + } + convertArgs(args, currentLoaderObject.raw); -class HookCodeFactory { - constructor(config) { - this.config = config; - this.options = undefined; - this._args = undefined; - } + runSyncOrAsync(fn, loaderContext, args, function(err) { + if(err) return callback(err); - create(options) { - this.init(options); - let fn; - switch (this.options.type) { - case "sync": - fn = new Function( - this.args(), - '"use strict";\n' + - this.header() + - this.contentWithInterceptors({ - onError: err => `throw ${err};\n`, - onResult: result => `return ${result};\n`, - resultReturns: true, - onDone: () => "", - rethrowIfPossible: true - }) - ); - break; - case "async": - fn = new Function( - this.args({ - after: "_callback" - }), - '"use strict";\n' + - this.header() + - this.contentWithInterceptors({ - onError: err => `_callback(${err});\n`, - onResult: result => `_callback(null, ${result});\n`, - onDone: () => "_callback();\n" - }) - ); - break; - case "promise": - let errorHelperUsed = false; - const content = this.contentWithInterceptors({ - onError: err => { - errorHelperUsed = true; - return `_error(${err});\n`; - }, - onResult: result => `_resolve(${result});\n`, - onDone: () => "_resolve();\n" - }); - let code = ""; - code += '"use strict";\n'; - code += this.header(); - code += "return new Promise((function(_resolve, _reject) {\n"; - if (errorHelperUsed) { - code += "var _sync = true;\n"; - code += "function _error(_err) {\n"; - code += "if(_sync)\n"; - code += - "_resolve(Promise.resolve().then((function() { throw _err; })));\n"; - code += "else\n"; - code += "_reject(_err);\n"; - code += "};\n"; - } - code += content; - if (errorHelperUsed) { - code += "_sync = false;\n"; - } - code += "}));\n"; - fn = new Function(this.args(), code); - break; - } - this.deinit(); - return fn; - } + var args = Array.prototype.slice.call(arguments, 1); + iterateNormalLoaders(options, loaderContext, args, callback); + }); +} - setup(instance, options) { - instance._x = options.taps.map(t => t.fn); - } +exports.getContext = function getContext(resource) { + var path = parsePathQueryFragment(resource).path; + return dirname(path); +}; - /** - * @param {{ type: "sync" | "promise" | "async", taps: Array, interceptors: Array }} options - */ - init(options) { - this.options = options; - this._args = options.args.slice(); - } +exports.runLoaders = function runLoaders(options, callback) { + // read options + var resource = options.resource || ""; + var loaders = options.loaders || []; + var loaderContext = options.context || {}; + var processResource = options.processResource || ((readResource, context, resource, callback) => { + context.addDependency(resource); + readResource(resource, callback); + }).bind(null, options.readResource || readFile); - deinit() { - this.options = undefined; - this._args = undefined; - } + // + var splittedResource = resource && parsePathQueryFragment(resource); + var resourcePath = splittedResource ? splittedResource.path : undefined; + var resourceQuery = splittedResource ? splittedResource.query : undefined; + var resourceFragment = splittedResource ? splittedResource.fragment : undefined; + var contextDirectory = resourcePath ? dirname(resourcePath) : null; - contentWithInterceptors(options) { - if (this.options.interceptors.length > 0) { - const onError = options.onError; - const onResult = options.onResult; - const onDone = options.onDone; - let code = ""; - for (let i = 0; i < this.options.interceptors.length; i++) { - const interceptor = this.options.interceptors[i]; - if (interceptor.call) { - code += `${this.getInterceptor(i)}.call(${this.args({ - before: interceptor.context ? "_context" : undefined - })});\n`; - } - } - code += this.content( - Object.assign(options, { - onError: - onError && - (err => { - let code = ""; - for (let i = 0; i < this.options.interceptors.length; i++) { - const interceptor = this.options.interceptors[i]; - if (interceptor.error) { - code += `${this.getInterceptor(i)}.error(${err});\n`; - } - } - code += onError(err); - return code; - }), - onResult: - onResult && - (result => { - let code = ""; - for (let i = 0; i < this.options.interceptors.length; i++) { - const interceptor = this.options.interceptors[i]; - if (interceptor.result) { - code += `${this.getInterceptor(i)}.result(${result});\n`; - } - } - code += onResult(result); - return code; - }), - onDone: - onDone && - (() => { - let code = ""; - for (let i = 0; i < this.options.interceptors.length; i++) { - const interceptor = this.options.interceptors[i]; - if (interceptor.done) { - code += `${this.getInterceptor(i)}.done();\n`; - } - } - code += onDone(); - return code; - }) - }) - ); - return code; - } else { - return this.content(options); - } - } + // execution state + var requestCacheable = true; + var fileDependencies = []; + var contextDependencies = []; + var missingDependencies = []; - header() { - let code = ""; - if (this.needContext()) { - code += "var _context = {};\n"; - } else { - code += "var _context;\n"; + // prepare loader objects + loaders = loaders.map(createLoaderObject); + + loaderContext.context = contextDirectory; + loaderContext.loaderIndex = 0; + loaderContext.loaders = loaders; + loaderContext.resourcePath = resourcePath; + loaderContext.resourceQuery = resourceQuery; + loaderContext.resourceFragment = resourceFragment; + loaderContext.async = null; + loaderContext.callback = null; + loaderContext.cacheable = function cacheable(flag) { + if(flag === false) { + requestCacheable = false; } - code += "var _x = this._x;\n"; - if (this.options.interceptors.length > 0) { - code += "var _taps = this.taps;\n"; - code += "var _interceptors = this.interceptors;\n"; + }; + loaderContext.dependency = loaderContext.addDependency = function addDependency(file) { + fileDependencies.push(file); + }; + loaderContext.addContextDependency = function addContextDependency(context) { + contextDependencies.push(context); + }; + loaderContext.addMissingDependency = function addMissingDependency(context) { + missingDependencies.push(context); + }; + loaderContext.getDependencies = function getDependencies() { + return fileDependencies.slice(); + }; + loaderContext.getContextDependencies = function getContextDependencies() { + return contextDependencies.slice(); + }; + loaderContext.getMissingDependencies = function getMissingDependencies() { + return missingDependencies.slice(); + }; + loaderContext.clearDependencies = function clearDependencies() { + fileDependencies.length = 0; + contextDependencies.length = 0; + missingDependencies.length = 0; + requestCacheable = true; + }; + Object.defineProperty(loaderContext, "resource", { + enumerable: true, + get: function() { + if(loaderContext.resourcePath === undefined) + return undefined; + return loaderContext.resourcePath.replace(/#/g, "\0#") + loaderContext.resourceQuery.replace(/#/g, "\0#") + loaderContext.resourceFragment; + }, + set: function(value) { + var splittedResource = value && parsePathQueryFragment(value); + loaderContext.resourcePath = splittedResource ? splittedResource.path : undefined; + loaderContext.resourceQuery = splittedResource ? splittedResource.query : undefined; + loaderContext.resourceFragment = splittedResource ? splittedResource.fragment : undefined; } - return code; - } - - needContext() { - for (const tap of this.options.taps) if (tap.context) return true; - return false; - } - - callTap(tapIndex, { onError, onResult, onDone, rethrowIfPossible }) { - let code = ""; - let hasTapCached = false; - for (let i = 0; i < this.options.interceptors.length; i++) { - const interceptor = this.options.interceptors[i]; - if (interceptor.tap) { - if (!hasTapCached) { - code += `var _tap${tapIndex} = ${this.getTap(tapIndex)};\n`; - hasTapCached = true; - } - code += `${this.getInterceptor(i)}.tap(${ - interceptor.context ? "_context, " : "" - }_tap${tapIndex});\n`; - } + }); + Object.defineProperty(loaderContext, "request", { + enumerable: true, + get: function() { + return loaderContext.loaders.map(function(o) { + return o.request; + }).concat(loaderContext.resource || "").join("!"); } - code += `var _fn${tapIndex} = ${this.getTapFn(tapIndex)};\n`; - const tap = this.options.taps[tapIndex]; - switch (tap.type) { - case "sync": - if (!rethrowIfPossible) { - code += `var _hasError${tapIndex} = false;\n`; - code += "try {\n"; - } - if (onResult) { - code += `var _result${tapIndex} = _fn${tapIndex}(${this.args({ - before: tap.context ? "_context" : undefined - })});\n`; - } else { - code += `_fn${tapIndex}(${this.args({ - before: tap.context ? "_context" : undefined - })});\n`; - } - if (!rethrowIfPossible) { - code += "} catch(_err) {\n"; - code += `_hasError${tapIndex} = true;\n`; - code += onError("_err"); - code += "}\n"; - code += `if(!_hasError${tapIndex}) {\n`; - } - if (onResult) { - code += onResult(`_result${tapIndex}`); - } - if (onDone) { - code += onDone(); - } - if (!rethrowIfPossible) { - code += "}\n"; - } - break; - case "async": - let cbCode = ""; - if (onResult) - cbCode += `(function(_err${tapIndex}, _result${tapIndex}) {\n`; - else cbCode += `(function(_err${tapIndex}) {\n`; - cbCode += `if(_err${tapIndex}) {\n`; - cbCode += onError(`_err${tapIndex}`); - cbCode += "} else {\n"; - if (onResult) { - cbCode += onResult(`_result${tapIndex}`); - } - if (onDone) { - cbCode += onDone(); - } - cbCode += "}\n"; - cbCode += "})"; - code += `_fn${tapIndex}(${this.args({ - before: tap.context ? "_context" : undefined, - after: cbCode - })});\n`; - break; - case "promise": - code += `var _hasResult${tapIndex} = false;\n`; - code += `var _promise${tapIndex} = _fn${tapIndex}(${this.args({ - before: tap.context ? "_context" : undefined - })});\n`; - code += `if (!_promise${tapIndex} || !_promise${tapIndex}.then)\n`; - code += ` throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise${tapIndex} + ')');\n`; - code += `_promise${tapIndex}.then((function(_result${tapIndex}) {\n`; - code += `_hasResult${tapIndex} = true;\n`; - if (onResult) { - code += onResult(`_result${tapIndex}`); - } - if (onDone) { - code += onDone(); - } - code += `}), function(_err${tapIndex}) {\n`; - code += `if(_hasResult${tapIndex}) throw _err${tapIndex};\n`; - code += onError(`_err${tapIndex}`); - code += "});\n"; - break; + }); + Object.defineProperty(loaderContext, "remainingRequest", { + enumerable: true, + get: function() { + if(loaderContext.loaderIndex >= loaderContext.loaders.length - 1 && !loaderContext.resource) + return ""; + return loaderContext.loaders.slice(loaderContext.loaderIndex + 1).map(function(o) { + return o.request; + }).concat(loaderContext.resource || "").join("!"); } - return code; - } - - callTapsSeries({ - onError, - onResult, - resultReturns, - onDone, - doneReturns, - rethrowIfPossible - }) { - if (this.options.taps.length === 0) return onDone(); - const firstAsync = this.options.taps.findIndex(t => t.type !== "sync"); - const somethingReturns = resultReturns || doneReturns; - let code = ""; - let current = onDone; - let unrollCounter = 0; - for (let j = this.options.taps.length - 1; j >= 0; j--) { - const i = j; - const unroll = - current !== onDone && - (this.options.taps[i].type !== "sync" || unrollCounter++ > 20); - if (unroll) { - unrollCounter = 0; - code += `function _next${i}() {\n`; - code += current(); - code += `}\n`; - current = () => `${somethingReturns ? "return " : ""}_next${i}();\n`; - } - const done = current; - const doneBreak = skipDone => { - if (skipDone) return ""; - return onDone(); - }; - const content = this.callTap(i, { - onError: error => onError(i, error, done, doneBreak), - onResult: - onResult && - (result => { - return onResult(i, result, done, doneBreak); - }), - onDone: !onResult && done, - rethrowIfPossible: - rethrowIfPossible && (firstAsync < 0 || i < firstAsync) - }); - current = () => content; + }); + Object.defineProperty(loaderContext, "currentRequest", { + enumerable: true, + get: function() { + return loaderContext.loaders.slice(loaderContext.loaderIndex).map(function(o) { + return o.request; + }).concat(loaderContext.resource || "").join("!"); } - code += current(); - return code; - } - - callTapsLooping({ onError, onDone, rethrowIfPossible }) { - if (this.options.taps.length === 0) return onDone(); - const syncOnly = this.options.taps.every(t => t.type === "sync"); - let code = ""; - if (!syncOnly) { - code += "var _looper = (function() {\n"; - code += "var _loopAsync = false;\n"; + }); + Object.defineProperty(loaderContext, "previousRequest", { + enumerable: true, + get: function() { + return loaderContext.loaders.slice(0, loaderContext.loaderIndex).map(function(o) { + return o.request; + }).join("!"); } - code += "var _loop;\n"; - code += "do {\n"; - code += "_loop = false;\n"; - for (let i = 0; i < this.options.interceptors.length; i++) { - const interceptor = this.options.interceptors[i]; - if (interceptor.loop) { - code += `${this.getInterceptor(i)}.loop(${this.args({ - before: interceptor.context ? "_context" : undefined - })});\n`; - } + }); + Object.defineProperty(loaderContext, "query", { + enumerable: true, + get: function() { + var entry = loaderContext.loaders[loaderContext.loaderIndex]; + return entry.options && typeof entry.options === "object" ? entry.options : entry.query; } - code += this.callTapsSeries({ - onError, - onResult: (i, result, next, doneBreak) => { - let code = ""; - code += `if(${result} !== undefined) {\n`; - code += "_loop = true;\n"; - if (!syncOnly) code += "if(_loopAsync) _looper();\n"; - code += doneBreak(true); - code += `} else {\n`; - code += next(); - code += `}\n`; - return code; - }, - onDone: - onDone && - (() => { - let code = ""; - code += "if(!_loop) {\n"; - code += onDone(); - code += "}\n"; - return code; - }), - rethrowIfPossible: rethrowIfPossible && syncOnly - }); - code += "} while(_loop);\n"; - if (!syncOnly) { - code += "_loopAsync = true;\n"; - code += "});\n"; - code += "_looper();\n"; + }); + Object.defineProperty(loaderContext, "data", { + enumerable: true, + get: function() { + return loaderContext.loaders[loaderContext.loaderIndex].data; } - return code; + }); + + // finish loader context + if(Object.preventExtensions) { + Object.preventExtensions(loaderContext); } - callTapsParallel({ - onError, - onResult, - onDone, - rethrowIfPossible, - onTap = (i, run) => run() - }) { - if (this.options.taps.length <= 1) { - return this.callTapsSeries({ - onError, - onResult, - onDone, - rethrowIfPossible + var processOptions = { + resourceBuffer: null, + processResource: processResource + }; + iteratePitchingLoaders(processOptions, loaderContext, function(err, result) { + if(err) { + return callback(err, { + cacheable: requestCacheable, + fileDependencies: fileDependencies, + contextDependencies: contextDependencies, + missingDependencies: missingDependencies }); } - let code = ""; - code += "do {\n"; - code += `var _counter = ${this.options.taps.length};\n`; - if (onDone) { - code += "var _done = (function() {\n"; - code += onDone(); - code += "});\n"; + callback(null, { + result: result, + resourceBuffer: processOptions.resourceBuffer, + cacheable: requestCacheable, + fileDependencies: fileDependencies, + contextDependencies: contextDependencies, + missingDependencies: missingDependencies + }); + }); +}; + + +/***/ }), + +/***/ 63395: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var LoaderLoadingError = __webpack_require__(83798); +var url; + +module.exports = function loadLoader(loader, callback) { + if(loader.type === "module") { + try { + if(url === undefined) url = __webpack_require__(78835); + var loaderUrl = url.pathToFileURL(loader.path); + var modulePromise = eval("import(" + JSON.stringify(loaderUrl.toString()) + ")"); + modulePromise.then(function(module) { + handleResult(loader, module, callback); + }, callback); + return; + } catch(e) { + callback(e); } - for (let i = 0; i < this.options.taps.length; i++) { - const done = () => { - if (onDone) return "if(--_counter === 0) _done();\n"; - else return "--_counter;"; - }; - const doneBreak = skipDone => { - if (skipDone || !onDone) return "_counter = 0;\n"; - else return "_counter = 0;\n_done();\n"; - }; - code += "if(_counter <= 0) break;\n"; - code += onTap( - i, - () => - this.callTap(i, { - onError: error => { - let code = ""; - code += "if(_counter > 0) {\n"; - code += onError(i, error, done, doneBreak); - code += "}\n"; - return code; - }, - onResult: - onResult && - (result => { - let code = ""; - code += "if(_counter > 0) {\n"; - code += onResult(i, result, done, doneBreak); - code += "}\n"; - return code; - }), - onDone: - !onResult && - (() => { - return done(); - }), - rethrowIfPossible - }), - done, - doneBreak - ); + } else { + try { + var module = require(loader.path); + } catch(e) { + // it is possible for node to choke on a require if the FD descriptor + // limit has been reached. give it a chance to recover. + if(e instanceof Error && e.code === "EMFILE") { + var retry = loadLoader.bind(null, loader, callback); + if(typeof setImmediate === "function") { + // node >= 0.9.0 + return setImmediate(retry); + } else { + // node < 0.9.0 + return process.nextTick(retry); + } + } + return callback(e); } - code += "} while(false);\n"; - return code; + return handleResult(loader, module, callback); } +}; - args({ before, after } = {}) { - let allArgs = this._args; - if (before) allArgs = [before].concat(allArgs); - if (after) allArgs = allArgs.concat(after); - if (allArgs.length === 0) { - return ""; - } else { - return allArgs.join(", "); - } +function handleResult(loader, module, callback) { + if(typeof module !== "function" && typeof module !== "object") { + return callback(new LoaderLoadingError( + "Module '" + loader.path + "' is not a loader (export function or es6 module)" + )); } - - getTapFn(idx) { - return `_x[${idx}]`; + loader.normal = typeof module === "function" ? module : module.default; + loader.pitch = module.pitch; + loader.raw = module.raw; + if(typeof loader.normal !== "function" && typeof loader.pitch !== "function") { + return callback(new LoaderLoadingError( + "Module '" + loader.path + "' is not a loader (must have normal or pitch function)" + )); } + callback(); +} - getTap(idx) { - return `_taps[${idx}]`; - } - getInterceptor(idx) { - return `_interceptors[${idx}]`; - } -} +/***/ }), -module.exports = HookCodeFactory; +/***/ 11060: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +/*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * MIT Licensed + */ + +/** + * Module exports. + */ + +module.exports = __webpack_require__(53243) /***/ }), -/***/ 81647: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { +/***/ 19338: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ +/*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ -const util = __webpack_require__(31669); -const defaultFactory = (key, hook) => hook; +/** + * Module dependencies. + * @private + */ -class HookMap { - constructor(factory, name = undefined) { - this._map = new Map(); - this.name = name; - this._factory = factory; - this._interceptors = []; - } +var db = __webpack_require__(11060) +var extname = __webpack_require__(85622).extname - get(key) { - return this._map.get(key); - } +/** + * Module variables. + * @private + */ - for(key) { - const hook = this.get(key); - if (hook !== undefined) { - return hook; - } - let newHook = this._factory(key); - const interceptors = this._interceptors; - for (let i = 0; i < interceptors.length; i++) { - newHook = interceptors[i].factory(key, newHook); - } - this._map.set(key, newHook); - return newHook; - } +var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ +var TEXT_TYPE_REGEXP = /^text\//i - intercept(interceptor) { - this._interceptors.push( - Object.assign( - { - factory: defaultFactory - }, - interceptor - ) - ); - } +/** + * Module exports. + * @public + */ + +exports.charset = charset +exports.charsets = { lookup: charset } +exports.contentType = contentType +exports.extension = extension +exports.extensions = Object.create(null) +exports.lookup = lookup +exports.types = Object.create(null) + +// Populate the extensions/types maps +populateMaps(exports.extensions, exports.types) + +/** + * Get the default charset for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function charset (type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + var mime = match && db[match[1].toLowerCase()] + + if (mime && mime.charset) { + return mime.charset + } + + // default text/* to utf-8 + if (match && TEXT_TYPE_REGEXP.test(match[1])) { + return 'UTF-8' + } + + return false } -HookMap.prototype.tap = util.deprecate(function(key, options, fn) { - return this.for(key).tap(options, fn); -}, "HookMap#tap(key,…) is deprecated. Use HookMap#for(key).tap(…) instead."); +/** + * Create a full Content-Type header given a MIME type or extension. + * + * @param {string} str + * @return {boolean|string} + */ -HookMap.prototype.tapAsync = util.deprecate(function(key, options, fn) { - return this.for(key).tapAsync(options, fn); -}, "HookMap#tapAsync(key,…) is deprecated. Use HookMap#for(key).tapAsync(…) instead."); +function contentType (str) { + // TODO: should this even be in this module? + if (!str || typeof str !== 'string') { + return false + } -HookMap.prototype.tapPromise = util.deprecate(function(key, options, fn) { - return this.for(key).tapPromise(options, fn); -}, "HookMap#tapPromise(key,…) is deprecated. Use HookMap#for(key).tapPromise(…) instead."); + var mime = str.indexOf('/') === -1 + ? exports.lookup(str) + : str -module.exports = HookMap; + if (!mime) { + return false + } + + // TODO: use content-type or other module + if (mime.indexOf('charset') === -1) { + var charset = exports.charset(mime) + if (charset) mime += '; charset=' + charset.toLowerCase() + } + + return mime +} + +/** + * Get the default extension for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function extension (type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + + // get extensions + var exts = match && exports.extensions[match[1].toLowerCase()] + + if (!exts || !exts.length) { + return false + } + + return exts[0] +} + +/** + * Lookup the MIME type for a file path/extension. + * + * @param {string} path + * @return {boolean|string} + */ + +function lookup (path) { + if (!path || typeof path !== 'string') { + return false + } + + // get the extension ("ext" or ".ext" or full path) + var extension = extname('x.' + path) + .toLowerCase() + .substr(1) + + if (!extension) { + return false + } + + return exports.types[extension] || false +} + +/** + * Populate the extensions and types maps. + * @private + */ + +function populateMaps (extensions, types) { + // source preference (least -> most) + var preference = ['nginx', 'apache', undefined, 'iana'] + + Object.keys(db).forEach(function forEachMimeType (type) { + var mime = db[type] + var exts = mime.extensions + + if (!exts || !exts.length) { + return + } + + // mime -> extensions + extensions[type] = exts + + // extension -> mime + for (var i = 0; i < exts.length; i++) { + var extension = exts[i] + + if (types[extension]) { + var from = preference.indexOf(db[types[extension]].source) + var to = preference.indexOf(mime.source) + + if (types[extension] !== 'application/octet-stream' && + (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { + // skip the remapping + continue + } + } + + // set the extension -> mime + types[extension] = type + } + }) +} /***/ }), -/***/ 63708: +/***/ 28339: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; @@ -142029,58 +143123,134 @@ module.exports = HookMap; const Hook = __webpack_require__(36591); +const HookCodeFactory = __webpack_require__(85572); -class MultiHook { - constructor(hooks, name = undefined) { - this.hooks = hooks; - this.name = name; +class AsyncParallelBailHookCodeFactory extends HookCodeFactory { + content({ onError, onResult, onDone }) { + let code = ""; + code += `var _results = new Array(${this.options.taps.length});\n`; + code += "var _checkDone = function() {\n"; + code += "for(var i = 0; i < _results.length; i++) {\n"; + code += "var item = _results[i];\n"; + code += "if(item === undefined) return false;\n"; + code += "if(item.result !== undefined) {\n"; + code += onResult("item.result"); + code += "return true;\n"; + code += "}\n"; + code += "if(item.error) {\n"; + code += onError("item.error"); + code += "return true;\n"; + code += "}\n"; + code += "}\n"; + code += "return false;\n"; + code += "}\n"; + code += this.callTapsParallel({ + onError: (i, err, done, doneBreak) => { + let code = ""; + code += `if(${i} < _results.length && ((_results.length = ${i + + 1}), (_results[${i}] = { error: ${err} }), _checkDone())) {\n`; + code += doneBreak(true); + code += "} else {\n"; + code += done(); + code += "}\n"; + return code; + }, + onResult: (i, result, done, doneBreak) => { + let code = ""; + code += `if(${i} < _results.length && (${result} !== undefined && (_results.length = ${i + + 1}), (_results[${i}] = { result: ${result} }), _checkDone())) {\n`; + code += doneBreak(true); + code += "} else {\n"; + code += done(); + code += "}\n"; + return code; + }, + onTap: (i, run, done, doneBreak) => { + let code = ""; + if (i > 0) { + code += `if(${i} >= _results.length) {\n`; + code += done(); + code += "} else {\n"; + } + code += run(); + if (i > 0) code += "}\n"; + return code; + }, + onDone + }); + return code; } +} - tap(options, fn) { - for (const hook of this.hooks) { - hook.tap(options, fn); - } - } +const factory = new AsyncParallelBailHookCodeFactory(); - tapAsync(options, fn) { - for (const hook of this.hooks) { - hook.tapAsync(options, fn); - } - } +const COMPILE = function(options) { + factory.setup(this, options); + return factory.create(options); +}; - tapPromise(options, fn) { - for (const hook of this.hooks) { - hook.tapPromise(options, fn); - } - } +function AsyncParallelBailHook(args = [], name = undefined) { + const hook = new Hook(args, name); + hook.constructor = AsyncParallelBailHook; + hook.compile = COMPILE; + hook._call = undefined; + hook.call = undefined; + return hook; +} - isUsed() { - for (const hook of this.hooks) { - if (hook.isUsed()) return true; - } - return false; - } +AsyncParallelBailHook.prototype = null; - intercept(interceptor) { - for (const hook of this.hooks) { - hook.intercept(interceptor); - } - } +module.exports = AsyncParallelBailHook; - withOptions(options) { - return new MultiHook( - this.hooks.map(h => h.withOptions(options)), - this.name - ); + +/***/ }), + +/***/ 82890: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Hook = __webpack_require__(36591); +const HookCodeFactory = __webpack_require__(85572); + +class AsyncParallelHookCodeFactory extends HookCodeFactory { + content({ onError, onDone }) { + return this.callTapsParallel({ + onError: (i, err, done, doneBreak) => onError(err) + doneBreak(true), + onDone + }); } } -module.exports = MultiHook; +const factory = new AsyncParallelHookCodeFactory(); + +const COMPILE = function(options) { + factory.setup(this, options); + return factory.create(options); +}; + +function AsyncParallelHook(args = [], name = undefined) { + const hook = new Hook(args, name); + hook.constructor = AsyncParallelHook; + hook.compile = COMPILE; + hook._call = undefined; + hook.call = undefined; + return hook; +} + +AsyncParallelHook.prototype = null; + +module.exports = AsyncParallelHook; /***/ }), -/***/ 98034: +/***/ 97681: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; @@ -142093,53 +143263,44 @@ module.exports = MultiHook; const Hook = __webpack_require__(36591); const HookCodeFactory = __webpack_require__(85572); -class SyncBailHookCodeFactory extends HookCodeFactory { - content({ onError, onResult, resultReturns, onDone, rethrowIfPossible }) { +class AsyncSeriesBailHookCodeFactory extends HookCodeFactory { + content({ onError, onResult, resultReturns, onDone }) { return this.callTapsSeries({ - onError: (i, err) => onError(err), + onError: (i, err, next, doneBreak) => onError(err) + doneBreak(true), onResult: (i, result, next) => `if(${result} !== undefined) {\n${onResult( result - )};\n} else {\n${next()}}\n`, + )}\n} else {\n${next()}}\n`, resultReturns, - onDone, - rethrowIfPossible + onDone }); } } -const factory = new SyncBailHookCodeFactory(); - -const TAP_ASYNC = () => { - throw new Error("tapAsync is not supported on a SyncBailHook"); -}; - -const TAP_PROMISE = () => { - throw new Error("tapPromise is not supported on a SyncBailHook"); -}; +const factory = new AsyncSeriesBailHookCodeFactory(); const COMPILE = function(options) { factory.setup(this, options); return factory.create(options); }; -function SyncBailHook(args = [], name = undefined) { +function AsyncSeriesBailHook(args = [], name = undefined) { const hook = new Hook(args, name); - hook.constructor = SyncBailHook; - hook.tapAsync = TAP_ASYNC; - hook.tapPromise = TAP_PROMISE; + hook.constructor = AsyncSeriesBailHook; hook.compile = COMPILE; + hook._call = undefined; + hook.call = undefined; return hook; } -SyncBailHook.prototype = null; +AsyncSeriesBailHook.prototype = null; -module.exports = SyncBailHook; +module.exports = AsyncSeriesBailHook; /***/ }), -/***/ 35079: +/***/ 45146: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; @@ -142152,48 +143313,39 @@ module.exports = SyncBailHook; const Hook = __webpack_require__(36591); const HookCodeFactory = __webpack_require__(85572); -class SyncHookCodeFactory extends HookCodeFactory { - content({ onError, onDone, rethrowIfPossible }) { +class AsyncSeriesHookCodeFactory extends HookCodeFactory { + content({ onError, onDone }) { return this.callTapsSeries({ - onError: (i, err) => onError(err), - onDone, - rethrowIfPossible + onError: (i, err, next, doneBreak) => onError(err) + doneBreak(true), + onDone }); } } -const factory = new SyncHookCodeFactory(); - -const TAP_ASYNC = () => { - throw new Error("tapAsync is not supported on a SyncHook"); -}; - -const TAP_PROMISE = () => { - throw new Error("tapPromise is not supported on a SyncHook"); -}; +const factory = new AsyncSeriesHookCodeFactory(); const COMPILE = function(options) { factory.setup(this, options); return factory.create(options); }; -function SyncHook(args = [], name = undefined) { +function AsyncSeriesHook(args = [], name = undefined) { const hook = new Hook(args, name); - hook.constructor = SyncHook; - hook.tapAsync = TAP_ASYNC; - hook.tapPromise = TAP_PROMISE; + hook.constructor = AsyncSeriesHook; hook.compile = COMPILE; + hook._call = undefined; + hook.call = undefined; return hook; } -SyncHook.prototype = null; +AsyncSeriesHook.prototype = null; -module.exports = SyncHook; +module.exports = AsyncSeriesHook; /***/ }), -/***/ 66953: +/***/ 5463: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; @@ -142206,48 +143358,39 @@ module.exports = SyncHook; const Hook = __webpack_require__(36591); const HookCodeFactory = __webpack_require__(85572); -class SyncLoopHookCodeFactory extends HookCodeFactory { - content({ onError, onDone, rethrowIfPossible }) { +class AsyncSeriesLoopHookCodeFactory extends HookCodeFactory { + content({ onError, onDone }) { return this.callTapsLooping({ - onError: (i, err) => onError(err), - onDone, - rethrowIfPossible + onError: (i, err, next, doneBreak) => onError(err) + doneBreak(true), + onDone }); } } -const factory = new SyncLoopHookCodeFactory(); - -const TAP_ASYNC = () => { - throw new Error("tapAsync is not supported on a SyncLoopHook"); -}; - -const TAP_PROMISE = () => { - throw new Error("tapPromise is not supported on a SyncLoopHook"); -}; +const factory = new AsyncSeriesLoopHookCodeFactory(); const COMPILE = function(options) { factory.setup(this, options); return factory.create(options); }; -function SyncLoopHook(args = [], name = undefined) { +function AsyncSeriesLoopHook(args = [], name = undefined) { const hook = new Hook(args, name); - hook.constructor = SyncLoopHook; - hook.tapAsync = TAP_ASYNC; - hook.tapPromise = TAP_PROMISE; + hook.constructor = AsyncSeriesLoopHook; hook.compile = COMPILE; + hook._call = undefined; + hook.call = undefined; return hook; } -SyncLoopHook.prototype = null; +AsyncSeriesLoopHook.prototype = null; -module.exports = SyncLoopHook; +module.exports = AsyncSeriesLoopHook; /***/ }), -/***/ 92878: +/***/ 73448: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; @@ -142260,10 +143403,10 @@ module.exports = SyncLoopHook; const Hook = __webpack_require__(36591); const HookCodeFactory = __webpack_require__(85572); -class SyncWaterfallHookCodeFactory extends HookCodeFactory { - content({ onError, onResult, resultReturns, rethrowIfPossible }) { +class AsyncSeriesWaterfallHookCodeFactory extends HookCodeFactory { + content({ onError, onResult, onDone }) { return this.callTapsSeries({ - onError: (i, err) => onError(err), + onError: (i, err, next, doneBreak) => onError(err) + doneBreak(true), onResult: (i, result, next) => { let code = ""; code += `if(${result} !== undefined) {\n`; @@ -142272,74 +143415,37 @@ class SyncWaterfallHookCodeFactory extends HookCodeFactory { code += next(); return code; }, - onDone: () => onResult(this._args[0]), - doneReturns: resultReturns, - rethrowIfPossible + onDone: () => onResult(this._args[0]) }); } } -const factory = new SyncWaterfallHookCodeFactory(); - -const TAP_ASYNC = () => { - throw new Error("tapAsync is not supported on a SyncWaterfallHook"); -}; - -const TAP_PROMISE = () => { - throw new Error("tapPromise is not supported on a SyncWaterfallHook"); -}; +const factory = new AsyncSeriesWaterfallHookCodeFactory(); const COMPILE = function(options) { factory.setup(this, options); return factory.create(options); }; -function SyncWaterfallHook(args = [], name = undefined) { +function AsyncSeriesWaterfallHook(args = [], name = undefined) { if (args.length < 1) throw new Error("Waterfall hooks must have at least one argument"); const hook = new Hook(args, name); - hook.constructor = SyncWaterfallHook; - hook.tapAsync = TAP_ASYNC; - hook.tapPromise = TAP_PROMISE; + hook.constructor = AsyncSeriesWaterfallHook; hook.compile = COMPILE; + hook._call = undefined; + hook.call = undefined; return hook; } -SyncWaterfallHook.prototype = null; - -module.exports = SyncWaterfallHook; - - -/***/ }), - -/***/ 34718: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - +AsyncSeriesWaterfallHook.prototype = null; -exports.__esModule = true; -exports.SyncHook = __webpack_require__(35079); -exports.SyncBailHook = __webpack_require__(98034); -exports.SyncWaterfallHook = __webpack_require__(92878); -exports.SyncLoopHook = __webpack_require__(66953); -exports.AsyncParallelHook = __webpack_require__(82890); -exports.AsyncParallelBailHook = __webpack_require__(28339); -exports.AsyncSeriesHook = __webpack_require__(45146); -exports.AsyncSeriesBailHook = __webpack_require__(97681); -exports.AsyncSeriesLoopHook = __webpack_require__(5463); -exports.AsyncSeriesWaterfallHook = __webpack_require__(73448); -exports.HookMap = __webpack_require__(81647); -exports.MultiHook = __webpack_require__(63708); +module.exports = AsyncSeriesWaterfallHook; /***/ }), -/***/ 39144: +/***/ 36591: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; @@ -142349,803 +143455,181 @@ exports.MultiHook = __webpack_require__(63708); */ -const EventEmitter = __webpack_require__(28614).EventEmitter; -const fs = __webpack_require__(82161); -const path = __webpack_require__(85622); - -const watchEventSource = __webpack_require__(10547); - -const EXISTANCE_ONLY_TIME_ENTRY = Object.freeze({}); - -let FS_ACCURACY = 1000; - -const IS_OSX = __webpack_require__(12087).platform() === "darwin"; -const WATCHPACK_POLLING = process.env.WATCHPACK_POLLING; -const FORCE_POLLING = - `${+WATCHPACK_POLLING}` === WATCHPACK_POLLING - ? +WATCHPACK_POLLING - : !!WATCHPACK_POLLING && WATCHPACK_POLLING !== "false"; - -function withoutCase(str) { - return str.toLowerCase(); -} - -function needCalls(times, callback) { - return function() { - if (--times === 0) { - return callback(); - } - }; -} - -class Watcher extends EventEmitter { - constructor(directoryWatcher, filePath, startTime) { - super(); - this.directoryWatcher = directoryWatcher; - this.path = filePath; - this.startTime = startTime && +startTime; - this._cachedTimeInfoEntries = undefined; - } - - checkStartTime(mtime, initial) { - const startTime = this.startTime; - if (typeof startTime !== "number") return !initial; - return startTime <= mtime; - } - - close() { - this.emit("closed"); - } -} - -class DirectoryWatcher extends EventEmitter { - constructor(watcherManager, directoryPath, options) { - super(); - if (FORCE_POLLING) { - options.poll = FORCE_POLLING; - } - this.watcherManager = watcherManager; - this.options = options; - this.path = directoryPath; - // safeTime is the point in time after which reading is safe to be unchanged - // timestamp is a value that should be compared with another timestamp (mtime) - /** @type {Map} */ - this.filesWithoutCase = new Map(); - this.directories = new Map(); - this.lastWatchEvent = 0; - this.initialScan = true; - this.ignored = options.ignored; - this.nestedWatching = false; - this.polledWatching = - typeof options.poll === "number" - ? options.poll - : options.poll - ? 5007 - : false; - this.timeout = undefined; - this.initialScanRemoved = new Set(); - this.initialScanFinished = undefined; - /** @type {Map>} */ - this.watchers = new Map(); - this.parentWatcher = null; - this.refs = 0; - this._activeEvents = new Map(); - this.closed = false; - this.scanning = false; - this.scanAgain = false; - this.scanAgainInitial = false; - - this.createWatcher(); - this.doScan(true); - } - - checkIgnore(path) { - if (!this.ignored) return false; - path = path.replace(/\\/g, "/"); - return this.ignored.test(path); - } - - createWatcher() { - try { - if (this.polledWatching) { - this.watcher = { - close: () => { - if (this.timeout) { - clearTimeout(this.timeout); - this.timeout = undefined; - } - } - }; - } else { - if (IS_OSX) { - this.watchInParentDirectory(); - } - this.watcher = watchEventSource.watch(this.path); - this.watcher.on("change", this.onWatchEvent.bind(this)); - this.watcher.on("error", this.onWatcherError.bind(this)); - } - } catch (err) { - this.onWatcherError(err); - } - } - - forEachWatcher(path, fn) { - const watchers = this.watchers.get(withoutCase(path)); - if (watchers !== undefined) { - for (const w of watchers) { - fn(w); - } - } - } - - setMissing(itemPath, initial, type) { - this._cachedTimeInfoEntries = undefined; - - if (this.initialScan) { - this.initialScanRemoved.add(itemPath); - } - - const oldDirectory = this.directories.get(itemPath); - if (oldDirectory) { - if (this.nestedWatching) oldDirectory.close(); - this.directories.delete(itemPath); - - this.forEachWatcher(itemPath, w => w.emit("remove", type)); - if (!initial) { - this.forEachWatcher(this.path, w => - w.emit("change", itemPath, null, type, initial) - ); - } - } - - const oldFile = this.files.get(itemPath); - if (oldFile) { - this.files.delete(itemPath); - const key = withoutCase(itemPath); - const count = this.filesWithoutCase.get(key) - 1; - if (count <= 0) { - this.filesWithoutCase.delete(key); - this.forEachWatcher(itemPath, w => w.emit("remove", type)); - } else { - this.filesWithoutCase.set(key, count); - } - - if (!initial) { - this.forEachWatcher(this.path, w => - w.emit("change", itemPath, null, type, initial) - ); - } - } - } - - setFileTime(filePath, mtime, initial, ignoreWhenEqual, type) { - const now = Date.now(); - - if (this.checkIgnore(filePath)) return; - - const old = this.files.get(filePath); - - let safeTime, accuracy; - if (initial) { - safeTime = Math.min(now, mtime) + FS_ACCURACY; - accuracy = FS_ACCURACY; - } else { - safeTime = now; - accuracy = 0; - - if (old && old.timestamp === mtime && mtime + FS_ACCURACY < now - 1000) { - // We are sure that mtime is untouched - // This can be caused by some file attribute change - // e. g. when access time has been changed - // but the file content is untouched - return; - } - } - - if (ignoreWhenEqual && old && old.timestamp === mtime) return; - - this.files.set(filePath, { - safeTime, - accuracy, - timestamp: mtime - }); - this._cachedTimeInfoEntries = undefined; - - if (!old) { - const key = withoutCase(filePath); - const count = this.filesWithoutCase.get(key); - this.filesWithoutCase.set(key, (count || 0) + 1); - if (count !== undefined) { - // There is already a file with case-insensitive-equal name - // On a case-insensitive filesystem we may miss the renaming - // when only casing is changed. - // To be sure that our information is correct - // we trigger a rescan here - this.doScan(false); - } - - this.forEachWatcher(filePath, w => { - if (!initial || w.checkStartTime(safeTime, initial)) { - w.emit("change", mtime, type); - } - }); - } else if (!initial) { - this.forEachWatcher(filePath, w => w.emit("change", mtime, type)); - } - this.forEachWatcher(this.path, w => { - if (!initial || w.checkStartTime(safeTime, initial)) { - w.emit("change", filePath, safeTime, type, initial); - } - }); - } - - setDirectory(directoryPath, birthtime, initial, type) { - if (this.checkIgnore(directoryPath)) return; - if (directoryPath === this.path) { - if (!initial) { - this.forEachWatcher(this.path, w => - w.emit("change", directoryPath, birthtime, type, initial) - ); - } - } else { - const old = this.directories.get(directoryPath); - if (!old) { - const now = Date.now(); +const util = __webpack_require__(31669); - this._cachedTimeInfoEntries = undefined; - if (this.nestedWatching) { - this.createNestedWatcher(directoryPath); - } else { - this.directories.set(directoryPath, true); - } +const deprecateContext = util.deprecate(() => {}, +"Hook.context is deprecated and will be removed"); - let safeTime; - if (initial) { - safeTime = Math.min(now, birthtime) + FS_ACCURACY; - } else { - safeTime = now; - } +const CALL_DELEGATE = function(...args) { + this.call = this._createCall("sync"); + return this.call(...args); +}; +const CALL_ASYNC_DELEGATE = function(...args) { + this.callAsync = this._createCall("async"); + return this.callAsync(...args); +}; +const PROMISE_DELEGATE = function(...args) { + this.promise = this._createCall("promise"); + return this.promise(...args); +}; - this.forEachWatcher(directoryPath, w => { - if (!initial || w.checkStartTime(safeTime, false)) { - w.emit("change", birthtime, type); - } - }); - this.forEachWatcher(this.path, w => { - if (!initial || w.checkStartTime(safeTime, initial)) { - w.emit("change", directoryPath, safeTime, type, initial); - } - }); - } - } - } +class Hook { + constructor(args = [], name = undefined) { + this._args = args; + this.name = name; + this.taps = []; + this.interceptors = []; + this._call = CALL_DELEGATE; + this.call = CALL_DELEGATE; + this._callAsync = CALL_ASYNC_DELEGATE; + this.callAsync = CALL_ASYNC_DELEGATE; + this._promise = PROMISE_DELEGATE; + this.promise = PROMISE_DELEGATE; + this._x = undefined; - createNestedWatcher(directoryPath) { - const watcher = this.watcherManager.watchDirectory(directoryPath, 1); - watcher.on("change", (filePath, mtime, type, initial) => { - this._cachedTimeInfoEntries = undefined; - this.forEachWatcher(this.path, w => { - if (!initial || w.checkStartTime(mtime, initial)) { - w.emit("change", filePath, mtime, type, initial); - } - }); - }); - this.directories.set(directoryPath, watcher); + this.compile = this.compile; + this.tap = this.tap; + this.tapAsync = this.tapAsync; + this.tapPromise = this.tapPromise; } - setNestedWatching(flag) { - if (this.nestedWatching !== !!flag) { - this.nestedWatching = !!flag; - this._cachedTimeInfoEntries = undefined; - if (this.nestedWatching) { - for (const directory of this.directories.keys()) { - this.createNestedWatcher(directory); - } - } else { - for (const [directory, watcher] of this.directories) { - watcher.close(); - this.directories.set(directory, true); - } - } - } + compile(options) { + throw new Error("Abstract: should be overridden"); } - watch(filePath, startTime) { - const key = withoutCase(filePath); - let watchers = this.watchers.get(key); - if (watchers === undefined) { - watchers = new Set(); - this.watchers.set(key, watchers); - } - this.refs++; - const watcher = new Watcher(this, filePath, startTime); - watcher.on("closed", () => { - if (--this.refs <= 0) { - this.close(); - return; - } - watchers.delete(watcher); - if (watchers.size === 0) { - this.watchers.delete(key); - if (this.path === filePath) this.setNestedWatching(false); - } + _createCall(type) { + return this.compile({ + taps: this.taps, + interceptors: this.interceptors, + args: this._args, + type: type }); - watchers.add(watcher); - let safeTime; - if (filePath === this.path) { - this.setNestedWatching(true); - safeTime = this.lastWatchEvent; - for (const entry of this.files.values()) { - fixupEntryAccuracy(entry); - safeTime = Math.max(safeTime, entry.safeTime); - } - } else { - const entry = this.files.get(filePath); - if (entry) { - fixupEntryAccuracy(entry); - safeTime = entry.safeTime; - } else { - safeTime = 0; - } - } - if (safeTime) { - if (safeTime >= startTime) { - process.nextTick(() => { - if (this.closed) return; - if (filePath === this.path) { - watcher.emit( - "change", - filePath, - safeTime, - "watch (outdated on attach)", - true - ); - } else { - watcher.emit( - "change", - safeTime, - "watch (outdated on attach)", - true - ); - } - }); - } - } else if (this.initialScan) { - if (this.initialScanRemoved.has(filePath)) { - process.nextTick(() => { - if (this.closed) return; - watcher.emit("remove"); - }); - } - } else if ( - !this.directories.has(filePath) && - watcher.checkStartTime(this.initialScanFinished, false) - ) { - process.nextTick(() => { - if (this.closed) return; - watcher.emit("initial-missing", "watch (missing on attach)"); - }); - } - return watcher; } - onWatchEvent(eventType, filename) { - if (this.closed) return; - if (!filename) { - // In some cases no filename is provided - // This seem to happen on windows - // So some event happened but we don't know which file is affected - // We have to do a full scan of the directory - this.doScan(false); - return; - } - - const filePath = path.join(this.path, filename); - if (this.checkIgnore(filePath)) return; - - if (this._activeEvents.get(filename) === undefined) { - this._activeEvents.set(filename, false); - const checkStats = () => { - if (this.closed) return; - this._activeEvents.set(filename, false); - fs.lstat(filePath, (err, stats) => { - if (this.closed) return; - if (this._activeEvents.get(filename) === true) { - process.nextTick(checkStats); - return; - } - this._activeEvents.delete(filename); - // ENOENT happens when the file/directory doesn't exist - // EPERM happens when the containing directory doesn't exist - if (err) { - if ( - err.code !== "ENOENT" && - err.code !== "EPERM" && - err.code !== "EBUSY" - ) { - this.onStatsError(err); - } else { - if (filename === path.basename(this.path)) { - // This may indicate that the directory itself was removed - if (!fs.existsSync(this.path)) { - this.onDirectoryRemoved("stat failed"); - } - } - } - } - this.lastWatchEvent = Date.now(); - this._cachedTimeInfoEntries = undefined; - if (!stats) { - this.setMissing(filePath, false, eventType); - } else if (stats.isDirectory()) { - this.setDirectory( - filePath, - +stats.birthtime || 1, - false, - eventType - ); - } else if (stats.isFile() || stats.isSymbolicLink()) { - if (stats.mtime) { - ensureFsAccuracy(stats.mtime); - } - this.setFileTime( - filePath, - +stats.mtime || +stats.ctime || 1, - false, - false, - eventType - ); - } - }); + _tap(type, options, fn) { + if (typeof options === "string") { + options = { + name: options.trim() }; - process.nextTick(checkStats); - } else { - this._activeEvents.set(filename, true); + } else if (typeof options !== "object" || options === null) { + throw new Error("Invalid tap options"); } - } - - onWatcherError(err) { - if (this.closed) return; - if (err) { - if (err.code !== "EPERM" && err.code !== "ENOENT") { - console.error("Watchpack Error (watcher): " + err); - } - this.onDirectoryRemoved("watch error"); + if (typeof options.name !== "string" || options.name === "") { + throw new Error("Missing name for tap"); + } + if (typeof options.context !== "undefined") { + deprecateContext(); } + options = Object.assign({ type, fn }, options); + options = this._runRegisterInterceptors(options); + this._insert(options); } - onStatsError(err) { - if (err) { - console.error("Watchpack Error (stats): " + err); - } + tap(options, fn) { + this._tap("sync", options, fn); } - onScanError(err) { - if (err) { - console.error("Watchpack Error (initial scan): " + err); - } - this.onScanFinished(); + tapAsync(options, fn) { + this._tap("async", options, fn); } - onScanFinished() { - if (this.polledWatching) { - this.timeout = setTimeout(() => { - if (this.closed) return; - this.doScan(false); - }, this.polledWatching); - } + tapPromise(options, fn) { + this._tap("promise", options, fn); } - onDirectoryRemoved(reason) { - if (this.watcher) { - this.watcher.close(); - this.watcher = null; - } - this.watchInParentDirectory(); - const type = `directory-removed (${reason})`; - for (const directory of this.directories.keys()) { - this.setMissing(directory, null, type); - } - for (const file of this.files.keys()) { - this.setMissing(file, null, type); + _runRegisterInterceptors(options) { + for (const interceptor of this.interceptors) { + if (interceptor.register) { + const newOptions = interceptor.register(options); + if (newOptions !== undefined) { + options = newOptions; + } + } } + return options; } - watchInParentDirectory() { - if (!this.parentWatcher) { - const parentDir = path.dirname(this.path); - // avoid watching in the root directory - // removing directories in the root directory is not supported - if (path.dirname(parentDir) === parentDir) return; - - this.parentWatcher = this.watcherManager.watchFile(this.path, 1); - this.parentWatcher.on("change", (mtime, type) => { - if (this.closed) return; + withOptions(options) { + const mergeOptions = opt => + Object.assign({}, options, typeof opt === "string" ? { name: opt } : opt); - // On non-osx platforms we don't need this watcher to detect - // directory removal, as an EPERM error indicates that - if ((!IS_OSX || this.polledWatching) && this.parentWatcher) { - this.parentWatcher.close(); - this.parentWatcher = null; - } - // Try to create the watcher when parent directory is found - if (!this.watcher) { - this.createWatcher(); - this.doScan(false); + return { + name: this.name, + tap: (opt, fn) => this.tap(mergeOptions(opt), fn), + tapAsync: (opt, fn) => this.tapAsync(mergeOptions(opt), fn), + tapPromise: (opt, fn) => this.tapPromise(mergeOptions(opt), fn), + intercept: interceptor => this.intercept(interceptor), + isUsed: () => this.isUsed(), + withOptions: opt => this.withOptions(mergeOptions(opt)) + }; + } - // directory was created so we emit an event - this.forEachWatcher(this.path, w => - w.emit("change", this.path, mtime, type, false) - ); - } - }); - this.parentWatcher.on("remove", () => { - this.onDirectoryRemoved("parent directory removed"); - }); - } + isUsed() { + return this.taps.length > 0 || this.interceptors.length > 0; } - doScan(initial) { - if (this.scanning) { - if (this.scanAgain) { - if (!initial) this.scanAgainInitial = false; - } else { - this.scanAgain = true; - this.scanAgainInitial = initial; + intercept(interceptor) { + this._resetCompilation(); + this.interceptors.push(Object.assign({}, interceptor)); + if (interceptor.register) { + for (let i = 0; i < this.taps.length; i++) { + this.taps[i] = interceptor.register(this.taps[i]); } - return; - } - this.scanning = true; - if (this.timeout) { - clearTimeout(this.timeout); - this.timeout = undefined; } - process.nextTick(() => { - if (this.closed) return; - fs.readdir(this.path, (err, items) => { - if (this.closed) return; - if (err) { - if (err.code === "ENOENT" || err.code === "EPERM") { - this.onDirectoryRemoved("scan readdir failed"); - } else { - this.onScanError(err); - } - this.initialScan = false; - this.initialScanFinished = Date.now(); - if (initial) { - for (const watchers of this.watchers.values()) { - for (const watcher of watchers) { - if (watcher.checkStartTime(this.initialScanFinished, false)) { - watcher.emit( - "initial-missing", - "scan (parent directory missing in initial scan)" - ); - } - } - } - } - if (this.scanAgain) { - this.scanAgain = false; - this.doScan(this.scanAgainInitial); - } else { - this.scanning = false; - } - return; - } - const itemPaths = new Set( - items.map(item => path.join(this.path, item.normalize("NFC"))) - ); - for (const file of this.files.keys()) { - if (!itemPaths.has(file)) { - this.setMissing(file, initial, "scan (missing)"); - } - } - for (const directory of this.directories.keys()) { - if (!itemPaths.has(directory)) { - this.setMissing(directory, initial, "scan (missing)"); - } - } - if (this.scanAgain) { - // Early repeat of scan - this.scanAgain = false; - this.doScan(initial); - return; - } - const itemFinished = needCalls(itemPaths.size + 1, () => { - if (this.closed) return; - this.initialScan = false; - this.initialScanRemoved = null; - this.initialScanFinished = Date.now(); - if (initial) { - const missingWatchers = new Map(this.watchers); - missingWatchers.delete(withoutCase(this.path)); - for (const item of itemPaths) { - missingWatchers.delete(withoutCase(item)); - } - for (const watchers of missingWatchers.values()) { - for (const watcher of watchers) { - if (watcher.checkStartTime(this.initialScanFinished, false)) { - watcher.emit( - "initial-missing", - "scan (missing in initial scan)" - ); - } - } - } - } - if (this.scanAgain) { - this.scanAgain = false; - this.doScan(this.scanAgainInitial); - } else { - this.scanning = false; - this.onScanFinished(); - } - }); - for (const itemPath of itemPaths) { - fs.lstat(itemPath, (err2, stats) => { - if (this.closed) return; - if (err2) { - if ( - err2.code === "ENOENT" || - err2.code === "EPERM" || - err2.code === "EBUSY" - ) { - this.setMissing(itemPath, initial, "scan (" + err2.code + ")"); - } else { - this.onScanError(err2); - } - itemFinished(); - return; - } - if (stats.isFile() || stats.isSymbolicLink()) { - if (stats.mtime) { - ensureFsAccuracy(stats.mtime); - } - this.setFileTime( - itemPath, - +stats.mtime || +stats.ctime || 1, - initial, - true, - "scan (file)" - ); - } else if (stats.isDirectory()) { - if (!initial || !this.directories.has(itemPath)) - this.setDirectory( - itemPath, - +stats.birthtime || 1, - initial, - "scan (dir)" - ); - } - itemFinished(); - }); - } - itemFinished(); - }); - }); } - getTimes() { - const obj = Object.create(null); - let safeTime = this.lastWatchEvent; - for (const [file, entry] of this.files) { - fixupEntryAccuracy(entry); - safeTime = Math.max(safeTime, entry.safeTime); - obj[file] = Math.max(entry.safeTime, entry.timestamp); - } - if (this.nestedWatching) { - for (const w of this.directories.values()) { - const times = w.directoryWatcher.getTimes(); - for (const file of Object.keys(times)) { - const time = times[file]; - safeTime = Math.max(safeTime, time); - obj[file] = time; - } - } - obj[this.path] = safeTime; - } - if (!this.initialScan) { - for (const watchers of this.watchers.values()) { - for (const watcher of watchers) { - const path = watcher.path; - if (!Object.prototype.hasOwnProperty.call(obj, path)) { - obj[path] = null; - } - } - } - } - return obj; + _resetCompilation() { + this.call = this._call; + this.callAsync = this._callAsync; + this.promise = this._promise; } - getTimeInfoEntries() { - if (this._cachedTimeInfoEntries !== undefined) - return this._cachedTimeInfoEntries; - const map = new Map(); - let safeTime = this.lastWatchEvent; - for (const [file, entry] of this.files) { - fixupEntryAccuracy(entry); - safeTime = Math.max(safeTime, entry.safeTime); - map.set(file, entry); + _insert(item) { + this._resetCompilation(); + let before; + if (typeof item.before === "string") { + before = new Set([item.before]); + } else if (Array.isArray(item.before)) { + before = new Set(item.before); } - if (this.nestedWatching) { - for (const w of this.directories.values()) { - const timeInfoEntries = w.directoryWatcher.getTimeInfoEntries(); - for (const [file, entry] of timeInfoEntries) { - if (entry) { - safeTime = Math.max(safeTime, entry.safeTime); - } - map.set(file, entry); - } - } - map.set(this.path, { - safeTime - }); - } else { - for (const dir of this.directories.keys()) { - // No additional info about this directory - map.set(dir, EXISTANCE_ONLY_TIME_ENTRY); - } - map.set(this.path, EXISTANCE_ONLY_TIME_ENTRY); + let stage = 0; + if (typeof item.stage === "number") { + stage = item.stage; } - if (!this.initialScan) { - for (const watchers of this.watchers.values()) { - for (const watcher of watchers) { - const path = watcher.path; - if (!map.has(path)) { - map.set(path, null); - } + let i = this.taps.length; + while (i > 0) { + i--; + const x = this.taps[i]; + this.taps[i + 1] = x; + const xStage = x.stage || 0; + if (before) { + if (before.has(x.name)) { + before.delete(x.name); + continue; + } + if (before.size > 0) { + continue; } } - this._cachedTimeInfoEntries = map; - } - return map; - } - - close() { - this.closed = true; - this.initialScan = false; - if (this.watcher) { - this.watcher.close(); - this.watcher = null; - } - if (this.nestedWatching) { - for (const w of this.directories.values()) { - w.close(); + if (xStage > stage) { + continue; } - this.directories.clear(); - } - if (this.parentWatcher) { - this.parentWatcher.close(); - this.parentWatcher = null; + i++; + break; } - this.emit("closed"); + this.taps[i] = item; } } -module.exports = DirectoryWatcher; -module.exports.EXISTANCE_ONLY_TIME_ENTRY = EXISTANCE_ONLY_TIME_ENTRY; - -function fixupEntryAccuracy(entry) { - if (entry.accuracy > FS_ACCURACY) { - entry.safeTime = entry.safeTime - entry.accuracy + FS_ACCURACY; - entry.accuracy = FS_ACCURACY; - } -} +Object.setPrototypeOf(Hook.prototype, null); -function ensureFsAccuracy(mtime) { - if (!mtime) return; - if (FS_ACCURACY > 1 && mtime % 1 !== 0) FS_ACCURACY = 1; - else if (FS_ACCURACY > 10 && mtime % 10 !== 0) FS_ACCURACY = 10; - else if (FS_ACCURACY > 100 && mtime % 100 !== 0) FS_ACCURACY = 100; -} +module.exports = Hook; /***/ }), -/***/ 56083: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { +/***/ 85572: +/***/ (function(module) { "use strict"; /* @@ -143154,112 +143638,473 @@ function ensureFsAccuracy(mtime) { */ -const fs = __webpack_require__(35747); -const path = __webpack_require__(85622); - -// macOS, Linux, and Windows all rely on these errors -const EXPECTED_ERRORS = new Set(["EINVAL", "ENOENT"]); +class HookCodeFactory { + constructor(config) { + this.config = config; + this.options = undefined; + this._args = undefined; + } -// On Windows there is also this error in some cases -if (process.platform === "win32") EXPECTED_ERRORS.add("UNKNOWN"); + create(options) { + this.init(options); + let fn; + switch (this.options.type) { + case "sync": + fn = new Function( + this.args(), + '"use strict";\n' + + this.header() + + this.contentWithInterceptors({ + onError: err => `throw ${err};\n`, + onResult: result => `return ${result};\n`, + resultReturns: true, + onDone: () => "", + rethrowIfPossible: true + }) + ); + break; + case "async": + fn = new Function( + this.args({ + after: "_callback" + }), + '"use strict";\n' + + this.header() + + this.contentWithInterceptors({ + onError: err => `_callback(${err});\n`, + onResult: result => `_callback(null, ${result});\n`, + onDone: () => "_callback();\n" + }) + ); + break; + case "promise": + let errorHelperUsed = false; + const content = this.contentWithInterceptors({ + onError: err => { + errorHelperUsed = true; + return `_error(${err});\n`; + }, + onResult: result => `_resolve(${result});\n`, + onDone: () => "_resolve();\n" + }); + let code = ""; + code += '"use strict";\n'; + code += this.header(); + code += "return new Promise((function(_resolve, _reject) {\n"; + if (errorHelperUsed) { + code += "var _sync = true;\n"; + code += "function _error(_err) {\n"; + code += "if(_sync)\n"; + code += + "_resolve(Promise.resolve().then((function() { throw _err; })));\n"; + code += "else\n"; + code += "_reject(_err);\n"; + code += "};\n"; + } + code += content; + if (errorHelperUsed) { + code += "_sync = false;\n"; + } + code += "}));\n"; + fn = new Function(this.args(), code); + break; + } + this.deinit(); + return fn; + } -class LinkResolver { - constructor() { - this.cache = new Map(); + setup(instance, options) { + instance._x = options.taps.map(t => t.fn); } /** - * @param {string} file path to file or directory - * @returns {string[]} array of file and all symlinks contributed in the resolving process (first item is the resolved file) + * @param {{ type: "sync" | "promise" | "async", taps: Array, interceptors: Array }} options */ - resolve(file) { - const cacheEntry = this.cache.get(file); - if (cacheEntry !== undefined) { - return cacheEntry; - } - const parent = path.dirname(file); - if (parent === file) { - // At root of filesystem there can't be a link - const result = Object.freeze([file]); - this.cache.set(file, result); - return result; - } - // resolve the parent directory to find links there and get the real path - const parentResolved = this.resolve(parent); - let realFile = file; + init(options) { + this.options = options; + this._args = options.args.slice(); + } - // is the parent directory really somewhere else? - if (parentResolved[0] !== parent) { - // get the real location of file - const basename = path.basename(file); - realFile = path.resolve(parentResolved[0], basename); + deinit() { + this.options = undefined; + this._args = undefined; + } + + contentWithInterceptors(options) { + if (this.options.interceptors.length > 0) { + const onError = options.onError; + const onResult = options.onResult; + const onDone = options.onDone; + let code = ""; + for (let i = 0; i < this.options.interceptors.length; i++) { + const interceptor = this.options.interceptors[i]; + if (interceptor.call) { + code += `${this.getInterceptor(i)}.call(${this.args({ + before: interceptor.context ? "_context" : undefined + })});\n`; + } + } + code += this.content( + Object.assign(options, { + onError: + onError && + (err => { + let code = ""; + for (let i = 0; i < this.options.interceptors.length; i++) { + const interceptor = this.options.interceptors[i]; + if (interceptor.error) { + code += `${this.getInterceptor(i)}.error(${err});\n`; + } + } + code += onError(err); + return code; + }), + onResult: + onResult && + (result => { + let code = ""; + for (let i = 0; i < this.options.interceptors.length; i++) { + const interceptor = this.options.interceptors[i]; + if (interceptor.result) { + code += `${this.getInterceptor(i)}.result(${result});\n`; + } + } + code += onResult(result); + return code; + }), + onDone: + onDone && + (() => { + let code = ""; + for (let i = 0; i < this.options.interceptors.length; i++) { + const interceptor = this.options.interceptors[i]; + if (interceptor.done) { + code += `${this.getInterceptor(i)}.done();\n`; + } + } + code += onDone(); + return code; + }) + }) + ); + return code; + } else { + return this.content(options); } - // try to read the link content - try { - const linkContent = fs.readlinkSync(realFile); + } - // resolve the link content relative to the parent directory - const resolvedLink = path.resolve(parentResolved[0], linkContent); + header() { + let code = ""; + if (this.needContext()) { + code += "var _context = {};\n"; + } else { + code += "var _context;\n"; + } + code += "var _x = this._x;\n"; + if (this.options.interceptors.length > 0) { + code += "var _taps = this.taps;\n"; + code += "var _interceptors = this.interceptors;\n"; + } + return code; + } - // recursive resolve the link content for more links in the structure - const linkResolved = this.resolve(resolvedLink); + needContext() { + for (const tap of this.options.taps) if (tap.context) return true; + return false; + } - // merge parent and link resolve results - let result; - if (linkResolved.length > 1 && parentResolved.length > 1) { - // when both contain links we need to duplicate them with a Set - const resultSet = new Set(linkResolved); - // add the link - resultSet.add(realFile); - // add all symlinks of the parent - for (let i = 1; i < parentResolved.length; i++) { - resultSet.add(parentResolved[i]); + callTap(tapIndex, { onError, onResult, onDone, rethrowIfPossible }) { + let code = ""; + let hasTapCached = false; + for (let i = 0; i < this.options.interceptors.length; i++) { + const interceptor = this.options.interceptors[i]; + if (interceptor.tap) { + if (!hasTapCached) { + code += `var _tap${tapIndex} = ${this.getTap(tapIndex)};\n`; + hasTapCached = true; } - result = Object.freeze(Array.from(resultSet)); - } else if (parentResolved.length > 1) { - // we have links in the parent but not for the link content location - result = parentResolved.slice(); - result[0] = linkResolved[0]; - // add the link - result.push(realFile); - Object.freeze(result); - } else if (linkResolved.length > 1) { - // we can return the link content location result - result = linkResolved.slice(); - // add the link - result.push(realFile); - Object.freeze(result); - } else { - // neither link content location nor parent have links - // this link is the only link here - result = Object.freeze([ - // the resolve real location - linkResolved[0], - // add the link - realFile - ]); + code += `${this.getInterceptor(i)}.tap(${ + interceptor.context ? "_context, " : "" + }_tap${tapIndex});\n`; } - this.cache.set(file, result); - return result; - } catch (e) { - if (!EXPECTED_ERRORS.has(e.code)) { - throw e; + } + code += `var _fn${tapIndex} = ${this.getTapFn(tapIndex)};\n`; + const tap = this.options.taps[tapIndex]; + switch (tap.type) { + case "sync": + if (!rethrowIfPossible) { + code += `var _hasError${tapIndex} = false;\n`; + code += "try {\n"; + } + if (onResult) { + code += `var _result${tapIndex} = _fn${tapIndex}(${this.args({ + before: tap.context ? "_context" : undefined + })});\n`; + } else { + code += `_fn${tapIndex}(${this.args({ + before: tap.context ? "_context" : undefined + })});\n`; + } + if (!rethrowIfPossible) { + code += "} catch(_err) {\n"; + code += `_hasError${tapIndex} = true;\n`; + code += onError("_err"); + code += "}\n"; + code += `if(!_hasError${tapIndex}) {\n`; + } + if (onResult) { + code += onResult(`_result${tapIndex}`); + } + if (onDone) { + code += onDone(); + } + if (!rethrowIfPossible) { + code += "}\n"; + } + break; + case "async": + let cbCode = ""; + if (onResult) + cbCode += `(function(_err${tapIndex}, _result${tapIndex}) {\n`; + else cbCode += `(function(_err${tapIndex}) {\n`; + cbCode += `if(_err${tapIndex}) {\n`; + cbCode += onError(`_err${tapIndex}`); + cbCode += "} else {\n"; + if (onResult) { + cbCode += onResult(`_result${tapIndex}`); + } + if (onDone) { + cbCode += onDone(); + } + cbCode += "}\n"; + cbCode += "})"; + code += `_fn${tapIndex}(${this.args({ + before: tap.context ? "_context" : undefined, + after: cbCode + })});\n`; + break; + case "promise": + code += `var _hasResult${tapIndex} = false;\n`; + code += `var _promise${tapIndex} = _fn${tapIndex}(${this.args({ + before: tap.context ? "_context" : undefined + })});\n`; + code += `if (!_promise${tapIndex} || !_promise${tapIndex}.then)\n`; + code += ` throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise${tapIndex} + ')');\n`; + code += `_promise${tapIndex}.then((function(_result${tapIndex}) {\n`; + code += `_hasResult${tapIndex} = true;\n`; + if (onResult) { + code += onResult(`_result${tapIndex}`); + } + if (onDone) { + code += onDone(); + } + code += `}), function(_err${tapIndex}) {\n`; + code += `if(_hasResult${tapIndex}) throw _err${tapIndex};\n`; + code += onError(`_err${tapIndex}`); + code += "});\n"; + break; + } + return code; + } + + callTapsSeries({ + onError, + onResult, + resultReturns, + onDone, + doneReturns, + rethrowIfPossible + }) { + if (this.options.taps.length === 0) return onDone(); + const firstAsync = this.options.taps.findIndex(t => t.type !== "sync"); + const somethingReturns = resultReturns || doneReturns; + let code = ""; + let current = onDone; + let unrollCounter = 0; + for (let j = this.options.taps.length - 1; j >= 0; j--) { + const i = j; + const unroll = + current !== onDone && + (this.options.taps[i].type !== "sync" || unrollCounter++ > 20); + if (unroll) { + unrollCounter = 0; + code += `function _next${i}() {\n`; + code += current(); + code += `}\n`; + current = () => `${somethingReturns ? "return " : ""}_next${i}();\n`; } - // no link - const result = parentResolved.slice(); - result[0] = realFile; - Object.freeze(result); - this.cache.set(file, result); - return result; + const done = current; + const doneBreak = skipDone => { + if (skipDone) return ""; + return onDone(); + }; + const content = this.callTap(i, { + onError: error => onError(i, error, done, doneBreak), + onResult: + onResult && + (result => { + return onResult(i, result, done, doneBreak); + }), + onDone: !onResult && done, + rethrowIfPossible: + rethrowIfPossible && (firstAsync < 0 || i < firstAsync) + }); + current = () => content; + } + code += current(); + return code; + } + + callTapsLooping({ onError, onDone, rethrowIfPossible }) { + if (this.options.taps.length === 0) return onDone(); + const syncOnly = this.options.taps.every(t => t.type === "sync"); + let code = ""; + if (!syncOnly) { + code += "var _looper = (function() {\n"; + code += "var _loopAsync = false;\n"; + } + code += "var _loop;\n"; + code += "do {\n"; + code += "_loop = false;\n"; + for (let i = 0; i < this.options.interceptors.length; i++) { + const interceptor = this.options.interceptors[i]; + if (interceptor.loop) { + code += `${this.getInterceptor(i)}.loop(${this.args({ + before: interceptor.context ? "_context" : undefined + })});\n`; + } + } + code += this.callTapsSeries({ + onError, + onResult: (i, result, next, doneBreak) => { + let code = ""; + code += `if(${result} !== undefined) {\n`; + code += "_loop = true;\n"; + if (!syncOnly) code += "if(_loopAsync) _looper();\n"; + code += doneBreak(true); + code += `} else {\n`; + code += next(); + code += `}\n`; + return code; + }, + onDone: + onDone && + (() => { + let code = ""; + code += "if(!_loop) {\n"; + code += onDone(); + code += "}\n"; + return code; + }), + rethrowIfPossible: rethrowIfPossible && syncOnly + }); + code += "} while(_loop);\n"; + if (!syncOnly) { + code += "_loopAsync = true;\n"; + code += "});\n"; + code += "_looper();\n"; + } + return code; + } + + callTapsParallel({ + onError, + onResult, + onDone, + rethrowIfPossible, + onTap = (i, run) => run() + }) { + if (this.options.taps.length <= 1) { + return this.callTapsSeries({ + onError, + onResult, + onDone, + rethrowIfPossible + }); + } + let code = ""; + code += "do {\n"; + code += `var _counter = ${this.options.taps.length};\n`; + if (onDone) { + code += "var _done = (function() {\n"; + code += onDone(); + code += "});\n"; + } + for (let i = 0; i < this.options.taps.length; i++) { + const done = () => { + if (onDone) return "if(--_counter === 0) _done();\n"; + else return "--_counter;"; + }; + const doneBreak = skipDone => { + if (skipDone || !onDone) return "_counter = 0;\n"; + else return "_counter = 0;\n_done();\n"; + }; + code += "if(_counter <= 0) break;\n"; + code += onTap( + i, + () => + this.callTap(i, { + onError: error => { + let code = ""; + code += "if(_counter > 0) {\n"; + code += onError(i, error, done, doneBreak); + code += "}\n"; + return code; + }, + onResult: + onResult && + (result => { + let code = ""; + code += "if(_counter > 0) {\n"; + code += onResult(i, result, done, doneBreak); + code += "}\n"; + return code; + }), + onDone: + !onResult && + (() => { + return done(); + }), + rethrowIfPossible + }), + done, + doneBreak + ); + } + code += "} while(false);\n"; + return code; + } + + args({ before, after } = {}) { + let allArgs = this._args; + if (before) allArgs = [before].concat(allArgs); + if (after) allArgs = allArgs.concat(after); + if (allArgs.length === 0) { + return ""; + } else { + return allArgs.join(", "); } } + + getTapFn(idx) { + return `_x[${idx}]`; + } + + getTap(idx) { + return `_taps[${idx}]`; + } + + getInterceptor(idx) { + return `_interceptors[${idx}]`; + } } -module.exports = LinkResolver; + +module.exports = HookCodeFactory; /***/ }), -/***/ 29539: +/***/ 81647: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; @@ -143269,57 +144114,66 @@ module.exports = LinkResolver; */ -const path = __webpack_require__(85622); -const DirectoryWatcher = __webpack_require__(39144); +const util = __webpack_require__(31669); -class WatcherManager { - constructor(options) { - this.options = options; - this.directoryWatchers = new Map(); +const defaultFactory = (key, hook) => hook; + +class HookMap { + constructor(factory, name = undefined) { + this._map = new Map(); + this.name = name; + this._factory = factory; + this._interceptors = []; } - getDirectoryWatcher(directory) { - const watcher = this.directoryWatchers.get(directory); - if (watcher === undefined) { - const newWatcher = new DirectoryWatcher(this, directory, this.options); - this.directoryWatchers.set(directory, newWatcher); - newWatcher.on("closed", () => { - this.directoryWatchers.delete(directory); - }); - return newWatcher; - } - return watcher; + get(key) { + return this._map.get(key); } - watchFile(p, startTime) { - const directory = path.dirname(p); - if (directory === p) return null; - return this.getDirectoryWatcher(directory).watch(p, startTime); + for(key) { + const hook = this.get(key); + if (hook !== undefined) { + return hook; + } + let newHook = this._factory(key); + const interceptors = this._interceptors; + for (let i = 0; i < interceptors.length; i++) { + newHook = interceptors[i].factory(key, newHook); + } + this._map.set(key, newHook); + return newHook; } - watchDirectory(directory, startTime) { - return this.getDirectoryWatcher(directory).watch(directory, startTime); + intercept(interceptor) { + this._interceptors.push( + Object.assign( + { + factory: defaultFactory + }, + interceptor + ) + ); } } -const watcherManagers = new WeakMap(); -/** - * @param {object} options options - * @returns {WatcherManager} the watcher manager - */ -module.exports = options => { - const watcherManager = watcherManagers.get(options); - if (watcherManager !== undefined) return watcherManager; - const newWatcherManager = new WatcherManager(options); - watcherManagers.set(options, newWatcherManager); - return newWatcherManager; -}; -module.exports.WatcherManager = WatcherManager; +HookMap.prototype.tap = util.deprecate(function(key, options, fn) { + return this.for(key).tap(options, fn); +}, "HookMap#tap(key,…) is deprecated. Use HookMap#for(key).tap(…) instead."); + +HookMap.prototype.tapAsync = util.deprecate(function(key, options, fn) { + return this.for(key).tapAsync(options, fn); +}, "HookMap#tapAsync(key,…) is deprecated. Use HookMap#for(key).tapAsync(…) instead."); + +HookMap.prototype.tapPromise = util.deprecate(function(key, options, fn) { + return this.for(key).tapPromise(options, fn); +}, "HookMap#tapPromise(key,…) is deprecated. Use HookMap#for(key).tapPromise(…) instead."); + +module.exports = HookMap; /***/ }), -/***/ 89946: +/***/ 63708: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; @@ -143329,144 +144183,60 @@ module.exports.WatcherManager = WatcherManager; */ -const path = __webpack_require__(85622); - -/** - * @template T - * @typedef {Object} TreeNode - * @property {string} filePath - * @property {TreeNode} parent - * @property {TreeNode[]} children - * @property {number} entries - * @property {boolean} active - * @property {T[] | T | undefined} value - */ +const Hook = __webpack_require__(36591); -/** - * @template T - * @param {Map>} the new plan - */ -module.exports = (plan, limit) => { - const treeMap = new Map(); - // Convert to tree - for (const [filePath, value] of plan) { - treeMap.set(filePath, { - filePath, - parent: undefined, - children: undefined, - entries: 1, - active: true, - value - }); +class MultiHook { + constructor(hooks, name = undefined) { + this.hooks = hooks; + this.name = name; } - let currentCount = treeMap.size; - // Create parents and calculate sum of entries - for (const node of treeMap.values()) { - const parentPath = path.dirname(node.filePath); - if (parentPath !== node.filePath) { - let parent = treeMap.get(parentPath); - if (parent === undefined) { - parent = { - filePath: parentPath, - parent: undefined, - children: [node], - entries: node.entries, - active: false, - value: undefined - }; - treeMap.set(parentPath, parent); - node.parent = parent; - } else { - node.parent = parent; - if (parent.children === undefined) { - parent.children = [node]; - } else { - parent.children.push(node); - } - do { - parent.entries += node.entries; - parent = parent.parent; - } while (parent); - } + + tap(options, fn) { + for (const hook of this.hooks) { + hook.tap(options, fn); } } - // Reduce until limit reached - while (currentCount > limit) { - // Select node that helps reaching the limit most effectively without overmerging - const overLimit = currentCount - limit; - let bestNode = undefined; - let bestCost = Infinity; - for (const node of treeMap.values()) { - if (node.entries <= 1 || !node.children || !node.parent) continue; - if (node.children.length === 0) continue; - if (node.children.length === 1 && !node.value) continue; - // Try to select the node with has just a bit more entries than we need to reduce - // When just a bit more is over 30% over the limit, - // also consider just a bit less entries then we need to reduce - const cost = - node.entries - 1 >= overLimit - ? node.entries - 1 - overLimit - : overLimit - node.entries + 1 + limit * 0.3; - if (cost < bestCost) { - bestNode = node; - bestCost = cost; - } + + tapAsync(options, fn) { + for (const hook of this.hooks) { + hook.tapAsync(options, fn); } - if (!bestNode) break; - // Merge all children - const reduction = bestNode.entries - 1; - bestNode.active = true; - bestNode.entries = 1; - currentCount -= reduction; - let parent = bestNode.parent; - while (parent) { - parent.entries -= reduction; - parent = parent.parent; + } + + tapPromise(options, fn) { + for (const hook of this.hooks) { + hook.tapPromise(options, fn); } - const queue = new Set(bestNode.children); - for (const node of queue) { - node.active = false; - node.entries = 0; - if (node.children) { - for (const child of node.children) queue.add(child); - } + } + + isUsed() { + for (const hook of this.hooks) { + if (hook.isUsed()) return true; } + return false; } - // Write down new plan - const newPlan = new Map(); - for (const rootNode of treeMap.values()) { - if (!rootNode.active) continue; - const map = new Map(); - const queue = new Set([rootNode]); - for (const node of queue) { - if (node.active && node !== rootNode) continue; - if (node.value) { - if (Array.isArray(node.value)) { - for (const item of node.value) { - map.set(item, node.filePath); - } - } else { - map.set(node.value, node.filePath); - } - } - if (node.children) { - for (const child of node.children) { - queue.add(child); - } - } + + intercept(interceptor) { + for (const hook of this.hooks) { + hook.intercept(interceptor); } - newPlan.set(rootNode.filePath, map); } - return newPlan; -}; + + withOptions(options) { + return new MultiHook( + this.hooks.map(h => h.withOptions(options)), + this.name + ); + } +} + +module.exports = MultiHook; /***/ }), -/***/ 10547: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ 98034: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; /* @@ -143475,340 +144245,164 @@ module.exports = (plan, limit) => { */ -const fs = __webpack_require__(35747); -const path = __webpack_require__(85622); -const { EventEmitter } = __webpack_require__(28614); -const reducePlan = __webpack_require__(89946); - -const IS_OSX = __webpack_require__(12087).platform() === "darwin"; -const IS_WIN = __webpack_require__(12087).platform() === "win32"; -const SUPPORTS_RECURSIVE_WATCHING = IS_OSX || IS_WIN; +const Hook = __webpack_require__(36591); +const HookCodeFactory = __webpack_require__(85572); -const watcherLimit = - +process.env.WATCHPACK_WATCHER_LIMIT || (IS_OSX ? 2000 : 10000); +class SyncBailHookCodeFactory extends HookCodeFactory { + content({ onError, onResult, resultReturns, onDone, rethrowIfPossible }) { + return this.callTapsSeries({ + onError: (i, err) => onError(err), + onResult: (i, result, next) => + `if(${result} !== undefined) {\n${onResult( + result + )};\n} else {\n${next()}}\n`, + resultReturns, + onDone, + rethrowIfPossible + }); + } +} -const recursiveWatcherLogging = !!process.env - .WATCHPACK_RECURSIVE_WATCHER_LOGGING; +const factory = new SyncBailHookCodeFactory(); -let isBatch = false; -let watcherCount = 0; +const TAP_ASYNC = () => { + throw new Error("tapAsync is not supported on a SyncBailHook"); +}; -/** @type {Map} */ -const pendingWatchers = new Map(); +const TAP_PROMISE = () => { + throw new Error("tapPromise is not supported on a SyncBailHook"); +}; -/** @type {Map} */ -const recursiveWatchers = new Map(); +const COMPILE = function(options) { + factory.setup(this, options); + return factory.create(options); +}; -/** @type {Map} */ -const directWatchers = new Map(); +function SyncBailHook(args = [], name = undefined) { + const hook = new Hook(args, name); + hook.constructor = SyncBailHook; + hook.tapAsync = TAP_ASYNC; + hook.tapPromise = TAP_PROMISE; + hook.compile = COMPILE; + return hook; +} -/** @type {Map} */ -const underlyingWatcher = new Map(); +SyncBailHook.prototype = null; -class DirectWatcher { - constructor(filePath) { - this.filePath = filePath; - this.watchers = new Set(); - this.watcher = undefined; - try { - const watcher = fs.watch(filePath); - this.watcher = watcher; - watcher.on("change", (type, filename) => { - for (const w of this.watchers) { - w.emit("change", type, filename); - } - }); - watcher.on("error", error => { - for (const w of this.watchers) { - w.emit("error", error); - } - }); - } catch (err) { - process.nextTick(() => { - for (const w of this.watchers) { - w.emit("error", err); - } - }); - } - watcherCount++; - } +module.exports = SyncBailHook; - add(watcher) { - underlyingWatcher.set(watcher, this); - this.watchers.add(watcher); - } - remove(watcher) { - this.watchers.delete(watcher); - if (this.watchers.size === 0) { - directWatchers.delete(this.filePath); - watcherCount--; - if (this.watcher) this.watcher.close(); - } - } +/***/ }), - getWatchers() { - return this.watchers; - } -} +/***/ 35079: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { -class RecursiveWatcher { - constructor(rootPath) { - this.rootPath = rootPath; - /** @type {Map} */ - this.mapWatcherToPath = new Map(); - /** @type {Map>} */ - this.mapPathToWatchers = new Map(); - this.watcher = undefined; - try { - const watcher = fs.watch(rootPath, { - recursive: true - }); - this.watcher = watcher; - watcher.on("change", (type, filename) => { - if (!filename) { - if (recursiveWatcherLogging) { - process.stderr.write( - `[watchpack] dispatch ${type} event in recursive watcher (${ - this.rootPath - }) to all watchers\n` - ); - } - for (const w of this.mapWatcherToPath.keys()) { - w.emit("change", type); - } - } else { - const dir = path.dirname(filename); - const watchers = this.mapPathToWatchers.get(dir); - if (recursiveWatcherLogging) { - process.stderr.write( - `[watchpack] dispatch ${type} event in recursive watcher (${ - this.rootPath - }) for '${filename}' to ${ - watchers ? watchers.size : 0 - } watchers\n` - ); - } - if (watchers === undefined) return; - for (const w of watchers) { - w.emit("change", type, path.basename(filename)); - } - } - }); - watcher.on("error", error => { - for (const w of this.mapWatcherToPath.keys()) { - w.emit("error", error); - } - }); - } catch (err) { - process.nextTick(() => { - for (const w of this.mapWatcherToPath.keys()) { - w.emit("error", err); - } - }); - } - watcherCount++; - if (recursiveWatcherLogging) { - process.stderr.write( - `[watchpack] created recursive watcher at ${rootPath}\n` - ); - } - } +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ - add(filePath, watcher) { - underlyingWatcher.set(watcher, this); - const subpath = filePath.slice(this.rootPath.length + 1) || "."; - this.mapWatcherToPath.set(watcher, subpath); - const set = this.mapPathToWatchers.get(subpath); - if (set === undefined) { - const newSet = new Set(); - newSet.add(watcher); - this.mapPathToWatchers.set(subpath, newSet); - } else { - set.add(watcher); - } - } - remove(watcher) { - const subpath = this.mapWatcherToPath.get(watcher); - if (!subpath) return; - this.mapWatcherToPath.delete(watcher); - const set = this.mapPathToWatchers.get(subpath); - set.delete(watcher); - if (set.size === 0) { - this.mapPathToWatchers.delete(subpath); - } - if (this.mapWatcherToPath.size === 0) { - recursiveWatchers.delete(this.rootPath); - watcherCount--; - if (this.watcher) this.watcher.close(); - if (recursiveWatcherLogging) { - process.stderr.write( - `[watchpack] closed recursive watcher at ${this.rootPath}\n` - ); - } - } - } +const Hook = __webpack_require__(36591); +const HookCodeFactory = __webpack_require__(85572); - getWatchers() { - return this.mapWatcherToPath; +class SyncHookCodeFactory extends HookCodeFactory { + content({ onError, onDone, rethrowIfPossible }) { + return this.callTapsSeries({ + onError: (i, err) => onError(err), + onDone, + rethrowIfPossible + }); } } -class Watcher extends EventEmitter { - close() { - if (pendingWatchers.has(this)) { - pendingWatchers.delete(this); - return; - } - const watcher = underlyingWatcher.get(this); - watcher.remove(this); - underlyingWatcher.delete(this); - } -} +const factory = new SyncHookCodeFactory(); -const createDirectWatcher = filePath => { - const existing = directWatchers.get(filePath); - if (existing !== undefined) return existing; - const w = new DirectWatcher(filePath); - directWatchers.set(filePath, w); - return w; +const TAP_ASYNC = () => { + throw new Error("tapAsync is not supported on a SyncHook"); }; -const createRecursiveWatcher = rootPath => { - const existing = recursiveWatchers.get(rootPath); - if (existing !== undefined) return existing; - const w = new RecursiveWatcher(rootPath); - recursiveWatchers.set(rootPath, w); - return w; +const TAP_PROMISE = () => { + throw new Error("tapPromise is not supported on a SyncHook"); }; -const execute = () => { - /** @type {Map} */ - const map = new Map(); - const addWatcher = (watcher, filePath) => { - const entry = map.get(filePath); - if (entry === undefined) { - map.set(filePath, watcher); - } else if (Array.isArray(entry)) { - entry.push(watcher); - } else { - map.set(filePath, [entry, watcher]); - } - }; - for (const [watcher, filePath] of pendingWatchers) { - addWatcher(watcher, filePath); - } - pendingWatchers.clear(); +const COMPILE = function(options) { + factory.setup(this, options); + return factory.create(options); +}; - // Fast case when we are not reaching the limit - if (!SUPPORTS_RECURSIVE_WATCHING || watcherLimit - watcherCount >= map.size) { - // Create watchers for all entries in the map - for (const [filePath, entry] of map) { - const w = createDirectWatcher(filePath); - if (Array.isArray(entry)) { - for (const item of entry) w.add(item); - } else { - w.add(entry); - } - } - return; - } +function SyncHook(args = [], name = undefined) { + const hook = new Hook(args, name); + hook.constructor = SyncHook; + hook.tapAsync = TAP_ASYNC; + hook.tapPromise = TAP_PROMISE; + hook.compile = COMPILE; + return hook; +} - // Reconsider existing watchers to improving watch plan - for (const watcher of recursiveWatchers.values()) { - for (const [w, subpath] of watcher.getWatchers()) { - addWatcher(w, path.join(watcher.rootPath, subpath)); - } - } - for (const watcher of directWatchers.values()) { - for (const w of watcher.getWatchers()) { - addWatcher(w, watcher.filePath); - } - } +SyncHook.prototype = null; - // Merge map entries to keep watcher limit - // Create a 10% buffer to be able to enter fast case more often - const plan = reducePlan(map, watcherLimit * 0.9); +module.exports = SyncHook; - // Update watchers for all entries in the map - for (const [filePath, entry] of plan) { - if (entry.size === 1) { - for (const [watcher, filePath] of entry) { - const w = createDirectWatcher(filePath); - const old = underlyingWatcher.get(watcher); - if (old === w) continue; - w.add(watcher); - if (old !== undefined) old.remove(watcher); - } - } else { - const filePaths = new Set(entry.values()); - if (filePaths.size > 1) { - const w = createRecursiveWatcher(filePath); - for (const [watcher, watcherPath] of entry) { - const old = underlyingWatcher.get(watcher); - if (old === w) continue; - w.add(watcherPath, watcher); - if (old !== undefined) old.remove(watcher); - } - } else { - for (const filePath of filePaths) { - const w = createDirectWatcher(filePath); - for (const watcher of entry.keys()) { - const old = underlyingWatcher.get(watcher); - if (old === w) continue; - w.add(watcher); - if (old !== undefined) old.remove(watcher); - } - } - } - } - } -}; -exports.watch = filePath => { - const watcher = new Watcher(); - // Find an existing watcher - const directWatcher = directWatchers.get(filePath); - if (directWatcher !== undefined) { - directWatcher.add(watcher); - return watcher; - } - let current = filePath; - for (;;) { - const recursiveWatcher = recursiveWatchers.get(current); - if (recursiveWatcher !== undefined) { - recursiveWatcher.add(filePath, watcher); - return watcher; - } - const parent = path.dirname(current); - if (parent === current) break; - current = parent; +/***/ }), + +/***/ 66953: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Hook = __webpack_require__(36591); +const HookCodeFactory = __webpack_require__(85572); + +class SyncLoopHookCodeFactory extends HookCodeFactory { + content({ onError, onDone, rethrowIfPossible }) { + return this.callTapsLooping({ + onError: (i, err) => onError(err), + onDone, + rethrowIfPossible + }); } - // Queue up watcher for creation - pendingWatchers.set(watcher, filePath); - if (!isBatch) execute(); - return watcher; +} + +const factory = new SyncLoopHookCodeFactory(); + +const TAP_ASYNC = () => { + throw new Error("tapAsync is not supported on a SyncLoopHook"); }; -exports.batch = fn => { - isBatch = true; - try { - fn(); - } finally { - isBatch = false; - execute(); - } +const TAP_PROMISE = () => { + throw new Error("tapPromise is not supported on a SyncLoopHook"); }; -exports.getNumberOfWatchers = () => { - return watcherCount; +const COMPILE = function(options) { + factory.setup(this, options); + return factory.create(options); }; +function SyncLoopHook(args = [], name = undefined) { + const hook = new Hook(args, name); + hook.constructor = SyncLoopHook; + hook.tapAsync = TAP_ASYNC; + hook.tapPromise = TAP_PROMISE; + hook.compile = COMPILE; + return hook; +} + +SyncLoopHook.prototype = null; + +module.exports = SyncLoopHook; + /***/ }), -/***/ 98342: +/***/ 92878: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; @@ -143818,348 +144412,84 @@ exports.getNumberOfWatchers = () => { */ -const getWatcherManager = __webpack_require__(29539); -const LinkResolver = __webpack_require__(56083); -const EventEmitter = __webpack_require__(28614).EventEmitter; -const globToRegExp = __webpack_require__(22797); -const watchEventSource = __webpack_require__(10547); - -let EXISTANCE_ONLY_TIME_ENTRY; // lazy required - -const EMPTY_ARRAY = []; -const EMPTY_OPTIONS = {}; +const Hook = __webpack_require__(36591); +const HookCodeFactory = __webpack_require__(85572); -function addWatchersToSet(watchers, set) { - for (const w of watchers) { - if (w !== true && !set.has(w.directoryWatcher)) { - set.add(w.directoryWatcher); - addWatchersToSet(w.directoryWatcher.directories.values(), set); - } +class SyncWaterfallHookCodeFactory extends HookCodeFactory { + content({ onError, onResult, resultReturns, rethrowIfPossible }) { + return this.callTapsSeries({ + onError: (i, err) => onError(err), + onResult: (i, result, next) => { + let code = ""; + code += `if(${result} !== undefined) {\n`; + code += `${this._args[0]} = ${result};\n`; + code += `}\n`; + code += next(); + return code; + }, + onDone: () => onResult(this._args[0]), + doneReturns: resultReturns, + rethrowIfPossible + }); } } -const stringToRegexp = ignored => { - const source = globToRegExp(ignored, { globstar: true, extended: true }) - .source; - const matchingStart = source.slice(0, source.length - 1) + "(?:$|\\/)"; - return matchingStart; -}; +const factory = new SyncWaterfallHookCodeFactory(); -const ignoredToRegexp = ignored => { - if (Array.isArray(ignored)) { - return new RegExp(ignored.map(i => stringToRegexp(i)).join("|")); - } else if (typeof ignored === "string") { - return new RegExp(stringToRegexp(ignored)); - } else if (ignored instanceof RegExp) { - return ignored; - } else if (ignored) { - throw new Error(`Invalid option for 'ignored': ${ignored}`); - } else { - return undefined; - } +const TAP_ASYNC = () => { + throw new Error("tapAsync is not supported on a SyncWaterfallHook"); }; -const normalizeOptions = options => { - return { - followSymlinks: !!options.followSymlinks, - ignored: ignoredToRegexp(options.ignored), - poll: options.poll - }; +const TAP_PROMISE = () => { + throw new Error("tapPromise is not supported on a SyncWaterfallHook"); }; -const normalizeCache = new WeakMap(); -const cachedNormalizeOptions = options => { - const cacheEntry = normalizeCache.get(options); - if (cacheEntry !== undefined) return cacheEntry; - const normalized = normalizeOptions(options); - normalizeCache.set(options, normalized); - return normalized; +const COMPILE = function(options) { + factory.setup(this, options); + return factory.create(options); }; -class Watchpack extends EventEmitter { - constructor(options) { - super(); - if (!options) options = EMPTY_OPTIONS; - this.options = options; - this.aggregateTimeout = - typeof options.aggregateTimeout === "number" - ? options.aggregateTimeout - : 200; - this.watcherOptions = cachedNormalizeOptions(options); - this.watcherManager = getWatcherManager(this.watcherOptions); - this.fileWatchers = new Map(); - this.directoryWatchers = new Map(); - this.startTime = undefined; - this.paused = false; - this.aggregatedChanges = new Set(); - this.aggregatedRemovals = new Set(); - this.aggregateTimer = undefined; - this._onTimeout = this._onTimeout.bind(this); - } - - watch(arg1, arg2, arg3) { - let files, directories, missing, startTime; - if (!arg2) { - ({ - files = EMPTY_ARRAY, - directories = EMPTY_ARRAY, - missing = EMPTY_ARRAY, - startTime - } = arg1); - } else { - files = arg1; - directories = arg2; - missing = EMPTY_ARRAY; - startTime = arg3; - } - this.paused = false; - const oldFileWatchers = this.fileWatchers; - const oldDirectoryWatchers = this.directoryWatchers; - const ignored = this.watcherOptions.ignored; - const filter = ignored - ? path => !ignored.test(path.replace(/\\/g, "/")) - : () => true; - const addToMap = (map, key, item) => { - const list = map.get(key); - if (list === undefined) { - map.set(key, [item]); - } else { - list.push(item); - } - }; - const fileWatchersNeeded = new Map(); - const directoryWatchersNeeded = new Map(); - const missingFiles = new Set(); - if (this.watcherOptions.followSymlinks) { - const resolver = new LinkResolver(); - for (const file of files) { - if (filter(file)) { - for (const innerFile of resolver.resolve(file)) { - if (file === innerFile || filter(innerFile)) { - addToMap(fileWatchersNeeded, innerFile, file); - } - } - } - } - for (const file of missing) { - if (filter(file)) { - for (const innerFile of resolver.resolve(file)) { - if (file === innerFile || filter(innerFile)) { - missingFiles.add(file); - addToMap(fileWatchersNeeded, innerFile, file); - } - } - } - } - for (const dir of directories) { - if (filter(dir)) { - let first = true; - for (const innerItem of resolver.resolve(dir)) { - if (filter(innerItem)) { - addToMap( - first ? directoryWatchersNeeded : fileWatchersNeeded, - innerItem, - dir - ); - } - first = false; - } - } - } - } else { - for (const file of files) { - if (filter(file)) { - addToMap(fileWatchersNeeded, file, file); - } - } - for (const file of missing) { - if (filter(file)) { - missingFiles.add(file); - addToMap(fileWatchersNeeded, file, file); - } - } - for (const dir of directories) { - if (filter(dir)) { - addToMap(directoryWatchersNeeded, dir, dir); - } - } - } - const newFileWatchers = new Map(); - const newDirectoryWatchers = new Map(); - const setupFileWatcher = (watcher, key, files) => { - watcher.on("initial-missing", type => { - for (const file of files) { - if (!missingFiles.has(file)) this._onRemove(file, file, type); - } - }); - watcher.on("change", (mtime, type) => { - for (const file of files) { - this._onChange(file, mtime, file, type); - } - }); - watcher.on("remove", type => { - for (const file of files) { - this._onRemove(file, file, type); - } - }); - newFileWatchers.set(key, watcher); - }; - const setupDirectoryWatcher = (watcher, key, directories) => { - watcher.on("initial-missing", type => { - for (const item of directories) { - this._onRemove(item, item, type); - } - }); - watcher.on("change", (file, mtime, type) => { - for (const item of directories) { - this._onChange(item, mtime, file, type); - } - }); - watcher.on("remove", type => { - for (const item of directories) { - this._onRemove(item, item, type); - } - }); - newDirectoryWatchers.set(key, watcher); - }; - // Close unneeded old watchers - const fileWatchersToClose = []; - const directoryWatchersToClose = []; - for (const [key, w] of oldFileWatchers) { - if (!fileWatchersNeeded.has(key)) { - w.close(); - } else { - fileWatchersToClose.push(w); - } - } - for (const [key, w] of oldDirectoryWatchers) { - if (!directoryWatchersNeeded.has(key)) { - w.close(); - } else { - directoryWatchersToClose.push(w); - } - } - // Create new watchers and install handlers on these watchers - watchEventSource.batch(() => { - for (const [key, files] of fileWatchersNeeded) { - const watcher = this.watcherManager.watchFile(key, startTime); - if (watcher) { - setupFileWatcher(watcher, key, files); - } - } - for (const [key, directories] of directoryWatchersNeeded) { - const watcher = this.watcherManager.watchDirectory(key, startTime); - if (watcher) { - setupDirectoryWatcher(watcher, key, directories); - } - } - }); - // Close old watchers - for (const w of fileWatchersToClose) w.close(); - for (const w of directoryWatchersToClose) w.close(); - // Store watchers - this.fileWatchers = newFileWatchers; - this.directoryWatchers = newDirectoryWatchers; - this.startTime = startTime; - } - - close() { - this.paused = true; - if (this.aggregateTimer) clearTimeout(this.aggregateTimer); - for (const w of this.fileWatchers.values()) w.close(); - for (const w of this.directoryWatchers.values()) w.close(); - this.fileWatchers.clear(); - this.directoryWatchers.clear(); - } +function SyncWaterfallHook(args = [], name = undefined) { + if (args.length < 1) + throw new Error("Waterfall hooks must have at least one argument"); + const hook = new Hook(args, name); + hook.constructor = SyncWaterfallHook; + hook.tapAsync = TAP_ASYNC; + hook.tapPromise = TAP_PROMISE; + hook.compile = COMPILE; + return hook; +} - pause() { - this.paused = true; - if (this.aggregateTimer) clearTimeout(this.aggregateTimer); - } +SyncWaterfallHook.prototype = null; - getTimes() { - const directoryWatchers = new Set(); - addWatchersToSet(this.fileWatchers.values(), directoryWatchers); - addWatchersToSet(this.directoryWatchers.values(), directoryWatchers); - const obj = Object.create(null); - for (const w of directoryWatchers) { - const times = w.getTimes(); - for (const file of Object.keys(times)) obj[file] = times[file]; - } - return obj; - } +module.exports = SyncWaterfallHook; - getTimeInfoEntries() { - if (EXISTANCE_ONLY_TIME_ENTRY === undefined) { - EXISTANCE_ONLY_TIME_ENTRY = __webpack_require__(39144).EXISTANCE_ONLY_TIME_ENTRY; - } - const directoryWatchers = new Set(); - addWatchersToSet(this.fileWatchers.values(), directoryWatchers); - addWatchersToSet(this.directoryWatchers.values(), directoryWatchers); - const map = new Map(); - for (const w of directoryWatchers) { - const times = w.getTimeInfoEntries(); - for (const [path, entry] of times) { - if (map.has(path)) { - if (entry === EXISTANCE_ONLY_TIME_ENTRY) continue; - const value = map.get(path); - if (value === entry) continue; - if (value !== EXISTANCE_ONLY_TIME_ENTRY) { - map.set(path, Object.assign({}, value, entry)); - continue; - } - } - map.set(path, entry); - } - } - return map; - } - getAggregated() { - if (this.aggregateTimer) { - clearTimeout(this.aggregateTimer); - this.aggregateTimer = undefined; - } - const changes = this.aggregatedChanges; - const removals = this.aggregatedRemovals; - this.aggregatedChanges = new Set(); - this.aggregatedRemovals = new Set(); - return { changes, removals }; - } +/***/ }), - _onChange(item, mtime, file, type) { - file = file || item; - if (!this.paused) { - this.emit("change", file, mtime, type); - if (this.aggregateTimer) clearTimeout(this.aggregateTimer); - this.aggregateTimer = setTimeout(this._onTimeout, this.aggregateTimeout); - } - this.aggregatedRemovals.delete(item); - this.aggregatedChanges.add(item); - } +/***/ 34718: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - _onRemove(item, file, type) { - file = file || item; - if (!this.paused) { - this.emit("remove", file, type); - if (this.aggregateTimer) clearTimeout(this.aggregateTimer); - this.aggregateTimer = setTimeout(this._onTimeout, this.aggregateTimeout); - } - this.aggregatedChanges.delete(item); - this.aggregatedRemovals.add(item); - } +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ - _onTimeout() { - this.aggregateTimer = undefined; - const changes = this.aggregatedChanges; - const removals = this.aggregatedRemovals; - this.aggregatedChanges = new Set(); - this.aggregatedRemovals = new Set(); - this.emit("aggregated", changes, removals); - } -} -module.exports = Watchpack; +exports.__esModule = true; +exports.SyncHook = __webpack_require__(35079); +exports.SyncBailHook = __webpack_require__(98034); +exports.SyncWaterfallHook = __webpack_require__(92878); +exports.SyncLoopHook = __webpack_require__(66953); +exports.AsyncParallelHook = __webpack_require__(82890); +exports.AsyncParallelBailHook = __webpack_require__(28339); +exports.AsyncSeriesHook = __webpack_require__(45146); +exports.AsyncSeriesBailHook = __webpack_require__(97681); +exports.AsyncSeriesLoopHook = __webpack_require__(5463); +exports.AsyncSeriesWaterfallHook = __webpack_require__(73448); +exports.HookMap = __webpack_require__(81647); +exports.MultiHook = __webpack_require__(63708); /***/ }), @@ -144172,7 +144502,7 @@ module.exports = Watchpack; * DO NOT MODIFY BY HAND. * Run `yarn special-lint-fix` to update */ -const e=/^(?:[A-Za-z]:[\\/]|\\\\|\/)/;module.exports=$e,module.exports.default=$e;const t={amd:{$ref:"#/definitions/Amd"},bail:{$ref:"#/definitions/Bail"},cache:{$ref:"#/definitions/CacheOptions"},context:{$ref:"#/definitions/Context"},dependencies:{$ref:"#/definitions/Dependencies"},devServer:{$ref:"#/definitions/DevServer"},devtool:{$ref:"#/definitions/DevTool"},entry:{$ref:"#/definitions/Entry"},experiments:{$ref:"#/definitions/Experiments"},externals:{$ref:"#/definitions/Externals"},externalsPresets:{$ref:"#/definitions/ExternalsPresets"},externalsType:{$ref:"#/definitions/ExternalsType"},ignoreWarnings:{$ref:"#/definitions/IgnoreWarnings"},infrastructureLogging:{$ref:"#/definitions/InfrastructureLogging"},loader:{$ref:"#/definitions/Loader"},mode:{$ref:"#/definitions/Mode"},module:{$ref:"#/definitions/ModuleOptions"},name:{$ref:"#/definitions/Name"},node:{$ref:"#/definitions/Node"},optimization:{$ref:"#/definitions/Optimization"},output:{$ref:"#/definitions/Output"},parallelism:{$ref:"#/definitions/Parallelism"},performance:{$ref:"#/definitions/Performance"},plugins:{$ref:"#/definitions/Plugins"},profile:{$ref:"#/definitions/Profile"},recordsInputPath:{$ref:"#/definitions/RecordsInputPath"},recordsOutputPath:{$ref:"#/definitions/RecordsOutputPath"},recordsPath:{$ref:"#/definitions/RecordsPath"},resolve:{$ref:"#/definitions/Resolve"},resolveLoader:{$ref:"#/definitions/ResolveLoader"},snapshot:{$ref:"#/definitions/SnapshotOptions"},stats:{$ref:"#/definitions/StatsValue"},target:{$ref:"#/definitions/Target"},watch:{$ref:"#/definitions/Watch"},watchOptions:{$ref:"#/definitions/WatchOptions"}},n=Object.prototype.hasOwnProperty,r={allowCollectingMemory:{type:"boolean"},buildDependencies:{type:"object",additionalProperties:{type:"array",items:{type:"string",minLength:1}}},cacheDirectory:{type:"string",absolutePath:!0},cacheLocation:{type:"string",absolutePath:!0},compression:{enum:[!1,"gzip","brotli"]},hashAlgorithm:{type:"string"},idleTimeout:{type:"number",minimum:0},idleTimeoutAfterLargeChanges:{type:"number",minimum:0},idleTimeoutForInitialStore:{type:"number",minimum:0},immutablePaths:{type:"array",items:{anyOf:[{instanceof:"RegExp"},{type:"string",absolutePath:!0,minLength:1}]}},managedPaths:{type:"array",items:{anyOf:[{instanceof:"RegExp"},{type:"string",absolutePath:!0,minLength:1}]}},maxAge:{type:"number",minimum:0},maxMemoryGenerations:{type:"number",minimum:0},memoryCacheUnaffected:{type:"boolean"},name:{type:"string"},profile:{type:"boolean"},store:{enum:["pack"]},type:{enum:["filesystem"]},version:{type:"string"}};function s(t,{instancePath:o="",parentData:a,parentDataProperty:i,rootData:l=t}={}){let p=null,f=0;const u=f;let c=!1;const m=f;if(!1!==t){const e={params:{}};null===p?p=[e]:p.push(e),f++}var y=m===f;if(c=c||y,!c){const s=f;if(f==f)if(t&&"object"==typeof t&&!Array.isArray(t)){let e;if(void 0===t.type&&(e="type")){const t={params:{missingProperty:e}};null===p?p=[t]:p.push(t),f++}else{const e=f;for(const e in t)if("cacheUnaffected"!==e&&"maxGenerations"!==e&&"type"!==e){const t={params:{additionalProperty:e}};null===p?p=[t]:p.push(t),f++;break}if(e===f){if(void 0!==t.cacheUnaffected){const e=f;if("boolean"!=typeof t.cacheUnaffected){const e={params:{type:"boolean"}};null===p?p=[e]:p.push(e),f++}var h=e===f}else h=!0;if(h){if(void 0!==t.maxGenerations){let e=t.maxGenerations;const n=f;if(f===n)if("number"==typeof e){if(e<1||isNaN(e)){const e={params:{comparison:">=",limit:1}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}h=n===f}else h=!0;if(h)if(void 0!==t.type){const e=f;if("memory"!==t.type){const e={params:{}};null===p?p=[e]:p.push(e),f++}h=e===f}else h=!0}}}}else{const e={params:{type:"object"}};null===p?p=[e]:p.push(e),f++}if(y=s===f,c=c||y,!c){const s=f;if(f==f)if(t&&"object"==typeof t&&!Array.isArray(t)){let s;if(void 0===t.type&&(s="type")){const e={params:{missingProperty:s}};null===p?p=[e]:p.push(e),f++}else{const s=f;for(const e in t)if(!n.call(r,e)){const t={params:{additionalProperty:e}};null===p?p=[t]:p.push(t),f++;break}if(s===f){if(void 0!==t.allowCollectingMemory){const e=f;if("boolean"!=typeof t.allowCollectingMemory){const e={params:{type:"boolean"}};null===p?p=[e]:p.push(e),f++}var d=e===f}else d=!0;if(d){if(void 0!==t.buildDependencies){let e=t.buildDependencies;const n=f;if(f===n)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=f;if(f===r)if(Array.isArray(n)){const e=n.length;for(let t=0;t=",limit:0}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}d=n===f}else d=!0;if(d){if(void 0!==t.idleTimeoutAfterLargeChanges){let e=t.idleTimeoutAfterLargeChanges;const n=f;if(f===n)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}d=n===f}else d=!0;if(d){if(void 0!==t.idleTimeoutForInitialStore){let e=t.idleTimeoutForInitialStore;const n=f;if(f===n)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}d=n===f}else d=!0;if(d){if(void 0!==t.immutablePaths){let n=t.immutablePaths;const r=f;if(f===r)if(Array.isArray(n)){const t=n.length;for(let r=0;r=",limit:0}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}d=n===f}else d=!0;if(d){if(void 0!==t.maxMemoryGenerations){let e=t.maxMemoryGenerations;const n=f;if(f===n)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}d=n===f}else d=!0;if(d){if(void 0!==t.memoryCacheUnaffected){const e=f;if("boolean"!=typeof t.memoryCacheUnaffected){const e={params:{type:"boolean"}};null===p?p=[e]:p.push(e),f++}d=e===f}else d=!0;if(d){if(void 0!==t.name){const e=f;if("string"!=typeof t.name){const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}d=e===f}else d=!0;if(d){if(void 0!==t.profile){const e=f;if("boolean"!=typeof t.profile){const e={params:{type:"boolean"}};null===p?p=[e]:p.push(e),f++}d=e===f}else d=!0;if(d){if(void 0!==t.store){const e=f;if("pack"!==t.store){const e={params:{}};null===p?p=[e]:p.push(e),f++}d=e===f}else d=!0;if(d){if(void 0!==t.type){const e=f;if("filesystem"!==t.type){const e={params:{}};null===p?p=[e]:p.push(e),f++}d=e===f}else d=!0;if(d)if(void 0!==t.version){const e=f;if("string"!=typeof t.version){const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}d=e===f}else d=!0}}}}}}}}}}}}}}}}}}}}else{const e={params:{type:"object"}};null===p?p=[e]:p.push(e),f++}y=s===f,c=c||y}}if(!c){const e={params:{}};return null===p?p=[e]:p.push(e),f++,s.errors=p,!1}return f=u,null!==p&&(u?p.length=u:p=null),s.errors=p,0===f}function o(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:a=e}={}){let i=null,l=0;const p=l;let f=!1;const u=l;if(!0!==e){const e={params:{}};null===i?i=[e]:i.push(e),l++}var c=u===l;if(f=f||c,!f){const o=l;s(e,{instancePath:t,parentData:n,parentDataProperty:r,rootData:a})||(i=null===i?s.errors:i.concat(s.errors),l=i.length),c=o===l,f=f||c}if(!f){const e={params:{}};return null===i?i=[e]:i.push(e),l++,o.errors=i,!1}return l=p,null!==i&&(p?i.length=p:i=null),o.errors=i,0===l}const a={asyncChunks:{type:"boolean"},chunkLoading:{$ref:"#/definitions/ChunkLoading"},dependOn:{anyOf:[{type:"array",items:{type:"string",minLength:1},minItems:1,uniqueItems:!0},{type:"string",minLength:1}]},filename:{$ref:"#/definitions/EntryFilename"},import:{$ref:"#/definitions/EntryItem"},layer:{$ref:"#/definitions/Layer"},library:{$ref:"#/definitions/LibraryOptions"},publicPath:{$ref:"#/definitions/PublicPath"},runtime:{$ref:"#/definitions/EntryRuntime"},wasmLoading:{$ref:"#/definitions/WasmLoading"}};function i(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const l=a;let p=!1;const f=a;if(!1!==e){const e={params:{}};null===o?o=[e]:o.push(e),a++}var u=f===a;if(p=p||u,!p){const t=a,n=a;let r=!1;const s=a;if("jsonp"!==e&&"import-scripts"!==e&&"require"!==e&&"async-node"!==e&&"import"!==e){const e={params:{}};null===o?o=[e]:o.push(e),a++}var c=s===a;if(r=r||c,!r){const t=a;if("string"!=typeof e){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}c=t===a,r=r||c}if(r)a=n,null!==o&&(n?o.length=n:o=null);else{const e={params:{}};null===o?o=[e]:o.push(e),a++}u=t===a,p=p||u}if(!p){const e={params:{}};return null===o?o=[e]:o.push(e),a++,i.errors=o,!1}return a=l,null!==o&&(l?o.length=l:o=null),i.errors=o,0===a}function l(t,{instancePath:n="",parentData:r,parentDataProperty:s,rootData:o=t}={}){let a=null,i=0;const p=i;let f=!1,u=null;const c=i,m=i;let y=!1;const h=i;if(i===h)if("string"==typeof t){if(t.includes("!")||!1!==e.test(t)){const e={params:{}};null===a?a=[e]:a.push(e),i++}else if(t.length<1){const e={params:{}};null===a?a=[e]:a.push(e),i++}}else{const e={params:{type:"string"}};null===a?a=[e]:a.push(e),i++}var d=h===i;if(y=y||d,!y){const e=i;if(!(t instanceof Function)){const e={params:{}};null===a?a=[e]:a.push(e),i++}d=e===i,y=y||d}if(y)i=m,null!==a&&(m?a.length=m:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),i++}if(c===i&&(f=!0,u=0),!f){const e={params:{passingSchemas:u}};return null===a?a=[e]:a.push(e),i++,l.errors=a,!1}return i=p,null!==a&&(p?a.length=p:a=null),l.errors=a,0===i}function p(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1;const f=a;if("string"!=typeof e){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}var u=f===a;if(l=l||u,!l){const t=a;if(a==a)if(e&&"object"==typeof e&&!Array.isArray(e)){const t=a;for(const t in e)if("amd"!==t&&"commonjs"!==t&&"commonjs2"!==t&&"root"!==t){const e={params:{additionalProperty:t}};null===o?o=[e]:o.push(e),a++;break}if(t===a){if(void 0!==e.amd){const t=a;if("string"!=typeof e.amd){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}var c=t===a}else c=!0;if(c){if(void 0!==e.commonjs){const t=a;if("string"!=typeof e.commonjs){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}c=t===a}else c=!0;if(c){if(void 0!==e.commonjs2){const t=a;if("string"!=typeof e.commonjs2){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}c=t===a}else c=!0;if(c)if(void 0!==e.root){const t=a;if("string"!=typeof e.root){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}c=t===a}else c=!0}}}}else{const e={params:{type:"object"}};null===o?o=[e]:o.push(e),a++}u=t===a,l=l||u}if(!l){const e={params:{}};return null===o?o=[e]:o.push(e),a++,p.errors=o,!1}return a=i,null!==o&&(i?o.length=i:o=null),p.errors=o,0===a}function f(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1;const p=a;if(a===p)if(Array.isArray(e))if(e.length<1){const e={params:{limit:1}};null===o?o=[e]:o.push(e),a++}else{const t=e.length;for(let n=0;n1){const r={};for(;n--;){let s=t[n];if("string"==typeof s){if("number"==typeof r[s]){e=r[s];const t={params:{i:n,j:e}};null===p?p=[t]:p.push(t),f++;break}r[s]=n}}}}}else{const e={params:{type:"array"}};null===p?p=[e]:p.push(e),f++}var g=o===f;if(s=s||g,!s){const e=f;if(f===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}g=e===f,s=s||g}if(!s){const e={params:{}};return null===p?p=[e]:p.push(e),f++,y.errors=p,!1}f=r,null!==p&&(r?p.length=r:p=null),h=n===f}else h=!0;if(h){if(void 0!==e.filename){const n=f;l(e.filename,{instancePath:t+"/filename",parentData:e,parentDataProperty:"filename",rootData:o})||(p=null===p?l.errors:p.concat(l.errors),f=p.length),h=n===f}else h=!0;if(h){if(void 0!==e.import){let t=e.import;const n=f,r=f;let s=!1;const o=f;if(f===o)if(Array.isArray(t))if(t.length<1){const e={params:{limit:1}};null===p?p=[e]:p.push(e),f++}else{var b=!0;const e=t.length;for(let n=0;n1){const r={};for(;n--;){let s=t[n];if("string"==typeof s){if("number"==typeof r[s]){e=r[s];const t={params:{i:n,j:e}};null===p?p=[t]:p.push(t),f++;break}r[s]=n}}}}}else{const e={params:{type:"array"}};null===p?p=[e]:p.push(e),f++}var v=o===f;if(s=s||v,!s){const e=f;if(f===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}v=e===f,s=s||v}if(!s){const e={params:{}};return null===p?p=[e]:p.push(e),f++,y.errors=p,!1}f=r,null!==p&&(r?p.length=r:p=null),h=n===f}else h=!0;if(h){if(void 0!==e.layer){let t=e.layer;const n=f,r=f;let s=!1;const o=f;if(null!==t){const e={params:{}};null===p?p=[e]:p.push(e),f++}var D=o===f;if(s=s||D,!s){const e=f;if(f===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}D=e===f,s=s||D}if(!s){const e={params:{}};return null===p?p=[e]:p.push(e),f++,y.errors=p,!1}f=r,null!==p&&(r?p.length=r:p=null),h=n===f}else h=!0;if(h){if(void 0!==e.library){const n=f;u(e.library,{instancePath:t+"/library",parentData:e,parentDataProperty:"library",rootData:o})||(p=null===p?u.errors:p.concat(u.errors),f=p.length),h=n===f}else h=!0;if(h){if(void 0!==e.publicPath){const n=f;c(e.publicPath,{instancePath:t+"/publicPath",parentData:e,parentDataProperty:"publicPath",rootData:o})||(p=null===p?c.errors:p.concat(c.errors),f=p.length),h=n===f}else h=!0;if(h){if(void 0!==e.runtime){let t=e.runtime;const n=f,r=f;let s=!1;const o=f;if(!1!==t){const e={params:{}};null===p?p=[e]:p.push(e),f++}var P=o===f;if(s=s||P,!s){const e=f;if(f===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}P=e===f,s=s||P}if(!s){const e={params:{}};return null===p?p=[e]:p.push(e),f++,y.errors=p,!1}f=r,null!==p&&(r?p.length=r:p=null),h=n===f}else h=!0;if(h)if(void 0!==e.wasmLoading){const n=f;m(e.wasmLoading,{instancePath:t+"/wasmLoading",parentData:e,parentDataProperty:"wasmLoading",rootData:o})||(p=null===p?m.errors:p.concat(m.errors),f=p.length),h=n===f}else h=!0}}}}}}}}}}}}return y.errors=p,0===f}function h(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;if(0===a){if(!e||"object"!=typeof e||Array.isArray(e))return h.errors=[{params:{type:"object"}}],!1;for(const n in e){let r=e[n];const f=a,u=a;let c=!1;const m=a,d=a;let g=!1;const b=a;if(a===b)if(Array.isArray(r))if(r.length<1){const e={params:{limit:1}};null===o?o=[e]:o.push(e),a++}else{var i=!0;const e=r.length;for(let t=0;t1){const n={};for(;t--;){let s=r[t];if("string"==typeof s){if("number"==typeof n[s]){e=n[s];const r={params:{i:t,j:e}};null===o?o=[r]:o.push(r),a++;break}n[s]=t}}}}}else{const e={params:{type:"array"}};null===o?o=[e]:o.push(e),a++}var l=b===a;if(g=g||l,!g){const e=a;if(a===e)if("string"==typeof r){if(r.length<1){const e={params:{}};null===o?o=[e]:o.push(e),a++}}else{const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}l=e===a,g=g||l}if(g)a=d,null!==o&&(d?o.length=d:o=null);else{const e={params:{}};null===o?o=[e]:o.push(e),a++}var p=m===a;if(c=c||p,!c){const i=a;y(r,{instancePath:t+"/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:n,rootData:s})||(o=null===o?y.errors:o.concat(y.errors),a=o.length),p=i===a,c=c||p}if(!c){const e={params:{}};return null===o?o=[e]:o.push(e),a++,h.errors=o,!1}if(a=u,null!==o&&(u?o.length=u:o=null),f!==a)break}}return h.errors=o,0===a}function d(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1,p=null;const f=a,u=a;let c=!1;const m=a;if(a===m)if(Array.isArray(e))if(e.length<1){const e={params:{limit:1}};null===o?o=[e]:o.push(e),a++}else{var y=!0;const t=e.length;for(let n=0;n1){const r={};for(;n--;){let s=e[n];if("string"==typeof s){if("number"==typeof r[s]){t=r[s];const e={params:{i:n,j:t}};null===o?o=[e]:o.push(e),a++;break}r[s]=n}}}}}else{const e={params:{type:"array"}};null===o?o=[e]:o.push(e),a++}var h=m===a;if(c=c||h,!c){const t=a;if(a===t)if("string"==typeof e){if(e.length<1){const e={params:{}};null===o?o=[e]:o.push(e),a++}}else{const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}h=t===a,c=c||h}if(c)a=u,null!==o&&(u?o.length=u:o=null);else{const e={params:{}};null===o?o=[e]:o.push(e),a++}if(f===a&&(l=!0,p=0),!l){const e={params:{passingSchemas:p}};return null===o?o=[e]:o.push(e),a++,d.errors=o,!1}return a=i,null!==o&&(i?o.length=i:o=null),d.errors=o,0===a}function g(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1;const p=a;h(e,{instancePath:t,parentData:n,parentDataProperty:r,rootData:s})||(o=null===o?h.errors:o.concat(h.errors),a=o.length);var f=p===a;if(l=l||f,!l){const i=a;d(e,{instancePath:t,parentData:n,parentDataProperty:r,rootData:s})||(o=null===o?d.errors:o.concat(d.errors),a=o.length),f=i===a,l=l||f}if(!l){const e={params:{}};return null===o?o=[e]:o.push(e),a++,g.errors=o,!1}return a=i,null!==o&&(i?o.length=i:o=null),g.errors=o,0===a}function b(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1;const p=a;if(!(e instanceof Function)){const e={params:{}};null===o?o=[e]:o.push(e),a++}var f=p===a;if(l=l||f,!l){const i=a;g(e,{instancePath:t,parentData:n,parentDataProperty:r,rootData:s})||(o=null===o?g.errors:o.concat(g.errors),a=o.length),f=i===a,l=l||f}if(!l){const e={params:{}};return null===o?o=[e]:o.push(e),a++,b.errors=o,!1}return a=i,null!==o&&(i?o.length=i:o=null),b.errors=o,0===a}const v={asyncWebAssembly:{type:"boolean"},backCompat:{type:"boolean"},buildHttp:{anyOf:[{$ref:"#/definitions/HttpUriAllowedUris"},{$ref:"#/definitions/HttpUriOptions"}]},cacheUnaffected:{type:"boolean"},futureDefaults:{type:"boolean"},layers:{type:"boolean"},lazyCompilation:{anyOf:[{type:"boolean"},{$ref:"#/definitions/LazyCompilationOptions"}]},outputModule:{type:"boolean"},syncWebAssembly:{type:"boolean"},topLevelAwait:{type:"boolean"}},D=new RegExp("^https?://","u");function P(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1,p=null;const f=a;if(a==a)if(Array.isArray(e)){const t=e.length;for(let n=0;n=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var u=m===l;if(c=c||u,!c){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}u=t===l,c=c||u}if(c)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.filename){let n=t.filename;const r=l,s=l;let o=!1;const a=l;if(l===a)if("string"==typeof n){if(n.includes("!")||!1!==e.test(n)){const e={params:{}};null===i?i=[e]:i.push(e),l++}else if(n.length<1){const e={params:{}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}var c=a===l;if(o=o||c,!o){const e=l;if(!(n instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}c=e===l,o=o||c}if(!o){const e={params:{}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=s,null!==i&&(s?i.length=s:i=null),p=r===l}else p=!0;if(p){if(void 0!==t.idHint){const e=l;if("string"!=typeof t.idHint)return pe.errors=[{params:{type:"string"}}],!1;p=e===l}else p=!0;if(p){if(void 0!==t.layer){let e=t.layer;const n=l,r=l;let s=!1;const o=l;if(!(e instanceof RegExp)){const e={params:{}};null===i?i=[e]:i.push(e),l++}var m=o===l;if(s=s||m,!s){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(m=t===l,s=s||m,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}m=t===l,s=s||m}}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxAsyncRequests){let e=t.maxAsyncRequests;const n=l;if(l===n){if("number"!=typeof e)return pe.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return pe.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.maxAsyncSize){let e=t.maxAsyncSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var y=c===l;if(u=u||y,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}y=t===l,u=u||y}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxInitialRequests){let e=t.maxInitialRequests;const n=l;if(l===n){if("number"!=typeof e)return pe.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return pe.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.maxInitialSize){let e=t.maxInitialSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var h=c===l;if(u=u||h,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}h=t===l,u=u||h}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxSize){let e=t.maxSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var d=c===l;if(u=u||d,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}d=t===l,u=u||d}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.minChunks){let e=t.minChunks;const n=l;if(l===n){if("number"!=typeof e)return pe.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return pe.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.minRemainingSize){let e=t.minRemainingSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var g=c===l;if(u=u||g,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}g=t===l,u=u||g}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.minSize){let e=t.minSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var b=c===l;if(u=u||b,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}b=t===l,u=u||b}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.minSizeReduction){let e=t.minSizeReduction;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var v=c===l;if(u=u||v,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}v=t===l,u=u||v}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.name){let e=t.name;const n=l,r=l;let s=!1;const o=l;if(!1!==e){const e={params:{}};null===i?i=[e]:i.push(e),l++}var D=o===l;if(s=s||D,!s){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(D=t===l,s=s||D,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}D=t===l,s=s||D}}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.priority){const e=l;if("number"!=typeof t.priority)return pe.errors=[{params:{type:"number"}}],!1;p=e===l}else p=!0;if(p){if(void 0!==t.reuseExistingChunk){const e=l;if("boolean"!=typeof t.reuseExistingChunk)return pe.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0;if(p){if(void 0!==t.test){let e=t.test;const n=l,r=l;let s=!1;const o=l;if(!(e instanceof RegExp)){const e={params:{}};null===i?i=[e]:i.push(e),l++}var P=o===l;if(s=s||P,!s){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(P=t===l,s=s||P,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}P=t===l,s=s||P}}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.type){let e=t.type;const n=l,r=l;let s=!1;const o=l;if(!(e instanceof RegExp)){const e={params:{}};null===i?i=[e]:i.push(e),l++}var A=o===l;if(s=s||A,!s){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(A=t===l,s=s||A,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}A=t===l,s=s||A}}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p)if(void 0!==t.usedExports){const e=l;if("boolean"!=typeof t.usedExports)return pe.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0}}}}}}}}}}}}}}}}}}}}}}}return pe.errors=i,0===l}function fe(t,{instancePath:r="",parentData:s,parentDataProperty:o,rootData:a=t}={}){let i=null,l=0;if(0===l){if(!t||"object"!=typeof t||Array.isArray(t))return fe.errors=[{params:{type:"object"}}],!1;{const s=l;for(const e in t)if(!n.call(ie,e))return fe.errors=[{params:{additionalProperty:e}}],!1;if(s===l){if(void 0!==t.automaticNameDelimiter){let e=t.automaticNameDelimiter;const n=l;if(l===n){if("string"!=typeof e)return fe.errors=[{params:{type:"string"}}],!1;if(e.length<1)return fe.errors=[{params:{}}],!1}var p=n===l}else p=!0;if(p){if(void 0!==t.cacheGroups){let e=t.cacheGroups;const n=l,s=l,o=l;if(l===o)if(e&&"object"==typeof e&&!Array.isArray(e)){let t;if(void 0===e.test&&(t="test")){const e={};null===i?i=[e]:i.push(e),l++}else if(void 0!==e.test){let t=e.test;const n=l;let r=!1;const s=l;if(!(t instanceof RegExp)){const e={};null===i?i=[e]:i.push(e),l++}var f=s===l;if(r=r||f,!r){const e=l;if("string"!=typeof t){const e={};null===i?i=[e]:i.push(e),l++}if(f=e===l,r=r||f,!r){const e=l;if(!(t instanceof Function)){const e={};null===i?i=[e]:i.push(e),l++}f=e===l,r=r||f}}if(r)l=n,null!==i&&(n?i.length=n:i=null);else{const e={};null===i?i=[e]:i.push(e),l++}}}else{const e={};null===i?i=[e]:i.push(e),l++}if(o===l)return fe.errors=[{params:{}}],!1;if(l=s,null!==i&&(s?i.length=s:i=null),l===n){if(!e||"object"!=typeof e||Array.isArray(e))return fe.errors=[{params:{type:"object"}}],!1;for(const t in e){let n=e[t];const s=l,o=l;let p=!1;const f=l;if(!1!==n){const e={params:{}};null===i?i=[e]:i.push(e),l++}var u=f===l;if(p=p||u,!p){const s=l;if(!(n instanceof RegExp)){const e={params:{}};null===i?i=[e]:i.push(e),l++}if(u=s===l,p=p||u,!p){const s=l;if("string"!=typeof n){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(u=s===l,p=p||u,!p){const s=l;if(!(n instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}if(u=s===l,p=p||u,!p){const s=l;pe(n,{instancePath:r+"/cacheGroups/"+t.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:t,rootData:a})||(i=null===i?pe.errors:i.concat(pe.errors),l=i.length),u=s===l,p=p||u}}}}if(!p){const e={params:{}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}if(l=o,null!==i&&(o?i.length=o:i=null),s!==l)break}}p=n===l}else p=!0;if(p){if(void 0!==t.chunks){let e=t.chunks;const n=l,r=l;let s=!1;const o=l;if("initial"!==e&&"async"!==e&&"all"!==e){const e={params:{}};null===i?i=[e]:i.push(e),l++}var c=o===l;if(s=s||c,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}c=t===l,s=s||c}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.defaultSizeTypes){let e=t.defaultSizeTypes;const n=l;if(l===n){if(!Array.isArray(e))return fe.errors=[{params:{type:"array"}}],!1;if(e.length<1)return fe.errors=[{params:{limit:1}}],!1;{const t=e.length;for(let n=0;n=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var m=c===l;if(u=u||m,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}m=t===l,u=u||m}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.fallbackCacheGroup){let e=t.fallbackCacheGroup;const n=l;if(l===n){if(!e||"object"!=typeof e||Array.isArray(e))return fe.errors=[{params:{type:"object"}}],!1;{const t=l;for(const t in e)if("automaticNameDelimiter"!==t&&"chunks"!==t&&"maxAsyncSize"!==t&&"maxInitialSize"!==t&&"maxSize"!==t&&"minSize"!==t&&"minSizeReduction"!==t)return fe.errors=[{params:{additionalProperty:t}}],!1;if(t===l){if(void 0!==e.automaticNameDelimiter){let t=e.automaticNameDelimiter;const n=l;if(l===n){if("string"!=typeof t)return fe.errors=[{params:{type:"string"}}],!1;if(t.length<1)return fe.errors=[{params:{}}],!1}var y=n===l}else y=!0;if(y){if(void 0!==e.chunks){let t=e.chunks;const n=l,r=l;let s=!1;const o=l;if("initial"!==t&&"async"!==t&&"all"!==t){const e={params:{}};null===i?i=[e]:i.push(e),l++}var h=o===l;if(s=s||h,!s){const e=l;if(!(t instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}h=e===l,s=s||h}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),y=n===l}else y=!0;if(y){if(void 0!==e.maxAsyncSize){let t=e.maxAsyncSize;const n=l,r=l;let s=!1,o=null;const a=l,p=l;let f=!1;const u=l;if(l===u)if("number"==typeof t){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var d=u===l;if(f=f||d,!f){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){const n=l;if("number"!=typeof t[e]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}d=e===l,f=f||d}if(f)l=p,null!==i&&(p?i.length=p:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),y=n===l}else y=!0;if(y){if(void 0!==e.maxInitialSize){let t=e.maxInitialSize;const n=l,r=l;let s=!1,o=null;const a=l,p=l;let f=!1;const u=l;if(l===u)if("number"==typeof t){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var g=u===l;if(f=f||g,!f){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){const n=l;if("number"!=typeof t[e]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}g=e===l,f=f||g}if(f)l=p,null!==i&&(p?i.length=p:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),y=n===l}else y=!0;if(y){if(void 0!==e.maxSize){let t=e.maxSize;const n=l,r=l;let s=!1,o=null;const a=l,p=l;let f=!1;const u=l;if(l===u)if("number"==typeof t){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var b=u===l;if(f=f||b,!f){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){const n=l;if("number"!=typeof t[e]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}b=e===l,f=f||b}if(f)l=p,null!==i&&(p?i.length=p:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),y=n===l}else y=!0;if(y){if(void 0!==e.minSize){let t=e.minSize;const n=l,r=l;let s=!1,o=null;const a=l,p=l;let f=!1;const u=l;if(l===u)if("number"==typeof t){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var v=u===l;if(f=f||v,!f){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){const n=l;if("number"!=typeof t[e]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}v=e===l,f=f||v}if(f)l=p,null!==i&&(p?i.length=p:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),y=n===l}else y=!0;if(y)if(void 0!==e.minSizeReduction){let t=e.minSizeReduction;const n=l,r=l;let s=!1,o=null;const a=l,p=l;let f=!1;const u=l;if(l===u)if("number"==typeof t){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var D=u===l;if(f=f||D,!f){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){const n=l;if("number"!=typeof t[e]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}D=e===l,f=f||D}if(f)l=p,null!==i&&(p?i.length=p:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),y=n===l}else y=!0}}}}}}}}p=n===l}else p=!0;if(p){if(void 0!==t.filename){let n=t.filename;const r=l,s=l;let o=!1;const a=l;if(l===a)if("string"==typeof n){if(n.includes("!")||!1!==e.test(n)){const e={params:{}};null===i?i=[e]:i.push(e),l++}else if(n.length<1){const e={params:{}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}var P=a===l;if(o=o||P,!o){const e=l;if(!(n instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}P=e===l,o=o||P}if(!o){const e={params:{}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=s,null!==i&&(s?i.length=s:i=null),p=r===l}else p=!0;if(p){if(void 0!==t.hidePathInfo){const e=l;if("boolean"!=typeof t.hidePathInfo)return fe.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0;if(p){if(void 0!==t.maxAsyncRequests){let e=t.maxAsyncRequests;const n=l;if(l===n){if("number"!=typeof e)return fe.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return fe.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.maxAsyncSize){let e=t.maxAsyncSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var A=c===l;if(u=u||A,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}A=t===l,u=u||A}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxInitialRequests){let e=t.maxInitialRequests;const n=l;if(l===n){if("number"!=typeof e)return fe.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return fe.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.maxInitialSize){let e=t.maxInitialSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var x=c===l;if(u=u||x,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}x=t===l,u=u||x}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxSize){let e=t.maxSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var k=c===l;if(u=u||k,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}k=t===l,u=u||k}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.minChunks){let e=t.minChunks;const n=l;if(l===n){if("number"!=typeof e)return fe.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return fe.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.minRemainingSize){let e=t.minRemainingSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var j=c===l;if(u=u||j,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}j=t===l,u=u||j}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.minSize){let e=t.minSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var S=c===l;if(u=u||S,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}S=t===l,u=u||S}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.minSizeReduction){let e=t.minSizeReduction;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var C=c===l;if(u=u||C,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}C=t===l,u=u||C}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.name){let e=t.name;const n=l,r=l;let s=!1;const o=l;if(!1!==e){const e={params:{}};null===i?i=[e]:i.push(e),l++}var O=o===l;if(s=s||O,!s){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(O=t===l,s=s||O,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}O=t===l,s=s||O}}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p)if(void 0!==t.usedExports){const e=l;if("boolean"!=typeof t.usedExports)return fe.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0}}}}}}}}}}}}}}}}}}}}return fe.errors=i,0===l}function ue(e,{instancePath:t="",parentData:r,parentDataProperty:s,rootData:o=e}={}){let a=null,i=0;if(0===i){if(!e||"object"!=typeof e||Array.isArray(e))return ue.errors=[{params:{type:"object"}}],!1;{const r=i;for(const t in e)if(!n.call(ae,t))return ue.errors=[{params:{additionalProperty:t}}],!1;if(r===i){if(void 0!==e.checkWasmTypes){const t=i;if("boolean"!=typeof e.checkWasmTypes)return ue.errors=[{params:{type:"boolean"}}],!1;var l=t===i}else l=!0;if(l){if(void 0!==e.chunkIds){let t=e.chunkIds;const n=i;if("natural"!==t&&"named"!==t&&"deterministic"!==t&&"size"!==t&&"total-size"!==t&&!1!==t)return ue.errors=[{params:{}}],!1;l=n===i}else l=!0;if(l){if(void 0!==e.concatenateModules){const t=i;if("boolean"!=typeof e.concatenateModules)return ue.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.emitOnErrors){const t=i;if("boolean"!=typeof e.emitOnErrors)return ue.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.flagIncludedChunks){const t=i;if("boolean"!=typeof e.flagIncludedChunks)return ue.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.innerGraph){const t=i;if("boolean"!=typeof e.innerGraph)return ue.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.mangleExports){let t=e.mangleExports;const n=i,r=i;let s=!1;const o=i;if("size"!==t&&"deterministic"!==t){const e={params:{}};null===a?a=[e]:a.push(e),i++}var p=o===i;if(s=s||p,!s){const e=i;if("boolean"!=typeof t){const e={params:{type:"boolean"}};null===a?a=[e]:a.push(e),i++}p=e===i,s=s||p}if(!s){const e={params:{}};return null===a?a=[e]:a.push(e),i++,ue.errors=a,!1}i=r,null!==a&&(r?a.length=r:a=null),l=n===i}else l=!0;if(l){if(void 0!==e.mangleWasmImports){const t=i;if("boolean"!=typeof e.mangleWasmImports)return ue.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.mergeDuplicateChunks){const t=i;if("boolean"!=typeof e.mergeDuplicateChunks)return ue.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.minimize){const t=i;if("boolean"!=typeof e.minimize)return ue.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.minimizer){let t=e.minimizer;const n=i;if(i===n){if(!Array.isArray(t))return ue.errors=[{params:{type:"array"}}],!1;{const e=t.length;for(let n=0;n=",limit:1}}],!1}y=n===f}else y=!0;if(y){if(void 0!==t.hashFunction){let e=t.hashFunction;const n=f,r=f;let s=!1;const o=f;if(f===o)if("string"==typeof e){if(e.length<1){const e={params:{}};null===l?l=[e]:l.push(e),f++}}else{const e={params:{type:"string"}};null===l?l=[e]:l.push(e),f++}var v=o===f;if(s=s||v,!s){const t=f;if(!(e instanceof Function)){const e={params:{}};null===l?l=[e]:l.push(e),f++}v=t===f,s=s||v}if(!s){const e={params:{}};return null===l?l=[e]:l.push(e),f++,De.errors=l,!1}f=r,null!==l&&(r?l.length=r:l=null),y=n===f}else y=!0;if(y){if(void 0!==t.hashSalt){let e=t.hashSalt;const n=f;if(f==f){if("string"!=typeof e)return De.errors=[{params:{type:"string"}}],!1;if(e.length<1)return De.errors=[{params:{}}],!1}y=n===f}else y=!0;if(y){if(void 0!==t.hotUpdateChunkFilename){let n=t.hotUpdateChunkFilename;const r=f;if(f==f){if("string"!=typeof n)return De.errors=[{params:{type:"string"}}],!1;if(n.includes("!")||!1!==e.test(n))return De.errors=[{params:{}}],!1}y=r===f}else y=!0;if(y){if(void 0!==t.hotUpdateGlobal){const e=f;if("string"!=typeof t.hotUpdateGlobal)return De.errors=[{params:{type:"string"}}],!1;y=e===f}else y=!0;if(y){if(void 0!==t.hotUpdateMainFilename){let n=t.hotUpdateMainFilename;const r=f;if(f==f){if("string"!=typeof n)return De.errors=[{params:{type:"string"}}],!1;if(n.includes("!")||!1!==e.test(n))return De.errors=[{params:{}}],!1}y=r===f}else y=!0;if(y){if(void 0!==t.iife){const e=f;if("boolean"!=typeof t.iife)return De.errors=[{params:{type:"boolean"}}],!1;y=e===f}else y=!0;if(y){if(void 0!==t.importFunctionName){const e=f;if("string"!=typeof t.importFunctionName)return De.errors=[{params:{type:"string"}}],!1;y=e===f}else y=!0;if(y){if(void 0!==t.importMetaName){const e=f;if("string"!=typeof t.importMetaName)return De.errors=[{params:{type:"string"}}],!1;y=e===f}else y=!0;if(y){if(void 0!==t.library){const e=f;ve(t.library,{instancePath:r+"/library",parentData:t,parentDataProperty:"library",rootData:a})||(l=null===l?ve.errors:l.concat(ve.errors),f=l.length),y=e===f}else y=!0;if(y){if(void 0!==t.libraryExport){let e=t.libraryExport;const n=f,r=f;let s=!1,o=null;const a=f,i=f;let p=!1;const u=f;if(f===u)if(Array.isArray(e)){const t=e.length;for(let n=0;n=",limit:1}}],!1}c=t===f}else c=!0;if(c){if(void 0!==r.performance){const e=f;Pe(r.performance,{instancePath:s+"/performance",parentData:r,parentDataProperty:"performance",rootData:l})||(p=null===p?Pe.errors:p.concat(Pe.errors),f=p.length),c=e===f}else c=!0;if(c){if(void 0!==r.plugins){const e=f;Ae(r.plugins,{instancePath:s+"/plugins",parentData:r,parentDataProperty:"plugins",rootData:l})||(p=null===p?Ae.errors:p.concat(Ae.errors),f=p.length),c=e===f}else c=!0;if(c){if(void 0!==r.profile){const e=f;if("boolean"!=typeof r.profile)return $e.errors=[{params:{type:"boolean"}}],!1;c=e===f}else c=!0;if(c){if(void 0!==r.recordsInputPath){let t=r.recordsInputPath;const n=f,s=f;let o=!1;const a=f;if(!1!==t){const e={params:{}};null===p?p=[e]:p.push(e),f++}var g=a===f;if(o=o||g,!o){const n=f;if(f===n)if("string"==typeof t){if(t.includes("!")||!0!==e.test(t)){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}g=n===f,o=o||g}if(!o){const e={params:{}};return null===p?p=[e]:p.push(e),f++,$e.errors=p,!1}f=s,null!==p&&(s?p.length=s:p=null),c=n===f}else c=!0;if(c){if(void 0!==r.recordsOutputPath){let t=r.recordsOutputPath;const n=f,s=f;let o=!1;const a=f;if(!1!==t){const e={params:{}};null===p?p=[e]:p.push(e),f++}var v=a===f;if(o=o||v,!o){const n=f;if(f===n)if("string"==typeof t){if(t.includes("!")||!0!==e.test(t)){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}v=n===f,o=o||v}if(!o){const e={params:{}};return null===p?p=[e]:p.push(e),f++,$e.errors=p,!1}f=s,null!==p&&(s?p.length=s:p=null),c=n===f}else c=!0;if(c){if(void 0!==r.recordsPath){let t=r.recordsPath;const n=f,s=f;let o=!1;const a=f;if(!1!==t){const e={params:{}};null===p?p=[e]:p.push(e),f++}var D=a===f;if(o=o||D,!o){const n=f;if(f===n)if("string"==typeof t){if(t.includes("!")||!0!==e.test(t)){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}D=n===f,o=o||D}if(!o){const e={params:{}};return null===p?p=[e]:p.push(e),f++,$e.errors=p,!1}f=s,null!==p&&(s?p.length=s:p=null),c=n===f}else c=!0;if(c){if(void 0!==r.resolve){const e=f;xe(r.resolve,{instancePath:s+"/resolve",parentData:r,parentDataProperty:"resolve",rootData:l})||(p=null===p?xe.errors:p.concat(xe.errors),f=p.length),c=e===f}else c=!0;if(c){if(void 0!==r.resolveLoader){const e=f;ke(r.resolveLoader,{instancePath:s+"/resolveLoader",parentData:r,parentDataProperty:"resolveLoader",rootData:l})||(p=null===p?ke.errors:p.concat(ke.errors),f=p.length),c=e===f}else c=!0;if(c){if(void 0!==r.snapshot){let t=r.snapshot;const n=f;if(f==f){if(!t||"object"!=typeof t||Array.isArray(t))return $e.errors=[{params:{type:"object"}}],!1;{const n=f;for(const e in t)if("buildDependencies"!==e&&"immutablePaths"!==e&&"managedPaths"!==e&&"module"!==e&&"resolve"!==e&&"resolveBuildDependencies"!==e)return $e.errors=[{params:{additionalProperty:e}}],!1;if(n===f){if(void 0!==t.buildDependencies){let e=t.buildDependencies;const n=f;if(f===n){if(!e||"object"!=typeof e||Array.isArray(e))return $e.errors=[{params:{type:"object"}}],!1;{const t=f;for(const t in e)if("hash"!==t&&"timestamp"!==t)return $e.errors=[{params:{additionalProperty:t}}],!1;if(t===f){if(void 0!==e.hash){const t=f;if("boolean"!=typeof e.hash)return $e.errors=[{params:{type:"boolean"}}],!1;var P=t===f}else P=!0;if(P)if(void 0!==e.timestamp){const t=f;if("boolean"!=typeof e.timestamp)return $e.errors=[{params:{type:"boolean"}}],!1;P=t===f}else P=!0}}}var A=n===f}else A=!0;if(A){if(void 0!==t.immutablePaths){let n=t.immutablePaths;const r=f;if(f===r){if(!Array.isArray(n))return $e.errors=[{params:{type:"array"}}],!1;{const t=n.length;for(let r=0;r=",limit:1}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}h=n===f}else h=!0;if(h)if(void 0!==t.type){const e=f;if("memory"!==t.type){const e={params:{}};null===p?p=[e]:p.push(e),f++}h=e===f}else h=!0}}}}else{const e={params:{type:"object"}};null===p?p=[e]:p.push(e),f++}if(y=s===f,c=c||y,!c){const s=f;if(f==f)if(t&&"object"==typeof t&&!Array.isArray(t)){let s;if(void 0===t.type&&(s="type")){const e={params:{missingProperty:s}};null===p?p=[e]:p.push(e),f++}else{const s=f;for(const e in t)if(!n.call(r,e)){const t={params:{additionalProperty:e}};null===p?p=[t]:p.push(t),f++;break}if(s===f){if(void 0!==t.allowCollectingMemory){const e=f;if("boolean"!=typeof t.allowCollectingMemory){const e={params:{type:"boolean"}};null===p?p=[e]:p.push(e),f++}var d=e===f}else d=!0;if(d){if(void 0!==t.buildDependencies){let e=t.buildDependencies;const n=f;if(f===n)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=f;if(f===r)if(Array.isArray(n)){const e=n.length;for(let t=0;t=",limit:0}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}d=n===f}else d=!0;if(d){if(void 0!==t.idleTimeoutAfterLargeChanges){let e=t.idleTimeoutAfterLargeChanges;const n=f;if(f===n)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}d=n===f}else d=!0;if(d){if(void 0!==t.idleTimeoutForInitialStore){let e=t.idleTimeoutForInitialStore;const n=f;if(f===n)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}d=n===f}else d=!0;if(d){if(void 0!==t.immutablePaths){let n=t.immutablePaths;const r=f;if(f===r)if(Array.isArray(n)){const t=n.length;for(let r=0;r=",limit:0}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}d=n===f}else d=!0;if(d){if(void 0!==t.maxMemoryGenerations){let e=t.maxMemoryGenerations;const n=f;if(f===n)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}d=n===f}else d=!0;if(d){if(void 0!==t.memoryCacheUnaffected){const e=f;if("boolean"!=typeof t.memoryCacheUnaffected){const e={params:{type:"boolean"}};null===p?p=[e]:p.push(e),f++}d=e===f}else d=!0;if(d){if(void 0!==t.name){const e=f;if("string"!=typeof t.name){const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}d=e===f}else d=!0;if(d){if(void 0!==t.profile){const e=f;if("boolean"!=typeof t.profile){const e={params:{type:"boolean"}};null===p?p=[e]:p.push(e),f++}d=e===f}else d=!0;if(d){if(void 0!==t.store){const e=f;if("pack"!==t.store){const e={params:{}};null===p?p=[e]:p.push(e),f++}d=e===f}else d=!0;if(d){if(void 0!==t.type){const e=f;if("filesystem"!==t.type){const e={params:{}};null===p?p=[e]:p.push(e),f++}d=e===f}else d=!0;if(d)if(void 0!==t.version){const e=f;if("string"!=typeof t.version){const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}d=e===f}else d=!0}}}}}}}}}}}}}}}}}}}}else{const e={params:{type:"object"}};null===p?p=[e]:p.push(e),f++}y=s===f,c=c||y}}if(!c){const e={params:{}};return null===p?p=[e]:p.push(e),f++,s.errors=p,!1}return f=u,null!==p&&(u?p.length=u:p=null),s.errors=p,0===f}function o(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:a=e}={}){let i=null,l=0;const p=l;let f=!1;const u=l;if(!0!==e){const e={params:{}};null===i?i=[e]:i.push(e),l++}var c=u===l;if(f=f||c,!f){const o=l;s(e,{instancePath:t,parentData:n,parentDataProperty:r,rootData:a})||(i=null===i?s.errors:i.concat(s.errors),l=i.length),c=o===l,f=f||c}if(!f){const e={params:{}};return null===i?i=[e]:i.push(e),l++,o.errors=i,!1}return l=p,null!==i&&(p?i.length=p:i=null),o.errors=i,0===l}const a={asyncChunks:{type:"boolean"},chunkLoading:{$ref:"#/definitions/ChunkLoading"},dependOn:{anyOf:[{type:"array",items:{type:"string",minLength:1},minItems:1,uniqueItems:!0},{type:"string",minLength:1}]},filename:{$ref:"#/definitions/EntryFilename"},import:{$ref:"#/definitions/EntryItem"},layer:{$ref:"#/definitions/Layer"},library:{$ref:"#/definitions/LibraryOptions"},publicPath:{$ref:"#/definitions/PublicPath"},runtime:{$ref:"#/definitions/EntryRuntime"},wasmLoading:{$ref:"#/definitions/WasmLoading"}};function i(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const l=a;let p=!1;const f=a;if(!1!==e){const e={params:{}};null===o?o=[e]:o.push(e),a++}var u=f===a;if(p=p||u,!p){const t=a,n=a;let r=!1;const s=a;if("jsonp"!==e&&"import-scripts"!==e&&"require"!==e&&"async-node"!==e&&"import"!==e){const e={params:{}};null===o?o=[e]:o.push(e),a++}var c=s===a;if(r=r||c,!r){const t=a;if("string"!=typeof e){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}c=t===a,r=r||c}if(r)a=n,null!==o&&(n?o.length=n:o=null);else{const e={params:{}};null===o?o=[e]:o.push(e),a++}u=t===a,p=p||u}if(!p){const e={params:{}};return null===o?o=[e]:o.push(e),a++,i.errors=o,!1}return a=l,null!==o&&(l?o.length=l:o=null),i.errors=o,0===a}function l(t,{instancePath:n="",parentData:r,parentDataProperty:s,rootData:o=t}={}){let a=null,i=0;const p=i;let f=!1,u=null;const c=i,m=i;let y=!1;const h=i;if(i===h)if("string"==typeof t){if(t.includes("!")||!1!==e.test(t)){const e={params:{}};null===a?a=[e]:a.push(e),i++}else if(t.length<1){const e={params:{}};null===a?a=[e]:a.push(e),i++}}else{const e={params:{type:"string"}};null===a?a=[e]:a.push(e),i++}var d=h===i;if(y=y||d,!y){const e=i;if(!(t instanceof Function)){const e={params:{}};null===a?a=[e]:a.push(e),i++}d=e===i,y=y||d}if(y)i=m,null!==a&&(m?a.length=m:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),i++}if(c===i&&(f=!0,u=0),!f){const e={params:{passingSchemas:u}};return null===a?a=[e]:a.push(e),i++,l.errors=a,!1}return i=p,null!==a&&(p?a.length=p:a=null),l.errors=a,0===i}function p(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1;const f=a;if("string"!=typeof e){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}var u=f===a;if(l=l||u,!l){const t=a;if(a==a)if(e&&"object"==typeof e&&!Array.isArray(e)){const t=a;for(const t in e)if("amd"!==t&&"commonjs"!==t&&"commonjs2"!==t&&"root"!==t){const e={params:{additionalProperty:t}};null===o?o=[e]:o.push(e),a++;break}if(t===a){if(void 0!==e.amd){const t=a;if("string"!=typeof e.amd){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}var c=t===a}else c=!0;if(c){if(void 0!==e.commonjs){const t=a;if("string"!=typeof e.commonjs){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}c=t===a}else c=!0;if(c){if(void 0!==e.commonjs2){const t=a;if("string"!=typeof e.commonjs2){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}c=t===a}else c=!0;if(c)if(void 0!==e.root){const t=a;if("string"!=typeof e.root){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}c=t===a}else c=!0}}}}else{const e={params:{type:"object"}};null===o?o=[e]:o.push(e),a++}u=t===a,l=l||u}if(!l){const e={params:{}};return null===o?o=[e]:o.push(e),a++,p.errors=o,!1}return a=i,null!==o&&(i?o.length=i:o=null),p.errors=o,0===a}function f(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1;const p=a;if(a===p)if(Array.isArray(e))if(e.length<1){const e={params:{limit:1}};null===o?o=[e]:o.push(e),a++}else{const t=e.length;for(let n=0;n1){const r={};for(;n--;){let s=t[n];if("string"==typeof s){if("number"==typeof r[s]){e=r[s];const t={params:{i:n,j:e}};null===p?p=[t]:p.push(t),f++;break}r[s]=n}}}}}else{const e={params:{type:"array"}};null===p?p=[e]:p.push(e),f++}var g=o===f;if(s=s||g,!s){const e=f;if(f===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}g=e===f,s=s||g}if(!s){const e={params:{}};return null===p?p=[e]:p.push(e),f++,y.errors=p,!1}f=r,null!==p&&(r?p.length=r:p=null),h=n===f}else h=!0;if(h){if(void 0!==e.filename){const n=f;l(e.filename,{instancePath:t+"/filename",parentData:e,parentDataProperty:"filename",rootData:o})||(p=null===p?l.errors:p.concat(l.errors),f=p.length),h=n===f}else h=!0;if(h){if(void 0!==e.import){let t=e.import;const n=f,r=f;let s=!1;const o=f;if(f===o)if(Array.isArray(t))if(t.length<1){const e={params:{limit:1}};null===p?p=[e]:p.push(e),f++}else{var b=!0;const e=t.length;for(let n=0;n1){const r={};for(;n--;){let s=t[n];if("string"==typeof s){if("number"==typeof r[s]){e=r[s];const t={params:{i:n,j:e}};null===p?p=[t]:p.push(t),f++;break}r[s]=n}}}}}else{const e={params:{type:"array"}};null===p?p=[e]:p.push(e),f++}var v=o===f;if(s=s||v,!s){const e=f;if(f===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}v=e===f,s=s||v}if(!s){const e={params:{}};return null===p?p=[e]:p.push(e),f++,y.errors=p,!1}f=r,null!==p&&(r?p.length=r:p=null),h=n===f}else h=!0;if(h){if(void 0!==e.layer){let t=e.layer;const n=f,r=f;let s=!1;const o=f;if(null!==t){const e={params:{}};null===p?p=[e]:p.push(e),f++}var D=o===f;if(s=s||D,!s){const e=f;if(f===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}D=e===f,s=s||D}if(!s){const e={params:{}};return null===p?p=[e]:p.push(e),f++,y.errors=p,!1}f=r,null!==p&&(r?p.length=r:p=null),h=n===f}else h=!0;if(h){if(void 0!==e.library){const n=f;u(e.library,{instancePath:t+"/library",parentData:e,parentDataProperty:"library",rootData:o})||(p=null===p?u.errors:p.concat(u.errors),f=p.length),h=n===f}else h=!0;if(h){if(void 0!==e.publicPath){const n=f;c(e.publicPath,{instancePath:t+"/publicPath",parentData:e,parentDataProperty:"publicPath",rootData:o})||(p=null===p?c.errors:p.concat(c.errors),f=p.length),h=n===f}else h=!0;if(h){if(void 0!==e.runtime){let t=e.runtime;const n=f,r=f;let s=!1;const o=f;if(!1!==t){const e={params:{}};null===p?p=[e]:p.push(e),f++}var P=o===f;if(s=s||P,!s){const e=f;if(f===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}P=e===f,s=s||P}if(!s){const e={params:{}};return null===p?p=[e]:p.push(e),f++,y.errors=p,!1}f=r,null!==p&&(r?p.length=r:p=null),h=n===f}else h=!0;if(h)if(void 0!==e.wasmLoading){const n=f;m(e.wasmLoading,{instancePath:t+"/wasmLoading",parentData:e,parentDataProperty:"wasmLoading",rootData:o})||(p=null===p?m.errors:p.concat(m.errors),f=p.length),h=n===f}else h=!0}}}}}}}}}}}}return y.errors=p,0===f}function h(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;if(0===a){if(!e||"object"!=typeof e||Array.isArray(e))return h.errors=[{params:{type:"object"}}],!1;for(const n in e){let r=e[n];const f=a,u=a;let c=!1;const m=a,d=a;let g=!1;const b=a;if(a===b)if(Array.isArray(r))if(r.length<1){const e={params:{limit:1}};null===o?o=[e]:o.push(e),a++}else{var i=!0;const e=r.length;for(let t=0;t1){const n={};for(;t--;){let s=r[t];if("string"==typeof s){if("number"==typeof n[s]){e=n[s];const r={params:{i:t,j:e}};null===o?o=[r]:o.push(r),a++;break}n[s]=t}}}}}else{const e={params:{type:"array"}};null===o?o=[e]:o.push(e),a++}var l=b===a;if(g=g||l,!g){const e=a;if(a===e)if("string"==typeof r){if(r.length<1){const e={params:{}};null===o?o=[e]:o.push(e),a++}}else{const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}l=e===a,g=g||l}if(g)a=d,null!==o&&(d?o.length=d:o=null);else{const e={params:{}};null===o?o=[e]:o.push(e),a++}var p=m===a;if(c=c||p,!c){const i=a;y(r,{instancePath:t+"/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:n,rootData:s})||(o=null===o?y.errors:o.concat(y.errors),a=o.length),p=i===a,c=c||p}if(!c){const e={params:{}};return null===o?o=[e]:o.push(e),a++,h.errors=o,!1}if(a=u,null!==o&&(u?o.length=u:o=null),f!==a)break}}return h.errors=o,0===a}function d(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1,p=null;const f=a,u=a;let c=!1;const m=a;if(a===m)if(Array.isArray(e))if(e.length<1){const e={params:{limit:1}};null===o?o=[e]:o.push(e),a++}else{var y=!0;const t=e.length;for(let n=0;n1){const r={};for(;n--;){let s=e[n];if("string"==typeof s){if("number"==typeof r[s]){t=r[s];const e={params:{i:n,j:t}};null===o?o=[e]:o.push(e),a++;break}r[s]=n}}}}}else{const e={params:{type:"array"}};null===o?o=[e]:o.push(e),a++}var h=m===a;if(c=c||h,!c){const t=a;if(a===t)if("string"==typeof e){if(e.length<1){const e={params:{}};null===o?o=[e]:o.push(e),a++}}else{const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}h=t===a,c=c||h}if(c)a=u,null!==o&&(u?o.length=u:o=null);else{const e={params:{}};null===o?o=[e]:o.push(e),a++}if(f===a&&(l=!0,p=0),!l){const e={params:{passingSchemas:p}};return null===o?o=[e]:o.push(e),a++,d.errors=o,!1}return a=i,null!==o&&(i?o.length=i:o=null),d.errors=o,0===a}function g(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1;const p=a;h(e,{instancePath:t,parentData:n,parentDataProperty:r,rootData:s})||(o=null===o?h.errors:o.concat(h.errors),a=o.length);var f=p===a;if(l=l||f,!l){const i=a;d(e,{instancePath:t,parentData:n,parentDataProperty:r,rootData:s})||(o=null===o?d.errors:o.concat(d.errors),a=o.length),f=i===a,l=l||f}if(!l){const e={params:{}};return null===o?o=[e]:o.push(e),a++,g.errors=o,!1}return a=i,null!==o&&(i?o.length=i:o=null),g.errors=o,0===a}function b(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1;const p=a;if(!(e instanceof Function)){const e={params:{}};null===o?o=[e]:o.push(e),a++}var f=p===a;if(l=l||f,!l){const i=a;g(e,{instancePath:t,parentData:n,parentDataProperty:r,rootData:s})||(o=null===o?g.errors:o.concat(g.errors),a=o.length),f=i===a,l=l||f}if(!l){const e={params:{}};return null===o?o=[e]:o.push(e),a++,b.errors=o,!1}return a=i,null!==o&&(i?o.length=i:o=null),b.errors=o,0===a}const v={asyncWebAssembly:{type:"boolean"},backCompat:{type:"boolean"},buildHttp:{anyOf:[{$ref:"#/definitions/HttpUriAllowedUris"},{$ref:"#/definitions/HttpUriOptions"}]},cacheUnaffected:{type:"boolean"},futureDefaults:{type:"boolean"},layers:{type:"boolean"},lazyCompilation:{anyOf:[{type:"boolean"},{$ref:"#/definitions/LazyCompilationOptions"}]},outputModule:{type:"boolean"},syncWebAssembly:{type:"boolean"},topLevelAwait:{type:"boolean"}},D=new RegExp("^https?://","u");function P(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1,p=null;const f=a;if(a==a)if(Array.isArray(e)){const t=e.length;for(let n=0;n=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var u=m===l;if(c=c||u,!c){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}u=t===l,c=c||u}if(c)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.filename){let n=t.filename;const r=l,s=l;let o=!1;const a=l;if(l===a)if("string"==typeof n){if(n.includes("!")||!1!==e.test(n)){const e={params:{}};null===i?i=[e]:i.push(e),l++}else if(n.length<1){const e={params:{}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}var c=a===l;if(o=o||c,!o){const e=l;if(!(n instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}c=e===l,o=o||c}if(!o){const e={params:{}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=s,null!==i&&(s?i.length=s:i=null),p=r===l}else p=!0;if(p){if(void 0!==t.idHint){const e=l;if("string"!=typeof t.idHint)return pe.errors=[{params:{type:"string"}}],!1;p=e===l}else p=!0;if(p){if(void 0!==t.layer){let e=t.layer;const n=l,r=l;let s=!1;const o=l;if(!(e instanceof RegExp)){const e={params:{}};null===i?i=[e]:i.push(e),l++}var m=o===l;if(s=s||m,!s){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(m=t===l,s=s||m,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}m=t===l,s=s||m}}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxAsyncRequests){let e=t.maxAsyncRequests;const n=l;if(l===n){if("number"!=typeof e)return pe.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return pe.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.maxAsyncSize){let e=t.maxAsyncSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var y=c===l;if(u=u||y,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}y=t===l,u=u||y}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxInitialRequests){let e=t.maxInitialRequests;const n=l;if(l===n){if("number"!=typeof e)return pe.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return pe.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.maxInitialSize){let e=t.maxInitialSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var h=c===l;if(u=u||h,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}h=t===l,u=u||h}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxSize){let e=t.maxSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var d=c===l;if(u=u||d,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}d=t===l,u=u||d}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.minChunks){let e=t.minChunks;const n=l;if(l===n){if("number"!=typeof e)return pe.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return pe.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.minRemainingSize){let e=t.minRemainingSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var g=c===l;if(u=u||g,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}g=t===l,u=u||g}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.minSize){let e=t.minSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var b=c===l;if(u=u||b,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}b=t===l,u=u||b}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.minSizeReduction){let e=t.minSizeReduction;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var v=c===l;if(u=u||v,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}v=t===l,u=u||v}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.name){let e=t.name;const n=l,r=l;let s=!1;const o=l;if(!1!==e){const e={params:{}};null===i?i=[e]:i.push(e),l++}var D=o===l;if(s=s||D,!s){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(D=t===l,s=s||D,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}D=t===l,s=s||D}}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.priority){const e=l;if("number"!=typeof t.priority)return pe.errors=[{params:{type:"number"}}],!1;p=e===l}else p=!0;if(p){if(void 0!==t.reuseExistingChunk){const e=l;if("boolean"!=typeof t.reuseExistingChunk)return pe.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0;if(p){if(void 0!==t.test){let e=t.test;const n=l,r=l;let s=!1;const o=l;if(!(e instanceof RegExp)){const e={params:{}};null===i?i=[e]:i.push(e),l++}var P=o===l;if(s=s||P,!s){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(P=t===l,s=s||P,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}P=t===l,s=s||P}}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.type){let e=t.type;const n=l,r=l;let s=!1;const o=l;if(!(e instanceof RegExp)){const e={params:{}};null===i?i=[e]:i.push(e),l++}var A=o===l;if(s=s||A,!s){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(A=t===l,s=s||A,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}A=t===l,s=s||A}}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,pe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p)if(void 0!==t.usedExports){const e=l;if("boolean"!=typeof t.usedExports)return pe.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0}}}}}}}}}}}}}}}}}}}}}}}return pe.errors=i,0===l}function fe(t,{instancePath:r="",parentData:s,parentDataProperty:o,rootData:a=t}={}){let i=null,l=0;if(0===l){if(!t||"object"!=typeof t||Array.isArray(t))return fe.errors=[{params:{type:"object"}}],!1;{const s=l;for(const e in t)if(!n.call(ie,e))return fe.errors=[{params:{additionalProperty:e}}],!1;if(s===l){if(void 0!==t.automaticNameDelimiter){let e=t.automaticNameDelimiter;const n=l;if(l===n){if("string"!=typeof e)return fe.errors=[{params:{type:"string"}}],!1;if(e.length<1)return fe.errors=[{params:{}}],!1}var p=n===l}else p=!0;if(p){if(void 0!==t.cacheGroups){let e=t.cacheGroups;const n=l,s=l,o=l;if(l===o)if(e&&"object"==typeof e&&!Array.isArray(e)){let t;if(void 0===e.test&&(t="test")){const e={};null===i?i=[e]:i.push(e),l++}else if(void 0!==e.test){let t=e.test;const n=l;let r=!1;const s=l;if(!(t instanceof RegExp)){const e={};null===i?i=[e]:i.push(e),l++}var f=s===l;if(r=r||f,!r){const e=l;if("string"!=typeof t){const e={};null===i?i=[e]:i.push(e),l++}if(f=e===l,r=r||f,!r){const e=l;if(!(t instanceof Function)){const e={};null===i?i=[e]:i.push(e),l++}f=e===l,r=r||f}}if(r)l=n,null!==i&&(n?i.length=n:i=null);else{const e={};null===i?i=[e]:i.push(e),l++}}}else{const e={};null===i?i=[e]:i.push(e),l++}if(o===l)return fe.errors=[{params:{}}],!1;if(l=s,null!==i&&(s?i.length=s:i=null),l===n){if(!e||"object"!=typeof e||Array.isArray(e))return fe.errors=[{params:{type:"object"}}],!1;for(const t in e){let n=e[t];const s=l,o=l;let p=!1;const f=l;if(!1!==n){const e={params:{}};null===i?i=[e]:i.push(e),l++}var u=f===l;if(p=p||u,!p){const s=l;if(!(n instanceof RegExp)){const e={params:{}};null===i?i=[e]:i.push(e),l++}if(u=s===l,p=p||u,!p){const s=l;if("string"!=typeof n){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(u=s===l,p=p||u,!p){const s=l;if(!(n instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}if(u=s===l,p=p||u,!p){const s=l;pe(n,{instancePath:r+"/cacheGroups/"+t.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:t,rootData:a})||(i=null===i?pe.errors:i.concat(pe.errors),l=i.length),u=s===l,p=p||u}}}}if(!p){const e={params:{}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}if(l=o,null!==i&&(o?i.length=o:i=null),s!==l)break}}p=n===l}else p=!0;if(p){if(void 0!==t.chunks){let e=t.chunks;const n=l,r=l;let s=!1;const o=l;if("initial"!==e&&"async"!==e&&"all"!==e){const e={params:{}};null===i?i=[e]:i.push(e),l++}var c=o===l;if(s=s||c,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}c=t===l,s=s||c}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.defaultSizeTypes){let e=t.defaultSizeTypes;const n=l;if(l===n){if(!Array.isArray(e))return fe.errors=[{params:{type:"array"}}],!1;if(e.length<1)return fe.errors=[{params:{limit:1}}],!1;{const t=e.length;for(let n=0;n=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var m=c===l;if(u=u||m,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}m=t===l,u=u||m}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.fallbackCacheGroup){let e=t.fallbackCacheGroup;const n=l;if(l===n){if(!e||"object"!=typeof e||Array.isArray(e))return fe.errors=[{params:{type:"object"}}],!1;{const t=l;for(const t in e)if("automaticNameDelimiter"!==t&&"chunks"!==t&&"maxAsyncSize"!==t&&"maxInitialSize"!==t&&"maxSize"!==t&&"minSize"!==t&&"minSizeReduction"!==t)return fe.errors=[{params:{additionalProperty:t}}],!1;if(t===l){if(void 0!==e.automaticNameDelimiter){let t=e.automaticNameDelimiter;const n=l;if(l===n){if("string"!=typeof t)return fe.errors=[{params:{type:"string"}}],!1;if(t.length<1)return fe.errors=[{params:{}}],!1}var y=n===l}else y=!0;if(y){if(void 0!==e.chunks){let t=e.chunks;const n=l,r=l;let s=!1;const o=l;if("initial"!==t&&"async"!==t&&"all"!==t){const e={params:{}};null===i?i=[e]:i.push(e),l++}var h=o===l;if(s=s||h,!s){const e=l;if(!(t instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}h=e===l,s=s||h}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),y=n===l}else y=!0;if(y){if(void 0!==e.maxAsyncSize){let t=e.maxAsyncSize;const n=l,r=l;let s=!1,o=null;const a=l,p=l;let f=!1;const u=l;if(l===u)if("number"==typeof t){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var d=u===l;if(f=f||d,!f){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){const n=l;if("number"!=typeof t[e]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}d=e===l,f=f||d}if(f)l=p,null!==i&&(p?i.length=p:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),y=n===l}else y=!0;if(y){if(void 0!==e.maxInitialSize){let t=e.maxInitialSize;const n=l,r=l;let s=!1,o=null;const a=l,p=l;let f=!1;const u=l;if(l===u)if("number"==typeof t){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var g=u===l;if(f=f||g,!f){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){const n=l;if("number"!=typeof t[e]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}g=e===l,f=f||g}if(f)l=p,null!==i&&(p?i.length=p:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),y=n===l}else y=!0;if(y){if(void 0!==e.maxSize){let t=e.maxSize;const n=l,r=l;let s=!1,o=null;const a=l,p=l;let f=!1;const u=l;if(l===u)if("number"==typeof t){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var b=u===l;if(f=f||b,!f){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){const n=l;if("number"!=typeof t[e]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}b=e===l,f=f||b}if(f)l=p,null!==i&&(p?i.length=p:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),y=n===l}else y=!0;if(y){if(void 0!==e.minSize){let t=e.minSize;const n=l,r=l;let s=!1,o=null;const a=l,p=l;let f=!1;const u=l;if(l===u)if("number"==typeof t){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var v=u===l;if(f=f||v,!f){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){const n=l;if("number"!=typeof t[e]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}v=e===l,f=f||v}if(f)l=p,null!==i&&(p?i.length=p:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),y=n===l}else y=!0;if(y)if(void 0!==e.minSizeReduction){let t=e.minSizeReduction;const n=l,r=l;let s=!1,o=null;const a=l,p=l;let f=!1;const u=l;if(l===u)if("number"==typeof t){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var D=u===l;if(f=f||D,!f){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){const n=l;if("number"!=typeof t[e]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}D=e===l,f=f||D}if(f)l=p,null!==i&&(p?i.length=p:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),y=n===l}else y=!0}}}}}}}}p=n===l}else p=!0;if(p){if(void 0!==t.filename){let n=t.filename;const r=l,s=l;let o=!1;const a=l;if(l===a)if("string"==typeof n){if(n.includes("!")||!1!==e.test(n)){const e={params:{}};null===i?i=[e]:i.push(e),l++}else if(n.length<1){const e={params:{}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}var P=a===l;if(o=o||P,!o){const e=l;if(!(n instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}P=e===l,o=o||P}if(!o){const e={params:{}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=s,null!==i&&(s?i.length=s:i=null),p=r===l}else p=!0;if(p){if(void 0!==t.hidePathInfo){const e=l;if("boolean"!=typeof t.hidePathInfo)return fe.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0;if(p){if(void 0!==t.maxAsyncRequests){let e=t.maxAsyncRequests;const n=l;if(l===n){if("number"!=typeof e)return fe.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return fe.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.maxAsyncSize){let e=t.maxAsyncSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var A=c===l;if(u=u||A,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}A=t===l,u=u||A}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxInitialRequests){let e=t.maxInitialRequests;const n=l;if(l===n){if("number"!=typeof e)return fe.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return fe.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.maxInitialSize){let e=t.maxInitialSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var x=c===l;if(u=u||x,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}x=t===l,u=u||x}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxSize){let e=t.maxSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var k=c===l;if(u=u||k,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}k=t===l,u=u||k}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.minChunks){let e=t.minChunks;const n=l;if(l===n){if("number"!=typeof e)return fe.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return fe.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.minRemainingSize){let e=t.minRemainingSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var j=c===l;if(u=u||j,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}j=t===l,u=u||j}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.minSize){let e=t.minSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var S=c===l;if(u=u||S,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}S=t===l,u=u||S}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.minSizeReduction){let e=t.minSizeReduction;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var C=c===l;if(u=u||C,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){const n=l;if("number"!=typeof e[t]){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(n!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}C=t===l,u=u||C}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.name){let e=t.name;const n=l,r=l;let s=!1;const o=l;if(!1!==e){const e={params:{}};null===i?i=[e]:i.push(e),l++}var O=o===l;if(s=s||O,!s){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(O=t===l,s=s||O,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}O=t===l,s=s||O}}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,fe.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p)if(void 0!==t.usedExports){const e=l;if("boolean"!=typeof t.usedExports)return fe.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0}}}}}}}}}}}}}}}}}}}}return fe.errors=i,0===l}function ue(e,{instancePath:t="",parentData:r,parentDataProperty:s,rootData:o=e}={}){let a=null,i=0;if(0===i){if(!e||"object"!=typeof e||Array.isArray(e))return ue.errors=[{params:{type:"object"}}],!1;{const r=i;for(const t in e)if(!n.call(ae,t))return ue.errors=[{params:{additionalProperty:t}}],!1;if(r===i){if(void 0!==e.checkWasmTypes){const t=i;if("boolean"!=typeof e.checkWasmTypes)return ue.errors=[{params:{type:"boolean"}}],!1;var l=t===i}else l=!0;if(l){if(void 0!==e.chunkIds){let t=e.chunkIds;const n=i;if("natural"!==t&&"named"!==t&&"deterministic"!==t&&"size"!==t&&"total-size"!==t&&!1!==t)return ue.errors=[{params:{}}],!1;l=n===i}else l=!0;if(l){if(void 0!==e.concatenateModules){const t=i;if("boolean"!=typeof e.concatenateModules)return ue.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.emitOnErrors){const t=i;if("boolean"!=typeof e.emitOnErrors)return ue.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.flagIncludedChunks){const t=i;if("boolean"!=typeof e.flagIncludedChunks)return ue.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.innerGraph){const t=i;if("boolean"!=typeof e.innerGraph)return ue.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.mangleExports){let t=e.mangleExports;const n=i,r=i;let s=!1;const o=i;if("size"!==t&&"deterministic"!==t){const e={params:{}};null===a?a=[e]:a.push(e),i++}var p=o===i;if(s=s||p,!s){const e=i;if("boolean"!=typeof t){const e={params:{type:"boolean"}};null===a?a=[e]:a.push(e),i++}p=e===i,s=s||p}if(!s){const e={params:{}};return null===a?a=[e]:a.push(e),i++,ue.errors=a,!1}i=r,null!==a&&(r?a.length=r:a=null),l=n===i}else l=!0;if(l){if(void 0!==e.mangleWasmImports){const t=i;if("boolean"!=typeof e.mangleWasmImports)return ue.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.mergeDuplicateChunks){const t=i;if("boolean"!=typeof e.mergeDuplicateChunks)return ue.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.minimize){const t=i;if("boolean"!=typeof e.minimize)return ue.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.minimizer){let t=e.minimizer;const n=i;if(i===n){if(!Array.isArray(t))return ue.errors=[{params:{type:"array"}}],!1;{const e=t.length;for(let n=0;n=",limit:1}}],!1}y=n===f}else y=!0;if(y){if(void 0!==t.hashFunction){let e=t.hashFunction;const n=f,r=f;let s=!1;const o=f;if(f===o)if("string"==typeof e){if(e.length<1){const e={params:{}};null===l?l=[e]:l.push(e),f++}}else{const e={params:{type:"string"}};null===l?l=[e]:l.push(e),f++}var v=o===f;if(s=s||v,!s){const t=f;if(!(e instanceof Function)){const e={params:{}};null===l?l=[e]:l.push(e),f++}v=t===f,s=s||v}if(!s){const e={params:{}};return null===l?l=[e]:l.push(e),f++,Pe.errors=l,!1}f=r,null!==l&&(r?l.length=r:l=null),y=n===f}else y=!0;if(y){if(void 0!==t.hashSalt){let e=t.hashSalt;const n=f;if(f==f){if("string"!=typeof e)return Pe.errors=[{params:{type:"string"}}],!1;if(e.length<1)return Pe.errors=[{params:{}}],!1}y=n===f}else y=!0;if(y){if(void 0!==t.hotUpdateChunkFilename){let n=t.hotUpdateChunkFilename;const r=f;if(f==f){if("string"!=typeof n)return Pe.errors=[{params:{type:"string"}}],!1;if(n.includes("!")||!1!==e.test(n))return Pe.errors=[{params:{}}],!1}y=r===f}else y=!0;if(y){if(void 0!==t.hotUpdateGlobal){const e=f;if("string"!=typeof t.hotUpdateGlobal)return Pe.errors=[{params:{type:"string"}}],!1;y=e===f}else y=!0;if(y){if(void 0!==t.hotUpdateMainFilename){let n=t.hotUpdateMainFilename;const r=f;if(f==f){if("string"!=typeof n)return Pe.errors=[{params:{type:"string"}}],!1;if(n.includes("!")||!1!==e.test(n))return Pe.errors=[{params:{}}],!1}y=r===f}else y=!0;if(y){if(void 0!==t.iife){const e=f;if("boolean"!=typeof t.iife)return Pe.errors=[{params:{type:"boolean"}}],!1;y=e===f}else y=!0;if(y){if(void 0!==t.importFunctionName){const e=f;if("string"!=typeof t.importFunctionName)return Pe.errors=[{params:{type:"string"}}],!1;y=e===f}else y=!0;if(y){if(void 0!==t.importMetaName){const e=f;if("string"!=typeof t.importMetaName)return Pe.errors=[{params:{type:"string"}}],!1;y=e===f}else y=!0;if(y){if(void 0!==t.library){const e=f;De(t.library,{instancePath:r+"/library",parentData:t,parentDataProperty:"library",rootData:a})||(l=null===l?De.errors:l.concat(De.errors),f=l.length),y=e===f}else y=!0;if(y){if(void 0!==t.libraryExport){let e=t.libraryExport;const n=f,r=f;let s=!1,o=null;const a=f,i=f;let p=!1;const u=f;if(f===u)if(Array.isArray(e)){const t=e.length;for(let n=0;n=",limit:1}}],!1}c=t===f}else c=!0;if(c){if(void 0!==r.performance){const e=f;Ae(r.performance,{instancePath:s+"/performance",parentData:r,parentDataProperty:"performance",rootData:l})||(p=null===p?Ae.errors:p.concat(Ae.errors),f=p.length),c=e===f}else c=!0;if(c){if(void 0!==r.plugins){const e=f;xe(r.plugins,{instancePath:s+"/plugins",parentData:r,parentDataProperty:"plugins",rootData:l})||(p=null===p?xe.errors:p.concat(xe.errors),f=p.length),c=e===f}else c=!0;if(c){if(void 0!==r.profile){const e=f;if("boolean"!=typeof r.profile)return ze.errors=[{params:{type:"boolean"}}],!1;c=e===f}else c=!0;if(c){if(void 0!==r.recordsInputPath){let t=r.recordsInputPath;const n=f,s=f;let o=!1;const a=f;if(!1!==t){const e={params:{}};null===p?p=[e]:p.push(e),f++}var g=a===f;if(o=o||g,!o){const n=f;if(f===n)if("string"==typeof t){if(t.includes("!")||!0!==e.test(t)){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}g=n===f,o=o||g}if(!o){const e={params:{}};return null===p?p=[e]:p.push(e),f++,ze.errors=p,!1}f=s,null!==p&&(s?p.length=s:p=null),c=n===f}else c=!0;if(c){if(void 0!==r.recordsOutputPath){let t=r.recordsOutputPath;const n=f,s=f;let o=!1;const a=f;if(!1!==t){const e={params:{}};null===p?p=[e]:p.push(e),f++}var v=a===f;if(o=o||v,!o){const n=f;if(f===n)if("string"==typeof t){if(t.includes("!")||!0!==e.test(t)){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}v=n===f,o=o||v}if(!o){const e={params:{}};return null===p?p=[e]:p.push(e),f++,ze.errors=p,!1}f=s,null!==p&&(s?p.length=s:p=null),c=n===f}else c=!0;if(c){if(void 0!==r.recordsPath){let t=r.recordsPath;const n=f,s=f;let o=!1;const a=f;if(!1!==t){const e={params:{}};null===p?p=[e]:p.push(e),f++}var D=a===f;if(o=o||D,!o){const n=f;if(f===n)if("string"==typeof t){if(t.includes("!")||!0!==e.test(t)){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}D=n===f,o=o||D}if(!o){const e={params:{}};return null===p?p=[e]:p.push(e),f++,ze.errors=p,!1}f=s,null!==p&&(s?p.length=s:p=null),c=n===f}else c=!0;if(c){if(void 0!==r.resolve){const e=f;ke(r.resolve,{instancePath:s+"/resolve",parentData:r,parentDataProperty:"resolve",rootData:l})||(p=null===p?ke.errors:p.concat(ke.errors),f=p.length),c=e===f}else c=!0;if(c){if(void 0!==r.resolveLoader){const e=f;je(r.resolveLoader,{instancePath:s+"/resolveLoader",parentData:r,parentDataProperty:"resolveLoader",rootData:l})||(p=null===p?je.errors:p.concat(je.errors),f=p.length),c=e===f}else c=!0;if(c){if(void 0!==r.snapshot){let t=r.snapshot;const n=f;if(f==f){if(!t||"object"!=typeof t||Array.isArray(t))return ze.errors=[{params:{type:"object"}}],!1;{const n=f;for(const e in t)if("buildDependencies"!==e&&"immutablePaths"!==e&&"managedPaths"!==e&&"module"!==e&&"resolve"!==e&&"resolveBuildDependencies"!==e)return ze.errors=[{params:{additionalProperty:e}}],!1;if(n===f){if(void 0!==t.buildDependencies){let e=t.buildDependencies;const n=f;if(f===n){if(!e||"object"!=typeof e||Array.isArray(e))return ze.errors=[{params:{type:"object"}}],!1;{const t=f;for(const t in e)if("hash"!==t&&"timestamp"!==t)return ze.errors=[{params:{additionalProperty:t}}],!1;if(t===f){if(void 0!==e.hash){const t=f;if("boolean"!=typeof e.hash)return ze.errors=[{params:{type:"boolean"}}],!1;var P=t===f}else P=!0;if(P)if(void 0!==e.timestamp){const t=f;if("boolean"!=typeof e.timestamp)return ze.errors=[{params:{type:"boolean"}}],!1;P=t===f}else P=!0}}}var A=n===f}else A=!0;if(A){if(void 0!==t.immutablePaths){let n=t.immutablePaths;const r=f;if(f===r){if(!Array.isArray(n))return ze.errors=[{params:{type:"array"}}],!1;{const t=n.length;for(let r=0;r