@stencil/core 4.43.2 → 4.43.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/cli/index.cjs +379 -154
  2. package/cli/index.js +379 -154
  3. package/cli/package.json +1 -1
  4. package/compiler/package.json +1 -1
  5. package/compiler/stencil.js +2276 -2065
  6. package/dev-server/client/index.js +1 -1
  7. package/dev-server/client/package.json +1 -1
  8. package/dev-server/connector.html +2 -2
  9. package/dev-server/index.js +1 -1
  10. package/dev-server/package.json +1 -1
  11. package/dev-server/server-process.js +346 -137
  12. package/internal/app-data/package.json +1 -1
  13. package/internal/app-globals/package.json +1 -1
  14. package/internal/client/index.js +1 -1
  15. package/internal/client/package.json +1 -1
  16. package/internal/client/patch-browser.js +1 -1
  17. package/internal/hydrate/index.js +423 -214
  18. package/internal/hydrate/package.json +1 -1
  19. package/internal/hydrate/runner.js +396 -189
  20. package/internal/package.json +1 -1
  21. package/internal/stencil-private.d.ts +1 -1
  22. package/internal/stencil-public-compiler.d.ts +61 -6
  23. package/internal/testing/index.js +410 -201
  24. package/internal/testing/package.json +1 -1
  25. package/mock-doc/index.cjs +2 -4
  26. package/mock-doc/index.d.ts +1 -1
  27. package/mock-doc/index.js +2 -4
  28. package/mock-doc/package.json +1 -1
  29. package/package.json +2 -2
  30. package/screenshot/index.js +341 -132
  31. package/screenshot/package.json +1 -1
  32. package/screenshot/pixel-match.js +1 -1
  33. package/sys/node/glob.js +1 -1
  34. package/sys/node/index.js +44 -46
  35. package/sys/node/package.json +1 -1
  36. package/sys/node/worker.js +1 -1
  37. package/testing/index.js +420 -211
  38. package/testing/package.json +1 -1
package/testing/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Testing v4.43.2 | MIT Licensed | https://stenciljs.com
2
+ Stencil Testing v4.43.3 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
 
@@ -2166,15 +2166,15 @@ var formatComponentRuntimeMeta = (compilerMeta, includeMethods) => {
2166
2166
  ]);
2167
2167
  };
2168
2168
  var formatComponentRuntimeReactiveHandlers = (compilerMeta, decorator) => {
2169
- var _a;
2169
+ var _a2;
2170
2170
  const handlers = {};
2171
- (_a = compilerMeta[decorator]) == null ? void 0 : _a.forEach(({ propName, methodName, handlerOptions }) => {
2172
- var _a2;
2171
+ (_a2 = compilerMeta[decorator]) == null ? void 0 : _a2.forEach(({ propName, methodName, handlerOptions }) => {
2172
+ var _a3;
2173
2173
  let watcherFlags = 0;
2174
2174
  if (handlerOptions == null ? void 0 : handlerOptions.immediate) {
2175
2175
  watcherFlags |= 1 /* Immediate */;
2176
2176
  }
2177
- handlers[propName] = [...(_a2 = handlers[propName]) != null ? _a2 : [], { [methodName]: watcherFlags }];
2177
+ handlers[propName] = [...(_a3 = handlers[propName]) != null ? _a3 : [], { [methodName]: watcherFlags }];
2178
2178
  });
2179
2179
  return handlers;
2180
2180
  };
@@ -2554,7 +2554,7 @@ function resolve(...paths) {
2554
2554
 
2555
2555
  // src/utils/logger/logger-typescript.ts
2556
2556
  var loadTypeScriptDiagnostic = (tsDiagnostic) => {
2557
- var _a;
2557
+ var _a2;
2558
2558
  const d = {
2559
2559
  absFilePath: void 0,
2560
2560
  code: tsDiagnostic.code.toString(),
@@ -2581,7 +2581,7 @@ var loadTypeScriptDiagnostic = (tsDiagnostic) => {
2581
2581
  lineNumber: posData.line + 1,
2582
2582
  text: srcLines[posData.line],
2583
2583
  errorCharStart: posData.character,
2584
- errorLength: Math.max((_a = tsDiagnostic.length) != null ? _a : 0, 1)
2584
+ errorLength: Math.max((_a2 = tsDiagnostic.length) != null ? _a2 : 0, 1)
2585
2585
  };
2586
2586
  d.lineNumber = errorLine.lineNumber;
2587
2587
  d.columnNumber = errorLine.errorCharStart + 1;
@@ -2614,14 +2614,14 @@ var loadTypeScriptDiagnostic = (tsDiagnostic) => {
2614
2614
  return d;
2615
2615
  };
2616
2616
  var flattenDiagnosticMessageText = (tsDiagnostic, diag) => {
2617
- var _a, _b;
2617
+ var _a2, _b;
2618
2618
  if (typeof diag === "string") {
2619
2619
  return diag;
2620
2620
  } else if (diag === void 0) {
2621
2621
  return "";
2622
2622
  }
2623
2623
  const ignoreCodes = [];
2624
- const isStencilConfig = ((_b = (_a = tsDiagnostic.file) == null ? void 0 : _a.fileName) != null ? _b : "").includes("stencil.config");
2624
+ const isStencilConfig = ((_b = (_a2 = tsDiagnostic.file) == null ? void 0 : _a2.fileName) != null ? _b : "").includes("stencil.config");
2625
2625
  if (isStencilConfig) {
2626
2626
  ignoreCodes.push(2322);
2627
2627
  }
@@ -2771,8 +2771,35 @@ var unescape2 = (s, { windowsPathsNoEscape = false } = {}) => {
2771
2771
  };
2772
2772
 
2773
2773
  // node_modules/minimatch/dist/esm/ast.js
2774
+ var _a;
2774
2775
  var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
2775
2776
  var isExtglobType = (c) => types.has(c);
2777
+ var isExtglobAST = (c) => isExtglobType(c.type);
2778
+ var adoptionMap = /* @__PURE__ */ new Map([
2779
+ ["!", ["@"]],
2780
+ ["?", ["?", "@"]],
2781
+ ["@", ["@"]],
2782
+ ["*", ["*", "+", "?", "@"]],
2783
+ ["+", ["+", "@"]]
2784
+ ]);
2785
+ var adoptionWithSpaceMap = /* @__PURE__ */ new Map([
2786
+ ["!", ["?"]],
2787
+ ["@", ["?"]],
2788
+ ["+", ["?", "*"]]
2789
+ ]);
2790
+ var adoptionAnyMap = /* @__PURE__ */ new Map([
2791
+ ["!", ["?", "@"]],
2792
+ ["?", ["?", "@"]],
2793
+ ["@", ["?", "@"]],
2794
+ ["*", ["*", "+", "?", "@"]],
2795
+ ["+", ["+", "@", "?", "*"]]
2796
+ ]);
2797
+ var usurpMap = /* @__PURE__ */ new Map([
2798
+ ["!", /* @__PURE__ */ new Map([["!", "@"]])],
2799
+ ["?", /* @__PURE__ */ new Map([["*", "*"], ["+", "*"]])],
2800
+ ["@", /* @__PURE__ */ new Map([["!", "!"], ["?", "?"], ["@", "@"], ["*", "*"], ["+", "+"]])],
2801
+ ["+", /* @__PURE__ */ new Map([["?", "*"], ["*", "*"]])]
2802
+ ]);
2776
2803
  var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
2777
2804
  var startNoDot = "(?!\\.)";
2778
2805
  var addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
@@ -2782,8 +2809,8 @@ var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
2782
2809
  var qmark = "[^/]";
2783
2810
  var star = qmark + "*?";
2784
2811
  var starNoEmpty = qmark + "+?";
2785
- var _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, partsToRegExp_fn, parseGlob_fn;
2786
- var _AST = class _AST {
2812
+ var _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, canAdoptWithSpace_fn, canAdopt_fn, canAdoptType_fn, adoptWithSpace_fn, adopt_fn, canUsurpType_fn, canUsurp_fn, usurp_fn, flatten_fn, partsToRegExp_fn, parseGlob_fn;
2813
+ var AST = class {
2787
2814
  constructor(type, parent, options = {}) {
2788
2815
  __privateAdd(this, _AST_instances);
2789
2816
  __publicField(this, "type");
@@ -2836,44 +2863,44 @@ var _AST = class _AST {
2836
2863
  for (const p of parts) {
2837
2864
  if (p === "")
2838
2865
  continue;
2839
- if (typeof p !== "string" && !(p instanceof _AST && __privateGet(p, _parent) === this)) {
2866
+ if (typeof p !== "string" && !(p instanceof _a && __privateGet(p, _parent) === this)) {
2840
2867
  throw new Error("invalid part: " + p);
2841
2868
  }
2842
2869
  __privateGet(this, _parts).push(p);
2843
2870
  }
2844
2871
  }
2845
2872
  toJSON() {
2846
- var _a;
2873
+ var _a2;
2847
2874
  const ret = this.type === null ? __privateGet(this, _parts).slice().map((p) => typeof p === "string" ? p : p.toJSON()) : [this.type, ...__privateGet(this, _parts).map((p) => p.toJSON())];
2848
2875
  if (this.isStart() && !this.type)
2849
2876
  ret.unshift([]);
2850
- if (this.isEnd() && (this === __privateGet(this, _root) || __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")) {
2877
+ if (this.isEnd() && (this === __privateGet(this, _root) || __privateGet(__privateGet(this, _root), _filledNegs) && ((_a2 = __privateGet(this, _parent)) == null ? void 0 : _a2.type) === "!")) {
2851
2878
  ret.push({});
2852
2879
  }
2853
2880
  return ret;
2854
2881
  }
2855
2882
  isStart() {
2856
- var _a;
2883
+ var _a2;
2857
2884
  if (__privateGet(this, _root) === this)
2858
2885
  return true;
2859
- if (!((_a = __privateGet(this, _parent)) == null ? void 0 : _a.isStart()))
2886
+ if (!((_a2 = __privateGet(this, _parent)) == null ? void 0 : _a2.isStart()))
2860
2887
  return false;
2861
2888
  if (__privateGet(this, _parentIndex) === 0)
2862
2889
  return true;
2863
2890
  const p = __privateGet(this, _parent);
2864
2891
  for (let i = 0; i < __privateGet(this, _parentIndex); i++) {
2865
2892
  const pp = __privateGet(p, _parts)[i];
2866
- if (!(pp instanceof _AST && pp.type === "!")) {
2893
+ if (!(pp instanceof _a && pp.type === "!")) {
2867
2894
  return false;
2868
2895
  }
2869
2896
  }
2870
2897
  return true;
2871
2898
  }
2872
2899
  isEnd() {
2873
- var _a, _b, _c;
2900
+ var _a2, _b, _c;
2874
2901
  if (__privateGet(this, _root) === this)
2875
2902
  return true;
2876
- if (((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")
2903
+ if (((_a2 = __privateGet(this, _parent)) == null ? void 0 : _a2.type) === "!")
2877
2904
  return true;
2878
2905
  if (!((_b = __privateGet(this, _parent)) == null ? void 0 : _b.isEnd()))
2879
2906
  return false;
@@ -2889,16 +2916,16 @@ var _AST = class _AST {
2889
2916
  this.push(part.clone(this));
2890
2917
  }
2891
2918
  clone(parent) {
2892
- const c = new _AST(this.type, parent);
2919
+ const c = new _a(this.type, parent);
2893
2920
  for (const p of __privateGet(this, _parts)) {
2894
2921
  c.copyIn(p);
2895
2922
  }
2896
2923
  return c;
2897
2924
  }
2898
2925
  static fromGlob(pattern, options = {}) {
2899
- var _a;
2900
- const ast = new _AST(null, void 0, options);
2901
- __privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, pattern, ast, 0, options);
2926
+ var _a2;
2927
+ const ast = new _a(null, void 0, options);
2928
+ __privateMethod(_a2 = _a, _AST_static, parseAST_fn).call(_a2, pattern, ast, 0, options, 0);
2902
2929
  return ast;
2903
2930
  }
2904
2931
  // returns the regular expression if there's magic, or the unescaped
@@ -2991,15 +3018,17 @@ var _AST = class _AST {
2991
3018
  // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
2992
3019
  // or start or whatever) and prepend ^ or / at the Regexp construction.
2993
3020
  toRegExpSource(allowDot) {
2994
- var _a;
3021
+ var _a2;
2995
3022
  const dot = allowDot != null ? allowDot : !!__privateGet(this, _options).dot;
2996
- if (__privateGet(this, _root) === this)
3023
+ if (__privateGet(this, _root) === this) {
3024
+ __privateMethod(this, _AST_instances, flatten_fn).call(this);
2997
3025
  __privateMethod(this, _AST_instances, fillNegs_fn).call(this);
2998
- if (!this.type) {
3026
+ }
3027
+ if (!isExtglobAST(this)) {
2999
3028
  const noEmpty = this.isStart() && this.isEnd();
3000
3029
  const src = __privateGet(this, _parts).map((p) => {
3001
- var _a2;
3002
- const [re, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a2 = _AST, _AST_static, parseGlob_fn).call(_a2, p, __privateGet(this, _hasMagic), noEmpty) : p.toRegExpSource(allowDot);
3030
+ var _a3;
3031
+ const [re, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a3 = _a, _AST_static, parseGlob_fn).call(_a3, p, __privateGet(this, _hasMagic), noEmpty) : p.toRegExpSource(allowDot);
3003
3032
  __privateSet(this, _hasMagic, __privateGet(this, _hasMagic) || hasMagic);
3004
3033
  __privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
3005
3034
  return re;
@@ -3022,7 +3051,7 @@ var _AST = class _AST {
3022
3051
  }
3023
3052
  }
3024
3053
  let end = "";
3025
- if (this.isEnd() && __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!") {
3054
+ if (this.isEnd() && __privateGet(__privateGet(this, _root), _filledNegs) && ((_a2 = __privateGet(this, _parent)) == null ? void 0 : _a2.type) === "!") {
3026
3055
  end = "(?:$|\\/)";
3027
3056
  }
3028
3057
  const final2 = start3 + src + end;
@@ -3038,9 +3067,10 @@ var _AST = class _AST {
3038
3067
  let body = __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, dot);
3039
3068
  if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
3040
3069
  const s = this.toString();
3041
- __privateSet(this, _parts, [s]);
3042
- this.type = null;
3043
- __privateSet(this, _hasMagic, void 0);
3070
+ const me = this;
3071
+ __privateSet(me, _parts, [s]);
3072
+ me.type = null;
3073
+ __privateSet(me, _hasMagic, void 0);
3044
3074
  return [s, unescape2(this.toString()), false, false];
3045
3075
  }
3046
3076
  let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? "" : __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, true);
@@ -3109,8 +3139,9 @@ fillNegs_fn = function() {
3109
3139
  return this;
3110
3140
  };
3111
3141
  _AST_static = new WeakSet();
3112
- parseAST_fn = function(str, ast, pos, opt) {
3113
- var _a, _b;
3142
+ parseAST_fn = function(str, ast, pos, opt, extDepth) {
3143
+ var _a2, _b, _c, _d, _e;
3144
+ const maxDepth = (_a2 = opt.maxExtglobRecursion) != null ? _a2 : 2;
3114
3145
  let escaping = false;
3115
3146
  let inBrace = false;
3116
3147
  let braceStart = -1;
@@ -3142,11 +3173,12 @@ parseAST_fn = function(str, ast, pos, opt) {
3142
3173
  acc2 += c;
3143
3174
  continue;
3144
3175
  }
3145
- if (!opt.noext && isExtglobType(c) && str.charAt(i2) === "(") {
3176
+ const doRecurse = !opt.noext && isExtglobType(c) && str.charAt(i2) === "(" && extDepth <= maxDepth;
3177
+ if (doRecurse) {
3146
3178
  ast.push(acc2);
3147
3179
  acc2 = "";
3148
- const ext2 = new _AST(c, ast);
3149
- i2 = __privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, str, ext2, i2, opt);
3180
+ const ext2 = new _a(c, ast);
3181
+ i2 = __privateMethod(_b = _a, _AST_static, parseAST_fn).call(_b, str, ext2, i2, opt, extDepth + 1);
3150
3182
  ast.push(ext2);
3151
3183
  continue;
3152
3184
  }
@@ -3156,7 +3188,7 @@ parseAST_fn = function(str, ast, pos, opt) {
3156
3188
  return i2;
3157
3189
  }
3158
3190
  let i = pos + 1;
3159
- let part = new _AST(null, ast);
3191
+ let part = new _a(null, ast);
3160
3192
  const parts = [];
3161
3193
  let acc = "";
3162
3194
  while (i < str.length) {
@@ -3183,19 +3215,22 @@ parseAST_fn = function(str, ast, pos, opt) {
3183
3215
  acc += c;
3184
3216
  continue;
3185
3217
  }
3186
- if (isExtglobType(c) && str.charAt(i) === "(") {
3218
+ const doRecurse = isExtglobType(c) && str.charAt(i) === "(" && /* c8 ignore start - the maxDepth is sufficient here */
3219
+ (extDepth <= maxDepth || ast && __privateMethod(_c = ast, _AST_instances, canAdoptType_fn).call(_c, c));
3220
+ if (doRecurse) {
3221
+ const depthAdd = ast && __privateMethod(_d = ast, _AST_instances, canAdoptType_fn).call(_d, c) ? 0 : 1;
3187
3222
  part.push(acc);
3188
3223
  acc = "";
3189
- const ext2 = new _AST(c, part);
3224
+ const ext2 = new _a(c, part);
3190
3225
  part.push(ext2);
3191
- i = __privateMethod(_b = _AST, _AST_static, parseAST_fn).call(_b, str, ext2, i, opt);
3226
+ i = __privateMethod(_e = _a, _AST_static, parseAST_fn).call(_e, str, ext2, i, opt, extDepth + depthAdd);
3192
3227
  continue;
3193
3228
  }
3194
3229
  if (c === "|") {
3195
3230
  part.push(acc);
3196
3231
  acc = "";
3197
3232
  parts.push(part);
3198
- part = new _AST(null, ast);
3233
+ part = new _a(null, ast);
3199
3234
  continue;
3200
3235
  }
3201
3236
  if (c === ")") {
@@ -3214,6 +3249,100 @@ parseAST_fn = function(str, ast, pos, opt) {
3214
3249
  __privateSet(ast, _parts, [str.substring(pos - 1)]);
3215
3250
  return i;
3216
3251
  };
3252
+ canAdoptWithSpace_fn = function(child) {
3253
+ return __privateMethod(this, _AST_instances, canAdopt_fn).call(this, child, adoptionWithSpaceMap);
3254
+ };
3255
+ canAdopt_fn = function(child, map2 = adoptionMap) {
3256
+ if (!child || typeof child !== "object" || child.type !== null || __privateGet(child, _parts).length !== 1 || this.type === null) {
3257
+ return false;
3258
+ }
3259
+ const gc = __privateGet(child, _parts)[0];
3260
+ if (!gc || typeof gc !== "object" || gc.type === null) {
3261
+ return false;
3262
+ }
3263
+ return __privateMethod(this, _AST_instances, canAdoptType_fn).call(this, gc.type, map2);
3264
+ };
3265
+ canAdoptType_fn = function(c, map2 = adoptionAnyMap) {
3266
+ var _a2;
3267
+ return !!((_a2 = map2.get(this.type)) == null ? void 0 : _a2.includes(c));
3268
+ };
3269
+ adoptWithSpace_fn = function(child, index) {
3270
+ const gc = __privateGet(child, _parts)[0];
3271
+ const blank = new _a(null, gc, this.options);
3272
+ __privateGet(blank, _parts).push("");
3273
+ gc.push(blank);
3274
+ __privateMethod(this, _AST_instances, adopt_fn).call(this, child, index);
3275
+ };
3276
+ adopt_fn = function(child, index) {
3277
+ const gc = __privateGet(child, _parts)[0];
3278
+ __privateGet(this, _parts).splice(index, 1, ...__privateGet(gc, _parts));
3279
+ for (const p of __privateGet(gc, _parts)) {
3280
+ if (typeof p === "object")
3281
+ __privateSet(p, _parent, this);
3282
+ }
3283
+ __privateSet(this, _toString, void 0);
3284
+ };
3285
+ canUsurpType_fn = function(c) {
3286
+ const m = usurpMap.get(this.type);
3287
+ return !!(m == null ? void 0 : m.has(c));
3288
+ };
3289
+ canUsurp_fn = function(child) {
3290
+ if (!child || typeof child !== "object" || child.type !== null || __privateGet(child, _parts).length !== 1 || this.type === null || __privateGet(this, _parts).length !== 1) {
3291
+ return false;
3292
+ }
3293
+ const gc = __privateGet(child, _parts)[0];
3294
+ if (!gc || typeof gc !== "object" || gc.type === null) {
3295
+ return false;
3296
+ }
3297
+ return __privateMethod(this, _AST_instances, canUsurpType_fn).call(this, gc.type);
3298
+ };
3299
+ usurp_fn = function(child) {
3300
+ const m = usurpMap.get(this.type);
3301
+ const gc = __privateGet(child, _parts)[0];
3302
+ const nt = m == null ? void 0 : m.get(gc.type);
3303
+ if (!nt)
3304
+ return false;
3305
+ __privateSet(this, _parts, __privateGet(gc, _parts));
3306
+ for (const p of __privateGet(this, _parts)) {
3307
+ if (typeof p === "object")
3308
+ __privateSet(p, _parent, this);
3309
+ }
3310
+ this.type = nt;
3311
+ __privateSet(this, _toString, void 0);
3312
+ __privateSet(this, _emptyExt, false);
3313
+ };
3314
+ flatten_fn = function() {
3315
+ var _a2, _b;
3316
+ if (!isExtglobAST(this)) {
3317
+ for (const p of __privateGet(this, _parts)) {
3318
+ if (typeof p === "object")
3319
+ __privateMethod(_a2 = p, _AST_instances, flatten_fn).call(_a2);
3320
+ }
3321
+ } else {
3322
+ let iterations = 0;
3323
+ let done = false;
3324
+ do {
3325
+ done = true;
3326
+ for (let i = 0; i < __privateGet(this, _parts).length; i++) {
3327
+ const c = __privateGet(this, _parts)[i];
3328
+ if (typeof c === "object") {
3329
+ __privateMethod(_b = c, _AST_instances, flatten_fn).call(_b);
3330
+ if (__privateMethod(this, _AST_instances, canAdopt_fn).call(this, c)) {
3331
+ done = false;
3332
+ __privateMethod(this, _AST_instances, adopt_fn).call(this, c, i);
3333
+ } else if (__privateMethod(this, _AST_instances, canAdoptWithSpace_fn).call(this, c)) {
3334
+ done = false;
3335
+ __privateMethod(this, _AST_instances, adoptWithSpace_fn).call(this, c, i);
3336
+ } else if (__privateMethod(this, _AST_instances, canUsurp_fn).call(this, c)) {
3337
+ done = false;
3338
+ __privateMethod(this, _AST_instances, usurp_fn).call(this, c);
3339
+ }
3340
+ }
3341
+ }
3342
+ } while (!done && ++iterations < 10);
3343
+ }
3344
+ __privateSet(this, _toString, void 0);
3345
+ };
3217
3346
  partsToRegExp_fn = function(dot) {
3218
3347
  return __privateGet(this, _parts).map((p) => {
3219
3348
  if (typeof p === "string") {
@@ -3228,11 +3357,13 @@ parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
3228
3357
  let escaping = false;
3229
3358
  let re = "";
3230
3359
  let uflag = false;
3360
+ let inStar = false;
3231
3361
  for (let i = 0; i < glob.length; i++) {
3232
3362
  const c = glob.charAt(i);
3233
3363
  if (escaping) {
3234
3364
  escaping = false;
3235
3365
  re += (reSpecials.has(c) ? "\\" : "") + c;
3366
+ inStar = false;
3236
3367
  continue;
3237
3368
  }
3238
3369
  if (c === "\\") {
@@ -3250,16 +3381,19 @@ parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
3250
3381
  uflag = uflag || needUflag;
3251
3382
  i += consumed - 1;
3252
3383
  hasMagic = hasMagic || magic;
3384
+ inStar = false;
3253
3385
  continue;
3254
3386
  }
3255
3387
  }
3256
3388
  if (c === "*") {
3257
- if (noEmpty && glob === "*")
3258
- re += starNoEmpty;
3259
- else
3260
- re += star;
3389
+ if (inStar)
3390
+ continue;
3391
+ inStar = true;
3392
+ re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star;
3261
3393
  hasMagic = true;
3262
3394
  continue;
3395
+ } else {
3396
+ inStar = false;
3263
3397
  }
3264
3398
  if (c === "?") {
3265
3399
  re += qmark;
@@ -3270,8 +3404,8 @@ parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
3270
3404
  }
3271
3405
  return [re, unescape2(glob), !!hasMagic, uflag];
3272
3406
  };
3273
- __privateAdd(_AST, _AST_static);
3274
- var AST = _AST;
3407
+ __privateAdd(AST, _AST_static);
3408
+ _a = AST;
3275
3409
 
3276
3410
  // node_modules/minimatch/dist/esm/escape.js
3277
3411
  var escape = (s, { windowsPathsNoEscape = false } = {}) => {
@@ -3410,28 +3544,33 @@ var match = (list, pattern, options = {}) => {
3410
3544
  minimatch.match = match;
3411
3545
  var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
3412
3546
  var regExpEscape2 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
3547
+ var _Minimatch_instances, matchGlobstar_fn, matchGlobStarBodySections_fn, matchOne_fn;
3413
3548
  var Minimatch = class {
3414
- options;
3415
- set;
3416
- pattern;
3417
- windowsPathsNoEscape;
3418
- nonegate;
3419
- negate;
3420
- comment;
3421
- empty;
3422
- preserveMultipleSlashes;
3423
- partial;
3424
- globSet;
3425
- globParts;
3426
- nocase;
3427
- isWindows;
3428
- platform;
3429
- windowsNoMagicRoot;
3430
- regexp;
3431
3549
  constructor(pattern, options = {}) {
3550
+ __privateAdd(this, _Minimatch_instances);
3551
+ __publicField(this, "options");
3552
+ __publicField(this, "set");
3553
+ __publicField(this, "pattern");
3554
+ __publicField(this, "windowsPathsNoEscape");
3555
+ __publicField(this, "nonegate");
3556
+ __publicField(this, "negate");
3557
+ __publicField(this, "comment");
3558
+ __publicField(this, "empty");
3559
+ __publicField(this, "preserveMultipleSlashes");
3560
+ __publicField(this, "partial");
3561
+ __publicField(this, "globSet");
3562
+ __publicField(this, "globParts");
3563
+ __publicField(this, "nocase");
3564
+ __publicField(this, "isWindows");
3565
+ __publicField(this, "platform");
3566
+ __publicField(this, "windowsNoMagicRoot");
3567
+ __publicField(this, "maxGlobstarRecursion");
3568
+ __publicField(this, "regexp");
3569
+ var _a2;
3432
3570
  assertValidPattern(pattern);
3433
3571
  options = options || {};
3434
3572
  this.options = options;
3573
+ this.maxGlobstarRecursion = (_a2 = options.maxGlobstarRecursion) != null ? _a2 : 200;
3435
3574
  this.pattern = pattern;
3436
3575
  this.platform = options.platform || defaultPlatform;
3437
3576
  this.isWindows = this.platform === "win32";
@@ -3699,10 +3838,11 @@ var Minimatch = class {
3699
3838
  for (let i = 0; i < globParts.length - 1; i++) {
3700
3839
  for (let j = i + 1; j < globParts.length; j++) {
3701
3840
  const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
3702
- if (!matched)
3703
- continue;
3704
- globParts[i] = matched;
3705
- globParts[j] = [];
3841
+ if (matched) {
3842
+ globParts[i] = [];
3843
+ globParts[j] = matched;
3844
+ break;
3845
+ }
3706
3846
  }
3707
3847
  }
3708
3848
  return globParts.filter((gs) => gs.length);
@@ -3763,7 +3903,8 @@ var Minimatch = class {
3763
3903
  // out of pattern, then that's fine, as long as all
3764
3904
  // the parts match.
3765
3905
  matchOne(file, pattern, partial = false) {
3766
- const options = this.options;
3906
+ let fileStartIndex = 0;
3907
+ let patternStartIndex = 0;
3767
3908
  if (this.isWindows) {
3768
3909
  const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
3769
3910
  const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
@@ -3772,14 +3913,14 @@ var Minimatch = class {
3772
3913
  const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
3773
3914
  const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
3774
3915
  if (typeof fdi === "number" && typeof pdi === "number") {
3775
- const [fd, pd] = [file[fdi], pattern[pdi]];
3916
+ const [fd, pd] = [
3917
+ file[fdi],
3918
+ pattern[pdi]
3919
+ ];
3776
3920
  if (fd.toLowerCase() === pd.toLowerCase()) {
3777
3921
  pattern[pdi] = fd;
3778
- if (pdi > fdi) {
3779
- pattern = pattern.slice(pdi);
3780
- } else if (fdi > pdi) {
3781
- file = file.slice(fdi);
3782
- }
3922
+ patternStartIndex = pdi;
3923
+ fileStartIndex = fdi;
3783
3924
  }
3784
3925
  }
3785
3926
  }
@@ -3787,71 +3928,10 @@ var Minimatch = class {
3787
3928
  if (optimizationLevel >= 2) {
3788
3929
  file = this.levelTwoFileOptimize(file);
3789
3930
  }
3790
- this.debug("matchOne", this, { file, pattern });
3791
- this.debug("matchOne", file.length, pattern.length);
3792
- for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
3793
- this.debug("matchOne loop");
3794
- var p = pattern[pi];
3795
- var f = file[fi];
3796
- this.debug(pattern, p, f);
3797
- if (p === false) {
3798
- return false;
3799
- }
3800
- if (p === GLOBSTAR) {
3801
- this.debug("GLOBSTAR", [pattern, p, f]);
3802
- var fr = fi;
3803
- var pr = pi + 1;
3804
- if (pr === pl) {
3805
- this.debug("** at the end");
3806
- for (; fi < fl; fi++) {
3807
- if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".")
3808
- return false;
3809
- }
3810
- return true;
3811
- }
3812
- while (fr < fl) {
3813
- var swallowee = file[fr];
3814
- this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
3815
- if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
3816
- this.debug("globstar found match!", fr, fl, swallowee);
3817
- return true;
3818
- } else {
3819
- if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
3820
- this.debug("dot detected!", file, fr, pattern, pr);
3821
- break;
3822
- }
3823
- this.debug("globstar swallow a segment, and continue");
3824
- fr++;
3825
- }
3826
- }
3827
- if (partial) {
3828
- this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
3829
- if (fr === fl) {
3830
- return true;
3831
- }
3832
- }
3833
- return false;
3834
- }
3835
- let hit;
3836
- if (typeof p === "string") {
3837
- hit = f === p;
3838
- this.debug("string match", p, f, hit);
3839
- } else {
3840
- hit = p.test(f);
3841
- this.debug("pattern match", p, f, hit);
3842
- }
3843
- if (!hit)
3844
- return false;
3845
- }
3846
- if (fi === fl && pi === pl) {
3847
- return true;
3848
- } else if (fi === fl) {
3849
- return partial;
3850
- } else if (pi === pl) {
3851
- return fi === fl - 1 && file[fi] === "";
3852
- } else {
3853
- throw new Error("wtf?");
3931
+ if (pattern.includes(GLOBSTAR)) {
3932
+ return __privateMethod(this, _Minimatch_instances, matchGlobstar_fn).call(this, file, pattern, partial, fileStartIndex, patternStartIndex);
3854
3933
  }
3934
+ return __privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file, pattern, partial, fileStartIndex, patternStartIndex);
3855
3935
  }
3856
3936
  braceExpand() {
3857
3937
  return braceExpand(this.pattern, this.options);
@@ -3990,6 +4070,135 @@ var Minimatch = class {
3990
4070
  return minimatch.defaults(def).Minimatch;
3991
4071
  }
3992
4072
  };
4073
+ _Minimatch_instances = new WeakSet();
4074
+ matchGlobstar_fn = function(file, pattern, partial, fileIndex, patternIndex) {
4075
+ const firstgs = pattern.indexOf(GLOBSTAR, patternIndex);
4076
+ const lastgs = pattern.lastIndexOf(GLOBSTAR);
4077
+ const [head, body, tail] = partial ? [
4078
+ pattern.slice(patternIndex, firstgs),
4079
+ pattern.slice(firstgs + 1),
4080
+ []
4081
+ ] : [
4082
+ pattern.slice(patternIndex, firstgs),
4083
+ pattern.slice(firstgs + 1, lastgs),
4084
+ pattern.slice(lastgs + 1)
4085
+ ];
4086
+ if (head.length) {
4087
+ const fileHead = file.slice(fileIndex, fileIndex + head.length);
4088
+ if (!__privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, fileHead, head, partial, 0, 0))
4089
+ return false;
4090
+ fileIndex += head.length;
4091
+ }
4092
+ let fileTailMatch = 0;
4093
+ if (tail.length) {
4094
+ if (tail.length + fileIndex > file.length)
4095
+ return false;
4096
+ let tailStart = file.length - tail.length;
4097
+ if (__privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file, tail, partial, tailStart, 0)) {
4098
+ fileTailMatch = tail.length;
4099
+ } else {
4100
+ if (file[file.length - 1] !== "" || fileIndex + tail.length === file.length) {
4101
+ return false;
4102
+ }
4103
+ tailStart--;
4104
+ if (!__privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file, tail, partial, tailStart, 0))
4105
+ return false;
4106
+ fileTailMatch = tail.length + 1;
4107
+ }
4108
+ }
4109
+ if (!body.length) {
4110
+ let sawSome = !!fileTailMatch;
4111
+ for (let i2 = fileIndex; i2 < file.length - fileTailMatch; i2++) {
4112
+ const f = String(file[i2]);
4113
+ sawSome = true;
4114
+ if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
4115
+ return false;
4116
+ }
4117
+ }
4118
+ return partial || sawSome;
4119
+ }
4120
+ const bodySegments = [[[], 0]];
4121
+ let currentBody = bodySegments[0];
4122
+ let nonGsParts = 0;
4123
+ const nonGsPartsSums = [0];
4124
+ for (const b of body) {
4125
+ if (b === GLOBSTAR) {
4126
+ nonGsPartsSums.push(nonGsParts);
4127
+ currentBody = [[], 0];
4128
+ bodySegments.push(currentBody);
4129
+ } else {
4130
+ currentBody[0].push(b);
4131
+ nonGsParts++;
4132
+ }
4133
+ }
4134
+ let i = bodySegments.length - 1;
4135
+ const fileLength = file.length - fileTailMatch;
4136
+ for (const b of bodySegments) {
4137
+ b[1] = fileLength - (nonGsPartsSums[i--] + b[0].length);
4138
+ }
4139
+ return !!__privateMethod(this, _Minimatch_instances, matchGlobStarBodySections_fn).call(this, file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch);
4140
+ };
4141
+ matchGlobStarBodySections_fn = function(file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {
4142
+ const bs = bodySegments[bodyIndex];
4143
+ if (!bs) {
4144
+ for (let i = fileIndex; i < file.length; i++) {
4145
+ sawTail = true;
4146
+ const f = file[i];
4147
+ if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
4148
+ return false;
4149
+ }
4150
+ }
4151
+ return sawTail;
4152
+ }
4153
+ const [body, after] = bs;
4154
+ while (fileIndex <= after) {
4155
+ const m = __privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file.slice(0, fileIndex + body.length), body, partial, fileIndex, 0);
4156
+ if (m && globStarDepth < this.maxGlobstarRecursion) {
4157
+ const sub = __privateMethod(this, _Minimatch_instances, matchGlobStarBodySections_fn).call(this, file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail);
4158
+ if (sub !== false)
4159
+ return sub;
4160
+ }
4161
+ const f = file[fileIndex];
4162
+ if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
4163
+ return false;
4164
+ }
4165
+ fileIndex++;
4166
+ }
4167
+ return partial || null;
4168
+ };
4169
+ matchOne_fn = function(file, pattern, partial, fileIndex, patternIndex) {
4170
+ let fi;
4171
+ let pi;
4172
+ let pl;
4173
+ let fl;
4174
+ for (fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
4175
+ this.debug("matchOne loop");
4176
+ let p = pattern[pi];
4177
+ let f = file[fi];
4178
+ this.debug(pattern, p, f);
4179
+ if (p === false || p === GLOBSTAR)
4180
+ return false;
4181
+ let hit;
4182
+ if (typeof p === "string") {
4183
+ hit = f === p;
4184
+ this.debug("string match", p, f, hit);
4185
+ } else {
4186
+ hit = p.test(f);
4187
+ this.debug("pattern match", p, f, hit);
4188
+ }
4189
+ if (!hit)
4190
+ return false;
4191
+ }
4192
+ if (fi === fl && pi === pl) {
4193
+ return true;
4194
+ } else if (fi === fl) {
4195
+ return partial;
4196
+ } else if (pi === pl) {
4197
+ return fi === fl - 1 && file[fi] === "";
4198
+ } else {
4199
+ throw new Error("wtf?");
4200
+ }
4201
+ };
3993
4202
  minimatch.AST = AST;
3994
4203
  minimatch.Minimatch = Minimatch;
3995
4204
  minimatch.escape = escape;
@@ -4262,8 +4471,8 @@ function getCompilerOptions(rootDir4) {
4262
4471
  return _tsCompilerOptions;
4263
4472
  }
4264
4473
  function shouldTransform(filePath, sourceText) {
4265
- var _a;
4266
- const ext2 = ((_a = filePath.split(".").pop()) != null ? _a : "").toLowerCase().split("?")[0];
4474
+ var _a2;
4475
+ const ext2 = ((_a2 = filePath.split(".").pop()) != null ? _a2 : "").toLowerCase().split("?")[0];
4267
4476
  if (ext2 === "ts" || ext2 === "tsx" || ext2 === "jsx") {
4268
4477
  return true;
4269
4478
  }
@@ -4551,8 +4760,8 @@ function includeTestFile(testPath, env2) {
4551
4760
  return false;
4552
4761
  }
4553
4762
  function getEmulateConfigs(testing, flags) {
4554
- var _a, _b;
4555
- let emulateConfigs = (_b = (_a = testing.emulate) == null ? void 0 : _a.slice()) != null ? _b : [];
4763
+ var _a2, _b;
4764
+ let emulateConfigs = (_b = (_a2 = testing.emulate) == null ? void 0 : _a2.slice()) != null ? _b : [];
4556
4765
  if (typeof flags.emulate === "string") {
4557
4766
  const emulateFlag = flags.emulate.toLowerCase();
4558
4767
  emulateConfigs = emulateConfigs.filter((emulateConfig) => {
@@ -5246,7 +5455,7 @@ function toMatchScreenshot(compare, opts = {}) {
5246
5455
  // src/testing/jest/jest-27-and-under/matchers/text.ts
5247
5456
  var import_mock_doc6 = _lazyRequire("../mock-doc/index.cjs");
5248
5457
  function toEqualText(input, expectTextContent) {
5249
- var _a;
5458
+ var _a2;
5250
5459
  if (input == null) {
5251
5460
  throw new Error(`expect toEqualText() value is "${input}"`);
5252
5461
  }
@@ -5255,7 +5464,7 @@ function toEqualText(input, expectTextContent) {
5255
5464
  }
5256
5465
  let textContent;
5257
5466
  if (input.nodeType === import_mock_doc6.NODE_TYPES.ELEMENT_NODE) {
5258
- textContent = ((_a = input.textContent) != null ? _a : "").replace(/\s\s+/g, " ").trim();
5467
+ textContent = ((_a2 = input.textContent) != null ? _a2 : "").replace(/\s\s+/g, " ").trim();
5259
5468
  } else {
5260
5469
  textContent = String(input).replace(/\s\s+/g, " ").trim();
5261
5470
  }
@@ -5303,9 +5512,9 @@ function jestSetupTestFramework() {
5303
5512
  import_testing.modeResolutionChain.length = 0;
5304
5513
  });
5305
5514
  afterEach(async () => {
5306
- var _a, _b, _c, _d, _e, _f;
5515
+ var _a2, _b, _c, _d, _e, _f;
5307
5516
  (0, import_testing.stopAutoApplyChanges)();
5308
- const bodyNode = (_e = (_d = (_c = (_b = (_a = global.window) == null ? void 0 : _a.document) == null ? void 0 : _b.childNodes) == null ? void 0 : _c[1]) == null ? void 0 : _d.childNodes) == null ? void 0 : _e.find((ref) => ref.nodeName === "BODY");
5517
+ const bodyNode = (_e = (_d = (_c = (_b = (_a2 = global.window) == null ? void 0 : _a2.document) == null ? void 0 : _b.childNodes) == null ? void 0 : _c[1]) == null ? void 0 : _d.childNodes) == null ? void 0 : _e.find((ref) => ref.nodeName === "BODY");
5309
5518
  (_f = bodyNode == null ? void 0 : bodyNode.childNodes) == null ? void 0 : _f.forEach(removeDomNodes);
5310
5519
  (0, import_mock_doc7.teardownGlobal)(global);
5311
5520
  global.resourcesUrl = "/build";
@@ -5336,11 +5545,11 @@ function jestSetupTestFramework() {
5336
5545
  }
5337
5546
  }
5338
5547
  function removeDomNodes(node) {
5339
- var _a, _b;
5548
+ var _a2, _b;
5340
5549
  if (node == null) {
5341
5550
  return;
5342
5551
  }
5343
- if (!((_a = node.childNodes) == null ? void 0 : _a.length)) {
5552
+ if (!((_a2 = node.childNodes) == null ? void 0 : _a2.length)) {
5344
5553
  node.remove();
5345
5554
  }
5346
5555
  (_b = node.childNodes) == null ? void 0 : _b.forEach(removeDomNodes);
@@ -5572,8 +5781,8 @@ function getCompilerOptions2(rootDir4) {
5572
5781
  return _tsCompilerOptions2;
5573
5782
  }
5574
5783
  function shouldTransform2(filePath, sourceText) {
5575
- var _a;
5576
- const ext2 = ((_a = filePath.split(".").pop()) != null ? _a : "").toLowerCase().split("?")[0];
5784
+ var _a2;
5785
+ const ext2 = ((_a2 = filePath.split(".").pop()) != null ? _a2 : "").toLowerCase().split("?")[0];
5577
5786
  if (ext2 === "ts" || ext2 === "tsx" || ext2 === "jsx") {
5578
5787
  return true;
5579
5788
  }
@@ -5782,8 +5991,8 @@ function includeTestFile2(testPath, env2) {
5782
5991
  return false;
5783
5992
  }
5784
5993
  function getEmulateConfigs2(testing, flags) {
5785
- var _a, _b;
5786
- let emulateConfigs = (_b = (_a = testing.emulate) == null ? void 0 : _a.slice()) != null ? _b : [];
5994
+ var _a2, _b;
5995
+ let emulateConfigs = (_b = (_a2 = testing.emulate) == null ? void 0 : _a2.slice()) != null ? _b : [];
5787
5996
  if (typeof flags.emulate === "string") {
5788
5997
  const emulateFlag = flags.emulate.toLowerCase();
5789
5998
  emulateConfigs = emulateConfigs.filter((emulateConfig) => {
@@ -6298,7 +6507,7 @@ function toMatchScreenshot2(compare, opts = {}) {
6298
6507
  // src/testing/jest/jest-28/matchers/text.ts
6299
6508
  var import_mock_doc11 = _lazyRequire("../mock-doc/index.cjs");
6300
6509
  function toEqualText2(input, expectTextContent) {
6301
- var _a;
6510
+ var _a2;
6302
6511
  if (input == null) {
6303
6512
  throw new Error(`expect toEqualText() value is "${input}"`);
6304
6513
  }
@@ -6307,7 +6516,7 @@ function toEqualText2(input, expectTextContent) {
6307
6516
  }
6308
6517
  let textContent;
6309
6518
  if (input.nodeType === import_mock_doc11.NODE_TYPES.ELEMENT_NODE) {
6310
- textContent = ((_a = input.textContent) != null ? _a : "").replace(/\s\s+/g, " ").trim();
6519
+ textContent = ((_a2 = input.textContent) != null ? _a2 : "").replace(/\s\s+/g, " ").trim();
6311
6520
  } else {
6312
6521
  textContent = String(input).replace(/\s\s+/g, " ").trim();
6313
6522
  }
@@ -6355,9 +6564,9 @@ function jestSetupTestFramework2() {
6355
6564
  import_testing2.modeResolutionChain.length = 0;
6356
6565
  });
6357
6566
  afterEach(async () => {
6358
- var _a, _b, _c, _d, _e, _f;
6567
+ var _a2, _b, _c, _d, _e, _f;
6359
6568
  (0, import_testing2.stopAutoApplyChanges)();
6360
- const bodyNode = (_e = (_d = (_c = (_b = (_a = global.window) == null ? void 0 : _a.document) == null ? void 0 : _b.childNodes) == null ? void 0 : _c[1]) == null ? void 0 : _d.childNodes) == null ? void 0 : _e.find((ref) => ref.nodeName === "BODY");
6569
+ const bodyNode = (_e = (_d = (_c = (_b = (_a2 = global.window) == null ? void 0 : _a2.document) == null ? void 0 : _b.childNodes) == null ? void 0 : _c[1]) == null ? void 0 : _d.childNodes) == null ? void 0 : _e.find((ref) => ref.nodeName === "BODY");
6361
6570
  (_f = bodyNode == null ? void 0 : bodyNode.childNodes) == null ? void 0 : _f.forEach(removeDomNodes2);
6362
6571
  (0, import_mock_doc12.teardownGlobal)(global);
6363
6572
  global.resourcesUrl = "/build";
@@ -6379,11 +6588,11 @@ function jestSetupTestFramework2() {
6379
6588
  }
6380
6589
  }
6381
6590
  function removeDomNodes2(node) {
6382
- var _a, _b;
6591
+ var _a2, _b;
6383
6592
  if (node == null) {
6384
6593
  return;
6385
6594
  }
6386
- if (!((_a = node.childNodes) == null ? void 0 : _a.length)) {
6595
+ if (!((_a2 = node.childNodes) == null ? void 0 : _a2.length)) {
6387
6596
  node.remove();
6388
6597
  }
6389
6598
  (_b = node.childNodes) == null ? void 0 : _b.forEach(removeDomNodes2);
@@ -6615,8 +6824,8 @@ function getCompilerOptions3(rootDir4) {
6615
6824
  return _tsCompilerOptions3;
6616
6825
  }
6617
6826
  function shouldTransform3(filePath, sourceText) {
6618
- var _a;
6619
- const ext2 = ((_a = filePath.split(".").pop()) != null ? _a : "").toLowerCase().split("?")[0];
6827
+ var _a2;
6828
+ const ext2 = ((_a2 = filePath.split(".").pop()) != null ? _a2 : "").toLowerCase().split("?")[0];
6620
6829
  if (ext2 === "ts" || ext2 === "tsx" || ext2 === "jsx") {
6621
6830
  return true;
6622
6831
  }
@@ -6825,8 +7034,8 @@ function includeTestFile3(testPath, env2) {
6825
7034
  return false;
6826
7035
  }
6827
7036
  function getEmulateConfigs3(testing, flags) {
6828
- var _a, _b;
6829
- let emulateConfigs = (_b = (_a = testing.emulate) == null ? void 0 : _a.slice()) != null ? _b : [];
7037
+ var _a2, _b;
7038
+ let emulateConfigs = (_b = (_a2 = testing.emulate) == null ? void 0 : _a2.slice()) != null ? _b : [];
6830
7039
  if (typeof flags.emulate === "string") {
6831
7040
  const emulateFlag = flags.emulate.toLowerCase();
6832
7041
  emulateConfigs = emulateConfigs.filter((emulateConfig) => {
@@ -7341,7 +7550,7 @@ function toMatchScreenshot3(compare, opts = {}) {
7341
7550
  // src/testing/jest/jest-29/matchers/text.ts
7342
7551
  var import_mock_doc16 = _lazyRequire("../mock-doc/index.cjs");
7343
7552
  function toEqualText3(input, expectTextContent) {
7344
- var _a;
7553
+ var _a2;
7345
7554
  if (input == null) {
7346
7555
  throw new Error(`expect toEqualText() value is "${input}"`);
7347
7556
  }
@@ -7350,7 +7559,7 @@ function toEqualText3(input, expectTextContent) {
7350
7559
  }
7351
7560
  let textContent;
7352
7561
  if (input.nodeType === import_mock_doc16.NODE_TYPES.ELEMENT_NODE) {
7353
- textContent = ((_a = input.textContent) != null ? _a : "").replace(/\s\s+/g, " ").trim();
7562
+ textContent = ((_a2 = input.textContent) != null ? _a2 : "").replace(/\s\s+/g, " ").trim();
7354
7563
  } else {
7355
7564
  textContent = String(input).replace(/\s\s+/g, " ").trim();
7356
7565
  }
@@ -7398,9 +7607,9 @@ function jestSetupTestFramework3() {
7398
7607
  import_testing3.modeResolutionChain.length = 0;
7399
7608
  });
7400
7609
  afterEach(async () => {
7401
- var _a, _b, _c, _d, _e, _f;
7610
+ var _a2, _b, _c, _d, _e, _f;
7402
7611
  (0, import_testing3.stopAutoApplyChanges)();
7403
- const bodyNode = (_e = (_d = (_c = (_b = (_a = global.window) == null ? void 0 : _a.document) == null ? void 0 : _b.childNodes) == null ? void 0 : _c[1]) == null ? void 0 : _d.childNodes) == null ? void 0 : _e.find((ref) => ref.nodeName === "BODY");
7612
+ const bodyNode = (_e = (_d = (_c = (_b = (_a2 = global.window) == null ? void 0 : _a2.document) == null ? void 0 : _b.childNodes) == null ? void 0 : _c[1]) == null ? void 0 : _d.childNodes) == null ? void 0 : _e.find((ref) => ref.nodeName === "BODY");
7404
7613
  (_f = bodyNode == null ? void 0 : bodyNode.childNodes) == null ? void 0 : _f.forEach(removeDomNodes3);
7405
7614
  (0, import_mock_doc17.teardownGlobal)(global);
7406
7615
  global.resourcesUrl = "/build";
@@ -7422,11 +7631,11 @@ function jestSetupTestFramework3() {
7422
7631
  }
7423
7632
  }
7424
7633
  function removeDomNodes3(node) {
7425
- var _a, _b;
7634
+ var _a2, _b;
7426
7635
  if (node == null) {
7427
7636
  return;
7428
7637
  }
7429
- if (!((_a = node.childNodes) == null ? void 0 : _a.length)) {
7638
+ if (!((_a2 = node.childNodes) == null ? void 0 : _a2.length)) {
7430
7639
  node.remove();
7431
7640
  }
7432
7641
  (_b = node.childNodes) == null ? void 0 : _b.forEach(removeDomNodes3);
@@ -7562,9 +7771,9 @@ var getAbsolutePath = (config, dir) => {
7562
7771
  return dir;
7563
7772
  };
7564
7773
  var setBooleanConfig = (config, configName, flagName, defaultValue) => {
7565
- var _a;
7774
+ var _a2;
7566
7775
  if (flagName) {
7567
- const flagValue = (_a = config.flags) == null ? void 0 : _a[flagName];
7776
+ const flagValue = (_a2 = config.flags) == null ? void 0 : _a2[flagName];
7568
7777
  if (isBoolean(flagValue)) {
7569
7778
  config[configName] = flagValue;
7570
7779
  }
@@ -7580,12 +7789,12 @@ var setBooleanConfig = (config, configName, flagName, defaultValue) => {
7580
7789
  }
7581
7790
  };
7582
7791
  var getUserConfigName = (config, correctConfigName) => {
7583
- var _a;
7792
+ var _a2;
7584
7793
  const userConfigNames = Object.keys(config);
7585
7794
  for (const userConfigName of userConfigNames) {
7586
7795
  if (userConfigName.toLowerCase() === correctConfigName.toLowerCase()) {
7587
7796
  if (userConfigName !== correctConfigName) {
7588
- (_a = config.logger) == null ? void 0 : _a.warn(`config "${userConfigName}" should be "${correctConfigName}"`);
7797
+ (_a2 = config.logger) == null ? void 0 : _a2.warn(`config "${userConfigName}" should be "${correctConfigName}"`);
7589
7798
  return userConfigName;
7590
7799
  }
7591
7800
  break;
@@ -7608,11 +7817,11 @@ var DEFAULT_TARGET_COMPONENT_STYLES = {
7608
7817
  // src/compiler/config/outputs/validate-collection.ts
7609
7818
  var validateCollection = (config, userOutputs) => {
7610
7819
  return userOutputs.filter(isOutputTargetDistCollection).map((outputTarget) => {
7611
- var _a;
7820
+ var _a2;
7612
7821
  return {
7613
7822
  ...outputTarget,
7614
7823
  transformAliasedImportPaths: isBoolean(outputTarget.transformAliasedImportPaths) ? outputTarget.transformAliasedImportPaths : true,
7615
- dir: getAbsolutePath(config, (_a = outputTarget.dir) != null ? _a : "dist/collection")
7824
+ dir: getAbsolutePath(config, (_a2 = outputTarget.dir) != null ? _a2 : "dist/collection")
7616
7825
  };
7617
7826
  });
7618
7827
  };
@@ -7723,7 +7932,7 @@ var validateCustomOutput = (config, diagnostics, userOutputs) => {
7723
7932
  // src/compiler/config/outputs/validate-dist.ts
7724
7933
  var import_path10 = require("path");
7725
7934
  var validateDist = (config, userOutputs) => {
7726
- var _a;
7935
+ var _a2;
7727
7936
  const distOutputTargets = userOutputs.filter(isOutputTargetDist);
7728
7937
  const outputs = [];
7729
7938
  for (const outputTarget of distOutputTargets) {
@@ -7745,7 +7954,7 @@ var validateDist = (config, userOutputs) => {
7745
7954
  type: COPY,
7746
7955
  dir: lazyDir,
7747
7956
  copyAssets: "dist",
7748
- copy: ((_a = distOutputTarget.copy) != null ? _a : []).concat()
7957
+ copy: ((_a2 = distOutputTarget.copy) != null ? _a2 : []).concat()
7749
7958
  });
7750
7959
  outputs.push({
7751
7960
  type: DIST_GLOBAL_STYLES,
@@ -7799,7 +8008,7 @@ var validateDist = (config, userOutputs) => {
7799
8008
  return outputs;
7800
8009
  };
7801
8010
  var validateOutputTargetDist = (config, o) => {
7802
- var _a, _b;
8011
+ var _a2, _b;
7803
8012
  const outputTarget = {
7804
8013
  ...o,
7805
8014
  dir: getAbsolutePath(config, o.dir || DEFAULT_DIR),
@@ -7807,7 +8016,7 @@ var validateOutputTargetDist = (config, o) => {
7807
8016
  collectionDir: o.collectionDir !== void 0 ? o.collectionDir : DEFAULT_COLLECTION_DIR,
7808
8017
  typesDir: o.typesDir || DEFAULT_TYPES_DIR,
7809
8018
  esmLoaderPath: o.esmLoaderPath || DEFAULT_ESM_LOADER_DIR,
7810
- copy: validateCopy((_a = o.copy) != null ? _a : [], []),
8019
+ copy: validateCopy((_a2 = o.copy) != null ? _a2 : [], []),
7811
8020
  polyfills: isBoolean(o.polyfills) ? o.polyfills : false,
7812
8021
  empty: isBoolean(o.empty) ? o.empty : true,
7813
8022
  transformAliasedImportPathsInCollection: isBoolean(o.transformAliasedImportPathsInCollection) ? o.transformAliasedImportPathsInCollection : true,
@@ -8055,7 +8264,7 @@ var validatePrerender = (config, diagnostics, outputTarget) => {
8055
8264
  // src/compiler/config/validate-service-worker.ts
8056
8265
  var import_path15 = require("path");
8057
8266
  var validateServiceWorker = (config, outputTarget) => {
8058
- var _a, _b, _c, _d;
8267
+ var _a2, _b, _c, _d;
8059
8268
  if (outputTarget.serviceWorker === false) {
8060
8269
  return;
8061
8270
  }
@@ -8071,7 +8280,7 @@ var validateServiceWorker = (config, outputTarget) => {
8071
8280
  outputTarget.serviceWorker = null;
8072
8281
  return;
8073
8282
  }
8074
- const globDirectory = typeof ((_a = outputTarget.serviceWorker) == null ? void 0 : _a.globDirectory) === "string" ? outputTarget.serviceWorker.globDirectory : outputTarget.appDir;
8283
+ const globDirectory = typeof ((_a2 = outputTarget.serviceWorker) == null ? void 0 : _a2.globDirectory) === "string" ? outputTarget.serviceWorker.globDirectory : outputTarget.appDir;
8075
8284
  outputTarget.serviceWorker = {
8076
8285
  ...outputTarget.serviceWorker,
8077
8286
  globDirectory,
@@ -8224,7 +8433,7 @@ var validateOutputTargets = (config, diagnostics) => {
8224
8433
  // src/compiler/config/validate-dev-server.ts
8225
8434
  var import_path17 = require("path");
8226
8435
  var validateDevServer = (config, diagnostics) => {
8227
- var _a, _b, _c, _d, _e;
8436
+ var _a2, _b, _c, _d, _e;
8228
8437
  if ((config.devServer === null || config.devServer) === false) {
8229
8438
  return {};
8230
8439
  }
@@ -8291,7 +8500,7 @@ var validateDevServer = (config, diagnostics) => {
8291
8500
  devServer.ssr = !!devServer.ssr;
8292
8501
  }
8293
8502
  if (devServer.ssr) {
8294
- const wwwOutput = ((_a = config.outputTargets) != null ? _a : []).find(isOutputTargetWww);
8503
+ const wwwOutput = ((_a2 = config.outputTargets) != null ? _a2 : []).find(isOutputTargetWww);
8295
8504
  devServer.prerenderConfig = wwwOutput == null ? void 0 : wwwOutput.prerenderConfig;
8296
8505
  }
8297
8506
  if (isString(config.srcIndexHtml)) {
@@ -8378,9 +8587,9 @@ var isHexColor = (str) => {
8378
8587
 
8379
8588
  // src/compiler/config/validate-docs.ts
8380
8589
  var validateDocs2 = (config, logger) => {
8381
- var _a, _b, _c;
8590
+ var _a2, _b, _c;
8382
8591
  const { background: defaultBackground, textColor: defaultTextColor } = DEFAULT_TARGET_COMPONENT_STYLES;
8383
- let { background = defaultBackground, textColor = defaultTextColor } = (_c = (_b = (_a = config.docs) == null ? void 0 : _a.markdown) == null ? void 0 : _b.targetComponent) != null ? _c : DEFAULT_TARGET_COMPONENT_STYLES;
8592
+ let { background = defaultBackground, textColor = defaultTextColor } = (_c = (_b = (_a2 = config.docs) == null ? void 0 : _a2.markdown) == null ? void 0 : _b.targetComponent) != null ? _c : DEFAULT_TARGET_COMPONENT_STYLES;
8384
8593
  if (!isHexColor(background)) {
8385
8594
  logger.warn(
8386
8595
  `'${background}' is not a valid hex color. The default value for diagram backgrounds ('${defaultBackground}') will be used.`
@@ -8405,11 +8614,11 @@ var validateDocs2 = (config, logger) => {
8405
8614
 
8406
8615
  // src/compiler/config/validate-hydrated.ts
8407
8616
  var validateHydrated = (config) => {
8408
- var _a;
8617
+ var _a2;
8409
8618
  if (config.hydratedFlag === null || config.hydratedFlag === false) {
8410
8619
  return null;
8411
8620
  }
8412
- const hydratedFlag = { ...(_a = config.hydratedFlag) != null ? _a : {} };
8621
+ const hydratedFlag = { ...(_a2 = config.hydratedFlag) != null ? _a2 : {} };
8413
8622
  if (!isString(hydratedFlag.name) || hydratedFlag.property === "") {
8414
8623
  hydratedFlag.name = `hydrated`;
8415
8624
  }
@@ -8464,8 +8673,8 @@ var validateNamespace = (namespace, fsNamespace, diagnostics) => {
8464
8673
  return { namespace, fsNamespace };
8465
8674
  };
8466
8675
  var validateDistNamespace = (config, diagnostics) => {
8467
- var _a;
8468
- const hasDist = ((_a = config.outputTargets) != null ? _a : []).some(isOutputTargetDist);
8676
+ var _a2;
8677
+ const hasDist = ((_a2 = config.outputTargets) != null ? _a2 : []).some(isOutputTargetDist);
8469
8678
  if (hasDist) {
8470
8679
  if (!isString(config.namespace) || config.namespace.toLowerCase() === "app") {
8471
8680
  const err2 = buildError(diagnostics);
@@ -8631,7 +8840,7 @@ var getPackageDirPath = (p, moduleId) => {
8631
8840
 
8632
8841
  // src/compiler/config/validate-testing.ts
8633
8842
  var validateTesting = (config, diagnostics) => {
8634
- var _a;
8843
+ var _a2;
8635
8844
  const testing = config.testing = Object.assign({}, config.testing || {});
8636
8845
  if (!config.flags.e2e && !config.flags.spec) {
8637
8846
  return;
@@ -8702,11 +8911,11 @@ var validateTesting = (config, diagnostics) => {
8702
8911
  testing.testPathIgnorePatterns = DEFAULT_IGNORE_PATTERNS.map((ignorePattern) => {
8703
8912
  return join(testing.rootDir, ignorePattern);
8704
8913
  });
8705
- ((_a = config.outputTargets) != null ? _a : []).filter(
8914
+ ((_a2 = config.outputTargets) != null ? _a2 : []).filter(
8706
8915
  (o) => (isOutputTargetDist(o) || isOutputTargetWww(o)) && !!o.dir
8707
8916
  ).forEach((outputTarget) => {
8708
- var _a2;
8709
- (_a2 = testing.testPathIgnorePatterns) == null ? void 0 : _a2.push(outputTarget.dir);
8917
+ var _a3;
8918
+ (_a3 = testing.testPathIgnorePatterns) == null ? void 0 : _a3.push(outputTarget.dir);
8710
8919
  });
8711
8920
  }
8712
8921
  if (typeof testing.preset !== "string") {
@@ -8812,7 +9021,7 @@ var validateWorkers = (config) => {
8812
9021
  // src/compiler/config/validate-config.ts
8813
9022
  var CACHED_VALIDATED_CONFIG = null;
8814
9023
  var validateConfig = (userConfig = {}, bootstrapConfig) => {
8815
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
9024
+ var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
8816
9025
  const diagnostics = [];
8817
9026
  if (CACHED_VALIDATED_CONFIG !== null && CACHED_VALIDATED_CONFIG === userConfig) {
8818
9027
  return {
@@ -8830,7 +9039,7 @@ var validateConfig = (userConfig = {}, bootstrapConfig) => {
8830
9039
  logLevel = flags.logLevel;
8831
9040
  }
8832
9041
  logger.setLevel(logLevel);
8833
- let devMode = (_a = config.devMode) != null ? _a : DEFAULT_DEV_MODE;
9042
+ let devMode = (_a2 = config.devMode) != null ? _a2 : DEFAULT_DEV_MODE;
8834
9043
  if (flags.prod) {
8835
9044
  devMode = false;
8836
9045
  } else if (flags.dev) {
@@ -8871,7 +9080,7 @@ var validateConfig = (userConfig = {}, bootstrapConfig) => {
8871
9080
  validatedConfig.extras.initializeNextTick = !!validatedConfig.extras.initializeNextTick;
8872
9081
  validatedConfig.extras.tagNameTransform = !!validatedConfig.extras.tagNameTransform;
8873
9082
  validatedConfig.extras.additionalTagTransformers = validatedConfig.extras.additionalTagTransformers === true || !devMode && validatedConfig.extras.additionalTagTransformers === "prod";
8874
- validatedConfig.extras.addGlobalStyleToComponents = validatedConfig.extras.addGlobalStyleToComponents !== false;
9083
+ validatedConfig.extras.addGlobalStyleToComponents = isBoolean(validatedConfig.extras.addGlobalStyleToComponents) ? validatedConfig.extras.addGlobalStyleToComponents : "client";
8875
9084
  if (validatedConfig.extras.experimentalSlotFixes === true) {
8876
9085
  const possibleFlags = [
8877
9086
  "appendChildSlotFix",
@@ -10312,8 +10521,8 @@ var createCustomResolverAsync = (sys, inMemoryFs, exts) => {
10312
10521
 
10313
10522
  // src/compiler/sys/stencil-sys.ts
10314
10523
  var createSystem = (c) => {
10315
- var _a;
10316
- const logger = (_a = c == null ? void 0 : c.logger) != null ? _a : (0, import_sys_api_node2.createNodeLogger)();
10524
+ var _a2;
10525
+ const logger = (_a2 = c == null ? void 0 : c.logger) != null ? _a2 : (0, import_sys_api_node2.createNodeLogger)();
10317
10526
  const items = /* @__PURE__ */ new Map();
10318
10527
  const destroys = /* @__PURE__ */ new Set();
10319
10528
  const addDestroy = (cb) => destroys.add(cb);
@@ -10356,8 +10565,8 @@ var createSystem = (c) => {
10356
10565
  return true;
10357
10566
  };
10358
10567
  const isTTY = () => {
10359
- var _a2;
10360
- return !!((_a2 = process2 == null ? void 0 : process2.stdout) == null ? void 0 : _a2.isTTY);
10568
+ var _a3;
10569
+ return !!((_a3 = process2 == null ? void 0 : process2.stdout) == null ? void 0 : _a3.isTTY);
10361
10570
  };
10362
10571
  const homeDir = () => {
10363
10572
  return os.homedir();
@@ -10890,7 +11099,7 @@ var createTestingSystem = () => {
10890
11099
  // src/testing/mocks.ts
10891
11100
  var mockComponentMeta = stubComponentCompilerMeta;
10892
11101
  function mockValidatedConfig(overrides = {}) {
10893
- var _a;
11102
+ var _a2;
10894
11103
  const baseConfig = mockConfig(overrides);
10895
11104
  const rootDir4 = import_path24.default.resolve("/");
10896
11105
  return {
@@ -10910,7 +11119,7 @@ function mockValidatedConfig(overrides = {}) {
10910
11119
  minifyCss: false,
10911
11120
  minifyJs: false,
10912
11121
  namespace: "Testing",
10913
- outputTargets: (_a = baseConfig.outputTargets) != null ? _a : [],
11122
+ outputTargets: (_a2 = baseConfig.outputTargets) != null ? _a2 : [],
10914
11123
  packageJsonFilePath: import_path24.default.join(rootDir4, "package.json"),
10915
11124
  rootDir: rootDir4,
10916
11125
  sourceMap: true,
@@ -11915,7 +12124,7 @@ function writeFile(filePath, data) {
11915
12124
  // src/screenshot/screenshot-compare.ts
11916
12125
  var DEFAULT_SCREENSHOT_TIMEOUT = 2500;
11917
12126
  async function compareScreenshot(emulateConfig, screenshotBuildData, currentScreenshotBuf, screenshotTimeoutMs, desc, width, height, testPath, pixelmatchThreshold) {
11918
- var _a, _b, _c, _d, _e, _f, _g, _h;
12127
+ var _a2, _b, _c, _d, _e, _f, _g, _h;
11919
12128
  const currentImageHash = (0, import_crypto2.createHash)("sha256").update(currentScreenshotBuf).digest("hex");
11920
12129
  const currentImageName = `${currentImageHash}.png`;
11921
12130
  const currentImagePath = (0, import_path26.join)(screenshotBuildData.imagesDir, currentImageName);
@@ -11933,7 +12142,7 @@ async function compareScreenshot(emulateConfig, screenshotBuildData, currentScre
11933
12142
  testPath,
11934
12143
  width,
11935
12144
  height,
11936
- deviceScaleFactor: (_a = emulateConfig.viewport) == null ? void 0 : _a.deviceScaleFactor,
12145
+ deviceScaleFactor: (_a2 = emulateConfig.viewport) == null ? void 0 : _a2.deviceScaleFactor,
11937
12146
  hasTouch: (_b = emulateConfig.viewport) == null ? void 0 : _b.hasTouch,
11938
12147
  isLandscape: (_c = emulateConfig.viewport) == null ? void 0 : _c.isLandscape,
11939
12148
  isMobile: (_d = emulateConfig.viewport) == null ? void 0 : _d.isMobile,
@@ -11992,7 +12201,7 @@ async function compareScreenshot(emulateConfig, screenshotBuildData, currentScre
11992
12201
  }
11993
12202
  async function getMismatchedPixels(pixelmatchModulePath, pixelMatchInput, screenshotTimeoutMs) {
11994
12203
  return new Promise((resolve3, reject) => {
11995
- var _a;
12204
+ var _a2;
11996
12205
  const timeout = screenshotTimeoutMs !== null ? screenshotTimeoutMs : typeof jasmine !== "undefined" && jasmine.DEFAULT_TIMEOUT_INTERVAL ? jasmine.DEFAULT_TIMEOUT_INTERVAL * 0.5 : DEFAULT_SCREENSHOT_TIMEOUT;
11997
12206
  const tmr = setTimeout(() => {
11998
12207
  reject(`getMismatchedPixels timeout: ${timeout}ms`);
@@ -12016,7 +12225,7 @@ async function getMismatchedPixels(pixelmatchModulePath, pixelMatchInput, screen
12016
12225
  clearTimeout(tmr);
12017
12226
  reject(err2);
12018
12227
  });
12019
- (_a = pixelMatchProcess.stderr) == null ? void 0 : _a.on("data", (data) => {
12228
+ (_a2 = pixelMatchProcess.stderr) == null ? void 0 : _a2.on("data", (data) => {
12020
12229
  error = data.toString();
12021
12230
  });
12022
12231
  pixelMatchProcess.on("exit", (code) => {
@@ -12549,11 +12758,11 @@ var getBuildFeatures = (cmps) => {
12549
12758
  // src/testing/spec-page.ts
12550
12759
  var generateRandBundleId = () => Math.round(Math.random() * 899999) + 1e5;
12551
12760
  async function newSpecPage(opts) {
12552
- var _a;
12761
+ var _a2;
12553
12762
  if (opts == null) {
12554
12763
  throw new Error(`NewSpecPageOptions required`);
12555
12764
  }
12556
- (0, import_testing4.resetPlatform)((_a = opts.platform) != null ? _a : {});
12765
+ (0, import_testing4.resetPlatform)((_a2 = opts.platform) != null ? _a2 : {});
12557
12766
  resetBuildConditionals(import_app_data5.BUILD);
12558
12767
  if (Array.isArray(opts.components)) {
12559
12768
  (0, import_testing4.registerComponents)(opts.components);
@@ -12722,8 +12931,8 @@ async function newSpecPage(opts) {
12722
12931
  return page;
12723
12932
  }
12724
12933
  function proxyComponentLifeCycles(Cstr) {
12725
- var _a, _b, _c, _d, _e, _f;
12726
- if (typeof ((_a = Cstr.prototype) == null ? void 0 : _a.__componentWillLoad) === "function") {
12934
+ var _a2, _b, _c, _d, _e, _f;
12935
+ if (typeof ((_a2 = Cstr.prototype) == null ? void 0 : _a2.__componentWillLoad) === "function") {
12727
12936
  Cstr.prototype.componentWillLoad = Cstr.prototype.__componentWillLoad;
12728
12937
  Cstr.prototype.__componentWillLoad = null;
12729
12938
  }