@vue/compiler-sfc 3.5.33 → 3.5.35

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,5 +1,5 @@
1
1
  /**
2
- * @vue/compiler-sfc v3.5.33
2
+ * @vue/compiler-sfc v3.5.35
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -6472,7 +6472,7 @@ function requireLib () {
6472
6472
  }
6473
6473
  flowParseDeclareVariable(node) {
6474
6474
  this.next();
6475
- node.id = this.flowParseTypeAnnotatableIdentifier(true);
6475
+ node.id = this.flowParseTypeAnnotatableIdentifier();
6476
6476
  this.scope.declareName(node.id.name, 5, node.id.loc.start);
6477
6477
  this.semicolon();
6478
6478
  return this.finishNode(node, "DeclareVariable");
@@ -6646,9 +6646,14 @@ function requireLib () {
6646
6646
  reservedType: word
6647
6647
  });
6648
6648
  }
6649
- flowParseRestrictedIdentifier(liberal, declaration) {
6649
+ flowParseRestrictedIdentifierName(liberal, declaration) {
6650
6650
  this.checkReservedType(this.state.value, this.state.startLoc, declaration);
6651
- return this.parseIdentifier(liberal);
6651
+ return this.parseIdentifierName(liberal);
6652
+ }
6653
+ flowParseRestrictedIdentifier(liberal, declaration) {
6654
+ const node = this.startNode();
6655
+ const name = this.flowParseRestrictedIdentifierName(liberal, declaration);
6656
+ return this.createIdentifier(node, name);
6652
6657
  }
6653
6658
  flowParseTypeAlias(node) {
6654
6659
  node.id = this.flowParseRestrictedIdentifier(false, true);
@@ -6682,14 +6687,21 @@ function requireLib () {
6682
6687
  this.semicolon();
6683
6688
  return this.finishNode(node, "OpaqueType");
6684
6689
  }
6690
+ flowParseTypeParameterBound() {
6691
+ if (this.match(14) || this.isContextual(81)) {
6692
+ const node = this.startNode();
6693
+ this.next();
6694
+ node.typeAnnotation = this.flowParseType();
6695
+ return this.finishNode(node, "TypeAnnotation");
6696
+ }
6697
+ }
6685
6698
  flowParseTypeParameter(requireDefault = false) {
6686
6699
  const nodeStartLoc = this.state.startLoc;
6687
6700
  const node = this.startNode();
6688
6701
  const variance = this.flowParseVariance();
6689
- const ident = this.flowParseTypeAnnotatableIdentifier();
6690
- node.name = ident.name;
6702
+ node.name = this.flowParseRestrictedIdentifierName();
6691
6703
  node.variance = variance;
6692
- node.bound = ident.typeAnnotation;
6704
+ node.bound = this.flowParseTypeParameterBound();
6693
6705
  if (this.match(29)) {
6694
6706
  this.eat(29);
6695
6707
  node.default = this.flowParseType();
@@ -7386,13 +7398,13 @@ function requireLib () {
7386
7398
  node.typeAnnotation = this.flowParseTypeInitialiser();
7387
7399
  return this.finishNode(node, "TypeAnnotation");
7388
7400
  }
7389
- flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) {
7390
- const ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier();
7401
+ flowParseTypeAnnotatableIdentifier() {
7402
+ const node = this.startNode();
7403
+ const name = this.parseIdentifierName();
7391
7404
  if (this.match(14)) {
7392
- ident.typeAnnotation = this.flowParseTypeAnnotation();
7393
- this.resetEndLocation(ident);
7405
+ node.typeAnnotation = this.flowParseTypeAnnotation();
7394
7406
  }
7395
- return ident;
7407
+ return this.createIdentifier(node, name);
7396
7408
  }
7397
7409
  typeCastToParameter(node) {
7398
7410
  node.expression.typeAnnotation = node.typeAnnotation;
@@ -9619,6 +9631,7 @@ function requireLib () {
9619
9631
  adjustInnerComments(node, node.properties, commentWS);
9620
9632
  break;
9621
9633
  case "CallExpression":
9634
+ case "NewExpression":
9622
9635
  case "OptionalCallExpression":
9623
9636
  adjustInnerComments(node, node.arguments, commentWS);
9624
9637
  break;
@@ -9631,6 +9644,7 @@ function requireLib () {
9631
9644
  case "ObjectMethod":
9632
9645
  case "ClassMethod":
9633
9646
  case "ClassPrivateMethod":
9647
+ case "TSTypeParameterDeclaration":
9634
9648
  adjustInnerComments(node, node.params, commentWS);
9635
9649
  break;
9636
9650
  case "ArrayExpression":
@@ -9647,6 +9661,9 @@ function requireLib () {
9647
9661
  case "TSEnumBody":
9648
9662
  adjustInnerComments(node, node.members, commentWS);
9649
9663
  break;
9664
+ case "TSInterfaceBody":
9665
+ adjustInnerComments(node, node.body, commentWS);
9666
+ break;
9650
9667
  default:
9651
9668
  {
9652
9669
  if (node.type === "RecordExpression") {
@@ -21578,7 +21595,7 @@ var hasRequiredUtil$2;
21578
21595
  function requireUtil$2 () {
21579
21596
  if (hasRequiredUtil$2) return util$2;
21580
21597
  hasRequiredUtil$2 = 1;
21581
- (function (exports$1) {
21598
+ (function (exports) {
21582
21599
  /*
21583
21600
  * Copyright 2011 Mozilla Foundation and contributors
21584
21601
  * Licensed under the New BSD license. See LICENSE or:
@@ -21604,7 +21621,7 @@ function requireUtil$2 () {
21604
21621
  throw new Error('"' + aName + '" is a required argument.');
21605
21622
  }
21606
21623
  }
21607
- exports$1.getArg = getArg;
21624
+ exports.getArg = getArg;
21608
21625
 
21609
21626
  var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
21610
21627
  var dataUrlRegexp = /^data:.+\,.+$/;
@@ -21622,7 +21639,7 @@ function requireUtil$2 () {
21622
21639
  path: match[5]
21623
21640
  };
21624
21641
  }
21625
- exports$1.urlParse = urlParse;
21642
+ exports.urlParse = urlParse;
21626
21643
 
21627
21644
  function urlGenerate(aParsedUrl) {
21628
21645
  var url = '';
@@ -21644,7 +21661,7 @@ function requireUtil$2 () {
21644
21661
  }
21645
21662
  return url;
21646
21663
  }
21647
- exports$1.urlGenerate = urlGenerate;
21664
+ exports.urlGenerate = urlGenerate;
21648
21665
 
21649
21666
  var MAX_CACHED_INPUTS = 32;
21650
21667
 
@@ -21703,7 +21720,7 @@ function requireUtil$2 () {
21703
21720
  }
21704
21721
  path = url.path;
21705
21722
  }
21706
- var isAbsolute = exports$1.isAbsolute(path);
21723
+ var isAbsolute = exports.isAbsolute(path);
21707
21724
  // Split the path into parts between `/` characters. This is much faster than
21708
21725
  // using `.split(/\/+/g)`.
21709
21726
  var parts = [];
@@ -21754,7 +21771,7 @@ function requireUtil$2 () {
21754
21771
  }
21755
21772
  return path;
21756
21773
  });
21757
- exports$1.normalize = normalize;
21774
+ exports.normalize = normalize;
21758
21775
 
21759
21776
  /**
21760
21777
  * Joins two paths/URLs.
@@ -21813,9 +21830,9 @@ function requireUtil$2 () {
21813
21830
  }
21814
21831
  return joined;
21815
21832
  }
21816
- exports$1.join = join;
21833
+ exports.join = join;
21817
21834
 
21818
- exports$1.isAbsolute = function (aPath) {
21835
+ exports.isAbsolute = function (aPath) {
21819
21836
  return aPath.charAt(0) === '/' || urlRegexp.test(aPath);
21820
21837
  };
21821
21838
 
@@ -21857,7 +21874,7 @@ function requireUtil$2 () {
21857
21874
  // Make sure we add a "../" for each component we removed from the root.
21858
21875
  return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
21859
21876
  }
21860
- exports$1.relative = relative;
21877
+ exports.relative = relative;
21861
21878
 
21862
21879
  var supportsNullProto = (function () {
21863
21880
  var obj = Object.create(null);
@@ -21884,7 +21901,7 @@ function requireUtil$2 () {
21884
21901
 
21885
21902
  return aStr;
21886
21903
  }
21887
- exports$1.toSetString = supportsNullProto ? identity : toSetString;
21904
+ exports.toSetString = supportsNullProto ? identity : toSetString;
21888
21905
 
21889
21906
  function fromSetString(aStr) {
21890
21907
  if (isProtoString(aStr)) {
@@ -21893,7 +21910,7 @@ function requireUtil$2 () {
21893
21910
 
21894
21911
  return aStr;
21895
21912
  }
21896
- exports$1.fromSetString = supportsNullProto ? identity : fromSetString;
21913
+ exports.fromSetString = supportsNullProto ? identity : fromSetString;
21897
21914
 
21898
21915
  function isProtoString(s) {
21899
21916
  if (!s) {
@@ -21963,7 +21980,7 @@ function requireUtil$2 () {
21963
21980
 
21964
21981
  return strcmp(mappingA.name, mappingB.name);
21965
21982
  }
21966
- exports$1.compareByOriginalPositions = compareByOriginalPositions;
21983
+ exports.compareByOriginalPositions = compareByOriginalPositions;
21967
21984
 
21968
21985
  function compareByOriginalPositionsNoSource(mappingA, mappingB, onlyCompareOriginal) {
21969
21986
  var cmp;
@@ -21990,7 +22007,7 @@ function requireUtil$2 () {
21990
22007
 
21991
22008
  return strcmp(mappingA.name, mappingB.name);
21992
22009
  }
21993
- exports$1.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource;
22010
+ exports.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource;
21994
22011
 
21995
22012
  /**
21996
22013
  * Comparator between two mappings with deflated source and name indices where
@@ -22029,7 +22046,7 @@ function requireUtil$2 () {
22029
22046
 
22030
22047
  return strcmp(mappingA.name, mappingB.name);
22031
22048
  }
22032
- exports$1.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
22049
+ exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
22033
22050
 
22034
22051
  function compareByGeneratedPositionsDeflatedNoLine(mappingA, mappingB, onlyCompareGenerated) {
22035
22052
  var cmp = mappingA.generatedColumn - mappingB.generatedColumn;
@@ -22054,7 +22071,7 @@ function requireUtil$2 () {
22054
22071
 
22055
22072
  return strcmp(mappingA.name, mappingB.name);
22056
22073
  }
22057
- exports$1.compareByGeneratedPositionsDeflatedNoLine = compareByGeneratedPositionsDeflatedNoLine;
22074
+ exports.compareByGeneratedPositionsDeflatedNoLine = compareByGeneratedPositionsDeflatedNoLine;
22058
22075
 
22059
22076
  function strcmp(aStr1, aStr2) {
22060
22077
  if (aStr1 === aStr2) {
@@ -22108,7 +22125,7 @@ function requireUtil$2 () {
22108
22125
 
22109
22126
  return strcmp(mappingA.name, mappingB.name);
22110
22127
  }
22111
- exports$1.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
22128
+ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
22112
22129
 
22113
22130
  /**
22114
22131
  * Strip any JSON XSSI avoidance prefix from the string (as documented
@@ -22118,7 +22135,7 @@ function requireUtil$2 () {
22118
22135
  function parseSourceMapInput(str) {
22119
22136
  return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ''));
22120
22137
  }
22121
- exports$1.parseSourceMapInput = parseSourceMapInput;
22138
+ exports.parseSourceMapInput = parseSourceMapInput;
22122
22139
 
22123
22140
  /**
22124
22141
  * Compute the URL of a source given the the source root, the source's
@@ -22171,7 +22188,7 @@ function requireUtil$2 () {
22171
22188
 
22172
22189
  return normalize(sourceURL);
22173
22190
  }
22174
- exports$1.computeSourceURL = computeSourceURL;
22191
+ exports.computeSourceURL = computeSourceURL;
22175
22192
  } (util$2));
22176
22193
  return util$2;
22177
22194
  }
@@ -22862,15 +22879,15 @@ var hasRequiredBinarySearch$1;
22862
22879
  function requireBinarySearch$1 () {
22863
22880
  if (hasRequiredBinarySearch$1) return binarySearch$1;
22864
22881
  hasRequiredBinarySearch$1 = 1;
22865
- (function (exports$1) {
22882
+ (function (exports) {
22866
22883
  /*
22867
22884
  * Copyright 2011 Mozilla Foundation and contributors
22868
22885
  * Licensed under the New BSD license. See LICENSE or:
22869
22886
  * http://opensource.org/licenses/BSD-3-Clause
22870
22887
  */
22871
22888
 
22872
- exports$1.GREATEST_LOWER_BOUND = 1;
22873
- exports$1.LEAST_UPPER_BOUND = 2;
22889
+ exports.GREATEST_LOWER_BOUND = 1;
22890
+ exports.LEAST_UPPER_BOUND = 2;
22874
22891
 
22875
22892
  /**
22876
22893
  * Recursive implementation of binary search.
@@ -22910,7 +22927,7 @@ function requireBinarySearch$1 () {
22910
22927
 
22911
22928
  // The exact needle element was not found in this haystack. Determine if
22912
22929
  // we are in termination case (3) or (2) and return the appropriate thing.
22913
- if (aBias == exports$1.LEAST_UPPER_BOUND) {
22930
+ if (aBias == exports.LEAST_UPPER_BOUND) {
22914
22931
  return aHigh < aHaystack.length ? aHigh : -1;
22915
22932
  } else {
22916
22933
  return mid;
@@ -22924,7 +22941,7 @@ function requireBinarySearch$1 () {
22924
22941
  }
22925
22942
 
22926
22943
  // we are in termination case (3) or (2) and return the appropriate thing.
22927
- if (aBias == exports$1.LEAST_UPPER_BOUND) {
22944
+ if (aBias == exports.LEAST_UPPER_BOUND) {
22928
22945
  return mid;
22929
22946
  } else {
22930
22947
  return aLow < 0 ? -1 : aLow;
@@ -22950,13 +22967,13 @@ function requireBinarySearch$1 () {
22950
22967
  * searching for, respectively, if the exact element cannot be found.
22951
22968
  * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.
22952
22969
  */
22953
- exports$1.search = function search(aNeedle, aHaystack, aCompare, aBias) {
22970
+ exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
22954
22971
  if (aHaystack.length === 0) {
22955
22972
  return -1;
22956
22973
  }
22957
22974
 
22958
22975
  var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,
22959
- aCompare, aBias || exports$1.GREATEST_LOWER_BOUND);
22976
+ aCompare, aBias || exports.GREATEST_LOWER_BOUND);
22960
22977
  if (index < 0) {
22961
22978
  return -1;
22962
22979
  }
@@ -25985,24 +26002,16 @@ const transformFor = createStructuralDirectiveTransform(
25985
26002
  const keyProp = findProp(node, `key`, false, true);
25986
26003
  const isDirKey = keyProp && keyProp.type === 7;
25987
26004
  let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
25988
- if (memo && keyExp && isDirKey) {
25989
- {
25990
- keyProp.exp = keyExp = processExpression(
25991
- keyExp,
25992
- context
25993
- );
25994
- }
25995
- }
25996
- const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
25997
- if (isTemplate) {
25998
- if (memo) {
26005
+ const keyProperty = keyExp ? createObjectProperty(`key`, keyExp) : null;
26006
+ {
26007
+ if (isTemplate && memo) {
25999
26008
  memo.exp = processExpression(
26000
26009
  memo.exp,
26001
26010
  context
26002
26011
  );
26003
26012
  }
26004
- if (keyProperty && keyProp.type !== 6) {
26005
- keyProperty.value = processExpression(
26013
+ if ((isTemplate || memo) && keyProperty && isDirKey) {
26014
+ keyExp = keyProp.exp = keyProperty.value = processExpression(
26006
26015
  keyProperty.value,
26007
26016
  context
26008
26017
  );
@@ -31748,13 +31757,13 @@ var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
31748
31757
  const resourceUrlTagConfig = {
31749
31758
  video: ["src", "poster"],
31750
31759
  source: ["src"],
31751
- img: ["src"],
31752
- image: ["xlink:href", "href"]
31760
+ img: ["src"]
31753
31761
  };
31754
31762
  const defaultAssetUrlOptions = {
31755
31763
  base: null,
31756
31764
  includeAbsolute: false,
31757
31765
  tags: __spreadProps$8(__spreadValues$9({}, resourceUrlTagConfig), {
31766
+ image: ["xlink:href", "href"],
31758
31767
  use: ["xlink:href", "href"]
31759
31768
  })
31760
31769
  };
@@ -31791,7 +31800,8 @@ const transformAssetUrl = (node, context, options = defaultAssetUrlOptions) => {
31791
31800
  }
31792
31801
  const urlValue = attr.value.content;
31793
31802
  const isHashOnlyValue = urlValue[0] === "#";
31794
- if (isExternalUrl(urlValue) || isDataUrl(urlValue) || isHashOnlyValue && !canTransformHashImport(node.tag, attr.name) || !options.includeAbsolute && !isRelativeUrl(urlValue)) {
31803
+ if (isExternalUrl(urlValue) || isDataUrl(urlValue) || // a bare `#` is never a valid import specifier
31804
+ urlValue === "#" || isHashOnlyValue && !canTransformHashImport(node.tag, attr.name) || !options.includeAbsolute && !isRelativeUrl(urlValue)) {
31795
31805
  return;
31796
31806
  }
31797
31807
  const url = parseUrl(urlValue);
@@ -33813,6 +33823,7 @@ function requireTokenize$1 () {
33813
33823
  let pos = 0;
33814
33824
  let buffer = [];
33815
33825
  let returned = [];
33826
+ let lastBadParen = -1;
33816
33827
 
33817
33828
  function position() {
33818
33829
  return pos
@@ -33904,11 +33915,14 @@ function requireTokenize$1 () {
33904
33915
  currentToken = ['brackets', css.slice(pos, next + 1), pos, next];
33905
33916
 
33906
33917
  pos = next;
33918
+ } else if (pos <= lastBadParen) {
33919
+ currentToken = ['(', '(', pos];
33907
33920
  } else {
33908
33921
  next = css.indexOf(')', pos + 1);
33909
33922
  content = css.slice(pos, next + 1);
33910
33923
 
33911
33924
  if (next === -1 || RE_BAD_BRACKET.test(content)) {
33925
+ lastBadParen = next === -1 ? length : next;
33912
33926
  currentToken = ['(', '(', pos];
33913
33927
  } else {
33914
33928
  currentToken = ['brackets', content, pos, next];
@@ -34307,11 +34321,12 @@ function requireStringifier () {
34307
34321
  }
34308
34322
 
34309
34323
  atrule(node, semicolon) {
34324
+ let raws = node.raws;
34310
34325
  let name = '@' + node.name;
34311
34326
  let params = node.params ? this.rawValue(node, 'params') : '';
34312
34327
 
34313
- if (typeof node.raws.afterName !== 'undefined') {
34314
- name += node.raws.afterName;
34328
+ if (typeof raws.afterName !== 'undefined') {
34329
+ name += raws.afterName;
34315
34330
  } else if (params) {
34316
34331
  name += ' ';
34317
34332
  }
@@ -34319,7 +34334,7 @@ function requireStringifier () {
34319
34334
  if (node.nodes) {
34320
34335
  this.block(node, name + params);
34321
34336
  } else {
34322
- let end = (node.raws.between || '') + (semicolon ? ';' : '');
34337
+ let end = (raws.between || '') + (semicolon ? ';' : '');
34323
34338
  this.builder(escapeHTMLInCSS(name + params + end), node);
34324
34339
  }
34325
34340
  }
@@ -34370,16 +34385,17 @@ function requireStringifier () {
34370
34385
  }
34371
34386
 
34372
34387
  body(node) {
34373
- let last = node.nodes.length - 1;
34388
+ let nodes = node.nodes;
34389
+ let last = nodes.length - 1;
34374
34390
  while (last > 0) {
34375
- if (node.nodes[last].type !== 'comment') break
34391
+ if (nodes[last].type !== 'comment') break
34376
34392
  last -= 1;
34377
34393
  }
34378
34394
 
34379
34395
  let semicolon = this.raw(node, 'semicolon');
34380
34396
  let isDocument = node.type === 'document';
34381
- for (let i = 0; i < node.nodes.length; i++) {
34382
- let child = node.nodes[i];
34397
+ for (let i = 0; i < nodes.length; i++) {
34398
+ let child = nodes[i];
34383
34399
  let before = this.raw(child, 'before');
34384
34400
  if (before) this.builder(isDocument ? before : escapeHTMLInCSS(before));
34385
34401
  this.stringify(child, last !== i || semicolon);
@@ -34393,11 +34409,13 @@ function requireStringifier () {
34393
34409
  }
34394
34410
 
34395
34411
  decl(node, semicolon) {
34412
+ let raws = node.raws;
34396
34413
  let between = this.raw(node, 'between', 'colon');
34414
+
34397
34415
  let string = node.prop + between + this.rawValue(node, 'value');
34398
34416
 
34399
34417
  if (node.important) {
34400
- string += node.raws.important || ' !important';
34418
+ string += raws.important || ' !important';
34401
34419
  }
34402
34420
 
34403
34421
  if (semicolon) string += ';';
@@ -34437,9 +34455,9 @@ function requireStringifier () {
34437
34455
 
34438
34456
  // Detect style by other nodes
34439
34457
  let root = node.root();
34440
- if (!root.rawCache) root.rawCache = {};
34441
- if (typeof root.rawCache[detect] !== 'undefined') {
34442
- return root.rawCache[detect]
34458
+ let cache = root.rawCache || (root.rawCache = {});
34459
+ if (typeof cache[detect] !== 'undefined') {
34460
+ return cache[detect]
34443
34461
  }
34444
34462
 
34445
34463
  if (detect === 'before' || detect === 'after') {
@@ -34458,7 +34476,7 @@ function requireStringifier () {
34458
34476
 
34459
34477
  if (typeof value === 'undefined') value = DEFAULT_RAW[detect];
34460
34478
 
34461
- root.rawCache[detect] = value;
34479
+ cache[detect] = value;
34462
34480
  return value
34463
34481
  }
34464
34482
 
@@ -35781,6 +35799,7 @@ function requirePreviousMap () {
35781
35799
  class PreviousMap {
35782
35800
  constructor(css, opts) {
35783
35801
  if (opts.map === false) return
35802
+ if (opts.unsafeMap) this.unsafeMap = true;
35784
35803
  this.loadAnnotation(css);
35785
35804
  this.inline = this.startWith(this.annotation, 'data:');
35786
35805
 
@@ -35795,7 +35814,7 @@ function requirePreviousMap () {
35795
35814
 
35796
35815
  consumer() {
35797
35816
  if (!this.consumerCache) {
35798
- this.consumerCache = new SourceMapConsumer(this.text);
35817
+ this.consumerCache = new SourceMapConsumer(this.json || this.text);
35799
35818
  }
35800
35819
  return this.consumerCache
35801
35820
  }
@@ -35848,7 +35867,13 @@ function requirePreviousMap () {
35848
35867
  }
35849
35868
  }
35850
35869
 
35851
- loadFile(path) {
35870
+ loadFile(path, cssFile, trusted) {
35871
+ /* c8 ignore next 5 */
35872
+ if (!trusted && !this.unsafeMap) {
35873
+ if (!/\.map$/i.test(path)) {
35874
+ return undefined
35875
+ }
35876
+ }
35852
35877
  this.root = dirname(path);
35853
35878
  if (existsSync(path)) {
35854
35879
  this.mapFile = path;
@@ -35865,7 +35890,7 @@ function requirePreviousMap () {
35865
35890
  } else if (typeof prev === 'function') {
35866
35891
  let prevPath = prev(file);
35867
35892
  if (prevPath) {
35868
- let map = this.loadFile(prevPath);
35893
+ let map = this.loadFile(prevPath, file, true);
35869
35894
  if (!map) {
35870
35895
  throw new Error(
35871
35896
  'Unable to load previous source map: ' + prevPath.toString()
@@ -35889,7 +35914,16 @@ function requirePreviousMap () {
35889
35914
  } else if (this.annotation) {
35890
35915
  let map = this.annotation;
35891
35916
  if (file) map = join(dirname(file), map);
35892
- return this.loadFile(map)
35917
+ let unknown = this.loadFile(map, file, false);
35918
+ if (unknown) {
35919
+ try {
35920
+ /* c8 ignore next 4 */
35921
+ this.json = JSON.parse(unknown.replace(/^\)]}'[^\n]*\n/, ''));
35922
+ } catch {
35923
+ return undefined
35924
+ }
35925
+ }
35926
+ return unknown
35893
35927
  }
35894
35928
  }
35895
35929
 
@@ -36835,6 +36869,12 @@ function requireParser$1 () {
36835
36869
  }
36836
36870
  }
36837
36871
 
36872
+ function tokensToString(tokens, from, to) {
36873
+ let result = '';
36874
+ for (let i = from; i < to; i++) result += tokens[i][1];
36875
+ return result
36876
+ }
36877
+
36838
36878
  class Parser {
36839
36879
  constructor(input) {
36840
36880
  this.input = input;
@@ -36947,9 +36987,10 @@ function requireParser$1 () {
36947
36987
  if (founded === 2) break
36948
36988
  }
36949
36989
  }
36950
- // If the token is a word, e.g. `!important`, `red` or any other valid property's value.
36951
- // Then we need to return the colon after that word token. [3] is the "end" colon of that word.
36952
- // And because we need it after that one we do +1 to get the next one.
36990
+ // If the token is a word, e.g. `!important`, `red` or any other valid
36991
+ // property's value. Then we need to return the colon after that word
36992
+ // token. [3] is the "end" colon of that word. And because we need it
36993
+ // after that one we do +1 to get the next one.
36953
36994
  throw this.input.error(
36954
36995
  'Missed semicolon',
36955
36996
  token[0] === 'word' ? token[3] + 1 : token[2]
@@ -37022,50 +37063,50 @@ function requireParser$1 () {
37022
37063
  );
37023
37064
  node.source.end.offset++;
37024
37065
 
37025
- while (tokens[0][0] !== 'word') {
37026
- if (tokens.length === 1) this.unknownWord(tokens);
37027
- node.raws.before += tokens.shift()[1];
37066
+ let start = 0;
37067
+ while (tokens[start][0] !== 'word') {
37068
+ if (start === tokens.length - 1) this.unknownWord([tokens[start]]);
37069
+ start++;
37028
37070
  }
37029
- node.source.start = this.getPosition(tokens[0][2]);
37071
+ node.raws.before += tokensToString(tokens, 0, start);
37072
+ node.source.start = this.getPosition(tokens[start][2]);
37030
37073
 
37031
- node.prop = '';
37032
- while (tokens.length) {
37033
- let type = tokens[0][0];
37074
+ let propStart = start;
37075
+ while (start < tokens.length) {
37076
+ let type = tokens[start][0];
37034
37077
  if (type === ':' || type === 'space' || type === 'comment') {
37035
37078
  break
37036
37079
  }
37037
- node.prop += tokens.shift()[1];
37080
+ start++;
37038
37081
  }
37082
+ node.prop = tokensToString(tokens, propStart, start);
37039
37083
 
37040
- node.raws.between = '';
37041
-
37084
+ let betweenStart = start;
37042
37085
  let token;
37043
- while (tokens.length) {
37044
- token = tokens.shift();
37045
-
37046
- if (token[0] === ':') {
37047
- node.raws.between += token[1];
37048
- break
37049
- } else {
37050
- if (token[0] === 'word' && /\w/.test(token[1])) {
37051
- this.unknownWord([token]);
37052
- }
37053
- node.raws.between += token[1];
37086
+ while (start < tokens.length) {
37087
+ token = tokens[start];
37088
+ start++;
37089
+ if (token[0] === ':') break
37090
+ if (token[0] === 'word' && /\w/.test(token[1])) {
37091
+ this.unknownWord([token]);
37054
37092
  }
37055
37093
  }
37094
+ node.raws.between = tokensToString(tokens, betweenStart, start);
37056
37095
 
37057
37096
  if (node.prop[0] === '_' || node.prop[0] === '*') {
37058
37097
  node.raws.before += node.prop[0];
37059
37098
  node.prop = node.prop.slice(1);
37060
37099
  }
37061
37100
 
37062
- let firstSpaces = [];
37063
- let next;
37064
- while (tokens.length) {
37065
- next = tokens[0][0];
37101
+ let firstSpacesStart = start;
37102
+ while (start < tokens.length) {
37103
+ let next = tokens[start][0];
37066
37104
  if (next !== 'space' && next !== 'comment') break
37067
- firstSpaces.push(tokens.shift());
37105
+ start++;
37068
37106
  }
37107
+ let firstSpaces = tokens.slice(firstSpacesStart, start);
37108
+
37109
+ tokens = tokens.slice(start);
37069
37110
 
37070
37111
  this.precheckMissedSemicolon(tokens);
37071
37112
 
@@ -37979,6 +38020,19 @@ function requireLazyResult () {
37979
38020
  if (opts.stringifier) str = opts.stringifier;
37980
38021
  if (str.stringify) str = str.stringify;
37981
38022
 
38023
+ let rootSource = this.result.root.source;
38024
+ if (
38025
+ opts.map === undefined &&
38026
+ !(rootSource && rootSource.input && rootSource.input.map)
38027
+ ) {
38028
+ let result = '';
38029
+ str(this.result.root, i => {
38030
+ result += i;
38031
+ });
38032
+ this.result.css = result;
38033
+ return this.result
38034
+ }
38035
+
37982
38036
  let map = new MapGenerator(str, this.result.root, this.result.opts);
37983
38037
  let data = map.generate();
37984
38038
  this.result.css = data[0];
@@ -38311,7 +38365,7 @@ function requireProcessor$1 () {
38311
38365
 
38312
38366
  class Processor {
38313
38367
  constructor(plugins = []) {
38314
- this.version = '8.5.10';
38368
+ this.version = '8.5.15';
38315
38369
  this.plugins = this.normalize(plugins);
38316
38370
  }
38317
38371
 
@@ -38547,10 +38601,10 @@ var hasRequiredUnesc;
38547
38601
  function requireUnesc () {
38548
38602
  if (hasRequiredUnesc) return unesc.exports;
38549
38603
  hasRequiredUnesc = 1;
38550
- (function (module, exports$1) {
38604
+ (function (module, exports) {
38551
38605
 
38552
- exports$1.__esModule = true;
38553
- exports$1["default"] = unesc;
38606
+ exports.__esModule = true;
38607
+ exports["default"] = unesc;
38554
38608
  // Many thanks for this post which made this migration much easier.
38555
38609
  // https://mathiasbynens.be/notes/css-escapes
38556
38610
 
@@ -38622,7 +38676,7 @@ function requireUnesc () {
38622
38676
  }
38623
38677
  return ret;
38624
38678
  }
38625
- module.exports = exports$1.default;
38679
+ module.exports = exports.default;
38626
38680
  } (unesc, unesc.exports));
38627
38681
  return unesc.exports;
38628
38682
  }
@@ -38634,10 +38688,10 @@ var hasRequiredGetProp;
38634
38688
  function requireGetProp () {
38635
38689
  if (hasRequiredGetProp) return getProp.exports;
38636
38690
  hasRequiredGetProp = 1;
38637
- (function (module, exports$1) {
38691
+ (function (module, exports) {
38638
38692
 
38639
- exports$1.__esModule = true;
38640
- exports$1["default"] = getProp;
38693
+ exports.__esModule = true;
38694
+ exports["default"] = getProp;
38641
38695
  function getProp(obj) {
38642
38696
  for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
38643
38697
  props[_key - 1] = arguments[_key];
@@ -38651,7 +38705,7 @@ function requireGetProp () {
38651
38705
  }
38652
38706
  return obj;
38653
38707
  }
38654
- module.exports = exports$1.default;
38708
+ module.exports = exports.default;
38655
38709
  } (getProp, getProp.exports));
38656
38710
  return getProp.exports;
38657
38711
  }
@@ -38663,10 +38717,10 @@ var hasRequiredEnsureObject;
38663
38717
  function requireEnsureObject () {
38664
38718
  if (hasRequiredEnsureObject) return ensureObject.exports;
38665
38719
  hasRequiredEnsureObject = 1;
38666
- (function (module, exports$1) {
38720
+ (function (module, exports) {
38667
38721
 
38668
- exports$1.__esModule = true;
38669
- exports$1["default"] = ensureObject;
38722
+ exports.__esModule = true;
38723
+ exports["default"] = ensureObject;
38670
38724
  function ensureObject(obj) {
38671
38725
  for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
38672
38726
  props[_key - 1] = arguments[_key];
@@ -38679,7 +38733,7 @@ function requireEnsureObject () {
38679
38733
  obj = obj[prop];
38680
38734
  }
38681
38735
  }
38682
- module.exports = exports$1.default;
38736
+ module.exports = exports.default;
38683
38737
  } (ensureObject, ensureObject.exports));
38684
38738
  return ensureObject.exports;
38685
38739
  }
@@ -38691,10 +38745,10 @@ var hasRequiredStripComments;
38691
38745
  function requireStripComments () {
38692
38746
  if (hasRequiredStripComments) return stripComments.exports;
38693
38747
  hasRequiredStripComments = 1;
38694
- (function (module, exports$1) {
38748
+ (function (module, exports) {
38695
38749
 
38696
- exports$1.__esModule = true;
38697
- exports$1["default"] = stripComments;
38750
+ exports.__esModule = true;
38751
+ exports["default"] = stripComments;
38698
38752
  function stripComments(str) {
38699
38753
  var s = "";
38700
38754
  var commentStart = str.indexOf("/*");
@@ -38711,7 +38765,7 @@ function requireStripComments () {
38711
38765
  s = s + str.slice(lastEnd);
38712
38766
  return s;
38713
38767
  }
38714
- module.exports = exports$1.default;
38768
+ module.exports = exports.default;
38715
38769
  } (stripComments, stripComments.exports));
38716
38770
  return stripComments.exports;
38717
38771
  }
@@ -38741,10 +38795,10 @@ var hasRequiredNode$1;
38741
38795
  function requireNode$1 () {
38742
38796
  if (hasRequiredNode$1) return node$1.exports;
38743
38797
  hasRequiredNode$1 = 1;
38744
- (function (module, exports$1) {
38798
+ (function (module, exports) {
38745
38799
 
38746
- exports$1.__esModule = true;
38747
- exports$1["default"] = void 0;
38800
+ exports.__esModule = true;
38801
+ exports["default"] = void 0;
38748
38802
  var _util = /*@__PURE__*/ requireUtil$1();
38749
38803
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
38750
38804
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
@@ -38931,8 +38985,8 @@ function requireNode$1 () {
38931
38985
  }]);
38932
38986
  return Node;
38933
38987
  }();
38934
- exports$1["default"] = Node;
38935
- module.exports = exports$1.default;
38988
+ exports["default"] = Node;
38989
+ module.exports = exports.default;
38936
38990
  } (node$1, node$1.exports));
38937
38991
  return node$1.exports;
38938
38992
  }
@@ -38979,10 +39033,10 @@ var hasRequiredContainer;
38979
39033
  function requireContainer () {
38980
39034
  if (hasRequiredContainer) return container.exports;
38981
39035
  hasRequiredContainer = 1;
38982
- (function (module, exports$1) {
39036
+ (function (module, exports) {
38983
39037
 
38984
- exports$1.__esModule = true;
38985
- exports$1["default"] = void 0;
39038
+ exports.__esModule = true;
39039
+ exports["default"] = void 0;
38986
39040
  var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$1());
38987
39041
  var types = _interopRequireWildcard(/*@__PURE__*/ requireTypes());
38988
39042
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -39298,8 +39352,8 @@ function requireContainer () {
39298
39352
  }]);
39299
39353
  return Container;
39300
39354
  }(_node["default"]);
39301
- exports$1["default"] = Container;
39302
- module.exports = exports$1.default;
39355
+ exports["default"] = Container;
39356
+ module.exports = exports.default;
39303
39357
  } (container, container.exports));
39304
39358
  return container.exports;
39305
39359
  }
@@ -39309,10 +39363,10 @@ var hasRequiredRoot;
39309
39363
  function requireRoot () {
39310
39364
  if (hasRequiredRoot) return root.exports;
39311
39365
  hasRequiredRoot = 1;
39312
- (function (module, exports$1) {
39366
+ (function (module, exports) {
39313
39367
 
39314
- exports$1.__esModule = true;
39315
- exports$1["default"] = void 0;
39368
+ exports.__esModule = true;
39369
+ exports["default"] = void 0;
39316
39370
  var _container = _interopRequireDefault(/*@__PURE__*/ requireContainer());
39317
39371
  var _types = /*@__PURE__*/ requireTypes();
39318
39372
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -39351,8 +39405,8 @@ function requireRoot () {
39351
39405
  }]);
39352
39406
  return Root;
39353
39407
  }(_container["default"]);
39354
- exports$1["default"] = Root;
39355
- module.exports = exports$1.default;
39408
+ exports["default"] = Root;
39409
+ module.exports = exports.default;
39356
39410
  } (root, root.exports));
39357
39411
  return root.exports;
39358
39412
  }
@@ -39364,10 +39418,10 @@ var hasRequiredSelector;
39364
39418
  function requireSelector () {
39365
39419
  if (hasRequiredSelector) return selector.exports;
39366
39420
  hasRequiredSelector = 1;
39367
- (function (module, exports$1) {
39421
+ (function (module, exports) {
39368
39422
 
39369
- exports$1.__esModule = true;
39370
- exports$1["default"] = void 0;
39423
+ exports.__esModule = true;
39424
+ exports["default"] = void 0;
39371
39425
  var _container = _interopRequireDefault(/*@__PURE__*/ requireContainer());
39372
39426
  var _types = /*@__PURE__*/ requireTypes();
39373
39427
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -39383,8 +39437,8 @@ function requireSelector () {
39383
39437
  }
39384
39438
  return Selector;
39385
39439
  }(_container["default"]);
39386
- exports$1["default"] = Selector;
39387
- module.exports = exports$1.default;
39440
+ exports["default"] = Selector;
39441
+ module.exports = exports.default;
39388
39442
  } (selector, selector.exports));
39389
39443
  return selector.exports;
39390
39444
  }
@@ -39514,10 +39568,10 @@ var hasRequiredClassName;
39514
39568
  function requireClassName () {
39515
39569
  if (hasRequiredClassName) return className.exports;
39516
39570
  hasRequiredClassName = 1;
39517
- (function (module, exports$1) {
39571
+ (function (module, exports) {
39518
39572
 
39519
- exports$1.__esModule = true;
39520
- exports$1["default"] = void 0;
39573
+ exports.__esModule = true;
39574
+ exports["default"] = void 0;
39521
39575
  var _cssesc = _interopRequireDefault(/*@__PURE__*/ requireCssesc());
39522
39576
  var _util = /*@__PURE__*/ requireUtil$1();
39523
39577
  var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$1());
@@ -39562,8 +39616,8 @@ function requireClassName () {
39562
39616
  }]);
39563
39617
  return ClassName;
39564
39618
  }(_node["default"]);
39565
- exports$1["default"] = ClassName;
39566
- module.exports = exports$1.default;
39619
+ exports["default"] = ClassName;
39620
+ module.exports = exports.default;
39567
39621
  } (className, className.exports));
39568
39622
  return className.exports;
39569
39623
  }
@@ -39575,10 +39629,10 @@ var hasRequiredComment;
39575
39629
  function requireComment () {
39576
39630
  if (hasRequiredComment) return comment.exports;
39577
39631
  hasRequiredComment = 1;
39578
- (function (module, exports$1) {
39632
+ (function (module, exports) {
39579
39633
 
39580
- exports$1.__esModule = true;
39581
- exports$1["default"] = void 0;
39634
+ exports.__esModule = true;
39635
+ exports["default"] = void 0;
39582
39636
  var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$1());
39583
39637
  var _types = /*@__PURE__*/ requireTypes();
39584
39638
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -39594,8 +39648,8 @@ function requireComment () {
39594
39648
  }
39595
39649
  return Comment;
39596
39650
  }(_node["default"]);
39597
- exports$1["default"] = Comment;
39598
- module.exports = exports$1.default;
39651
+ exports["default"] = Comment;
39652
+ module.exports = exports.default;
39599
39653
  } (comment, comment.exports));
39600
39654
  return comment.exports;
39601
39655
  }
@@ -39607,10 +39661,10 @@ var hasRequiredId;
39607
39661
  function requireId () {
39608
39662
  if (hasRequiredId) return id.exports;
39609
39663
  hasRequiredId = 1;
39610
- (function (module, exports$1) {
39664
+ (function (module, exports) {
39611
39665
 
39612
- exports$1.__esModule = true;
39613
- exports$1["default"] = void 0;
39666
+ exports.__esModule = true;
39667
+ exports["default"] = void 0;
39614
39668
  var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$1());
39615
39669
  var _types = /*@__PURE__*/ requireTypes();
39616
39670
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -39630,8 +39684,8 @@ function requireId () {
39630
39684
  };
39631
39685
  return ID;
39632
39686
  }(_node["default"]);
39633
- exports$1["default"] = ID;
39634
- module.exports = exports$1.default;
39687
+ exports["default"] = ID;
39688
+ module.exports = exports.default;
39635
39689
  } (id, id.exports));
39636
39690
  return id.exports;
39637
39691
  }
@@ -39645,10 +39699,10 @@ var hasRequiredNamespace;
39645
39699
  function requireNamespace () {
39646
39700
  if (hasRequiredNamespace) return namespace.exports;
39647
39701
  hasRequiredNamespace = 1;
39648
- (function (module, exports$1) {
39702
+ (function (module, exports) {
39649
39703
 
39650
- exports$1.__esModule = true;
39651
- exports$1["default"] = void 0;
39704
+ exports.__esModule = true;
39705
+ exports["default"] = void 0;
39652
39706
  var _cssesc = _interopRequireDefault(/*@__PURE__*/ requireCssesc());
39653
39707
  var _util = /*@__PURE__*/ requireUtil$1();
39654
39708
  var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$1());
@@ -39722,8 +39776,8 @@ function requireNamespace () {
39722
39776
  }]);
39723
39777
  return Namespace;
39724
39778
  }(_node["default"]);
39725
- exports$1["default"] = Namespace;
39726
- module.exports = exports$1.default;
39779
+ exports["default"] = Namespace;
39780
+ module.exports = exports.default;
39727
39781
  } (namespace, namespace.exports));
39728
39782
  return namespace.exports;
39729
39783
  }
@@ -39733,10 +39787,10 @@ var hasRequiredTag;
39733
39787
  function requireTag () {
39734
39788
  if (hasRequiredTag) return tag.exports;
39735
39789
  hasRequiredTag = 1;
39736
- (function (module, exports$1) {
39790
+ (function (module, exports) {
39737
39791
 
39738
- exports$1.__esModule = true;
39739
- exports$1["default"] = void 0;
39792
+ exports.__esModule = true;
39793
+ exports["default"] = void 0;
39740
39794
  var _namespace = _interopRequireDefault(/*@__PURE__*/ requireNamespace());
39741
39795
  var _types = /*@__PURE__*/ requireTypes();
39742
39796
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -39752,8 +39806,8 @@ function requireTag () {
39752
39806
  }
39753
39807
  return Tag;
39754
39808
  }(_namespace["default"]);
39755
- exports$1["default"] = Tag;
39756
- module.exports = exports$1.default;
39809
+ exports["default"] = Tag;
39810
+ module.exports = exports.default;
39757
39811
  } (tag, tag.exports));
39758
39812
  return tag.exports;
39759
39813
  }
@@ -39765,10 +39819,10 @@ var hasRequiredString;
39765
39819
  function requireString () {
39766
39820
  if (hasRequiredString) return string.exports;
39767
39821
  hasRequiredString = 1;
39768
- (function (module, exports$1) {
39822
+ (function (module, exports) {
39769
39823
 
39770
- exports$1.__esModule = true;
39771
- exports$1["default"] = void 0;
39824
+ exports.__esModule = true;
39825
+ exports["default"] = void 0;
39772
39826
  var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$1());
39773
39827
  var _types = /*@__PURE__*/ requireTypes();
39774
39828
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -39784,8 +39838,8 @@ function requireString () {
39784
39838
  }
39785
39839
  return String;
39786
39840
  }(_node["default"]);
39787
- exports$1["default"] = String;
39788
- module.exports = exports$1.default;
39841
+ exports["default"] = String;
39842
+ module.exports = exports.default;
39789
39843
  } (string, string.exports));
39790
39844
  return string.exports;
39791
39845
  }
@@ -39797,10 +39851,10 @@ var hasRequiredPseudo;
39797
39851
  function requirePseudo () {
39798
39852
  if (hasRequiredPseudo) return pseudo.exports;
39799
39853
  hasRequiredPseudo = 1;
39800
- (function (module, exports$1) {
39854
+ (function (module, exports) {
39801
39855
 
39802
- exports$1.__esModule = true;
39803
- exports$1["default"] = void 0;
39856
+ exports.__esModule = true;
39857
+ exports["default"] = void 0;
39804
39858
  var _container = _interopRequireDefault(/*@__PURE__*/ requireContainer());
39805
39859
  var _types = /*@__PURE__*/ requireTypes();
39806
39860
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -39821,8 +39875,8 @@ function requirePseudo () {
39821
39875
  };
39822
39876
  return Pseudo;
39823
39877
  }(_container["default"]);
39824
- exports$1["default"] = Pseudo;
39825
- module.exports = exports$1.default;
39878
+ exports["default"] = Pseudo;
39879
+ module.exports = exports.default;
39826
39880
  } (pseudo, pseudo.exports));
39827
39881
  return pseudo.exports;
39828
39882
  }
@@ -39848,11 +39902,11 @@ var hasRequiredAttribute;
39848
39902
  function requireAttribute () {
39849
39903
  if (hasRequiredAttribute) return attribute;
39850
39904
  hasRequiredAttribute = 1;
39851
- (function (exports$1) {
39905
+ (function (exports) {
39852
39906
 
39853
- exports$1.__esModule = true;
39854
- exports$1["default"] = void 0;
39855
- exports$1.unescapeValue = unescapeValue;
39907
+ exports.__esModule = true;
39908
+ exports["default"] = void 0;
39909
+ exports.unescapeValue = unescapeValue;
39856
39910
  var _cssesc = _interopRequireDefault(/*@__PURE__*/ requireCssesc());
39857
39911
  var _unesc = _interopRequireDefault(/*@__PURE__*/ requireUnesc());
39858
39912
  var _namespace = _interopRequireDefault(/*@__PURE__*/ requireNamespace());
@@ -40277,7 +40331,7 @@ function requireAttribute () {
40277
40331
  }]);
40278
40332
  return Attribute;
40279
40333
  }(_namespace["default"]);
40280
- exports$1["default"] = Attribute;
40334
+ exports["default"] = Attribute;
40281
40335
  Attribute.NO_QUOTE = null;
40282
40336
  Attribute.SINGLE_QUOTE = "'";
40283
40337
  Attribute.DOUBLE_QUOTE = '"';
@@ -40307,10 +40361,10 @@ var hasRequiredUniversal;
40307
40361
  function requireUniversal () {
40308
40362
  if (hasRequiredUniversal) return universal.exports;
40309
40363
  hasRequiredUniversal = 1;
40310
- (function (module, exports$1) {
40364
+ (function (module, exports) {
40311
40365
 
40312
- exports$1.__esModule = true;
40313
- exports$1["default"] = void 0;
40366
+ exports.__esModule = true;
40367
+ exports["default"] = void 0;
40314
40368
  var _namespace = _interopRequireDefault(/*@__PURE__*/ requireNamespace());
40315
40369
  var _types = /*@__PURE__*/ requireTypes();
40316
40370
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -40327,8 +40381,8 @@ function requireUniversal () {
40327
40381
  }
40328
40382
  return Universal;
40329
40383
  }(_namespace["default"]);
40330
- exports$1["default"] = Universal;
40331
- module.exports = exports$1.default;
40384
+ exports["default"] = Universal;
40385
+ module.exports = exports.default;
40332
40386
  } (universal, universal.exports));
40333
40387
  return universal.exports;
40334
40388
  }
@@ -40340,10 +40394,10 @@ var hasRequiredCombinator;
40340
40394
  function requireCombinator () {
40341
40395
  if (hasRequiredCombinator) return combinator.exports;
40342
40396
  hasRequiredCombinator = 1;
40343
- (function (module, exports$1) {
40397
+ (function (module, exports) {
40344
40398
 
40345
- exports$1.__esModule = true;
40346
- exports$1["default"] = void 0;
40399
+ exports.__esModule = true;
40400
+ exports["default"] = void 0;
40347
40401
  var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$1());
40348
40402
  var _types = /*@__PURE__*/ requireTypes();
40349
40403
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -40359,8 +40413,8 @@ function requireCombinator () {
40359
40413
  }
40360
40414
  return Combinator;
40361
40415
  }(_node["default"]);
40362
- exports$1["default"] = Combinator;
40363
- module.exports = exports$1.default;
40416
+ exports["default"] = Combinator;
40417
+ module.exports = exports.default;
40364
40418
  } (combinator, combinator.exports));
40365
40419
  return combinator.exports;
40366
40420
  }
@@ -40372,10 +40426,10 @@ var hasRequiredNesting;
40372
40426
  function requireNesting () {
40373
40427
  if (hasRequiredNesting) return nesting.exports;
40374
40428
  hasRequiredNesting = 1;
40375
- (function (module, exports$1) {
40429
+ (function (module, exports) {
40376
40430
 
40377
- exports$1.__esModule = true;
40378
- exports$1["default"] = void 0;
40431
+ exports.__esModule = true;
40432
+ exports["default"] = void 0;
40379
40433
  var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$1());
40380
40434
  var _types = /*@__PURE__*/ requireTypes();
40381
40435
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -40392,8 +40446,8 @@ function requireNesting () {
40392
40446
  }
40393
40447
  return Nesting;
40394
40448
  }(_node["default"]);
40395
- exports$1["default"] = Nesting;
40396
- module.exports = exports$1.default;
40449
+ exports["default"] = Nesting;
40450
+ module.exports = exports.default;
40397
40451
  } (nesting, nesting.exports));
40398
40452
  return nesting.exports;
40399
40453
  }
@@ -40405,16 +40459,16 @@ var hasRequiredSortAscending;
40405
40459
  function requireSortAscending () {
40406
40460
  if (hasRequiredSortAscending) return sortAscending.exports;
40407
40461
  hasRequiredSortAscending = 1;
40408
- (function (module, exports$1) {
40462
+ (function (module, exports) {
40409
40463
 
40410
- exports$1.__esModule = true;
40411
- exports$1["default"] = sortAscending;
40464
+ exports.__esModule = true;
40465
+ exports["default"] = sortAscending;
40412
40466
  function sortAscending(list) {
40413
40467
  return list.sort(function (a, b) {
40414
40468
  return a - b;
40415
40469
  });
40416
40470
  }
40417
- module.exports = exports$1.default;
40471
+ module.exports = exports.default;
40418
40472
  } (sortAscending, sortAscending.exports));
40419
40473
  return sortAscending.exports;
40420
40474
  }
@@ -40505,11 +40559,11 @@ var hasRequiredTokenize;
40505
40559
  function requireTokenize () {
40506
40560
  if (hasRequiredTokenize) return tokenize;
40507
40561
  hasRequiredTokenize = 1;
40508
- (function (exports$1) {
40562
+ (function (exports) {
40509
40563
 
40510
- exports$1.__esModule = true;
40511
- exports$1.FIELDS = void 0;
40512
- exports$1["default"] = tokenize;
40564
+ exports.__esModule = true;
40565
+ exports.FIELDS = void 0;
40566
+ exports["default"] = tokenize;
40513
40567
  var t = _interopRequireWildcard(/*@__PURE__*/ requireTokenTypes());
40514
40568
  var _unescapable, _wordDelimiters;
40515
40569
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -40579,7 +40633,7 @@ function requireTokenize () {
40579
40633
  START_POS: 5,
40580
40634
  END_POS: 6
40581
40635
  };
40582
- exports$1.FIELDS = FIELDS;
40636
+ exports.FIELDS = FIELDS;
40583
40637
  function tokenize(input) {
40584
40638
  var tokens = [];
40585
40639
  var css = input.css.valueOf();
@@ -40751,10 +40805,10 @@ var hasRequiredParser;
40751
40805
  function requireParser () {
40752
40806
  if (hasRequiredParser) return parser.exports;
40753
40807
  hasRequiredParser = 1;
40754
- (function (module, exports$1) {
40808
+ (function (module, exports) {
40755
40809
 
40756
- exports$1.__esModule = true;
40757
- exports$1["default"] = void 0;
40810
+ exports.__esModule = true;
40811
+ exports["default"] = void 0;
40758
40812
  var _root = _interopRequireDefault(/*@__PURE__*/ requireRoot());
40759
40813
  var _selector = _interopRequireDefault(/*@__PURE__*/ requireSelector());
40760
40814
  var _className = _interopRequireDefault(/*@__PURE__*/ requireClassName());
@@ -41762,8 +41816,8 @@ function requireParser () {
41762
41816
  }]);
41763
41817
  return Parser;
41764
41818
  }();
41765
- exports$1["default"] = Parser;
41766
- module.exports = exports$1.default;
41819
+ exports["default"] = Parser;
41820
+ module.exports = exports.default;
41767
41821
  } (parser, parser.exports));
41768
41822
  return parser.exports;
41769
41823
  }
@@ -41773,10 +41827,10 @@ var hasRequiredProcessor;
41773
41827
  function requireProcessor () {
41774
41828
  if (hasRequiredProcessor) return processor.exports;
41775
41829
  hasRequiredProcessor = 1;
41776
- (function (module, exports$1) {
41830
+ (function (module, exports) {
41777
41831
 
41778
- exports$1.__esModule = true;
41779
- exports$1["default"] = void 0;
41832
+ exports.__esModule = true;
41833
+ exports["default"] = void 0;
41780
41834
  var _parser = _interopRequireDefault(/*@__PURE__*/ requireParser());
41781
41835
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
41782
41836
  var Processor = /*#__PURE__*/function () {
@@ -41941,8 +41995,8 @@ function requireProcessor () {
41941
41995
  };
41942
41996
  return Processor;
41943
41997
  }();
41944
- exports$1["default"] = Processor;
41945
- module.exports = exports$1.default;
41998
+ exports["default"] = Processor;
41999
+ module.exports = exports.default;
41946
42000
  } (processor, processor.exports));
41947
42001
  return processor.exports;
41948
42002
  }
@@ -42095,26 +42149,26 @@ var hasRequiredSelectors;
42095
42149
  function requireSelectors () {
42096
42150
  if (hasRequiredSelectors) return selectors;
42097
42151
  hasRequiredSelectors = 1;
42098
- (function (exports$1) {
42152
+ (function (exports) {
42099
42153
 
42100
- exports$1.__esModule = true;
42154
+ exports.__esModule = true;
42101
42155
  var _types = /*@__PURE__*/ requireTypes();
42102
42156
  Object.keys(_types).forEach(function (key) {
42103
42157
  if (key === "default" || key === "__esModule") return;
42104
- if (key in exports$1 && exports$1[key] === _types[key]) return;
42105
- exports$1[key] = _types[key];
42158
+ if (key in exports && exports[key] === _types[key]) return;
42159
+ exports[key] = _types[key];
42106
42160
  });
42107
42161
  var _constructors = /*@__PURE__*/ requireConstructors();
42108
42162
  Object.keys(_constructors).forEach(function (key) {
42109
42163
  if (key === "default" || key === "__esModule") return;
42110
- if (key in exports$1 && exports$1[key] === _constructors[key]) return;
42111
- exports$1[key] = _constructors[key];
42164
+ if (key in exports && exports[key] === _constructors[key]) return;
42165
+ exports[key] = _constructors[key];
42112
42166
  });
42113
42167
  var _guards = /*@__PURE__*/ requireGuards();
42114
42168
  Object.keys(_guards).forEach(function (key) {
42115
42169
  if (key === "default" || key === "__esModule") return;
42116
- if (key in exports$1 && exports$1[key] === _guards[key]) return;
42117
- exports$1[key] = _guards[key];
42170
+ if (key in exports && exports[key] === _guards[key]) return;
42171
+ exports[key] = _guards[key];
42118
42172
  });
42119
42173
  } (selectors));
42120
42174
  return selectors;
@@ -42125,10 +42179,10 @@ var hasRequiredDist;
42125
42179
  function requireDist () {
42126
42180
  if (hasRequiredDist) return dist.exports;
42127
42181
  hasRequiredDist = 1;
42128
- (function (module, exports$1) {
42182
+ (function (module, exports) {
42129
42183
 
42130
- exports$1.__esModule = true;
42131
- exports$1["default"] = void 0;
42184
+ exports.__esModule = true;
42185
+ exports["default"] = void 0;
42132
42186
  var _processor = _interopRequireDefault(/*@__PURE__*/ requireProcessor());
42133
42187
  var selectors = _interopRequireWildcard(/*@__PURE__*/ requireSelectors());
42134
42188
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -42140,8 +42194,8 @@ function requireDist () {
42140
42194
  Object.assign(parser, selectors);
42141
42195
  delete parser.__esModule;
42142
42196
  var _default = parser;
42143
- exports$1["default"] = _default;
42144
- module.exports = exports$1.default;
42197
+ exports["default"] = _default;
42198
+ module.exports = exports.default;
42145
42199
  } (dist, dist.exports));
42146
42200
  return dist.exports;
42147
42201
  }
@@ -42684,7 +42738,7 @@ var hasRequiredUtil;
42684
42738
  function requireUtil () {
42685
42739
  if (hasRequiredUtil) return util;
42686
42740
  hasRequiredUtil = 1;
42687
- (function (exports$1) {
42741
+ (function (exports) {
42688
42742
  /*
42689
42743
  * Copyright 2011 Mozilla Foundation and contributors
42690
42744
  * Licensed under the New BSD license. See LICENSE or:
@@ -42710,7 +42764,7 @@ function requireUtil () {
42710
42764
  throw new Error('"' + aName + '" is a required argument.');
42711
42765
  }
42712
42766
  }
42713
- exports$1.getArg = getArg;
42767
+ exports.getArg = getArg;
42714
42768
 
42715
42769
  var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
42716
42770
  var dataUrlRegexp = /^data:.+\,.+$/;
@@ -42728,7 +42782,7 @@ function requireUtil () {
42728
42782
  path: match[5]
42729
42783
  };
42730
42784
  }
42731
- exports$1.urlParse = urlParse;
42785
+ exports.urlParse = urlParse;
42732
42786
 
42733
42787
  function urlGenerate(aParsedUrl) {
42734
42788
  var url = '';
@@ -42750,7 +42804,7 @@ function requireUtil () {
42750
42804
  }
42751
42805
  return url;
42752
42806
  }
42753
- exports$1.urlGenerate = urlGenerate;
42807
+ exports.urlGenerate = urlGenerate;
42754
42808
 
42755
42809
  /**
42756
42810
  * Normalizes a path, or the path portion of a URL:
@@ -42772,7 +42826,7 @@ function requireUtil () {
42772
42826
  }
42773
42827
  path = url.path;
42774
42828
  }
42775
- var isAbsolute = exports$1.isAbsolute(path);
42829
+ var isAbsolute = exports.isAbsolute(path);
42776
42830
 
42777
42831
  var parts = path.split(/\/+/);
42778
42832
  for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
@@ -42806,7 +42860,7 @@ function requireUtil () {
42806
42860
  }
42807
42861
  return path;
42808
42862
  }
42809
- exports$1.normalize = normalize;
42863
+ exports.normalize = normalize;
42810
42864
 
42811
42865
  /**
42812
42866
  * Joins two paths/URLs.
@@ -42865,9 +42919,9 @@ function requireUtil () {
42865
42919
  }
42866
42920
  return joined;
42867
42921
  }
42868
- exports$1.join = join;
42922
+ exports.join = join;
42869
42923
 
42870
- exports$1.isAbsolute = function (aPath) {
42924
+ exports.isAbsolute = function (aPath) {
42871
42925
  return aPath.charAt(0) === '/' || urlRegexp.test(aPath);
42872
42926
  };
42873
42927
 
@@ -42909,7 +42963,7 @@ function requireUtil () {
42909
42963
  // Make sure we add a "../" for each component we removed from the root.
42910
42964
  return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
42911
42965
  }
42912
- exports$1.relative = relative;
42966
+ exports.relative = relative;
42913
42967
 
42914
42968
  var supportsNullProto = (function () {
42915
42969
  var obj = Object.create(null);
@@ -42936,7 +42990,7 @@ function requireUtil () {
42936
42990
 
42937
42991
  return aStr;
42938
42992
  }
42939
- exports$1.toSetString = supportsNullProto ? identity : toSetString;
42993
+ exports.toSetString = supportsNullProto ? identity : toSetString;
42940
42994
 
42941
42995
  function fromSetString(aStr) {
42942
42996
  if (isProtoString(aStr)) {
@@ -42945,7 +42999,7 @@ function requireUtil () {
42945
42999
 
42946
43000
  return aStr;
42947
43001
  }
42948
- exports$1.fromSetString = supportsNullProto ? identity : fromSetString;
43002
+ exports.fromSetString = supportsNullProto ? identity : fromSetString;
42949
43003
 
42950
43004
  function isProtoString(s) {
42951
43005
  if (!s) {
@@ -43015,7 +43069,7 @@ function requireUtil () {
43015
43069
 
43016
43070
  return strcmp(mappingA.name, mappingB.name);
43017
43071
  }
43018
- exports$1.compareByOriginalPositions = compareByOriginalPositions;
43072
+ exports.compareByOriginalPositions = compareByOriginalPositions;
43019
43073
 
43020
43074
  /**
43021
43075
  * Comparator between two mappings with deflated source and name indices where
@@ -43054,7 +43108,7 @@ function requireUtil () {
43054
43108
 
43055
43109
  return strcmp(mappingA.name, mappingB.name);
43056
43110
  }
43057
- exports$1.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
43111
+ exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
43058
43112
 
43059
43113
  function strcmp(aStr1, aStr2) {
43060
43114
  if (aStr1 === aStr2) {
@@ -43108,7 +43162,7 @@ function requireUtil () {
43108
43162
 
43109
43163
  return strcmp(mappingA.name, mappingB.name);
43110
43164
  }
43111
- exports$1.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
43165
+ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
43112
43166
 
43113
43167
  /**
43114
43168
  * Strip any JSON XSSI avoidance prefix from the string (as documented
@@ -43118,7 +43172,7 @@ function requireUtil () {
43118
43172
  function parseSourceMapInput(str) {
43119
43173
  return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ''));
43120
43174
  }
43121
- exports$1.parseSourceMapInput = parseSourceMapInput;
43175
+ exports.parseSourceMapInput = parseSourceMapInput;
43122
43176
 
43123
43177
  /**
43124
43178
  * Compute the URL of a source given the the source root, the source's
@@ -43171,7 +43225,7 @@ function requireUtil () {
43171
43225
 
43172
43226
  return normalize(sourceURL);
43173
43227
  }
43174
- exports$1.computeSourceURL = computeSourceURL;
43228
+ exports.computeSourceURL = computeSourceURL;
43175
43229
  } (util));
43176
43230
  return util;
43177
43231
  }
@@ -43843,15 +43897,15 @@ var hasRequiredBinarySearch;
43843
43897
  function requireBinarySearch () {
43844
43898
  if (hasRequiredBinarySearch) return binarySearch;
43845
43899
  hasRequiredBinarySearch = 1;
43846
- (function (exports$1) {
43900
+ (function (exports) {
43847
43901
  /*
43848
43902
  * Copyright 2011 Mozilla Foundation and contributors
43849
43903
  * Licensed under the New BSD license. See LICENSE or:
43850
43904
  * http://opensource.org/licenses/BSD-3-Clause
43851
43905
  */
43852
43906
 
43853
- exports$1.GREATEST_LOWER_BOUND = 1;
43854
- exports$1.LEAST_UPPER_BOUND = 2;
43907
+ exports.GREATEST_LOWER_BOUND = 1;
43908
+ exports.LEAST_UPPER_BOUND = 2;
43855
43909
 
43856
43910
  /**
43857
43911
  * Recursive implementation of binary search.
@@ -43891,7 +43945,7 @@ function requireBinarySearch () {
43891
43945
 
43892
43946
  // The exact needle element was not found in this haystack. Determine if
43893
43947
  // we are in termination case (3) or (2) and return the appropriate thing.
43894
- if (aBias == exports$1.LEAST_UPPER_BOUND) {
43948
+ if (aBias == exports.LEAST_UPPER_BOUND) {
43895
43949
  return aHigh < aHaystack.length ? aHigh : -1;
43896
43950
  } else {
43897
43951
  return mid;
@@ -43905,7 +43959,7 @@ function requireBinarySearch () {
43905
43959
  }
43906
43960
 
43907
43961
  // we are in termination case (3) or (2) and return the appropriate thing.
43908
- if (aBias == exports$1.LEAST_UPPER_BOUND) {
43962
+ if (aBias == exports.LEAST_UPPER_BOUND) {
43909
43963
  return mid;
43910
43964
  } else {
43911
43965
  return aLow < 0 ? -1 : aLow;
@@ -43931,13 +43985,13 @@ function requireBinarySearch () {
43931
43985
  * searching for, respectively, if the exact element cannot be found.
43932
43986
  * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.
43933
43987
  */
43934
- exports$1.search = function search(aNeedle, aHaystack, aCompare, aBias) {
43988
+ exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
43935
43989
  if (aHaystack.length === 0) {
43936
43990
  return -1;
43937
43991
  }
43938
43992
 
43939
43993
  var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,
43940
- aCompare, aBias || exports$1.GREATEST_LOWER_BOUND);
43994
+ aCompare, aBias || exports.GREATEST_LOWER_BOUND);
43941
43995
  if (index < 0) {
43942
43996
  return -1;
43943
43997
  }
@@ -47821,9 +47875,20 @@ class TypeScope {
47821
47875
  this.exportedDeclares = /* @__PURE__ */ Object.create(null);
47822
47876
  }
47823
47877
  }
47878
+ function recordScopeDep(ctx, scope) {
47879
+ if (scope && scope.filename !== ctx.filename) {
47880
+ (ctx.deps || (ctx.deps = /* @__PURE__ */ new Set())).add(scope.filename);
47881
+ }
47882
+ }
47883
+ function recordResolvedElementDeps(ctx, { props }) {
47884
+ for (const key in props) {
47885
+ recordScopeDep(ctx, props[key]._ownerScope);
47886
+ }
47887
+ }
47824
47888
  function resolveTypeElements(ctx, node, scope, typeParameters) {
47825
47889
  const canCache = !typeParameters;
47826
47890
  if (canCache && node._resolvedElements) {
47891
+ recordResolvedElementDeps(ctx, node._resolvedElements);
47827
47892
  return node._resolvedElements;
47828
47893
  }
47829
47894
  const resolved = innerResolveTypeElements(
@@ -48296,6 +48361,7 @@ function resolveBuiltin(ctx, node, name, scope, typeParameters) {
48296
48361
  function resolveTypeReference(ctx, node, scope, name, onlyExported = false) {
48297
48362
  const canCache = !(scope == null ? void 0 : scope.isGenericScope);
48298
48363
  if (canCache && node._resolvedReference) {
48364
+ recordScopeDep(ctx, node._resolvedReference._ownerScope);
48299
48365
  return node._resolvedReference;
48300
48366
  }
48301
48367
  const resolved = innerResolveTypeReference(
@@ -48322,7 +48388,11 @@ function innerResolveTypeReference(ctx, scope, name, node, onlyExported) {
48322
48388
  const src = node.type === "TSTypeQuery" ? s.declares : s.types;
48323
48389
  if (src[name]) {
48324
48390
  (ctx.deps || (ctx.deps = /* @__PURE__ */ new Set())).add(s.filename);
48325
- return src[name];
48391
+ const resolved = src[name];
48392
+ if (resolved._ownerScope && resolved._ownerScope !== s) {
48393
+ ctx.deps.add(resolved._ownerScope.filename);
48394
+ }
48395
+ return resolved;
48326
48396
  }
48327
48397
  }
48328
48398
  }
@@ -48426,7 +48496,7 @@ function resolveTypeFromImport(ctx, node, name, scope) {
48426
48496
  const sourceScope = importSourceToScope(ctx, node, scope, source);
48427
48497
  return resolveTypeReference(ctx, node, sourceScope, imported, true);
48428
48498
  }
48429
- function importSourceToScope(ctx, node, scope, source) {
48499
+ function importSourceToScope(ctx, node, scope, source, trackDep = true) {
48430
48500
  let fs;
48431
48501
  try {
48432
48502
  fs = resolveFS(ctx);
@@ -48458,12 +48528,22 @@ function importSourceToScope(ctx, node, scope, source) {
48458
48528
  );
48459
48529
  }
48460
48530
  }
48531
+ if (!resolved && source[0] === "." && false) {
48532
+ if (!ts) {
48533
+ if (loadTS) ts = loadTS();
48534
+ }
48535
+ if (ts) {
48536
+ resolved = resolveWithTS(scope.filename);
48537
+ }
48538
+ }
48461
48539
  if (resolved) {
48462
48540
  resolved = scope.resolvedImportSources[source] = normalizePath(resolved);
48463
48541
  }
48464
48542
  }
48465
48543
  if (resolved) {
48466
- (ctx.deps || (ctx.deps = /* @__PURE__ */ new Set())).add(resolved);
48544
+ if (trackDep) {
48545
+ (ctx.deps || (ctx.deps = /* @__PURE__ */ new Set())).add(resolved);
48546
+ }
48467
48547
  return fileToScope(ctx, resolved);
48468
48548
  } else {
48469
48549
  return ctx.error(
@@ -48492,16 +48572,22 @@ function resolveExt(filename, fs) {
48492
48572
  }
48493
48573
  const tsConfigCache = createCache();
48494
48574
  const tsConfigRefMap = /* @__PURE__ */ new Map();
48575
+ function resolveWithTS(containingFile, source, ts2, fs) {
48576
+ return;
48577
+ }
48495
48578
  const fileToScopeCache = createCache();
48579
+ const fileToGlobalScopeCache = createCache();
48496
48580
  function invalidateTypeCache(filename) {
48497
48581
  filename = normalizePath(filename);
48498
48582
  fileToScopeCache.delete(filename);
48583
+ fileToGlobalScopeCache.delete(filename);
48499
48584
  tsConfigCache.delete(filename);
48500
48585
  const affectedConfig = tsConfigRefMap.get(filename);
48501
48586
  if (affectedConfig) tsConfigCache.delete(affectedConfig);
48502
48587
  }
48503
48588
  function fileToScope(ctx, filename, asGlobal = false) {
48504
- const cached = fileToScopeCache.get(filename);
48589
+ const cache = asGlobal ? fileToGlobalScopeCache : fileToScopeCache;
48590
+ const cached = cache.get(filename);
48505
48591
  if (cached) {
48506
48592
  return cached;
48507
48593
  }
@@ -48510,7 +48596,7 @@ function fileToScope(ctx, filename, asGlobal = false) {
48510
48596
  const body = parseFile(filename, source, fs, ctx.options.babelParserPlugins);
48511
48597
  const scope = new TypeScope(filename, source, 0, recordImports(body));
48512
48598
  recordTypes(ctx, body, scope, asGlobal);
48513
- fileToScopeCache.set(filename, scope);
48599
+ cache.set(filename, scope);
48514
48600
  return scope;
48515
48601
  }
48516
48602
  function parseFile(filename, content, fs, parserPlugins) {
@@ -48608,8 +48694,40 @@ function recordTypes(ctx, body, scope, asGlobal = false) {
48608
48694
  }
48609
48695
  } else if (stmt.type === "TSModuleDeclaration" && stmt.global) {
48610
48696
  for (const s of stmt.body.body) {
48611
- if (s.type === "ExportNamedDeclaration" && s.declaration) {
48612
- recordType(s.declaration, types, declares);
48697
+ if (s.type === "ExportNamedDeclaration") {
48698
+ if (s.declaration) {
48699
+ recordType(s.declaration, types, declares);
48700
+ } else if (s.source) {
48701
+ const sourceScope = importSourceToScope(
48702
+ ctx,
48703
+ s.source,
48704
+ scope,
48705
+ s.source.value,
48706
+ false
48707
+ );
48708
+ for (const spec of s.specifiers) {
48709
+ if (spec.type === "ExportSpecifier") {
48710
+ const exported = getId(spec.exported);
48711
+ const local = spec.local.name;
48712
+ if (sourceScope.exportedTypes[local]) {
48713
+ types[exported] = sourceScope.exportedTypes[local];
48714
+ }
48715
+ if (sourceScope.exportedDeclares[local]) {
48716
+ declares[exported] = sourceScope.exportedDeclares[local];
48717
+ }
48718
+ }
48719
+ }
48720
+ }
48721
+ } else if (s.type === "ExportAllDeclaration" && s.source) {
48722
+ const sourceScope = importSourceToScope(
48723
+ ctx,
48724
+ s.source,
48725
+ scope,
48726
+ s.source.value,
48727
+ false
48728
+ );
48729
+ Object.assign(types, sourceScope.exportedTypes);
48730
+ Object.assign(declares, sourceScope.exportedDeclares);
48613
48731
  } else {
48614
48732
  recordType(s, types, declares);
48615
48733
  }
@@ -48674,11 +48792,11 @@ function recordTypes(ctx, body, scope, asGlobal = false) {
48674
48792
  }
48675
48793
  for (const key of Object.keys(types)) {
48676
48794
  const node = types[key];
48677
- node._ownerScope = scope;
48678
- if (node._ns) node._ns._ownerScope = scope;
48795
+ if (!node._ownerScope) node._ownerScope = scope;
48796
+ if (node._ns && !node._ns._ownerScope) node._ns._ownerScope = scope;
48679
48797
  }
48680
48798
  for (const key of Object.keys(declares)) {
48681
- declares[key]._ownerScope = scope;
48799
+ if (!declares[key]._ownerScope) declares[key]._ownerScope = scope;
48682
48800
  }
48683
48801
  }
48684
48802
  function recordType(node, types, declares, overwriteId) {
@@ -48873,7 +48991,11 @@ function inferRuntimeType(ctx, node, scope = node._ownerScope || ctxToScope(ctx)
48873
48991
  return [UNKNOWN_TYPE];
48874
48992
  }
48875
48993
  case "TSTypeReference": {
48876
- const resolved = resolveTypeReference(ctx, node, scope);
48994
+ let resolved;
48995
+ try {
48996
+ resolved = resolveTypeReference(ctx, node, scope);
48997
+ } catch (e) {
48998
+ }
48877
48999
  if (resolved) {
48878
49000
  if (resolved.type === "TSTypeAliasDeclaration") {
48879
49001
  if (resolved.typeAnnotation.type === "TSFunctionType") {
@@ -48993,6 +49115,33 @@ function inferRuntimeType(ctx, node, scope = node._ownerScope || ctxToScope(ctx)
48993
49115
  return ["Map"];
48994
49116
  case "ReadonlySet":
48995
49117
  return ["Set"];
49118
+ // Vue ref wrapper types — handled here so that runtime type
49119
+ // inference still works when `vue` types cannot be resolved
49120
+ // (e.g. consumed as built artifacts in another package). #14729
49121
+ case "Ref":
49122
+ case "ShallowRef":
49123
+ case "ComputedRef":
49124
+ case "WritableComputedRef":
49125
+ return ["Object"];
49126
+ case "MaybeRef":
49127
+ case "MaybeRefOrGetter": {
49128
+ const types = /* @__PURE__ */ new Set(["Object"]);
49129
+ if (node.typeName.name === "MaybeRefOrGetter") {
49130
+ types.add("Function");
49131
+ }
49132
+ if (node.typeParameters && node.typeParameters.params[0]) {
49133
+ for (const t of inferRuntimeType(
49134
+ ctx,
49135
+ node.typeParameters.params[0],
49136
+ scope,
49137
+ false,
49138
+ typeParameters
49139
+ )) {
49140
+ types.add(t);
49141
+ }
49142
+ }
49143
+ return Array.from(types);
49144
+ }
48996
49145
  case "NonNullable":
48997
49146
  if (node.typeParameters && node.typeParameters.params[0]) {
48998
49147
  return inferRuntimeType(
@@ -50929,7 +51078,7 @@ var __spreadValues = (a, b) => {
50929
51078
  }
50930
51079
  return a;
50931
51080
  };
50932
- const version = "3.5.33";
51081
+ const version = "3.5.35";
50933
51082
  const parseCache = parseCache$1;
50934
51083
  const errorMessages = __spreadValues(__spreadValues({}, errorMessages$1), DOMErrorMessages);
50935
51084
  const walk = walk$2;