@rsbuild/webpack 0.0.0-nightly-20231018160828

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +24 -0
  3. package/compiled/ansi-escapes/index.d.ts +251 -0
  4. package/compiled/ansi-escapes/index.js +131 -0
  5. package/compiled/ansi-escapes/license +9 -0
  6. package/compiled/ansi-escapes/package.json +11 -0
  7. package/compiled/ansi-escapes/type-fest/index.d.ts +2 -0
  8. package/compiled/babel-plugin-lodash/index.d.ts +1 -0
  9. package/compiled/babel-plugin-lodash/index.js +1037 -0
  10. package/compiled/babel-plugin-lodash/license +44 -0
  11. package/compiled/babel-plugin-lodash/package.json +7 -0
  12. package/compiled/babel-plugin-transform-react-remove-prop-types/index.d.ts +1 -0
  13. package/compiled/babel-plugin-transform-react-remove-prop-types/index.js +565 -0
  14. package/compiled/babel-plugin-transform-react-remove-prop-types/license +22 -0
  15. package/compiled/babel-plugin-transform-react-remove-prop-types/package.json +7 -0
  16. package/compiled/cli-truncate/index.d.ts +96 -0
  17. package/compiled/cli-truncate/index.js +1388 -0
  18. package/compiled/cli-truncate/license +9 -0
  19. package/compiled/cli-truncate/package.json +11 -0
  20. package/compiled/copy-webpack-plugin/index.d.ts +1 -0
  21. package/compiled/copy-webpack-plugin/index.js +1160 -0
  22. package/compiled/copy-webpack-plugin/license +20 -0
  23. package/compiled/copy-webpack-plugin/package.json +11 -0
  24. package/compiled/patch-console/build/index.d.ts +4 -0
  25. package/compiled/patch-console/index.js +70 -0
  26. package/compiled/patch-console/package.json +11 -0
  27. package/compiled/schema-utils3/index.d.ts +1 -0
  28. package/compiled/schema-utils3/index.js +10699 -0
  29. package/compiled/schema-utils3/license +20 -0
  30. package/compiled/schema-utils3/package.json +11 -0
  31. package/compiled/tapable/index.js +1102 -0
  32. package/compiled/tapable/license +21 -0
  33. package/compiled/tapable/package.json +7 -0
  34. package/compiled/tapable/tapable.d.ts +161 -0
  35. package/compiled/webpack-manifest-plugin/index.js +364 -0
  36. package/compiled/webpack-manifest-plugin/license +21 -0
  37. package/compiled/webpack-manifest-plugin/package.json +7 -0
  38. package/compiled/webpack-manifest-plugin/types/helpers.d.ts +39 -0
  39. package/compiled/webpack-manifest-plugin/types/hooks.d.ts +44 -0
  40. package/compiled/webpack-manifest-plugin/types/index.d.ts +34 -0
  41. package/compiled/webpack-sources/index.d.ts +1 -0
  42. package/compiled/webpack-sources/index.js +2337 -0
  43. package/compiled/webpack-sources/license +21 -0
  44. package/compiled/webpack-sources/package.json +7 -0
  45. package/dist/config/defaults.d.ts +3 -0
  46. package/dist/config/defaults.js +56 -0
  47. package/dist/config/normalize.d.ts +7 -0
  48. package/dist/config/normalize.js +33 -0
  49. package/dist/config/validate/dev.d.ts +3 -0
  50. package/dist/config/validate/dev.js +29 -0
  51. package/dist/config/validate/experiments.d.ts +3 -0
  52. package/dist/config/validate/experiments.js +31 -0
  53. package/dist/config/validate/html.d.ts +3 -0
  54. package/dist/config/validate/html.js +29 -0
  55. package/dist/config/validate/index.d.ts +4 -0
  56. package/dist/config/validate/index.js +52 -0
  57. package/dist/config/validate/output.d.ts +3 -0
  58. package/dist/config/validate/output.js +37 -0
  59. package/dist/config/validate/performance.d.ts +3 -0
  60. package/dist/config/validate/performance.js +47 -0
  61. package/dist/config/validate/security.d.ts +4 -0
  62. package/dist/config/validate/security.js +38 -0
  63. package/dist/config/validate/source.d.ts +3 -0
  64. package/dist/config/validate/source.js +34 -0
  65. package/dist/config/validate/tools.d.ts +3 -0
  66. package/dist/config/validate/tools.js +58 -0
  67. package/dist/core/build.d.ts +26 -0
  68. package/dist/core/build.js +81 -0
  69. package/dist/core/createCompiler.d.ts +8 -0
  70. package/dist/core/createCompiler.js +69 -0
  71. package/dist/core/createContext.d.ts +13 -0
  72. package/dist/core/createContext.js +60 -0
  73. package/dist/core/devMiddleware.d.ts +5 -0
  74. package/dist/core/devMiddleware.js +73 -0
  75. package/dist/core/initConfigs.d.ts +14 -0
  76. package/dist/core/initConfigs.js +88 -0
  77. package/dist/core/initHooks.d.ts +19 -0
  78. package/dist/core/initHooks.js +44 -0
  79. package/dist/core/initPlugins.d.ts +9 -0
  80. package/dist/core/initPlugins.js +83 -0
  81. package/dist/core/inspectConfig.d.ts +20 -0
  82. package/dist/core/inspectConfig.js +81 -0
  83. package/dist/core/startDevServer.d.ts +5 -0
  84. package/dist/core/startDevServer.js +75 -0
  85. package/dist/core/webpackConfig.d.ts +9 -0
  86. package/dist/core/webpackConfig.js +167 -0
  87. package/dist/exports/HtmlWebpackPlugin.d.ts +2 -0
  88. package/dist/exports/HtmlWebpackPlugin.js +35 -0
  89. package/dist/exports/webpack.d.ts +2 -0
  90. package/dist/exports/webpack.js +35 -0
  91. package/dist/index.d.ts +7 -0
  92. package/dist/index.js +34 -0
  93. package/dist/plugins/babel.d.ts +3 -0
  94. package/dist/plugins/babel.js +193 -0
  95. package/dist/plugins/basic.d.ts +5 -0
  96. package/dist/plugins/basic.js +60 -0
  97. package/dist/plugins/copy.d.ts +2 -0
  98. package/dist/plugins/copy.js +69 -0
  99. package/dist/plugins/css.d.ts +23 -0
  100. package/dist/plugins/css.js +124 -0
  101. package/dist/plugins/fallback.d.ts +2 -0
  102. package/dist/plugins/fallback.js +51 -0
  103. package/dist/plugins/hmr.d.ts +2 -0
  104. package/dist/plugins/hmr.js +41 -0
  105. package/dist/plugins/lazyCompilation.d.ts +2 -0
  106. package/dist/plugins/lazyCompilation.js +43 -0
  107. package/dist/plugins/less.d.ts +6 -0
  108. package/dist/plugins/less.js +65 -0
  109. package/dist/plugins/manifest.d.ts +2 -0
  110. package/dist/plugins/manifest.js +58 -0
  111. package/dist/plugins/minimize.d.ts +2 -0
  112. package/dist/plugins/minimize.js +62 -0
  113. package/dist/plugins/moduleScopes.d.ts +5 -0
  114. package/dist/plugins/moduleScopes.js +85 -0
  115. package/dist/plugins/output.d.ts +2 -0
  116. package/dist/plugins/output.js +67 -0
  117. package/dist/plugins/progress.d.ts +2 -0
  118. package/dist/plugins/progress.js +57 -0
  119. package/dist/plugins/pug.d.ts +2 -0
  120. package/dist/plugins/pug.js +52 -0
  121. package/dist/plugins/react.d.ts +2 -0
  122. package/dist/plugins/react.js +95 -0
  123. package/dist/plugins/resolve.d.ts +2 -0
  124. package/dist/plugins/resolve.js +88 -0
  125. package/dist/plugins/sass.d.ts +2 -0
  126. package/dist/plugins/sass.js +76 -0
  127. package/dist/plugins/sri.d.ts +2 -0
  128. package/dist/plugins/sri.js +43 -0
  129. package/dist/plugins/tsLoader.d.ts +2 -0
  130. package/dist/plugins/tsLoader.js +106 -0
  131. package/dist/provider.d.ts +9 -0
  132. package/dist/provider.js +104 -0
  133. package/dist/shared/fs.d.ts +1 -0
  134. package/dist/shared/fs.js +38 -0
  135. package/dist/shared/index.d.ts +1 -0
  136. package/dist/shared/index.js +22 -0
  137. package/dist/shared/plugin.d.ts +5 -0
  138. package/dist/shared/plugin.js +120 -0
  139. package/dist/types/config/dev.d.ts +3 -0
  140. package/dist/types/config/dev.js +16 -0
  141. package/dist/types/config/experiments.d.ts +5 -0
  142. package/dist/types/config/experiments.js +16 -0
  143. package/dist/types/config/html.d.ts +3 -0
  144. package/dist/types/config/html.js +16 -0
  145. package/dist/types/config/index.d.ts +38 -0
  146. package/dist/types/config/index.js +36 -0
  147. package/dist/types/config/output.d.ts +9 -0
  148. package/dist/types/config/output.js +16 -0
  149. package/dist/types/config/performance.d.ts +3 -0
  150. package/dist/types/config/performance.js +16 -0
  151. package/dist/types/config/security.d.ts +9 -0
  152. package/dist/types/config/security.js +16 -0
  153. package/dist/types/config/source.d.ts +35 -0
  154. package/dist/types/config/source.js +16 -0
  155. package/dist/types/config/tools.d.ts +71 -0
  156. package/dist/types/config/tools.js +16 -0
  157. package/dist/types/context.d.ts +19 -0
  158. package/dist/types/context.js +16 -0
  159. package/dist/types/hooks.d.ts +20 -0
  160. package/dist/types/hooks.js +16 -0
  161. package/dist/types/index.d.ts +5 -0
  162. package/dist/types/index.js +30 -0
  163. package/dist/types/plugin.d.ts +10 -0
  164. package/dist/types/plugin.js +16 -0
  165. package/dist/types/thirdParty/CopyWebpackPlugin.d.ts +59 -0
  166. package/dist/types/thirdParty/CopyWebpackPlugin.js +16 -0
  167. package/dist/types/thirdParty/css.d.ts +7 -0
  168. package/dist/types/thirdParty/css.js +16 -0
  169. package/dist/types/thirdParty/index.d.ts +11 -0
  170. package/dist/types/thirdParty/index.js +16 -0
  171. package/dist/webpackLoaders/pugLoader.d.ts +3 -0
  172. package/dist/webpackLoaders/pugLoader.js +44 -0
  173. package/dist/webpackPlugins/ModuleScopePlugin.d.ts +16 -0
  174. package/dist/webpackPlugins/ModuleScopePlugin.js +110 -0
  175. package/dist/webpackPlugins/ProgressPlugin/ProgressPlugin.d.ts +16 -0
  176. package/dist/webpackPlugins/ProgressPlugin/ProgressPlugin.js +107 -0
  177. package/dist/webpackPlugins/ProgressPlugin/helpers/bar.d.ts +5 -0
  178. package/dist/webpackPlugins/ProgressPlugin/helpers/bar.js +130 -0
  179. package/dist/webpackPlugins/ProgressPlugin/helpers/bus.d.ts +17 -0
  180. package/dist/webpackPlugins/ProgressPlugin/helpers/bus.js +109 -0
  181. package/dist/webpackPlugins/ProgressPlugin/helpers/index.d.ts +4 -0
  182. package/dist/webpackPlugins/ProgressPlugin/helpers/index.js +28 -0
  183. package/dist/webpackPlugins/ProgressPlugin/helpers/log.d.ts +8 -0
  184. package/dist/webpackPlugins/ProgressPlugin/helpers/log.js +62 -0
  185. package/dist/webpackPlugins/ProgressPlugin/helpers/nonTty.d.ts +15 -0
  186. package/dist/webpackPlugins/ProgressPlugin/helpers/nonTty.js +56 -0
  187. package/dist/webpackPlugins/ProgressPlugin/helpers/percentage.d.ts +7 -0
  188. package/dist/webpackPlugins/ProgressPlugin/helpers/percentage.js +52 -0
  189. package/dist/webpackPlugins/ProgressPlugin/helpers/type.d.ts +23 -0
  190. package/dist/webpackPlugins/ProgressPlugin/helpers/type.js +16 -0
  191. package/dist/webpackPlugins/ProgressPlugin/helpers/utils.d.ts +1 -0
  192. package/dist/webpackPlugins/ProgressPlugin/helpers/utils.js +30 -0
  193. package/package.json +68 -0
  194. package/static/ModuleFilenameHelpers.js +2 -0
@@ -0,0 +1,1160 @@
1
+ (() => {
2
+ var e = {
3
+ 793: (e, t, r) => {
4
+ 'use strict';
5
+ const n = r(897);
6
+ e.exports = n.default;
7
+ },
8
+ 897: (e, t, r) => {
9
+ 'use strict';
10
+ Object.defineProperty(t, '__esModule', { value: true });
11
+ t['default'] = void 0;
12
+ var n = _interopRequireDefault(r(17));
13
+ var o = r(739);
14
+ var i = _interopRequireDefault(r(937));
15
+ var a = _interopRequireDefault(r(327));
16
+ var s = _interopRequireDefault(r(498));
17
+ var c = _interopRequireDefault(r(677));
18
+ var u = _interopRequireDefault(r(7));
19
+ var f = r(684);
20
+ var l = _interopRequireDefault(r(452));
21
+ var p = r(552);
22
+ function _interopRequireDefault(e) {
23
+ return e && e.__esModule ? e : { default: e };
24
+ }
25
+ const d = /\[\\*([\w:]+)\\*\]/i;
26
+ class CopyPlugin {
27
+ constructor(e = {}) {
28
+ (0, o.validate)(l.default, e, {
29
+ name: 'Copy Plugin',
30
+ baseDataPath: 'options',
31
+ });
32
+ this.patterns = e.patterns;
33
+ this.options = e.options || {};
34
+ }
35
+ static async createSnapshot(e, t, r) {
36
+ return new Promise((n, o) => {
37
+ e.fileSystemInfo.createSnapshot(
38
+ t,
39
+ [r],
40
+ undefined,
41
+ undefined,
42
+ null,
43
+ (e, t) => {
44
+ if (e) {
45
+ o(e);
46
+ return;
47
+ }
48
+ n(t);
49
+ },
50
+ );
51
+ });
52
+ }
53
+ static async checkSnapshotValid(e, t) {
54
+ return new Promise((r, n) => {
55
+ e.fileSystemInfo.checkSnapshotValid(t, (e, t) => {
56
+ if (e) {
57
+ n(e);
58
+ return;
59
+ }
60
+ r(t);
61
+ });
62
+ });
63
+ }
64
+ static getContentHash(e, t, r) {
65
+ const { outputOptions: n } = t;
66
+ const {
67
+ hashDigest: o,
68
+ hashDigestLength: i,
69
+ hashFunction: a,
70
+ hashSalt: s,
71
+ } = n;
72
+ const c = e.webpack.util.createHash(a);
73
+ if (s) {
74
+ c.update(s);
75
+ }
76
+ c.update(r);
77
+ const u = c.digest(o);
78
+ return u.slice(0, i);
79
+ }
80
+ static async runPattern(e, t, o, l, g, h) {
81
+ const { RawSource: m } = e.webpack.sources;
82
+ const b = typeof g === 'string' ? { from: g } : { ...g };
83
+ b.fromOrigin = b.from;
84
+ b.from = n.default.normalize(b.from);
85
+ b.context =
86
+ typeof b.context === 'undefined'
87
+ ? e.context
88
+ : n.default.isAbsolute(b.context)
89
+ ? b.context
90
+ : n.default.join(e.context, b.context);
91
+ o.log(
92
+ `starting to process a pattern from '${b.from}' using '${b.context}' context`,
93
+ );
94
+ if (n.default.isAbsolute(b.from)) {
95
+ b.absoluteFrom = b.from;
96
+ } else {
97
+ b.absoluteFrom = n.default.resolve(b.context, b.from);
98
+ }
99
+ o.debug(`getting stats for '${b.absoluteFrom}'...`);
100
+ const { inputFileSystem: y } = e;
101
+ let w;
102
+ try {
103
+ w = await (0, p.stat)(y, b.absoluteFrom);
104
+ } catch (e) {}
105
+ if (w) {
106
+ if (w.isDirectory()) {
107
+ b.fromType = 'dir';
108
+ o.debug(`determined '${b.absoluteFrom}' is a directory`);
109
+ } else if (w.isFile()) {
110
+ b.fromType = 'file';
111
+ o.debug(`determined '${b.absoluteFrom}' is a file`);
112
+ } else {
113
+ o.debug(`determined '${b.absoluteFrom}' is a glob`);
114
+ }
115
+ }
116
+ b.globOptions = {
117
+ ...{ followSymbolicLinks: true },
118
+ ...(b.globOptions || {}),
119
+ ...{ cwd: b.context, objectMode: true },
120
+ };
121
+ b.globOptions.fs = y;
122
+ switch (b.fromType) {
123
+ case 'dir':
124
+ t.contextDependencies.add(b.absoluteFrom);
125
+ o.debug(`added '${b.absoluteFrom}' as a context dependency`);
126
+ b.context = b.absoluteFrom;
127
+ b.glob = n.default.posix.join(
128
+ u.default.escapePath(
129
+ (0, s.default)(n.default.resolve(b.absoluteFrom)),
130
+ ),
131
+ '**/*',
132
+ );
133
+ b.absoluteFrom = n.default.join(b.absoluteFrom, '**/*');
134
+ if (typeof b.globOptions.dot === 'undefined') {
135
+ b.globOptions.dot = true;
136
+ }
137
+ break;
138
+ case 'file':
139
+ t.fileDependencies.add(b.absoluteFrom);
140
+ o.debug(`added '${b.absoluteFrom}' as a file dependency`);
141
+ b.context = n.default.dirname(b.absoluteFrom);
142
+ b.glob = u.default.escapePath(
143
+ (0, s.default)(n.default.resolve(b.absoluteFrom)),
144
+ );
145
+ if (typeof b.globOptions.dot === 'undefined') {
146
+ b.globOptions.dot = true;
147
+ }
148
+ break;
149
+ default: {
150
+ const e = n.default.normalize((0, c.default)(b.absoluteFrom));
151
+ t.contextDependencies.add(e);
152
+ o.debug(`added '${e}' as a context dependency`);
153
+ b.fromType = 'glob';
154
+ b.glob = n.default.isAbsolute(b.fromOrigin)
155
+ ? b.fromOrigin
156
+ : n.default.posix.join(
157
+ u.default.escapePath(
158
+ (0, s.default)(n.default.resolve(b.context)),
159
+ ),
160
+ b.fromOrigin,
161
+ );
162
+ }
163
+ }
164
+ o.log(`begin globbing '${b.glob}'...`);
165
+ let v;
166
+ try {
167
+ v = await (0, i.default)(b.glob, b.globOptions);
168
+ } catch (e) {
169
+ t.errors.push(e);
170
+ return;
171
+ }
172
+ if (v.length === 0) {
173
+ if (b.noErrorOnMissing) {
174
+ o.log(
175
+ `finished to process a pattern from '${b.from}' using '${b.context}' context to '${b.to}'`,
176
+ );
177
+ return;
178
+ }
179
+ const e = new Error(`unable to locate '${b.glob}' glob`);
180
+ t.errors.push(e);
181
+ return;
182
+ }
183
+ const x = (
184
+ await Promise.all(
185
+ v.map(async (e) => {
186
+ if (!e.dirent.isFile()) {
187
+ return false;
188
+ }
189
+ if (b.filter) {
190
+ let r;
191
+ try {
192
+ r = await b.filter(e.path);
193
+ } catch (e) {
194
+ t.errors.push(e);
195
+ return false;
196
+ }
197
+ if (!r) {
198
+ o.log(`skip '${e.path}', because it was filtered`);
199
+ }
200
+ return r ? e : false;
201
+ }
202
+ return e;
203
+ }),
204
+ )
205
+ ).filter((e) => e);
206
+ if (x.length === 0) {
207
+ if (b.noErrorOnMissing) {
208
+ o.log(
209
+ `finished to process a pattern from '${b.from}' using '${b.context}' context to '${b.to}'`,
210
+ );
211
+ return;
212
+ }
213
+ const e = new Error(
214
+ `unable to locate '${b.glob}' glob after filtering paths`,
215
+ );
216
+ t.errors.push(e);
217
+ return;
218
+ }
219
+ const k = await Promise.all(
220
+ x.map(async (t) => {
221
+ const r = t.path;
222
+ o.debug(`found '${r}'`);
223
+ const i = n.default.resolve(b.context, r);
224
+ b.to =
225
+ typeof b.to === 'function'
226
+ ? await b.to({ context: b.context, absoluteFilename: i })
227
+ : n.default.normalize(
228
+ typeof b.to !== 'undefined' ? b.to : '',
229
+ );
230
+ const a =
231
+ n.default.extname(b.to) === '' ||
232
+ b.to.slice(-1) === n.default.sep;
233
+ const c = b.toType
234
+ ? b.toType
235
+ : d.test(b.to)
236
+ ? 'template'
237
+ : a
238
+ ? 'dir'
239
+ : 'file';
240
+ o.log(`'to' option '${b.to}' determinated as '${c}'`);
241
+ const u = n.default.relative(b.context, i);
242
+ let f = c === 'dir' ? n.default.join(b.to, u) : b.to;
243
+ if (n.default.isAbsolute(f)) {
244
+ f = n.default.relative(e.options.output.path, f);
245
+ }
246
+ o.log(`determined that '${r}' should write to '${f}'`);
247
+ const l = (0, s.default)(n.default.relative(e.context, i));
248
+ return {
249
+ absoluteFilename: i,
250
+ sourceFilename: l,
251
+ filename: f,
252
+ toType: c,
253
+ };
254
+ }),
255
+ );
256
+ let _;
257
+ try {
258
+ _ = await Promise.all(
259
+ k.map(async (i) => {
260
+ const {
261
+ absoluteFilename: c,
262
+ sourceFilename: u,
263
+ filename: d,
264
+ toType: g,
265
+ } = i;
266
+ const w =
267
+ typeof b.info === 'function' ? b.info(i) || {} : b.info || {};
268
+ const v = {
269
+ absoluteFilename: c,
270
+ sourceFilename: u,
271
+ filename: d,
272
+ force: b.force,
273
+ info: w,
274
+ };
275
+ if (b.fromType === 'dir' || b.fromType === 'glob') {
276
+ t.fileDependencies.add(c);
277
+ o.debug(`added '${c}' as a file dependency`);
278
+ }
279
+ let x;
280
+ o.debug(`getting cache for '${c}'...`);
281
+ try {
282
+ x = await l.getPromise(`${u}|${h}`, null);
283
+ } catch (e) {
284
+ t.errors.push(e);
285
+ return;
286
+ }
287
+ if (x) {
288
+ o.debug(`found cache for '${c}'...`);
289
+ let e;
290
+ o.debug(`checking snapshot on valid for '${c}'...`);
291
+ try {
292
+ e = await CopyPlugin.checkSnapshotValid(t, x.snapshot);
293
+ } catch (e) {
294
+ t.errors.push(e);
295
+ return;
296
+ }
297
+ if (e) {
298
+ o.debug(`snapshot for '${c}' is valid`);
299
+ v.source = x.source;
300
+ } else {
301
+ o.debug(`snapshot for '${c}' is invalid`);
302
+ }
303
+ } else {
304
+ o.debug(`missed cache for '${c}'`);
305
+ }
306
+ if (!v.source) {
307
+ const e = Date.now();
308
+ o.debug(`reading '${c}'...`);
309
+ let r;
310
+ try {
311
+ r = await (0, p.readFile)(y, c);
312
+ } catch (e) {
313
+ t.errors.push(e);
314
+ return;
315
+ }
316
+ o.debug(`read '${c}'`);
317
+ v.source = new m(r);
318
+ let n;
319
+ o.debug(`creating snapshot for '${c}'...`);
320
+ try {
321
+ n = await CopyPlugin.createSnapshot(t, e, c);
322
+ } catch (e) {
323
+ t.errors.push(e);
324
+ return;
325
+ }
326
+ if (n) {
327
+ o.debug(`created snapshot for '${c}'`);
328
+ o.debug(`storing cache for '${c}'...`);
329
+ try {
330
+ await l.storePromise(`${u}|${h}`, null, {
331
+ source: v.source,
332
+ snapshot: n,
333
+ });
334
+ } catch (e) {
335
+ t.errors.push(e);
336
+ return;
337
+ }
338
+ o.debug(`stored cache for '${c}'`);
339
+ }
340
+ }
341
+ if (b.transform) {
342
+ const t =
343
+ typeof b.transform === 'function'
344
+ ? { transformer: b.transform }
345
+ : b.transform;
346
+ if (t.transformer) {
347
+ o.log(`transforming content for '${c}'...`);
348
+ const n = v.source.buffer();
349
+ if (t.cache) {
350
+ const i =
351
+ e.webpack && e.webpack.util && e.webpack.util.createHash
352
+ ? e.webpack.util.createHash('xxhash64')
353
+ : r(113).createHash('md4');
354
+ const s = {
355
+ version: f.version,
356
+ sourceFilename: u,
357
+ transform: t.transformer,
358
+ contentHash: i.update(n).digest('hex'),
359
+ index: h,
360
+ };
361
+ const p = `transform|${(0, a.default)(
362
+ typeof t.cache.keys === 'function'
363
+ ? await t.cache.keys(s, c)
364
+ : { ...s, ...b.transform.cache.keys },
365
+ )}`;
366
+ o.debug(`getting transformation cache for '${c}'...`);
367
+ const d = l.getItemCache(
368
+ p,
369
+ l.getLazyHashedEtag(v.source),
370
+ );
371
+ v.source = await d.getPromise();
372
+ o.debug(
373
+ v.source
374
+ ? `found transformation cache for '${c}'`
375
+ : `no transformation cache for '${c}'`,
376
+ );
377
+ if (!v.source) {
378
+ const e = await t.transformer(n, c);
379
+ v.source = new m(e);
380
+ o.debug(`caching transformation for '${c}'...`);
381
+ await d.storePromise(v.source);
382
+ o.debug(`cached transformation for '${c}'`);
383
+ }
384
+ } else {
385
+ v.source = new m(await t.transformer(n, c));
386
+ }
387
+ }
388
+ }
389
+ if (g === 'template') {
390
+ o.log(`interpolating template '${d}' for '${u}'...`);
391
+ const r = CopyPlugin.getContentHash(e, t, v.source.buffer());
392
+ const i = n.default.extname(v.sourceFilename);
393
+ const a = n.default.basename(v.sourceFilename);
394
+ const f = a.slice(0, a.length - i.length);
395
+ const l = {
396
+ filename: (0, s.default)(n.default.relative(b.context, c)),
397
+ contentHash: r,
398
+ chunk: {
399
+ name: f,
400
+ id: v.sourceFilename,
401
+ hash: r,
402
+ contentHash: r,
403
+ },
404
+ };
405
+ const { path: p, info: g } = t.getPathWithInfo(
406
+ (0, s.default)(v.filename),
407
+ l,
408
+ );
409
+ v.info = { ...v.info, ...g };
410
+ v.filename = p;
411
+ o.log(`interpolated template '${d}' for '${u}'`);
412
+ } else {
413
+ v.filename = (0, s.default)(v.filename);
414
+ }
415
+ return v;
416
+ }),
417
+ );
418
+ } catch (e) {
419
+ t.errors.push(e);
420
+ return;
421
+ }
422
+ o.log(
423
+ `finished to process a pattern from '${b.from}' using '${b.context}' context to '${b.to}'`,
424
+ );
425
+ return _;
426
+ }
427
+ apply(e) {
428
+ const t = this.constructor.name;
429
+ e.hooks.thisCompilation.tap(t, (r) => {
430
+ const n = r.getLogger('copy-webpack-plugin');
431
+ const o = r.getCache('CopyWebpackPlugin');
432
+ r.hooks.processAssets.tapAsync(
433
+ {
434
+ name: 'copy-webpack-plugin',
435
+ stage: e.webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL,
436
+ },
437
+ async (t, i) => {
438
+ n.log('starting to add additional assets...');
439
+ const c = new Map();
440
+ const u = [];
441
+ this.patterns.map((t, i) =>
442
+ u.push(async () => {
443
+ let u;
444
+ try {
445
+ u = await CopyPlugin.runPattern(e, r, n, o, t, i);
446
+ } catch (e) {
447
+ r.errors.push(e);
448
+ return;
449
+ }
450
+ if (u && u.length > 0) {
451
+ if (t.transformAll) {
452
+ if (typeof t.to === 'undefined') {
453
+ r.errors.push(
454
+ new Error(
455
+ `Invalid "pattern.to" for the "pattern.from": "${t.from}" and "pattern.transformAll" function. The "to" option must be specified.`,
456
+ ),
457
+ );
458
+ return;
459
+ }
460
+ u.sort((e, t) =>
461
+ e.absoluteFilename > t.absoluteFilename
462
+ ? 1
463
+ : e.absoluteFilename < t.absoluteFilename
464
+ ? -1
465
+ : 0,
466
+ );
467
+ const n =
468
+ u.length === 1
469
+ ? o.getLazyHashedEtag(u[0].source.buffer())
470
+ : u.reduce((e, t, r) => {
471
+ e = o.mergeEtags(
472
+ r === 1
473
+ ? o.getLazyHashedEtag(e.source.buffer())
474
+ : e,
475
+ o.getLazyHashedEtag(t.source.buffer()),
476
+ );
477
+ return e;
478
+ });
479
+ const i = `transformAll|${(0, a.default)({
480
+ version: f.version,
481
+ from: t.from,
482
+ to: t.to,
483
+ transformAll: t.transformAll,
484
+ })}`;
485
+ const c = o.getLazyHashedEtag(n);
486
+ const l = o.getItemCache(i, c);
487
+ let p = await l.getPromise();
488
+ if (!p) {
489
+ p = { filename: t.to };
490
+ try {
491
+ p.data = await t.transformAll(
492
+ u.map((e) => ({
493
+ data: e.source.buffer(),
494
+ sourceFilename: e.sourceFilename,
495
+ absoluteFilename: e.absoluteFilename,
496
+ })),
497
+ );
498
+ } catch (e) {
499
+ r.errors.push(e);
500
+ return;
501
+ }
502
+ if (d.test(t.to)) {
503
+ const n = CopyPlugin.getContentHash(e, r, p.data);
504
+ const { path: o, info: i } = r.getPathWithInfo(
505
+ (0, s.default)(t.to),
506
+ {
507
+ contentHash: n,
508
+ chunk: { hash: n, contentHash: n },
509
+ },
510
+ );
511
+ p.filename = o;
512
+ p.info = i;
513
+ }
514
+ const { RawSource: n } = e.webpack.sources;
515
+ p.source = new n(p.data);
516
+ p.force = t.force;
517
+ await l.storePromise(p);
518
+ }
519
+ u = [p];
520
+ }
521
+ const n = t.priority || 0;
522
+ if (!c.has(n)) {
523
+ c.set(n, []);
524
+ }
525
+ c.get(n).push(...u);
526
+ }
527
+ }),
528
+ );
529
+ await (0, p.throttleAll)(this.options.concurrency || 100, u);
530
+ const l = [...c.entries()].sort((e, t) => e[0] - t[0]);
531
+ l.reduce((e, t) => e.concat(t[1]), [])
532
+ .filter(Boolean)
533
+ .forEach((e) => {
534
+ const {
535
+ absoluteFilename: t,
536
+ sourceFilename: o,
537
+ filename: i,
538
+ source: a,
539
+ force: s,
540
+ } = e;
541
+ const c = r.getAsset(i);
542
+ if (c) {
543
+ if (s) {
544
+ const s = { copied: true, sourceFilename: o };
545
+ n.log(
546
+ `force updating '${i}' from '${t}' to compilation assets, because it already exists...`,
547
+ );
548
+ r.updateAsset(i, a, { ...s, ...e.info });
549
+ n.log(
550
+ `force updated '${i}' from '${t}' to compilation assets, because it already exists`,
551
+ );
552
+ return;
553
+ }
554
+ n.log(
555
+ `skip adding '${i}' from '${t}' to compilation assets, because it already exists`,
556
+ );
557
+ return;
558
+ }
559
+ const u = { copied: true, sourceFilename: o };
560
+ n.log(
561
+ `writing '${i}' from '${t}' to compilation assets...`,
562
+ );
563
+ r.emitAsset(i, a, { ...u, ...e.info });
564
+ n.log(`written '${i}' from '${t}' to compilation assets`);
565
+ });
566
+ n.log('finished to adding additional assets');
567
+ i();
568
+ },
569
+ );
570
+ if (r.hooks.statsPrinter) {
571
+ r.hooks.statsPrinter.tap(t, (e) => {
572
+ e.hooks.print
573
+ .for('asset.info.copied')
574
+ .tap(
575
+ 'copy-webpack-plugin',
576
+ (e, { green: t, formatFlag: r }) =>
577
+ e ? t(r('copied')) : undefined,
578
+ );
579
+ });
580
+ }
581
+ });
582
+ }
583
+ }
584
+ var g = CopyPlugin;
585
+ t['default'] = g;
586
+ },
587
+ 552: (e, t) => {
588
+ 'use strict';
589
+ Object.defineProperty(t, '__esModule', { value: true });
590
+ t.readFile = readFile;
591
+ t.stat = stat;
592
+ t.throttleAll = throttleAll;
593
+ function stat(e, t) {
594
+ return new Promise((r, n) => {
595
+ e.stat(t, (e, t) => {
596
+ if (e) {
597
+ n(e);
598
+ }
599
+ r(t);
600
+ });
601
+ });
602
+ }
603
+ function readFile(e, t) {
604
+ return new Promise((r, n) => {
605
+ e.readFile(t, (e, t) => {
606
+ if (e) {
607
+ n(e);
608
+ }
609
+ r(t);
610
+ });
611
+ });
612
+ }
613
+ const r = Symbol(`not-settled`);
614
+ function throttleAll(e, t) {
615
+ if (!Number.isInteger(e) || e < 1) {
616
+ throw new TypeError(
617
+ `Expected \`limit\` to be a finite number > 0, got \`${e}\` (${typeof e})`,
618
+ );
619
+ }
620
+ if (!Array.isArray(t) || !t.every((e) => typeof e === `function`)) {
621
+ throw new TypeError(
622
+ `Expected \`tasks\` to be a list of functions returning a promise`,
623
+ );
624
+ }
625
+ return new Promise((n, o) => {
626
+ const i = Array(t.length).fill(r);
627
+ const a = t.entries();
628
+ const next = () => {
629
+ const { done: e, value: t } = a.next();
630
+ if (e) {
631
+ const e = !i.includes(r);
632
+ if (e) {
633
+ n(i);
634
+ }
635
+ return;
636
+ }
637
+ const [s, c] = t;
638
+ const onFulfilled = (e) => {
639
+ i[s] = e;
640
+ next();
641
+ };
642
+ c().then(onFulfilled, o);
643
+ };
644
+ Array(e).fill(0).forEach(next);
645
+ });
646
+ }
647
+ },
648
+ 677: (e, t, r) => {
649
+ 'use strict';
650
+ var n = r(654);
651
+ var o = r(17).posix.dirname;
652
+ var i = r(37).platform() === 'win32';
653
+ var a = '/';
654
+ var s = /\\/g;
655
+ var c = /\\([!*?|[\](){}])/g;
656
+ e.exports = function globParent(e, t) {
657
+ var r = Object.assign({ flipBackslashes: true }, t);
658
+ if (r.flipBackslashes && i && e.indexOf(a) < 0) {
659
+ e = e.replace(s, a);
660
+ }
661
+ if (isEnclosure(e)) {
662
+ e += a;
663
+ }
664
+ e += 'a';
665
+ do {
666
+ e = o(e);
667
+ } while (isGlobby(e));
668
+ return e.replace(c, '$1');
669
+ };
670
+ function isEnclosure(e) {
671
+ var t = e.slice(-1);
672
+ var r;
673
+ switch (t) {
674
+ case '}':
675
+ r = '{';
676
+ break;
677
+ case ']':
678
+ r = '[';
679
+ break;
680
+ default:
681
+ return false;
682
+ }
683
+ var n = e.indexOf(r);
684
+ if (n < 0) {
685
+ return false;
686
+ }
687
+ return e.slice(n + 1, -1).includes(a);
688
+ }
689
+ function isGlobby(e) {
690
+ if (/\([^()]+$/.test(e)) {
691
+ return true;
692
+ }
693
+ if (e[0] === '{' || e[0] === '[') {
694
+ return true;
695
+ }
696
+ if (/[^\\][{[]/.test(e)) {
697
+ return true;
698
+ }
699
+ return n(e);
700
+ }
701
+ },
702
+ 71: (e) => {
703
+ /*!
704
+ * is-extglob <https://github.com/jonschlinkert/is-extglob>
705
+ *
706
+ * Copyright (c) 2014-2016, Jon Schlinkert.
707
+ * Licensed under the MIT License.
708
+ */
709
+ e.exports = function isExtglob(e) {
710
+ if (typeof e !== 'string' || e === '') {
711
+ return false;
712
+ }
713
+ var t;
714
+ while ((t = /(\\).|([@?!+*]\(.*\))/g.exec(e))) {
715
+ if (t[2]) return true;
716
+ e = e.slice(t.index + t[0].length);
717
+ }
718
+ return false;
719
+ };
720
+ },
721
+ 654: (e, t, r) => {
722
+ /*!
723
+ * is-glob <https://github.com/jonschlinkert/is-glob>
724
+ *
725
+ * Copyright (c) 2014-2017, Jon Schlinkert.
726
+ * Released under the MIT License.
727
+ */
728
+ var n = r(71);
729
+ var o = { '{': '}', '(': ')', '[': ']' };
730
+ var strictCheck = function (e) {
731
+ if (e[0] === '!') {
732
+ return true;
733
+ }
734
+ var t = 0;
735
+ var r = -2;
736
+ var n = -2;
737
+ var i = -2;
738
+ var a = -2;
739
+ var s = -2;
740
+ while (t < e.length) {
741
+ if (e[t] === '*') {
742
+ return true;
743
+ }
744
+ if (e[t + 1] === '?' && /[\].+)]/.test(e[t])) {
745
+ return true;
746
+ }
747
+ if (n !== -1 && e[t] === '[' && e[t + 1] !== ']') {
748
+ if (n < t) {
749
+ n = e.indexOf(']', t);
750
+ }
751
+ if (n > t) {
752
+ if (s === -1 || s > n) {
753
+ return true;
754
+ }
755
+ s = e.indexOf('\\', t);
756
+ if (s === -1 || s > n) {
757
+ return true;
758
+ }
759
+ }
760
+ }
761
+ if (i !== -1 && e[t] === '{' && e[t + 1] !== '}') {
762
+ i = e.indexOf('}', t);
763
+ if (i > t) {
764
+ s = e.indexOf('\\', t);
765
+ if (s === -1 || s > i) {
766
+ return true;
767
+ }
768
+ }
769
+ }
770
+ if (
771
+ a !== -1 &&
772
+ e[t] === '(' &&
773
+ e[t + 1] === '?' &&
774
+ /[:!=]/.test(e[t + 2]) &&
775
+ e[t + 3] !== ')'
776
+ ) {
777
+ a = e.indexOf(')', t);
778
+ if (a > t) {
779
+ s = e.indexOf('\\', t);
780
+ if (s === -1 || s > a) {
781
+ return true;
782
+ }
783
+ }
784
+ }
785
+ if (r !== -1 && e[t] === '(' && e[t + 1] !== '|') {
786
+ if (r < t) {
787
+ r = e.indexOf('|', t);
788
+ }
789
+ if (r !== -1 && e[r + 1] !== ')') {
790
+ a = e.indexOf(')', r);
791
+ if (a > r) {
792
+ s = e.indexOf('\\', r);
793
+ if (s === -1 || s > a) {
794
+ return true;
795
+ }
796
+ }
797
+ }
798
+ }
799
+ if (e[t] === '\\') {
800
+ var c = e[t + 1];
801
+ t += 2;
802
+ var u = o[c];
803
+ if (u) {
804
+ var f = e.indexOf(u, t);
805
+ if (f !== -1) {
806
+ t = f + 1;
807
+ }
808
+ }
809
+ if (e[t] === '!') {
810
+ return true;
811
+ }
812
+ } else {
813
+ t++;
814
+ }
815
+ }
816
+ return false;
817
+ };
818
+ var relaxedCheck = function (e) {
819
+ if (e[0] === '!') {
820
+ return true;
821
+ }
822
+ var t = 0;
823
+ while (t < e.length) {
824
+ if (/[*?{}()[\]]/.test(e[t])) {
825
+ return true;
826
+ }
827
+ if (e[t] === '\\') {
828
+ var r = e[t + 1];
829
+ t += 2;
830
+ var n = o[r];
831
+ if (n) {
832
+ var i = e.indexOf(n, t);
833
+ if (i !== -1) {
834
+ t = i + 1;
835
+ }
836
+ }
837
+ if (e[t] === '!') {
838
+ return true;
839
+ }
840
+ } else {
841
+ t++;
842
+ }
843
+ }
844
+ return false;
845
+ };
846
+ e.exports = function isGlob(e, t) {
847
+ if (typeof e !== 'string' || e === '') {
848
+ return false;
849
+ }
850
+ if (n(e)) {
851
+ return true;
852
+ }
853
+ var r = strictCheck;
854
+ if (t && t.strict === false) {
855
+ r = relaxedCheck;
856
+ }
857
+ return r(e);
858
+ };
859
+ },
860
+ 498: (e) => {
861
+ /*!
862
+ * normalize-path <https://github.com/jonschlinkert/normalize-path>
863
+ *
864
+ * Copyright (c) 2014-2018, Jon Schlinkert.
865
+ * Released under the MIT License.
866
+ */
867
+ e.exports = function (e, t) {
868
+ if (typeof e !== 'string') {
869
+ throw new TypeError('expected path to be a string');
870
+ }
871
+ if (e === '\\' || e === '/') return '/';
872
+ var r = e.length;
873
+ if (r <= 1) return e;
874
+ var n = '';
875
+ if (r > 4 && e[3] === '\\') {
876
+ var o = e[2];
877
+ if ((o === '?' || o === '.') && e.slice(0, 2) === '\\\\') {
878
+ e = e.slice(2);
879
+ n = '//';
880
+ }
881
+ }
882
+ var i = e.split(/[/\\]+/);
883
+ if (t !== false && i[i.length - 1] === '') {
884
+ i.pop();
885
+ }
886
+ return n + i.join('/');
887
+ };
888
+ },
889
+ 856: (e, t, r) => {
890
+ e.exports = r(113).randomBytes;
891
+ },
892
+ 327: (e, t, r) => {
893
+ 'use strict';
894
+ var n = r(856);
895
+ var o = 16;
896
+ var i = generateUID();
897
+ var a = new RegExp(
898
+ '(\\\\)?"@__(F|R|D|M|S|A|U|I|B|L)-' + i + '-(\\d+)__@"',
899
+ 'g',
900
+ );
901
+ var s = /\{\s*\[native code\]\s*\}/g;
902
+ var c = /function.*?\(/;
903
+ var u = /.*?=>.*?/;
904
+ var f = /[<>\/\u2028\u2029]/g;
905
+ var l = ['*', 'async'];
906
+ var p = {
907
+ '<': '\\u003C',
908
+ '>': '\\u003E',
909
+ '/': '\\u002F',
910
+ '\u2028': '\\u2028',
911
+ '\u2029': '\\u2029',
912
+ };
913
+ function escapeUnsafeChars(e) {
914
+ return p[e];
915
+ }
916
+ function generateUID() {
917
+ var e = n(o);
918
+ var t = '';
919
+ for (var r = 0; r < o; ++r) {
920
+ t += e[r].toString(16);
921
+ }
922
+ return t;
923
+ }
924
+ function deleteFunctions(e) {
925
+ var t = [];
926
+ for (var r in e) {
927
+ if (typeof e[r] === 'function') {
928
+ t.push(r);
929
+ }
930
+ }
931
+ for (var n = 0; n < t.length; n++) {
932
+ delete e[t[n]];
933
+ }
934
+ }
935
+ e.exports = function serialize(e, t) {
936
+ t || (t = {});
937
+ if (typeof t === 'number' || typeof t === 'string') {
938
+ t = { space: t };
939
+ }
940
+ var r = [];
941
+ var n = [];
942
+ var o = [];
943
+ var p = [];
944
+ var d = [];
945
+ var g = [];
946
+ var h = [];
947
+ var m = [];
948
+ var b = [];
949
+ var y = [];
950
+ function replacer(e, a) {
951
+ if (t.ignoreFunction) {
952
+ deleteFunctions(a);
953
+ }
954
+ if (!a && a !== undefined && a !== BigInt(0)) {
955
+ return a;
956
+ }
957
+ var s = this[e];
958
+ var c = typeof s;
959
+ if (c === 'object') {
960
+ if (s instanceof RegExp) {
961
+ return '@__R-' + i + '-' + (n.push(s) - 1) + '__@';
962
+ }
963
+ if (s instanceof Date) {
964
+ return '@__D-' + i + '-' + (o.push(s) - 1) + '__@';
965
+ }
966
+ if (s instanceof Map) {
967
+ return '@__M-' + i + '-' + (p.push(s) - 1) + '__@';
968
+ }
969
+ if (s instanceof Set) {
970
+ return '@__S-' + i + '-' + (d.push(s) - 1) + '__@';
971
+ }
972
+ if (s instanceof Array) {
973
+ var u =
974
+ s.filter(function () {
975
+ return true;
976
+ }).length !== s.length;
977
+ if (u) {
978
+ return '@__A-' + i + '-' + (g.push(s) - 1) + '__@';
979
+ }
980
+ }
981
+ if (s instanceof URL) {
982
+ return '@__L-' + i + '-' + (y.push(s) - 1) + '__@';
983
+ }
984
+ }
985
+ if (c === 'function') {
986
+ return '@__F-' + i + '-' + (r.push(s) - 1) + '__@';
987
+ }
988
+ if (c === 'undefined') {
989
+ return '@__U-' + i + '-' + (h.push(s) - 1) + '__@';
990
+ }
991
+ if (c === 'number' && !isNaN(s) && !isFinite(s)) {
992
+ return '@__I-' + i + '-' + (m.push(s) - 1) + '__@';
993
+ }
994
+ if (c === 'bigint') {
995
+ return '@__B-' + i + '-' + (b.push(s) - 1) + '__@';
996
+ }
997
+ return a;
998
+ }
999
+ function serializeFunc(e) {
1000
+ var t = e.toString();
1001
+ if (s.test(t)) {
1002
+ throw new TypeError('Serializing native function: ' + e.name);
1003
+ }
1004
+ if (c.test(t)) {
1005
+ return t;
1006
+ }
1007
+ if (u.test(t)) {
1008
+ return t;
1009
+ }
1010
+ var r = t.indexOf('(');
1011
+ var n = t
1012
+ .substr(0, r)
1013
+ .trim()
1014
+ .split(' ')
1015
+ .filter(function (e) {
1016
+ return e.length > 0;
1017
+ });
1018
+ var o = n.filter(function (e) {
1019
+ return l.indexOf(e) === -1;
1020
+ });
1021
+ if (o.length > 0) {
1022
+ return (
1023
+ (n.indexOf('async') > -1 ? 'async ' : '') +
1024
+ 'function' +
1025
+ (n.join('').indexOf('*') > -1 ? '*' : '') +
1026
+ t.substr(r)
1027
+ );
1028
+ }
1029
+ return t;
1030
+ }
1031
+ if (t.ignoreFunction && typeof e === 'function') {
1032
+ e = undefined;
1033
+ }
1034
+ if (e === undefined) {
1035
+ return String(e);
1036
+ }
1037
+ var w;
1038
+ if (t.isJSON && !t.space) {
1039
+ w = JSON.stringify(e);
1040
+ } else {
1041
+ w = JSON.stringify(e, t.isJSON ? null : replacer, t.space);
1042
+ }
1043
+ if (typeof w !== 'string') {
1044
+ return String(w);
1045
+ }
1046
+ if (t.unsafe !== true) {
1047
+ w = w.replace(f, escapeUnsafeChars);
1048
+ }
1049
+ if (
1050
+ r.length === 0 &&
1051
+ n.length === 0 &&
1052
+ o.length === 0 &&
1053
+ p.length === 0 &&
1054
+ d.length === 0 &&
1055
+ g.length === 0 &&
1056
+ h.length === 0 &&
1057
+ m.length === 0 &&
1058
+ b.length === 0 &&
1059
+ y.length === 0
1060
+ ) {
1061
+ return w;
1062
+ }
1063
+ return w.replace(a, function (e, i, a, s) {
1064
+ if (i) {
1065
+ return e;
1066
+ }
1067
+ if (a === 'D') {
1068
+ return 'new Date("' + o[s].toISOString() + '")';
1069
+ }
1070
+ if (a === 'R') {
1071
+ return (
1072
+ 'new RegExp(' + serialize(n[s].source) + ', "' + n[s].flags + '")'
1073
+ );
1074
+ }
1075
+ if (a === 'M') {
1076
+ return 'new Map(' + serialize(Array.from(p[s].entries()), t) + ')';
1077
+ }
1078
+ if (a === 'S') {
1079
+ return 'new Set(' + serialize(Array.from(d[s].values()), t) + ')';
1080
+ }
1081
+ if (a === 'A') {
1082
+ return (
1083
+ 'Array.prototype.slice.call(' +
1084
+ serialize(Object.assign({ length: g[s].length }, g[s]), t) +
1085
+ ')'
1086
+ );
1087
+ }
1088
+ if (a === 'U') {
1089
+ return 'undefined';
1090
+ }
1091
+ if (a === 'I') {
1092
+ return m[s];
1093
+ }
1094
+ if (a === 'B') {
1095
+ return 'BigInt("' + b[s] + '")';
1096
+ }
1097
+ if (a === 'L') {
1098
+ return 'new URL("' + y[s].toString() + '")';
1099
+ }
1100
+ var c = r[s];
1101
+ return serializeFunc(c);
1102
+ });
1103
+ };
1104
+ },
1105
+ 739: (e) => {
1106
+ 'use strict';
1107
+ e.exports = require('../schema-utils3');
1108
+ },
1109
+ 684: (e) => {
1110
+ 'use strict';
1111
+ e.exports = require('./package.json');
1112
+ },
1113
+ 7: (e) => {
1114
+ 'use strict';
1115
+ e.exports = require('@modern-js/utils/fast-glob');
1116
+ },
1117
+ 937: (e) => {
1118
+ 'use strict';
1119
+ e.exports = require('@modern-js/utils/globby');
1120
+ },
1121
+ 113: (e) => {
1122
+ 'use strict';
1123
+ e.exports = require('crypto');
1124
+ },
1125
+ 37: (e) => {
1126
+ 'use strict';
1127
+ e.exports = require('os');
1128
+ },
1129
+ 17: (e) => {
1130
+ 'use strict';
1131
+ e.exports = require('path');
1132
+ },
1133
+ 452: (e) => {
1134
+ 'use strict';
1135
+ e.exports = JSON.parse(
1136
+ '{"definitions":{"ObjectPattern":{"type":"object","additionalProperties":false,"properties":{"from":{"type":"string","description":"Glob or path from where we copy files.","link":"https://github.com/webpack-contrib/copy-webpack-plugin#from","minLength":1},"to":{"anyOf":[{"type":"string"},{"instanceof":"Function"}],"description":"Output path.","link":"https://github.com/webpack-contrib/copy-webpack-plugin#to"},"context":{"type":"string","description":"A path that determines how to interpret the \'from\' path.","link":"https://github.com/webpack-contrib/copy-webpack-plugin#context"},"globOptions":{"type":"object","description":"Allows to configute the glob pattern matching library used by the plugin.","link":"https://github.com/webpack-contrib/copy-webpack-plugin#globoptions"},"filter":{"instanceof":"Function","description":"Allows to filter copied assets.","link":"https://github.com/webpack-contrib/copy-webpack-plugin#filter"},"transformAll":{"instanceof":"Function","description":"Allows you to modify the contents of multiple files and save the result to one file.","link":"https://github.com/webpack-contrib/copy-webpack-plugin#transformall"},"toType":{"enum":["dir","file","template"],"description":"Determinate what is to option - directory, file or template.","link":"https://github.com/webpack-contrib/copy-webpack-plugin#totype"},"force":{"type":"boolean","description":"Overwrites files already in \'compilation.assets\' (usually added by other plugins/loaders).","link":"https://github.com/webpack-contrib/copy-webpack-plugin#force"},"priority":{"type":"number","description":"Allows to specify the priority of copying files with the same destination name.","link":"https://github.com/webpack-contrib/copy-webpack-plugin#priority"},"info":{"anyOf":[{"type":"object"},{"instanceof":"Function"}],"description":"Allows to add assets info.","link":"https://github.com/webpack-contrib/copy-webpack-plugin#info"},"transform":{"description":"Allows to modify the file contents.","link":"https://github.com/webpack-contrib/copy-webpack-plugin#transform","anyOf":[{"instanceof":"Function"},{"type":"object","additionalProperties":false,"properties":{"transformer":{"instanceof":"Function","description":"Allows to modify the file contents.","link":"https://github.com/webpack-contrib/copy-webpack-plugin#transformer"},"cache":{"description":"Enables/disables and configure caching.","link":"https://github.com/webpack-contrib/copy-webpack-plugin#cache","anyOf":[{"type":"boolean"},{"type":"object","additionalProperties":false,"properties":{"keys":{"anyOf":[{"type":"object","additionalProperties":true},{"instanceof":"Function"}]}}}]}}}]},"transformPath":{"instanceof":"Function"},"noErrorOnMissing":{"type":"boolean","description":"Doesn\'t generate an error on missing file(s).","link":"https://github.com/webpack-contrib/copy-webpack-plugin#noerroronmissing"}},"required":["from"]},"StringPattern":{"type":"string","minLength":1}},"type":"object","additionalProperties":false,"properties":{"patterns":{"type":"array","minItems":1,"items":{"anyOf":[{"$ref":"#/definitions/StringPattern"},{"$ref":"#/definitions/ObjectPattern"}]}},"options":{"type":"object","additionalProperties":false,"properties":{"concurrency":{"type":"number","description":"Limits the number of simultaneous requests to fs.","link":"https://github.com/webpack-contrib/copy-webpack-plugin#concurrency"}}}},"required":["patterns"]}',
1137
+ );
1138
+ },
1139
+ };
1140
+ var t = {};
1141
+ function __nccwpck_require__(r) {
1142
+ var n = t[r];
1143
+ if (n !== undefined) {
1144
+ return n.exports;
1145
+ }
1146
+ var o = (t[r] = { exports: {} });
1147
+ var i = true;
1148
+ try {
1149
+ e[r](o, o.exports, __nccwpck_require__);
1150
+ i = false;
1151
+ } finally {
1152
+ if (i) delete t[r];
1153
+ }
1154
+ return o.exports;
1155
+ }
1156
+ if (typeof __nccwpck_require__ !== 'undefined')
1157
+ __nccwpck_require__.ab = __dirname + '/';
1158
+ var r = __nccwpck_require__(793);
1159
+ module.exports = r;
1160
+ })();