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