@noma.to/qwik-testing-library 1.3.1 → 1.4.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 (97) hide show
  1. package/README.md +18 -5
  2. package/lib/index.qwik.cjs +0 -4
  3. package/lib/index.qwik.mjs +0 -4
  4. package/lib/lib/qwik-testing-library.qwik.cjs +18 -6
  5. package/lib/lib/qwik-testing-library.qwik.mjs +18 -6
  6. package/lib-types/lib/qwik-testing-library.d.ts +1 -2
  7. package/package.json +9 -9
  8. package/lib/lib/mock.qwik.cjs +0 -14
  9. package/lib/lib/mock.qwik.mjs +0 -14
  10. package/lib/lib/qwikloader.qwik.cjs +0 -252
  11. package/lib/lib/qwikloader.qwik.mjs +0 -252
  12. package/lib/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.qwik.cjs +0 -89
  13. package/lib/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.qwik.mjs +0 -89
  14. package/lib/node_modules/.pnpm/@vitest_expect@3.0.5/node_modules/@vitest/expect/dist/index.qwik.cjs +0 -2191
  15. package/lib/node_modules/.pnpm/@vitest_expect@3.0.5/node_modules/@vitest/expect/dist/index.qwik.mjs +0 -2191
  16. package/lib/node_modules/.pnpm/@vitest_pretty-format@3.0.5/node_modules/@vitest/pretty-format/dist/index.qwik.cjs +0 -1499
  17. package/lib/node_modules/.pnpm/@vitest_pretty-format@3.0.5/node_modules/@vitest/pretty-format/dist/index.qwik.mjs +0 -1499
  18. package/lib/node_modules/.pnpm/@vitest_runner@3.0.5/node_modules/@vitest/runner/dist/chunk-tasks.qwik.cjs +0 -44
  19. package/lib/node_modules/.pnpm/@vitest_runner@3.0.5/node_modules/@vitest/runner/dist/chunk-tasks.qwik.mjs +0 -44
  20. package/lib/node_modules/.pnpm/@vitest_runner@3.0.5/node_modules/@vitest/runner/dist/index.qwik.cjs +0 -757
  21. package/lib/node_modules/.pnpm/@vitest_runner@3.0.5/node_modules/@vitest/runner/dist/index.qwik.mjs +0 -757
  22. package/lib/node_modules/.pnpm/@vitest_snapshot@3.0.5/node_modules/@vitest/snapshot/dist/index.qwik.cjs +0 -2079
  23. package/lib/node_modules/.pnpm/@vitest_snapshot@3.0.5/node_modules/@vitest/snapshot/dist/index.qwik.mjs +0 -2079
  24. package/lib/node_modules/.pnpm/@vitest_spy@3.0.5/node_modules/@vitest/spy/dist/index.qwik.cjs +0 -165
  25. package/lib/node_modules/.pnpm/@vitest_spy@3.0.5/node_modules/@vitest/spy/dist/index.qwik.mjs +0 -165
  26. package/lib/node_modules/.pnpm/@vitest_utils@3.0.5/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.qwik.cjs +0 -162
  27. package/lib/node_modules/.pnpm/@vitest_utils@3.0.5/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.qwik.mjs +0 -162
  28. package/lib/node_modules/.pnpm/@vitest_utils@3.0.5/node_modules/@vitest/utils/dist/diff.qwik.cjs +0 -1755
  29. package/lib/node_modules/.pnpm/@vitest_utils@3.0.5/node_modules/@vitest/utils/dist/diff.qwik.mjs +0 -1755
  30. package/lib/node_modules/.pnpm/@vitest_utils@3.0.5/node_modules/@vitest/utils/dist/error.qwik.cjs +0 -137
  31. package/lib/node_modules/.pnpm/@vitest_utils@3.0.5/node_modules/@vitest/utils/dist/error.qwik.mjs +0 -137
  32. package/lib/node_modules/.pnpm/@vitest_utils@3.0.5/node_modules/@vitest/utils/dist/helpers.qwik.cjs +0 -150
  33. package/lib/node_modules/.pnpm/@vitest_utils@3.0.5/node_modules/@vitest/utils/dist/helpers.qwik.mjs +0 -150
  34. package/lib/node_modules/.pnpm/@vitest_utils@3.0.5/node_modules/@vitest/utils/dist/index.qwik.cjs +0 -474
  35. package/lib/node_modules/.pnpm/@vitest_utils@3.0.5/node_modules/@vitest/utils/dist/index.qwik.mjs +0 -474
  36. package/lib/node_modules/.pnpm/@vitest_utils@3.0.5/node_modules/@vitest/utils/dist/source-map.qwik.cjs +0 -216
  37. package/lib/node_modules/.pnpm/@vitest_utils@3.0.5/node_modules/@vitest/utils/dist/source-map.qwik.mjs +0 -216
  38. package/lib/node_modules/.pnpm/chai@5.1.2/node_modules/chai/chai.qwik.cjs +0 -3937
  39. package/lib/node_modules/.pnpm/chai@5.1.2/node_modules/chai/chai.qwik.mjs +0 -3937
  40. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/arguments.qwik.cjs +0 -9
  41. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/arguments.qwik.mjs +0 -10
  42. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/array.qwik.cjs +0 -16
  43. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/array.qwik.mjs +0 -17
  44. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/bigint.qwik.cjs +0 -9
  45. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/bigint.qwik.mjs +0 -10
  46. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/class.qwik.cjs +0 -16
  47. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/class.qwik.mjs +0 -17
  48. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/date.qwik.cjs +0 -12
  49. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/date.qwik.mjs +0 -13
  50. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/error.qwik.cjs +0 -36
  51. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/error.qwik.mjs +0 -37
  52. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/function.qwik.cjs +0 -11
  53. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/function.qwik.mjs +0 -12
  54. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/helpers.qwik.cjs +0 -160
  55. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/helpers.qwik.mjs +0 -160
  56. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/html.qwik.cjs +0 -36
  57. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/html.qwik.mjs +0 -36
  58. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/index.qwik.cjs +0 -130
  59. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/index.qwik.mjs +0 -130
  60. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/map.qwik.cjs +0 -23
  61. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/map.qwik.mjs +0 -24
  62. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/number.qwik.cjs +0 -19
  63. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/number.qwik.mjs +0 -20
  64. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/object.qwik.cjs +0 -24
  65. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/object.qwik.mjs +0 -25
  66. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/promise.qwik.cjs +0 -17
  67. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/promise.qwik.mjs +0 -18
  68. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/regexp.qwik.cjs +0 -9
  69. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/regexp.qwik.mjs +0 -10
  70. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/set.qwik.cjs +0 -16
  71. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/set.qwik.mjs +0 -17
  72. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/string.qwik.cjs +0 -23
  73. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/string.qwik.mjs +0 -24
  74. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/symbol.qwik.cjs +0 -8
  75. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/symbol.qwik.mjs +0 -9
  76. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/typedarray.qwik.cjs +0 -34
  77. package/lib/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/typedarray.qwik.mjs +0 -35
  78. package/lib/node_modules/.pnpm/magic-string@0.30.17/node_modules/magic-string/dist/magic-string.es.qwik.cjs +0 -979
  79. package/lib/node_modules/.pnpm/magic-string@0.30.17/node_modules/magic-string/dist/magic-string.es.qwik.mjs +0 -979
  80. package/lib/node_modules/.pnpm/pathe@2.0.2/node_modules/pathe/dist/shared/pathe.UZ-hd4nF.qwik.cjs +0 -101
  81. package/lib/node_modules/.pnpm/pathe@2.0.2/node_modules/pathe/dist/shared/pathe.UZ-hd4nF.qwik.mjs +0 -101
  82. package/lib/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/browser.qwik.cjs +0 -4
  83. package/lib/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/browser.qwik.mjs +0 -5
  84. package/lib/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.qwik.cjs +0 -80
  85. package/lib/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.qwik.mjs +0 -80
  86. package/lib/node_modules/.pnpm/tinyspy@3.0.2/node_modules/tinyspy/dist/index.qwik.cjs +0 -104
  87. package/lib/node_modules/.pnpm/tinyspy@3.0.2/node_modules/tinyspy/dist/index.qwik.mjs +0 -104
  88. package/lib/node_modules/.pnpm/vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.qwik.cjs +0 -8
  89. package/lib/node_modules/.pnpm/vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.qwik.mjs +0 -8
  90. package/lib/node_modules/.pnpm/vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0/node_modules/vitest/dist/chunks/date.W2xKR2qe.qwik.cjs +0 -56
  91. package/lib/node_modules/.pnpm/vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0/node_modules/vitest/dist/chunks/date.W2xKR2qe.qwik.mjs +0 -56
  92. package/lib/node_modules/.pnpm/vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0/node_modules/vitest/dist/chunks/utils.C8RiOc4B.qwik.cjs +0 -66
  93. package/lib/node_modules/.pnpm/vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0/node_modules/vitest/dist/chunks/utils.C8RiOc4B.qwik.mjs +0 -66
  94. package/lib/node_modules/.pnpm/vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0/node_modules/vitest/dist/chunks/vi.CjhMlMwf.qwik.cjs +0 -2977
  95. package/lib/node_modules/.pnpm/vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0/node_modules/vitest/dist/chunks/vi.CjhMlMwf.qwik.mjs +0 -2977
  96. package/lib-types/lib/mock.d.ts +0 -34
  97. package/lib-types/lib/qwikloader.d.ts +0 -1
@@ -1,1499 +0,0 @@
1
- import s from "../../../../../tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/browser.qwik.mjs";
2
- function _mergeNamespaces(n, m) {
3
- m.forEach(function(e) {
4
- e && typeof e !== "string" && !Array.isArray(e) && Object.keys(e).forEach(function(k) {
5
- if (k !== "default" && !(k in n)) {
6
- var d = Object.getOwnPropertyDescriptor(e, k);
7
- Object.defineProperty(n, k, d.get ? d : {
8
- enumerable: true,
9
- get: function() {
10
- return e[k];
11
- }
12
- });
13
- }
14
- });
15
- });
16
- return Object.freeze(n);
17
- }
18
- function getKeysOfEnumerableProperties(object, compareKeys) {
19
- const rawKeys = Object.keys(object);
20
- const keys = compareKeys === null ? rawKeys : rawKeys.sort(compareKeys);
21
- if (Object.getOwnPropertySymbols) {
22
- for (const symbol of Object.getOwnPropertySymbols(object)) {
23
- if (Object.getOwnPropertyDescriptor(object, symbol).enumerable) {
24
- keys.push(symbol);
25
- }
26
- }
27
- }
28
- return keys;
29
- }
30
- function printIteratorEntries(iterator, config, indentation, depth, refs, printer2, separator = ": ") {
31
- let result = "";
32
- let width = 0;
33
- let current = iterator.next();
34
- if (!current.done) {
35
- result += config.spacingOuter;
36
- const indentationNext = indentation + config.indent;
37
- while (!current.done) {
38
- result += indentationNext;
39
- if (width++ === config.maxWidth) {
40
- result += "…";
41
- break;
42
- }
43
- const name = printer2(
44
- current.value[0],
45
- config,
46
- indentationNext,
47
- depth,
48
- refs
49
- );
50
- const value = printer2(
51
- current.value[1],
52
- config,
53
- indentationNext,
54
- depth,
55
- refs
56
- );
57
- result += name + separator + value;
58
- current = iterator.next();
59
- if (!current.done) {
60
- result += `,${config.spacingInner}`;
61
- } else if (!config.min) {
62
- result += ",";
63
- }
64
- }
65
- result += config.spacingOuter + indentation;
66
- }
67
- return result;
68
- }
69
- function printIteratorValues(iterator, config, indentation, depth, refs, printer2) {
70
- let result = "";
71
- let width = 0;
72
- let current = iterator.next();
73
- if (!current.done) {
74
- result += config.spacingOuter;
75
- const indentationNext = indentation + config.indent;
76
- while (!current.done) {
77
- result += indentationNext;
78
- if (width++ === config.maxWidth) {
79
- result += "…";
80
- break;
81
- }
82
- result += printer2(current.value, config, indentationNext, depth, refs);
83
- current = iterator.next();
84
- if (!current.done) {
85
- result += `,${config.spacingInner}`;
86
- } else if (!config.min) {
87
- result += ",";
88
- }
89
- }
90
- result += config.spacingOuter + indentation;
91
- }
92
- return result;
93
- }
94
- function printListItems(list, config, indentation, depth, refs, printer2) {
95
- let result = "";
96
- list = list instanceof ArrayBuffer ? new DataView(list) : list;
97
- const isDataView = (l) => l instanceof DataView;
98
- const length = isDataView(list) ? list.byteLength : list.length;
99
- if (length > 0) {
100
- result += config.spacingOuter;
101
- const indentationNext = indentation + config.indent;
102
- for (let i = 0; i < length; i++) {
103
- result += indentationNext;
104
- if (i === config.maxWidth) {
105
- result += "…";
106
- break;
107
- }
108
- if (isDataView(list) || i in list) {
109
- result += printer2(
110
- isDataView(list) ? list.getInt8(i) : list[i],
111
- config,
112
- indentationNext,
113
- depth,
114
- refs
115
- );
116
- }
117
- if (i < length - 1) {
118
- result += `,${config.spacingInner}`;
119
- } else if (!config.min) {
120
- result += ",";
121
- }
122
- }
123
- result += config.spacingOuter + indentation;
124
- }
125
- return result;
126
- }
127
- function printObjectProperties(val, config, indentation, depth, refs, printer2) {
128
- let result = "";
129
- const keys = getKeysOfEnumerableProperties(val, config.compareKeys);
130
- if (keys.length > 0) {
131
- result += config.spacingOuter;
132
- const indentationNext = indentation + config.indent;
133
- for (let i = 0; i < keys.length; i++) {
134
- const key = keys[i];
135
- const name = printer2(key, config, indentationNext, depth, refs);
136
- const value = printer2(val[key], config, indentationNext, depth, refs);
137
- result += `${indentationNext + name}: ${value}`;
138
- if (i < keys.length - 1) {
139
- result += `,${config.spacingInner}`;
140
- } else if (!config.min) {
141
- result += ",";
142
- }
143
- }
144
- result += config.spacingOuter + indentation;
145
- }
146
- return result;
147
- }
148
- const asymmetricMatcher = typeof Symbol === "function" && Symbol.for ? Symbol.for("jest.asymmetricMatcher") : 1267621;
149
- const SPACE$2 = " ";
150
- const serialize$5 = (val, config, indentation, depth, refs, printer2) => {
151
- const stringedValue = val.toString();
152
- if (stringedValue === "ArrayContaining" || stringedValue === "ArrayNotContaining") {
153
- if (++depth > config.maxDepth) {
154
- return `[${stringedValue}]`;
155
- }
156
- return `${stringedValue + SPACE$2}[${printListItems(
157
- val.sample,
158
- config,
159
- indentation,
160
- depth,
161
- refs,
162
- printer2
163
- )}]`;
164
- }
165
- if (stringedValue === "ObjectContaining" || stringedValue === "ObjectNotContaining") {
166
- if (++depth > config.maxDepth) {
167
- return `[${stringedValue}]`;
168
- }
169
- return `${stringedValue + SPACE$2}{${printObjectProperties(
170
- val.sample,
171
- config,
172
- indentation,
173
- depth,
174
- refs,
175
- printer2
176
- )}}`;
177
- }
178
- if (stringedValue === "StringMatching" || stringedValue === "StringNotMatching") {
179
- return stringedValue + SPACE$2 + printer2(val.sample, config, indentation, depth, refs);
180
- }
181
- if (stringedValue === "StringContaining" || stringedValue === "StringNotContaining") {
182
- return stringedValue + SPACE$2 + printer2(val.sample, config, indentation, depth, refs);
183
- }
184
- if (typeof val.toAsymmetricMatcher !== "function") {
185
- throw new TypeError(
186
- `Asymmetric matcher ${val.constructor.name} does not implement toAsymmetricMatcher()`
187
- );
188
- }
189
- return val.toAsymmetricMatcher();
190
- };
191
- const test$5 = (val) => val && val.$$typeof === asymmetricMatcher;
192
- const plugin$5 = { serialize: serialize$5, test: test$5 };
193
- const SPACE$1 = " ";
194
- const OBJECT_NAMES = /* @__PURE__ */ new Set(["DOMStringMap", "NamedNodeMap"]);
195
- const ARRAY_REGEXP = /^(?:HTML\w*Collection|NodeList)$/;
196
- function testName(name) {
197
- return OBJECT_NAMES.has(name) || ARRAY_REGEXP.test(name);
198
- }
199
- const test$4 = (val) => val && val.constructor && !!val.constructor.name && testName(val.constructor.name);
200
- function isNamedNodeMap(collection) {
201
- return collection.constructor.name === "NamedNodeMap";
202
- }
203
- const serialize$4 = (collection, config, indentation, depth, refs, printer2) => {
204
- const name = collection.constructor.name;
205
- if (++depth > config.maxDepth) {
206
- return `[${name}]`;
207
- }
208
- return (config.min ? "" : name + SPACE$1) + (OBJECT_NAMES.has(name) ? `{${printObjectProperties(
209
- isNamedNodeMap(collection) ? [...collection].reduce(
210
- (props, attribute) => {
211
- props[attribute.name] = attribute.value;
212
- return props;
213
- },
214
- {}
215
- ) : { ...collection },
216
- config,
217
- indentation,
218
- depth,
219
- refs,
220
- printer2
221
- )}}` : `[${printListItems(
222
- [...collection],
223
- config,
224
- indentation,
225
- depth,
226
- refs,
227
- printer2
228
- )}]`);
229
- };
230
- const plugin$4 = { serialize: serialize$4, test: test$4 };
231
- function escapeHTML(str) {
232
- return str.replaceAll("<", "&lt;").replaceAll(">", "&gt;");
233
- }
234
- function printProps(keys, props, config, indentation, depth, refs, printer2) {
235
- const indentationNext = indentation + config.indent;
236
- const colors = config.colors;
237
- return keys.map((key) => {
238
- const value = props[key];
239
- let printed = printer2(value, config, indentationNext, depth, refs);
240
- if (typeof value !== "string") {
241
- if (printed.includes("\n")) {
242
- printed = config.spacingOuter + indentationNext + printed + config.spacingOuter + indentation;
243
- }
244
- printed = `{${printed}}`;
245
- }
246
- return `${config.spacingInner + indentation + colors.prop.open + key + colors.prop.close}=${colors.value.open}${printed}${colors.value.close}`;
247
- }).join("");
248
- }
249
- function printChildren(children, config, indentation, depth, refs, printer2) {
250
- return children.map(
251
- (child) => config.spacingOuter + indentation + (typeof child === "string" ? printText(child, config) : printer2(child, config, indentation, depth, refs))
252
- ).join("");
253
- }
254
- function printText(text, config) {
255
- const contentColor = config.colors.content;
256
- return contentColor.open + escapeHTML(text) + contentColor.close;
257
- }
258
- function printComment(comment, config) {
259
- const commentColor = config.colors.comment;
260
- return `${commentColor.open}<!--${escapeHTML(comment)}-->${commentColor.close}`;
261
- }
262
- function printElement(type, printedProps, printedChildren, config, indentation) {
263
- const tagColor = config.colors.tag;
264
- return `${tagColor.open}<${type}${printedProps && tagColor.close + printedProps + config.spacingOuter + indentation + tagColor.open}${printedChildren ? `>${tagColor.close}${printedChildren}${config.spacingOuter}${indentation}${tagColor.open}</${type}` : `${printedProps && !config.min ? "" : " "}/`}>${tagColor.close}`;
265
- }
266
- function printElementAsLeaf(type, config) {
267
- const tagColor = config.colors.tag;
268
- return `${tagColor.open}<${type}${tagColor.close} …${tagColor.open} />${tagColor.close}`;
269
- }
270
- const ELEMENT_NODE = 1;
271
- const TEXT_NODE = 3;
272
- const COMMENT_NODE = 8;
273
- const FRAGMENT_NODE = 11;
274
- const ELEMENT_REGEXP = /^(?:(?:HTML|SVG)\w*)?Element$/;
275
- function testHasAttribute(val) {
276
- try {
277
- return typeof val.hasAttribute === "function" && val.hasAttribute("is");
278
- } catch {
279
- return false;
280
- }
281
- }
282
- function testNode(val) {
283
- const constructorName = val.constructor.name;
284
- const { nodeType, tagName } = val;
285
- const isCustomElement = typeof tagName === "string" && tagName.includes("-") || testHasAttribute(val);
286
- return nodeType === ELEMENT_NODE && (ELEMENT_REGEXP.test(constructorName) || isCustomElement) || nodeType === TEXT_NODE && constructorName === "Text" || nodeType === COMMENT_NODE && constructorName === "Comment" || nodeType === FRAGMENT_NODE && constructorName === "DocumentFragment";
287
- }
288
- const test$3 = (val) => {
289
- var _a;
290
- return ((_a = val == null ? void 0 : val.constructor) == null ? void 0 : _a.name) && testNode(val);
291
- };
292
- function nodeIsText(node) {
293
- return node.nodeType === TEXT_NODE;
294
- }
295
- function nodeIsComment(node) {
296
- return node.nodeType === COMMENT_NODE;
297
- }
298
- function nodeIsFragment(node) {
299
- return node.nodeType === FRAGMENT_NODE;
300
- }
301
- const serialize$3 = (node, config, indentation, depth, refs, printer2) => {
302
- if (nodeIsText(node)) {
303
- return printText(node.data, config);
304
- }
305
- if (nodeIsComment(node)) {
306
- return printComment(node.data, config);
307
- }
308
- const type = nodeIsFragment(node) ? "DocumentFragment" : node.tagName.toLowerCase();
309
- if (++depth > config.maxDepth) {
310
- return printElementAsLeaf(type, config);
311
- }
312
- return printElement(
313
- type,
314
- printProps(
315
- nodeIsFragment(node) ? [] : Array.from(node.attributes, (attr) => attr.name).sort(),
316
- nodeIsFragment(node) ? {} : [...node.attributes].reduce(
317
- (props, attribute) => {
318
- props[attribute.name] = attribute.value;
319
- return props;
320
- },
321
- {}
322
- ),
323
- config,
324
- indentation + config.indent,
325
- depth,
326
- refs,
327
- printer2
328
- ),
329
- printChildren(
330
- Array.prototype.slice.call(node.childNodes || node.children),
331
- config,
332
- indentation + config.indent,
333
- depth,
334
- refs,
335
- printer2
336
- ),
337
- config,
338
- indentation
339
- );
340
- };
341
- const plugin$3 = { serialize: serialize$3, test: test$3 };
342
- const IS_ITERABLE_SENTINEL = "@@__IMMUTABLE_ITERABLE__@@";
343
- const IS_LIST_SENTINEL = "@@__IMMUTABLE_LIST__@@";
344
- const IS_KEYED_SENTINEL = "@@__IMMUTABLE_KEYED__@@";
345
- const IS_MAP_SENTINEL = "@@__IMMUTABLE_MAP__@@";
346
- const IS_ORDERED_SENTINEL = "@@__IMMUTABLE_ORDERED__@@";
347
- const IS_RECORD_SENTINEL = "@@__IMMUTABLE_RECORD__@@";
348
- const IS_SEQ_SENTINEL = "@@__IMMUTABLE_SEQ__@@";
349
- const IS_SET_SENTINEL = "@@__IMMUTABLE_SET__@@";
350
- const IS_STACK_SENTINEL = "@@__IMMUTABLE_STACK__@@";
351
- const getImmutableName = (name) => `Immutable.${name}`;
352
- const printAsLeaf = (name) => `[${name}]`;
353
- const SPACE = " ";
354
- const LAZY = "…";
355
- function printImmutableEntries(val, config, indentation, depth, refs, printer2, type) {
356
- return ++depth > config.maxDepth ? printAsLeaf(getImmutableName(type)) : `${getImmutableName(type) + SPACE}{${printIteratorEntries(
357
- val.entries(),
358
- config,
359
- indentation,
360
- depth,
361
- refs,
362
- printer2
363
- )}}`;
364
- }
365
- function getRecordEntries(val) {
366
- let i = 0;
367
- return {
368
- next() {
369
- if (i < val._keys.length) {
370
- const key = val._keys[i++];
371
- return { done: false, value: [key, val.get(key)] };
372
- }
373
- return { done: true, value: void 0 };
374
- }
375
- };
376
- }
377
- function printImmutableRecord(val, config, indentation, depth, refs, printer2) {
378
- const name = getImmutableName(val._name || "Record");
379
- return ++depth > config.maxDepth ? printAsLeaf(name) : `${name + SPACE}{${printIteratorEntries(
380
- getRecordEntries(val),
381
- config,
382
- indentation,
383
- depth,
384
- refs,
385
- printer2
386
- )}}`;
387
- }
388
- function printImmutableSeq(val, config, indentation, depth, refs, printer2) {
389
- const name = getImmutableName("Seq");
390
- if (++depth > config.maxDepth) {
391
- return printAsLeaf(name);
392
- }
393
- if (val[IS_KEYED_SENTINEL]) {
394
- return `${name + SPACE}{${// from Immutable collection of entries or from ECMAScript object
395
- val._iter || val._object ? printIteratorEntries(
396
- val.entries(),
397
- config,
398
- indentation,
399
- depth,
400
- refs,
401
- printer2
402
- ) : LAZY}}`;
403
- }
404
- return `${name + SPACE}[${val._iter || val._array || val._collection || val._iterable ? printIteratorValues(
405
- val.values(),
406
- config,
407
- indentation,
408
- depth,
409
- refs,
410
- printer2
411
- ) : LAZY}]`;
412
- }
413
- function printImmutableValues(val, config, indentation, depth, refs, printer2, type) {
414
- return ++depth > config.maxDepth ? printAsLeaf(getImmutableName(type)) : `${getImmutableName(type) + SPACE}[${printIteratorValues(
415
- val.values(),
416
- config,
417
- indentation,
418
- depth,
419
- refs,
420
- printer2
421
- )}]`;
422
- }
423
- const serialize$2 = (val, config, indentation, depth, refs, printer2) => {
424
- if (val[IS_MAP_SENTINEL]) {
425
- return printImmutableEntries(
426
- val,
427
- config,
428
- indentation,
429
- depth,
430
- refs,
431
- printer2,
432
- val[IS_ORDERED_SENTINEL] ? "OrderedMap" : "Map"
433
- );
434
- }
435
- if (val[IS_LIST_SENTINEL]) {
436
- return printImmutableValues(
437
- val,
438
- config,
439
- indentation,
440
- depth,
441
- refs,
442
- printer2,
443
- "List"
444
- );
445
- }
446
- if (val[IS_SET_SENTINEL]) {
447
- return printImmutableValues(
448
- val,
449
- config,
450
- indentation,
451
- depth,
452
- refs,
453
- printer2,
454
- val[IS_ORDERED_SENTINEL] ? "OrderedSet" : "Set"
455
- );
456
- }
457
- if (val[IS_STACK_SENTINEL]) {
458
- return printImmutableValues(
459
- val,
460
- config,
461
- indentation,
462
- depth,
463
- refs,
464
- printer2,
465
- "Stack"
466
- );
467
- }
468
- if (val[IS_SEQ_SENTINEL]) {
469
- return printImmutableSeq(val, config, indentation, depth, refs, printer2);
470
- }
471
- return printImmutableRecord(val, config, indentation, depth, refs, printer2);
472
- };
473
- const test$2 = (val) => val && (val[IS_ITERABLE_SENTINEL] === true || val[IS_RECORD_SENTINEL] === true);
474
- const plugin$2 = { serialize: serialize$2, test: test$2 };
475
- function getDefaultExportFromCjs(x) {
476
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
477
- }
478
- var reactIs$1 = { exports: {} };
479
- var reactIs_production = {};
480
- /**
481
- * @license React
482
- * react-is.production.js
483
- *
484
- * Copyright (c) Meta Platforms, Inc. and affiliates.
485
- *
486
- * This source code is licensed under the MIT license found in the
487
- * LICENSE file in the root directory of this source tree.
488
- */
489
- var hasRequiredReactIs_production;
490
- function requireReactIs_production() {
491
- if (hasRequiredReactIs_production) return reactIs_production;
492
- hasRequiredReactIs_production = 1;
493
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler");
494
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
495
- function typeOf(object) {
496
- if ("object" === typeof object && null !== object) {
497
- var $$typeof = object.$$typeof;
498
- switch ($$typeof) {
499
- case REACT_ELEMENT_TYPE:
500
- switch (object = object.type, object) {
501
- case REACT_FRAGMENT_TYPE:
502
- case REACT_PROFILER_TYPE:
503
- case REACT_STRICT_MODE_TYPE:
504
- case REACT_SUSPENSE_TYPE:
505
- case REACT_SUSPENSE_LIST_TYPE:
506
- return object;
507
- default:
508
- switch (object = object && object.$$typeof, object) {
509
- case REACT_CONTEXT_TYPE:
510
- case REACT_FORWARD_REF_TYPE:
511
- case REACT_LAZY_TYPE:
512
- case REACT_MEMO_TYPE:
513
- return object;
514
- case REACT_CONSUMER_TYPE:
515
- return object;
516
- default:
517
- return $$typeof;
518
- }
519
- }
520
- case REACT_PORTAL_TYPE:
521
- return $$typeof;
522
- }
523
- }
524
- }
525
- reactIs_production.ContextConsumer = REACT_CONSUMER_TYPE;
526
- reactIs_production.ContextProvider = REACT_CONTEXT_TYPE;
527
- reactIs_production.Element = REACT_ELEMENT_TYPE;
528
- reactIs_production.ForwardRef = REACT_FORWARD_REF_TYPE;
529
- reactIs_production.Fragment = REACT_FRAGMENT_TYPE;
530
- reactIs_production.Lazy = REACT_LAZY_TYPE;
531
- reactIs_production.Memo = REACT_MEMO_TYPE;
532
- reactIs_production.Portal = REACT_PORTAL_TYPE;
533
- reactIs_production.Profiler = REACT_PROFILER_TYPE;
534
- reactIs_production.StrictMode = REACT_STRICT_MODE_TYPE;
535
- reactIs_production.Suspense = REACT_SUSPENSE_TYPE;
536
- reactIs_production.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
537
- reactIs_production.isContextConsumer = function(object) {
538
- return typeOf(object) === REACT_CONSUMER_TYPE;
539
- };
540
- reactIs_production.isContextProvider = function(object) {
541
- return typeOf(object) === REACT_CONTEXT_TYPE;
542
- };
543
- reactIs_production.isElement = function(object) {
544
- return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
545
- };
546
- reactIs_production.isForwardRef = function(object) {
547
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
548
- };
549
- reactIs_production.isFragment = function(object) {
550
- return typeOf(object) === REACT_FRAGMENT_TYPE;
551
- };
552
- reactIs_production.isLazy = function(object) {
553
- return typeOf(object) === REACT_LAZY_TYPE;
554
- };
555
- reactIs_production.isMemo = function(object) {
556
- return typeOf(object) === REACT_MEMO_TYPE;
557
- };
558
- reactIs_production.isPortal = function(object) {
559
- return typeOf(object) === REACT_PORTAL_TYPE;
560
- };
561
- reactIs_production.isProfiler = function(object) {
562
- return typeOf(object) === REACT_PROFILER_TYPE;
563
- };
564
- reactIs_production.isStrictMode = function(object) {
565
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
566
- };
567
- reactIs_production.isSuspense = function(object) {
568
- return typeOf(object) === REACT_SUSPENSE_TYPE;
569
- };
570
- reactIs_production.isSuspenseList = function(object) {
571
- return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
572
- };
573
- reactIs_production.isValidElementType = function(type) {
574
- return "string" === typeof type || "function" === typeof type || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_OFFSCREEN_TYPE || "object" === typeof type && null !== type && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_CLIENT_REFERENCE || void 0 !== type.getModuleId) ? true : false;
575
- };
576
- reactIs_production.typeOf = typeOf;
577
- return reactIs_production;
578
- }
579
- var reactIs_development$1 = {};
580
- /**
581
- * @license React
582
- * react-is.development.js
583
- *
584
- * Copyright (c) Meta Platforms, Inc. and affiliates.
585
- *
586
- * This source code is licensed under the MIT license found in the
587
- * LICENSE file in the root directory of this source tree.
588
- */
589
- var hasRequiredReactIs_development$1;
590
- function requireReactIs_development$1() {
591
- if (hasRequiredReactIs_development$1) return reactIs_development$1;
592
- hasRequiredReactIs_development$1 = 1;
593
- "production" !== process.env.NODE_ENV && function() {
594
- function typeOf(object) {
595
- if ("object" === typeof object && null !== object) {
596
- var $$typeof = object.$$typeof;
597
- switch ($$typeof) {
598
- case REACT_ELEMENT_TYPE:
599
- switch (object = object.type, object) {
600
- case REACT_FRAGMENT_TYPE:
601
- case REACT_PROFILER_TYPE:
602
- case REACT_STRICT_MODE_TYPE:
603
- case REACT_SUSPENSE_TYPE:
604
- case REACT_SUSPENSE_LIST_TYPE:
605
- return object;
606
- default:
607
- switch (object = object && object.$$typeof, object) {
608
- case REACT_CONTEXT_TYPE:
609
- case REACT_FORWARD_REF_TYPE:
610
- case REACT_LAZY_TYPE:
611
- case REACT_MEMO_TYPE:
612
- return object;
613
- case REACT_CONSUMER_TYPE:
614
- return object;
615
- default:
616
- return $$typeof;
617
- }
618
- }
619
- case REACT_PORTAL_TYPE:
620
- return $$typeof;
621
- }
622
- }
623
- }
624
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler");
625
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
626
- reactIs_development$1.ContextConsumer = REACT_CONSUMER_TYPE;
627
- reactIs_development$1.ContextProvider = REACT_CONTEXT_TYPE;
628
- reactIs_development$1.Element = REACT_ELEMENT_TYPE;
629
- reactIs_development$1.ForwardRef = REACT_FORWARD_REF_TYPE;
630
- reactIs_development$1.Fragment = REACT_FRAGMENT_TYPE;
631
- reactIs_development$1.Lazy = REACT_LAZY_TYPE;
632
- reactIs_development$1.Memo = REACT_MEMO_TYPE;
633
- reactIs_development$1.Portal = REACT_PORTAL_TYPE;
634
- reactIs_development$1.Profiler = REACT_PROFILER_TYPE;
635
- reactIs_development$1.StrictMode = REACT_STRICT_MODE_TYPE;
636
- reactIs_development$1.Suspense = REACT_SUSPENSE_TYPE;
637
- reactIs_development$1.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
638
- reactIs_development$1.isContextConsumer = function(object) {
639
- return typeOf(object) === REACT_CONSUMER_TYPE;
640
- };
641
- reactIs_development$1.isContextProvider = function(object) {
642
- return typeOf(object) === REACT_CONTEXT_TYPE;
643
- };
644
- reactIs_development$1.isElement = function(object) {
645
- return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
646
- };
647
- reactIs_development$1.isForwardRef = function(object) {
648
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
649
- };
650
- reactIs_development$1.isFragment = function(object) {
651
- return typeOf(object) === REACT_FRAGMENT_TYPE;
652
- };
653
- reactIs_development$1.isLazy = function(object) {
654
- return typeOf(object) === REACT_LAZY_TYPE;
655
- };
656
- reactIs_development$1.isMemo = function(object) {
657
- return typeOf(object) === REACT_MEMO_TYPE;
658
- };
659
- reactIs_development$1.isPortal = function(object) {
660
- return typeOf(object) === REACT_PORTAL_TYPE;
661
- };
662
- reactIs_development$1.isProfiler = function(object) {
663
- return typeOf(object) === REACT_PROFILER_TYPE;
664
- };
665
- reactIs_development$1.isStrictMode = function(object) {
666
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
667
- };
668
- reactIs_development$1.isSuspense = function(object) {
669
- return typeOf(object) === REACT_SUSPENSE_TYPE;
670
- };
671
- reactIs_development$1.isSuspenseList = function(object) {
672
- return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
673
- };
674
- reactIs_development$1.isValidElementType = function(type) {
675
- return "string" === typeof type || "function" === typeof type || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_OFFSCREEN_TYPE || "object" === typeof type && null !== type && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_CLIENT_REFERENCE || void 0 !== type.getModuleId) ? true : false;
676
- };
677
- reactIs_development$1.typeOf = typeOf;
678
- }();
679
- return reactIs_development$1;
680
- }
681
- var hasRequiredReactIs$1;
682
- function requireReactIs$1() {
683
- if (hasRequiredReactIs$1) return reactIs$1.exports;
684
- hasRequiredReactIs$1 = 1;
685
- if (process.env.NODE_ENV === "production") {
686
- reactIs$1.exports = requireReactIs_production();
687
- } else {
688
- reactIs$1.exports = requireReactIs_development$1();
689
- }
690
- return reactIs$1.exports;
691
- }
692
- var reactIsExports$1 = /* @__PURE__ */ requireReactIs$1();
693
- var index$1 = /* @__PURE__ */ getDefaultExportFromCjs(reactIsExports$1);
694
- var ReactIs19 = /* @__PURE__ */ _mergeNamespaces({
695
- __proto__: null,
696
- default: index$1
697
- }, [reactIsExports$1]);
698
- var reactIs = { exports: {} };
699
- var reactIs_production_min = {};
700
- /**
701
- * @license React
702
- * react-is.production.min.js
703
- *
704
- * Copyright (c) Facebook, Inc. and its affiliates.
705
- *
706
- * This source code is licensed under the MIT license found in the
707
- * LICENSE file in the root directory of this source tree.
708
- */
709
- var hasRequiredReactIs_production_min;
710
- function requireReactIs_production_min() {
711
- if (hasRequiredReactIs_production_min) return reactIs_production_min;
712
- hasRequiredReactIs_production_min = 1;
713
- var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), h = Symbol.for("react.context"), k = Symbol.for("react.server_context"), l = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), n = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), t = Symbol.for("react.offscreen"), u;
714
- u = Symbol.for("react.module.reference");
715
- function v(a) {
716
- if ("object" === typeof a && null !== a) {
717
- var r = a.$$typeof;
718
- switch (r) {
719
- case b:
720
- switch (a = a.type, a) {
721
- case d:
722
- case f:
723
- case e:
724
- case m:
725
- case n:
726
- return a;
727
- default:
728
- switch (a = a && a.$$typeof, a) {
729
- case k:
730
- case h:
731
- case l:
732
- case q:
733
- case p:
734
- case g:
735
- return a;
736
- default:
737
- return r;
738
- }
739
- }
740
- case c:
741
- return r;
742
- }
743
- }
744
- }
745
- reactIs_production_min.ContextConsumer = h;
746
- reactIs_production_min.ContextProvider = g;
747
- reactIs_production_min.Element = b;
748
- reactIs_production_min.ForwardRef = l;
749
- reactIs_production_min.Fragment = d;
750
- reactIs_production_min.Lazy = q;
751
- reactIs_production_min.Memo = p;
752
- reactIs_production_min.Portal = c;
753
- reactIs_production_min.Profiler = f;
754
- reactIs_production_min.StrictMode = e;
755
- reactIs_production_min.Suspense = m;
756
- reactIs_production_min.SuspenseList = n;
757
- reactIs_production_min.isAsyncMode = function() {
758
- return false;
759
- };
760
- reactIs_production_min.isConcurrentMode = function() {
761
- return false;
762
- };
763
- reactIs_production_min.isContextConsumer = function(a) {
764
- return v(a) === h;
765
- };
766
- reactIs_production_min.isContextProvider = function(a) {
767
- return v(a) === g;
768
- };
769
- reactIs_production_min.isElement = function(a) {
770
- return "object" === typeof a && null !== a && a.$$typeof === b;
771
- };
772
- reactIs_production_min.isForwardRef = function(a) {
773
- return v(a) === l;
774
- };
775
- reactIs_production_min.isFragment = function(a) {
776
- return v(a) === d;
777
- };
778
- reactIs_production_min.isLazy = function(a) {
779
- return v(a) === q;
780
- };
781
- reactIs_production_min.isMemo = function(a) {
782
- return v(a) === p;
783
- };
784
- reactIs_production_min.isPortal = function(a) {
785
- return v(a) === c;
786
- };
787
- reactIs_production_min.isProfiler = function(a) {
788
- return v(a) === f;
789
- };
790
- reactIs_production_min.isStrictMode = function(a) {
791
- return v(a) === e;
792
- };
793
- reactIs_production_min.isSuspense = function(a) {
794
- return v(a) === m;
795
- };
796
- reactIs_production_min.isSuspenseList = function(a) {
797
- return v(a) === n;
798
- };
799
- reactIs_production_min.isValidElementType = function(a) {
800
- return "string" === typeof a || "function" === typeof a || a === d || a === f || a === e || a === m || a === n || a === t || "object" === typeof a && null !== a && (a.$$typeof === q || a.$$typeof === p || a.$$typeof === g || a.$$typeof === h || a.$$typeof === l || a.$$typeof === u || void 0 !== a.getModuleId) ? true : false;
801
- };
802
- reactIs_production_min.typeOf = v;
803
- return reactIs_production_min;
804
- }
805
- var reactIs_development = {};
806
- /**
807
- * @license React
808
- * react-is.development.js
809
- *
810
- * Copyright (c) Facebook, Inc. and its affiliates.
811
- *
812
- * This source code is licensed under the MIT license found in the
813
- * LICENSE file in the root directory of this source tree.
814
- */
815
- var hasRequiredReactIs_development;
816
- function requireReactIs_development() {
817
- if (hasRequiredReactIs_development) return reactIs_development;
818
- hasRequiredReactIs_development = 1;
819
- if (process.env.NODE_ENV !== "production") {
820
- (function() {
821
- var REACT_ELEMENT_TYPE = Symbol.for("react.element");
822
- var REACT_PORTAL_TYPE = Symbol.for("react.portal");
823
- var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
824
- var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
825
- var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
826
- var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
827
- var REACT_CONTEXT_TYPE = Symbol.for("react.context");
828
- var REACT_SERVER_CONTEXT_TYPE = Symbol.for("react.server_context");
829
- var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
830
- var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
831
- var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
832
- var REACT_MEMO_TYPE = Symbol.for("react.memo");
833
- var REACT_LAZY_TYPE = Symbol.for("react.lazy");
834
- var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
835
- var enableScopeAPI = false;
836
- var enableCacheElement = false;
837
- var enableTransitionTracing = false;
838
- var enableLegacyHidden = false;
839
- var enableDebugTracing = false;
840
- var REACT_MODULE_REFERENCE;
841
- {
842
- REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
843
- }
844
- function isValidElementType(type) {
845
- if (typeof type === "string" || typeof type === "function") {
846
- return true;
847
- }
848
- if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
849
- return true;
850
- }
851
- if (typeof type === "object" && type !== null) {
852
- if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
853
- // types supported by any Flight configuration anywhere since
854
- // we don't know which Flight build this will end up being used
855
- // with.
856
- type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
857
- return true;
858
- }
859
- }
860
- return false;
861
- }
862
- function typeOf(object) {
863
- if (typeof object === "object" && object !== null) {
864
- var $$typeof = object.$$typeof;
865
- switch ($$typeof) {
866
- case REACT_ELEMENT_TYPE:
867
- var type = object.type;
868
- switch (type) {
869
- case REACT_FRAGMENT_TYPE:
870
- case REACT_PROFILER_TYPE:
871
- case REACT_STRICT_MODE_TYPE:
872
- case REACT_SUSPENSE_TYPE:
873
- case REACT_SUSPENSE_LIST_TYPE:
874
- return type;
875
- default:
876
- var $$typeofType = type && type.$$typeof;
877
- switch ($$typeofType) {
878
- case REACT_SERVER_CONTEXT_TYPE:
879
- case REACT_CONTEXT_TYPE:
880
- case REACT_FORWARD_REF_TYPE:
881
- case REACT_LAZY_TYPE:
882
- case REACT_MEMO_TYPE:
883
- case REACT_PROVIDER_TYPE:
884
- return $$typeofType;
885
- default:
886
- return $$typeof;
887
- }
888
- }
889
- case REACT_PORTAL_TYPE:
890
- return $$typeof;
891
- }
892
- }
893
- return void 0;
894
- }
895
- var ContextConsumer = REACT_CONTEXT_TYPE;
896
- var ContextProvider = REACT_PROVIDER_TYPE;
897
- var Element = REACT_ELEMENT_TYPE;
898
- var ForwardRef = REACT_FORWARD_REF_TYPE;
899
- var Fragment = REACT_FRAGMENT_TYPE;
900
- var Lazy = REACT_LAZY_TYPE;
901
- var Memo = REACT_MEMO_TYPE;
902
- var Portal = REACT_PORTAL_TYPE;
903
- var Profiler = REACT_PROFILER_TYPE;
904
- var StrictMode = REACT_STRICT_MODE_TYPE;
905
- var Suspense = REACT_SUSPENSE_TYPE;
906
- var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
907
- var hasWarnedAboutDeprecatedIsAsyncMode = false;
908
- var hasWarnedAboutDeprecatedIsConcurrentMode = false;
909
- function isAsyncMode(object) {
910
- {
911
- if (!hasWarnedAboutDeprecatedIsAsyncMode) {
912
- hasWarnedAboutDeprecatedIsAsyncMode = true;
913
- console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.");
914
- }
915
- }
916
- return false;
917
- }
918
- function isConcurrentMode(object) {
919
- {
920
- if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
921
- hasWarnedAboutDeprecatedIsConcurrentMode = true;
922
- console["warn"]("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.");
923
- }
924
- }
925
- return false;
926
- }
927
- function isContextConsumer(object) {
928
- return typeOf(object) === REACT_CONTEXT_TYPE;
929
- }
930
- function isContextProvider(object) {
931
- return typeOf(object) === REACT_PROVIDER_TYPE;
932
- }
933
- function isElement(object) {
934
- return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
935
- }
936
- function isForwardRef(object) {
937
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
938
- }
939
- function isFragment(object) {
940
- return typeOf(object) === REACT_FRAGMENT_TYPE;
941
- }
942
- function isLazy(object) {
943
- return typeOf(object) === REACT_LAZY_TYPE;
944
- }
945
- function isMemo(object) {
946
- return typeOf(object) === REACT_MEMO_TYPE;
947
- }
948
- function isPortal(object) {
949
- return typeOf(object) === REACT_PORTAL_TYPE;
950
- }
951
- function isProfiler(object) {
952
- return typeOf(object) === REACT_PROFILER_TYPE;
953
- }
954
- function isStrictMode(object) {
955
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
956
- }
957
- function isSuspense(object) {
958
- return typeOf(object) === REACT_SUSPENSE_TYPE;
959
- }
960
- function isSuspenseList(object) {
961
- return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
962
- }
963
- reactIs_development.ContextConsumer = ContextConsumer;
964
- reactIs_development.ContextProvider = ContextProvider;
965
- reactIs_development.Element = Element;
966
- reactIs_development.ForwardRef = ForwardRef;
967
- reactIs_development.Fragment = Fragment;
968
- reactIs_development.Lazy = Lazy;
969
- reactIs_development.Memo = Memo;
970
- reactIs_development.Portal = Portal;
971
- reactIs_development.Profiler = Profiler;
972
- reactIs_development.StrictMode = StrictMode;
973
- reactIs_development.Suspense = Suspense;
974
- reactIs_development.SuspenseList = SuspenseList;
975
- reactIs_development.isAsyncMode = isAsyncMode;
976
- reactIs_development.isConcurrentMode = isConcurrentMode;
977
- reactIs_development.isContextConsumer = isContextConsumer;
978
- reactIs_development.isContextProvider = isContextProvider;
979
- reactIs_development.isElement = isElement;
980
- reactIs_development.isForwardRef = isForwardRef;
981
- reactIs_development.isFragment = isFragment;
982
- reactIs_development.isLazy = isLazy;
983
- reactIs_development.isMemo = isMemo;
984
- reactIs_development.isPortal = isPortal;
985
- reactIs_development.isProfiler = isProfiler;
986
- reactIs_development.isStrictMode = isStrictMode;
987
- reactIs_development.isSuspense = isSuspense;
988
- reactIs_development.isSuspenseList = isSuspenseList;
989
- reactIs_development.isValidElementType = isValidElementType;
990
- reactIs_development.typeOf = typeOf;
991
- })();
992
- }
993
- return reactIs_development;
994
- }
995
- var hasRequiredReactIs;
996
- function requireReactIs() {
997
- if (hasRequiredReactIs) return reactIs.exports;
998
- hasRequiredReactIs = 1;
999
- if (process.env.NODE_ENV === "production") {
1000
- reactIs.exports = requireReactIs_production_min();
1001
- } else {
1002
- reactIs.exports = requireReactIs_development();
1003
- }
1004
- return reactIs.exports;
1005
- }
1006
- var reactIsExports = requireReactIs();
1007
- var index = /* @__PURE__ */ getDefaultExportFromCjs(reactIsExports);
1008
- var ReactIs18 = /* @__PURE__ */ _mergeNamespaces({
1009
- __proto__: null,
1010
- default: index
1011
- }, [reactIsExports]);
1012
- const reactIsMethods = [
1013
- "isAsyncMode",
1014
- "isConcurrentMode",
1015
- "isContextConsumer",
1016
- "isContextProvider",
1017
- "isElement",
1018
- "isForwardRef",
1019
- "isFragment",
1020
- "isLazy",
1021
- "isMemo",
1022
- "isPortal",
1023
- "isProfiler",
1024
- "isStrictMode",
1025
- "isSuspense",
1026
- "isSuspenseList",
1027
- "isValidElementType"
1028
- ];
1029
- const ReactIs = Object.fromEntries(
1030
- reactIsMethods.map((m) => [m, (v) => ReactIs18[m](v) || ReactIs19[m](v)])
1031
- );
1032
- function getChildren(arg, children = []) {
1033
- if (Array.isArray(arg)) {
1034
- for (const item of arg) {
1035
- getChildren(item, children);
1036
- }
1037
- } else if (arg != null && arg !== false && arg !== "") {
1038
- children.push(arg);
1039
- }
1040
- return children;
1041
- }
1042
- function getType(element) {
1043
- const type = element.type;
1044
- if (typeof type === "string") {
1045
- return type;
1046
- }
1047
- if (typeof type === "function") {
1048
- return type.displayName || type.name || "Unknown";
1049
- }
1050
- if (ReactIs.isFragment(element)) {
1051
- return "React.Fragment";
1052
- }
1053
- if (ReactIs.isSuspense(element)) {
1054
- return "React.Suspense";
1055
- }
1056
- if (typeof type === "object" && type !== null) {
1057
- if (ReactIs.isContextProvider(element)) {
1058
- return "Context.Provider";
1059
- }
1060
- if (ReactIs.isContextConsumer(element)) {
1061
- return "Context.Consumer";
1062
- }
1063
- if (ReactIs.isForwardRef(element)) {
1064
- if (type.displayName) {
1065
- return type.displayName;
1066
- }
1067
- const functionName = type.render.displayName || type.render.name || "";
1068
- return functionName === "" ? "ForwardRef" : `ForwardRef(${functionName})`;
1069
- }
1070
- if (ReactIs.isMemo(element)) {
1071
- const functionName = type.displayName || type.type.displayName || type.type.name || "";
1072
- return functionName === "" ? "Memo" : `Memo(${functionName})`;
1073
- }
1074
- }
1075
- return "UNDEFINED";
1076
- }
1077
- function getPropKeys$1(element) {
1078
- const { props } = element;
1079
- return Object.keys(props).filter((key) => key !== "children" && props[key] !== void 0).sort();
1080
- }
1081
- const serialize$1 = (element, config, indentation, depth, refs, printer2) => ++depth > config.maxDepth ? printElementAsLeaf(getType(element), config) : printElement(
1082
- getType(element),
1083
- printProps(
1084
- getPropKeys$1(element),
1085
- element.props,
1086
- config,
1087
- indentation + config.indent,
1088
- depth,
1089
- refs,
1090
- printer2
1091
- ),
1092
- printChildren(
1093
- getChildren(element.props.children),
1094
- config,
1095
- indentation + config.indent,
1096
- depth,
1097
- refs,
1098
- printer2
1099
- ),
1100
- config,
1101
- indentation
1102
- );
1103
- const test$1 = (val) => val != null && ReactIs.isElement(val);
1104
- const plugin$1 = { serialize: serialize$1, test: test$1 };
1105
- const testSymbol = typeof Symbol === "function" && Symbol.for ? Symbol.for("react.test.json") : 245830487;
1106
- function getPropKeys(object) {
1107
- const { props } = object;
1108
- return props ? Object.keys(props).filter((key) => props[key] !== void 0).sort() : [];
1109
- }
1110
- const serialize = (object, config, indentation, depth, refs, printer2) => ++depth > config.maxDepth ? printElementAsLeaf(object.type, config) : printElement(
1111
- object.type,
1112
- object.props ? printProps(
1113
- getPropKeys(object),
1114
- object.props,
1115
- config,
1116
- indentation + config.indent,
1117
- depth,
1118
- refs,
1119
- printer2
1120
- ) : "",
1121
- object.children ? printChildren(
1122
- object.children,
1123
- config,
1124
- indentation + config.indent,
1125
- depth,
1126
- refs,
1127
- printer2
1128
- ) : "",
1129
- config,
1130
- indentation
1131
- );
1132
- const test = (val) => val && val.$$typeof === testSymbol;
1133
- const plugin = { serialize, test };
1134
- const toString = Object.prototype.toString;
1135
- const toISOString = Date.prototype.toISOString;
1136
- const errorToString = Error.prototype.toString;
1137
- const regExpToString = RegExp.prototype.toString;
1138
- function getConstructorName(val) {
1139
- return typeof val.constructor === "function" && val.constructor.name || "Object";
1140
- }
1141
- function isWindow(val) {
1142
- return typeof window !== "undefined" && val === window;
1143
- }
1144
- const SYMBOL_REGEXP = /^Symbol\((.*)\)(.*)$/;
1145
- const NEWLINE_REGEXP = /\n/g;
1146
- class PrettyFormatPluginError extends Error {
1147
- constructor(message, stack) {
1148
- super(message);
1149
- this.stack = stack;
1150
- this.name = this.constructor.name;
1151
- }
1152
- }
1153
- function isToStringedArrayType(toStringed) {
1154
- return toStringed === "[object Array]" || toStringed === "[object ArrayBuffer]" || toStringed === "[object DataView]" || toStringed === "[object Float32Array]" || toStringed === "[object Float64Array]" || toStringed === "[object Int8Array]" || toStringed === "[object Int16Array]" || toStringed === "[object Int32Array]" || toStringed === "[object Uint8Array]" || toStringed === "[object Uint8ClampedArray]" || toStringed === "[object Uint16Array]" || toStringed === "[object Uint32Array]";
1155
- }
1156
- function printNumber(val) {
1157
- return Object.is(val, -0) ? "-0" : String(val);
1158
- }
1159
- function printBigInt(val) {
1160
- return String(`${val}n`);
1161
- }
1162
- function printFunction(val, printFunctionName) {
1163
- if (!printFunctionName) {
1164
- return "[Function]";
1165
- }
1166
- return `[Function ${val.name || "anonymous"}]`;
1167
- }
1168
- function printSymbol(val) {
1169
- return String(val).replace(SYMBOL_REGEXP, "Symbol($1)");
1170
- }
1171
- function printError(val) {
1172
- return `[${errorToString.call(val)}]`;
1173
- }
1174
- function printBasicValue(val, printFunctionName, escapeRegex, escapeString) {
1175
- if (val === true || val === false) {
1176
- return `${val}`;
1177
- }
1178
- if (val === void 0) {
1179
- return "undefined";
1180
- }
1181
- if (val === null) {
1182
- return "null";
1183
- }
1184
- const typeOf = typeof val;
1185
- if (typeOf === "number") {
1186
- return printNumber(val);
1187
- }
1188
- if (typeOf === "bigint") {
1189
- return printBigInt(val);
1190
- }
1191
- if (typeOf === "string") {
1192
- if (escapeString) {
1193
- return `"${val.replaceAll(/"|\\/g, "\\$&")}"`;
1194
- }
1195
- return `"${val}"`;
1196
- }
1197
- if (typeOf === "function") {
1198
- return printFunction(val, printFunctionName);
1199
- }
1200
- if (typeOf === "symbol") {
1201
- return printSymbol(val);
1202
- }
1203
- const toStringed = toString.call(val);
1204
- if (toStringed === "[object WeakMap]") {
1205
- return "WeakMap {}";
1206
- }
1207
- if (toStringed === "[object WeakSet]") {
1208
- return "WeakSet {}";
1209
- }
1210
- if (toStringed === "[object Function]" || toStringed === "[object GeneratorFunction]") {
1211
- return printFunction(val, printFunctionName);
1212
- }
1213
- if (toStringed === "[object Symbol]") {
1214
- return printSymbol(val);
1215
- }
1216
- if (toStringed === "[object Date]") {
1217
- return Number.isNaN(+val) ? "Date { NaN }" : toISOString.call(val);
1218
- }
1219
- if (toStringed === "[object Error]") {
1220
- return printError(val);
1221
- }
1222
- if (toStringed === "[object RegExp]") {
1223
- if (escapeRegex) {
1224
- return regExpToString.call(val).replaceAll(/[$()*+.?[\\\]^{|}]/g, "\\$&");
1225
- }
1226
- return regExpToString.call(val);
1227
- }
1228
- if (val instanceof Error) {
1229
- return printError(val);
1230
- }
1231
- return null;
1232
- }
1233
- function printComplexValue(val, config, indentation, depth, refs, hasCalledToJSON) {
1234
- if (refs.includes(val)) {
1235
- return "[Circular]";
1236
- }
1237
- refs = [...refs];
1238
- refs.push(val);
1239
- const hitMaxDepth = ++depth > config.maxDepth;
1240
- const min = config.min;
1241
- if (config.callToJSON && !hitMaxDepth && val.toJSON && typeof val.toJSON === "function" && !hasCalledToJSON) {
1242
- return printer(val.toJSON(), config, indentation, depth, refs, true);
1243
- }
1244
- const toStringed = toString.call(val);
1245
- if (toStringed === "[object Arguments]") {
1246
- return hitMaxDepth ? "[Arguments]" : `${min ? "" : "Arguments "}[${printListItems(
1247
- val,
1248
- config,
1249
- indentation,
1250
- depth,
1251
- refs,
1252
- printer
1253
- )}]`;
1254
- }
1255
- if (isToStringedArrayType(toStringed)) {
1256
- return hitMaxDepth ? `[${val.constructor.name}]` : `${min ? "" : !config.printBasicPrototype && val.constructor.name === "Array" ? "" : `${val.constructor.name} `}[${printListItems(val, config, indentation, depth, refs, printer)}]`;
1257
- }
1258
- if (toStringed === "[object Map]") {
1259
- return hitMaxDepth ? "[Map]" : `Map {${printIteratorEntries(
1260
- val.entries(),
1261
- config,
1262
- indentation,
1263
- depth,
1264
- refs,
1265
- printer,
1266
- " => "
1267
- )}}`;
1268
- }
1269
- if (toStringed === "[object Set]") {
1270
- return hitMaxDepth ? "[Set]" : `Set {${printIteratorValues(
1271
- val.values(),
1272
- config,
1273
- indentation,
1274
- depth,
1275
- refs,
1276
- printer
1277
- )}}`;
1278
- }
1279
- return hitMaxDepth || isWindow(val) ? `[${getConstructorName(val)}]` : `${min ? "" : !config.printBasicPrototype && getConstructorName(val) === "Object" ? "" : `${getConstructorName(val)} `}{${printObjectProperties(
1280
- val,
1281
- config,
1282
- indentation,
1283
- depth,
1284
- refs,
1285
- printer
1286
- )}}`;
1287
- }
1288
- const ErrorPlugin = {
1289
- test: (val) => val && val instanceof Error,
1290
- serialize(val, config, indentation, depth, refs, printer2) {
1291
- if (refs.includes(val)) {
1292
- return "[Circular]";
1293
- }
1294
- refs = [...refs, val];
1295
- const hitMaxDepth = ++depth > config.maxDepth;
1296
- const { message, cause, ...rest } = val;
1297
- const entries = {
1298
- message,
1299
- ...typeof cause !== "undefined" ? { cause } : {},
1300
- ...val instanceof AggregateError ? { errors: val.errors } : {},
1301
- ...rest
1302
- };
1303
- const name = val.name !== "Error" ? val.name : getConstructorName(val);
1304
- return hitMaxDepth ? `[${name}]` : `${name} {${printIteratorEntries(
1305
- Object.entries(entries).values(),
1306
- config,
1307
- indentation,
1308
- depth,
1309
- refs,
1310
- printer2
1311
- )}}`;
1312
- }
1313
- };
1314
- function isNewPlugin(plugin2) {
1315
- return plugin2.serialize != null;
1316
- }
1317
- function printPlugin(plugin2, val, config, indentation, depth, refs) {
1318
- let printed;
1319
- try {
1320
- printed = isNewPlugin(plugin2) ? plugin2.serialize(val, config, indentation, depth, refs, printer) : plugin2.print(
1321
- val,
1322
- (valChild) => printer(valChild, config, indentation, depth, refs),
1323
- (str) => {
1324
- const indentationNext = indentation + config.indent;
1325
- return indentationNext + str.replaceAll(NEWLINE_REGEXP, `
1326
- ${indentationNext}`);
1327
- },
1328
- {
1329
- edgeSpacing: config.spacingOuter,
1330
- min: config.min,
1331
- spacing: config.spacingInner
1332
- },
1333
- config.colors
1334
- );
1335
- } catch (error) {
1336
- throw new PrettyFormatPluginError(error.message, error.stack);
1337
- }
1338
- if (typeof printed !== "string") {
1339
- throw new TypeError(
1340
- `pretty-format: Plugin must return type "string" but instead returned "${typeof printed}".`
1341
- );
1342
- }
1343
- return printed;
1344
- }
1345
- function findPlugin(plugins2, val) {
1346
- for (const plugin2 of plugins2) {
1347
- try {
1348
- if (plugin2.test(val)) {
1349
- return plugin2;
1350
- }
1351
- } catch (error) {
1352
- throw new PrettyFormatPluginError(error.message, error.stack);
1353
- }
1354
- }
1355
- return null;
1356
- }
1357
- function printer(val, config, indentation, depth, refs, hasCalledToJSON) {
1358
- const plugin2 = findPlugin(config.plugins, val);
1359
- if (plugin2 !== null) {
1360
- return printPlugin(plugin2, val, config, indentation, depth, refs);
1361
- }
1362
- const basicResult = printBasicValue(
1363
- val,
1364
- config.printFunctionName,
1365
- config.escapeRegex,
1366
- config.escapeString
1367
- );
1368
- if (basicResult !== null) {
1369
- return basicResult;
1370
- }
1371
- return printComplexValue(
1372
- val,
1373
- config,
1374
- indentation,
1375
- depth,
1376
- refs,
1377
- hasCalledToJSON
1378
- );
1379
- }
1380
- const DEFAULT_THEME = {
1381
- comment: "gray",
1382
- content: "reset",
1383
- prop: "yellow",
1384
- tag: "cyan",
1385
- value: "green"
1386
- };
1387
- const DEFAULT_THEME_KEYS = Object.keys(DEFAULT_THEME);
1388
- const DEFAULT_OPTIONS = {
1389
- callToJSON: true,
1390
- compareKeys: void 0,
1391
- escapeRegex: false,
1392
- escapeString: true,
1393
- highlight: false,
1394
- indent: 2,
1395
- maxDepth: Number.POSITIVE_INFINITY,
1396
- maxWidth: Number.POSITIVE_INFINITY,
1397
- min: false,
1398
- plugins: [],
1399
- printBasicPrototype: true,
1400
- printFunctionName: true,
1401
- theme: DEFAULT_THEME
1402
- };
1403
- function validateOptions(options) {
1404
- for (const key of Object.keys(options)) {
1405
- if (!Object.prototype.hasOwnProperty.call(DEFAULT_OPTIONS, key)) {
1406
- throw new Error(`pretty-format: Unknown option "${key}".`);
1407
- }
1408
- }
1409
- if (options.min && options.indent !== void 0 && options.indent !== 0) {
1410
- throw new Error(
1411
- 'pretty-format: Options "min" and "indent" cannot be used together.'
1412
- );
1413
- }
1414
- }
1415
- function getColorsHighlight() {
1416
- return DEFAULT_THEME_KEYS.reduce((colors, key) => {
1417
- const value = DEFAULT_THEME[key];
1418
- const color = value && s[value];
1419
- if (color && typeof color.close === "string" && typeof color.open === "string") {
1420
- colors[key] = color;
1421
- } else {
1422
- throw new Error(
1423
- `pretty-format: Option "theme" has a key "${key}" whose value "${value}" is undefined in ansi-styles.`
1424
- );
1425
- }
1426
- return colors;
1427
- }, /* @__PURE__ */ Object.create(null));
1428
- }
1429
- function getColorsEmpty() {
1430
- return DEFAULT_THEME_KEYS.reduce((colors, key) => {
1431
- colors[key] = { close: "", open: "" };
1432
- return colors;
1433
- }, /* @__PURE__ */ Object.create(null));
1434
- }
1435
- function getPrintFunctionName(options) {
1436
- return (options == null ? void 0 : options.printFunctionName) ?? DEFAULT_OPTIONS.printFunctionName;
1437
- }
1438
- function getEscapeRegex(options) {
1439
- return (options == null ? void 0 : options.escapeRegex) ?? DEFAULT_OPTIONS.escapeRegex;
1440
- }
1441
- function getEscapeString(options) {
1442
- return (options == null ? void 0 : options.escapeString) ?? DEFAULT_OPTIONS.escapeString;
1443
- }
1444
- function getConfig(options) {
1445
- return {
1446
- callToJSON: (options == null ? void 0 : options.callToJSON) ?? DEFAULT_OPTIONS.callToJSON,
1447
- colors: (options == null ? void 0 : options.highlight) ? getColorsHighlight() : getColorsEmpty(),
1448
- compareKeys: typeof (options == null ? void 0 : options.compareKeys) === "function" || (options == null ? void 0 : options.compareKeys) === null ? options.compareKeys : DEFAULT_OPTIONS.compareKeys,
1449
- escapeRegex: getEscapeRegex(options),
1450
- escapeString: getEscapeString(options),
1451
- indent: (options == null ? void 0 : options.min) ? "" : createIndent((options == null ? void 0 : options.indent) ?? DEFAULT_OPTIONS.indent),
1452
- maxDepth: (options == null ? void 0 : options.maxDepth) ?? DEFAULT_OPTIONS.maxDepth,
1453
- maxWidth: (options == null ? void 0 : options.maxWidth) ?? DEFAULT_OPTIONS.maxWidth,
1454
- min: (options == null ? void 0 : options.min) ?? DEFAULT_OPTIONS.min,
1455
- plugins: (options == null ? void 0 : options.plugins) ?? DEFAULT_OPTIONS.plugins,
1456
- printBasicPrototype: (options == null ? void 0 : options.printBasicPrototype) ?? true,
1457
- printFunctionName: getPrintFunctionName(options),
1458
- spacingInner: (options == null ? void 0 : options.min) ? " " : "\n",
1459
- spacingOuter: (options == null ? void 0 : options.min) ? "" : "\n"
1460
- };
1461
- }
1462
- function createIndent(indent) {
1463
- return Array.from({ length: indent + 1 }).join(" ");
1464
- }
1465
- function format(val, options) {
1466
- if (options) {
1467
- validateOptions(options);
1468
- if (options.plugins) {
1469
- const plugin2 = findPlugin(options.plugins, val);
1470
- if (plugin2 !== null) {
1471
- return printPlugin(plugin2, val, getConfig(options), "", 0, []);
1472
- }
1473
- }
1474
- }
1475
- const basicResult = printBasicValue(
1476
- val,
1477
- getPrintFunctionName(options),
1478
- getEscapeRegex(options),
1479
- getEscapeString(options)
1480
- );
1481
- if (basicResult !== null) {
1482
- return basicResult;
1483
- }
1484
- return printComplexValue(val, getConfig(options), "", 0, []);
1485
- }
1486
- const plugins = {
1487
- AsymmetricMatcher: plugin$5,
1488
- DOMCollection: plugin$4,
1489
- DOMElement: plugin$3,
1490
- Immutable: plugin$2,
1491
- ReactElement: plugin$1,
1492
- ReactTestComponent: plugin,
1493
- Error: ErrorPlugin
1494
- };
1495
- export {
1496
- DEFAULT_OPTIONS,
1497
- format,
1498
- plugins
1499
- };