@noma.to/qwik-testing-library 1.2.0 → 1.3.0

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 (96) hide show
  1. package/README.md +4 -3
  2. package/lib/lib/mock.qwik.cjs +3 -3
  3. package/lib/lib/mock.qwik.mjs +1 -1
  4. package/lib/lib/qwikloader.qwik.cjs +1 -1
  5. package/lib/lib/qwikloader.qwik.mjs +1 -1
  6. package/lib/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.qwik.cjs +89 -0
  7. package/lib/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.qwik.mjs +89 -0
  8. package/lib/node_modules/.pnpm/{@vitest_expect@2.1.1 → @vitest_expect@2.1.8}/node_modules/@vitest/expect/dist/index.qwik.cjs +155 -71
  9. package/lib/node_modules/.pnpm/{@vitest_expect@2.1.1 → @vitest_expect@2.1.8}/node_modules/@vitest/expect/dist/index.qwik.mjs +148 -64
  10. package/lib/node_modules/.pnpm/{@vitest_pretty-format@2.1.1 → @vitest_pretty-format@2.1.8}/node_modules/@vitest/pretty-format/dist/index.qwik.cjs +11 -5
  11. package/lib/node_modules/.pnpm/{@vitest_pretty-format@2.1.1 → @vitest_pretty-format@2.1.8}/node_modules/@vitest/pretty-format/dist/index.qwik.mjs +11 -5
  12. package/lib/node_modules/.pnpm/{@vitest_runner@2.1.1 → @vitest_runner@2.1.8}/node_modules/@vitest/runner/dist/chunk-tasks.qwik.cjs +2 -2
  13. package/lib/node_modules/.pnpm/{@vitest_runner@2.1.1 → @vitest_runner@2.1.8}/node_modules/@vitest/runner/dist/chunk-tasks.qwik.mjs +2 -2
  14. package/lib/node_modules/.pnpm/{@vitest_runner@2.1.1 → @vitest_runner@2.1.8}/node_modules/@vitest/runner/dist/index.qwik.cjs +34 -28
  15. package/lib/node_modules/.pnpm/{@vitest_runner@2.1.1 → @vitest_runner@2.1.8}/node_modules/@vitest/runner/dist/index.qwik.mjs +31 -25
  16. package/lib/node_modules/.pnpm/{@vitest_snapshot@2.1.1 → @vitest_snapshot@2.1.8}/node_modules/@vitest/snapshot/dist/index.qwik.cjs +863 -460
  17. package/lib/node_modules/.pnpm/{@vitest_snapshot@2.1.1 → @vitest_snapshot@2.1.8}/node_modules/@vitest/snapshot/dist/index.qwik.mjs +863 -460
  18. package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/chunk-display.qwik.cjs → @vitest_utils@2.1.8/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.qwik.cjs} +6 -2
  19. package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/chunk-display.qwik.mjs → @vitest_utils@2.1.8/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.qwik.mjs} +6 -2
  20. package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@2.1.8}/node_modules/@vitest/utils/dist/diff.qwik.cjs +458 -450
  21. package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@2.1.8}/node_modules/@vitest/utils/dist/diff.qwik.mjs +456 -448
  22. package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@2.1.8}/node_modules/@vitest/utils/dist/error.qwik.cjs +5 -5
  23. package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@2.1.8}/node_modules/@vitest/utils/dist/error.qwik.mjs +2 -2
  24. package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@2.1.8}/node_modules/@vitest/utils/dist/helpers.qwik.cjs +1 -1
  25. package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@2.1.8}/node_modules/@vitest/utils/dist/helpers.qwik.mjs +1 -1
  26. package/lib/node_modules/.pnpm/@vitest_utils@2.1.8/node_modules/@vitest/utils/dist/index.qwik.cjs +472 -0
  27. package/lib/node_modules/.pnpm/@vitest_utils@2.1.8/node_modules/@vitest/utils/dist/index.qwik.mjs +472 -0
  28. package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@2.1.8}/node_modules/@vitest/utils/dist/source-map.qwik.cjs +20 -20
  29. package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@2.1.8}/node_modules/@vitest/utils/dist/source-map.qwik.mjs +20 -20
  30. package/lib/node_modules/.pnpm/{chai@5.1.1 → chai@5.1.2}/node_modules/chai/chai.qwik.cjs +71 -39
  31. package/lib/node_modules/.pnpm/{chai@5.1.1 → chai@5.1.2}/node_modules/chai/chai.qwik.mjs +71 -39
  32. package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/error.qwik.cjs +7 -1
  33. package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/error.qwik.mjs +7 -1
  34. package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/object.qwik.cjs +1 -1
  35. package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/object.qwik.mjs +1 -1
  36. package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/string.qwik.cjs +1 -2
  37. package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/string.qwik.mjs +1 -2
  38. package/lib/node_modules/.pnpm/{magic-string@0.30.11 → magic-string@0.30.17}/node_modules/magic-string/dist/magic-string.es.qwik.cjs +44 -33
  39. package/lib/node_modules/.pnpm/{magic-string@0.30.11 → magic-string@0.30.17}/node_modules/magic-string/dist/magic-string.es.qwik.mjs +44 -33
  40. package/lib/node_modules/.pnpm/vitest@2.1.8_@types_node@22.10.3_@vitest_ui@2.1.8_jsdom@26.0.0/node_modules/vitest/dist/chunks/utils.C8RiOc4B.qwik.cjs +66 -0
  41. package/lib/node_modules/.pnpm/vitest@2.1.8_@types_node@22.10.3_@vitest_ui@2.1.8_jsdom@26.0.0/node_modules/vitest/dist/chunks/utils.C8RiOc4B.qwik.mjs +66 -0
  42. package/lib/node_modules/.pnpm/vitest@2.1.8_@types_node@22.10.3_@vitest_ui@2.1.8_jsdom@26.0.0/node_modules/vitest/dist/chunks/vi.DgezovHB.qwik.cjs +2749 -0
  43. package/lib/node_modules/.pnpm/vitest@2.1.8_@types_node@22.10.3_@vitest_ui@2.1.8_jsdom@26.0.0/node_modules/vitest/dist/chunks/vi.DgezovHB.qwik.mjs +2749 -0
  44. package/package.json +13 -13
  45. package/lib/_virtual/_commonjsHelpers.qwik.cjs +0 -4
  46. package/lib/_virtual/_commonjsHelpers.qwik.mjs +0 -4
  47. package/lib/_virtual/sourcemap-codec.umd.qwik.cjs +0 -4
  48. package/lib/_virtual/sourcemap-codec.umd.qwik.mjs +0 -4
  49. package/lib/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.qwik.cjs +0 -425
  50. package/lib/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.qwik.mjs +0 -425
  51. package/lib/node_modules/.pnpm/@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/index.qwik.cjs +0 -81
  52. package/lib/node_modules/.pnpm/@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/index.qwik.mjs +0 -81
  53. package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/base.BlXpj3e_.qwik.cjs +0 -6
  54. package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/base.BlXpj3e_.qwik.mjs +0 -6
  55. package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/utils.Ck2hJTRs.qwik.cjs +0 -16
  56. package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/utils.Ck2hJTRs.qwik.mjs +0 -16
  57. package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/vi.D6IHiKAI.qwik.cjs +0 -2556
  58. package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/vi.D6IHiKAI.qwik.mjs +0 -2556
  59. /package/lib/node_modules/.pnpm/{@vitest_spy@2.1.1 → @vitest_spy@2.1.8}/node_modules/@vitest/spy/dist/index.qwik.cjs +0 -0
  60. /package/lib/node_modules/.pnpm/{@vitest_spy@2.1.1 → @vitest_spy@2.1.8}/node_modules/@vitest/spy/dist/index.qwik.mjs +0 -0
  61. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/arguments.qwik.cjs +0 -0
  62. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/arguments.qwik.mjs +0 -0
  63. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/array.qwik.cjs +0 -0
  64. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/array.qwik.mjs +0 -0
  65. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/bigint.qwik.cjs +0 -0
  66. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/bigint.qwik.mjs +0 -0
  67. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/class.qwik.cjs +0 -0
  68. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/class.qwik.mjs +0 -0
  69. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/date.qwik.cjs +0 -0
  70. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/date.qwik.mjs +0 -0
  71. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/function.qwik.cjs +0 -0
  72. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/function.qwik.mjs +0 -0
  73. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/helpers.qwik.cjs +0 -0
  74. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/helpers.qwik.mjs +0 -0
  75. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/html.qwik.cjs +0 -0
  76. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/html.qwik.mjs +0 -0
  77. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/index.qwik.cjs +0 -0
  78. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/index.qwik.mjs +0 -0
  79. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/map.qwik.cjs +0 -0
  80. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/map.qwik.mjs +0 -0
  81. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/number.qwik.cjs +0 -0
  82. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/number.qwik.mjs +0 -0
  83. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/promise.qwik.cjs +0 -0
  84. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/promise.qwik.mjs +0 -0
  85. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/regexp.qwik.cjs +0 -0
  86. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/regexp.qwik.mjs +0 -0
  87. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/set.qwik.cjs +0 -0
  88. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/set.qwik.mjs +0 -0
  89. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/symbol.qwik.cjs +0 -0
  90. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/symbol.qwik.mjs +0 -0
  91. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/typedarray.qwik.cjs +0 -0
  92. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/typedarray.qwik.mjs +0 -0
  93. /package/lib/node_modules/.pnpm/{vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1 → vitest@2.1.8_@types_node@22.10.3_@vitest_ui@2.1.8_jsdom@26.0.0}/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.qwik.cjs +0 -0
  94. /package/lib/node_modules/.pnpm/{vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1 → vitest@2.1.8_@types_node@22.10.3_@vitest_ui@2.1.8_jsdom@26.0.0}/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.qwik.mjs +0 -0
  95. /package/lib/node_modules/.pnpm/{vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1 → vitest@2.1.8_@types_node@22.10.3_@vitest_ui@2.1.8_jsdom@26.0.0}/node_modules/vitest/dist/chunks/date.W2xKR2qe.qwik.cjs +0 -0
  96. /package/lib/node_modules/.pnpm/{vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1 → vitest@2.1.8_@types_node@22.10.3_@vitest_ui@2.1.8_jsdom@26.0.0}/node_modules/vitest/dist/chunks/date.W2xKR2qe.qwik.mjs +0 -0
@@ -3,450 +3,8 @@ var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
5
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
6
- const index = require("../../../../../@vitest_pretty-format@2.1.1/node_modules/@vitest/pretty-format/dist/index.qwik.cjs");
6
+ const index = require("../../../../../@vitest_pretty-format@2.1.8/node_modules/@vitest/pretty-format/dist/index.qwik.cjs");
7
7
  const pathe_ff20891b = require("../../../../../pathe@1.1.2/node_modules/pathe/dist/shared/pathe.ff20891b.qwik.cjs");
8
- function getDefaultExportFromCjs(x) {
9
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
10
- }
11
- var naturalCompare$2 = { exports: {} };
12
- /*
13
- * @version 1.4.0
14
- * @date 2015-10-26
15
- * @stability 3 - Stable
16
- * @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)
17
- * @license MIT License
18
- */
19
- var naturalCompare = function(a2, b) {
20
- var i, codeA, codeB = 1, posA = 0, posB = 0, alphabet = String.alphabet;
21
- function getCode(str, pos, code) {
22
- if (code) {
23
- for (i = pos; code = getCode(str, i), code < 76 && code > 65; ) ++i;
24
- return +str.slice(pos - 1, i);
25
- }
26
- code = alphabet && alphabet.indexOf(str.charAt(pos));
27
- return code > -1 ? code + 76 : (code = str.charCodeAt(pos) || 0, code < 45 || code > 127) ? code : code < 46 ? 65 : code < 48 ? code - 1 : code < 58 ? code + 18 : code < 65 ? code - 11 : code < 91 ? code + 11 : code < 97 ? code - 37 : code < 123 ? code + 5 : code - 63;
28
- }
29
- if ((a2 += "") != (b += "")) for (; codeB; ) {
30
- codeA = getCode(a2, posA++);
31
- codeB = getCode(b, posB++);
32
- if (codeA < 76 && codeB < 76 && codeA > 66 && codeB > 66) {
33
- codeA = getCode(a2, posA, posA);
34
- codeB = getCode(b, posB, posA = i);
35
- posB = i;
36
- }
37
- if (codeA != codeB) return codeA < codeB ? -1 : 1;
38
- }
39
- return 0;
40
- };
41
- try {
42
- naturalCompare$2.exports = naturalCompare;
43
- } catch (e) {
44
- String.naturalCompare = naturalCompare;
45
- }
46
- var naturalCompareExports = naturalCompare$2.exports;
47
- var naturalCompare$1 = /* @__PURE__ */ getDefaultExportFromCjs(naturalCompareExports);
48
- function notNullish(v) {
49
- return v != null;
50
- }
51
- function isPrimitive(value) {
52
- return value === null || typeof value !== "function" && typeof value !== "object";
53
- }
54
- function isObject(item) {
55
- return item != null && typeof item === "object" && !Array.isArray(item);
56
- }
57
- function getCallLastIndex(code) {
58
- let charIndex = -1;
59
- let inString = null;
60
- let startedBracers = 0;
61
- let endedBracers = 0;
62
- let beforeChar = null;
63
- while (charIndex <= code.length) {
64
- beforeChar = code[charIndex];
65
- charIndex++;
66
- const char = code[charIndex];
67
- const isCharString = char === '"' || char === "'" || char === "`";
68
- if (isCharString && beforeChar !== "\\") {
69
- if (inString === char) {
70
- inString = null;
71
- } else if (!inString) {
72
- inString = char;
73
- }
74
- }
75
- if (!inString) {
76
- if (char === "(") {
77
- startedBracers++;
78
- }
79
- if (char === ")") {
80
- endedBracers++;
81
- }
82
- }
83
- if (startedBracers && endedBracers && startedBracers === endedBracers) {
84
- return charIndex;
85
- }
86
- }
87
- return null;
88
- }
89
- let getPromiseValue = () => "Promise{…}";
90
- try {
91
- const { getPromiseDetails, kPending, kRejected } = process.binding("util");
92
- if (Array.isArray(getPromiseDetails(Promise.resolve()))) {
93
- getPromiseValue = (value, options) => {
94
- const [state, innerValue] = getPromiseDetails(value);
95
- if (state === kPending) {
96
- return "Promise{<pending>}";
97
- }
98
- return `Promise${state === kRejected ? "!" : ""}{${options.inspect(innerValue, options)}}`;
99
- };
100
- }
101
- } catch (notNode) {
102
- }
103
- let nodeInspect = false;
104
- try {
105
- const nodeUtil = require("util");
106
- nodeInspect = nodeUtil.inspect ? nodeUtil.inspect.custom : false;
107
- } catch (noNodeInspect) {
108
- nodeInspect = false;
109
- }
110
- const lineSplitRE = /\r?\n/;
111
- function positionToOffset(source, lineNumber, columnNumber) {
112
- const lines = source.split(lineSplitRE);
113
- const nl = /\r\n/.test(source) ? 2 : 1;
114
- let start = 0;
115
- if (lineNumber > lines.length) {
116
- return source.length;
117
- }
118
- for (let i = 0; i < lineNumber - 1; i++) {
119
- start += lines[i].length + nl;
120
- }
121
- return start + columnNumber;
122
- }
123
- function offsetToLineNumber(source, offset) {
124
- if (offset > source.length) {
125
- throw new Error(
126
- `offset is longer than source length! offset ${offset} > length ${source.length}`
127
- );
128
- }
129
- const lines = source.split(lineSplitRE);
130
- const nl = /\r\n/.test(source) ? 2 : 1;
131
- let counted = 0;
132
- let line = 0;
133
- for (; line < lines.length; line++) {
134
- const lineLength = lines[line].length + nl;
135
- if (counted + lineLength >= offset) {
136
- break;
137
- }
138
- counted += lineLength;
139
- }
140
- return line + 1;
141
- }
142
- var LineTerminatorSequence;
143
- LineTerminatorSequence = /\r?\n|[\r\u2028\u2029]/y;
144
- RegExp(LineTerminatorSequence.source);
145
- var reservedWords = {
146
- keyword: [
147
- "break",
148
- "case",
149
- "catch",
150
- "continue",
151
- "debugger",
152
- "default",
153
- "do",
154
- "else",
155
- "finally",
156
- "for",
157
- "function",
158
- "if",
159
- "return",
160
- "switch",
161
- "throw",
162
- "try",
163
- "var",
164
- "const",
165
- "while",
166
- "with",
167
- "new",
168
- "this",
169
- "super",
170
- "class",
171
- "extends",
172
- "export",
173
- "import",
174
- "null",
175
- "true",
176
- "false",
177
- "in",
178
- "instanceof",
179
- "typeof",
180
- "void",
181
- "delete"
182
- ],
183
- strict: [
184
- "implements",
185
- "interface",
186
- "let",
187
- "package",
188
- "private",
189
- "protected",
190
- "public",
191
- "static",
192
- "yield"
193
- ]
194
- };
195
- new Set(reservedWords.keyword);
196
- new Set(reservedWords.strict);
197
- var f = {
198
- reset: [0, 0],
199
- bold: [1, 22, "\x1B[22m\x1B[1m"],
200
- dim: [2, 22, "\x1B[22m\x1B[2m"],
201
- italic: [3, 23],
202
- underline: [4, 24],
203
- inverse: [7, 27],
204
- hidden: [8, 28],
205
- strikethrough: [9, 29],
206
- black: [30, 39],
207
- red: [31, 39],
208
- green: [32, 39],
209
- yellow: [33, 39],
210
- blue: [34, 39],
211
- magenta: [35, 39],
212
- cyan: [36, 39],
213
- white: [37, 39],
214
- gray: [90, 39],
215
- bgBlack: [40, 49],
216
- bgRed: [41, 49],
217
- bgGreen: [42, 49],
218
- bgYellow: [43, 49],
219
- bgBlue: [44, 49],
220
- bgMagenta: [45, 49],
221
- bgCyan: [46, 49],
222
- bgWhite: [47, 49],
223
- blackBright: [90, 39],
224
- redBright: [91, 39],
225
- greenBright: [92, 39],
226
- yellowBright: [93, 39],
227
- blueBright: [94, 39],
228
- magentaBright: [95, 39],
229
- cyanBright: [96, 39],
230
- whiteBright: [97, 39],
231
- bgBlackBright: [100, 49],
232
- bgRedBright: [101, 49],
233
- bgGreenBright: [102, 49],
234
- bgYellowBright: [103, 49],
235
- bgBlueBright: [104, 49],
236
- bgMagentaBright: [105, 49],
237
- bgCyanBright: [106, 49],
238
- bgWhiteBright: [107, 49]
239
- }, h = Object.entries(f);
240
- function a(n) {
241
- return String(n);
242
- }
243
- a.open = "";
244
- a.close = "";
245
- function C(n = false) {
246
- let e = typeof process != "undefined" ? process : void 0, i = (e == null ? void 0 : e.env) || {}, g = (e == null ? void 0 : e.argv) || [];
247
- return !("NO_COLOR" in i || g.includes("--no-color")) && ("FORCE_COLOR" in i || g.includes("--color") || (e == null ? void 0 : e.platform) === "win32" || n && i.TERM !== "dumb" || "CI" in i) || typeof window != "undefined" && !!window.chrome;
248
- }
249
- function p(n = false) {
250
- let e = C(n), i = (r, t, c, o) => {
251
- let l = "", s = 0;
252
- do
253
- l += r.substring(s, o) + c, s = o + t.length, o = r.indexOf(t, s);
254
- while (~o);
255
- return l + r.substring(s);
256
- }, g = (r, t, c = r) => {
257
- let o = (l) => {
258
- let s = String(l), b = s.indexOf(t, r.length);
259
- return ~b ? r + i(s, t, c, b) + t : r + s + t;
260
- };
261
- return o.open = r, o.close = t, o;
262
- }, u = {
263
- isColorSupported: e
264
- }, d = (r) => `\x1B[${r}m`;
265
- for (let [r, t] of h)
266
- u[r] = e ? g(
267
- d(t[0]),
268
- d(t[1]),
269
- t[2]
270
- ) : a;
271
- return u;
272
- }
273
- p(false);
274
- const serialize$1 = (val, config, indentation, depth, refs, printer) => {
275
- const name = val.getMockName();
276
- const nameString = name === "vi.fn()" ? "" : ` ${name}`;
277
- let callsString = "";
278
- if (val.mock.calls.length !== 0) {
279
- const indentationNext = indentation + config.indent;
280
- callsString = ` {${config.spacingOuter}${indentationNext}"calls": ${printer(
281
- val.mock.calls,
282
- config,
283
- indentationNext,
284
- depth,
285
- refs
286
- )}${config.min ? ", " : ","}${config.spacingOuter}${indentationNext}"results": ${printer(
287
- val.mock.results,
288
- config,
289
- indentationNext,
290
- depth,
291
- refs
292
- )}${config.min ? "" : ","}${config.spacingOuter}${indentation}}`;
293
- }
294
- return `[MockFunction${nameString}]${callsString}`;
295
- };
296
- const test = (val) => val && !!val._isMockFunction;
297
- const plugin = { serialize: serialize$1, test };
298
- const {
299
- DOMCollection,
300
- DOMElement,
301
- Immutable,
302
- ReactElement,
303
- ReactTestComponent,
304
- AsymmetricMatcher
305
- } = index.plugins;
306
- let PLUGINS = [
307
- ReactTestComponent,
308
- ReactElement,
309
- DOMElement,
310
- DOMCollection,
311
- Immutable,
312
- AsymmetricMatcher,
313
- plugin
314
- ];
315
- function addSerializer(plugin2) {
316
- PLUGINS = [plugin2].concat(PLUGINS);
317
- }
318
- function getSerializers() {
319
- return PLUGINS;
320
- }
321
- function testNameToKey(testName, count) {
322
- return `${testName} ${count}`;
323
- }
324
- function keyToTestName(key) {
325
- if (!/ \d+$/.test(key)) {
326
- throw new Error("Snapshot keys must end with a number.");
327
- }
328
- return key.replace(/ \d+$/, "");
329
- }
330
- function getSnapshotData(content, options) {
331
- const update = options.updateSnapshot;
332
- const data = /* @__PURE__ */ Object.create(null);
333
- let snapshotContents = "";
334
- let dirty = false;
335
- if (content != null) {
336
- try {
337
- snapshotContents = content;
338
- const populate = new Function("exports", snapshotContents);
339
- populate(data);
340
- } catch {
341
- }
342
- }
343
- const isInvalid = snapshotContents;
344
- if ((update === "all" || update === "new") && isInvalid) {
345
- dirty = true;
346
- }
347
- return { data, dirty };
348
- }
349
- function addExtraLineBreaks(string) {
350
- return string.includes("\n") ? `
351
- ${string}
352
- ` : string;
353
- }
354
- function removeExtraLineBreaks(string) {
355
- return string.length > 2 && string.startsWith("\n") && string.endsWith("\n") ? string.slice(1, -1) : string;
356
- }
357
- const escapeRegex = true;
358
- const printFunctionName = false;
359
- function serialize(val, indent = 2, formatOverrides = {}) {
360
- return normalizeNewlines(
361
- index.format(val, {
362
- escapeRegex,
363
- indent,
364
- plugins: getSerializers(),
365
- printFunctionName,
366
- ...formatOverrides
367
- })
368
- );
369
- }
370
- function escapeBacktickString(str) {
371
- return str.replace(/`|\\|\$\{/g, "\\$&");
372
- }
373
- function printBacktickString(str) {
374
- return `\`${escapeBacktickString(str)}\``;
375
- }
376
- function normalizeNewlines(string) {
377
- return string.replace(/\r\n|\r/g, "\n");
378
- }
379
- async function saveSnapshotFile(environment, snapshotData, snapshotPath) {
380
- const snapshots = Object.keys(snapshotData).sort(naturalCompare$1).map(
381
- (key) => `exports[${printBacktickString(key)}] = ${printBacktickString(
382
- normalizeNewlines(snapshotData[key])
383
- )};`
384
- );
385
- const content = `${environment.getHeader()}
386
-
387
- ${snapshots.join("\n\n")}
388
- `;
389
- const oldContent = await environment.readSnapshotFile(snapshotPath);
390
- const skipWriting = oldContent != null && oldContent === content;
391
- if (skipWriting) {
392
- return;
393
- }
394
- await environment.saveSnapshotFile(snapshotPath, content);
395
- }
396
- function prepareExpected(expected) {
397
- function findStartIndent() {
398
- var _a, _b;
399
- const matchObject = /^( +)\}\s+$/m.exec(expected || "");
400
- const objectIndent = (_a = matchObject == null ? void 0 : matchObject[1]) == null ? void 0 : _a.length;
401
- if (objectIndent) {
402
- return objectIndent;
403
- }
404
- const matchText = /^\n( +)"/.exec(expected || "");
405
- return ((_b = matchText == null ? void 0 : matchText[1]) == null ? void 0 : _b.length) || 0;
406
- }
407
- const startIndent = findStartIndent();
408
- let expectedTrimmed = expected == null ? void 0 : expected.trim();
409
- if (startIndent) {
410
- expectedTrimmed = expectedTrimmed == null ? void 0 : expectedTrimmed.replace(new RegExp(`^${" ".repeat(startIndent)}`, "gm"), "").replace(/ +\}$/, "}");
411
- }
412
- return expectedTrimmed;
413
- }
414
- function deepMergeArray(target = [], source = []) {
415
- const mergedOutput = Array.from(target);
416
- source.forEach((sourceElement, index2) => {
417
- const targetElement = mergedOutput[index2];
418
- if (Array.isArray(target[index2])) {
419
- mergedOutput[index2] = deepMergeArray(target[index2], sourceElement);
420
- } else if (isObject(targetElement)) {
421
- mergedOutput[index2] = deepMergeSnapshot(target[index2], sourceElement);
422
- } else {
423
- mergedOutput[index2] = sourceElement;
424
- }
425
- });
426
- return mergedOutput;
427
- }
428
- function deepMergeSnapshot(target, source) {
429
- if (isObject(target) && isObject(source)) {
430
- const mergedOutput = { ...target };
431
- Object.keys(source).forEach((key) => {
432
- if (isObject(source[key]) && !source[key].$$typeof) {
433
- if (!(key in target)) {
434
- Object.assign(mergedOutput, { [key]: source[key] });
435
- } else {
436
- mergedOutput[key] = deepMergeSnapshot(target[key], source[key]);
437
- }
438
- } else if (Array.isArray(source[key])) {
439
- mergedOutput[key] = deepMergeArray(target[key], source[key]);
440
- } else {
441
- Object.assign(mergedOutput, { [key]: source[key] });
442
- }
443
- });
444
- return mergedOutput;
445
- } else if (Array.isArray(target) && Array.isArray(source)) {
446
- return deepMergeArray(target, source);
447
- }
448
- return target;
449
- }
450
8
  const comma = ",".charCodeAt(0);
451
9
  const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
452
10
  const intToChar = new Uint8Array(64);
@@ -680,15 +238,19 @@ function resolve$1(input, base) {
680
238
  switch (inputType) {
681
239
  case UrlType.Empty:
682
240
  url.hash = baseUrl.hash;
241
+ // fall through
683
242
  case UrlType.Hash:
684
243
  url.query = baseUrl.query;
244
+ // fall through
685
245
  case UrlType.Query:
686
246
  case UrlType.RelativePath:
687
247
  mergePaths(url, baseUrl);
248
+ // fall through
688
249
  case UrlType.AbsolutePath:
689
250
  url.user = baseUrl.user;
690
251
  url.host = baseUrl.host;
691
252
  url.port = baseUrl.port;
253
+ // fall through
692
254
  case UrlType.SchemeRelative:
693
255
  url.scheme = baseUrl.scheme;
694
256
  }
@@ -698,6 +260,8 @@ function resolve$1(input, base) {
698
260
  normalizePath(url, inputType);
699
261
  const queryHash = url.query + url.hash;
700
262
  switch (inputType) {
263
+ // This is impossible, because of the empty checks at the start of the function.
264
+ // case UrlType.Empty:
701
265
  case UrlType.Hash:
702
266
  case UrlType.Query:
703
267
  return queryHash;
@@ -897,6 +461,47 @@ function traceSegmentInternal(segments, memo, line, column, bias) {
897
461
  return -1;
898
462
  return index2;
899
463
  }
464
+ function notNullish(v) {
465
+ return v != null;
466
+ }
467
+ function isPrimitive(value) {
468
+ return value === null || typeof value !== "function" && typeof value !== "object";
469
+ }
470
+ function isObject(item) {
471
+ return item != null && typeof item === "object" && !Array.isArray(item);
472
+ }
473
+ function getCallLastIndex(code) {
474
+ let charIndex = -1;
475
+ let inString = null;
476
+ let startedBracers = 0;
477
+ let endedBracers = 0;
478
+ let beforeChar = null;
479
+ while (charIndex <= code.length) {
480
+ beforeChar = code[charIndex];
481
+ charIndex++;
482
+ const char = code[charIndex];
483
+ const isCharString = char === '"' || char === "'" || char === "`";
484
+ if (isCharString && beforeChar !== "\\") {
485
+ if (inString === char) {
486
+ inString = null;
487
+ } else if (!inString) {
488
+ inString = char;
489
+ }
490
+ }
491
+ if (!inString) {
492
+ if (char === "(") {
493
+ startedBracers++;
494
+ }
495
+ if (char === ")") {
496
+ endedBracers++;
497
+ }
498
+ }
499
+ if (startedBracers && endedBracers && startedBracers === endedBracers) {
500
+ return charIndex;
501
+ }
502
+ }
503
+ return null;
504
+ }
900
505
  const CHROME_IE_STACK_REGEXP = /^\s*at .*(?:\S:\d+|\(native\))/m;
901
506
  const SAFARI_NATIVE_CODE_REGEXP = /^(?:eval@)?(?:\[native code\])?$/;
902
507
  const stackIgnorePatterns = [
@@ -1034,31 +639,610 @@ function parseStacktrace(stack, options = {}) {
1034
639
  return stack2;
1035
640
  });
1036
641
  }
1037
- function parseFFOrSafariStackTrace(stack) {
1038
- return stack.split("\n").map((line) => parseSingleFFOrSafariStack(line)).filter(notNullish);
642
+ function parseFFOrSafariStackTrace(stack) {
643
+ return stack.split("\n").map((line) => parseSingleFFOrSafariStack(line)).filter(notNullish);
644
+ }
645
+ function parseV8Stacktrace(stack) {
646
+ return stack.split("\n").map((line) => parseSingleV8Stack(line)).filter(notNullish);
647
+ }
648
+ function parseErrorStacktrace(e, options = {}) {
649
+ if (!e || isPrimitive(e)) {
650
+ return [];
651
+ }
652
+ if (e.stacks) {
653
+ return e.stacks;
654
+ }
655
+ const stackStr = e.stack || e.stackStr || "";
656
+ let stackFrames = parseStacktrace(stackStr, options);
657
+ if (options.frameFilter) {
658
+ stackFrames = stackFrames.filter(
659
+ (f2) => options.frameFilter(e, f2) !== false
660
+ );
661
+ }
662
+ e.stacks = stackFrames;
663
+ return stackFrames;
664
+ }
665
+ let getPromiseValue = () => "Promise{…}";
666
+ try {
667
+ const { getPromiseDetails, kPending, kRejected } = process.binding("util");
668
+ if (Array.isArray(getPromiseDetails(Promise.resolve()))) {
669
+ getPromiseValue = (value, options) => {
670
+ const [state, innerValue] = getPromiseDetails(value);
671
+ if (state === kPending) {
672
+ return "Promise{<pending>}";
673
+ }
674
+ return `Promise${state === kRejected ? "!" : ""}{${options.inspect(innerValue, options)}}`;
675
+ };
676
+ }
677
+ } catch (notNode) {
678
+ }
679
+ let nodeInspect = false;
680
+ try {
681
+ const nodeUtil = require("util");
682
+ nodeInspect = nodeUtil.inspect ? nodeUtil.inspect.custom : false;
683
+ } catch (noNodeInspect) {
684
+ nodeInspect = false;
685
+ }
686
+ function getDefaultExportFromCjs(x) {
687
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
688
+ }
689
+ var jsTokens_1;
690
+ var hasRequiredJsTokens;
691
+ function requireJsTokens() {
692
+ if (hasRequiredJsTokens) return jsTokens_1;
693
+ hasRequiredJsTokens = 1;
694
+ var Identifier, JSXIdentifier, JSXPunctuator, JSXString, JSXText, KeywordsWithExpressionAfter, KeywordsWithNoLineTerminatorAfter, LineTerminatorSequence, MultiLineComment, Newline, NumericLiteral, Punctuator, RegularExpressionLiteral, SingleLineComment, StringLiteral, Template, TokensNotPrecedingObjectLiteral, TokensPrecedingExpression, WhiteSpace;
695
+ RegularExpressionLiteral = /\/(?![*\/])(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\\]).|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu;
696
+ Punctuator = /--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y;
697
+ Identifier = /(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu;
698
+ StringLiteral = /(['"])(?:(?!\1)[^\\\n\r]|\\(?:\r\n|[^]))*(\1)?/y;
699
+ NumericLiteral = /(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y;
700
+ Template = /[`}](?:[^`\\$]|\\[^]|\$(?!\{))*(`|\$\{)?/y;
701
+ WhiteSpace = /[\t\v\f\ufeff\p{Zs}]+/yu;
702
+ LineTerminatorSequence = /\r?\n|[\r\u2028\u2029]/y;
703
+ MultiLineComment = /\/\*(?:[^*]|\*(?!\/))*(\*\/)?/y;
704
+ SingleLineComment = /\/\/.*/y;
705
+ JSXPunctuator = /[<>.:={}]|\/(?![\/*])/y;
706
+ JSXIdentifier = /[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu;
707
+ JSXString = /(['"])(?:(?!\1)[^])*(\1)?/y;
708
+ JSXText = /[^<>{}]+/y;
709
+ TokensPrecedingExpression = /^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/;
710
+ TokensNotPrecedingObjectLiteral = /^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/;
711
+ KeywordsWithExpressionAfter = /^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/;
712
+ KeywordsWithNoLineTerminatorAfter = /^(?:return|throw|yield)$/;
713
+ Newline = RegExp(LineTerminatorSequence.source);
714
+ jsTokens_1 = function* (input, { jsx = false } = {}) {
715
+ var braces, firstCodePoint, isExpression, lastIndex, lastSignificantToken, length, match, mode, nextLastIndex, nextLastSignificantToken, parenNesting, postfixIncDec, punctuator, stack;
716
+ ({ length } = input);
717
+ lastIndex = 0;
718
+ lastSignificantToken = "";
719
+ stack = [
720
+ { tag: "JS" }
721
+ ];
722
+ braces = [];
723
+ parenNesting = 0;
724
+ postfixIncDec = false;
725
+ while (lastIndex < length) {
726
+ mode = stack[stack.length - 1];
727
+ switch (mode.tag) {
728
+ case "JS":
729
+ case "JSNonExpressionParen":
730
+ case "InterpolationInTemplate":
731
+ case "InterpolationInJSX":
732
+ if (input[lastIndex] === "/" && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken))) {
733
+ RegularExpressionLiteral.lastIndex = lastIndex;
734
+ if (match = RegularExpressionLiteral.exec(input)) {
735
+ lastIndex = RegularExpressionLiteral.lastIndex;
736
+ lastSignificantToken = match[0];
737
+ postfixIncDec = true;
738
+ yield {
739
+ type: "RegularExpressionLiteral",
740
+ value: match[0],
741
+ closed: match[1] !== void 0 && match[1] !== "\\"
742
+ };
743
+ continue;
744
+ }
745
+ }
746
+ Punctuator.lastIndex = lastIndex;
747
+ if (match = Punctuator.exec(input)) {
748
+ punctuator = match[0];
749
+ nextLastIndex = Punctuator.lastIndex;
750
+ nextLastSignificantToken = punctuator;
751
+ switch (punctuator) {
752
+ case "(":
753
+ if (lastSignificantToken === "?NonExpressionParenKeyword") {
754
+ stack.push({
755
+ tag: "JSNonExpressionParen",
756
+ nesting: parenNesting
757
+ });
758
+ }
759
+ parenNesting++;
760
+ postfixIncDec = false;
761
+ break;
762
+ case ")":
763
+ parenNesting--;
764
+ postfixIncDec = true;
765
+ if (mode.tag === "JSNonExpressionParen" && parenNesting === mode.nesting) {
766
+ stack.pop();
767
+ nextLastSignificantToken = "?NonExpressionParenEnd";
768
+ postfixIncDec = false;
769
+ }
770
+ break;
771
+ case "{":
772
+ Punctuator.lastIndex = 0;
773
+ isExpression = !TokensNotPrecedingObjectLiteral.test(lastSignificantToken) && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken));
774
+ braces.push(isExpression);
775
+ postfixIncDec = false;
776
+ break;
777
+ case "}":
778
+ switch (mode.tag) {
779
+ case "InterpolationInTemplate":
780
+ if (braces.length === mode.nesting) {
781
+ Template.lastIndex = lastIndex;
782
+ match = Template.exec(input);
783
+ lastIndex = Template.lastIndex;
784
+ lastSignificantToken = match[0];
785
+ if (match[1] === "${") {
786
+ lastSignificantToken = "?InterpolationInTemplate";
787
+ postfixIncDec = false;
788
+ yield {
789
+ type: "TemplateMiddle",
790
+ value: match[0]
791
+ };
792
+ } else {
793
+ stack.pop();
794
+ postfixIncDec = true;
795
+ yield {
796
+ type: "TemplateTail",
797
+ value: match[0],
798
+ closed: match[1] === "`"
799
+ };
800
+ }
801
+ continue;
802
+ }
803
+ break;
804
+ case "InterpolationInJSX":
805
+ if (braces.length === mode.nesting) {
806
+ stack.pop();
807
+ lastIndex += 1;
808
+ lastSignificantToken = "}";
809
+ yield {
810
+ type: "JSXPunctuator",
811
+ value: "}"
812
+ };
813
+ continue;
814
+ }
815
+ }
816
+ postfixIncDec = braces.pop();
817
+ nextLastSignificantToken = postfixIncDec ? "?ExpressionBraceEnd" : "}";
818
+ break;
819
+ case "]":
820
+ postfixIncDec = true;
821
+ break;
822
+ case "++":
823
+ case "--":
824
+ nextLastSignificantToken = postfixIncDec ? "?PostfixIncDec" : "?UnaryIncDec";
825
+ break;
826
+ case "<":
827
+ if (jsx && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken))) {
828
+ stack.push({ tag: "JSXTag" });
829
+ lastIndex += 1;
830
+ lastSignificantToken = "<";
831
+ yield {
832
+ type: "JSXPunctuator",
833
+ value: punctuator
834
+ };
835
+ continue;
836
+ }
837
+ postfixIncDec = false;
838
+ break;
839
+ default:
840
+ postfixIncDec = false;
841
+ }
842
+ lastIndex = nextLastIndex;
843
+ lastSignificantToken = nextLastSignificantToken;
844
+ yield {
845
+ type: "Punctuator",
846
+ value: punctuator
847
+ };
848
+ continue;
849
+ }
850
+ Identifier.lastIndex = lastIndex;
851
+ if (match = Identifier.exec(input)) {
852
+ lastIndex = Identifier.lastIndex;
853
+ nextLastSignificantToken = match[0];
854
+ switch (match[0]) {
855
+ case "for":
856
+ case "if":
857
+ case "while":
858
+ case "with":
859
+ if (lastSignificantToken !== "." && lastSignificantToken !== "?.") {
860
+ nextLastSignificantToken = "?NonExpressionParenKeyword";
861
+ }
862
+ }
863
+ lastSignificantToken = nextLastSignificantToken;
864
+ postfixIncDec = !KeywordsWithExpressionAfter.test(match[0]);
865
+ yield {
866
+ type: match[1] === "#" ? "PrivateIdentifier" : "IdentifierName",
867
+ value: match[0]
868
+ };
869
+ continue;
870
+ }
871
+ StringLiteral.lastIndex = lastIndex;
872
+ if (match = StringLiteral.exec(input)) {
873
+ lastIndex = StringLiteral.lastIndex;
874
+ lastSignificantToken = match[0];
875
+ postfixIncDec = true;
876
+ yield {
877
+ type: "StringLiteral",
878
+ value: match[0],
879
+ closed: match[2] !== void 0
880
+ };
881
+ continue;
882
+ }
883
+ NumericLiteral.lastIndex = lastIndex;
884
+ if (match = NumericLiteral.exec(input)) {
885
+ lastIndex = NumericLiteral.lastIndex;
886
+ lastSignificantToken = match[0];
887
+ postfixIncDec = true;
888
+ yield {
889
+ type: "NumericLiteral",
890
+ value: match[0]
891
+ };
892
+ continue;
893
+ }
894
+ Template.lastIndex = lastIndex;
895
+ if (match = Template.exec(input)) {
896
+ lastIndex = Template.lastIndex;
897
+ lastSignificantToken = match[0];
898
+ if (match[1] === "${") {
899
+ lastSignificantToken = "?InterpolationInTemplate";
900
+ stack.push({
901
+ tag: "InterpolationInTemplate",
902
+ nesting: braces.length
903
+ });
904
+ postfixIncDec = false;
905
+ yield {
906
+ type: "TemplateHead",
907
+ value: match[0]
908
+ };
909
+ } else {
910
+ postfixIncDec = true;
911
+ yield {
912
+ type: "NoSubstitutionTemplate",
913
+ value: match[0],
914
+ closed: match[1] === "`"
915
+ };
916
+ }
917
+ continue;
918
+ }
919
+ break;
920
+ case "JSXTag":
921
+ case "JSXTagEnd":
922
+ JSXPunctuator.lastIndex = lastIndex;
923
+ if (match = JSXPunctuator.exec(input)) {
924
+ lastIndex = JSXPunctuator.lastIndex;
925
+ nextLastSignificantToken = match[0];
926
+ switch (match[0]) {
927
+ case "<":
928
+ stack.push({ tag: "JSXTag" });
929
+ break;
930
+ case ">":
931
+ stack.pop();
932
+ if (lastSignificantToken === "/" || mode.tag === "JSXTagEnd") {
933
+ nextLastSignificantToken = "?JSX";
934
+ postfixIncDec = true;
935
+ } else {
936
+ stack.push({ tag: "JSXChildren" });
937
+ }
938
+ break;
939
+ case "{":
940
+ stack.push({
941
+ tag: "InterpolationInJSX",
942
+ nesting: braces.length
943
+ });
944
+ nextLastSignificantToken = "?InterpolationInJSX";
945
+ postfixIncDec = false;
946
+ break;
947
+ case "/":
948
+ if (lastSignificantToken === "<") {
949
+ stack.pop();
950
+ if (stack[stack.length - 1].tag === "JSXChildren") {
951
+ stack.pop();
952
+ }
953
+ stack.push({ tag: "JSXTagEnd" });
954
+ }
955
+ }
956
+ lastSignificantToken = nextLastSignificantToken;
957
+ yield {
958
+ type: "JSXPunctuator",
959
+ value: match[0]
960
+ };
961
+ continue;
962
+ }
963
+ JSXIdentifier.lastIndex = lastIndex;
964
+ if (match = JSXIdentifier.exec(input)) {
965
+ lastIndex = JSXIdentifier.lastIndex;
966
+ lastSignificantToken = match[0];
967
+ yield {
968
+ type: "JSXIdentifier",
969
+ value: match[0]
970
+ };
971
+ continue;
972
+ }
973
+ JSXString.lastIndex = lastIndex;
974
+ if (match = JSXString.exec(input)) {
975
+ lastIndex = JSXString.lastIndex;
976
+ lastSignificantToken = match[0];
977
+ yield {
978
+ type: "JSXString",
979
+ value: match[0],
980
+ closed: match[2] !== void 0
981
+ };
982
+ continue;
983
+ }
984
+ break;
985
+ case "JSXChildren":
986
+ JSXText.lastIndex = lastIndex;
987
+ if (match = JSXText.exec(input)) {
988
+ lastIndex = JSXText.lastIndex;
989
+ lastSignificantToken = match[0];
990
+ yield {
991
+ type: "JSXText",
992
+ value: match[0]
993
+ };
994
+ continue;
995
+ }
996
+ switch (input[lastIndex]) {
997
+ case "<":
998
+ stack.push({ tag: "JSXTag" });
999
+ lastIndex++;
1000
+ lastSignificantToken = "<";
1001
+ yield {
1002
+ type: "JSXPunctuator",
1003
+ value: "<"
1004
+ };
1005
+ continue;
1006
+ case "{":
1007
+ stack.push({
1008
+ tag: "InterpolationInJSX",
1009
+ nesting: braces.length
1010
+ });
1011
+ lastIndex++;
1012
+ lastSignificantToken = "?InterpolationInJSX";
1013
+ postfixIncDec = false;
1014
+ yield {
1015
+ type: "JSXPunctuator",
1016
+ value: "{"
1017
+ };
1018
+ continue;
1019
+ }
1020
+ }
1021
+ WhiteSpace.lastIndex = lastIndex;
1022
+ if (match = WhiteSpace.exec(input)) {
1023
+ lastIndex = WhiteSpace.lastIndex;
1024
+ yield {
1025
+ type: "WhiteSpace",
1026
+ value: match[0]
1027
+ };
1028
+ continue;
1029
+ }
1030
+ LineTerminatorSequence.lastIndex = lastIndex;
1031
+ if (match = LineTerminatorSequence.exec(input)) {
1032
+ lastIndex = LineTerminatorSequence.lastIndex;
1033
+ postfixIncDec = false;
1034
+ if (KeywordsWithNoLineTerminatorAfter.test(lastSignificantToken)) {
1035
+ lastSignificantToken = "?NoLineTerminatorHere";
1036
+ }
1037
+ yield {
1038
+ type: "LineTerminatorSequence",
1039
+ value: match[0]
1040
+ };
1041
+ continue;
1042
+ }
1043
+ MultiLineComment.lastIndex = lastIndex;
1044
+ if (match = MultiLineComment.exec(input)) {
1045
+ lastIndex = MultiLineComment.lastIndex;
1046
+ if (Newline.test(match[0])) {
1047
+ postfixIncDec = false;
1048
+ if (KeywordsWithNoLineTerminatorAfter.test(lastSignificantToken)) {
1049
+ lastSignificantToken = "?NoLineTerminatorHere";
1050
+ }
1051
+ }
1052
+ yield {
1053
+ type: "MultiLineComment",
1054
+ value: match[0],
1055
+ closed: match[1] !== void 0
1056
+ };
1057
+ continue;
1058
+ }
1059
+ SingleLineComment.lastIndex = lastIndex;
1060
+ if (match = SingleLineComment.exec(input)) {
1061
+ lastIndex = SingleLineComment.lastIndex;
1062
+ postfixIncDec = false;
1063
+ yield {
1064
+ type: "SingleLineComment",
1065
+ value: match[0]
1066
+ };
1067
+ continue;
1068
+ }
1069
+ firstCodePoint = String.fromCodePoint(input.codePointAt(lastIndex));
1070
+ lastIndex += firstCodePoint.length;
1071
+ lastSignificantToken = firstCodePoint;
1072
+ postfixIncDec = false;
1073
+ yield {
1074
+ type: mode.tag.startsWith("JSX") ? "JSXInvalid" : "Invalid",
1075
+ value: firstCodePoint
1076
+ };
1077
+ }
1078
+ return void 0;
1079
+ };
1080
+ return jsTokens_1;
1081
+ }
1082
+ requireJsTokens();
1083
+ var reservedWords = {
1084
+ keyword: [
1085
+ "break",
1086
+ "case",
1087
+ "catch",
1088
+ "continue",
1089
+ "debugger",
1090
+ "default",
1091
+ "do",
1092
+ "else",
1093
+ "finally",
1094
+ "for",
1095
+ "function",
1096
+ "if",
1097
+ "return",
1098
+ "switch",
1099
+ "throw",
1100
+ "try",
1101
+ "var",
1102
+ "const",
1103
+ "while",
1104
+ "with",
1105
+ "new",
1106
+ "this",
1107
+ "super",
1108
+ "class",
1109
+ "extends",
1110
+ "export",
1111
+ "import",
1112
+ "null",
1113
+ "true",
1114
+ "false",
1115
+ "in",
1116
+ "instanceof",
1117
+ "typeof",
1118
+ "void",
1119
+ "delete"
1120
+ ],
1121
+ strict: [
1122
+ "implements",
1123
+ "interface",
1124
+ "let",
1125
+ "package",
1126
+ "private",
1127
+ "protected",
1128
+ "public",
1129
+ "static",
1130
+ "yield"
1131
+ ]
1132
+ };
1133
+ new Set(reservedWords.keyword);
1134
+ new Set(reservedWords.strict);
1135
+ var f = {
1136
+ reset: [0, 0],
1137
+ bold: [1, 22, "\x1B[22m\x1B[1m"],
1138
+ dim: [2, 22, "\x1B[22m\x1B[2m"],
1139
+ italic: [3, 23],
1140
+ underline: [4, 24],
1141
+ inverse: [7, 27],
1142
+ hidden: [8, 28],
1143
+ strikethrough: [9, 29],
1144
+ black: [30, 39],
1145
+ red: [31, 39],
1146
+ green: [32, 39],
1147
+ yellow: [33, 39],
1148
+ blue: [34, 39],
1149
+ magenta: [35, 39],
1150
+ cyan: [36, 39],
1151
+ white: [37, 39],
1152
+ gray: [90, 39],
1153
+ bgBlack: [40, 49],
1154
+ bgRed: [41, 49],
1155
+ bgGreen: [42, 49],
1156
+ bgYellow: [43, 49],
1157
+ bgBlue: [44, 49],
1158
+ bgMagenta: [45, 49],
1159
+ bgCyan: [46, 49],
1160
+ bgWhite: [47, 49],
1161
+ blackBright: [90, 39],
1162
+ redBright: [91, 39],
1163
+ greenBright: [92, 39],
1164
+ yellowBright: [93, 39],
1165
+ blueBright: [94, 39],
1166
+ magentaBright: [95, 39],
1167
+ cyanBright: [96, 39],
1168
+ whiteBright: [97, 39],
1169
+ bgBlackBright: [100, 49],
1170
+ bgRedBright: [101, 49],
1171
+ bgGreenBright: [102, 49],
1172
+ bgYellowBright: [103, 49],
1173
+ bgBlueBright: [104, 49],
1174
+ bgMagentaBright: [105, 49],
1175
+ bgCyanBright: [106, 49],
1176
+ bgWhiteBright: [107, 49]
1177
+ }, h = Object.entries(f);
1178
+ function a(n) {
1179
+ return String(n);
1180
+ }
1181
+ a.open = "";
1182
+ a.close = "";
1183
+ function C(n = false) {
1184
+ let e = typeof process != "undefined" ? process : void 0, i = (e == null ? void 0 : e.env) || {}, g = (e == null ? void 0 : e.argv) || [];
1185
+ return !("NO_COLOR" in i || g.includes("--no-color")) && ("FORCE_COLOR" in i || g.includes("--color") || (e == null ? void 0 : e.platform) === "win32" || n && i.TERM !== "dumb" || "CI" in i) || typeof window != "undefined" && !!window.chrome;
1039
1186
  }
1040
- function parseV8Stacktrace(stack) {
1041
- return stack.split("\n").map((line) => parseSingleV8Stack(line)).filter(notNullish);
1187
+ function p(n = false) {
1188
+ let e = C(n), i = (r, t, c, o) => {
1189
+ let l = "", s = 0;
1190
+ do
1191
+ l += r.substring(s, o) + c, s = o + t.length, o = r.indexOf(t, s);
1192
+ while (~o);
1193
+ return l + r.substring(s);
1194
+ }, g = (r, t, c = r) => {
1195
+ let o = (l) => {
1196
+ let s = String(l), b = s.indexOf(t, r.length);
1197
+ return ~b ? r + i(s, t, c, b) + t : r + s + t;
1198
+ };
1199
+ return o.open = r, o.close = t, o;
1200
+ }, u = {
1201
+ isColorSupported: e
1202
+ }, d = (r) => `\x1B[${r}m`;
1203
+ for (let [r, t] of h)
1204
+ u[r] = e ? g(
1205
+ d(t[0]),
1206
+ d(t[1]),
1207
+ t[2]
1208
+ ) : a;
1209
+ return u;
1042
1210
  }
1043
- function parseErrorStacktrace(e, options = {}) {
1044
- if (!e || isPrimitive(e)) {
1045
- return [];
1211
+ p(false);
1212
+ const lineSplitRE = /\r?\n/;
1213
+ function positionToOffset(source, lineNumber, columnNumber) {
1214
+ const lines = source.split(lineSplitRE);
1215
+ const nl = /\r\n/.test(source) ? 2 : 1;
1216
+ let start = 0;
1217
+ if (lineNumber > lines.length) {
1218
+ return source.length;
1046
1219
  }
1047
- if (e.stacks) {
1048
- return e.stacks;
1220
+ for (let i = 0; i < lineNumber - 1; i++) {
1221
+ start += lines[i].length + nl;
1049
1222
  }
1050
- const stackStr = e.stack || e.stackStr || "";
1051
- let stackFrames = parseStacktrace(stackStr, options);
1052
- if (options.frameFilter) {
1053
- stackFrames = stackFrames.filter(
1054
- (f2) => options.frameFilter(e, f2) !== false
1223
+ return start + columnNumber;
1224
+ }
1225
+ function offsetToLineNumber(source, offset) {
1226
+ if (offset > source.length) {
1227
+ throw new Error(
1228
+ `offset is longer than source length! offset ${offset} > length ${source.length}`
1055
1229
  );
1056
1230
  }
1057
- e.stacks = stackFrames;
1058
- return stackFrames;
1231
+ const lines = source.split(lineSplitRE);
1232
+ const nl = /\r\n/.test(source) ? 2 : 1;
1233
+ let counted = 0;
1234
+ let line = 0;
1235
+ for (; line < lines.length; line++) {
1236
+ const lineLength = lines[line].length + nl;
1237
+ if (counted + lineLength >= offset) {
1238
+ break;
1239
+ }
1240
+ counted += lineLength;
1241
+ }
1242
+ return line + 1;
1059
1243
  }
1060
1244
  async function saveInlineSnapshots(environment, snapshots) {
1061
- const MagicString = (await Promise.resolve().then(() => require("../../../../../magic-string@0.30.11/node_modules/magic-string/dist/magic-string.es.qwik.cjs"))).default;
1245
+ const MagicString = (await Promise.resolve().then(() => require("../../../../../magic-string@0.30.17/node_modules/magic-string/dist/magic-string.es.qwik.cjs"))).default;
1062
1246
  const files = new Set(snapshots.map((i) => i.file));
1063
1247
  await Promise.all(
1064
1248
  Array.from(files).map(async (file) => {
@@ -1210,6 +1394,225 @@ async function saveRawSnapshots(environment, snapshots) {
1210
1394
  })
1211
1395
  );
1212
1396
  }
1397
+ var naturalCompare$1 = { exports: {} };
1398
+ var hasRequiredNaturalCompare;
1399
+ function requireNaturalCompare() {
1400
+ if (hasRequiredNaturalCompare) return naturalCompare$1.exports;
1401
+ hasRequiredNaturalCompare = 1;
1402
+ /*
1403
+ * @version 1.4.0
1404
+ * @date 2015-10-26
1405
+ * @stability 3 - Stable
1406
+ * @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)
1407
+ * @license MIT License
1408
+ */
1409
+ var naturalCompare2 = function(a2, b) {
1410
+ var i, codeA, codeB = 1, posA = 0, posB = 0, alphabet = String.alphabet;
1411
+ function getCode(str, pos, code) {
1412
+ if (code) {
1413
+ for (i = pos; code = getCode(str, i), code < 76 && code > 65; ) ++i;
1414
+ return +str.slice(pos - 1, i);
1415
+ }
1416
+ code = alphabet && alphabet.indexOf(str.charAt(pos));
1417
+ return code > -1 ? code + 76 : (code = str.charCodeAt(pos) || 0, code < 45 || code > 127) ? code : code < 46 ? 65 : code < 48 ? code - 1 : code < 58 ? code + 18 : code < 65 ? code - 11 : code < 91 ? code + 11 : code < 97 ? code - 37 : code < 123 ? code + 5 : code - 63;
1418
+ }
1419
+ if ((a2 += "") != (b += "")) for (; codeB; ) {
1420
+ codeA = getCode(a2, posA++);
1421
+ codeB = getCode(b, posB++);
1422
+ if (codeA < 76 && codeB < 76 && codeA > 66 && codeB > 66) {
1423
+ codeA = getCode(a2, posA, posA);
1424
+ codeB = getCode(b, posB, posA = i);
1425
+ posB = i;
1426
+ }
1427
+ if (codeA != codeB) return codeA < codeB ? -1 : 1;
1428
+ }
1429
+ return 0;
1430
+ };
1431
+ try {
1432
+ naturalCompare$1.exports = naturalCompare2;
1433
+ } catch (e) {
1434
+ String.naturalCompare = naturalCompare2;
1435
+ }
1436
+ return naturalCompare$1.exports;
1437
+ }
1438
+ var naturalCompareExports = requireNaturalCompare();
1439
+ var naturalCompare = /* @__PURE__ */ getDefaultExportFromCjs(naturalCompareExports);
1440
+ const serialize$1 = (val, config, indentation, depth, refs, printer) => {
1441
+ const name = val.getMockName();
1442
+ const nameString = name === "vi.fn()" ? "" : ` ${name}`;
1443
+ let callsString = "";
1444
+ if (val.mock.calls.length !== 0) {
1445
+ const indentationNext = indentation + config.indent;
1446
+ callsString = ` {${config.spacingOuter}${indentationNext}"calls": ${printer(
1447
+ val.mock.calls,
1448
+ config,
1449
+ indentationNext,
1450
+ depth,
1451
+ refs
1452
+ )}${config.min ? ", " : ","}${config.spacingOuter}${indentationNext}"results": ${printer(
1453
+ val.mock.results,
1454
+ config,
1455
+ indentationNext,
1456
+ depth,
1457
+ refs
1458
+ )}${config.min ? "" : ","}${config.spacingOuter}${indentation}}`;
1459
+ }
1460
+ return `[MockFunction${nameString}]${callsString}`;
1461
+ };
1462
+ const test = (val) => val && !!val._isMockFunction;
1463
+ const plugin = { serialize: serialize$1, test };
1464
+ const {
1465
+ DOMCollection,
1466
+ DOMElement,
1467
+ Immutable,
1468
+ ReactElement,
1469
+ ReactTestComponent,
1470
+ AsymmetricMatcher
1471
+ } = index.plugins;
1472
+ let PLUGINS = [
1473
+ ReactTestComponent,
1474
+ ReactElement,
1475
+ DOMElement,
1476
+ DOMCollection,
1477
+ Immutable,
1478
+ AsymmetricMatcher,
1479
+ plugin
1480
+ ];
1481
+ function addSerializer(plugin2) {
1482
+ PLUGINS = [plugin2].concat(PLUGINS);
1483
+ }
1484
+ function getSerializers() {
1485
+ return PLUGINS;
1486
+ }
1487
+ function testNameToKey(testName, count) {
1488
+ return `${testName} ${count}`;
1489
+ }
1490
+ function keyToTestName(key) {
1491
+ if (!/ \d+$/.test(key)) {
1492
+ throw new Error("Snapshot keys must end with a number.");
1493
+ }
1494
+ return key.replace(/ \d+$/, "");
1495
+ }
1496
+ function getSnapshotData(content, options) {
1497
+ const update = options.updateSnapshot;
1498
+ const data = /* @__PURE__ */ Object.create(null);
1499
+ let snapshotContents = "";
1500
+ let dirty = false;
1501
+ if (content != null) {
1502
+ try {
1503
+ snapshotContents = content;
1504
+ const populate = new Function("exports", snapshotContents);
1505
+ populate(data);
1506
+ } catch {
1507
+ }
1508
+ }
1509
+ const isInvalid = snapshotContents;
1510
+ if ((update === "all" || update === "new") && isInvalid) {
1511
+ dirty = true;
1512
+ }
1513
+ return { data, dirty };
1514
+ }
1515
+ function addExtraLineBreaks(string) {
1516
+ return string.includes("\n") ? `
1517
+ ${string}
1518
+ ` : string;
1519
+ }
1520
+ function removeExtraLineBreaks(string) {
1521
+ return string.length > 2 && string.startsWith("\n") && string.endsWith("\n") ? string.slice(1, -1) : string;
1522
+ }
1523
+ const escapeRegex = true;
1524
+ const printFunctionName = false;
1525
+ function serialize(val, indent = 2, formatOverrides = {}) {
1526
+ return normalizeNewlines(
1527
+ index.format(val, {
1528
+ escapeRegex,
1529
+ indent,
1530
+ plugins: getSerializers(),
1531
+ printFunctionName,
1532
+ ...formatOverrides
1533
+ })
1534
+ );
1535
+ }
1536
+ function escapeBacktickString(str) {
1537
+ return str.replace(/`|\\|\$\{/g, "\\$&");
1538
+ }
1539
+ function printBacktickString(str) {
1540
+ return `\`${escapeBacktickString(str)}\``;
1541
+ }
1542
+ function normalizeNewlines(string) {
1543
+ return string.replace(/\r\n|\r/g, "\n");
1544
+ }
1545
+ async function saveSnapshotFile(environment, snapshotData, snapshotPath) {
1546
+ const snapshots = Object.keys(snapshotData).sort(naturalCompare).map(
1547
+ (key) => `exports[${printBacktickString(key)}] = ${printBacktickString(
1548
+ normalizeNewlines(snapshotData[key])
1549
+ )};`
1550
+ );
1551
+ const content = `${environment.getHeader()}
1552
+
1553
+ ${snapshots.join("\n\n")}
1554
+ `;
1555
+ const oldContent = await environment.readSnapshotFile(snapshotPath);
1556
+ const skipWriting = oldContent != null && oldContent === content;
1557
+ if (skipWriting) {
1558
+ return;
1559
+ }
1560
+ await environment.saveSnapshotFile(snapshotPath, content);
1561
+ }
1562
+ function prepareExpected(expected) {
1563
+ function findStartIndent() {
1564
+ var _a, _b;
1565
+ const matchObject = /^( +)\}\s+$/m.exec(expected || "");
1566
+ const objectIndent = (_a = matchObject == null ? void 0 : matchObject[1]) == null ? void 0 : _a.length;
1567
+ if (objectIndent) {
1568
+ return objectIndent;
1569
+ }
1570
+ const matchText = /^\n( +)"/.exec(expected || "");
1571
+ return ((_b = matchText == null ? void 0 : matchText[1]) == null ? void 0 : _b.length) || 0;
1572
+ }
1573
+ const startIndent = findStartIndent();
1574
+ let expectedTrimmed = expected == null ? void 0 : expected.trim();
1575
+ if (startIndent) {
1576
+ expectedTrimmed = expectedTrimmed == null ? void 0 : expectedTrimmed.replace(new RegExp(`^${" ".repeat(startIndent)}`, "gm"), "").replace(/ +\}$/, "}");
1577
+ }
1578
+ return expectedTrimmed;
1579
+ }
1580
+ function deepMergeArray(target = [], source = []) {
1581
+ const mergedOutput = Array.from(target);
1582
+ source.forEach((sourceElement, index2) => {
1583
+ const targetElement = mergedOutput[index2];
1584
+ if (Array.isArray(target[index2])) {
1585
+ mergedOutput[index2] = deepMergeArray(target[index2], sourceElement);
1586
+ } else if (isObject(targetElement)) {
1587
+ mergedOutput[index2] = deepMergeSnapshot(target[index2], sourceElement);
1588
+ } else {
1589
+ mergedOutput[index2] = sourceElement;
1590
+ }
1591
+ });
1592
+ return mergedOutput;
1593
+ }
1594
+ function deepMergeSnapshot(target, source) {
1595
+ if (isObject(target) && isObject(source)) {
1596
+ const mergedOutput = { ...target };
1597
+ Object.keys(source).forEach((key) => {
1598
+ if (isObject(source[key]) && !source[key].$$typeof) {
1599
+ if (!(key in target)) {
1600
+ Object.assign(mergedOutput, { [key]: source[key] });
1601
+ } else {
1602
+ mergedOutput[key] = deepMergeSnapshot(target[key], source[key]);
1603
+ }
1604
+ } else if (Array.isArray(source[key])) {
1605
+ mergedOutput[key] = deepMergeArray(target[key], source[key]);
1606
+ } else {
1607
+ Object.assign(mergedOutput, { [key]: source[key] });
1608
+ }
1609
+ });
1610
+ return mergedOutput;
1611
+ } else if (Array.isArray(target) && Array.isArray(source)) {
1612
+ return deepMergeArray(target, source);
1613
+ }
1614
+ return target;
1615
+ }
1213
1616
  class SnapshotState {
1214
1617
  constructor(testFilePath, snapshotPath, snapshotContent, options) {
1215
1618
  __publicField(this, "_counters");