rollup 2.63.0 → 2.66.1

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.
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.63.0
4
- Tue, 04 Jan 2022 07:30:25 GMT - commit ae674c9edde5efb8ce6d8ef845598a805938178c
3
+ Rollup.js v2.66.1
4
+ Tue, 25 Jan 2022 07:58:28 GMT - commit f523f0098d3e98f87abef54f48f39d06a7cc7eec
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -10,10 +10,12 @@
10
10
  */
11
11
  'use strict';
12
12
 
13
- const path$2 = require('path');
13
+ const require$$0 = require('path');
14
+ const process$1 = require('process');
15
+ const perf_hooks = require('perf_hooks');
14
16
  const crypto = require('crypto');
15
17
  const fs = require('fs');
16
- const require$$0 = require('events');
18
+ const require$$0$1 = require('events');
17
19
 
18
20
  function _interopNamespaceDefault(e) {
19
21
  const n = Object.create(null);
@@ -26,7 +28,7 @@ function _interopNamespaceDefault(e) {
26
28
  return n;
27
29
  }
28
30
 
29
- var version$1 = "2.63.0";
31
+ var version$1 = "2.66.1";
30
32
 
31
33
  function ensureArray$1(items) {
32
34
  if (Array.isArray(items)) {
@@ -140,13 +142,13 @@ function normalize(path) {
140
142
  }
141
143
 
142
144
  function getAliasName(id) {
143
- const base = path$2.basename(id);
144
- return base.substr(0, base.length - path$2.extname(id).length);
145
+ const base = require$$0.basename(id);
146
+ return base.substr(0, base.length - require$$0.extname(id).length);
145
147
  }
146
148
  function relativeId(id) {
147
149
  if (!isAbsolute(id))
148
150
  return id;
149
- return path$2.relative(path$2.resolve(), id);
151
+ return require$$0.relative(require$$0.resolve(), id);
150
152
  }
151
153
  function isPathFragment(name) {
152
154
  // starting with "/", "./", "../", "C:/"
@@ -379,22 +381,22 @@ function errMixedExport(facadeModuleId, name) {
379
381
  url: `https://rollupjs.org/guide/en/#outputexports`
380
382
  };
381
383
  }
382
- function errNamespaceConflict(name, reexportingModule, additionalExportAllModule) {
384
+ function errNamespaceConflict(name, reexportingModuleId, sources) {
383
385
  return {
384
386
  code: Errors.NAMESPACE_CONFLICT,
385
- message: `Conflicting namespaces: "${relativeId(reexportingModule.id)}" re-exports "${name}" from both "${relativeId(reexportingModule.exportsAll[name])}" and "${relativeId(additionalExportAllModule.exportsAll[name])}" (will be ignored)`,
387
+ message: `Conflicting namespaces: "${relativeId(reexportingModuleId)}" re-exports "${name}" from one of the modules ${printQuotedStringList(sources.map(moduleId => relativeId(moduleId)))} (will be ignored)`,
386
388
  name,
387
- reexporter: reexportingModule.id,
388
- sources: [reexportingModule.exportsAll[name], additionalExportAllModule.exportsAll[name]]
389
+ reexporter: reexportingModuleId,
390
+ sources
389
391
  };
390
392
  }
391
- function errAmbiguousExternalNamespaces(name, reexportingModule, usedExternalModule, externalModules) {
393
+ function errAmbiguousExternalNamespaces(name, reexportingModule, usedModule, sources) {
392
394
  return {
393
395
  code: Errors.AMBIGUOUS_EXTERNAL_NAMESPACES,
394
- message: `Ambiguous external namespace resolution: "${relativeId(reexportingModule)}" re-exports "${name}" from one of the external modules ${printQuotedStringList(externalModules.map(module => relativeId(module)))}, guessing "${relativeId(usedExternalModule)}".`,
396
+ message: `Ambiguous external namespace resolution: "${relativeId(reexportingModule)}" re-exports "${name}" from one of the external modules ${printQuotedStringList(sources.map(module => relativeId(module)))}, guessing "${relativeId(usedModule)}".`,
395
397
  name,
396
398
  reexporter: reexportingModule,
397
- sources: externalModules
399
+ sources
398
400
  };
399
401
  }
400
402
  function errNoTransformMapOrAstWithoutCode(pluginName) {
@@ -418,7 +420,7 @@ function errSyntheticNamedExportsNeedNamespaceExport(id, syntheticNamedExportsOp
418
420
  code: Errors.SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT,
419
421
  id,
420
422
  message: `Module "${relativeId(id)}" that is marked with 'syntheticNamedExports: ${JSON.stringify(syntheticNamedExportsOption)}' needs ${typeof syntheticNamedExportsOption === 'string' && syntheticNamedExportsOption !== 'default'
421
- ? `an export named "${syntheticNamedExportsOption}"`
423
+ ? `an explicit export named "${syntheticNamedExportsOption}"`
422
424
  : 'a default export'} that does not reexport an unresolved named export of the same module.`
423
425
  };
424
426
  }
@@ -584,9 +586,8 @@ const getHashFromObjectOption = (optionName) => optionName.split('.').join('').t
584
586
  let fsEvents;
585
587
  let fsEventsImportError;
586
588
  async function loadFsEvents() {
587
- const moduleName = 'fsevents';
588
589
  try {
589
- ({ default: fsEvents } = await Promise.resolve().then(() => /*#__PURE__*/_interopNamespaceDefault(require(moduleName))));
590
+ ({ default: fsEvents } = await Promise.resolve().then(() => /*#__PURE__*/_interopNamespaceDefault(require('fsevents'))));
590
591
  }
591
592
  catch (err) {
592
593
  fsEventsImportError = err;
@@ -624,8 +625,8 @@ function getAugmentedNamespace(n) {
624
625
 
625
626
  var charToInteger = {};
626
627
  var chars$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
627
- for (var i = 0; i < chars$1.length; i++) {
628
- charToInteger[chars$1.charCodeAt(i)] = i;
628
+ for (var i$1 = 0; i$1 < chars$1.length; i$1++) {
629
+ charToInteger[chars$1.charCodeAt(i$1)] = i$1;
629
630
  }
630
631
  function decode(mappings) {
631
632
  var decoded = [];
@@ -2343,14 +2344,17 @@ class ExternalModule {
2343
2344
  this.info = {
2344
2345
  ast: null,
2345
2346
  code: null,
2347
+ dynamicallyImportedIdResolutions: EMPTY_ARRAY,
2346
2348
  dynamicallyImportedIds: EMPTY_ARRAY,
2347
2349
  get dynamicImporters() {
2348
2350
  return dynamicImporters.sort();
2349
2351
  },
2352
+ hasDefaultExport: null,
2350
2353
  hasModuleSideEffects,
2351
2354
  id,
2352
2355
  implicitlyLoadedAfterOneOf: EMPTY_ARRAY,
2353
2356
  implicitlyLoadedBefore: EMPTY_ARRAY,
2357
+ importedIdResolutions: EMPTY_ARRAY,
2354
2358
  importedIds: EMPTY_ARRAY,
2355
2359
  get importers() {
2356
2360
  return importers.sort();
@@ -2365,17 +2369,17 @@ class ExternalModule {
2365
2369
  getVariableForExportName(name) {
2366
2370
  let declaration = this.declarations[name];
2367
2371
  if (declaration)
2368
- return declaration;
2372
+ return [declaration];
2369
2373
  this.declarations[name] = declaration = new ExternalVariable(this, name);
2370
2374
  this.exportedVariables.set(declaration, name);
2371
- return declaration;
2375
+ return [declaration];
2372
2376
  }
2373
2377
  setRenderPath(options, inputBase) {
2374
2378
  this.renderPath =
2375
2379
  typeof options.paths === 'function' ? options.paths(this.id) : options.paths[this.id];
2376
2380
  if (!this.renderPath) {
2377
2381
  this.renderPath = this.renormalizeRenderPath
2378
- ? normalize(path$2.relative(inputBase, this.id))
2382
+ ? normalize(require$$0.relative(inputBase, this.id))
2379
2383
  : this.id;
2380
2384
  }
2381
2385
  return this.renderPath;
@@ -2418,7 +2422,7 @@ class ExternalModule {
2418
2422
 
2419
2423
  var utils$3 = {};
2420
2424
 
2421
- const path$1 = path$2;
2425
+ const path$1 = require$$0;
2422
2426
  const WIN_SLASH = '\\\\/';
2423
2427
  const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
2424
2428
 
@@ -2598,7 +2602,7 @@ var constants$2 = {
2598
2602
 
2599
2603
  (function (exports) {
2600
2604
 
2601
- const path = path$2;
2605
+ const path = require$$0;
2602
2606
  const win32 = process.platform === 'win32';
2603
2607
  const {
2604
2608
  REGEX_BACKSLASH,
@@ -3295,7 +3299,14 @@ const parse$1 = (input, options) => {
3295
3299
  }
3296
3300
 
3297
3301
  if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
3298
- output = token.close = `)${rest})${extglobStar})`;
3302
+ // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis.
3303
+ // In this case, we need to parse the string and use it in the output of the original pattern.
3304
+ // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`.
3305
+ //
3306
+ // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`.
3307
+ const expression = parse$1(rest, { ...options, fastpaths: false }).output;
3308
+
3309
+ output = token.close = `)${expression})${extglobStar})`;
3299
3310
  }
3300
3311
 
3301
3312
  if (token.prev.type === 'bos') {
@@ -4128,7 +4139,7 @@ parse$1.fastpaths = (input, options) => {
4128
4139
 
4129
4140
  var parse_1 = parse$1;
4130
4141
 
4131
- const path = path$2;
4142
+ const path = require$$0;
4132
4143
  const scan = scan_1;
4133
4144
  const parse = parse_1;
4134
4145
  const utils = utils$3;
@@ -4521,22 +4532,22 @@ function ensureArray(thing) {
4521
4532
  }
4522
4533
 
4523
4534
  const normalizePath = function normalizePath(filename) {
4524
- return filename.split(path$2.win32.sep).join(path$2.posix.sep);
4535
+ return filename.split(require$$0.win32.sep).join(require$$0.posix.sep);
4525
4536
  };
4526
4537
 
4527
4538
  function getMatcherString(id, resolutionBase) {
4528
- if (resolutionBase === false || path$2.isAbsolute(id) || id.startsWith('*')) {
4539
+ if (resolutionBase === false || require$$0.isAbsolute(id) || id.startsWith('*')) {
4529
4540
  return id;
4530
4541
  }
4531
4542
  // resolve('') is valid and will default to process.cwd()
4532
- const basePath = normalizePath(path$2.resolve(resolutionBase || ''))
4543
+ const basePath = normalizePath(require$$0.resolve(resolutionBase || ''))
4533
4544
  // escape all possible (posix + win) path characters that might interfere with regex
4534
4545
  .replace(/[-^$*+?.()|[\]{}]/g, '\\$&');
4535
4546
  // Note that we use posix.join because:
4536
4547
  // 1. the basePath has been normalized to use /
4537
4548
  // 2. the incoming glob (id) matcher, also uses /
4538
4549
  // otherwise Node will force backslash (\) on windows
4539
- return path$2.posix.join(basePath, id);
4550
+ return require$$0.posix.join(basePath, id);
4540
4551
  }
4541
4552
  const createFilter = function createFilter(include, exclude, options) {
4542
4553
  const resolutionBase = options && options.resolve;
@@ -4890,10 +4901,10 @@ const SequenceExpression$1 = 'SequenceExpression';
4890
4901
 
4891
4902
  // this looks ridiculous, but it prevents sourcemap tooling from mistaking
4892
4903
  // this for an actual sourceMappingURL
4893
- let SOURCEMAPPING_URL = 'sourceMa';
4894
- SOURCEMAPPING_URL += 'ppingURL';
4904
+ exports.SOURCEMAPPING_URL = 'sourceMa';
4905
+ exports.SOURCEMAPPING_URL += 'ppingURL';
4895
4906
  const whiteSpaceNoNewline = '[ \\f\\r\\t\\v\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]';
4896
- const SOURCEMAPPING_URL_RE = new RegExp(`^#${whiteSpaceNoNewline}+${SOURCEMAPPING_URL}=.+`);
4907
+ const SOURCEMAPPING_URL_RE = new RegExp(`^#${whiteSpaceNoNewline}+${exports.SOURCEMAPPING_URL}=.+`);
4897
4908
 
4898
4909
  // patch up acorn-walk until class-fields are officially supported
4899
4910
  base$1.PropertyDefinition = function (node, st, c) {
@@ -10901,7 +10912,7 @@ class MetaProperty extends NodeBase {
10901
10912
  chunkReferenceId = metaProperty.substr(CHUNK_PREFIX.length);
10902
10913
  fileName = outputPluginDriver.getFileName(chunkReferenceId);
10903
10914
  }
10904
- const relativePath = normalize(path$2.relative(path$2.dirname(chunkId), fileName));
10915
+ const relativePath = normalize(require$$0.relative(require$$0.dirname(chunkId), fileName));
10905
10916
  let replacement;
10906
10917
  if (assetReferenceId !== null) {
10907
10918
  replacement = outputPluginDriver.hookFirstSync('resolveAssetUrl', [
@@ -12143,24 +12154,7 @@ function getOriginalLocation(sourcemapChain, location) {
12143
12154
  }
12144
12155
 
12145
12156
  const NOOP = () => { };
12146
- let getStartTime = () => [0, 0];
12147
- let getElapsedTime = () => 0;
12148
- let getMemory = () => 0;
12149
- let timers = {};
12150
- const normalizeHrTime = (time) => time[0] * 1e3 + time[1] / 1e6;
12151
- function setTimeHelpers() {
12152
- if (typeof process !== 'undefined' && typeof process.hrtime === 'function') {
12153
- getStartTime = process.hrtime.bind(process);
12154
- getElapsedTime = previous => normalizeHrTime(process.hrtime(previous));
12155
- }
12156
- else if (typeof performance !== 'undefined' && typeof performance.now === 'function') {
12157
- getStartTime = () => [performance.now(), 0];
12158
- getElapsedTime = previous => performance.now() - previous[0];
12159
- }
12160
- if (typeof process !== 'undefined' && typeof process.memoryUsage === 'function') {
12161
- getMemory = () => process.memoryUsage().heapUsed;
12162
- }
12163
- }
12157
+ let timers = new Map();
12164
12158
  function getPersistedLabel(label, level) {
12165
12159
  switch (level) {
12166
12160
  case 1:
@@ -12175,58 +12169,59 @@ function getPersistedLabel(label, level) {
12175
12169
  }
12176
12170
  function timeStartImpl(label, level = 3) {
12177
12171
  label = getPersistedLabel(label, level);
12178
- if (!timers.hasOwnProperty(label)) {
12179
- timers[label] = {
12172
+ const startMemory = process$1.memoryUsage().heapUsed;
12173
+ const startTime = perf_hooks.performance.now();
12174
+ const timer = timers.get(label);
12175
+ if (timer === undefined) {
12176
+ timers.set(label, {
12180
12177
  memory: 0,
12181
- startMemory: undefined,
12182
- startTime: undefined,
12178
+ startMemory,
12179
+ startTime,
12183
12180
  time: 0,
12184
12181
  totalMemory: 0
12185
- };
12182
+ });
12183
+ }
12184
+ else {
12185
+ timer.startMemory = startMemory;
12186
+ timer.startTime = startTime;
12186
12187
  }
12187
- const currentMemory = getMemory();
12188
- timers[label].startTime = getStartTime();
12189
- timers[label].startMemory = currentMemory;
12190
12188
  }
12191
12189
  function timeEndImpl(label, level = 3) {
12192
12190
  label = getPersistedLabel(label, level);
12193
- if (timers.hasOwnProperty(label)) {
12194
- const currentMemory = getMemory();
12195
- timers[label].time += getElapsedTime(timers[label].startTime);
12196
- timers[label].totalMemory = Math.max(timers[label].totalMemory, currentMemory);
12197
- timers[label].memory += currentMemory - timers[label].startMemory;
12191
+ const timer = timers.get(label);
12192
+ if (timer !== undefined) {
12193
+ const currentMemory = process$1.memoryUsage().heapUsed;
12194
+ timer.memory += currentMemory - timer.startMemory;
12195
+ timer.time += perf_hooks.performance.now() - timer.startTime;
12196
+ timer.totalMemory = Math.max(timer.totalMemory, currentMemory);
12198
12197
  }
12199
12198
  }
12200
12199
  function getTimings() {
12201
12200
  const newTimings = {};
12202
- for (const [label, { time, memory, totalMemory }] of Object.entries(timers)) {
12201
+ for (const [label, { memory, time, totalMemory }] of timers) {
12203
12202
  newTimings[label] = [time, memory, totalMemory];
12204
12203
  }
12205
12204
  return newTimings;
12206
12205
  }
12207
- let timeStart = NOOP, timeEnd = NOOP;
12208
- const TIMED_PLUGIN_HOOKS = {
12209
- load: true,
12210
- resolveDynamicImport: true,
12211
- resolveId: true,
12212
- transform: true
12213
- };
12206
+ let timeStart = NOOP;
12207
+ let timeEnd = NOOP;
12208
+ const TIMED_PLUGIN_HOOKS = ['load', 'resolveDynamicImport', 'resolveId', 'transform'];
12214
12209
  function getPluginWithTimers(plugin, index) {
12215
- const timedPlugin = {};
12216
- for (const hook of Object.keys(plugin)) {
12217
- if (TIMED_PLUGIN_HOOKS[hook] === true) {
12210
+ for (const hook of TIMED_PLUGIN_HOOKS) {
12211
+ if (hook in plugin) {
12218
12212
  let timerLabel = `plugin ${index}`;
12219
12213
  if (plugin.name) {
12220
12214
  timerLabel += ` (${plugin.name})`;
12221
12215
  }
12222
12216
  timerLabel += ` - ${hook}`;
12223
- timedPlugin[hook] = function (...args) {
12217
+ const func = plugin[hook];
12218
+ plugin[hook] = function (...args) {
12224
12219
  timeStart(timerLabel, 4);
12225
- let result = plugin[hook].apply(this === timedPlugin ? plugin : this, args);
12220
+ const result = func.apply(this, args);
12226
12221
  timeEnd(timerLabel, 4);
12227
12222
  if (result && typeof result.then === 'function') {
12228
12223
  timeStart(`${timerLabel} (async)`, 4);
12229
- result = result.then((hookResult) => {
12224
+ return result.then((hookResult) => {
12230
12225
  timeEnd(`${timerLabel} (async)`, 4);
12231
12226
  return hookResult;
12232
12227
  });
@@ -12234,16 +12229,12 @@ function getPluginWithTimers(plugin, index) {
12234
12229
  return result;
12235
12230
  };
12236
12231
  }
12237
- else {
12238
- timedPlugin[hook] = plugin[hook];
12239
- }
12240
12232
  }
12241
- return timedPlugin;
12233
+ return plugin;
12242
12234
  }
12243
12235
  function initialiseTimers(inputOptions) {
12244
12236
  if (inputOptions.perf) {
12245
- timers = {};
12246
- setTimeHelpers();
12237
+ timers = new Map();
12247
12238
  timeStart = timeStartImpl;
12248
12239
  timeEnd = timeEndImpl;
12249
12240
  inputOptions.plugins = inputOptions.plugins.map(getPluginWithTimers);
@@ -12276,11 +12267,11 @@ const MISSING_EXPORT_SHIM_DESCRIPTION = {
12276
12267
  identifier: null,
12277
12268
  localName: MISSING_EXPORT_SHIM_VARIABLE
12278
12269
  };
12279
- function getVariableForExportNameRecursive(target, name, importerForSideEffects, isExportAllSearch, searchedNamesAndModules = new Map(), skipExternalNamespaceReexports) {
12270
+ function getVariableForExportNameRecursive(target, name, importerForSideEffects, isExportAllSearch, searchedNamesAndModules = new Map()) {
12280
12271
  const searchedModules = searchedNamesAndModules.get(name);
12281
12272
  if (searchedModules) {
12282
12273
  if (searchedModules.has(target)) {
12283
- return isExportAllSearch ? null : error(errCircularReexport(name, target.id));
12274
+ return isExportAllSearch ? [null] : error(errCircularReexport(name, target.id));
12284
12275
  }
12285
12276
  searchedModules.add(target);
12286
12277
  }
@@ -12290,8 +12281,7 @@ function getVariableForExportNameRecursive(target, name, importerForSideEffects,
12290
12281
  return target.getVariableForExportName(name, {
12291
12282
  importerForSideEffects,
12292
12283
  isExportAllSearch,
12293
- searchedNamesAndModules,
12294
- skipExternalNamespaceReexports
12284
+ searchedNamesAndModules
12295
12285
  });
12296
12286
  }
12297
12287
  function getAndExtendSideEffectModules(variable, module) {
@@ -12337,7 +12327,6 @@ class Module {
12337
12327
  this.execIndex = Infinity;
12338
12328
  this.exportAllSources = new Set();
12339
12329
  this.exports = Object.create(null);
12340
- this.exportsAll = Object.create(null);
12341
12330
  this.implicitlyLoadedAfter = new Set();
12342
12331
  this.implicitlyLoadedBefore = new Set();
12343
12332
  this.importDescriptions = Object.create(null);
@@ -12372,6 +12361,11 @@ class Module {
12372
12361
  this.info = {
12373
12362
  ast: null,
12374
12363
  code: null,
12364
+ get dynamicallyImportedIdResolutions() {
12365
+ return module.dynamicImports
12366
+ .map(({ argument }) => typeof argument === 'string' && module.resolvedIds[argument])
12367
+ .filter(Boolean);
12368
+ },
12375
12369
  get dynamicallyImportedIds() {
12376
12370
  const dynamicallyImportedIds = [];
12377
12371
  for (const { id } of module.dynamicImports) {
@@ -12384,6 +12378,13 @@ class Module {
12384
12378
  get dynamicImporters() {
12385
12379
  return module.dynamicImporters.sort();
12386
12380
  },
12381
+ get hasDefaultExport() {
12382
+ // This information is only valid after parsing
12383
+ if (!module.ast) {
12384
+ return null;
12385
+ }
12386
+ return 'default' in module.exports || 'default' in module.reexportDescriptions;
12387
+ },
12387
12388
  hasModuleSideEffects,
12388
12389
  id,
12389
12390
  get implicitlyLoadedAfterOneOf() {
@@ -12392,6 +12393,9 @@ class Module {
12392
12393
  get implicitlyLoadedBefore() {
12393
12394
  return Array.from(module.implicitlyLoadedBefore, getId).sort();
12394
12395
  },
12396
+ get importedIdResolutions() {
12397
+ return Array.from(module.sources, source => module.resolvedIds[source]).filter(Boolean);
12398
+ },
12395
12399
  get importedIds() {
12396
12400
  return Array.from(module.sources, source => { var _a; return (_a = module.resolvedIds[source]) === null || _a === void 0 ? void 0 : _a.id; }).filter(Boolean);
12397
12401
  },
@@ -12406,13 +12410,13 @@ class Module {
12406
12410
  }
12407
12411
  return module.isIncluded();
12408
12412
  },
12409
- meta,
12413
+ meta: { ...meta },
12410
12414
  syntheticNamedExports
12411
12415
  };
12412
12416
  }
12413
12417
  basename() {
12414
- const base = path$2.basename(this.id);
12415
- const ext = path$2.extname(this.id);
12418
+ const base = require$$0.basename(this.id);
12419
+ const ext = require$$0.extname(this.id);
12416
12420
  return makeLegal(ext ? base.slice(0, -ext.length) : base);
12417
12421
  }
12418
12422
  bindReferences() {
@@ -12427,7 +12431,7 @@ class Module {
12427
12431
  return this.allExportNames;
12428
12432
  }
12429
12433
  const allExportNames = (this.allExportNames = new Set());
12430
- for (const name of Object.keys(this.exports)) {
12434
+ for (const name of this.getExports()) {
12431
12435
  allExportNames.add(name);
12432
12436
  }
12433
12437
  for (const name of Object.keys(this.reexportDescriptions)) {
@@ -12443,6 +12447,11 @@ class Module {
12443
12447
  allExportNames.add(name);
12444
12448
  }
12445
12449
  }
12450
+ // We do not count the synthetic namespace as a regular export to hide it
12451
+ // from entry signatures and namespace objects
12452
+ if (typeof this.info.syntheticNamedExports === 'string') {
12453
+ allExportNames.delete(this.info.syntheticNamedExports);
12454
+ }
12446
12455
  return allExportNames;
12447
12456
  }
12448
12457
  getDependenciesToBeIncluded() {
@@ -12451,14 +12460,13 @@ class Module {
12451
12460
  const relevantDependencies = new Set();
12452
12461
  const necessaryDependencies = new Set();
12453
12462
  const alwaysCheckedDependencies = new Set();
12454
- let dependencyVariables = this.imports.keys();
12463
+ const dependencyVariables = new Set(this.imports);
12455
12464
  if (this.info.isEntry ||
12456
12465
  this.includedDynamicImporters.length > 0 ||
12457
12466
  this.namespace.included ||
12458
12467
  this.implicitlyLoadedAfter.size > 0) {
12459
- dependencyVariables = new Set(dependencyVariables);
12460
12468
  for (const exportName of [...this.getReexports(), ...this.getExports()]) {
12461
- const exportedVariable = this.getVariableForExportName(exportName);
12469
+ const [exportedVariable] = this.getVariableForExportName(exportName);
12462
12470
  if (exportedVariable) {
12463
12471
  dependencyVariables.add(exportedVariable);
12464
12472
  }
@@ -12498,9 +12506,7 @@ class Module {
12498
12506
  }
12499
12507
  const exportNamesByVariable = new Map();
12500
12508
  for (const exportName of this.getAllExportNames()) {
12501
- if (exportName === this.info.syntheticNamedExports)
12502
- continue;
12503
- let tracedVariable = this.getVariableForExportName(exportName);
12509
+ let [tracedVariable] = this.getVariableForExportName(exportName);
12504
12510
  if (tracedVariable instanceof ExportDefaultVariable) {
12505
12511
  tracedVariable = tracedVariable.getOriginalVariable();
12506
12512
  }
@@ -12549,7 +12555,7 @@ class Module {
12549
12555
  const renderedExports = [];
12550
12556
  const removedExports = [];
12551
12557
  for (const exportName in this.exports) {
12552
- const variable = this.getVariableForExportName(exportName);
12558
+ const [variable] = this.getVariableForExportName(exportName);
12553
12559
  (variable && variable.included ? renderedExports : removedExports).push(exportName);
12554
12560
  }
12555
12561
  return { removedExports, renderedExports };
@@ -12557,20 +12563,20 @@ class Module {
12557
12563
  getSyntheticNamespace() {
12558
12564
  if (this.syntheticNamespace === null) {
12559
12565
  this.syntheticNamespace = undefined;
12560
- this.syntheticNamespace = this.getVariableForExportName(typeof this.info.syntheticNamedExports === 'string'
12566
+ [this.syntheticNamespace] = this.getVariableForExportName(typeof this.info.syntheticNamedExports === 'string'
12561
12567
  ? this.info.syntheticNamedExports
12562
- : 'default');
12568
+ : 'default', { onlyExplicit: true });
12563
12569
  }
12564
12570
  if (!this.syntheticNamespace) {
12565
12571
  return error(errSyntheticNamedExportsNeedNamespaceExport(this.id, this.info.syntheticNamedExports));
12566
12572
  }
12567
12573
  return this.syntheticNamespace;
12568
12574
  }
12569
- getVariableForExportName(name, { importerForSideEffects, isExportAllSearch, searchedNamesAndModules, skipExternalNamespaceReexports } = EMPTY_OBJECT) {
12575
+ getVariableForExportName(name, { importerForSideEffects, isExportAllSearch, onlyExplicit, searchedNamesAndModules } = EMPTY_OBJECT) {
12570
12576
  if (name[0] === '*') {
12571
12577
  if (name.length === 1) {
12572
12578
  // export * from './other'
12573
- return this.namespace;
12579
+ return [this.namespace];
12574
12580
  }
12575
12581
  else {
12576
12582
  // export * from 'external'
@@ -12581,19 +12587,19 @@ class Module {
12581
12587
  // export { foo } from './other'
12582
12588
  const reexportDeclaration = this.reexportDescriptions[name];
12583
12589
  if (reexportDeclaration) {
12584
- const variable = getVariableForExportNameRecursive(reexportDeclaration.module, reexportDeclaration.localName, importerForSideEffects, false, searchedNamesAndModules, false);
12590
+ const [variable] = getVariableForExportNameRecursive(reexportDeclaration.module, reexportDeclaration.localName, importerForSideEffects, false, searchedNamesAndModules);
12585
12591
  if (!variable) {
12586
12592
  return this.error(errMissingExport(reexportDeclaration.localName, this.id, reexportDeclaration.module.id), reexportDeclaration.start);
12587
12593
  }
12588
12594
  if (importerForSideEffects) {
12589
12595
  setAlternativeExporterIfCyclic(variable, importerForSideEffects, this);
12590
12596
  }
12591
- return variable;
12597
+ return [variable];
12592
12598
  }
12593
12599
  const exportDeclaration = this.exports[name];
12594
12600
  if (exportDeclaration) {
12595
12601
  if (exportDeclaration === MISSING_EXPORT_SHIM_DESCRIPTION) {
12596
- return this.exportShimVariable;
12602
+ return [this.exportShimVariable];
12597
12603
  }
12598
12604
  const name = exportDeclaration.localName;
12599
12605
  const variable = this.traceVariable(name, importerForSideEffects);
@@ -12601,38 +12607,34 @@ class Module {
12601
12607
  getOrCreate(importerForSideEffects.sideEffectDependenciesByVariable, variable, () => new Set()).add(this);
12602
12608
  setAlternativeExporterIfCyclic(variable, importerForSideEffects, this);
12603
12609
  }
12604
- return variable;
12610
+ return [variable];
12611
+ }
12612
+ if (onlyExplicit) {
12613
+ return [null];
12605
12614
  }
12606
12615
  if (name !== 'default') {
12607
12616
  const foundNamespaceReexport = name in this.namespaceReexportsByName
12608
12617
  ? this.namespaceReexportsByName[name]
12609
- : this.getVariableFromNamespaceReexports(name, importerForSideEffects, searchedNamesAndModules, skipExternalNamespaceReexports);
12610
- if (!skipExternalNamespaceReexports) {
12611
- this.namespaceReexportsByName[name] = foundNamespaceReexport;
12612
- }
12613
- if (foundNamespaceReexport) {
12618
+ : this.getVariableFromNamespaceReexports(name, importerForSideEffects, searchedNamesAndModules);
12619
+ this.namespaceReexportsByName[name] = foundNamespaceReexport;
12620
+ if (foundNamespaceReexport[0]) {
12614
12621
  return foundNamespaceReexport;
12615
12622
  }
12616
12623
  }
12617
12624
  if (this.info.syntheticNamedExports) {
12618
- let syntheticExport = this.syntheticExports.get(name);
12619
- if (!syntheticExport) {
12620
- const syntheticNamespace = this.getSyntheticNamespace();
12621
- syntheticExport = new SyntheticNamedExportVariable(this.astContext, name, syntheticNamespace);
12622
- this.syntheticExports.set(name, syntheticExport);
12623
- return syntheticExport;
12624
- }
12625
- return syntheticExport;
12625
+ return [
12626
+ getOrCreate(this.syntheticExports, name, () => new SyntheticNamedExportVariable(this.astContext, name, this.getSyntheticNamespace()))
12627
+ ];
12626
12628
  }
12627
12629
  // we don't want to create shims when we are just
12628
12630
  // probing export * modules for exports
12629
12631
  if (!isExportAllSearch) {
12630
12632
  if (this.options.shimMissingExports) {
12631
12633
  this.shimMissingExport(name);
12632
- return this.exportShimVariable;
12634
+ return [this.exportShimVariable];
12633
12635
  }
12634
12636
  }
12635
- return null;
12637
+ return [null];
12636
12638
  }
12637
12639
  hasEffects() {
12638
12640
  return (this.info.hasModuleSideEffects === 'no-treeshake' ||
@@ -12650,7 +12652,7 @@ class Module {
12650
12652
  }
12651
12653
  for (const exportName of this.getExports()) {
12652
12654
  if (includeNamespaceMembers || exportName !== this.info.syntheticNamedExports) {
12653
- const variable = this.getVariableForExportName(exportName);
12655
+ const variable = this.getVariableForExportName(exportName)[0];
12654
12656
  variable.deoptimizePath(UNKNOWN_PATH);
12655
12657
  if (!variable.included) {
12656
12658
  this.includeVariable(variable);
@@ -12658,7 +12660,7 @@ class Module {
12658
12660
  }
12659
12661
  }
12660
12662
  for (const name of this.getReexports()) {
12661
- const variable = this.getVariableForExportName(name);
12663
+ const [variable] = this.getVariableForExportName(name);
12662
12664
  if (variable) {
12663
12665
  variable.deoptimizePath(UNKNOWN_PATH);
12664
12666
  if (!variable.included) {
@@ -12683,11 +12685,6 @@ class Module {
12683
12685
  linkImports() {
12684
12686
  this.addModulesToImportDescriptions(this.importDescriptions);
12685
12687
  this.addModulesToImportDescriptions(this.reexportDescriptions);
12686
- for (const name in this.exports) {
12687
- if (name !== 'default' && name !== this.info.syntheticNamedExports) {
12688
- this.exportsAll[name] = this.id;
12689
- }
12690
- }
12691
12688
  const externalExportAllModules = [];
12692
12689
  for (const source of this.exportAllSources) {
12693
12690
  const module = this.graph.modulesById.get(this.resolvedIds[source].id);
@@ -12696,14 +12693,6 @@ class Module {
12696
12693
  continue;
12697
12694
  }
12698
12695
  this.exportAllModules.push(module);
12699
- for (const name in module.exportsAll) {
12700
- if (name in this.exportsAll) {
12701
- this.options.onwarn(errNamespaceConflict(name, this, module));
12702
- }
12703
- else {
12704
- this.exportsAll[name] = module.exportsAll[name];
12705
- }
12706
- }
12707
12696
  }
12708
12697
  this.exportAllModules.push(...externalExportAllModules);
12709
12698
  }
@@ -12761,7 +12750,7 @@ class Module {
12761
12750
  moduleContext: this.context,
12762
12751
  options: this.options,
12763
12752
  requestTreeshakingPass: () => (this.graph.needsTreeshakingPass = true),
12764
- traceExport: this.getVariableForExportName.bind(this),
12753
+ traceExport: (name) => this.getVariableForExportName(name)[0],
12765
12754
  traceVariable: this.traceVariable.bind(this),
12766
12755
  usesTopLevelAwait: false,
12767
12756
  warn: this.warn.bind(this)
@@ -12801,7 +12790,7 @@ class Module {
12801
12790
  if (otherModule instanceof Module && importDeclaration.name === '*') {
12802
12791
  return otherModule.namespace;
12803
12792
  }
12804
- const declaration = otherModule.getVariableForExportName(importDeclaration.name, {
12793
+ const [declaration] = otherModule.getVariableForExportName(importDeclaration.name, {
12805
12794
  importerForSideEffects: importerForSideEffects || this
12806
12795
  });
12807
12796
  if (!declaration) {
@@ -12929,11 +12918,7 @@ class Module {
12929
12918
  for (const specifier of node.specifiers) {
12930
12919
  const isDefault = specifier.type === ImportDefaultSpecifier$1;
12931
12920
  const isNamespace = specifier.type === ImportNamespaceSpecifier$1;
12932
- const name = isDefault
12933
- ? 'default'
12934
- : isNamespace
12935
- ? '*'
12936
- : specifier.imported.name;
12921
+ const name = isDefault ? 'default' : isNamespace ? '*' : specifier.imported.name;
12937
12922
  this.importDescriptions[specifier.local.name] = {
12938
12923
  module: null,
12939
12924
  name,
@@ -13003,58 +12988,57 @@ class Module {
13003
12988
  addSideEffectDependencies(this.dependencies);
13004
12989
  addSideEffectDependencies(alwaysCheckedDependencies);
13005
12990
  }
13006
- getVariableFromNamespaceReexports(name, importerForSideEffects, searchedNamesAndModules, skipExternalNamespaceReexports = false) {
12991
+ getVariableFromNamespaceReexports(name, importerForSideEffects, searchedNamesAndModules) {
13007
12992
  let foundSyntheticDeclaration = null;
13008
- const skipExternalNamespaceValues = [{ searchedNamesAndModules, skipExternalNamespaces: true }];
13009
- if (!skipExternalNamespaceReexports) {
13010
- const clonedSearchedNamesAndModules = new Map();
13011
- for (const [name, modules] of searchedNamesAndModules || []) {
13012
- clonedSearchedNamesAndModules.set(name, new Set(modules));
13013
- }
13014
- skipExternalNamespaceValues.push({
13015
- searchedNamesAndModules: clonedSearchedNamesAndModules,
13016
- skipExternalNamespaces: false
13017
- });
13018
- }
13019
- for (const { skipExternalNamespaces, searchedNamesAndModules } of skipExternalNamespaceValues) {
13020
- const foundDeclarations = new Set();
13021
- for (const module of this.exportAllModules) {
13022
- if (module instanceof Module || !skipExternalNamespaces) {
13023
- const declaration = getVariableForExportNameRecursive(module, name, importerForSideEffects, true, searchedNamesAndModules, skipExternalNamespaces);
13024
- if (declaration) {
13025
- if (!(declaration instanceof SyntheticNamedExportVariable)) {
13026
- foundDeclarations.add(declaration);
13027
- }
13028
- else if (!foundSyntheticDeclaration) {
13029
- foundSyntheticDeclaration = declaration;
13030
- }
13031
- }
13032
- }
12993
+ const foundInternalDeclarations = new Map();
12994
+ const foundExternalDeclarations = new Set();
12995
+ for (const module of this.exportAllModules) {
12996
+ // Synthetic namespaces should not hide "regular" exports of the same name
12997
+ if (module.info.syntheticNamedExports === name) {
12998
+ continue;
13033
12999
  }
13034
- if (foundDeclarations.size === 1) {
13035
- return [...foundDeclarations][0];
13000
+ const [variable, indirectExternal] = getVariableForExportNameRecursive(module, name, importerForSideEffects, true, searchedNamesAndModules);
13001
+ if (module instanceof ExternalModule || indirectExternal) {
13002
+ foundExternalDeclarations.add(variable);
13036
13003
  }
13037
- if (foundDeclarations.size > 1) {
13038
- if (skipExternalNamespaces) {
13039
- return null;
13004
+ else if (variable instanceof SyntheticNamedExportVariable) {
13005
+ if (!foundSyntheticDeclaration) {
13006
+ foundSyntheticDeclaration = variable;
13040
13007
  }
13041
- const foundDeclarationList = [...foundDeclarations];
13042
- const usedDeclaration = foundDeclarationList[0];
13008
+ }
13009
+ else if (variable) {
13010
+ foundInternalDeclarations.set(variable, module);
13011
+ }
13012
+ }
13013
+ if (foundInternalDeclarations.size > 0) {
13014
+ const foundDeclarationList = [...foundInternalDeclarations];
13015
+ const usedDeclaration = foundDeclarationList[0][0];
13016
+ if (foundDeclarationList.length === 1) {
13017
+ return [usedDeclaration];
13018
+ }
13019
+ this.options.onwarn(errNamespaceConflict(name, this.id, foundDeclarationList.map(([, module]) => module.id)));
13020
+ // TODO we are pretending it was not found while it should behave like "undefined"
13021
+ return [null];
13022
+ }
13023
+ if (foundExternalDeclarations.size > 0) {
13024
+ const foundDeclarationList = [...foundExternalDeclarations];
13025
+ const usedDeclaration = foundDeclarationList[0];
13026
+ if (foundDeclarationList.length > 1) {
13043
13027
  this.options.onwarn(errAmbiguousExternalNamespaces(name, this.id, usedDeclaration.module.id, foundDeclarationList.map(declaration => declaration.module.id)));
13044
- return usedDeclaration;
13045
13028
  }
13029
+ return [usedDeclaration, true];
13046
13030
  }
13047
13031
  if (foundSyntheticDeclaration) {
13048
- return foundSyntheticDeclaration;
13032
+ return [foundSyntheticDeclaration];
13049
13033
  }
13050
- return null;
13034
+ return [null];
13051
13035
  }
13052
13036
  includeAndGetAdditionalMergedNamespaces() {
13053
13037
  const externalNamespaces = new Set();
13054
13038
  const syntheticNamespaces = new Set();
13055
13039
  for (const module of [this, ...this.exportAllModules]) {
13056
13040
  if (module instanceof ExternalModule) {
13057
- const externalVariable = module.getVariableForExportName('*');
13041
+ const [externalVariable] = module.getVariableForExportName('*');
13058
13042
  externalVariable.include();
13059
13043
  this.imports.add(externalVariable);
13060
13044
  externalNamespaces.add(externalVariable);
@@ -13080,7 +13064,7 @@ class Module {
13080
13064
  variable.include();
13081
13065
  this.graph.needsTreeshakingPass = true;
13082
13066
  const variableModule = variable.module;
13083
- if (variableModule && variableModule instanceof Module) {
13067
+ if (variableModule instanceof Module) {
13084
13068
  if (!variableModule.isExecuted) {
13085
13069
  markModuleAndImpureDependenciesAsExecuted(variableModule);
13086
13070
  }
@@ -14030,9 +14014,9 @@ function getCollapsedSourcemap(id, originalCode, originalSourcemap, sourcemapCha
14030
14014
  else {
14031
14015
  const sources = originalSourcemap.sources;
14032
14016
  const sourcesContent = originalSourcemap.sourcesContent || [];
14033
- const directory = path$2.dirname(id) || '.';
14017
+ const directory = require$$0.dirname(id) || '.';
14034
14018
  const sourceRoot = originalSourcemap.sourceRoot || '.';
14035
- const baseSources = sources.map((source, i) => new Source(path$2.resolve(directory, sourceRoot, source), sourcesContent[i]));
14019
+ const baseSources = sources.map((source, i) => new Source(require$$0.resolve(directory, sourceRoot, source), sourcesContent[i]));
14036
14020
  source = new Link(originalSourcemap, baseSources);
14037
14021
  }
14038
14022
  return sourcemapChain.reduce(linkMap, source);
@@ -14048,9 +14032,9 @@ function collapseSourcemaps(file, map, modules, bundleSourcemapChain, excludeCon
14048
14032
  source = bundleSourcemapChain.reduce(linkMap, source);
14049
14033
  let { sources, sourcesContent, names, mappings } = source.traceMappings();
14050
14034
  if (file) {
14051
- const directory = path$2.dirname(file);
14052
- sources = sources.map((source) => path$2.relative(directory, source));
14053
- file = path$2.basename(file);
14035
+ const directory = require$$0.dirname(file);
14036
+ sources = sources.map((source) => require$$0.relative(directory, source));
14037
+ file = require$$0.basename(file);
14054
14038
  }
14055
14039
  sourcesContent = (excludeContent ? null : sourcesContent);
14056
14040
  return new SourceMap({ file, mappings, names, sources, sourcesContent });
@@ -14197,7 +14181,7 @@ function assignExportsToMangledNames(exports, exportsByName, exportNamesByVariab
14197
14181
  let nameIndex = 0;
14198
14182
  for (const variable of exports) {
14199
14183
  let [exportName] = variable.name;
14200
- if (exportsByName[exportName]) {
14184
+ if (exportsByName.has(exportName)) {
14201
14185
  do {
14202
14186
  exportName = toBase64(++nameIndex);
14203
14187
  // skip past leading number identifiers
@@ -14205,9 +14189,9 @@ function assignExportsToMangledNames(exports, exportsByName, exportNamesByVariab
14205
14189
  nameIndex += 9 * 64 ** (exportName.length - 1);
14206
14190
  exportName = toBase64(nameIndex);
14207
14191
  }
14208
- } while (RESERVED_NAMES$1.has(exportName) || exportsByName[exportName]);
14192
+ } while (RESERVED_NAMES$1.has(exportName) || exportsByName.has(exportName));
14209
14193
  }
14210
- exportsByName[exportName] = variable;
14194
+ exportsByName.set(exportName, variable);
14211
14195
  exportNamesByVariable.set(variable, [exportName]);
14212
14196
  }
14213
14197
  }
@@ -14215,10 +14199,10 @@ function assignExportsToNames(exports, exportsByName, exportNamesByVariable) {
14215
14199
  for (const variable of exports) {
14216
14200
  let nameIndex = 0;
14217
14201
  let exportName = variable.name;
14218
- while (exportsByName[exportName]) {
14202
+ while (exportsByName.has(exportName)) {
14219
14203
  exportName = variable.name + '$' + ++nameIndex;
14220
14204
  }
14221
- exportsByName[exportName] = variable;
14205
+ exportsByName.set(exportName, variable);
14222
14206
  exportNamesByVariable.set(variable, [exportName]);
14223
14207
  }
14224
14208
  }
@@ -14382,7 +14366,7 @@ function makeUnique(name, existingNames) {
14382
14366
  const existingNamesLowercase = new Set(Object.keys(existingNames).map(key => key.toLowerCase()));
14383
14367
  if (!existingNamesLowercase.has(name.toLocaleLowerCase()))
14384
14368
  return name;
14385
- const ext = path$2.extname(name);
14369
+ const ext = require$$0.extname(name);
14386
14370
  name = name.substr(0, name.length - ext.length);
14387
14371
  let uniqueName, uniqueIndex = 1;
14388
14372
  while (existingNamesLowercase.has((uniqueName = name + ++uniqueIndex + ext).toLowerCase()))
@@ -14432,12 +14416,13 @@ class Chunk {
14432
14416
  this.dynamicName = null;
14433
14417
  this.exportNamesByVariable = new Map();
14434
14418
  this.exports = new Set();
14435
- this.exportsByName = Object.create(null);
14419
+ this.exportsByName = new Map();
14436
14420
  this.fileName = null;
14437
14421
  this.implicitEntryModules = [];
14438
14422
  this.implicitlyLoadedBefore = new Set();
14439
14423
  this.imports = new Set();
14440
14424
  this.indentString = undefined;
14425
+ // This may only be updated in the constructor
14441
14426
  this.isEmpty = true;
14442
14427
  this.name = null;
14443
14428
  this.renderedDependencies = null;
@@ -14530,7 +14515,7 @@ class Chunk {
14530
14515
  for (const [variable, exportNames] of exportNamesByVariable) {
14531
14516
  this.exportNamesByVariable.set(variable, [...exportNames]);
14532
14517
  for (const exportName of exportNames) {
14533
- this.exportsByName[exportName] = variable;
14518
+ this.exportsByName.set(exportName, variable);
14534
14519
  }
14535
14520
  remainingExports.delete(variable);
14536
14521
  }
@@ -14623,7 +14608,7 @@ class Chunk {
14623
14608
  }), existingNames);
14624
14609
  }
14625
14610
  generateIdPreserveModules(preserveModulesRelativeDir, options, existingNames, unsetOptions) {
14626
- const id = this.orderedModules[0].id;
14611
+ const [{ id }] = this.orderedModules;
14627
14612
  const sanitizedId = this.outputOptions.sanitizeFileName(id);
14628
14613
  let path;
14629
14614
  const patternOpt = unsetOptions.has('entryFileNames')
@@ -14631,8 +14616,8 @@ class Chunk {
14631
14616
  : options.entryFileNames;
14632
14617
  const pattern = typeof patternOpt === 'function' ? patternOpt(this.getChunkInfo()) : patternOpt;
14633
14618
  if (isAbsolute(id)) {
14634
- const currentDir = path$2.dirname(sanitizedId);
14635
- const extension = path$2.extname(id);
14619
+ const currentDir = require$$0.dirname(sanitizedId);
14620
+ const extension = require$$0.extname(id);
14636
14621
  const fileName = renderNamePattern(pattern, 'output.entryFileNames', {
14637
14622
  assetExtname: () => (NON_ASSET_EXTENSIONS.includes(extension) ? '' : extension),
14638
14623
  ext: () => extension.substr(1),
@@ -14650,7 +14635,7 @@ class Chunk {
14650
14635
  }
14651
14636
  }
14652
14637
  else {
14653
- const extension = path$2.extname(sanitizedId);
14638
+ const extension = require$$0.extname(sanitizedId);
14654
14639
  const fileName = renderNamePattern(pattern, 'output.entryFileNames', {
14655
14640
  assetExtname: () => (NON_ASSET_EXTENSIONS.includes(extension) ? '' : extension),
14656
14641
  ext: () => extension.substr(1),
@@ -14691,10 +14676,12 @@ class Chunk {
14691
14676
  });
14692
14677
  }
14693
14678
  getChunkName() {
14694
- return (this.name || (this.name = this.outputOptions.sanitizeFileName(this.getFallbackChunkName())));
14679
+ var _a;
14680
+ return ((_a = this.name) !== null && _a !== void 0 ? _a : (this.name = this.outputOptions.sanitizeFileName(this.getFallbackChunkName())));
14695
14681
  }
14696
14682
  getExportNames() {
14697
- return (this.sortedExportNames || (this.sortedExportNames = Object.keys(this.exportsByName).sort()));
14683
+ var _a;
14684
+ return ((_a = this.sortedExportNames) !== null && _a !== void 0 ? _a : (this.sortedExportNames = Array.from(this.exportsByName.keys()).sort()));
14698
14685
  }
14699
14686
  getRenderedHash() {
14700
14687
  if (this.renderedHash)
@@ -14710,7 +14697,7 @@ class Chunk {
14710
14697
  hash.update(this.renderedSource.toString());
14711
14698
  hash.update(this.getExportNames()
14712
14699
  .map(exportName => {
14713
- const variable = this.exportsByName[exportName];
14700
+ const variable = this.exportsByName.get(exportName);
14714
14701
  return `${relativeId(variable.module.id).replace(/\\/g, '/')}:${variable.name}:${exportName}`;
14715
14702
  })
14716
14703
  .join(','));
@@ -14903,11 +14890,11 @@ class Chunk {
14903
14890
  timeStart('sourcemap', 2);
14904
14891
  let file;
14905
14892
  if (options.file)
14906
- file = path$2.resolve(options.sourcemapFile || options.file);
14893
+ file = require$$0.resolve(options.sourcemapFile || options.file);
14907
14894
  else if (options.dir)
14908
- file = path$2.resolve(options.dir, this.id);
14895
+ file = require$$0.resolve(options.dir, this.id);
14909
14896
  else
14910
- file = path$2.resolve(this.id);
14897
+ file = require$$0.resolve(this.id);
14911
14898
  const decodedMap = magicString.generateDecodedMap({});
14912
14899
  map = collapseSourcemaps(file, decodedMap, this.usedModules, chunkSourcemapChain, options.sourcemapExcludeSources, this.inputOptions.onwarn);
14913
14900
  map.sources = map.sources
@@ -14969,12 +14956,12 @@ class Chunk {
14969
14956
  }
14970
14957
  computeContentHashWithDependencies(addons, options, existingNames) {
14971
14958
  const hash = createHash();
14972
- hash.update([addons.intro, addons.outro, addons.banner, addons.footer].map(addon => addon || '').join(':'));
14959
+ hash.update([addons.intro, addons.outro, addons.banner, addons.footer].join(':'));
14973
14960
  hash.update(options.format);
14974
14961
  const dependenciesForHashing = new Set([this]);
14975
14962
  for (const current of dependenciesForHashing) {
14976
14963
  if (current instanceof ExternalModule) {
14977
- hash.update(':' + current.renderPath);
14964
+ hash.update(`:${current.renderPath}`);
14978
14965
  }
14979
14966
  else {
14980
14967
  hash.update(current.getRenderedHash());
@@ -15081,7 +15068,7 @@ class Chunk {
15081
15068
  for (const exportName of this.getExportNames()) {
15082
15069
  if (exportName[0] === '*')
15083
15070
  continue;
15084
- const variable = this.exportsByName[exportName];
15071
+ const variable = this.exportsByName.get(exportName);
15085
15072
  if (!(variable instanceof SyntheticNamedExportVariable)) {
15086
15073
  const module = variable.module;
15087
15074
  if (module && this.chunkByModule.get(module) !== this)
@@ -15229,7 +15216,7 @@ class Chunk {
15229
15216
  imported = exportName = '*';
15230
15217
  }
15231
15218
  else {
15232
- const variable = this.exportsByName[exportName];
15219
+ const variable = this.exportsByName.get(exportName);
15233
15220
  if (variable instanceof SyntheticNamedExportVariable)
15234
15221
  continue;
15235
15222
  const module = variable.module;
@@ -15272,14 +15259,14 @@ class Chunk {
15272
15259
  return referencedFiles;
15273
15260
  }
15274
15261
  getRelativePath(targetPath, stripJsExtension) {
15275
- let relativePath = normalize(relative(path$2.dirname(this.id), targetPath));
15262
+ let relativePath = normalize(relative(require$$0.dirname(this.id), targetPath));
15276
15263
  if (stripJsExtension && relativePath.endsWith('.js')) {
15277
15264
  relativePath = relativePath.slice(0, -3);
15278
15265
  }
15279
15266
  if (relativePath === '..')
15280
- return '../../' + path$2.basename(targetPath);
15267
+ return '../../' + require$$0.basename(targetPath);
15281
15268
  if (relativePath === '')
15282
- return '../' + path$2.basename(targetPath);
15269
+ return '../' + require$$0.basename(targetPath);
15283
15270
  return relativePath.startsWith('../') ? relativePath : './' + relativePath;
15284
15271
  }
15285
15272
  inlineChunkDependencies(chunk) {
@@ -15330,7 +15317,7 @@ class Chunk {
15330
15317
  setIdentifierRenderResolutions({ format, interop, namespaceToStringTag }) {
15331
15318
  const syntheticExports = new Set();
15332
15319
  for (const exportName of this.getExportNames()) {
15333
- const exportVariable = this.exportsByName[exportName];
15320
+ const exportVariable = this.exportsByName.get(exportName);
15334
15321
  if (format !== 'es' &&
15335
15322
  format !== 'system' &&
15336
15323
  exportVariable.isReassigned &&
@@ -15428,8 +15415,8 @@ function generateAssetFileName(name, source, outputOptions, bundle) {
15428
15415
  return makeUnique(renderNamePattern(typeof outputOptions.assetFileNames === 'function'
15429
15416
  ? outputOptions.assetFileNames({ name, source, type: 'asset' })
15430
15417
  : outputOptions.assetFileNames, 'output.assetFileNames', {
15431
- ext: () => path$2.extname(emittedName).substr(1),
15432
- extname: () => path$2.extname(emittedName),
15418
+ ext: () => require$$0.extname(emittedName).substr(1),
15419
+ extname: () => require$$0.extname(emittedName),
15433
15420
  hash() {
15434
15421
  const hash = createHash();
15435
15422
  hash.update(emittedName);
@@ -15437,7 +15424,7 @@ function generateAssetFileName(name, source, outputOptions, bundle) {
15437
15424
  hash.update(source);
15438
15425
  return hash.digest('hex').substr(0, 8);
15439
15426
  },
15440
- name: () => emittedName.substr(0, emittedName.length - path$2.extname(emittedName).length)
15427
+ name: () => emittedName.substr(0, emittedName.length - require$$0.extname(emittedName).length)
15441
15428
  }), bundle);
15442
15429
  }
15443
15430
  function reserveFileNameInBundle(fileName, bundle, warn) {
@@ -15829,7 +15816,7 @@ function commondir(files) {
15829
15816
  if (files.length === 0)
15830
15817
  return '/';
15831
15818
  if (files.length === 1)
15832
- return path$2.dirname(files[0]);
15819
+ return require$$0.dirname(files[0]);
15833
15820
  const commonSegments = files.slice(1).reduce((commonSegments, file) => {
15834
15821
  const pathSegements = file.split(/\/+|\\+/);
15835
15822
  let i;
@@ -16049,7 +16036,7 @@ class Bundle {
16049
16036
  const chunksForNaming = entryChunks.concat(otherChunks);
16050
16037
  for (const chunk of chunksForNaming) {
16051
16038
  if (this.outputOptions.file) {
16052
- chunk.id = path$2.basename(this.outputOptions.file);
16039
+ chunk.id = require$$0.basename(this.outputOptions.file);
16053
16040
  }
16054
16041
  else if (this.outputOptions.preserveModules) {
16055
16042
  chunk.id = chunk.generateIdPreserveModules(inputBase, this.outputOptions, bundle, this.unsetOptions);
@@ -16198,8 +16185,8 @@ var keywordRelationalOperator = /^in(stanceof)?$/;
16198
16185
  // are only applied when a character is found to actually have a
16199
16186
  // code point above 128.
16200
16187
  // Generated by `bin/generate-identifier-regex.js`.
16201
- var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08c7\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\u9ffc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7bf\ua7c2-\ua7ca\ua7f5-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
16202
- var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf\u1ac0\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
16188
+ var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ca\ua7d0\ua7d1\ua7d3\ua7d5-\ua7d9\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
16189
+ var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0898-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
16203
16190
 
16204
16191
  var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
16205
16192
  var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
@@ -16213,10 +16200,10 @@ nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
16213
16200
  // generated by bin/generate-identifier-regex.js
16214
16201
 
16215
16202
  // eslint-disable-next-line comma-spacing
16216
- var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,107,20,28,22,13,52,76,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8952,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42717,35,4148,12,221,3,5761,15,7472,3104,541,1507,4938];
16203
+ var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2637,96,16,1070,4050,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,46,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,482,44,11,6,17,0,322,29,19,43,1269,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4152,8,221,3,5761,15,7472,3104,541,1507,4938];
16217
16204
 
16218
16205
  // eslint-disable-next-line comma-spacing
16219
- var astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,419,13,1495,6,110,6,6,9,4759,9,787719,239];
16206
+ var astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,357,0,62,13,1495,6,110,6,6,9,4759,9,787719,239];
16220
16207
 
16221
16208
  // This has a complexity linear to the value of the code. The
16222
16209
  // assumption is that looking up astral identifier characters is
@@ -16421,6 +16408,17 @@ function isNewLine(code) {
16421
16408
  return code === 10 || code === 13 || code === 0x2028 || code === 0x2029
16422
16409
  }
16423
16410
 
16411
+ function nextLineBreak(code, from, end) {
16412
+ if ( end === void 0 ) end = code.length;
16413
+
16414
+ for (var i = from; i < end; i++) {
16415
+ var next = code.charCodeAt(i);
16416
+ if (isNewLine(next))
16417
+ { return i < end - 1 && next === 13 && code.charCodeAt(i + 1) === 10 ? i + 2 : i + 1 }
16418
+ }
16419
+ return -1
16420
+ }
16421
+
16424
16422
  var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
16425
16423
 
16426
16424
  var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
@@ -16429,11 +16427,9 @@ var ref = Object.prototype;
16429
16427
  var hasOwnProperty = ref.hasOwnProperty;
16430
16428
  var toString = ref.toString;
16431
16429
 
16432
- // Checks if an object has a property.
16433
-
16434
- function has(obj, propName) {
16435
- return hasOwnProperty.call(obj, propName)
16436
- }
16430
+ var hasOwn = Object.hasOwn || (function (obj, propName) { return (
16431
+ hasOwnProperty.call(obj, propName)
16432
+ ); });
16437
16433
 
16438
16434
  var isArray = Array.isArray || (function (obj) { return (
16439
16435
  toString.call(obj) === "[object Array]"
@@ -16443,6 +16439,8 @@ function wordsRegexp(words) {
16443
16439
  return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$")
16444
16440
  }
16445
16441
 
16442
+ var loneSurrogate = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/;
16443
+
16446
16444
  // These are used when `options.locations` is on, for the
16447
16445
  // `startLoc` and `endLoc` properties.
16448
16446
 
@@ -16469,14 +16467,10 @@ var SourceLocation = function SourceLocation(p, start, end) {
16469
16467
 
16470
16468
  function getLineInfo(input, offset) {
16471
16469
  for (var line = 1, cur = 0;;) {
16472
- lineBreakG.lastIndex = cur;
16473
- var match = lineBreakG.exec(input);
16474
- if (match && match.index < offset) {
16475
- ++line;
16476
- cur = match.index + match[0].length;
16477
- } else {
16478
- return new Position(line, offset - cur)
16479
- }
16470
+ var nextBreak = nextLineBreak(input, cur, offset);
16471
+ if (nextBreak < 0) { return new Position(line, offset - cur) }
16472
+ ++line;
16473
+ cur = nextBreak;
16480
16474
  }
16481
16475
  }
16482
16476
 
@@ -16582,7 +16576,7 @@ function getOptions(opts) {
16582
16576
  var options = {};
16583
16577
 
16584
16578
  for (var opt in defaultOptions)
16585
- { options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]; }
16579
+ { options[opt] = opts && hasOwn(opts, opt) ? opts[opt] : defaultOptions[opt]; }
16586
16580
 
16587
16581
  if (options.ecmaVersion === "latest") {
16588
16582
  options.ecmaVersion = 1e8;
@@ -17748,7 +17742,7 @@ pp$8.exitClassBody = function() {
17748
17742
  var parent = len === 0 ? null : this.privateNameStack[len - 1];
17749
17743
  for (var i = 0; i < used.length; ++i) {
17750
17744
  var id = used[i];
17751
- if (!has(declared, id.name)) {
17745
+ if (!hasOwn(declared, id.name)) {
17752
17746
  if (parent) {
17753
17747
  parent.used.push(id);
17754
17748
  } else {
@@ -17801,7 +17795,7 @@ pp$8.parseExport = function(node, exports) {
17801
17795
  if (this.eat(types$1.star)) {
17802
17796
  if (this.options.ecmaVersion >= 11) {
17803
17797
  if (this.eatContextual("as")) {
17804
- node.exported = this.parseIdent(true);
17798
+ node.exported = this.parseModuleExportName();
17805
17799
  this.checkExport(exports, node.exported.name, this.lastTokStart);
17806
17800
  } else {
17807
17801
  node.exported = null;
@@ -17853,6 +17847,10 @@ pp$8.parseExport = function(node, exports) {
17853
17847
  this.checkUnreserved(spec.local);
17854
17848
  // check if export is defined
17855
17849
  this.checkLocalExport(spec.local);
17850
+
17851
+ if (spec.local.type === "Literal") {
17852
+ this.raise(spec.local.start, "A string literal cannot be used as an exported binding without `from`.");
17853
+ }
17856
17854
  }
17857
17855
 
17858
17856
  node.source = null;
@@ -17864,7 +17862,7 @@ pp$8.parseExport = function(node, exports) {
17864
17862
 
17865
17863
  pp$8.checkExport = function(exports, name, pos) {
17866
17864
  if (!exports) { return }
17867
- if (has(exports, name))
17865
+ if (hasOwn(exports, name))
17868
17866
  { this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); }
17869
17867
  exports[name] = true;
17870
17868
  };
@@ -17928,9 +17926,13 @@ pp$8.parseExportSpecifiers = function(exports) {
17928
17926
  } else { first = false; }
17929
17927
 
17930
17928
  var node = this.startNode();
17931
- node.local = this.parseIdent(true);
17932
- node.exported = this.eatContextual("as") ? this.parseIdent(true) : node.local;
17933
- this.checkExport(exports, node.exported.name, node.exported.start);
17929
+ node.local = this.parseModuleExportName();
17930
+ node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local;
17931
+ this.checkExport(
17932
+ exports,
17933
+ node.exported[node.exported.type === "Identifier" ? "name" : "value"],
17934
+ node.exported.start
17935
+ );
17934
17936
  nodes.push(this.finishNode(node, "ExportSpecifier"));
17935
17937
  }
17936
17938
  return nodes
@@ -17982,7 +17984,7 @@ pp$8.parseImportSpecifiers = function() {
17982
17984
  } else { first = false; }
17983
17985
 
17984
17986
  var node$2 = this.startNode();
17985
- node$2.imported = this.parseIdent(true);
17987
+ node$2.imported = this.parseModuleExportName();
17986
17988
  if (this.eatContextual("as")) {
17987
17989
  node$2.local = this.parseIdent();
17988
17990
  } else {
@@ -17995,6 +17997,17 @@ pp$8.parseImportSpecifiers = function() {
17995
17997
  return nodes
17996
17998
  };
17997
17999
 
18000
+ pp$8.parseModuleExportName = function() {
18001
+ if (this.options.ecmaVersion >= 13 && this.type === types$1.string) {
18002
+ var stringLiteral = this.parseLiteral(this.value);
18003
+ if (loneSurrogate.test(stringLiteral.value)) {
18004
+ this.raise(stringLiteral.start, "An export name cannot include a lone surrogate.");
18005
+ }
18006
+ return stringLiteral
18007
+ }
18008
+ return this.parseIdent(true)
18009
+ };
18010
+
17998
18011
  // Set `ExpressionStatement#directive` property for directive prologues.
17999
18012
  pp$8.adaptDirectivePrologue = function(statements) {
18000
18013
  for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) {
@@ -18268,7 +18281,7 @@ pp$7.checkLValSimple = function(expr, bindingType, checkClashes) {
18268
18281
  if (bindingType === BIND_LEXICAL && expr.name === "let")
18269
18282
  { this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name"); }
18270
18283
  if (checkClashes) {
18271
- if (has(checkClashes, expr.name))
18284
+ if (hasOwn(checkClashes, expr.name))
18272
18285
  { this.raiseRecoverable(expr.start, "Argument name clash"); }
18273
18286
  checkClashes[expr.name] = true;
18274
18287
  }
@@ -19763,26 +19776,30 @@ var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Ass
19763
19776
  var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic";
19764
19777
  var ecma11BinaryProperties = ecma10BinaryProperties;
19765
19778
  var ecma12BinaryProperties = ecma11BinaryProperties + " EBase EComp EMod EPres ExtPict";
19779
+ var ecma13BinaryProperties = ecma12BinaryProperties;
19766
19780
  var unicodeBinaryProperties = {
19767
19781
  9: ecma9BinaryProperties,
19768
19782
  10: ecma10BinaryProperties,
19769
19783
  11: ecma11BinaryProperties,
19770
- 12: ecma12BinaryProperties
19784
+ 12: ecma12BinaryProperties,
19785
+ 13: ecma13BinaryProperties
19771
19786
  };
19772
19787
 
19773
19788
  // #table-unicode-general-category-values
19774
19789
  var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu";
19775
19790
 
19776
19791
  // #table-unicode-script-values
19777
- var ecma9ScriptValues = "Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb";
19792
+ var ecma9ScriptValues = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb";
19778
19793
  var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd";
19779
19794
  var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho";
19780
19795
  var ecma12ScriptValues = ecma11ScriptValues + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi";
19796
+ var ecma13ScriptValues = ecma12ScriptValues + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith";
19781
19797
  var unicodeScriptValues = {
19782
19798
  9: ecma9ScriptValues,
19783
19799
  10: ecma10ScriptValues,
19784
19800
  11: ecma11ScriptValues,
19785
- 12: ecma12ScriptValues
19801
+ 12: ecma12ScriptValues,
19802
+ 13: ecma13ScriptValues
19786
19803
  };
19787
19804
 
19788
19805
  var data = {};
@@ -19800,17 +19817,19 @@ function buildUnicodeData(ecmaVersion) {
19800
19817
  d.nonBinary.sc = d.nonBinary.Script;
19801
19818
  d.nonBinary.scx = d.nonBinary.Script_Extensions;
19802
19819
  }
19803
- buildUnicodeData(9);
19804
- buildUnicodeData(10);
19805
- buildUnicodeData(11);
19806
- buildUnicodeData(12);
19820
+
19821
+ for (var i = 0, list = [9, 10, 11, 12, 13]; i < list.length; i += 1) {
19822
+ var ecmaVersion = list[i];
19823
+
19824
+ buildUnicodeData(ecmaVersion);
19825
+ }
19807
19826
 
19808
19827
  var pp$1 = Parser.prototype;
19809
19828
 
19810
19829
  var RegExpValidationState = function RegExpValidationState(parser) {
19811
19830
  this.parser = parser;
19812
19831
  this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "");
19813
- this.unicodeProperties = data[parser.options.ecmaVersion >= 12 ? 12 : parser.options.ecmaVersion];
19832
+ this.unicodeProperties = data[parser.options.ecmaVersion >= 13 ? 13 : parser.options.ecmaVersion];
19814
19833
  this.source = "";
19815
19834
  this.flags = "";
19816
19835
  this.start = 0;
@@ -20609,7 +20628,7 @@ pp$1.regexp_eatUnicodePropertyValueExpression = function(state) {
20609
20628
  return false
20610
20629
  };
20611
20630
  pp$1.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) {
20612
- if (!has(state.unicodeProperties.nonBinary, name))
20631
+ if (!hasOwn(state.unicodeProperties.nonBinary, name))
20613
20632
  { state.raise("Invalid property name"); }
20614
20633
  if (!state.unicodeProperties.nonBinary[name].test(value))
20615
20634
  { state.raise("Invalid property value"); }
@@ -20961,11 +20980,9 @@ pp.skipBlockComment = function() {
20961
20980
  if (end === -1) { this.raise(this.pos - 2, "Unterminated comment"); }
20962
20981
  this.pos = end + 2;
20963
20982
  if (this.options.locations) {
20964
- lineBreakG.lastIndex = start;
20965
- var match;
20966
- while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) {
20983
+ for (var nextBreak = (void 0), pos = start; (nextBreak = nextLineBreak(this.input, pos, this.pos)) > -1;) {
20967
20984
  ++this.curLine;
20968
- this.lineStart = match.index + match[0].length;
20985
+ pos = this.lineStart = nextBreak;
20969
20986
  }
20970
20987
  }
20971
20988
  if (this.options.onComment)
@@ -21676,7 +21693,7 @@ pp.readWord = function() {
21676
21693
 
21677
21694
  // Acorn is a tiny, fast JavaScript parser written in JavaScript.
21678
21695
 
21679
- var version = "8.6.0";
21696
+ var version = "8.7.0";
21680
21697
 
21681
21698
  Parser.acorn = {
21682
21699
  Parser: Parser,
@@ -21702,7 +21719,7 @@ Parser.acorn = {
21702
21719
 
21703
21720
  const readFile = (file) => new Promise((fulfil, reject) => fs.readFile(file, 'utf-8', (err, contents) => (err ? reject(err) : fulfil(contents))));
21704
21721
  function mkdirpath(path) {
21705
- const dir = path$2.dirname(path);
21722
+ const dir = require$$0.dirname(path);
21706
21723
  fs.mkdirSync(dir, { recursive: true });
21707
21724
  }
21708
21725
  function writeFile(dest, data) {
@@ -21720,9 +21737,9 @@ function writeFile(dest, data) {
21720
21737
  }
21721
21738
 
21722
21739
  class Queue {
21723
- constructor(maxParallel = 1) {
21740
+ constructor(maxParallel) {
21724
21741
  this.maxParallel = maxParallel;
21725
- this.queue = new Array();
21742
+ this.queue = [];
21726
21743
  this.workerCount = 0;
21727
21744
  }
21728
21745
  run(task) {
@@ -21782,7 +21799,7 @@ async function resolveId(source, importer, preserveSymlinks, pluginDriver, modul
21782
21799
  // absolute path is created. Absolute importees therefore shortcircuit the
21783
21800
  // resolve call and require no special handing on our part.
21784
21801
  // See https://nodejs.org/api/path.html#path_path_resolve_paths
21785
- return addJsExtensionIfNecessary(importer ? path$2.resolve(path$2.dirname(importer), source) : path$2.resolve(source), preserveSymlinks);
21802
+ return addJsExtensionIfNecessary(importer ? require$$0.resolve(require$$0.dirname(importer), source) : require$$0.resolve(source), preserveSymlinks);
21786
21803
  }
21787
21804
  function addJsExtensionIfNecessary(file, preserveSymlinks) {
21788
21805
  let found = findFile(file, preserveSymlinks);
@@ -21801,8 +21818,8 @@ function findFile(file, preserveSymlinks) {
21801
21818
  return findFile(fs.realpathSync(file), preserveSymlinks);
21802
21819
  if ((preserveSymlinks && stats.isSymbolicLink()) || stats.isFile()) {
21803
21820
  // check case
21804
- const name = path$2.basename(file);
21805
- const files = fs.readdirSync(path$2.dirname(file));
21821
+ const name = require$$0.basename(file);
21822
+ const files = fs.readdirSync(require$$0.dirname(file));
21806
21823
  if (files.indexOf(name) !== -1)
21807
21824
  return file;
21808
21825
  }
@@ -22053,7 +22070,6 @@ async function transform(source, module, pluginDriver, warn) {
22053
22070
  ast,
22054
22071
  code,
22055
22072
  customTransformCache,
22056
- meta: module.info.meta,
22057
22073
  originalCode,
22058
22074
  originalSourcemap,
22059
22075
  sourcemapChain,
@@ -22061,6 +22077,7 @@ async function transform(source, module, pluginDriver, warn) {
22061
22077
  };
22062
22078
  }
22063
22079
 
22080
+ const RESOLVE_DEPENDENCIES = 'resolveDependencies';
22064
22081
  class ModuleLoader {
22065
22082
  constructor(graph, modulesById, options, pluginDriver) {
22066
22083
  this.graph = graph;
@@ -22073,16 +22090,15 @@ class ModuleLoader {
22073
22090
  this.moduleLoadPromises = new Map();
22074
22091
  this.modulesWithLoadedDependencies = new Set();
22075
22092
  this.nextEntryModuleIndex = 0;
22076
- this.readQueue = new Queue();
22077
22093
  this.resolveId = async (source, importer, customOptions, isEntry, skip = null) => {
22078
- return this.addDefaultsToResolvedId(this.getNormalizedResolvedIdWithoutDefaults(this.options.external(source, importer, false)
22094
+ return this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(this.options.external(source, importer, false)
22079
22095
  ? false
22080
22096
  : await resolveId(source, importer, this.options.preserveSymlinks, this.pluginDriver, this.resolveId, skip, customOptions, typeof isEntry === 'boolean' ? isEntry : !importer), importer, source));
22081
22097
  };
22082
22098
  this.hasModuleSideEffects = options.treeshake
22083
22099
  ? options.treeshake.moduleSideEffects
22084
22100
  : () => true;
22085
- this.readQueue.maxParallel = options.maxParallelFileReads;
22101
+ this.readQueue = new Queue(options.maxParallelFileReads);
22086
22102
  }
22087
22103
  async addAdditionalModules(unresolvedModules) {
22088
22104
  const result = this.extendLoadModulesPromise(Promise.all(unresolvedModules.map(id => this.loadEntryModule(id, false, undefined, null))));
@@ -22133,22 +22149,9 @@ class ModuleLoader {
22133
22149
  }
22134
22150
  return module;
22135
22151
  }
22136
- preloadModule(resolvedId) {
22137
- return this.fetchModule(this.addDefaultsToResolvedId(resolvedId), undefined, false, true).then(module => module.info);
22138
- }
22139
- addDefaultsToResolvedId(resolvedId) {
22140
- var _a, _b;
22141
- if (!resolvedId) {
22142
- return null;
22143
- }
22144
- const external = resolvedId.external || false;
22145
- return {
22146
- external,
22147
- id: resolvedId.id,
22148
- meta: resolvedId.meta || {},
22149
- moduleSideEffects: (_a = resolvedId.moduleSideEffects) !== null && _a !== void 0 ? _a : this.hasModuleSideEffects(resolvedId.id, !!external),
22150
- syntheticNamedExports: (_b = resolvedId.syntheticNamedExports) !== null && _b !== void 0 ? _b : false
22151
- };
22152
+ async preloadModule(resolvedId) {
22153
+ const module = await this.fetchModule(this.getResolvedIdWithDefaults(resolvedId), undefined, false, resolvedId.resolveDependencies ? RESOLVE_DEPENDENCIES : true);
22154
+ return module.info;
22152
22155
  }
22153
22156
  addEntryWithImplicitDependants(unresolvedModule, implicitlyLoadedAfter) {
22154
22157
  return this.extendLoadModulesPromise(this.loadEntryModule(unresolvedModule.id, false, unresolvedModule.importer, null).then(async (entryModule) => {
@@ -22184,13 +22187,23 @@ class ModuleLoader {
22184
22187
  timeEnd('load modules', 3);
22185
22188
  const sourceDescription = typeof source === 'string'
22186
22189
  ? { code: source }
22187
- : typeof source === 'object' && typeof source.code === 'string'
22190
+ : source != null && typeof source === 'object' && typeof source.code === 'string'
22188
22191
  ? source
22189
22192
  : error(errBadLoader(id));
22190
22193
  const cachedModule = this.graph.cachedModules.get(id);
22191
22194
  if (cachedModule &&
22192
22195
  !cachedModule.customTransformCache &&
22193
- cachedModule.originalCode === sourceDescription.code) {
22196
+ cachedModule.originalCode === sourceDescription.code &&
22197
+ !(await this.pluginDriver.hookFirst('shouldTransformCachedModule', [
22198
+ {
22199
+ ast: cachedModule.ast,
22200
+ code: cachedModule.code,
22201
+ id: cachedModule.id,
22202
+ meta: cachedModule.meta,
22203
+ moduleSideEffects: cachedModule.moduleSideEffects,
22204
+ syntheticNamedExports: cachedModule.syntheticNamedExports
22205
+ }
22206
+ ]))) {
22194
22207
  if (cachedModule.transformFiles) {
22195
22208
  for (const emittedFile of cachedModule.transformFiles)
22196
22209
  this.pluginDriver.emitFile(emittedFile);
@@ -22253,9 +22266,7 @@ class ModuleLoader {
22253
22266
  this.getResolveDynamicImportPromises(module),
22254
22267
  loadAndResolveDependenciesPromise
22255
22268
  ]);
22256
- const loadAndResolveDependenciesPromise = loadPromise
22257
- .then(([resolveStaticDependencyPromises, resolveDynamicImportPromises]) => Promise.all([...resolveStaticDependencyPromises, ...resolveDynamicImportPromises]))
22258
- .then(() => this.pluginDriver.hookParallel('moduleParsed', [module.info]));
22269
+ const loadAndResolveDependenciesPromise = waitForDependencyResolution(loadPromise).then(() => this.pluginDriver.hookParallel('moduleParsed', [module.info]));
22259
22270
  loadAndResolveDependenciesPromise.catch(() => {
22260
22271
  /* avoid unhandled promise rejections */
22261
22272
  });
@@ -22264,6 +22275,9 @@ class ModuleLoader {
22264
22275
  if (!isPreload) {
22265
22276
  await this.fetchModuleDependencies(module, ...resolveDependencyPromises);
22266
22277
  }
22278
+ else if (isPreload === RESOLVE_DEPENDENCIES) {
22279
+ await loadAndResolveDependenciesPromise;
22280
+ }
22267
22281
  return module;
22268
22282
  }
22269
22283
  async fetchModuleDependencies(module, resolveStaticDependencyPromises, resolveDynamicDependencyPromises, loadAndResolveDependenciesPromise) {
@@ -22363,10 +22377,26 @@ class ModuleLoader {
22363
22377
  this.handleResolveId(await this.resolveId(source, module.id, EMPTY_OBJECT, false), source, module.id))
22364
22378
  ]);
22365
22379
  }
22380
+ getResolvedIdWithDefaults(resolvedId) {
22381
+ var _a, _b;
22382
+ if (!resolvedId) {
22383
+ return null;
22384
+ }
22385
+ const external = resolvedId.external || false;
22386
+ return {
22387
+ external,
22388
+ id: resolvedId.id,
22389
+ meta: resolvedId.meta || {},
22390
+ moduleSideEffects: (_a = resolvedId.moduleSideEffects) !== null && _a !== void 0 ? _a : this.hasModuleSideEffects(resolvedId.id, !!external),
22391
+ syntheticNamedExports: (_b = resolvedId.syntheticNamedExports) !== null && _b !== void 0 ? _b : false
22392
+ };
22393
+ }
22366
22394
  async handleExistingModule(module, isEntry, isPreload) {
22367
22395
  const loadPromise = this.moduleLoadPromises.get(module);
22368
22396
  if (isPreload) {
22369
- return loadPromise;
22397
+ return isPreload === RESOLVE_DEPENDENCIES
22398
+ ? waitForDependencyResolution(loadPromise)
22399
+ : loadPromise;
22370
22400
  }
22371
22401
  if (isEntry) {
22372
22402
  module.info.isEntry = true;
@@ -22412,7 +22442,7 @@ class ModuleLoader {
22412
22442
  ? errEntryCannotBeExternal(unresolvedId)
22413
22443
  : errImplicitDependantCannotBeExternal(unresolvedId, implicitlyLoadedBefore));
22414
22444
  }
22415
- return this.fetchModule(this.addDefaultsToResolvedId(typeof resolveIdResult === 'object'
22445
+ return this.fetchModule(this.getResolvedIdWithDefaults(typeof resolveIdResult === 'object'
22416
22446
  ? resolveIdResult
22417
22447
  : { id: resolveIdResult }), undefined, isEntry, false);
22418
22448
  }
@@ -22439,14 +22469,14 @@ class ModuleLoader {
22439
22469
  module.resolvedIds[specifier] ||
22440
22470
  this.handleResolveId(await this.resolveId(specifier, module.id, EMPTY_OBJECT, false), specifier, module.id));
22441
22471
  }
22442
- return this.handleResolveId(this.addDefaultsToResolvedId(this.getNormalizedResolvedIdWithoutDefaults(resolution, importer, specifier)), specifier, importer);
22472
+ return this.handleResolveId(this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(resolution, importer, specifier)), specifier, importer);
22443
22473
  }
22444
22474
  }
22445
22475
  function normalizeRelativeExternalId(source, importer) {
22446
22476
  return isRelative(source)
22447
22477
  ? importer
22448
- ? path$2.resolve(importer, '..', source)
22449
- : path$2.resolve(source)
22478
+ ? require$$0.resolve(importer, '..', source)
22479
+ : require$$0.resolve(source)
22450
22480
  : source;
22451
22481
  }
22452
22482
  function addChunkNamesToModule(module, { fileName, name }, isUserDefined) {
@@ -22467,6 +22497,10 @@ function isNotAbsoluteExternal(id, source, makeAbsoluteExternalsRelative) {
22467
22497
  (makeAbsoluteExternalsRelative === 'ifRelativeSource' && isRelative(source)) ||
22468
22498
  !isAbsolute(id));
22469
22499
  }
22500
+ async function waitForDependencyResolution(loadPromise) {
22501
+ const [resolveStaticDependencyPromises, resolveDynamicImportPromises] = await loadPromise;
22502
+ return Promise.all([...resolveStaticDependencyPromises, ...resolveDynamicImportPromises]);
22503
+ }
22470
22504
 
22471
22505
  class GlobalScope extends Scope$1 {
22472
22506
  constructor() {
@@ -22626,6 +22660,7 @@ const inputHookNames = {
22626
22660
  options: 1,
22627
22661
  resolveDynamicImport: 1,
22628
22662
  resolveId: 1,
22663
+ shouldTransformCachedModule: 1,
22629
22664
  transform: 1,
22630
22665
  watchChange: 1
22631
22666
  };
@@ -23040,7 +23075,7 @@ class Graph {
23040
23075
  for (const module of this.modules) {
23041
23076
  for (const importDescription of Object.values(module.importDescriptions)) {
23042
23077
  if (importDescription.name !== '*' &&
23043
- !importDescription.module.getVariableForExportName(importDescription.name)) {
23078
+ !importDescription.module.getVariableForExportName(importDescription.name)[0]) {
23044
23079
  module.warn({
23045
23080
  code: 'NON_EXISTENT_EXPORT',
23046
23081
  message: `Non-existent export '${importDescription.name}' is imported from ${relativeId(importDescription.module.id)}`,
@@ -23170,7 +23205,7 @@ const getModuleContext = (config, context) => {
23170
23205
  if (configModuleContext) {
23171
23206
  const contextByModuleId = Object.create(null);
23172
23207
  for (const [key, moduleContext] of Object.entries(configModuleContext)) {
23173
- contextByModuleId[path$2.resolve(key)] = moduleContext;
23208
+ contextByModuleId[require$$0.resolve(key)] = moduleContext;
23174
23209
  }
23175
23210
  return id => contextByModuleId[id] || context;
23176
23211
  }
@@ -23376,7 +23411,7 @@ const getPreserveModulesRoot = (config) => {
23376
23411
  if (preserveModulesRoot === null || preserveModulesRoot === undefined) {
23377
23412
  return undefined;
23378
23413
  }
23379
- return path$2.resolve(preserveModulesRoot);
23414
+ return require$$0.resolve(preserveModulesRoot);
23380
23415
  };
23381
23416
  const getAmd = (config) => {
23382
23417
  const mergedOption = {
@@ -23648,7 +23683,7 @@ function getSortingFileType(file) {
23648
23683
  return SortingFileType.SECONDARY_CHUNK;
23649
23684
  }
23650
23685
  function writeOutputFile(outputFile, outputOptions) {
23651
- const fileName = path$2.resolve(outputOptions.dir || path$2.dirname(outputOptions.file), outputFile.fileName);
23686
+ const fileName = require$$0.resolve(outputOptions.dir || require$$0.dirname(outputOptions.file), outputFile.fileName);
23652
23687
  let writeSourceMapPromise;
23653
23688
  let source;
23654
23689
  if (outputFile.type === 'asset') {
@@ -23662,11 +23697,11 @@ function writeOutputFile(outputFile, outputOptions) {
23662
23697
  url = outputFile.map.toUrl();
23663
23698
  }
23664
23699
  else {
23665
- url = `${path$2.basename(outputFile.fileName)}.map`;
23700
+ url = `${require$$0.basename(outputFile.fileName)}.map`;
23666
23701
  writeSourceMapPromise = writeFile(`${fileName}.map`, outputFile.map.toString());
23667
23702
  }
23668
23703
  if (outputOptions.sourcemap !== 'hidden') {
23669
- source += `//# ${SOURCEMAPPING_URL}=${url}\n`;
23704
+ source += `//# ${exports.SOURCEMAPPING_URL}=${url}\n`;
23670
23705
  }
23671
23706
  }
23672
23707
  }
@@ -23681,7 +23716,7 @@ function defineConfig(options) {
23681
23716
  return options;
23682
23717
  }
23683
23718
 
23684
- class WatchEmitter extends require$$0.EventEmitter {
23719
+ class WatchEmitter extends require$$0$1.EventEmitter {
23685
23720
  constructor() {
23686
23721
  super();
23687
23722
  // Allows more than 10 bundles to be watched without